/* 6.25 local candidate. Shared web/native visual principles; data and map geometry are unchanged.
   This final theme layer leaves the existing responsive task layout and native controls intact. */
:root {
  --ui-font: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', sans-serif;
  --ui-size: 14px; --text-body: 15px; --text-secondary: 13px; --text-heading: 18px;
  --control-height: 36px; --control-radius: 9px; --control-gap: 8px;
  --control-pad: 12px; --radius: 16px; --rail-width: 104px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  font: 15px/1.55 var(--ui-font);
}
body[data-theme=light] {
  color-scheme: light;
  --bg: #f5f5f7; --surface: #fff; --raised: #f2f2f7; --text: #1d1d1f;
  --muted: #626268; --border: #d2d2d7; --divider: #e2e2e7; --panel-border: #d2d2d7;
  --accent: #0066cc; --section-accent: #0066cc; --selection: #eaf2ff;
  --shell: #f5f5f7; --navigation: #fff; --resource: #f2f2f7; --queue: #fff;
  --inspector: #fff; --evidence: #f5f5f7; --evidence-plot: #fff;
  --rail: #f5f5f7; --rail-active: #e5efff; --rail-hover: #eaeaef;
  --rail-ink: #55555c; --rail-edge: #0066cc; --warn: #995900;
  --canvas-bg: #f5f5f7; --canvas-ink: #333338; --canvas-label: #fff;
  --canvas-border: #d2d2d7; --plot: #0066cc; --axis: #626268; --grid: #e2e2e7;
  --glass-solid: #fff; --glass-fill: rgba(255,255,255,.94);
  --glass-highlight: rgba(255,255,255,.3); --glass-edge: rgba(255,255,255,.65);
  --glass-ring: rgba(0,0,0,.12); --glass-shadow: 0 8px 32px #00000014,0 2px 6px #00000008;
  --input-error: #b42318;
}
body[data-theme=dark] {
  color-scheme: dark;
  --bg: #151517; --surface: #1c1c1e; --raised: #2c2c2e; --text: #f5f5f7;
  --muted: #aeaeb4; --border: #48484d; --divider: #38383d; --panel-border: #48484d;
  --accent: #64a9ff; --section-accent: #64a9ff; --selection: #20354e;
  --shell: #151517; --navigation: #1c1c1e; --resource: #2c2c2e; --queue: #1c1c1e;
  --inspector: #1c1c1e; --evidence: #232326; --evidence-plot: #1c1c1e;
  --rail: #151517; --rail-active: #20354e; --rail-hover: #29292c;
  --rail-ink: #aeaeb4; --rail-edge: #64a9ff; --warn: #ffd18a;
  --canvas-bg: #151517; --canvas-ink: #e5e5ea; --canvas-label: #2c2c2e;
  --canvas-border: #48484d; --plot: #64a9ff; --axis: #aeaeb4; --grid: #38383d;
  --glass-solid: #242426; --glass-fill: rgba(36,36,38,.95);
  --glass-highlight: rgba(255,255,255,.03); --glass-edge: rgba(255,255,255,.08);
  --glass-ring: rgba(255,255,255,.15); --glass-shadow: 0 8px 32px #00000040;
  --input-error: #ffb4ab;
}
body { font-family: var(--ui-font); -webkit-font-smoothing: antialiased; }
body button, body input, body select, body textarea, body summary { font-family: var(--ui-font); }
body button, body .toolMenu>summary {
  min-height: var(--control-height); border-radius: var(--control-radius);
  color: var(--text); background: var(--surface); border-color: var(--border);
  font-size: 14px; font-weight: 500; line-height: 1.3;
}
body button { padding: 8px 12px; }
body button:hover { background: var(--raised); border-color: var(--border); }
body[data-theme] button:hover { background: var(--raised); border-color: var(--border); }
body button.active, body button[aria-pressed=true], body button[aria-selected=true] {
  background: var(--selection); color: var(--accent); border-color: transparent;
}
body button.primary { background: #0066cc; color: #fff; border-color: transparent; }
body button.primary:hover { background: #0057ad; opacity: 1; }
body button:disabled { opacity: .48; }
body input:not([type=checkbox]):not([type=range]), body select, body textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  min-height: var(--control-height); font-size: 14px; line-height: 1.4; padding: 8px 10px;
  color: var(--text); font-variant-numeric: tabular-nums;
}
body input[type=checkbox], body input[type=range] { accent-color: var(--accent); }
body input[type=checkbox] { width: 18px; height: 18px; }
body :is(button,input,select,textarea,summary,[role=separator]):focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}
body label { font-size: 13px; line-height: 1.45; color: var(--muted); }
body h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.5px; }
body h2 { font-size: 20px; line-height: 1.35; letter-spacing: -.2px; }
body h3 { font-size: 17px; line-height: 1.4; }
body p { line-height: 1.6; }
body small { line-height: 1.5; }
body a { color: var(--accent); }
body :is(.metricCard b,.rowValue,.browseMetrics b,#planComparison b) {
  font-family: var(--ui-font); font-variant-numeric: tabular-nums; letter-spacing: -.3px;
}

