:root {
  --report-ink: #142c2a;
  --report-green: #137d6b;
  --report-blue: #5269c1;
  --report-line: #e7eceb;
}

.insight-page button:focus-visible, .insight-page summary:focus-visible {
  outline: 2px solid #258d77;
  outline-offset: 2px;
}

.insight-page { color: var(--report-ink); }
.insight-page > * + * { margin-top: 18px; }
.insight-page .panel { min-width: 0; border-radius: 16px; border-color: #e0e8e5; box-shadow: 0 3px 7px #15372c06; }
.work-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px;
  padding: 25px 28px 27px; border-radius: 16px;
  background: linear-gradient(110deg, #143c34, #1c5047 64%, #1d5e55); color: #fff;
}
.work-hero::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none; width: 44%; inset-block: 0; right: 0;
  background: repeating-linear-gradient(125deg, #e6fff116 0 1px, transparent 1px 24px);
  mask-image: linear-gradient(90deg, transparent, #000);
}
.work-hero p { margin: 0 0 6px; color: #c3e4d6; font-size: .82rem; font-variant-numeric: tabular-nums; }
.work-hero h1, .report-heading h1 {
  margin: 0; font-size: clamp(1.55rem, 1.15rem + 1.1vw, 2rem);
  line-height: 1.2; font-weight: 760; letter-spacing: -.025em;
}
.work-hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.work-hero .work-primary { background: #eaf8ec; border-color: #eaf8ec; color: #1b483a; }
.work-hero .work-primary:hover { background: #fff; }
.work-hero .work-secondary { background: #ffffff0d; border-color: #ffffff55; color: #fff; }
.work-hero .work-secondary:hover { background: #ffffff24; }
.work-hero button:focus-visible { outline-color: #e6fff0; }

.report-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.report-heading p, .report-card-head p { margin: 5px 0 0; color: #626f73; font-size: .81rem; font-variant-numeric: tabular-nums; }
.report-filters {
  display: grid; grid-template-columns: repeat(5, minmax(0,1fr)) auto;
  align-items: end; gap: 11px; padding: 15px 17px;
}
.report-filters label { color: #48595a; font-size: .78rem; min-width: 0; }
.report-filters input, .report-filters select { margin-top: 5px; padding: 8px; min-height: 39px; font-size: .83rem; min-width: 0; }
.report-filter-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.report-filter-actions > .btn { min-height: 39px; padding: 6px 15px; }
.report-segments {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  background: #f1f5f3; border: 1px solid #e7efeb; border-radius: 9px;
}
.report-segments button { border-radius: 6px; padding: 5px 9px; color: #465859; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.report-segments button[aria-pressed=true] { background: #fff; color: #144b3e; box-shadow: 0 1px 3px #183d3530; }
.report-segments button:hover:not([aria-pressed=true]) { background: #e1ece6; }
.report-coverage {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 10px 14px;
  border: 1px solid #f0e0c9; border-radius: 10px; background: #fcf6eb; color: #795221; font-size: .81rem;
}
.report-coverage > span { flex: 0 0 18px; border-radius: 50%; text-align: center; background: #f0e1c7; font-weight: 750; line-height: 18px; }
.report-coverage p { flex: 1 1 240px; margin: 0; }

.insight-page .report-kpis { gap: 13px; margin-bottom: 0; }
.report-kpis .kpi {
  position: relative; border-radius: 13px; border-color: #e0e8e5;
  padding: 15px 17px; min-height: 6.8rem; box-shadow: 0 3px 7px #15372c06;
}
.report-kpis .kpi:not(.feature)::after {
  position: absolute; content: ''; width: 17px; height: 3px;
  border-radius: 3px; top: 18px; right: 16px; background: #79a99a;
}
.report-kpis .kpi:nth-child(3)::after { background: #8a97d6; }
.report-kpis .kpi:nth-child(4)::after { background: #cbad79; }
.report-kpis .kpi.feature { background: #19564a; border-color: #19564a; }
.report-kpis .kpi.feature :is(.label,.hint) { color: #d0ede1; }
.report-kpis .kpi .label { padding-right: 15px; font-size: .82rem; }
.report-kpis .kpi .value { margin: 4px 0 3px; line-height: 1.22; font-weight: 740; }
.report-kpis .kpi .hint { display: block; font-size: .76rem; }

.report-grid { display: grid; align-items: start; gap: 16px; }
.report-grid-main { grid-template-columns: minmax(0,1.78fr) minmax(270px,1fr); }
.report-grid-equal { grid-template-columns: repeat(2,minmax(0,1fr)); }
.report-card-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; padding: 15px 19px; border-bottom: 1px solid var(--report-line);
}
.report-card-head h2 { margin: 0; font-size: 1.06rem; letter-spacing: -.02em; }
.report-card-head p { margin-top: 3px; }
.report-legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: #4f6061; font-size: .76rem; }
.report-legend span { display: inline-flex; align-items: center; gap: 6px; }
.report-legend span::before { content: ''; width: 9px; height: 9px; border-radius: 3px; background: var(--report-green); }
.report-legend .legend-orders::before { background: var(--report-blue); }
.report-ranking .legend-new::before { background: #9cc9bc; }

.report-trend-body { padding: 15px 19px 12px; }
.trend-layout { display: flex; gap: 7px; margin-top: 15px; --plot-height: 174px; }
.trend-axis {
  display: flex; flex-direction: column; justify-content: space-between; height: var(--plot-height);
  text-align: right; min-width: 30px; font-size: .68rem; color: #566668; font-variant-numeric: tabular-nums;
}
.trend-axis > span:first-child { transform: translateY(-40%); }
.trend-axis > span:last-child { transform: translateY(45%); }
.trend-scroll { flex: 1; min-width: 0; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; scrollbar-color: #cbd9d4 transparent; }
.trend-surface { min-width: max(100%, calc(var(--buckets) * 14px)); }
.trend-plot, .trend-labels { display: grid; grid-template-columns: repeat(var(--buckets), minmax(0,1fr)); }
.trend-plot {
  height: var(--plot-height);
  background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), #e8eeed calc(25% - 1px) 25%);
  border-bottom: 1px solid #d5e2df; border-top: 1px solid #e8eeed;
}
.trend-point {
  display: flex; align-items: end; justify-content: center; gap: 2px; height: 100%; min-width: 0;
  border-radius: 4px 4px 0 0; padding: 0 min(5px, 8%); touch-action: manipulation;
}
.trend-point:hover, .trend-point[aria-pressed=true] { background: #a9d9ca2b; }
.trend-point:focus-visible { outline-offset: -2px !important; }
.trend-bar { width: 42%; max-width: 28px; height: var(--height); border-radius: 4px 4px 0 0; background: var(--report-green); }
.trend-bar.series-orders { background: var(--report-blue); }
[data-series="new"] :is(.series-orders,.legend-orders,.trend-detail-orders),
[data-series="orders"] :is(.series-new,.legend-new,.trend-detail-new) { display: none; }
[data-series="new"] .series-new, [data-series="orders"] .series-orders { width: 65%; }
.trend-labels { font-size: .68rem; color: #59696a; padding-top: 7px; min-height: 26px; }
.trend-labels span { justify-self: center; white-space: nowrap; }
.trend-labels span:first-child { justify-self: start; }
.trend-labels span:last-child:not(:first-child) { justify-self: end; }
.trend-selection {
  min-height: 40px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 14px;
  padding: 8px 11px; border-radius: 8px; background: #f0f6f4; font-size: .77rem; color: #415656;
}
.trend-selection strong { margin-right: auto; font-variant-numeric: tabular-nums; color: var(--report-ink); }
.trend-detail-new b { color: var(--report-green); }
.trend-detail-orders b { color: #4259a9; }
.trend-data { margin-top: 8px; }
.trend-data summary, .report-country summary { color: #355a50; padding: 5px 0; cursor: pointer; font-size: .78rem; font-weight: 650; }
.trend-data .tablewrap { margin-top: 5px; max-height: 225px; }
.trend-data :is(th,td) { padding: 7px 10px; }

.conversion-body { padding: 19px; display: grid; gap: 15px; justify-items: center; }
.conversion-ring {
  display: grid; place-items: center; height: 144px; width: 144px; border-radius: 50%; background: #e9efec;
}
.conversion-ring.has-rate { background: conic-gradient(var(--report-green) 0 var(--conversion), #e9efec var(--conversion) 100%); }
.ring-value {
  width: calc(100% - 24px); aspect-ratio: 1; border-radius: 50%; background: white;
  display: grid; align-content: center; justify-items: center; gap: 1px; padding: 4px; text-align: center;
}
.ring-value strong { font-size: 1.8rem; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.ring-value span { font-size: .7rem; color: #58696c; }
.conversion-metrics { display: grid; width: 100%; gap: 6px; }
.conversion-metrics button {
  display: flex; justify-content: space-between; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px; background: #f4f7f6; font-size: .8rem; text-align: left;
}
.conversion-metrics button:hover { background: #e8f2ed; }
.conversion-metrics b { font-size: 1.05rem; white-space: nowrap; }
.conversion-metrics small, .activity-row small { font-weight: 500; color: #5b6868; }

.report-ranking, .report-activity { padding: 13px 19px 16px; }
.report-ranking .report-legend { margin-bottom: 11px; }
.ranking-row + .ranking-row { margin-top: 13px; }
.ranking-label { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; margin-bottom: 5px; font-size: .82rem; }
.ranking-label span { color: #4c6160; font-variant-numeric: tabular-nums; }
.ranking-track, .activity-track, .cohort-track {
  display: block; height: 7px; width: 100%; border-radius: 50px; overflow: hidden; background: #e9efed;
}
.ranking-fill { display: block; height: 100%; width: var(--width); background: #9cc9bc; border-radius: inherit; }
.ranking-fill span { display: block; height: 100%; width: var(--width); background: var(--report-blue); border-radius: inherit; }
.activity-row {
  display: grid; grid-template-columns: minmax(105px,1.05fr) minmax(18px,1fr) minmax(34px,auto) 10px;
  gap: 7px 12px; width: 100%; align-items: center; padding: 8px 4px; border-radius: 6px;
  font-size: .79rem; text-align: left;
}
.activity-row:hover { background: #f3f8f5; }
.activity-row strong { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.activity-row .activity-arrow { text-align: center; color: #44816b; font-size: 1.15rem; line-height: 1; }
.activity-track i, .cohort-track i { display: block; height: 100%; width: var(--width); border-radius: inherit; background: var(--report-green); }
.activity-track .dormant { background: #b88c52; }
.report-note { margin: 8px 0 0; color: #59696b; font-size: .75rem; }
.cohort-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 13px 17px 17px; }
.cohort-card { background: #f4f7f6; border-radius: 11px; padding: 11px 12px; }
.cohort-card > div { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 3px 8px; font-size: .8rem; margin-bottom: 10px; }
.cohort-card strong { font-size: 1.25rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cohort-card p { margin: 6px 0 0; font-size: .75rem; }
.report-summary-list { margin: 4px 19px 9px; }
.report-summary-list div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--report-line); font-size: .81rem; }
.report-summary-list div:last-child { border-bottom: none; }
.report-summary-list dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-country summary { padding: 13px 19px; font-size: .87rem; }
.report-country .report-note { margin: 0; padding: 8px 19px 13px; }
.workspace-tasks { display: grid; gap: 14px; min-width: 0; }
.workspace-page .listitem { padding-top: 13px; padding-bottom: 13px; }
.workspace-page .empty { padding: 25px 16px; }
.workspace-page .conversion-ring { width: 126px; height: 126px; }
.workspace-page .ring-value strong { font-size: 1.65rem; }

@media (max-width: 1350px) {
  .report-filters { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .report-filter-actions { grid-column: 1 / -1; justify-content: end; }
}
@media (max-width: 1000px) {
  .report-grid-main { grid-template-columns: minmax(0,1fr); }
  .report-conversion .conversion-body { grid-template-columns: auto minmax(0,1fr); }
  .report-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .report-grid-equal { grid-template-columns: minmax(0,1fr); }
  .insight-page > * + * { margin-top: 14px; }
  .insight-page .report-kpis { gap: 9px; }
  .report-kpis .kpi { padding: 12px; min-height: 5.9rem; }
  .report-kpis .kpi:not(.feature)::after { top: 14px; right: 10px; width: 12px; }
}
@media (max-width: 540px) {
  .report-filters { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 12px; }
  .report-filter-actions { grid-column: auto; gap: 5px; }
  .report-filter-actions .report-segments button { padding-inline: 6px; }
  .report-filter-actions > .btn { padding-inline: 9px; }
  .work-hero { padding: 18px; align-items: start; }
  .work-hero .btn { font-size: .82rem; padding: 7px 10px; }
  .report-heading { align-items: start; }
  .report-heading > .btn { font-size: .78rem; padding: 7px 9px; }
  :is(.report-card-head,.report-trend-body,.conversion-body,.report-ranking,.report-activity) { padding-inline: 13px; }
  .trend-layout { --plot-height: 145px; }
  .report-conversion .conversion-body { gap: 11px; }
  .conversion-ring, .workspace-page .conversion-ring { width: 114px; height: 114px; }
  .ring-value strong { font-size: 1.55rem; }
}

