:root {
  font-family: Manrope, "Segoe UI", sans-serif;
  color: #19263d;
  background: #f5f7fa;
  --ink: #19263d;
  --muted: #536076;
  --blue: #294eb0;
  --line: #dce3ee;
  --paper: #fff;
  --field: #f0f4fa;
  --edge: clamp(14px, 2vw, 30px);
  --shadow: 0 4px 16px #182e5320, 0 1px 3px #182e5317;
  --panel-width: 400px;
  --red-loss: #bc606d;
}
.product { display: grid; grid-template-rows: minmax(460px, 1fr) auto; height: 100svh; }
.topbar { grid-area: 1 / 1; align-self: start; pointer-events: none; }
.topbar .toolbar { pointer-events: auto; }
.footer { grid-area: 2 / 1; min-height: 48px; }
#map { grid-area: 1 / 1; }
.toolbar {
  display: grid;
  grid-template-columns: auto auto minmax(170px, 1fr) auto auto;
  grid-template-areas: "brand menu search filters switch";
  gap: 8px;
  min-height: 0;
  padding: 0;
  margin-top: 16px;
}
.brand { grid-area: brand; min-height: 54px; padding: 5px 13px 5px 6px; gap: 8px; border: 1px solid #e4eaf1; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); font-size: 22px; letter-spacing: -.065em; }
.brand img { width: 39px; height: 39px; border-radius: 12px; }
.menu-button { grid-area: menu; width: 51px; height: 54px; border-radius: 13px; box-shadow: var(--shadow); }
.search { grid-area: search; min-height: 54px; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); }
.search-button { color: #2e4770; width: 48px; }
.search input { font-size: 15px; font-weight: 630; }
.search input::placeholder { color: #5d6b81; }
.search:focus-within, .picker:focus-within { border-color: #87a5e9; box-shadow: 0 0 0 2px #cfdbfb; }
.filters { grid-area: filters; grid-template-columns: 118px 152px; gap: 0; padding: 4px; border: 1px solid #e4eaf1; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
.picker { min-height: 44px; border-color: transparent; }
.picker + .picker { border-left: 1px solid #e9eef5; border-radius: 0 10px 10px 0; }
.picker > svg { color: #486085; }
.picker select { font-size: 13px; }
.switch { grid-area: switch; padding: 4px; border: 1px solid #e4eaf1; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
.switch button { padding-inline: 13px; border-radius: 9px; }
.switch button[aria-pressed="true"] { color: #fff; background: #253a65; box-shadow: none; }
.icon-button:hover, .picker:hover, .switch button:hover, .popover button:hover, .suggestions button:hover, .suggestions [aria-selected="true"] { background: #edf2fc; color: #294eb0; }
:focus-visible, .picker select:focus-visible, .search input:focus-visible { outline-color: #325ad5; }
.popover { top: 80px; left: calc(var(--edge) + 135px); right: auto; }
#map, .hero { min-width: 0; }
.map-frame, .map-frame.has-report { display: block; position: relative; margin-inline: 0; border-radius: 0; overflow: hidden; }
.map-area { position: absolute; inset: 0; border: 0; border-radius: 0; background: #edf1f1; }
.map-stage.mo-cs { --mo-light: #e9eefc23; }
.map-tools { bottom: 22px; right: var(--edge); border-color: #dde5ef; border-radius: 15px; box-shadow: var(--shadow); }
.map-tools button { width: 45px; height: 45px; color: #263a60; }
.map-tools button:hover { background: #edf2fc; color: #294eb0; }
.has-report .map-tools, .has-report .competitors { right: calc(var(--edge) + var(--panel-width) + 13px); }
.legend { bottom: 22px; left: var(--edge); width: 287px; padding: 14px; border-radius: 14px; border-color: #dde5ef; box-shadow: var(--shadow); }
.legend-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.legend-head svg { width: 17px; height: 17px; color: #294eb0; }
.legend-head p { margin: 0; font-size: 13px; font-weight: 800; }
.legend-scale { gap: 0; height: 9px; border-radius: 4px; }
.legend-labels { font-size: 10px; font-weight: 700; }
.legend-labels span { white-space: nowrap; }
.legend-extra { display: flex; align-items: center; gap: 6px; margin-top: 11px; font-size: 10px; font-weight: 700; color: var(--muted); }
.legend-extra i { width: 10px; height: 10px; border-radius: 2px; background: var(--legend-other, var(--red-loss)); }
.competitors { position: absolute; top: 86px; right: var(--edge); z-index: 3; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 11px; border: 1px solid #dde5ef; border-radius: 11px; background: var(--paper); box-shadow: var(--shadow); font-size: 12px; font-weight: 780; }
.competitors svg { width: 16px; height: 16px; color: #38517b; }
.competitors:hover, .competitors[aria-pressed="true"] { background: #edf2fc; border-color: #afc2f0; }
.map-value { position: absolute; z-index: 2; pointer-events: none; min-width: max-content; background: #fff; padding: 6px 9px; color: #172748; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 2px 10px #1d2c4f21; font-size: 11px; font-weight: 800; }
.report { position: absolute; top: 86px; right: var(--edge); bottom: 22px; width: var(--panel-width); height: auto; border-radius: 17px; background: #fff; border-color: #dce4ef; box-shadow: 0 8px 30px #162e5030; }
.report-kind { color: #3861a9; }
.report-nav button[aria-pressed="true"] { color: #294eb0; border-bottom-color: #3159bd; }
.report-nav button:hover { color: #23449b; }
.report h2:focus-visible { outline-color: #325ad5; }
.revenue-tile { color: #162e61; background: #edf3fe; }
.revenue-top, .range-labels { color: #455d8c; }
.range-track { background: linear-gradient(90deg,#bfd0f5,#6389df); }
.range-track i { background: #1b3d86; }
.risk { background: #ffefe9; color: #942c25; border-color: #efd0c6; }
.risk[data-level="low"] { background: #e5f4ed; color: #216342; border-color: #bedfce; }
.risk[data-level="medium"] { background: #fff3d9; color: #805b0c; border-color: #edd8aa; }
.results-quick > div, .compare-stops > div { background: #f2f5fa; }
.results-quick strong { color: #203454; }
.outline-action { color: #223c72; background: #f5f8fe; border-color: #ccdaee; }
.outline-action:hover { background: #e9f0fd; }
.solid-action { color: #fff; background: #294eb0; border-color: #294eb0; }
.solid-action:hover { background: #1f3982; }
@media (max-width: 1120px) {
  :root { --panel-width: 377px; }
  .toolbar { gap: 7px; }
  .filters { grid-template-columns: 120px 149px; }
  .switch button { padding-inline: 9px; }
  .shortcut { display: none; }
}
@media (max-width: 1000px) {
  :root { --panel-width: 345px; }
  .toolbar { grid-template-columns: auto 1fr 1fr auto; grid-template-areas: "brand search search menu" "filters filters switch switch"; }
  .filters { width: fit-content; }
  .switch { justify-self: end; }
  .popover { right: var(--edge); left: auto; }
  .competitors, .report { top: 145px; }
}
@media (max-width: 650px) {
  .product { grid-template-rows: minmax(490px, 1fr) auto; min-height: 100svh; height: auto; }
  .toolbar { grid-template-columns: auto 1fr 50px; grid-template-areas: "brand . menu" "search search search" "filters filters filters" "switch switch switch"; margin-top: 10px; }
  .brand { min-height: 48px; padding: 3px 10px 3px 4px; font-size: 21px; }
  .brand img { width: 36px; height: 36px; }
  .menu-button { width: 50px; height: 48px; }
  .search { min-height: 46px; }
  .filters, .switch { width: 100%; }
  .filters { grid-template-columns: 1fr 1fr; padding-block: 0; }
  .switch { gap: 3px; }
  .switch button { padding-inline: 6px; }
  .popover { top: 65px; }
  .footer { padding-block: 1px 6px; }
  .sources-line { gap: 0 9px; font-size: 11px; }
  .legend { bottom: 12px; width: min(248px, calc(100% - 85px)); padding: 11px; }
  .legend-head { margin-bottom: 8px; }
  .legend-extra { margin-top: 8px; }
  .map-tools, .has-report .map-tools { right: var(--edge); bottom: 12px; }
  .competitors, .has-report .competitors { top: 236px; right: var(--edge); }
  .map-frame .report { top: auto; bottom: 0; width: 100%; height: min(74svh, 660px); max-height: min(74svh, 660px); border-radius: 18px 18px 0 0; }
}