/* A quiet navigation rail. Icon boxes share an optical centre and text baseline. */
body[data-theme] #portalHeader { background: var(--surface); border-color: var(--divider); padding: 12px 20px; }
body[data-theme] #portalHeader .workspaceTabs { background: var(--rail); padding-left: 8px; padding-right: 8px; gap: 4px; }
body[data-theme] #portalHeader .workspaceTabs button[data-workspace] {
  width: 100%; border: 0; border-radius: 12px!important; background: transparent;
  color: var(--rail-ink); box-shadow: none!important; font-size: 13px; font-weight: 500;
  line-height: 1.35; gap: 7px;
}
body[data-theme] #portalHeader .workspaceTabs button[data-workspace].active,
body[data-theme] #portalHeader .workspaceTabs button[data-workspace][aria-pressed=true] {
  background: var(--selection)!important; color: var(--accent); font-weight: 600;
}
body[data-theme] #portalHeader .workspaceTabs button[data-workspace]:hover { background: var(--rail-hover); }
body[data-theme] #portalHeader .workspaceTabs button.active:hover { background: var(--rail-active); }
body[data-theme] #portalHeader .workspaceTabs button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
body #portalHeader .workspaceTabs svg { width: 20px; height: 20px; flex: none; stroke-width: 1.7; }
body #portalHeader .railBrand { background: var(--rail); border-color: var(--divider); }
body #portalHeader .railBrand img { width: 36px; height: 36px; filter: brightness(0) saturate(100%) invert(28%) sepia(90%) saturate(1900%) hue-rotate(193deg); }
body #portalHeader .portalHeading h1 { font-size: 21px; line-height: 1.25; letter-spacing: -.4px; }
body #portalHeader .portalHeading>span { font-size: 11px; line-height: 1.5; color: var(--muted); }
body #portalHeader .brand b { font-size: 12px; font-weight: 500; line-height: 1.4; }
body #portalHeader .gtaLogo { max-height: 44px; }
body #portalHeader .headerActions { gap: 8px; align-items: center; }
body #portalHeader .headerActions button,body #portalHeader .toolMenu>summary { font-size: 13px; }
body .railCredit { color: var(--muted); background: var(--rail); font-size: 10px; }

