:root {
  font-family: Manrope, "Segoe UI", Arial, sans-serif;
  color: #19302a;
  background: #f1f2ec;
  --ink: #19302a;
  --muted: #53645d;
  --blue: #176c5c;
  --line: #d8e0d8;
  --paper: #fbfcf8;
  --field: #edf0e9;
  --edge: clamp(16px, 2.35vw, 36px);
  --shadow: 0 12px 32px #203c3020, 0 2px 6px #203c300a;
}
body { font-weight: 500; }
.toolbar { gap: 10px; }
.product { height: 100svh; }
.brand { font-size: 23px; font-weight: 800; letter-spacing: -.055em; padding-right: 7px; }
.brand img { border-radius: 12px; }
.picker, .icon-button { background: var(--paper); }
.picker select { font-weight: 650; }
.search { background: #e9ede5; }
.search:focus-within, .picker:focus-within { border-color: #528777; box-shadow: 0 0 0 2px #cee8db; }
:focus-visible, .search input:focus-visible, .picker select:focus-visible { outline-color: #087963; }
.switch { background: #e4ede5; }
.switch button[aria-pressed="true"] { background: #133d34; }
.icon-button:hover, .switch button:hover, .map-tools button:hover, .popover button:hover, .suggestions button:hover, .suggestions [aria-selected="true"] { background: #e4f0e6; }
.map-frame { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 13px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.map-frame.has-report { grid-template-columns: minmax(0, 1fr) minmax(385px, 425px); }
.map-area { min-width: 0; min-height: 0; position: relative; isolation: isolate; overflow: hidden; border: 1px solid #d7ded4; border-radius: 16px; background: #ebeee6; }
.map-stage.mo-cs { --mo-light: #f4f8dc24; }
.legend { bottom: 17px; left: 17px; width: 214px; padding: 12px 13px; }
.map-tools { bottom: 17px; right: 17px; }
.legend, .map-tools, .map-tools button { background: var(--paper); }
.footer { font-weight: 550; }
.quiet-link { font-weight: 750; }
.report {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  position: relative;
  inset: auto;
  width: auto;
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 6px 28px #163b2710;
  padding: 0;
}
.report-head { padding: 20px 20px 13px; gap: 10px; }
.report-kind { color: #326960; font-size: 11px; font-weight: 800; letter-spacing: .065em; text-transform: uppercase; }
.report h2 { margin-top: 5px; font-size: 25px; font-weight: 800; line-height: 1.16; letter-spacing: -.053em; }
.report h2:focus-visible { outline: 2px solid #087963; outline-offset: 3px; border-radius: 3px; }
.report-place { color: var(--muted); font-weight: 600; font-size: 12px; margin: 4px 0 0; }
.report-address-note { color: var(--muted); font-size: 11px; margin: 5px 0 0; line-height: 1.35; }
.report-head .icon-button { flex: none; }
.report-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px 5px; border-bottom: 1px solid var(--line); padding: 0 19px 8px; }
.report-nav button { padding: 0 3px; min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 750; }
.report-nav button[aria-pressed="true"] { background: #dcebe1; color: #195c50; }
.report-nav button:hover { background: #edf2eb; color: #116a58; }
.report-nav button:disabled { opacity: .5; cursor: default; }
.report-body { padding: 15px 20px 12px; min-height: 0; overflow: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
.report-section { margin-top: 17px; }
.report-body h3 { margin: 0 0 10px; font-size: 15px; font-weight: 800; letter-spacing: -.035em; }
.revenue-tile { padding: 14px 15px 12px; border-radius: 13px; background: #173d35; color: #f7fcf6; }
.revenue-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; font-size: 12px; color: #d0e5d9; font-weight: 700; }
.revenue-tile > strong { display: block; font-size: clamp(27px, 2.65vw, 38px); font-weight: 800; line-height: 1.2; letter-spacing: -.065em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.risk { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; color: #f7d8bf; background: #8151376b; border: 1px solid #c4946f65; border-radius: 5px; font-size: 9px; white-space: nowrap; font-weight: 800; }
.risk::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.risk[data-level="low"] { color: #c9ebc9; background: #33754a55; border-color: #85ac7b77; }
.risk[data-level="medium"] { color: #f4e8a8; }
.revenue-range { margin-top: 11px; }
.range-track { height: 4px; border-radius: 3px; background: linear-gradient(90deg,#476f61,#9fceb5); position: relative; }
.range-track i { position: absolute; width: 2px; height: 10px; margin-top: -3px; left: var(--median, 50%); background: #fff8e5; border-radius: 1px; transform: translateX(-50%); }
.range-labels { display: flex; justify-content: space-between; gap: 5px; margin-top: 7px; font-size: 10px; color: #d5e6db; font-variant-numeric: tabular-nums; }
.results-quick { display: grid; grid-template-columns: .96fr 1.04fr; gap: 8px; margin-top: 10px; }
.results-quick > div { display: grid; gap: 4px; align-content: center; min-height: 63px; padding: 8px 10px; border-radius: 9px; background: #edf0e9; }
.results-quick span { color: var(--muted); font-size: 10px; font-weight: 650; }
.results-quick strong { color: #19392f; font-size: 13px; font-weight: 800; letter-spacing: -.025em; }
.results-quick strong.loss { color: #942e20; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.detail-table th { text-align: left; font-weight: 600; color: var(--muted); }
.detail-table td { text-align: right; font-weight: 750; }
.detail-table th, .detail-table td { padding: 6px 0; border-bottom: 1px solid #e4e8e0; vertical-align: top; }
.detail-table tfoot th, .detail-table tfoot td { font-weight: 800; color: var(--ink); border-bottom: 0; padding-top: 8px; }
.report-actions { display: grid; grid-template-columns: minmax(0,.87fr) minmax(0,1.13fr); gap: 7px; padding: 11px 13px; border-top: 1px solid var(--line); background: var(--paper); }
.outline-action, .solid-action { display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 6px 8px; min-height: 44px; border-radius: 8px; font-size: 11px; font-weight: 800; background: #f8faf5; border: 1px solid #c9d8cf; text-align: center; }
.solid-action { background: #1d604f; border-color: #1d604f; color: #fff; }
.outline-action:hover { background: #e8f0e7; }
.solid-action:hover { background: #144638; }
.outline-action svg, .solid-action svg { width: 16px; height: 16px; }
.solid-action small { background: #ffffff24; border-radius: 4px; color: inherit; padding: 2px 4px; font-size: 9px; }
.outline-action:disabled, .solid-action:disabled { opacity: .52; cursor: default; }
.report-note { color: var(--muted); margin: 12px 0; font-size: 12px; line-height: 1.5; }
.finance-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 10px; }
.finance-fields label { min-width: 0; display: grid; gap: 5px; font-size: 11px; font-weight: 750; }
.finance-fields input { width: 100%; padding: 0 8px; min-height: 44px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.report-note:empty { display: none; }
.detail-list { padding: 0; margin: 0 0 18px; list-style: none; font-size: 12px; }
.detail-list li { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #e4e8e0; }
.detail-list strong { font-size: 11px; white-space: nowrap; }
.detail-list a { text-decoration: underline; text-underline-offset: 3px; }
.source-list strong, .source-list a { flex: 0 1 47%; text-align: right; white-space: normal; overflow-wrap: anywhere; }
.forecast-chart { display: grid; gap: 18px; margin: 14px 0; padding: 16px; border: 1px solid #dce6dc; border-radius: 12px; background: #f1f5ee; list-style: none; }
.forecast-chart li > div { display: flex; justify-content: space-between; gap: 7px; align-items: baseline; font-size: 12px; }
.forecast-chart b { display: inline-block; min-width: 30px; color: #246457; }
.forecast-chart strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.forecast-chart i { display: block; height: 7px; margin-top: 7px; border-radius: 6px; background: #dae6db; overflow: hidden; }
.forecast-chart i::before { content: ''; display: block; height: 100%; width: var(--forecast-width, 0%); border-radius: inherit; background: #6ca491; }
.forecast-chart [data-percentile="p50"] i::before { background: #277660; }
.competition-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.competition-heading h3 { margin-bottom: 0; }
.competition-heading strong { font-size: 15px; color: var(--blue); font-variant-numeric: tabular-nums; }
.competition-note { margin: 5px 0 10px; }
.competitor-list li { padding-block: 9px; }
.compare-stops, .compare-exports { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-block: 12px; }
.compare-stops > div { display: grid; gap: 4px; padding: 9px; background: var(--field); border-radius: 8px; }
.compare-stops span { font-size: 10px; color: var(--muted); }
.compare-stops strong { font-size: 12px; line-height: 1.25; }
.compare-table thead th:not(:first-child) { text-align: right; }
.compare-table td, .compare-table th { font-size: 11px; padding-inline: 2px; }
@media (max-width: 900px) and (min-width: 651px) {
  .map-frame.has-report { grid-template-columns: minmax(0, 1fr) minmax(340px, 375px); }
  .legend { width: min(184px, calc(100% - 80px)); }
}
@media (max-width: 650px) {
  :root { --edge: 12px; }
  .product { height: auto; }
  .toolbar { gap: 8px; }
  .map-frame.has-report { grid-template-columns: minmax(0, 1fr); }
  #map:has(.report:not([hidden])) { position: relative; z-index: 7; }
  body:has(.map-frame[data-mode="compare"][data-waiting="true"]) .topbar { z-index: 10; }
  .map-frame .report { position: fixed; z-index: 9; inset: auto 0 0; max-height: min(84svh, 720px); height: min(84svh, 720px); border-radius: 18px 18px 0 0; box-shadow: 0 -14px 50px #173d353a; }
  .map-frame[data-mode="compare"][data-waiting="true"] .report { height: min(38svh, 345px); }
  .map-frame[data-mode="compare"][data-waiting="true"] .report-nav { display: none; }
  .report-head { padding-top: 15px; }
  .report h2 { font-size: 23px; }
  .report-actions { padding-bottom: max(11px, env(safe-area-inset-bottom)); }
  .legend { left: 11px; bottom: 11px; width: min(199px, calc(100% - 74px)); }
  .map-tools { right: 11px; bottom: 11px; }
}