/* Consistent native controls and restrained task separators. */
body[data-workspace] #inspectionBar { background: var(--surface); padding: 8px 16px; gap: 8px; border-color: var(--divider); }
body #inspectionBar :is(button,select,summary) { min-height: 36px; height: 36px; font-size: 13px; }
body #inspectionBar #mapSearch { min-height: 36px; height: 36px; font-size: 14px; border-radius: 10px; padding: 8px 12px; background: var(--raised); }
body #inspectionBar .lineResource select { background: var(--surface); }
body #inspectionBar .segmented { background: var(--raised); border-radius: 10px; padding: 3px; gap: 2px; }
body #inspectionBar .segmented button { border: 0; border-radius: 7px; min-width: 40px; padding: 4px 8px; height: 30px; min-height: 30px; background: transparent; }
body #inspectionBar .segmented button.active { color: var(--text); background: var(--surface); box-shadow: 0 1px 4px #00000016; }
body #navigatorPanel,body #inspectorPanel { background: var(--surface); }
body #navigatorPanel section { padding: 16px; }
body #navigatorPanel .unifiedPanelHeading { padding: 16px; gap: 8px; border-color: var(--divider); background: var(--surface); }
body #navigatorPanel .unifiedPanelHeading h2 { font-size: 18px; letter-spacing: -.2px; }
body #navigatorPanel #closeUnified,body #inspectorPanel #closeInspector { min-width: 36px; min-height: 36px; border-radius: 18px; background: var(--raised); font-size: 20px; }
body #selectionPicker>summary { padding: 12px 16px; font-size: 14px; background: var(--surface); }
body #physicalLayerDisclosure { border-bottom: 1px solid var(--divider); }
body #physicalLayerDisclosure>summary { font-size: 13px; font-weight: 500; padding: 12px 16px; min-height: 44px; color: var(--muted); cursor: pointer; }
body #physicalLayerDisclosure .physicalLayerPanel { border: 0; }
body[data-workspace=design] #physicalLayerDisclosure { display: none; }
body #navigatorPanel :is(h2,h3) { font-size: 17px; line-height: 1.4; }
body .issueFilters { padding: 0; gap: 8px; }
body .issueFilters select { font-size: 13px; min-height: 36px; }
body .issuePanel .panelTitle { padding: 0; margin-bottom: 12px; }
body .issuePanel>.check { margin: 12px 0; font-size: 13px; min-height: 32px; }
body .resetFilters { margin-bottom: 12px; font-size: 13px; }
body .issueTableWrap { border: 1px solid var(--divider); border-radius: 12px; overflow: hidden; }
body .issueRowButton { border-radius: 0; padding: 16px; background: var(--surface); font-weight: 400; }
body .issueRowButton:hover,body .selectedIssue .issueRowButton { background: var(--selection); }
body .rowStatus { font-size: 12px; line-height: 1.5; margin-bottom: 8px; }
body .rowTitle { font-size: 17px; line-height: 1.4; font-weight: 600; }
body .rowValue { font-size: 24px; line-height: 1.3; margin: 8px 0; font-weight: 600; }
body .rowInterval,body .rowReason { font-size: 13px; line-height: 1.55; }
body .rowLocation { font-size: 12px; line-height: 1.5; margin-top: 8px; }
body .browseMetrics>div,body #planComparison>div { border: 0; background: var(--raised); border-radius: 12px; padding: 12px; }
body .browseMetrics b,body #planComparison b { font-size: 22px; line-height: 1.3; margin-top: 4px; }
body .browseStations button { padding: 10px 4px!important; font-family: var(--ui-font)!important; font-size: 14px; gap: 3px; min-height: 52px; }
body .browseStations button span { font-family: var(--ui-font)!important; }
body .browseStations button small { font-size: 12px; }
body .browseActions { gap: 8px; margin: 16px 0; }
body :is(.browseDefinition,.routeSpeedCoverage,.routeUnavailable,.physicalLayerPanel,.physicalSpeed) { font-size: 13px; line-height: 1.6; }
body .routeSpeedCoverage,body .routeUnavailable { border-radius: 10px; }
body .navigator .lineRow { padding: 10px 0; gap: 8px; }
body .resourceTree .lineRow label b { font-size: 14px; }
body #inspectorPanel { padding: 20px; }
body #inspectorPanel>h2 { font-size: 18px; line-height: 1.4; margin-bottom: 16px; }
body :is(.selectionPill,.contextSuggestion,.metricCard,.calculationResult) { border-radius: 12px; }
body .selectionPill { padding: 0; border: 0; background: transparent; }
body .selectionIdentity { display: flex; align-items: center; gap: 8px; line-height: 1.4; }
body .contextSuggestion { padding: 14px; line-height: 1.6; }
body .metricCard { padding: 12px; background: var(--raised); border-color: transparent; }
body .metricCard b { font-size: 23px; line-height: 1.3; }
body .metricCard :is(span,small) { font-size: 13px; }
body .rawCoordinates { line-height: 1.65; }
body .sourceDetails>summary,body .globalSettings>summary,body #screeningSettings>summary { font-size: 14px; padding: 12px 0; min-height: 44px; }
body .globalSettings label { gap: 12px; margin: 12px 0; }
body .globalSettings select { min-width: 0; }

body #designWorkspace { padding: 16px; background: var(--surface); }
body #designSelection h2 { font-size: 18px!important; line-height: 1.4; }
body #designSelection p { font-size: 14px; line-height: 1.6; }
body :is(.designGrid,.designAdvanced) label { font-size: 13px!important; }
body .designGrid input,body .designAdvanced input,body .designAdvanced select { min-height: 36px; height: auto; border-radius: 9px; }
body .designGrid .formGrid { gap: 12px; }
body .designGrid .formGrid input { margin-top: 6px; }
body .designGrid .panel h2 { font-size: 18px; }
body :is(.designAdvanced,.clearancePanel,.designTargetBasis,.calculationBasis)>summary { font-size: 14px!important; line-height: 1.5; min-height: 44px; padding: 12px 0; }
body .calculationResult { background: var(--raised); padding: 14px!important; line-height: 1.6; }
body .calculationResult b { font-family: var(--ui-font); font-variant-numeric: tabular-nums; }
body #planComparison { gap: 8px; }
body .designAdvanced { margin: 16px 0; }

/* Movable evidence is the only translucent content surface. */
body .mapAnalysisWindow { width: 384px; border-radius: 16px!important; border: 1px solid var(--glass-ring); box-shadow: var(--glass-shadow); }
body .floatWindowBar,body.touchLayout .floatWindowBar { padding: 8px; gap: 6px; grid-template-columns: 36px minmax(0,1fr) 36px; }
body .floatWindowBar :is(button,#resetAnalysisWindow,#moveAnalysisWindow) { width: 36px; min-width: 36px; min-height: 36px!important; height: 36px!important; border-radius: 8px; }
body .floatWindowBar .worldPointActions { gap: 6px; }
body .floatWindowBar .worldPointActions button { width: 100%; min-width: 0; font-size: 12px!important; padding: 4px!important; }
body .mapAnalysisWindow .worldPointCard { padding: 0 12px 10px; }
body .mapAnalysisWindow #worldCoordinates { font-family: var(--mono); font-size: 13px; text-align: center; border: 0; background: transparent; height: 28px; min-height: 28px; padding: 0; }
body .mapAnalysisWindow .profileToolbar { gap: 6px; padding: 0; }
body .mapAnalysisWindow .profileToolbar :is(button,select) { font-size: 12px; border-radius: 8px; min-height: 36px; }
body .mapAnalysisWindow .profileStatus { font-size: 12px; line-height: 1.45; gap: 4px 8px; margin: 8px 0; }
body #profilePanel { background: transparent; box-shadow: none; padding: 10px 12px 12px; border-color: var(--divider); }
body #legend { border-radius: 10px; padding: 8px 12px; font-size: 12px; background: var(--glass-solid); backdrop-filter: none; }
body .threeContextCard { border-radius: 12px; padding: 12px; background: var(--glass-solid); }

/* Menus and dialogs use the same rows, text margins, and focus affordances. */
body .toolMenuItems,body #searchResults { border-radius: 14px!important; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--glass-shadow); backdrop-filter: none; padding: 8px!important; gap: 4px!important; }
body .toolMenuItems button { min-height: 36px; font-size: 14px; border: 0; border-radius: 8px; background: transparent; text-align: left; padding: 8px 12px; }
body .toolMenuItems button:hover { background: var(--raised); }
body #searchResults button { border-radius: 9px; padding: 10px 12px; min-height: 48px; line-height: 1.4; }
body #searchResults .stationNamePrimary { font-size: 14px; }
body #searchResults button[aria-selected=true] { background: var(--selection); box-shadow: none; color: var(--text); }
body dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: 0 24px 80px #0000002b; max-width: calc(100vw - 32px); }
body dialog::backdrop { background: rgba(0,0,0,.28); }
body dialog>.row:first-child { align-items: center; gap: 16px; margin-bottom: 20px; }
body dialog h2 { font-size: 22px; line-height: 1.35; }
body dialog .row h2 { margin: 0; }
body dialog p { font-size: 14px; line-height: 1.65; }
body dialog .formGrid { gap: 16px; }
body dialog .row { flex-wrap: wrap; }
body dialog>.row:first-child>h2 { flex: 1; margin-right: 0; }
body #toast { border-radius: 12px; background: var(--text); color: var(--surface); padding: 12px 16px; font-size: 14px; }

/* Analysis pages share the same hierarchy while preserving all rail colour tags. */
body #analysisWorkspace { padding: 28px clamp(20px,3vw,48px) 56px; font-size: 15px; line-height: 1.6; }
body .analysisPageHeading { margin-bottom: 24px; gap: 16px; }
body .analysisPageHeading h1 { font-size: 28px; margin-bottom: 8px; }
body .analysisControls { gap: 16px; margin-bottom: 24px; }
body .analysisControls :is(select,input) { min-height: 40px; font-size: 15px; margin-top: 8px; }
body[data-theme] .analysisControls :is(select,input) { background: var(--surface); border-color: var(--border); }
body .analysisCard { border: 1px solid var(--divider); border-radius: 16px; padding: 24px; box-shadow: 0 1px 2px #00000003; }
body .analysisCard :is(h2,h3) { line-height: 1.4; }
body .analysisConclusion { border-left: 0; border-radius: 12px; padding: 16px; margin: 20px 0; }
body .analysisCard .metricGrid { margin: 20px 0; gap: 12px; }
body .analysisCard .metricCard { border-radius: 12px; }
body .analysisNote { font-size: 13px; line-height: 1.6; }
body .analysisTableScroll { border: 1px solid var(--divider); border-radius: 12px; margin: 16px 0; }
body .analysisTableScroll :is(td,th) { padding: 12px 16px; font-size: 14px; }
body .analysisTableScroll thead th { background: var(--raised); }
body :is(.stationNeeds,.supplyComparison) i { border-radius: 6px; }
body .journeyOptions { border-radius: 12px; overflow: hidden; }
body .journeyOptions .issueRowButton { padding: 14px 16px; }
body #analysisWorkspace summary { font-size: 14px; min-height: 44px; padding: 12px 0; }
body [data-capacity-map-paused] { border-radius: 16px; }

@media(min-width:1101px) {
  body[data-theme] #portalHeader .workspaceTabs { padding-top: 84px; }
  body #portalHeader .workspaceTabs button[data-workspace] { width: 88px; height: 72px!important; min-height: 72px!important; padding: 8px 4px!important; }
  body #portalHeader .railBrand { height: 72px; }
  body.unifiedLayout[data-workspace=explore] #exploreWorkspace { grid-template-columns: 320px minmax(0,1fr) 360px; }
  body.unifiedLayout[data-workspace=explore] .navCollapsed { grid-template-columns: minmax(0,1fr) 360px!important; }
  body.unifiedLayout[data-workspace=overview] { --panel-width: 340px; }
  body.unifiedLayout[data-workspace=design] .navigator { width: 40%; flex: 0 0 40%; max-width: 560px; }
}
@media(max-width:1100px) {
  body #portalHeader { padding: 8px 12px; }
  body[data-theme] #portalHeader .workspaceTabs { padding: 6px 8px; gap: 4px; }
  body[data-theme] #portalHeader .workspaceTabs button[data-workspace] { height: 44px!important; min-height: 44px!important; padding: 6px 8px!important; font-size: 13px; }
  body #portalHeader .railBrand { border-radius: 12px; }
  body #portalHeader .railBrand img { width: 28px; height: 28px; }
  body .railCredit { display: none; }
  body #analysisWorkspace { margin-left: 0; padding: 24px; }
}
body.touchDevice :is(button,select,summary),body.touchLayout :is(button,select,summary) { min-height: 44px; }
body.touchDevice input:not([type=checkbox]):not([type=range]),body.touchDevice select,body.touchDevice textarea { font-size: 16px!important; min-height: 44px; }
body.touchDevice #inspectionBar :is(button,select,summary) { min-height: 44px!important; height: 44px!important; }
body.touchDevice #inspectionBar #mapSearch { font-size: 16px!important; min-height: 44px; height: 44px; }
body.touchDevice #inspectionBar .segmented { padding: 0; }
body.touchDevice #inspectionBar .segmented button { font-size: 13px!important; }
body.touchDevice .toolMenuItems button { padding: 10px 12px!important; }
body.touchDevice #primaryMore>.toolMenuItems { position: fixed; top: var(--apple-menu-top,180px)!important; right: 12px; left: auto; max-height: calc(100dvh - var(--apple-menu-top,180px) - 12px); overflow: auto; }
body.touchDevice .floatWindowBar,body.touchLayout .floatWindowBar { grid-template-columns: 44px minmax(0,1fr) 44px; padding: 8px; }
body.touchDevice .floatWindowBar :is(button,#moveAnalysisWindow,#resetAnalysisWindow) { min-height: 44px!important; height: 44px!important; min-width: 44px; width: 44px; }
body.touchDevice .floatWindowBar .worldPointActions button { min-width: 0; width: 100%; }
body .floatWindowBar .worldPointActions>button { width: 100%!important; min-width: 0!important; }
body.touchLayout .touchPaneBar { background: var(--surface); padding: 8px; gap: 8px; border-color: var(--divider); }
body.touchLayout .touchPaneBar button { border-radius: 10px; height: 44px!important; font-size: 13px; padding: 6px 8px; }
body.touchLayout .touchPaneBar button.active { color: var(--accent); background: var(--selection); border-color: transparent; }
body.touchLayout .mapAnalysisWindow { border-radius: 16px!important; }
body.touchLayout .railCredit { display: none!important; }
@media(min-width:1101px) {
  body.touchLayout[data-theme] #portalHeader { height: auto; min-height: 0; padding: 8px 12px; }
  body.touchLayout[data-theme] #portalHeader .workspaceTabs { padding: 6px 8px!important; height: auto; }
  body.touchLayout[data-theme] #portalHeader .workspaceTabs button[data-workspace] { height: 44px!important; min-height: 44px!important; width: auto; flex: 1; padding: 6px 8px!important; font-size: 13px; }
  body.touchLayout #portalHeader .railBrand { width: 44px; height: 44px; }
  body.touchLayout #portalHeader .railBrand img { width: 28px; height: 28px; }
  body.touchLayout #analysisWorkspace { margin-left: 0; }
}
@media(max-width:650px), (orientation:landscape) and (max-width:1100px) and (max-height:450px) {
  body[data-theme] #portalHeader,body.touchLayout #portalHeader { grid-template-rows: 48px auto; padding: 6px 8px 0; gap: 0 8px; }
  body #portalHeader .portalHeading h1 { font-size: 18px; line-height: 1.25; letter-spacing: -.3px; }
  body #portalHeader .portalHeading>span { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  body[data-theme] #portalHeader .workspaceTabs,body.touchLayout #portalHeader .workspaceTabs { margin: 0 -8px; width: calc(100% + 16px); padding: 6px 8px; gap: 3px; }
  body[data-theme] #portalHeader .workspaceTabs button[data-workspace] { font-size: 11px!important; gap: 3px; padding: 6px 0!important; flex-direction: column; height: 54px!important; min-height: 54px!important; }
  body #portalHeader .workspaceTabs button span { white-space: nowrap; line-height: 15px; }
  body #portalHeader .workspaceTabs svg { width: 16px; height: 16px; }
  body #portalHeader .railBrand { width: 40px; height: 40px; }
  body[data-workspace] #inspectionBar { padding: 6px 8px; gap: 4px 6px; }
  body #inspectionBar #mapSearch { padding: 8px 10px; }
  body #primaryMore>.toolMenuItems { top: var(--apple-menu-top,180px)!important; right: 8px; width: min(320px,calc(100vw - 16px)); padding: 8px!important; max-height: calc(100dvh - var(--apple-menu-top,180px) - 12px); }
  body #navigatorPanel section { padding: 16px; }
  body #inspectorPanel { padding: 16px; }
  body.touchLayout .touchPaneBar { padding: 6px 8px; gap: 6px; }
  body.touchLayout .touchPaneBar button { font-size: 12px; white-space: nowrap; padding: 4px; }
  body #analysisWorkspace { padding: 20px 16px 40px; }
  body .analysisPageHeading { gap: 12px; margin-bottom: 20px; }
  body .analysisPageHeading h1 { font-size: 25px; }
  body .analysisControls { gap: 12px; margin-bottom: 20px; }
  body .analysisCard { padding: 16px; border-radius: 14px; }
  body dialog { padding: 20px; border-radius: 18px; }
  body dialog h2 { font-size: 20px; }
  body .mapAnalysisWindow { width: min(384px,calc(100% - 24px)); }
}
@media(max-width:360px) {
  body #portalHeader .portalHeading h1 { font-size: 16px; }
  body #portalHeader .headerActions { gap: 4px; }
  body #portalHeader .headerActions button,body #portalHeader .toolMenu>summary { padding: 6px!important; font-size: 12px; }
}
@media(prefers-reduced-transparency:reduce) {
  body .mapAnalysisWindow { background: var(--glass-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media print { body .workspaceTabs { display:none!important; } body #analysisWorkspace { margin-left:0; } }
