@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Newsreader:opsz,wght@6..72,600&display=swap");

:root {
  --ink: #17221f;
  --muted: #68736e;
  --paper: #f4f1e8;
  --surface: #fffdf8;
  --surface-2: #ebe8de;
  --green: #123f35;
  --green-2: #1b6b59;
  --amber: #d9951e;
  --line: #d9d5c9;
  --danger: #a73c2e;
  --scrollbar-thumb: #aeb8b2;
  --scrollbar-thumb-hover: #7d8d85;
  /* Derived surfaces. Component backgrounds use these, never a literal colour,
     so every skin and theme inherits a fill that sits under its own --ink.
     tests/color-contract.test.mjs enforces this. */
  --surface-alt: color-mix(in srgb, var(--ink) 5%, var(--surface));
  --surface-hover: color-mix(in srgb, var(--green-2) 16%, var(--surface));
  --surface-tint: color-mix(in srgb, var(--green-2) 10%, var(--surface));
  --surface-glass: color-mix(in srgb, var(--paper) 94%, transparent);
  --shadow: 0 18px 50px rgb(17 39 33 / 14%);
  --sidebar: clamp(320px, 25vw, 400px);
  --ui-radius: 10px;
  --ui-radius-small: 6px;
  --ui-font: "DM Sans", system-ui, sans-serif;
  --ui-heading: "Newsreader", Georgia, serif;
  --ui-border-width: 1px;
  --ui-panel-shadow: var(--shadow);
  color-scheme: light;
  font-family: var(--ui-font);
  color: var(--ink);
  background: var(--paper);
}

/* Presentation skins are complete interface systems. They deliberately do not
   alter layer renderers or classifications; only the opt-in "skin" basemap
   (js/basemap-themes.js) is drawn from their tokens. */
:root[data-skin="clean-light"] { --ink:#172033; --muted:#657086; --paper:#edf2f7; --surface:#fff; --surface-2:#f3f6fa; --green:#145da0; --green-2:#287fc5; --amber:#cf7b18; --line:#d5dde8; --danger:#ba3b43; --shadow:0 16px 38px rgb(24 48 78 / 13%); --ui-radius:12px; --ui-radius-small:7px; --ui-font:"DM Sans",system-ui,sans-serif; --ui-heading:"DM Sans",system-ui,sans-serif; --ui-border-width:1px; --ui-panel-shadow:0 16px 38px rgb(24 48 78 / 13%); color-scheme:light; }

/* Contextual recommendations sit on the map without changing the panel layout. */
.context-workspace { position:absolute; z-index:20; left:50%; top:16px; transform:translateX(-50%); width:min(480px, calc(100% - 120px)); padding:14px; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:var(--ui-radius, 12px); box-shadow:var(--shadow); }
.context-workspace[hidden] { display:none; }
.context-workspace__header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.context-workspace__header strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; }
.context-workspace__eyebrow { display:block; margin-bottom:3px; color:var(--muted); font-size:10px; font-weight:700; letter-spacing:.09em; }
.context-workspace__close { flex:none; width:30px; height:30px; padding:0; border:0; border-radius:6px; color:var(--muted); background:transparent; font-size:22px; cursor:pointer; }
.context-workspace__actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.context-workspace__actions button { min-height:36px; padding:7px 10px; border:1px solid var(--line); border-radius:var(--ui-radius-small, 7px); color:var(--ink); background:var(--surface-2); font-size:12px; font-weight:700; cursor:pointer; }
.context-workspace button:hover { color:var(--green-2); border-color:var(--green-2); }
.context-workspace button:focus-visible { outline:2px solid var(--green-2); outline-offset:2px; }
.context-workspace__more { position:relative; }
.context-workspace__more summary { display:flex; align-items:center; min-height:36px; padding:7px 10px; border:1px solid var(--line); border-radius:var(--ui-radius-small, 7px); background:var(--surface-2); font-size:12px; font-weight:700; cursor:pointer; list-style:none; }
.context-workspace__more summary::-webkit-details-marker { display:none; }
.context-workspace__more[open] { display:flex; flex-wrap:wrap; gap:6px; }
.context-workspace__coverage { margin:10px 0 0; color:var(--muted); font-size:10px; }
.context-workspace--dismissed { padding:0; border:0; background:transparent; box-shadow:none; }
.context-workspace__restore { padding:5px 0; border:0; color:var(--muted); background:transparent; font-size:11px; cursor:pointer; }
.context-workspace__restore:hover { text-decoration:underline; }
.context-workspace__diagnostics { margin-top:10px; color:var(--muted); font-size:11px; }
.context-workspace__diagnostics summary { cursor:pointer; }
.context-workspace__diagnostics pre { max-height:200px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; font-size:10px; }
.context-workspace__walkthrough { margin-top:10px; padding:2px 0; border:0; color:var(--green-2); background:transparent; font-size:11px; text-align:left; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.workspace-walkthrough__highlight { position:fixed; z-index:1000; border:3px solid var(--amber, #bd772a); border-radius:10px; box-shadow:0 0 0 3px rgb(255 255 255 / 80%); pointer-events:none; }
.workspace-walkthrough__highlight[hidden] { display:none; }
.workspace-walkthrough__card { position:fixed; z-index:1001; right:24px; bottom:24px; width:min(360px, calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; padding:20px; border:1px solid var(--line); border-radius:12px; color:var(--ink); background:var(--surface); box-shadow:0 8px 32px rgb(0 0 0 / 22%); }
.workspace-walkthrough__card--top { top:24px; bottom:auto; }
.workspace-walkthrough__status { margin-top:10px !important; color:var(--muted); }
.workspace-walkthrough__close { position:absolute; top:8px; right:10px; width:32px; height:32px; border:0; border-radius:6px; color:var(--muted); background:transparent; font-size:24px; cursor:pointer; }
.workspace-walkthrough__count { color:var(--green-2); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.workspace-walkthrough__content h2 { margin:8px 32px 8px 0; font-size:20px; }
.workspace-walkthrough__content p { margin:0; line-height:1.5; font-size:14px; }
.workspace-walkthrough__actions { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
.workspace-walkthrough__actions button { min-height:38px; padding:8px 14px; border:1px solid var(--line); border-radius:7px; color:var(--ink); background:var(--surface-2); cursor:pointer; }
.workspace-walkthrough__actions button:last-child { color:#fff; background:var(--green); }
.workspace-walkthrough__actions button:disabled { opacity:.45; cursor:default; }
.workspace-walkthrough button:focus-visible { outline:2px solid var(--green-2); outline-offset:2px; }
@media (max-width: 640px), (max-width: 880px) and (orientation: portrait) { .workspace-walkthrough__card { right:16px; bottom:calc(80px + env(safe-area-inset-bottom)); } }
@media (max-width: 640px), (max-width: 880px) and (orientation: portrait) { .workspace-walkthrough__card--top { bottom:auto; } }
@media (max-width: 640px), (max-width: 880px) and (orientation: portrait) { .context-workspace { top:68px; width:min(340px, calc(100% - 100px)); padding:12px; } .context-workspace__actions button { min-height:44px; } }
:root[data-skin="dark-analytical"] { --ink:#edf4f7; --muted:#9baab3; --paper:#0c1217; --surface:#121a20; --surface-2:#19242c; --green:#176b77; --green-2:#52c4d1; --amber:#d7a64c; --line:#2a3942; --danger:#ef777c; --shadow:0 20px 48px rgb(0 0 0 / 42%); --ui-radius:10px; --ui-radius-small:6px; --ui-font:"DM Sans",system-ui,sans-serif; --ui-heading:"DM Sans",system-ui,sans-serif; --ui-border-width:1px; --ui-panel-shadow:0 20px 48px rgb(0 0 0 / 42%); color-scheme:dark; }
:root[data-skin="tidal-95"] { --ink:#073b3a; --muted:#476f6a; --paper:#f4efd9; --surface:#fffaf0; --surface-2:#c7e7dc; --green:#006d6b; --green-2:#159b8c; --amber:#ef6f61; --line:#438a80; --shadow:5px 5px 0 rgb(0 72 70 / 24%); --ui-radius:6px; --ui-radius-small:3px; --ui-font:"DM Sans",system-ui,sans-serif; --ui-heading:"DM Sans",system-ui,sans-serif; --ui-border-width:2px; --ui-panel-shadow:5px 5px 0 rgb(0 72 70 / 24%); color-scheme:light; }
:root[data-skin="portolan"] { --ink:#33251d; --muted:#705e4d; --paper:#e9ddbd; --surface:#f6edcf; --surface-2:#eadbb5; --green:#4b3a2b; --green-2:#8a5934; --amber:#9b742c; --line:#806c48; --shadow:inset 0 0 0 3px rgb(128 108 72 / 13%),0 12px 30px rgb(53 36 20 / 18%); --ui-radius:2px; --ui-radius-small:1px; --ui-font:"DM Sans",system-ui,sans-serif; --ui-heading:"Newsreader",Georgia,serif; --ui-border-width:3px; --ui-panel-shadow:inset 0 0 0 3px rgb(128 108 72 / 13%),0 12px 30px rgb(53 36 20 / 18%); color-scheme:light; }
:root[data-skin="velvet-orbit"] { --ink:#fff7dc; --muted:#d4bed3; --paper:#25102e; --surface:#35153f; --surface-2:#4c2257; --green:#872f91; --green-2:#e06cef; --amber:#f0bf61; --line:#774b81; --shadow:0 22px 58px rgb(17 3 23 / 52%); --ui-radius:20px; --ui-radius-small:12px; --ui-font:"DM Sans",system-ui,sans-serif; --ui-heading:"Newsreader",Georgia,serif; --ui-border-width:1px; --ui-panel-shadow:0 22px 58px rgb(17 3 23 / 52%); color-scheme:dark; }
:root[data-skin="violet-circuit"] { --ink:#e9e5ff; --muted:#a7a0c4; --paper:#080811; --surface:#0e0d18; --surface-2:#171426; --green:#34205b; --green-2:#9a70ff; --amber:#35d7d0; --line:#594586; --shadow:0 0 0 1px rgb(143 99 255 / 18%),0 18px 54px rgb(0 0 0 / 60%); --ui-radius:4px; --ui-radius-small:2px; --ui-font:"DM Sans",system-ui,sans-serif; --ui-heading:"DM Sans",system-ui,sans-serif; --ui-border-width:1px; --ui-panel-shadow:0 0 0 1px rgb(143 99 255 / 18%),0 18px 54px rgb(0 0 0 / 60%); color-scheme:dark; }
:root[data-skin="highway"] { --ink:#17202b; --muted:#657181; --paper:#f7f8f8; --surface:#fff; --surface-2:#f0f2f3; --green:#d83b0b; --green-2:#ff4b0b; --amber:#ff4b0b; --line:#cbd1d5; --danger:#c72f12; --shadow:0 8px 22px rgb(31 42 52 / 10%); --ui-radius:2px; --ui-radius-small:1px; --ui-font:"IBM Plex Mono","SFMono-Regular",Consolas,monospace; --ui-heading:"IBM Plex Mono","SFMono-Regular",Consolas,monospace; --ui-border-width:1px; --ui-panel-shadow:0 1px 0 rgb(255 255 255 / 80%),0 7px 22px rgb(31 42 52 / 10%); color-scheme:light; }
:root[data-skin="steeler"] { --ink:#303744; --muted:#6e7180; --paper:#dad5d2; --surface:#f7f3eb; --surface-2:#bbb3b2; --green:#4f5d73; --green-2:#68778f; --amber:#86808a; --line:#aaa6a5; --danger:#914e51; --shadow:0 12px 30px rgb(41 45 55 / 20%); --ui-radius:14px; --ui-radius-small:8px; --ui-font:"DM Sans",system-ui,sans-serif; --ui-heading:"Newsreader",Georgia,serif; --ui-border-width:1px; --ui-panel-shadow:0 2px 0 rgb(255 255 255 / 70%) inset,0 12px 30px rgb(41 45 55 / 20%); color-scheme:light; }
:root[data-skin="slice"] { --ink:#3b2528; --muted:#76565a; --paper:#f5e1db; --surface:#fff4ed; --surface-2:#edc5c5; --green:#704036; --green-2:#9c4058; --amber:#8d5036; --line:#be8583; --danger:#a72d44; --shadow:4px 4px 0 rgb(112 64 54 / 22%); --ui-radius:3px; --ui-radius-small:2px; --ui-font:"DM Sans",system-ui,sans-serif; --ui-heading:"Newsreader",Georgia,serif; --ui-border-width:1px; --ui-panel-shadow:4px 4px 0 rgb(112 64 54 / 22%); color-scheme:light; }
:root[data-skin="wavelength"] { --ink:#fff4e8; --muted:#d1b8ad; --paper:#202124; --surface:#29282a; --surface-2:#393235; --green:#9a392d; --green-2:#ff9c6d; --amber:#ffc276; --line:#79534b; --danger:#ff9788; --shadow:0 16px 36px rgb(0 0 0 / 35%); --ui-radius:14px; --ui-radius-small:7px; --ui-font:"DM Sans",system-ui,sans-serif; --ui-heading:"DM Sans",system-ui,sans-serif; --ui-border-width:1px; --ui-panel-shadow:0 16px 36px rgb(0 0 0 / 35%); color-scheme:dark; }
:root[data-skin="connect"] { --ink:#063c40; --muted:#46696a; --paper:#fff0a5; --surface:#fffbea; --surface-2:#ffe45c; --green:#005963; --green-2:#00757b; --amber:#765600; --line:#8aa99d; --danger:#ae3036; --shadow:0 12px 30px rgb(0 73 76 / 16%); --ui-radius:16px; --ui-radius-small:8px; --ui-font:"DM Sans",system-ui,sans-serif; --ui-heading:"DM Sans",system-ui,sans-serif; --ui-border-width:2px; --ui-panel-shadow:0 12px 30px rgb(0 73 76 / 16%); color-scheme:light; }
:root[data-skin="trade-desk"] { --ink:#23211d; --muted:#5f5a51; --paper:#f6f3ec; --surface:#fffdf8; --surface-2:#ebe5d8; --green:#7a4a2c; --green-2:#9c5a2b; --amber:#3d7f52; --line:#cfc7b7; --danger:#a8321f; --shadow:0 1px 0 rgb(35 33 29 / 10%),0 10px 26px rgb(35 33 29 / 9%); --ui-radius:4px; --ui-radius-small:2px; --ui-font:"DM Sans",system-ui,sans-serif; --ui-heading:"DM Sans",system-ui,sans-serif; --ui-border-width:1px; --ui-panel-shadow:0 1px 0 rgb(35 33 29 / 10%),0 10px 26px rgb(35 33 29 / 9%); color-scheme:light; }
:root[data-skin="slice"] :is(.brand,.dialog__header) { border-bottom:4px solid #b64f68; }
:root[data-skin="wavelength"] :is(.brand,.dialog__header) { border-bottom:4px solid #ed7954; }
:root[data-skin="connect"] :is(.brand,.dialog__header) { border-bottom:4px solid #00757b; box-shadow:0 3px 0 #f4cf22; }
/* Trade Desk: a hairline ink rule over a cocoa stripe, like a newspaper masthead. */
:root[data-skin="trade-desk"] :is(.brand,.dialog__header) { border-bottom:1px solid var(--ink); box-shadow:0 3px 0 #d0702d; }
:root[data-skin="trade-desk"] :is(.menu__label,.eyebrow,.dialog__eyebrow,#dialog-eyebrow) { letter-spacing:.08em; text-transform:uppercase; }
#app { font-family:var(--ui-font); background:var(--paper); }
:root:not([data-skin="gismap"]) :is(.sidebar,.application-dock,.dialog__shell,.insights-overlay,.atlas-chapter-overlay,.atlas-chapter-description,.mode-details,.explorer-distribution,.mode-records,.presentation-empty) { border-width:var(--ui-border-width); border-radius:var(--ui-radius); box-shadow:var(--ui-panel-shadow); background-color:var(--surface); color:var(--ink); }
:root:not([data-skin="gismap"]) :is(button,input,select,textarea,.explorer-counts span,.explorer-counts button) { border-radius:var(--ui-radius-small); }
:root:not([data-skin="gismap"]) :is(h1,h2,h3,h4,.brand__name,.mode-dashboard header h2,.mode-details h3,.atlas-chapter-overlay h2) { font-family:var(--ui-heading); }
:root[data-skin="violet-circuit"] :is(.sidebar,.mode-details,.explorer-distribution,.atlas-chapter-overlay) { background-image:linear-gradient(90deg,transparent 97%,rgb(143 99 255 / 10%) 100%); background-size:24px 24px; }
:root[data-skin="highway"] :is(.sidebar,.application-dock,.dialog__shell,.insights-overlay,.atlas-chapter-overlay,.atlas-chapter-description,.mode-details,.explorer-distribution,.mode-records,.presentation-empty) { background-image:linear-gradient(rgb(23 32 43 / 2%) 1px,transparent 1px); background-size:100% 24px; }
:root[data-skin="highway"] :is(.sidebar,.application-dock--right) { border-color:var(--line); box-shadow:none; }
:root[data-skin="highway"] .brand { height:72px; padding:8px 14px; background:rgb(255 255 255 / 96%); border-bottom:1px solid var(--line); }
:root[data-skin="highway"] .brand__mark { width:43px; height:43px; filter:saturate(.2) contrast(1.25); }
:root[data-skin="highway"] .brand__wordmark strong { color:var(--ink); font:600 18px/1 var(--ui-heading); letter-spacing:-.04em; }
:root[data-skin="highway"] .brand__wordmark span { color:var(--amber); font:600 9px/1 var(--ui-heading); }
:root[data-skin="highway"] .brand__wordmark small { margin-top:6px; font:500 7px/1 var(--ui-heading); letter-spacing:.12em; }
:root[data-skin="highway"] .menu-bar { padding:0; background:rgb(255 255 255 / 96%); }
:root[data-skin="highway"] .menu__trigger { padding-block:10px; border-right:1px solid var(--line); font:500 10px/1 var(--ui-heading); text-transform:uppercase; letter-spacing:.06em; }
:root[data-skin="highway"] :is(.panel summary,.application-panel > header,.dialog__header,.insights-overlay > header) { background:rgb(255 255 255 / 94%); }
:root[data-skin="highway"] .panel summary { padding-block:13px; }
:root[data-skin="highway"] .panel summary span { font:600 13px/1 var(--ui-heading); text-transform:uppercase; letter-spacing:.06em; }
:root[data-skin="highway"] :is(.eyebrow,.menu__label) { color:var(--amber); font-family:var(--ui-heading); letter-spacing:.16em; }
:root[data-skin="highway"] :is(button,input,select,textarea) { font-family:var(--ui-font); }
:root[data-skin="highway"] :is(button,.button--quiet) { box-shadow:none; }
:root[data-skin="highway"] :is(button:hover,.presentation-card.is-selected,.skin-card.is-selected) { border-color:var(--amber); }
:root[data-skin="highway"] :is(.atlas-present-action button,.dialog__actions .button--primary,.insight-tabs button[aria-selected="true"],.application-bottom-tabs button[aria-selected="true"]) { border-color:var(--amber); color:white; background:var(--amber); }
:root[data-skin="highway"] .atlas-chapter-overlay { border:1px solid var(--line); border-left:3px solid var(--amber); background:rgb(255 255 255 / 95%); backdrop-filter:blur(8px) grayscale(.35); }
:root[data-skin="highway"] .atlas-chapter-description { border-top:3px solid var(--amber); background:rgb(255 255 255 / 96%); backdrop-filter:blur(8px) grayscale(.35); }
:root[data-skin="highway"] .atlas-chapter-overlay__navigation button { border-color:var(--line); color:var(--ink); background:white; }
:root[data-skin="highway"] .atlas-chapter-overlay__navigation button:hover { border-color:var(--amber); color:var(--amber); }
:root[data-skin="highway"] .map-nav button { border:1px solid var(--line); color:var(--ink); background:rgb(255 255 255 / 94%); box-shadow:0 4px 14px rgb(31 42 52 / 12%); }
:root[data-skin="highway"] .map-status { border:1px solid var(--line); border-radius:1px; color:var(--ink); background:rgb(255 255 255 / 92%); }
:root[data-skin="highway"] :is(.mode-details dl div,.composable-details dl div,.insight-panel dl div) { border-color:color-mix(in srgb,var(--line) 68%,transparent); }
:root[data-skin="steeler"] { background-color:#d8d3d0; background-image:repeating-linear-gradient(90deg,#f0ece4 0 22px,#b6aeb0 22px 72px,#f0ece4 72px 87px,#667286 87px 119px,#f0ece4 119px 137px,#b6aeb0 137px 190px); }
:root[data-skin="steeler"] :is(.sidebar,.application-dock,.dialog__shell,.insights-overlay,.atlas-chapter-overlay,.atlas-chapter-description,.mode-details,.explorer-distribution,.mode-records,.presentation-empty) { background-color:rgb(247 243 235 / 96%); background-image:repeating-linear-gradient(90deg,transparent 0 52px,rgb(101 113 133 / 5%) 52px 68px,transparent 68px 106px,rgb(174 164 165 / 8%) 106px 158px); border-color:#aaa6a5; }
:root[data-skin="steeler"] :is(.sidebar,.application-dock--right) { border-color:#747987; box-shadow:6px 0 20px rgb(41 45 55 / 16%); }
:root[data-skin="steeler"] .brand { background:linear-gradient(105deg,#f8f4ec 0 62%,#c0b8b8 62% 76%,#626e82 76% 86%,#f8f4ec 86%); border-bottom:2px solid #687285; }
:root[data-skin="steeler"] .brand__wordmark strong { color:#394557; }
:root[data-skin="steeler"] .brand__wordmark span { color:#777180; }
:root[data-skin="steeler"] .menu-bar { background:linear-gradient(90deg,#f7f3eb 0 72%,#e4dfd7); border-bottom-color:#858997; }
:root[data-skin="steeler"] :is(.panel summary,.application-panel > header,.dialog__header,.insights-overlay > header) { background:linear-gradient(90deg,rgb(247 243 235 / 96%),rgb(210 204 201 / 94%)); }
:root[data-skin="steeler"] :is(.eyebrow,.menu__label) { color:#56647a; }
:root[data-skin="steeler"] :is(button,input,select,textarea,.insight-panel,.bookmark-editor,.application-builder__instance) { border-color:#9b9ba3; background-color:#f8f5ee; }
:root[data-skin="steeler"] :is(button:hover,.presentation-card.is-selected,.skin-card.is-selected) { border-color:#58667c; box-shadow:inset 0 0 0 1px #58667c; }
:root[data-skin="steeler"] :is(.atlas-present-action button,.dialog__actions .button--primary,.insight-tabs button[aria-selected="true"],.application-bottom-tabs button[aria-selected="true"]) { border-color:#4f5d73; color:#fffdf7; background:linear-gradient(180deg,#718097,#4d5b71); }
:root[data-skin="steeler"] .atlas-chapter-overlay { border:1px solid #858997; border-left:8px solid #5b687d; background:rgb(248 245 238 / 94%); box-shadow:0 3px 0 rgb(255 255 255 / 70%) inset,0 14px 30px rgb(41 45 55 / 22%); backdrop-filter:blur(12px); }
:root[data-skin="steeler"] .atlas-chapter-description { border:1px solid #858997; border-top:8px solid #b1a8aa; background:rgb(248 245 238 / 95%); box-shadow:0 3px 0 rgb(255 255 255 / 70%) inset,0 14px 30px rgb(41 45 55 / 22%); backdrop-filter:blur(12px); }
:root[data-skin="steeler"] .atlas-chapter-overlay__navigation button { border-color:#737887; color:#374153; background:#f8f5ee; }
:root[data-skin="steeler"] .map-nav button { border:1px solid #737887; color:#354052; background:linear-gradient(145deg,#fcf9f2,#dad5d2); box-shadow:0 5px 14px rgb(41 45 55 / 20%); }
:root[data-skin="steeler"] .map-status { border:1px solid #737887; color:#f9f6ef; background:rgb(63 73 89 / 88%); }
:root[data-skin="steeler"] .mode-records > :nth-child(even) { background:color-mix(in srgb,#a9a1a3 18%,var(--surface)); }
#app[data-application-preset] { color:var(--ink); background:var(--paper); }
#app[data-application-preset] .brand { color:var(--ink); background:linear-gradient(120deg,var(--surface),var(--surface-2)); }

:root[data-skin="gismap"][data-theme="dark"] {
  --ink: #f2efe6;
  --muted: #a8b2ad;
  --paper: #0b1210;
  --surface: #111a17;
  --surface-2: #17231f;
  --green: #174f42;
  --green-2: #42b99c;
  --amber: #f0ad38;
  --line: #2a3732;
  --danger: #d96a59;
  --scrollbar-thumb: #40534b;
  --scrollbar-thumb-hover: #5d786d;
  --shadow: 0 18px 50px rgb(0 0 0 / 42%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; margin: 0; overflow: hidden; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--amber) 48%, transparent);
  outline-offset: 2px;
}

.app-shell { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100%; }

/* Composable application layout. Docks are ordinary grid regions, so opening a
   panel resizes the single map view instead of covering or recreating it. */
.application-dock { min-width: 0; min-height: 0; background: var(--surface); color: var(--ink); }
.application-dock[hidden] { display: none !important; }
.application-dock--left { display: grid; gap: 0; }
.application-dock--right { grid-column: 3; width: var(--application-right-width, 380px); min-width: 280px; max-width: 55vw; height: 100%; overflow: auto; border-left: 1px solid var(--line); resize: horizontal; direction: rtl; }
.application-dock--right > * { direction: ltr; }
.application-dock--bottom { position: absolute; z-index: 12; right: 0; bottom: 0; left: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); height: var(--application-bottom-height, 250px); min-height: 160px; max-height: 55vh; overflow: auto; border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgb(7 29 23 / 12%); resize: vertical; }
.application-dock--bottom[data-bottom-mode="workspace"] { display: grid; grid-template-rows: 6px auto minmax(0, 1fr); grid-auto-flow: initial; grid-auto-columns: auto; overflow: hidden; resize: none; }
.application-dock--bottom[data-bottom-mode="nav"] { height: auto; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; resize: none; }
.application-dock--bottom[data-bottom-mode="nav"] > .application-bottom-tabs { grid-row: 2; }
.application-dock--bottom[data-bottom-mode="nav"] > .application-panel { max-height: min(42vh, 360px); overflow: auto; }
.application-bottom-tabs { display: flex; gap: 4px; min-height: 44px; padding: 5px 8px; overflow-x: auto; border-top: 1px solid var(--line); background: var(--surface); }
.application-bottom-tabs button { flex: 0 0 auto; padding: 7px 14px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.application-bottom-tabs button[aria-selected="true"] { color: white; background: var(--green); }
.application-bottom-tabs .application-bottom-tabs__collapse { margin-left: auto; border-color: var(--line); color: var(--ink); background: var(--surface-2); }
.application-bottom-resizer { height: 6px; cursor: ns-resize; background: color-mix(in srgb, var(--green-2) 28%, var(--surface)); }
.application-dock--bottom.is-collapsed { height: 50px !important; min-height: 50px; }
.application-dock--bottom.is-collapsed > .application-panel, .application-dock--bottom.is-collapsed > .application-bottom-resizer { display: none; }
.application-dock--floating { position: absolute; z-index: 14; inset: 0; pointer-events: none; }
.application-dock--floating > * { position: absolute; pointer-events: auto; overflow: auto; resize: both; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 44px rgb(7 29 23 / 24%); }
body.application-right-open .app-shell { grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--application-right-width, 380px); }
body.sidebar-collapsed.application-right-open .app-shell { grid-template-columns: 0 minmax(0, 1fr) var(--application-right-width, 380px); }
body.application-bottom-open #viewDiv { bottom: var(--application-bottom-height, 250px); }
body.application-bottom-open .map-nav { bottom: calc(var(--application-bottom-height, 250px) + 18px); }
body.application-bottom-open .map-status { bottom: calc(var(--application-bottom-height, 250px) + 10px); }
body:has(#app[data-application-layout="bottom-nav"]).application-bottom-open #viewDiv { bottom:44px; }
body:has(#app[data-application-layout="bottom-nav"]).application-bottom-open .map-nav { bottom:62px; }
body:has(#app[data-application-layout="bottom-nav"]).application-bottom-open .map-status { bottom:54px; }
body:has(.application-dock--bottom.is-collapsed).application-bottom-open #viewDiv { bottom:50px; }
.application-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 160px; background: var(--surface); border-bottom: 1px solid var(--line); }
.application-panel[hidden] { display: none !important; }
.application-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.application-panel > header strong { overflow: hidden; color: var(--ink); font: 700 13px/1.2 var(--ui-font); letter-spacing: .01em; text-overflow: ellipsis; white-space: nowrap; }
.application-panel__actions { display:flex; align-items:center; gap:4px; }.application-panel__settings { min-height:30px; padding:5px 8px; border:1px solid var(--line); border-radius:7px; color:var(--green-2); background:var(--surface); cursor:pointer; font:700 10px/1 var(--ui-font); }
.application-panel__floating-drag { cursor: grab; user-select: none; }
.application-panel__floating-drag:active { cursor: grabbing; }
.application-panel__collapse { flex:0 0 30px; width:30px; height:30px; padding:0; border:1px solid var(--line); border-radius:7px; color:var(--ink); background:var(--surface); cursor:pointer; }
.application-panel__body { min-height: 0; overflow: auto; }
.application-panel[data-collapsed] { min-height: 0; grid-template-rows: auto; }
.application-panel[data-collapsed] .application-panel__body { display: none; }
.utility-content[data-utility-pane="workspace"]:has(.application-panel--workspace-chart) { padding: 0; overflow: hidden; }
.utility-content[data-utility-pane="workspace"]:has(.application-panel--workspace-chart) > .form-note { display: none; }
.utility-content[data-utility-pane="workspace"] > .application-panel--workspace-chart { min-height: 100%; height: 100%; border-bottom: 0; }
.application-panel__body > .panel { border-bottom: 0; }
.application-panel__body > .panel > summary { display: none; }
.application-panel__repair, .panel-empty { margin: 14px; padding: 16px; border: 1px dashed var(--line); border-radius: 9px; background: var(--surface-2); }
.application-panel__repair p, .panel-empty p { margin: 6px 0 0; color: var(--muted); }
.composable-details { padding: 14px; }
.composable-details dl { margin: 10px 0; }
.composable-details dl div { display: grid; grid-template-columns: minmax(100px, .8fr) 1.2fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.composable-details dt { color: var(--muted); }
.composable-details dd { margin: 0; overflow-wrap: anywhere; }
.composable-chart { padding: 14px; }
.composable-chart__bars { display: flex; align-items: end; gap: 5px; height: 110px; padding: 8px; border-bottom: 1px solid var(--line); }
.composable-chart__bars button { display: flex; flex: 1; align-items: end; height: 100%; min-width: 14px; padding: 0; background: transparent; border: 0; }
.composable-chart__bars i { display: block; width: 100%; min-height: 4px; background: var(--teal); border-radius: 4px 4px 0 0; }
.composable-chapters { display: grid; gap: 8px; margin: 0; padding: 14px 14px 14px 42px; }
.composable-chapters li { padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.composable-chapters small { display: block; margin-top: 3px; color: var(--muted); }
.application-edit-return { position: fixed; z-index: 80; top: 14px; left: 50%; transform: translateX(-50%); box-shadow: 0 8px 24px rgb(0 0 0 / 25%); }

:root[data-skin="violet-circuit"] .application-panel, :root[data-skin="violet-circuit"] .sidebar { background-image:linear-gradient(90deg, transparent 97%, rgb(143 99 255 / 12%) 100%); background-size:28px 28px; }
:root[data-skin="portolan"] h1, :root[data-skin="portolan"] h2, :root[data-skin="portolan"] h3 { letter-spacing:.015em; }
:root[data-skin="tidal-95"] button { border-radius:3px; }

#app[data-application-layout="ai-map"] .sidebar { display:none; }
#app[data-application-layout="ai-map"] { grid-template-columns:minmax(0,1fr) var(--application-right-width,380px); }
#app[data-application-layout="ai-map"] .application-dock--right { grid-column:2; }
#app[data-application-layout="globe"] { padding-top:60px; }
#app[data-application-layout="globe"] .map-workspace { width:min(calc(100% - 36px), calc(100vh - 96px)); height:auto; aspect-ratio:1; align-self:center; justify-self:center; overflow:hidden; border:1px solid var(--line); border-radius:50%; box-shadow:var(--shadow); }
#app[data-application-layout="globe"] .sidebar {
  margin-block:4vh; padding-right:28px;
  clip-path:polygon(0 0,100% 0,97% 15%,94% 34%,93% 50%,94% 66%,97% 85%,100% 100%,0 100%);
}
#app[data-application-layout="globe"] .application-dock--right {
  margin-block:4vh; padding-left:28px;
  clip-path:polygon(0 0,100% 0,100% 100%,0 100%,3% 85%,6% 66%,7% 50%,6% 34%,3% 15%);
}
@media (max-width:880px) {
  #app[data-application-layout="globe"] { padding-top:0; }
  #app[data-application-layout="globe"] .map-workspace { width:100%; height:100%; aspect-ratio:auto; border-radius:0; }
  #app[data-application-layout="globe"] .sidebar, #app[data-application-layout="globe"] .application-dock--right { margin-block:0; padding-inline:0; clip-path:none; }
}

.globe-top-nav { display:none; }
@media (min-width:881px) {
  #app[data-application-layout="globe"] .globe-top-nav { position:fixed; z-index:60; top:0; left:0; display:flex; align-items:center; gap:8px; width:100%; min-height:60px; padding:6px 16px; transform:none; border:0; border-bottom:1px solid var(--line); border-radius:0; color:var(--ink); background:color-mix(in srgb,var(--surface) 96%,transparent); box-shadow:0 5px 18px rgb(17 39 33 / 10%); backdrop-filter:blur(18px); }
  #app[data-application-layout="globe"] .globe-top-nav__title { display:grid; flex:1 1 auto; min-width:112px; line-height:1.05; }
  #app[data-application-layout="globe"] .globe-top-nav__title strong { font:600 13px/1.1 var(--ui-heading); }
  #app[data-application-layout="globe"] .globe-top-nav__title small { margin-top:3px; color:var(--muted); font-size:8px; font-weight:700; text-transform:uppercase; letter-spacing:.12em; }
  #app[data-application-layout="globe"] .globe-top-nav__controls { display:flex; align-items:center; gap:3px; }
  #app[data-application-layout="globe"] .globe-top-nav button { display:inline-grid; place-items:center; min-width:34px; height:34px; padding:0 8px; border:1px solid transparent; border-radius:999px; color:var(--ink); background:transparent; box-shadow:none; cursor:pointer; font-size:16px; }
  #app[data-application-layout="globe"] .globe-top-nav button:hover { border-color:var(--line); color:var(--green-2); background:var(--surface-2); }
  #app[data-application-layout="globe"] .globe-top-nav .globe-top-nav__settings { display:flex; gap:6px; padding-inline:12px; border-color:var(--line); color:var(--ink); background:var(--surface-2); font-size:10px; font-weight:700; }
  #app[data-application-layout="globe"] .map-nav { display:none!important; }
  #app[data-application-layout="globe"] .insights-overlay { display:none!important; }
}
.orbital-insight-details { margin-top:14px; border-top:1px solid var(--line); }
.orbital-insight-details > summary { padding:12px 0; color:var(--ink); cursor:pointer; font-weight:700; }
.orbital-insight-details__content { min-width:0; padding-bottom:14px; }
.orbital-insight-details .insight-tabs { overflow-x:auto; }
.orbital-insight-details .insight-panel { max-height:min(48vh,520px); overflow:auto; }
.app-dialog:has(.application-builder) { width:min(980px,calc(100% - 32px)); }
.application-builder { container-type:inline-size; display: grid; gap: 20px; min-width:0; width:100%; color:var(--ink); }
.application-builder :is(input,select,button) { color:var(--ink); }
.application-builder :is(input,select) { min-width:0; border-color:var(--line); background:var(--surface); }
.application-builder__views { display:grid; gap:10px; }
.application-builder__views h3,.application-builder__views p { margin:0; }
.application-builder__views p { margin-top:3px; color:var(--muted); font-size:12px; }
.application-builder__view-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.application-builder__view { display:grid; grid-template-columns:78px minmax(0,1fr); grid-template-rows:auto 1fr; gap:3px 11px; min-height:92px; padding:11px; text-align:left; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:var(--surface); cursor:pointer; }
.application-builder__view:hover,.application-builder__view.is-selected { border-color:var(--green-2); box-shadow:inset 0 0 0 1px var(--green-2); }
.application-builder__view > strong { align-self:end; }
.application-builder__view > small { color:var(--muted); line-height:1.3; }
.application-builder__view-preview { grid-row:1 / 3; display:grid; grid-template:repeat(2,1fr)/repeat(3,1fr); gap:3px; height:58px; padding:4px; border-radius:6px; background:var(--surface-2); }
.application-builder__view-preview i { display:block; border-radius:3px; background:color-mix(in srgb,var(--green-2) 75%,var(--surface)); }
.application-builder__view-preview--left i:first-child { grid-row:1/3; }
.application-builder__view-preview--left i:nth-child(n+2) { grid-column:2/4; }
.application-builder__view-preview--three i:first-child,.application-builder__view-preview--briefing i:first-child { grid-row:1/3; }
.application-builder__view-preview--three i:nth-child(2),.application-builder__view-preview--briefing i:nth-child(2) { grid-column:3;grid-row:1/3; }
.application-builder__view-preview--three i:nth-child(3),.application-builder__view-preview--briefing i:nth-child(3) { grid-column:2;grid-row:2; background:var(--amber); }
.application-builder__view-preview--atlas i:first-child { grid-column:1/4; }
.application-builder__view-preview--atlas i:nth-child(2) { grid-column:1; }
.application-builder__view-preview--atlas i:nth-child(3) { grid-column:2/4; }
.application-builder__view-preview--operations i:first-child { grid-row:1/3; }
.application-builder__view-preview--operations i:nth-child(2) { grid-column:2/4; }
.application-builder__view-preview--operations i:nth-child(3) { grid-column:2/4; background:var(--amber); }
.application-builder__view-preview--right i:first-child { grid-column:1/3;grid-row:1/3; }
.application-builder__view-preview--right i:nth-child(2) { grid-column:3;grid-row:1/3; background:var(--amber); }
.application-builder__view-preview--globe { position:relative; display:block; overflow:hidden; }
.application-builder__view-preview--globe::before { content:""; position:absolute; width:46px; height:46px; inset:6px auto auto 16px; border:3px solid color-mix(in srgb,var(--green-2) 75%,var(--surface)); border-radius:50%; background:radial-gradient(circle at 35% 32%,color-mix(in srgb,var(--amber) 65%,var(--surface)) 0 12%,transparent 13%),color-mix(in srgb,var(--green-2) 18%,var(--surface)); box-shadow:0 0 0 2px color-mix(in srgb,var(--green-2) 16%,transparent); }
.application-builder__view-preview--globe::after { content:""; position:absolute; inset:12px 8px; border-left:5px solid color-mix(in srgb,var(--green-2) 65%,var(--surface)); border-right:5px solid color-mix(in srgb,var(--green-2) 65%,var(--surface)); border-radius:45%; }
.application-builder__view-preview--globe i { display:none; }
.application-builder__view-preview i:nth-child(n+4) { display:none; }
.application-builder__top { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.application-builder__top .field { margin:0; }
.application-builder__section { display: grid; gap: 9px; }
.application-builder__section h3 { margin: 0; font-size: 14px; }
.application-builder__gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.application-builder__gallery button { display: grid; gap: 7px; min-height: 86px; padding: 12px; text-align: left; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: border-color 140ms ease, transform 140ms ease, background 140ms ease; }
.application-builder__gallery button:not(:disabled):hover { border-color: var(--green-2); background: color-mix(in srgb, var(--green-2) 8%, var(--surface)); transform: translateY(-1px); }
.application-builder__gallery button:disabled { opacity: .58; cursor: not-allowed; background: var(--surface-2); }
.application-builder__gallery button > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.application-builder__gallery button em { padding: 3px 6px; border-radius: 999px; color: var(--green-2); background: color-mix(in srgb, var(--green-2) 12%, transparent); font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.application-builder__gallery button:disabled em { color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent); }
.application-builder__gallery small { color: var(--muted); }
.application-builder__hint { margin: -2px 0 2px; color: var(--muted); font-size: 12px; }
.application-builder__roadmap { padding:10px 12px; border:1px solid var(--line); border-radius:8px; color: var(--muted); background:var(--surface-2); font-size: 12px; }
.application-builder__roadmap summary { width: fit-content; cursor: pointer; color:var(--ink); font-weight: 700; }
.application-builder__roadmap .application-builder__gallery { margin-top:10px; }
.application-builder__instances { display: grid; gap: 8px; }
.application-builder__instance { display: grid; grid-template-columns:34px minmax(145px,1.1fr) minmax(115px,.75fr) minmax(145px,1fr) auto auto auto; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); transition:border-color 120ms ease,opacity 120ms ease; }
.application-builder__instance.is-dragging { opacity:.5; }
.application-builder__instance.is-drag-target { border-color:var(--green-2); box-shadow:inset 0 0 0 1px var(--green-2); }
.application-builder__instance > label:not(.application-builder__audience) { display:grid; gap:4px; min-width:0; }
.application-builder__instance > label > span { color:var(--muted); font-size:10px; font-weight:700; }
.application-builder__drag { align-self:center; width:32px; height:38px; padding:0; border:0; color:var(--muted); background:transparent; cursor:grab; font-size:19px; }
.application-builder__drag:active { cursor:grabbing; }
.application-builder__instance input, .application-builder__instance select { width: 100%; }
.application-builder__instance label { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.application-builder__audience { align-self:center; }
.application-builder__order { display: inline-flex; gap: 3px; }
.application-builder__order button { width: 34px; padding: 7px 0; }
.application-builder .button--quiet { padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); cursor: pointer; }
.application-builder .button--quiet:not(:disabled):hover { border-color: var(--green-2); }
.application-builder button:disabled { opacity: .42; cursor: not-allowed; }
.application-builder__notice { padding: 10px 12px; border-left: 3px solid var(--amber); background: var(--surface-2); color: var(--muted); }
.application-builder__secondary-actions { display:flex; flex-wrap:wrap; gap:8px; }
@container (max-width:760px) {
  .application-builder__view-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .application-builder__instance { grid-template-columns:32px minmax(0,1fr) minmax(110px,.7fr); align-items:end; }
  .application-builder__instance > label:nth-of-type(3),.application-builder__audience { grid-column:2 / 4; }
  .application-builder__order { grid-column:2; }
}
@container (max-width:500px) {
  .application-builder__view-grid,.application-builder__top,.application-builder__gallery { grid-template-columns:1fr; }
  .application-builder__view { grid-template-columns:70px minmax(0,1fr); }
  .application-builder__instance { grid-template-columns:32px minmax(0,1fr); align-items:end; }
  .application-builder__instance > *:not(.application-builder__drag) { grid-column:2; }
  .application-builder__instance-title { grid-row:1; }
  .application-builder__drag { grid-row:1; }
  .application-builder__remove { justify-self:start; }
}

.sql-panel, .ai-query-panel, .catalog-panel { display: grid; gap: 12px; padding: 14px; }
.sql-panel textarea, .ai-query-panel textarea { width: 100%; resize: vertical; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.sql-panel__heading { display: grid; gap: 2px; }
.sql-panel__actions, .sql-status > div { display: flex; flex-wrap: wrap; gap: 7px; }
.sql-status { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface-2); }
.sql-status code { display: block; overflow-x: auto; padding: 8px; color: var(--ink); background: var(--surface); }
.sql-result { max-height: 260px; overflow: auto; border: 1px solid var(--line); background: var(--surface); }
.sql-result table { width: 100%; border-collapse: collapse; font-size: 11px; }
.sql-result th, .sql-result td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.sql-result th { position: sticky; top: 0; background: var(--green); color: white; }
.catalog-panel > div:first-child p, .catalog-panel .form-note { margin: 4px 0 0; color: var(--muted); }
.catalog-panel article { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.catalog-panel article code, .catalog-panel article span { color: var(--muted); font-size: 11px; }
.catalog-panel article small { grid-column: 1 / -1; }

@media (max-width: 880px) {
  body.application-right-open .app-shell, body.sidebar-collapsed.application-right-open .app-shell { grid-template-columns: minmax(0, 1fr); }
  .application-dock--right { position: fixed; z-index: 58; inset: 52px 0 0 auto; width: min(88vw, 440px); box-shadow: -14px 0 34px rgb(17 39 33 / 22%); }
}
@media (max-width: 640px), (max-width: 880px) and (orientation: portrait) {
  html, body { width:100%; max-width:100%; overflow:hidden; -webkit-text-size-adjust:100%; }
  .application-builder__top, .application-builder__gallery { grid-template-columns: 1fr; }
  .application-builder__instance { grid-template-columns: 1fr 1fr; }
  .application-dock--bottom { bottom: 65px; grid-auto-flow: row; grid-auto-columns: auto; height: min(40vh, 320px); }
  body.application-bottom-open #viewDiv { bottom: calc(min(40vh, 320px) + 65px); }
}
.utility-panel { display: none; position: relative; z-index: 22; min-width: 0; min-height: 0; background: var(--paper); border-left: 1px solid var(--line); box-shadow: -8px 0 26px rgb(17 39 33 / 8%); }
.utility-panel > header { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 10px 12px 8px 16px; border-bottom: 1px solid var(--line); }
.utility-panel__header-actions, .dialog__header-actions { display: flex; align-items: center; gap: 3px; }
.utility-panel h2 { margin: 0; color:var(--ink); font: 600 20px/1.1 "Newsreader", Georgia, serif; }
.utility-tabs { display: flex; gap: 5px; padding: 8px 10px; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--surface); }
.utility-tab { display: inline-flex; flex: 0 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.utility-tab button { border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }
.utility-tab [data-utility-tab] { padding: 7px 5px 7px 10px; }
.utility-tab [data-utility-tab][aria-selected="true"] { color: white; background: var(--green); }
.utility-tab:has([data-utility-tab][aria-selected="true"]) { border-color: var(--green); background: var(--green); }
.utility-tab .utility-tab__close { width: 25px; padding: 0 7px 1px 4px; font-size: 15px; line-height: 1; }
.utility-tab:has([aria-selected="true"]) .utility-tab__close { color: rgb(255 255 255 / 75%); }
.utility-tab .utility-tab__close:hover { color: white; background: rgb(255 255 255 / 12%); }
.utility-tabs[hidden] { display: none; }
.utility-panes { min-height: 0; overflow: hidden; }
.utility-panes > [data-utility-pane]:not([hidden]) { height: 100%; }
.utility-content { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.utility-content > * { display: block; width: 100%; min-width: 0; }
.utility-content > arcgis-basemap-gallery { height: 100%; overflow: auto; }
/* Desktop: the Tasks screen sits in the right panel as a tab; the panel header
   replaces its own, and its body scrolls inside the tab. */
.utility-tasks-content { overflow: hidden; }
.utility-tasks-content > .mobile-workflow:not([hidden]) { position: static; inset: auto; z-index: auto; display: grid; grid-template-rows: minmax(0,1fr); width: 100%; height: 100%; border: 0; box-shadow: none; }
.utility-tasks-content > .mobile-workflow .mobile-workflow__header { display: none; }
.utility-content > arcgis-legend, .utility-content .esri-elevation-profile { width: 100%; height: 100%; max-height: none; }
.workspace-tool-pane { padding: 16px; }
.workspace-tool { display: grid; gap: 12px; }
.workspace-tool h3 { margin: 0; font: 600 22px/1.2 "Newsreader", Georgia, serif; }
.workspace-tool__actions { display: flex; justify-content: flex-end; }
.workspace-tool__actions button { border: 1px solid var(--green); border-radius: 6px; padding: 9px 12px; color: white; background: var(--green); cursor: pointer; }
.layer-source { display: grid; align-content: start; gap: 14px; }
.layer-source h3 { margin: 0; font: 600 24px/1.15 "Newsreader", Georgia, serif; }
.layer-source__description { margin: -5px 0 0; color: var(--muted); line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.layer-source__details { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.layer-source__details > div { display: grid; grid-template-columns: minmax(105px, 36%) minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.layer-source__details dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.layer-source__details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 13px; }
.layer-source__endpoint { display: grid; gap: 6px; padding: 11px; border: 1px solid var(--line); border-radius: var(--ui-radius-small); background: var(--surface); }
.layer-source__endpoint > span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.layer-source__endpoint code { overflow-wrap: anywhere; color: var(--ink); font-size: 12px; line-height: 1.4; }
.layer-source__open { justify-self: start; padding: 9px 12px; border: 1px solid var(--green); border-radius: 6px; color: var(--on-accent, #fff); background: var(--green); font-size: 13px; font-weight: 700; text-decoration: none; }
.layer-source__open:hover { color: var(--on-accent, #fff); background: var(--green-2); border-color: var(--green-2); }
.utility-resizer { position: absolute; z-index: 3; inset: 0 auto 0 -5px; width: 10px; cursor: col-resize; touch-action: none; }
.utility-resizer::after { content: ""; position: absolute; inset: 0 4px; background: var(--line); }
.mobile-sheet-resize { display:none; }
body.utility-panel-open .utility-panel { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
/* The panes always take the stretching last row, also when the tab row is hidden. */
body.utility-panel-open .utility-panel > .utility-panes { grid-row: -2 / -1; }
body.utility-resizing { cursor: col-resize; user-select: none; }
body.utility-resizing iframe, body.utility-resizing canvas { pointer-events: none; }
.mobile-map-brand, .mobile-menu-drawer, .mobile-panel-nav, .mobile-map-tool-strip { display: none; }
.mobile-drawer-handle { display:none; }
.mobile-workflow { display:none; }
.empty-state--layers p { margin:0 0 10px; }
.empty-state__actions { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.empty-state__actions button { min-height:38px; padding:7px 8px; border:1px solid var(--line); border-radius:var(--ui-radius-small); color:var(--ink); background:var(--surface); font-size:12px; font-weight:600; }
.empty-state__actions button:hover { border-color:var(--green-2); color:var(--green-2); }
/* Workflow screens (Field tasks, Workflows) share the active skin. On a
   phone they fill the space between the brand bar and the bottom navigation;
   on a desktop they open as a right-hand panel beside the map. */
.mobile-workflow:not([hidden]) { position:fixed; z-index:60; inset:0 0 0 auto; display:grid; grid-template-rows:auto minmax(0,1fr); width:min(440px,100vw); overflow:hidden; border-left:1px solid var(--line); color:var(--ink); background:var(--paper); box-shadow:var(--shadow); }
.mobile-workflow__header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 16px 12px; border-bottom:1px solid var(--line); background:var(--surface); }
.mobile-workflow__brand { display:block; margin-bottom:5px; color:var(--green-2); font:800 11px/1 var(--ui-font); letter-spacing:.08em; text-transform:uppercase; }
.mobile-workflow__header h1 { margin:0; color:var(--ink); font:700 clamp(24px,7vw,32px)/1 var(--ui-heading); }
.mobile-workflow__header button { width:44px; height:44px; padding:0; border:1px solid var(--line); border-radius:50%; color:var(--ink); background:var(--surface-2); font-size:24px; }
.mobile-workflow__body { min-height:0; padding:16px; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.mobile-workflow__subtitle { margin:0 0 14px; color:var(--muted); font-size:15px; line-height:1.4; }
.segmented { display:grid; grid-template-columns:repeat(3,1fr); margin-bottom:18px; border:1px solid var(--line); border-radius:999px; overflow:hidden; }
.segmented button { min-height:42px; padding:6px; border:0; border-right:1px solid var(--line); color:var(--muted); background:transparent; font-size:12px; font-weight:700; }
.segmented button:last-child { border-right:0; }
.segmented button.is-active { color:var(--on-accent,#fff); background:var(--green); }
.feed-list { display:grid; gap:14px; }
.feed-card,.mobile-card,.mobile-empty { padding:16px; border:var(--ui-border-width,1px) solid var(--line); border-radius:var(--ui-radius); color:var(--ink); background:var(--surface); box-shadow:var(--ui-panel-shadow); }
.feed-card.is-muted { opacity:.68; }
.feed-card__meta { display:block; margin-bottom:8px; color:var(--muted); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.feed-card h2,.mobile-empty h2 { margin:0 0 6px; color:var(--ink); font:700 19px/1.15 var(--ui-heading); }
.feed-card p,.mobile-empty p { margin:6px 0; color:var(--muted); line-height:1.42; }
.feed-card .metric { color:var(--ink); font:800 38px/1 var(--ui-heading); }
.feed-card .metric small { font-size:17px; }
.feed-card__actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:14px; }
.feed-card__actions button,.mobile-card button,.mobile-empty button,.mobile-primary { min-height:44px; padding:10px 16px; border:1px solid var(--green); border-radius:var(--ui-radius-small); color:var(--green); background:var(--surface); font-weight:700; }
.feed-card__actions button:first-child,.mobile-card button[type="submit"],.mobile-primary { color:var(--on-accent,#fff); background:var(--green); }
.mobile-primary { width:100%; margin-bottom:14px; }
.status-pill { display:inline-block; margin-bottom:10px; padding:5px 10px; border-radius:999px; color:var(--ink); background:color-mix(in srgb,var(--amber) 22%,var(--surface)); font-size:12px; font-weight:800; text-transform:capitalize; }
.mobile-card { display:grid; gap:14px; margin-bottom:16px; }
.mobile-card label { display:grid; gap:6px; color:var(--ink); font-weight:700; }
.mobile-card :is(input,select,textarea) { width:100%; min-height:46px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--ui-radius-small); color:var(--ink); background:var(--surface-2); font:inherit; }
.mobile-card textarea { resize:vertical; }
.mobile-card fieldset { padding:12px; border:1px solid var(--line); border-radius:var(--ui-radius-small); }
.mobile-card .check-row { display:flex; align-items:center; min-height:44px; border-bottom:1px solid var(--line); }
.mobile-card .check-row:last-child { border-bottom:0; }
.mobile-card .check-row input { width:22px; min-height:22px; margin-right:10px; }
.mobile-card legend small { color:var(--muted); font-weight:600; }
.task-step-list, .task-feature-list, .task-report-steps { display:grid; gap:8px; margin:0 0 10px; padding:0; list-style:none; }
.task-step-list li { display:grid; grid-template-columns:22px minmax(0,1fr) 40px; align-items:center; gap:8px; }
.mobile-card .task-step-list input[type="checkbox"] { width:22px; min-height:22px; }
.mobile-card .task-step-list button, .mobile-card .task-feature-actions button { min-height:36px; padding:6px 10px; }
.task-feature-list li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 10px; align-items:center; padding:8px 0; border-bottom:1px solid var(--line); }
.task-feature-list li:last-child { border-bottom:0; }
.task-feature-list li > span:first-child, .task-feature-list .check-row { min-width:0; overflow:hidden; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.task-feature-list .check-row { min-height:32px; border:0; }
.task-feature-list .check-row input { flex:none; }
.task-feature-list .check-row span { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.task-feature-list small { grid-column:1; color:var(--muted); font-size:12px; }
.task-feature-actions { display:flex; grid-column:2; grid-row:1 / span 2; gap:6px; }
.task-feature-empty { margin:0 0 10px; color:var(--muted); }
.task-coordinates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.task-location-actions { display:flex; flex-wrap:wrap; gap:8px; }
.mobile-card .task-location-actions button, .mobile-card .task-location-row button { min-height:38px; padding:8px 12px; }
.task-location-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--ui-radius-small); background:var(--surface-2); }
.task-location-row span { display:grid; gap:2px; min-width:0; }
.task-location-row b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.task-location-row small { color:var(--muted); font-size:12px; }
.task-checkin { display:grid; gap:10px; }
.task-checkin-row b { white-space:normal; }
.task-checkin-row { border-color:color-mix(in srgb, #0f8f6e 55%, var(--line)); background:color-mix(in srgb, #0f8f6e 8%, var(--surface-2)); }
.task-checkin-row b::before { content:""; display:inline-block; width:10px; height:10px; margin-right:7px; border:2px solid #fff; border-radius:50%; background:#0f8f6e; box-shadow:0 0 0 1px #0f8f6e; vertical-align:-1px; }
.mobile-card .form-note { margin:0; color:var(--muted); font-size:12px; font-weight:400; }
.mobile-card :is(h2,h3) { margin:0; font-family:var(--ui-heading); }
.task-instructions { margin:0; white-space:pre-wrap; }
.task-report-steps li { display:flex; gap:8px; color:var(--muted); }
.task-report-steps li.is-done { color:var(--ink); }
.task-report-downloads { display:flex; flex-wrap:wrap; gap:8px; }
.mobile-card .task-report-downloads button { flex:1 1 140px; min-height:40px; padding:8px 12px; }
.task-report-steps li span { color:var(--green); font-weight:800; }
.task-feature-done { color:var(--green); }
.field-task-banner { position:fixed; z-index:80; top:calc(14px + env(safe-area-inset-top)); left:50%; display:flex; align-items:center; gap:12px; max-width:calc(100vw - 24px); padding:8px 8px 8px 16px; border:1px solid var(--green); border-radius:999px; color:var(--ink); background:var(--surface); box-shadow:var(--shadow); transform:translateX(-50%); font-weight:700; }
body.field-task-on-map .welcome-panel { display:none!important; }
body.mobile-workflow-open .field-task-banner { left:auto; right:calc(min(440px,100vw) + 16px); transform:none; }
.field-task-banner span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.field-task-banner button { flex:none; min-height:36px; padding:6px 14px; border:0; border-radius:999px; color:var(--on-accent,#fff); background:var(--green); font-weight:700; cursor:pointer; }
@media (max-width: 640px), (max-width: 880px) and (orientation: portrait) { .field-task-banner { top:calc(44px + env(safe-area-inset-top)); } }
.workflow-grid { display:grid; gap:11px; }
.workflow-grid :is(button,a) { display:grid; gap:4px; min-height:72px; padding:13px 15px; border:var(--ui-border-width,1px) solid var(--line); border-radius:var(--ui-radius); color:var(--ink); background:var(--surface); text-align:left; text-decoration:none; }
.workflow-grid strong { font:700 18px/1.15 var(--ui-heading); }
.workflow-grid span { color:var(--muted); font-size:13px; }
.account-workflows { margin-top:18px; padding:16px; border:1px dashed var(--line); border-radius:var(--ui-radius); color:var(--muted); background:var(--surface-2); }
.account-workflows span { color:var(--ink); font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.account-workflows p { margin:7px 0 0; line-height:1.45; }
.account-required { display:block; margin-top:3px; color:var(--muted); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.workflow-share { display:grid; justify-items:center; gap:12px; text-align:center; }
.workflow-share canvas { width:min(280px,100%); height:auto; padding:8px; border:1px solid var(--line); border-radius:12px; background:white; }
.workflow-share .field { width:100%; text-align:left; }
.workflow-share-downloads { display:grid; gap:6px; width:100%; text-align:left; }
.workflow-share-downloads > span { font-size:12px; font-weight:700; }
.workflow-share-downloads > div { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px; }
.workflow-share-downloads button { min-height:40px; padding:8px 12px; border:1px solid var(--green); border-radius:var(--ui-radius-small,7px); color:var(--green); background:var(--surface); font-weight:700; cursor:pointer; }
.workflow-share-downloads button:disabled { opacity:.55; cursor:progress; }
.welcome-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding-right: 28px; }
.welcome-brand img { width: 44px; height: 52px; object-fit: contain; }
.welcome-brand strong { color: var(--green-2); font-size: 19px; letter-spacing: .04em; }
.welcome-brand span { display: block; color: var(--amber); font-size: 11px; letter-spacing: .25em; margin-top: 3px; }
.sidebar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  width: var(--sidebar);
  min-width: 0;
  background: var(--paper);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 26px rgb(17 39 33 / 8%);
  transition: transform 220ms ease;
}
.brand { height: 96px; display: flex; align-items: center; gap: 11px; padding: 10px 13px; background: linear-gradient(120deg, #fffdf8, #f1eee3); border-bottom: 1px solid var(--line); }
.brand__mark { width: 64px; height: 64px; flex: 0 0 auto; object-fit: contain; }
.brand__wordmark { display: grid; min-width: 0; line-height: 1; }
.brand__wordmark strong { color: var(--green); font: 800 clamp(20px, 1.7vw, 27px)/.95 system-ui, sans-serif; letter-spacing: -.045em; white-space: nowrap; }
.brand__wordmark span { margin-top: 5px; color: var(--amber); font-size: 10px; font-weight: 800; letter-spacing: .32em; }
.brand__wordmark small { margin-top: 8px; color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; font-size: 25px; line-height: 1; cursor: pointer; }
.icon-button:hover { background: var(--surface-2); }
.sidebar__close { margin-left: auto; }

.menu-bar { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.menu-bar__all-trigger { display: none; }
.menu-bar__categories { display: contents; }
/* Dropdowns hang from the whole menu bar, so none can run past the sidebar's edge. */
.menu { position: static; }
.menu__trigger { width: 100%; display: flex; justify-content: center; gap: 5px; padding: 12px 4px; border: 0; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.menu__trigger:hover, .menu.is-open .menu__trigger { color: var(--green-2); background: var(--paper); }
.menu-bar__discover { display:flex; align-items:center; justify-content:center; gap:5px; padding:12px 4px; color:var(--ink); font-size:12px; font-weight:700; text-decoration:none; }
.menu-bar__discover:hover { color:var(--green-2); background:var(--paper); }
.menu__content { display: none; position: absolute; z-index: 30; top: calc(100% + 2px); left: 8px; right: 8px; max-height: min(640px, calc(100vh - 150px)); overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.menu.is-open .menu__content { display: grid; }
.menu__content button { padding: 9px 10px; border: 0; border-radius: 5px; background: transparent; text-align: left; font-size: 12px; cursor: pointer; }
.menu__content .menu__link { display:grid; gap:3px; padding:9px 10px; border-radius:5px; color:var(--ink); text-align:left; text-decoration:none; font-size:12px; font-weight:700; }
.menu__content .menu__link small { color:var(--muted); font-size:11px; font-weight:500; line-height:1.35; }
.desktop-workflows-menu .menu__link--field { padding-block:7px; color:var(--muted); font-size:11px; font-weight:600; }.desktop-workflows-menu .menu__link--field small { font-size:10px; }.desktop-workflows-menu .menu__link--field:hover { color:var(--green-2); }
.menu__content button:hover, .menu__content button.is-active, .menu__content .menu__link:hover { background: var(--surface-2); color: var(--green-2); }
.menu__content .menu__link:hover small { color:currentColor; }
.menu__content button:disabled { color: var(--muted); opacity: .6; cursor: not-allowed; background: transparent; }
.menu__label { padding: 8px 10px 3px; color: var(--amber); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.menu__sublabel { display: block; padding: 6px 10px 2px 14px; color: var(--muted); font-size: 10px; font-weight: 700; }
.menu__content hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.menu__field { display: grid; gap: 5px; padding: 7px 8px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.menu__field[hidden] { display: none; }
.menu__toggle { display: flex; align-items: center; gap: 8px; padding: 7px 8px; color: var(--ink); font-size: 12px; cursor: pointer; }
.menu__toggle[hidden] { display: none; }
.menu__hint { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.35; letter-spacing: 0; text-transform: none; }
.menu__field select { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.presentation-picker { display: grid; gap: 14px; }
.skin-customize { display:grid; gap:10px; margin:0; padding:14px; border:1px solid var(--line); border-radius:var(--ui-radius-small); }
.skin-customize legend { font-weight:700; }
.skin-customize p { margin:0; }
.skin-customize > div { display:flex; flex-wrap:wrap; gap:18px; }
.skin-customize label { display:flex; align-items:center; gap:8px; }
.skin-customize input[type="color"] { width:42px; height:36px; padding:4px; border:1px solid var(--line); border-radius:var(--ui-radius-small); background:var(--surface); cursor:pointer; }
.skin-customize input[type="color"]::-webkit-color-swatch-wrapper { padding:0; }
.skin-customize input[type="color"]::-webkit-color-swatch { border:0; border-radius:calc(var(--ui-radius-small) / 2); }
.skin-customize input[type="color"]::-moz-color-swatch { border:0; border-radius:calc(var(--ui-radius-small) / 2); }
.skin-customize > button { justify-self:start; min-height:36px; padding:8px 14px; border:1px solid var(--line); border-radius:var(--ui-radius-small); color:var(--ink); background:var(--surface); font-size:12px; font-weight:600; cursor:pointer; }
.skin-customize > button:not(:disabled):hover { border-color:var(--green-2); }
.map-color-customize > div { display:grid; grid-template-columns:repeat(auto-fit, minmax(185px, 1fr)); gap:10px 18px; }
.map-color-customize label { min-width:0; }
.map-color-customize label span { flex:1; }
.map-color-customize input[type="color"]:disabled { cursor:not-allowed; opacity:.45; }
.maplibre-measurement { padding:16px; color:var(--ink); }
.maplibre-measurement p { margin:8px 0; font-size:13px; }
.maplibre-measurement output { display:block; margin:8px 0; font-weight:700; }
#utility-legend-content:not([hidden]):has(.maplibre-legend__layer, .maplibre-legend__note) { display:grid; align-content:start; gap:8px; padding:12px; font-family:var(--ui-font); }
#utility-legend-content > .maplibre-legend__note { padding:6px 4px; }
.maplibre-legend__layer { display:grid; gap:8px; padding:10px 12px 12px; border:1px solid var(--line); border-radius:var(--ui-radius); background:var(--surface); cursor:default; transition:border-color .15s, box-shadow .15s; }
.maplibre-legend__layer:hover { border-color:color-mix(in srgb, var(--green) 35%, var(--line)); box-shadow:0 2px 10px rgb(17 39 33 / 6%); }
.maplibre-legend__head { display:flex; align-items:center; gap:9px; min-height:24px; }
.maplibre-legend__title { flex:1; min-width:0; overflow:hidden; color:var(--ink); font-size:13px; font-weight:650; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.maplibre-legend__edit { display:grid; place-items:center; flex:none; width:26px; height:26px; padding:0; border:0; border-radius:var(--ui-radius-small); color:var(--muted); background:transparent; cursor:pointer; opacity:0; transition:opacity .15s, background .15s; }
.maplibre-legend__layer:hover .maplibre-legend__edit, .maplibre-legend__edit:focus-visible { opacity:1; }
.maplibre-legend__edit:hover { color:var(--ink); background:color-mix(in srgb, var(--ink) 7%, transparent); }
@media (hover:none) { .maplibre-legend__edit { opacity:1; } }
.maplibre-legend__entries { display:grid; gap:2px; }
.maplibre-legend__entry { display:grid; grid-template-columns:26px minmax(0,1fr); align-items:center; gap:8px; min-height:22px; color:var(--ink); font-size:12.5px; font-variant-numeric:tabular-nums; line-height:1.3; }
.maplibre-legend__entry > :first-child { justify-self:center; }
.maplibre-legend__label { overflow-wrap:anywhere; }
.maplibre-legend__entry--pick { width:100%; margin:0; padding:1px 4px 1px 0; border:0; border-radius:var(--ui-radius-small); font:inherit; font-size:12.5px; text-align:left; background:transparent; cursor:pointer; }
.maplibre-legend__entry--pick:hover, .maplibre-legend__entry--pick.is-picked { background:color-mix(in srgb, var(--ink) 7%, transparent); }
.maplibre-legend__entry--pick[aria-pressed="true"] { font-weight:650; box-shadow:inset 3px 0 0 var(--green); }
.maplibre-legend__entry--pick:focus-visible { outline:2px solid var(--green); outline-offset:1px; }
.maplibre-legend__image { flex:none; width:18px; height:18px; object-fit:contain; }
.maplibre-legend__swatch { flex:none; display:inline-block; width:18px; height:13px; border:1px solid; border-radius:3px; box-sizing:border-box; }
.maplibre-legend__swatch--point { width:12px; height:12px; border-radius:50%; box-shadow:0 0 0 2px var(--surface); }
.maplibre-legend__swatch--line { width:20px; height:3px; border:0; border-radius:2px; }
.maplibre-legend__field { margin:2px 0 0; color:var(--muted); font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.maplibre-legend__note { margin:0; color:var(--muted); font-size:12px; line-height:1.4; }
.presentation-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.presentation-card { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); text-align: left; cursor: pointer; }
.presentation-card:hover, .presentation-card.is-selected { border-color: var(--green-2); box-shadow: 0 0 0 2px color-mix(in srgb, var(--green-2) 22%, transparent); }
.presentation-card small { color: var(--muted); line-height: 1.35; }
.presentation-preview { display: grid; grid-template-columns: 24% 1fr 24%; gap: 3px; height: 55px; padding: 4px; border-radius: 4px; background: var(--surface-2); }
.presentation-preview i { display: block; border-radius: 2px; background: var(--green-2); opacity: .7; }
.presentation-preview--explorer i:first-child { background: var(--amber); }.presentation-preview--atlas { grid-template-columns: 30% 1fr; }.presentation-preview--atlas i:last-child { grid-column: span 2; }
.skin-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin:0; padding:0; border:0; }
.skin-picker legend { grid-column:1/-1; margin-bottom:5px; font-size:12px; font-weight:700; }
.skin-card { display:grid; grid-template-columns:68px 1fr; gap:2px 10px; align-items:center; padding:9px; border:2px solid transparent; color:var(--ink); background:var(--surface-2); text-align:left; cursor:pointer; }
:root .skin-picker .skin-card { border-radius:var(--ui-radius); }
.skin-card.is-selected { border-color:var(--green-2); box-shadow:0 0 0 2px color-mix(in srgb,var(--green-2) 20%,transparent); }
.skin-card > small { color:var(--muted); font-size:9px; }
.skin-mini { grid-row:span 2; display:grid; grid-template-columns:18px 1fr; grid-template-rows:1fr 12px; gap:3px; width:68px; height:46px; padding:4px; border:1px solid currentColor; border-radius:var(--preview-radius,5px); color:var(--preview-ink); background:var(--preview-paper); box-shadow:var(--preview-shadow,none); }
.skin-mini i { grid-row:span 2; background:var(--preview-accent); }.skin-mini b { background:var(--preview-surface); }.skin-mini em { background:var(--preview-accent); }.skin-mini small { position:absolute; width:16px; height:10px; margin:25px 0 0 43px; border:1px solid var(--preview-accent); background:var(--preview-surface); }
.skin-card--gismap { --preview-paper:#fffdf8;--preview-surface:#ebe8de;--preview-ink:#17221f;--preview-accent:#1b6b59;--preview-radius:7px;--preview-shadow:2px 3px 8px #cfcabb; }
.skin-card--clean-light { --preview-paper:#fff;--preview-surface:#edf2f7;--preview-ink:#172033;--preview-accent:#287fc5;--preview-radius:7px;--preview-shadow:2px 3px 8px #aac0d5; }
.skin-card--dark-analytical { --preview-paper:#121a20;--preview-surface:#26333c;--preview-ink:#edf4f7;--preview-accent:#52c4d1;--preview-radius:6px;--preview-shadow:2px 4px 9px #000; }
.skin-card--tidal-95 { --preview-paper:#fffaf0;--preview-surface:#c7e7dc;--preview-ink:#073b3a;--preview-accent:#ef6f61;--preview-radius:2px;--preview-shadow:3px 3px #438a80; }
.skin-card--portolan { --preview-paper:#f6edcf;--preview-surface:#eadbb5;--preview-ink:#33251d;--preview-accent:#8a5934;--preview-radius:0;--preview-shadow:inset 0 0 0 2px #806c48; }
.skin-card--velvet-orbit { --preview-paper:#35153f;--preview-surface:#4c2257;--preview-ink:#fff7dc;--preview-accent:#e06cef;--preview-radius:12px;--preview-shadow:3px 5px 10px #16031d; }
.skin-card--violet-circuit { --preview-paper:#0e0d18;--preview-surface:#211b36;--preview-ink:#e9e5ff;--preview-accent:#35d7d0;--preview-radius:1px;--preview-shadow:0 0 5px #9a70ff; }
.skin-card--highway { --preview-paper:#f7f8f8;--preview-surface:#fff;--preview-ink:#17202b;--preview-accent:#ff4b0b;--preview-radius:1px;--preview-shadow:0 3px 7px #cbd1d5; }
.skin-card--steeler { --preview-paper:#dad5d2;--preview-surface:#f7f3eb;--preview-ink:#303744;--preview-accent:#5b687d;--preview-radius:9px;--preview-shadow:3px 5px 9px #77717a; }
.skin-card--slice { --preview-paper:#fff4ed;--preview-surface:#d8a8a1;--preview-ink:#3b2528;--preview-accent:#a6405a;--preview-radius:2px;--preview-shadow:3px 3px #704036; }
.skin-card--wavelength { --preview-paper:#29282a;--preview-surface:#393235;--preview-ink:#fff4e8;--preview-accent:#f58153;--preview-radius:7px;--preview-shadow:0 3px 8px #1c1717; }
.skin-card--trade-desk { --preview-paper:#fffdf8;--preview-surface:#ebe5d8;--preview-ink:#23211d;--preview-accent:#d0702d;--preview-radius:2px;--preview-shadow:0 2px 0 #7a4a2c; }
.skin-card--connect { --preview-paper:#fffbea;--preview-surface:#ffe45c;--preview-ink:#063c40;--preview-accent:#00757b;--preview-radius:9px;--preview-shadow:3px 3px #f4cf22; }
:root[data-skin="dark-analytical"] .sidebar { border-right-color: #174f42; }
:root[data-skin="retro-print"] .sidebar { border-right-color: #b55d46; }
#app[data-presentation="briefing"] .sidebar { border-right: 4px solid var(--amber); }
#app[data-presentation="explorer"] .layers-panel { order: -1; }
#app[data-presentation="atlas"] .brand { background: linear-gradient(120deg, var(--surface), var(--surface-2)); }
@media (max-width: 640px) { .presentation-cards { grid-template-columns: 1fr; } }

.sidebar__scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.sidebar__scroll::-webkit-scrollbar { width: 9px; }
.sidebar__scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar__scroll::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: var(--scrollbar-thumb); background-clip: padding-box; }
.sidebar__scroll::-webkit-scrollbar-thumb:hover { background-color: var(--scrollbar-thumb-hover); }
.sidebar__scroll > .panel.is-sidebar-optional-hidden { display: none !important; }
.panel { border-bottom: 1px solid var(--line); }
.panel[hidden] { display: none !important; }
.panel summary { list-style: none; position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 18px; cursor: pointer; user-select: none; }
.panel summary::-webkit-details-marker { display: none; }
.panel summary::after { content: "+"; position: absolute; right: 18px; top: 14px; color: var(--muted); font-size: 18px; }
.panel[open] summary::after { content: "−"; }
.panel summary span { font: 600 19px/1 "Newsreader", Georgia, serif; }
.panel summary small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
/* The hint sits beside the title; the dock button sits just before the +/− fold mark. */
.panel summary { justify-content: flex-start; gap: 10px; padding-right: 46px; }
.panel-dock { display: inline-grid; place-items: center; width: 30px; height: 30px; margin: -6px 0 -6px auto; padding: 0; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; align-self: center; transition: color .15s, background .15s, border-color .15s, transform .15s; }
.panel-dock:hover, .panel-dock:focus-visible { color: var(--green); border-color: var(--line); background: var(--surface); transform: translateX(2px); }
.panel-close { border:0; background:transparent; color:var(--muted); font-size:19px; cursor:pointer; padding:3px 5px; line-height:1; }
.panel-close:hover, .panel-close:focus-visible { color:var(--ink); background:var(--surface-2); }
.panel-close svg { display:block; width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; }
.panel summary { padding-right:38px; }
.style-class-row { display:flex; align-items:center; gap:10px; padding:4px 0; font-size:13px; }
.workspace-tool .style-class-row input[type="color"] { width:38px; height:30px; min-height:30px; flex:none; }
[data-class-editor][hidden] { display:none !important; }
/* Dock icons: a two-tone north-arrow needle aimed where the panel will go. */
.dock-icon { display: block; overflow: visible; }
.dock-icon__frame { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.dock-icon__pane { fill: currentColor; opacity: .2; }
.dock-icon__lit { fill: var(--amber, #d9951e); }
.dock-icon__shade { fill: currentColor; }
.dock-icon__pivot { fill: var(--surface, #fff); }
:is(.panel-dock, #utility-open-modal, #dialog-dock, .presentation-dock-button):hover .dock-icon__pane { opacity: .34; }
:is(#utility-open-modal, #dialog-dock, .presentation-dock-button) .dock-icon { width: 20px; height: 20px; margin: auto; }
.panel__body { padding: 0 16px 18px; }
.search-row { display: grid; grid-template-columns: 1fr 38px; gap: 6px; }
.place-search-combobox { position: relative; z-index: 4; }
.search-suggestions { position: absolute; top: calc(100% + 4px); right: 0; left: 0; max-height: 260px; margin: 0; padding: 5px; overflow-y: auto; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }
.search-suggestions[hidden] { display: none; }
.search-suggestions > button { width: 100%; }
.search-suggestions > button[aria-selected="true"] { background: var(--surface-2); color: var(--green-2); }
.recent-places { margin-top: 10px; }
.recent-places[hidden] { display: none; }
.recent-places__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.recent-places__header h3 { margin: 0; color: var(--muted); font: 700 10px/1.2 var(--ui-font); letter-spacing: .08em; text-transform: uppercase; }
.recent-places .compact-list { margin-top: 4px; }
.recent-places .compact-list > button { display: flex; align-items: center; gap: 8px; min-width: 0; }
.recent-places .compact-list > button > span:first-child { flex: none; color: var(--muted); }
.recent-places__label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.search-row input, .field input, .field select, .ai-question input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 10px 11px; background: var(--surface); color: var(--ink); }
.search-row button, .ai-question button, .map-nav button, .map-button { border: 0; border-radius: 6px; color: white; background: var(--green); cursor: pointer; }
.compact-list { display: grid; gap: 3px; margin-top: 8px; font-size: 12px; }
.compact-list > button, .bookmark-row button:first-child { border: 0; border-radius: 5px; padding: 8px; text-align: left; background: transparent; cursor: pointer; }
.compact-list > button:hover, .bookmark-row button:first-child:hover { background: var(--surface-2); }
.compact-list.muted { color: var(--muted); padding: 3px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.text-button { border: 0; background: transparent; color: var(--green-2); font-size: 11px; cursor: pointer; }
.bookmark-row { display: grid; grid-template-columns: 1fr 28px; align-items: center; }
.bookmark-row button:last-child { border: 0; background: transparent; cursor: pointer; color: var(--muted); }

.draw-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.draw-tools .form-note { grid-column: 1 / -1; }
.map-templates { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(260px, 1.4fr); gap: 16px; align-items: start; }
.map-templates__list { display: grid; gap: 6px; }
.map-template { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.map-template input { grid-row: span 3; margin-top: 3px; }
.map-template small { color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.map-template:has(input:checked) { border-color: var(--green-2); box-shadow: inset 0 0 0 1px var(--green-2); }
.map-template__size { font-variant-numeric: tabular-nums; }
.map-templates__side { display: grid; gap: 10px; }
.map-templates__fields { display: grid; gap: 10px; align-content: start; }
.map-templates [hidden] { display: none !important; }
.map-templates__expand { justify-self: end; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); font: inherit; font-size: 0.85rem; cursor: pointer; }
.map-templates__expand:hover { border-color: var(--green-2); color: var(--green-2); }
.app-dialog.app-dialog--fullwindow[open] { position: fixed; inset: var(--fullwindow-top, 0) 0 0 var(--fullwindow-left, 0); width: auto; max-width: none; height: auto; max-height: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.app-dialog.app-dialog--fullwindow::backdrop { background: transparent !important; backdrop-filter: none !important; }
.app-dialog--fullwindow .dialog__shell { height: 100%; max-height: none; grid-template-rows: auto minmax(0, 1fr) auto; }
.app-dialog--fullwindow .dialog__content { min-height: 0; overflow: hidden; }
.app-dialog--fullwindow .map-templates { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); height: 100%; }
.app-dialog--fullwindow .map-templates__list { overflow-y: auto; max-height: 100%; padding-right: 4px; }
.app-dialog--fullwindow .map-templates__side { grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; }
.app-dialog--fullwindow .map-templates__expand { grid-column: 1 / -1; }
.app-dialog--fullwindow .map-templates__preview { grid-column: 1; grid-row: 2; align-content: center; min-height: 0; height: 100%; }
.app-dialog--fullwindow .map-templates__preview canvas { max-height: calc(100dvh - var(--fullwindow-top, 0px) - 230px); }
.app-dialog--fullwindow .map-templates__fields { grid-column: 2; grid-row: 2; min-height: 0; overflow-y: auto; padding-right: 4px; }
.map-templates__preview { display: grid; gap: 4px; justify-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #d9dedc; }
.map-templates__preview canvas { max-width: 100%; max-height: 340px; height: auto; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.map-templates textarea { width: 100%; resize: vertical; }
.map-templates__image { display: grid; grid-template-columns: 56px 1fr; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.map-templates__image img { grid-row: span 4; width: 56px; height: 56px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.map-templates__add { display: inline-block; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 6px; cursor: pointer; }
.map-templates__add input { display: none; }
.map-templates__actions { display: flex; justify-content: flex-end; gap: 8px; }
.map-templates__actions button:not(.button--primary) { color: var(--ink); background: var(--surface); border-color: var(--line); }
@media (max-width: 720px) { .map-templates { grid-template-columns: 1fr; } }
.app-dialog--docked .map-templates { grid-template-columns: 1fr; }
.app-dialog--docked .map-templates__side { order: -1; }
.text-box-list { grid-column: 1 / -1; display: grid; gap: 4px; }
.label-editor textarea { width: 100%; resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; }
.label-editor__chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 6px 0; font-size: 0.8rem; color: var(--muted); }
.label-editor__chips button { padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 0.78rem; cursor: pointer; }
.label-editor__chips button:hover { border-color: var(--green-2); color: var(--green-2); }
.label-editor [hidden] { display: none !important; }
.text-box-list__item { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; }
.text-box-list__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; }
.text-box-editor .text-box-run { border: 1px solid var(--line, #d0d5dd); border-radius: 6px; padding: 8px; margin: 0 0 8px; }
.text-box-editor textarea { width: 100%; resize: vertical; }
.text-box-checks > span { display: flex; gap: 14px; align-items: center; min-height: 40px; }
.text-box-checks label { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.text-box-editor fieldset > legend { font-size: 0.78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }
.text-box-editor legend label { display: inline-flex; gap: 6px; align-items: center; }
.text-box-editor button:not(.button--primary) { padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); font: inherit; font-size: 0.9rem; cursor: pointer; }
.text-box-editor button:not(.button--primary):hover { border-color: var(--green-2); color: var(--green-2); }
.text-box-editor [data-text-pick], .text-box-editor [data-add-run] { display: block; width: 100%; margin-top: 10px; }
.text-box-editor [data-remove-run] { margin-top: 8px; color: var(--muted); }
.text-box-editor [data-add-run] { margin-bottom: 12px; border-style: dashed; }
.text-box-editor .workspace-tool__actions { display: flex; justify-content: space-between; gap: 8px; }
.text-box-editor .workspace-tool__actions [data-text-delete] { color: #b42318; }
.text-box-editor .workspace-tool__actions [data-text-delete]:hover { border-color: #b42318; color: #b42318; }
.draw-tools .workspace-launch { grid-column: 1 / -1; color: var(--green-2); }
.utility-content .draw-tools { align-content: start; }
.utility-content .draw-tools .workspace-launch { display: none; }
.draw-tools button, .layer-card__actions button, .dialog__actions button, .table-footer button, .catalog-card button {
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: var(--surface); cursor: pointer; font-size: 12px;
}
.draw-tools button:hover, .layer-card__actions button:hover { border-color: var(--green-2); color: var(--green-2); }
.button--quiet { color: var(--muted); }
.intelligence-empty { color: var(--muted); font-size: 13px; line-height: 1.55; }

.layers-list { display: grid; gap: 9px; }
.empty-state { padding: 18px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.layer-card { padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.layer-card__head { display: grid; grid-template-columns: 25px 1fr 25px; gap: 7px; align-items: start; }
.layer-card__head strong { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.layer-card__head small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; text-transform: capitalize; }
.layer-card__head > button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.layer-scale-note { margin-top: 8px; padding: 6px 8px; border-left: 3px solid var(--amber); border-radius: 4px; color: var(--ink); background: color-mix(in srgb, var(--amber) 12%, var(--surface)); font-size: 10px; line-height: 1.35; }
.layer-scale-note[hidden] { display: none; }
.layer-toggle { position: relative; display: block; width: 20px; height: 20px; }
.layer-toggle input { position: absolute; opacity: 0; }
.layer-toggle span { display: block; width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 4px; }
.layer-toggle input:checked + span { background: var(--green-2); border-color: var(--green-2); box-shadow: inset 0 0 0 3px var(--surface); }
.opacity-row { display: grid; grid-template-columns: 46px 1fr 34px; align-items: center; gap: 8px; margin-top: 9px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.opacity-row input { accent-color: var(--green-2); width: 100%; }
.opacity-row output { text-align: right; }
.layer-card__actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.layer-card__actions button { padding: 6px 2px; font-size: 10px; }
.layer-card__actions button:disabled { opacity: .45; cursor: not-allowed; }

.result-card { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); margin-top: 8px; overflow: hidden; }
.result-card summary { display: flex; justify-content: space-between; gap: 10px; padding: 10px; cursor: pointer; font-size: 12px; font-weight: 700; }
.result-card summary small { color: var(--muted); font-weight: 400; text-transform: uppercase; }
.result-card dl, .about-copy dl { margin: 0; padding: 0 10px 10px; }
.result-card dl div, .about-copy dl div { display: grid; grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr); gap: 9px; padding: 5px 0; border-top: 1px solid var(--surface-2); font-size: 10px; }
.result-card dt, .about-copy dt { color: var(--muted); overflow-wrap: anywhere; }
.result-card dd, .about-copy dd { margin: 0; overflow-wrap: anywhere; }
.location-card { display: grid; gap: 3px; margin-bottom: 10px; padding: 12px; border-radius: 8px; color: white; background: var(--green); }
.location-card strong { font: 600 17px/1.25 "Newsreader", Georgia, serif; }
.location-card small { color: rgb(255 255 255 / 68%); }
.ai-question { margin-top: 12px; }
.ai-question label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.ai-question label small { color: var(--green-2); font-weight: 700; }
.ai-question > div { display: grid; grid-template-columns: 1fr auto; gap: 5px; }
.intelligence-toolbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.intelligence-toolbar button, .ai-response__clear { border: 1px solid var(--line); border-radius: 5px; padding: 5px 8px; color: var(--green-2); background: var(--surface); cursor: pointer; font-size: 10px; font-weight: 700; }
.ai-response__download { border: 1px solid var(--line); border-radius: 5px; padding: 5px 8px; color: var(--green-2); background: var(--surface); cursor: pointer; font-size: 10px; font-weight: 700; margin-right: 5px; }
.intelligence-report-action { display: flex; justify-content: flex-end; margin-top: 10px; }
.intelligence-report-action button { border: 1px solid var(--line); border-radius: 5px; padding: 6px 9px; color: var(--green-2); background: var(--surface); cursor: pointer; font-size: 10px; font-weight: 700; }
.feature-service-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.feature-service-actions .form-note { margin: 0; }
.feature-service-actions button { flex: 0 0 auto; border: 1px solid var(--green-2); border-radius: 6px; padding: 8px 10px; color: white; background: var(--green); cursor: pointer; font-size: 12px; font-weight: 700; }
.feature-service-actions button:disabled { opacity: .6; cursor: default; }
.intelligence-utility { padding: 14px; }
.intelligence-utility .intelligence-toolbar { display: none; }
.ai-response { margin-top: 10px; padding: 12px; border-left: 3px solid var(--amber); background: var(--surface); font-size: 12px; line-height: 1.55; }
.ai-response__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ai-response__query { display: grid; gap: 2px; margin: 10px 0 12px; padding: 8px 9px; border-radius: 5px; background: var(--surface-2); }
.ai-response__query strong { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.ai-response__markdown > :first-child { margin-top: 8px; }
.ai-response__markdown > :last-child { margin-bottom: 0; }
.ai-response__markdown h3, .ai-response__markdown h4, .ai-response__markdown h5, .ai-response__markdown h6 { margin: 16px 0 5px; color: var(--ink); font-family: "Newsreader", Georgia, serif; line-height: 1.25; }
.ai-response__markdown h3 { font-size: 17px; }
.ai-response__markdown h4 { font-size: 15px; }
.ai-response__markdown h5, .ai-response__markdown h6 { font-size: 13px; }
.ai-response__markdown p { margin: 8px 0; }
.ai-response__markdown ul, .ai-response__markdown ol { margin: 7px 0; padding-left: 22px; }
.ai-response__markdown li + li { margin-top: 4px; }
.ai-response__markdown a { color: var(--green-2); text-underline-offset: 2px; }
.ai-response__markdown code { padding: 1px 4px; border-radius: 4px; background: var(--surface-2); font: .92em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.ai-response__markdown pre { max-width: 100%; padding: 9px; overflow: auto; border-radius: 6px; background: var(--surface-2); }
.ai-response__markdown pre code { padding: 0; background: transparent; }
.ai-response__markdown blockquote { margin: 9px 0; padding-left: 10px; border-left: 2px solid var(--line); color: var(--muted); }
.ai-response__markdown table { width: 100%; margin: 12px 0; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.ai-response__markdown th, .ai-response__markdown td { padding: 7px 8px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.ai-response__markdown th { color: var(--ink); background: var(--surface-2); font-weight: 700; }
.ai-response__markdown td { overflow-wrap: anywhere; }

.sidebar__footer { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); background: var(--surface); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.sidebar__footer #project-name { min-width:0; padding:0; overflow:hidden; border:0; color:inherit; background:transparent; font:inherit; text-align:left; text-overflow:ellipsis; text-transform:inherit; white-space:nowrap; cursor:pointer; }
.sidebar__footer #project-name:hover { color:var(--green-2); text-decoration:underline; }
.layer-card__title { display:block; max-width:100%; padding:0; overflow:hidden; border:0; color:var(--ink); background:transparent; font:600 12px var(--ui-font); text-align:left; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.layer-card__title:hover { color:var(--green-2); text-decoration:underline; }
.status-dot { color: var(--green-2); }
.status-dot::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; }

.map-workspace { position: relative; min-width: 0; height: 100%; background: #dfe8e4; }
.map-workspace.is-project-drop-target::after { content:"Drop to open this project or Smart Image"; position:absolute; z-index:85; inset:24px; display:grid; place-items:center; border:3px dashed color-mix(in srgb,var(--amber) 82%,white); border-radius:18px; color:white; background:color-mix(in srgb,var(--green) 84%,transparent); box-shadow:inset 0 0 0 999px rgb(4 24 22 / 18%); font:700 clamp(18px,2.5vw,34px)/1.2 Georgia,serif; text-align:center; pointer-events:none; }
.atlas-chapter-overlay { position: absolute; z-index: 18; top: 18px; left: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: end; width: min(580px, calc(100% - 150px)); padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--line) 76%, transparent); border-left: 4px solid var(--amber); border-radius: 10px; color: var(--ink); background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 12px 32px rgb(17 39 33 / 20%); backdrop-filter: blur(16px); }
.atlas-chapter-overlay[hidden] { display: none; }
.atlas-chapter-overlay__copy { min-width: 0; }
.atlas-chapter-brand-mark, .atlas-chapter-brand-name { display:none; }
.atlas-chapter-overlay h2 { margin: 2px 0 4px; font: 600 25px/1.08 "Newsreader", Georgia, serif; }
.atlas-chapter-overlay p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.atlas-chapter-overlay__navigation { display: flex; gap: 6px; }
.atlas-chapter-overlay__navigation button { min-width: 68px; padding: 8px 10px; border: 1px solid var(--green); border-radius: 6px; color: var(--green); background: var(--surface); cursor: pointer; font-weight: 700; }
.atlas-chapter-overlay__navigation button:disabled { cursor: default; opacity: .38; }
.atlas-tour-exit { align-self:start; display:grid; width:32px; height:32px; place-items:center; padding:0; border:1px solid var(--line); border-radius:50%; color:var(--muted); background:var(--surface); cursor:pointer; font-size:20px; line-height:1; }
.atlas-tour-exit:hover { color:var(--green); border-color:var(--green); }
.atlas-tour-exit[hidden] { display:none; }
.mobile-presentation-controls { display:none; }
.atlas-chapter-description { position: absolute; z-index: 17; right: 18px; bottom: 24px; display: grid; width: min(390px, calc(100% - 36px)); max-height: min(56vh, 520px); overflow: auto; border: 1px solid color-mix(in srgb, var(--line) 76%, transparent); border-radius: 10px; color: var(--ink); background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 12px 32px rgb(17 39 33 / 20%); backdrop-filter: blur(16px); }
.atlas-chapter-description[hidden] { display: none; }
.atlas-chapter-description img { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 9px 9px 0 0; }
.atlas-chapter-description img[hidden] { display: none; }
.atlas-chapter-description > div { padding: 14px 16px 16px; }
.atlas-chapter-description p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
#presentation-dashboard { display: grid; min-height: 0; order: -4; margin: 8px 12px 16px; }
.mode-dashboard { display: grid; gap: 10px; min-height: 0; }
.mode-dashboard header h2, .presentation-empty h2 { margin: 2px 0; font: 600 24px/1.1 "Newsreader", Georgia, serif; }
.mode-dashboard header p, .presentation-empty p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.mode-chart { display: flex; flex-wrap: wrap; gap: 5px; }
.mode-chart button { display: grid; gap: 2px; min-width: 62px; padding: 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--ink); cursor: pointer; font-size: 10px; text-align: left; }
.mode-chart b { color: var(--green-2); font-size: 14px; }
.explorer-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 9px; }
.explorer-counts:has(button) { grid-template-columns:repeat(4,1fr); }
.explorer-counts button { display:grid; gap:1px; padding:8px; border:1px solid var(--line); color:var(--muted); background:var(--surface-2); text-align:left; cursor:pointer; }
.explorer-counts span { display: grid; gap: 1px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 10px; }
.explorer-counts b { color: var(--green-2); font-size: 17px; }
.mode-dashboard header .explorer-coverage { margin-top: 7px; font-size: 10px; }
.explorer-toolbar { display: grid; gap: 8px; }
.explorer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.explorer-actions button { padding: 8px; border: 1px solid var(--green); border-radius: 6px; color: var(--green); background: var(--surface); cursor: pointer; }
.explorer-distribution { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.explorer-distribution > div:first-child { display: grid; gap: 2px; }
.explorer-histogram { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 3px; height: 76px; padding-top: 5px; border-bottom: 1px solid var(--line); }
.explorer-histogram button { display: flex; align-items: end; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.explorer-histogram button span { display: block; width: 100%; min-height: 4px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #b23f62, #e0ad35 55%, #2f7f9d); }
.presentation-workspace { position:relative; }
.presentation-compact-header { display:grid; grid-template-columns:1fr auto; gap:4px 10px; align-items:end; }
.presentation-compact-header .eyebrow { grid-column:1/-1; }.presentation-compact-header h2 { margin:0; }
.compact-dataset { display:grid; gap:2px; color:var(--muted); font-size:9px; font-weight:700; }.compact-dataset select { max-width:170px; padding:6px; border:1px solid var(--line); color:var(--ink); background:var(--surface); }
.explorer-search-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }.explorer-search-input { grid-column:1/-1; }
.scope-toggle { display:flex; align-items:center; gap:7px; font-size:11px; color:var(--muted); }
.filter-chips { display:flex; flex-wrap:wrap; gap:5px; }.filter-chips button { padding:5px 7px; border:1px solid var(--green-2); color:var(--green-2); background:color-mix(in srgb,var(--green-2) 8%,var(--surface)); cursor:pointer; font-size:9px; }.filter-chips span { color:var(--muted); font-size:10px; }
.chart-controls { display:grid!important; grid-template-columns:1fr 80px; gap:7px!important; }.chart-axis { display:flex!important; justify-content:space-between; color:var(--muted); font-size:9px; }.chart-caption { margin:0; color:var(--muted); font-size:9px; line-height:1.4; }.link-button { padding:0; border:0; color:var(--green-2); background:transparent; cursor:pointer; text-decoration:underline; }
/* Charts & Analytics: the ECharts canvas is optional; these controls and the
   fallback chart remain useful on slow or offline connections. */
.chart-builder { container-type:inline-size; display:grid; gap:10px; min-width:0; width:100%; max-width:100%; overflow:hidden; }
.app-dialog:has(.chart-builder) .dialog__content,.app-dialog--docked:has(.chart-builder) .dialog__content { overflow-x:hidden; }
.chart-data-starter { display:grid; gap:11px; min-width:0; }
.chart-data-starter h3 { margin:0; font:600 20px/1.15 "Newsreader", Georgia, serif; }
.chart-data-starter > p { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.chart-data-starter__grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.chart-data-starter__grid button,.chart-data-starter__tutorial-actions button { display:grid; gap:3px; min-height:70px; padding:10px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:var(--surface); text-align:left; cursor:pointer; }
.chart-data-starter__grid button:hover,.chart-data-starter__grid button:focus-visible,.chart-data-starter__tutorial-actions button:hover,.chart-data-starter__tutorial-actions button:focus-visible { border-color:var(--green-2); outline:2px solid color-mix(in srgb,var(--green-2) 22%,transparent); outline-offset:1px; background:color-mix(in srgb,var(--green-2) 6%,var(--surface)); }
.chart-data-starter__grid strong { font-size:12px; }.chart-data-starter__grid small { color:var(--muted); font-size:10px; line-height:1.35; }
.chart-data-starter--tutorial ol { display:grid; gap:8px; margin:0; padding:0; list-style:none; counter-reset:chart-tutorial; }
.chart-data-starter--tutorial li { display:grid; grid-template-columns:26px minmax(0,1fr); gap:1px 8px; counter-increment:chart-tutorial; padding:9px; border:1px solid var(--line); border-radius:8px; background:var(--surface); font-size:11px; }
.chart-data-starter--tutorial li::before { content:counter(chart-tutorial); grid-row:span 2; display:grid; place-items:center; width:24px; height:24px; border-radius:50%; color:white; background:var(--green-2); font-size:11px; font-weight:800; }
.chart-data-starter--tutorial li span { color:var(--muted); line-height:1.4; }
.chart-data-starter__tutorial-actions { display:flex; flex-wrap:wrap; gap:7px; }.chart-data-starter__tutorial-actions button { min-height:0; padding:8px 10px; font-size:11px; font-weight:700; }
@media (max-width: 420px) { .chart-data-starter__grid { grid-template-columns:1fr; } }
.chart-builder__gallery { display:grid; gap:7px; min-width:0; padding:10px; border:1px solid var(--line); border-radius:9px; background:color-mix(in srgb,var(--surface-2) 82%,var(--green-2) 4%); }
.chart-builder__gallery p { margin:3px 0 0; color:var(--muted); font-size:11px; line-height:1.4; }
.chart-builder__gallery-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; min-width:0; }
.chart-gallery-card { display:grid; grid-template-columns:20px minmax(0,1fr); min-width:0; gap:2px 6px; padding:7px; border:1px solid var(--line); border-radius:7px; color:var(--ink); background:var(--surface); text-align:left; cursor:pointer; }
.chart-gallery-card:hover,.chart-gallery-card:focus-visible { border-color:var(--green-2); outline:2px solid color-mix(in srgb,var(--green-2) 25%,transparent); outline-offset:1px; }
.chart-gallery-card strong { align-self:end; overflow:hidden; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }.chart-gallery-card small { grid-column:2; display:-webkit-box; overflow:hidden; color:var(--muted); font-size:8px; line-height:1.25; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.chart-gallery-card__glyph { grid-row:span 2; display:block; align-self:center; width:20px; height:18px; border-bottom:2px solid var(--green-2); background:linear-gradient(90deg,transparent 0 12%,var(--green-2) 12% 28%,transparent 28% 38%,var(--green-2) 38% 58%,transparent 58% 68%,var(--green-2) 68% 94%,transparent 94%); opacity:.9; }
.chart-gallery-card__glyph--line,.chart-gallery-card__glyph--area { border:0; background:linear-gradient(155deg,transparent 38%,var(--green-2) 40% 47%,transparent 49% 55%,var(--green-2) 57% 64%,transparent 66%); }.chart-gallery-card__glyph--donut { border:6px solid var(--green-2); border-right-color:var(--gold); border-radius:50%; background:none; }.chart-gallery-card__glyph--scatter,.chart-gallery-card__glyph--bubble { border:0; background:radial-gradient(circle at 20% 75%,var(--green-2) 0 3px,transparent 4px),radial-gradient(circle at 54% 45%,var(--gold) 0 4px,transparent 5px),radial-gradient(circle at 80% 20%,var(--green-2) 0 3px,transparent 4px); }
.chart-builder__controls { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:7px; min-width:0; }
.chart-builder__controls .field { min-width:0; margin:0; }.chart-builder__controls :is(input,select) { box-sizing:border-box; min-width:0; width:100%; }
.chart-builder__title { grid-column:span 2; }
.chart-builder__targets { display:flex; flex-wrap:wrap; min-inline-size:0; gap:6px 10px; margin:0; padding:7px 9px; border:1px solid var(--line); border-radius:8px; color:var(--ink); font-size:10px; }.chart-builder__targets legend { padding:0 4px; color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.08em; }.chart-builder__targets label { display:flex; min-width:0; gap:4px; align-items:center; white-space:nowrap; }
.chart-builder__advanced,.chart-builder__filter { border:1px solid var(--line); border-radius:8px; padding:8px 10px; }.chart-builder__advanced summary,.chart-builder__filter summary { cursor:pointer; color:var(--green-2); font-size:11px; font-weight:700; }.chart-builder__filter summary span { color:var(--muted); font-weight:400; }.chart-builder__advanced[open] summary,.chart-builder__filter[open] summary { margin-bottom:9px; }.chart-builder__advanced .form-note,.chart-builder__filter .form-note { margin:0 0 9px; }
@container (max-width: 560px) { .chart-builder__controls { grid-template-columns:repeat(2,minmax(0,1fr)); }.chart-builder__title { grid-column:1 / -1; } }
@container (max-width: 340px) { .chart-builder__gallery-grid,.chart-builder__controls { grid-template-columns:1fr; }.chart-builder__title { grid-column:auto; }.chart-gallery-card { grid-template-columns:18px minmax(0,1fr); } }
.chart-builder__suggestions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; color:var(--muted); font-size:11px; }
.chart-builder__suggestions button { padding:5px 8px; border:1px solid var(--line); border-radius:999px; color:var(--green-2); background:var(--surface); cursor:pointer; font-size:11px; }
.chart-builder__preview { position:relative; min-height:300px; overflow:hidden; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); }
.chart-builder__canvas { width:100%; height:300px; }
.chart-builder__preview:has(.chart-builder__canvas) > .chart-fallback { display:none; }
.chart-builder__empty { display:grid; place-content:center; min-height:300px; padding:20px; color:var(--muted); text-align:center; }
.chart-builder__empty strong { color:var(--ink); }.chart-builder__empty p { margin:5px 0 0; }
.chart-builder__selection { position:absolute; right:10px; bottom:8px; left:10px; color:var(--muted); font-size:11px; pointer-events:none; }
.chart-kpi { display:grid; place-content:center; min-height:300px; text-align:center; }.chart-kpi span { color:var(--muted); text-transform:capitalize; }.chart-kpi strong { color:var(--green-2); font:700 clamp(36px, 7vw, 72px)/1.1 var(--ui-font); }
.chart-fallback { display:flex; align-items:end; gap:6px; min-height:240px; padding:18px 14px 32px; border-bottom:1px solid var(--line); }.chart-fallback button { display:grid; flex:1; align-items:end; gap:5px; min-width:18px; height:230px; padding:0; border:0; color:var(--muted); background:transparent; cursor:pointer; font-size:10px; }.chart-fallback i { display:block; width:100%; min-height:4px; background:var(--green-2); border-radius:4px 4px 0 0; }.chart-fallback span { display:block; overflow:hidden; max-width:100%; text-overflow:ellipsis; white-space:nowrap; transform:rotate(-35deg); transform-origin:left top; text-align:left; }
.chart-fallback--horizontal { display:grid; align-content:start; gap:7px; min-height:0; padding:16px; }.chart-fallback--horizontal button { display:grid; grid-template-columns:minmax(90px, .9fr) minmax(36px, 2.2fr) auto; align-items:center; gap:8px; width:100%; height:auto; min-height:25px; text-align:left; }.chart-fallback--horizontal button span { transform:none; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }.chart-fallback--horizontal button i { width:auto; min-width:2px; height:13px; min-height:0; border-radius:0 4px 4px 0; }.chart-fallback--horizontal button b { min-width:48px; color:var(--ink); font-size:10px; font-variant-numeric:tabular-nums; text-align:right; }
.chart-3d { display:grid; align-content:center; min-height:300px; padding:12px; }.chart-3d svg { display:block; width:100%; max-height:280px; }.chart-3d p { margin:2px 0 0; color:var(--muted); font-size:10px; text-align:center; }.chart-3d__axis { fill:none; stroke:var(--muted); stroke-width:1.5; }.chart-3d__bar { fill:var(--green-2); }.chart-3d__bar-side { fill:color-mix(in srgb,var(--green-2) 68%,black); }.chart-3d__bar-top { fill:color-mix(in srgb,var(--green-2) 68%,white); }.chart-3d :is(.chart-3d__column,.chart-3d__point) { cursor:pointer; }.chart-3d :is(.chart-3d__column,.chart-3d__point):focus { outline:none; filter:drop-shadow(0 0 3px var(--gold)); }.chart-3d__point circle { fill:var(--gold); stroke:var(--green-2); stroke-width:2; }
.map-chart-overlay { position:absolute; z-index:24; inset:0; overflow:hidden; pointer-events:none; }
.map-chart-glyph,.map-chart-cluster { position:absolute; display:grid; place-items:center; margin:0; padding:0; border:1px solid color-mix(in srgb,var(--green-2) 44%,white); border-radius:6px; color:var(--ink); background:color-mix(in srgb,var(--surface) 88%,transparent); box-shadow:0 2px 9px rgb(17 39 33 / 22%); cursor:pointer; pointer-events:auto; }
.map-chart-glyph:hover,.map-chart-glyph:focus-visible,.map-chart-cluster:hover,.map-chart-cluster:focus-visible { z-index:2; outline:2px solid var(--gold); outline-offset:2px; background:var(--surface); }
.map-chart-glyph svg { display:block; max-width:100%; max-height:100%; }.map-chart-cluster { width:28px; height:28px; border-radius:50%; color:white; background:var(--green-2); font:700 10px/1 var(--ui-font); }
@media (max-width: 700px) { .chart-builder { min-width:0; }.chart-builder__gallery-grid { grid-template-columns:1fr 1fr; }.chart-builder__controls { grid-template-columns:repeat(2, minmax(0, 1fr)); }.chart-builder__title { grid-column:auto; }.chart-builder__preview { min-height:240px; }.chart-builder__canvas,.chart-builder__empty,.chart-kpi { height:240px; min-height:240px; } }

/* A saved chart is an ordinary composable panel, not a second dashboard.
   Keep its visualization within the panel body so the normal dock header,
   collapse control, and resizing behavior remain in charge. */
.application-panel[data-panel-type="charts"] .application-panel__body { overflow-x:hidden; }
.application-dock--left .application-panel[data-panel-type="charts"] { height:var(--chart-panel-height,300px); min-height:160px; max-height:calc(100% - 12px); }
.application-panel[data-panel-type="charts"] .chart-dashboard { display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; gap:6px; height:100%; min-height:0; padding:8px 10px 9px; }
.application-panel[data-panel-type="charts"] .chart-dashboard .eyebrow { overflow:hidden; min-width:0; color:var(--muted); font:700 9px/1.2 var(--ui-font); letter-spacing:.08em; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; }
.chart-panel-settings { display:grid; gap:14px; }
.chart-panel-settings .form-note { margin:0; }
.chart-dashboard__head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 10px; min-width:0; }
.chart-dashboard__tools { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-left:auto; }
.chart-dashboard__tools label { display:flex; align-items:center; gap:4px; color:var(--muted); font-size:10px; font-weight:700; }
.chart-dashboard__tools select,.chart-dashboard__categories summary { min-height:0; padding:3px 6px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:var(--surface); font:600 10px/1.3 var(--ui-font); cursor:pointer; }
.chart-dashboard__categories { position:relative; }
.chart-dashboard__categories summary { list-style:none; }
.chart-dashboard__categories summary::-webkit-details-marker { display:none; }
.chart-dashboard__categories summary::before { content:"Categories "; color:var(--muted); }
.chart-dashboard__category-list { position:absolute; z-index:30; top:calc(100% + 4px); right:0; display:grid; gap:2px; width:min(260px,70vw); max-height:260px; padding:6px; overflow:auto; border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:var(--shadow); }
.chart-dashboard__category-list > button { justify-self:start; margin-bottom:3px; padding:3px 7px; border:1px solid var(--line); border-radius:6px; color:var(--green-2); background:transparent; font:700 10px/1.2 var(--ui-font); cursor:pointer; }
.chart-dashboard__category-list label { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:6px; padding:3px 4px; border-radius:5px; color:var(--ink); font-size:11px; cursor:pointer; }
.chart-dashboard__category-list label:hover { background:var(--surface-hover); }
.chart-dashboard__category-list span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chart-dashboard__category-list small { color:var(--muted); font-variant-numeric:tabular-nums; }
.chart-dashboard__stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:6px; margin:0; }
.chart-dashboard__stats div { min-width:0; padding:5px 8px; border:1px solid var(--line); border-radius:7px; background:var(--surface-alt); }
.chart-dashboard__stats dt { overflow:hidden; color:var(--muted); font:700 9px/1.2 var(--ui-font); letter-spacing:.06em; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; }
.chart-dashboard__stats dd { overflow:hidden; margin:2px 0 0; color:var(--ink); font:700 15px/1.2 var(--ui-font); font-variant-numeric:tabular-nums; text-overflow:ellipsis; white-space:nowrap; }
.chart-dashboard__stats dd small { color:var(--muted); font-size:10px; font-weight:600; }
/* The plot takes every pixel the panel has; resizing the panel resizes the chart. */
.chart-dashboard__plot { position:relative; min-height:0; overflow:auto; }
.application-panel[data-panel-type="charts"] .chart-dashboard .chart-builder__canvas { width:100%; height:100%; min-height:90px; }
/* A short panel gives its height to the plot: the stats and colour note step aside. */
.chart-dashboard.is-short .chart-dashboard__stats,.chart-dashboard.is-short .chart-dashboard__notes [data-chart-colors] { display:none; }
.application-panel[data-panel-type="charts"] .chart-dashboard :is(.chart-fallback,.chart-3d,.chart-kpi) { height:100%; min-height:0; overflow:auto; }
.application-panel[data-panel-type="charts"] .chart-dashboard .chart-fallback { padding:6px 6px 18px; }
.application-panel[data-panel-type="charts"] .chart-dashboard .chart-fallback--horizontal { gap:4px; padding:4px 0; }
.application-panel[data-panel-type="charts"] .chart-dashboard .chart-fallback button { height:100%; min-height:120px; }
.application-panel[data-panel-type="charts"] .chart-dashboard .chart-fallback--horizontal button { height:auto; min-height:22px; }
.application-panel[data-panel-type="charts"] .chart-dashboard .chart-3d { padding:4px; }
.application-panel[data-panel-type="charts"] .chart-dashboard .chart-3d svg { max-height:100%; }
.chart-dashboard__notes { display:grid; gap:2px; min-width:0; }
.application-panel[data-panel-type="charts"] .chart-dashboard .form-note { margin:0; overflow:hidden; color:var(--muted); font-size:10px; line-height:1.25; text-overflow:ellipsis; white-space:nowrap; }
.application-panel[data-panel-type="charts"] .chart-dashboard .form-note:empty { display:none; }
.application-panel[data-panel-type="charts"] .chart-dashboard__clear { justify-self:start; min-height:0; padding:5px 8px; border:1px solid var(--line); border-radius:6px; color:var(--green-2); background:var(--surface); cursor:pointer; font-size:10px; font-weight:700; }

/* Futuristic dashboard: a HUD over a faint grid, neon numerals and corner brackets. */
.chart-dashboard--futuristic { --hud:#22d3ee; --hud-2:#a78bfa; --hud-ink:#e6f6ff; --hud-muted:#8fb3c9; position:relative; isolation:isolate; border:1px solid rgba(34,211,238,.28); border-radius:6px; color:var(--hud-ink); background:
  linear-gradient(rgba(34,211,238,.05) 1px, transparent 1px) 0 0 / 22px 22px,
  linear-gradient(90deg, rgba(34,211,238,.05) 1px, transparent 1px) 0 0 / 22px 22px,
  radial-gradient(120% 90% at 85% -10%, rgba(167,139,250,.22), transparent 55%),
  radial-gradient(90% 80% at 0% 110%, rgba(34,211,238,.16), transparent 60%),
  linear-gradient(160deg, #0a1226, #070b18 60%, #0b0820); box-shadow:inset 0 0 40px rgba(34,211,238,.08), 0 0 0 1px rgba(167,139,250,.08); font-family:"JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, monospace; }
.chart-dashboard--futuristic::before,.chart-dashboard--futuristic::after { content:""; position:absolute; z-index:-1; width:14px; height:14px; border:2px solid var(--hud); pointer-events:none; filter:drop-shadow(0 0 4px var(--hud)); }
.chart-dashboard--futuristic::before { top:-1px; left:-1px; border-right:0; border-bottom:0; }
.chart-dashboard--futuristic::after { right:-1px; bottom:-1px; border-top:0; border-left:0; border-color:var(--hud-2); filter:drop-shadow(0 0 4px var(--hud-2)); }
.application-panel[data-panel-type="charts"] .chart-dashboard--futuristic .eyebrow { color:var(--hud); font-family:inherit; text-shadow:0 0 8px rgba(34,211,238,.6); }
.application-panel[data-panel-type="charts"] .chart-dashboard--futuristic .eyebrow::before { content:""; display:inline-block; width:6px; height:6px; margin-right:6px; border-radius:50%; background:var(--hud); box-shadow:0 0 8px var(--hud); vertical-align:1px; animation:chart-hud-pulse 2.4s ease-in-out infinite; }
.chart-dashboard--futuristic .chart-dashboard__tools label { color:var(--hud-muted); font-family:inherit; }
.chart-dashboard--futuristic :is(.chart-dashboard__tools select,.chart-dashboard__categories summary) { border-color:rgba(34,211,238,.35); border-radius:3px; color:var(--hud-ink); background:rgba(8,16,34,.8); font-family:inherit; }
.chart-dashboard--futuristic .chart-dashboard__category-list { border-color:rgba(34,211,238,.4); border-radius:4px; color:var(--hud-ink); background:rgba(8,14,30,.96); box-shadow:0 0 24px rgba(34,211,238,.25); backdrop-filter:blur(8px); }
.chart-dashboard--futuristic .chart-dashboard__category-list label { color:var(--hud-ink); }
.chart-dashboard--futuristic .chart-dashboard__category-list label:hover { color:var(--hud-ink); background:rgba(34,211,238,.1); }
.chart-dashboard--futuristic .chart-dashboard__category-list :is(small,button) { color:var(--hud); }
.chart-dashboard--futuristic .chart-dashboard__category-list > button { border-color:rgba(34,211,238,.4); }
.chart-dashboard--futuristic .chart-dashboard__stats div { position:relative; overflow:hidden; border:1px solid rgba(34,211,238,.22); border-radius:3px; background:linear-gradient(135deg, rgba(34,211,238,.1), rgba(167,139,250,.06)); }
.chart-dashboard--futuristic .chart-dashboard__stats div::after { content:""; position:absolute; inset:auto 0 0; height:2px; background:linear-gradient(90deg, var(--hud), var(--hud-2), transparent); box-shadow:0 0 8px var(--hud); }
.chart-dashboard--futuristic .chart-dashboard__stats dt { color:var(--hud-muted); font-family:inherit; }
.chart-dashboard--futuristic .chart-dashboard__stats dd { color:var(--hud-ink); font-family:inherit; text-shadow:0 0 10px rgba(34,211,238,.55); }
.chart-dashboard--futuristic .chart-dashboard__stats dd small { color:var(--hud); text-shadow:none; }
.application-panel[data-panel-type="charts"] .chart-dashboard--futuristic .form-note { color:var(--hud-muted); font-family:inherit; }
.application-panel[data-panel-type="charts"] .chart-dashboard--futuristic .chart-dashboard__clear { border-color:rgba(34,211,238,.45); border-radius:3px; color:var(--hud); background:rgba(8,16,34,.8); box-shadow:0 0 10px rgba(34,211,238,.25); font-family:inherit; }
.chart-dashboard--futuristic .chart-fallback i { background:linear-gradient(0deg, rgba(34,211,238,.2), var(--hud)); box-shadow:0 0 10px rgba(34,211,238,.5); }
.chart-dashboard--futuristic .chart-fallback--horizontal i { background:linear-gradient(90deg, rgba(34,211,238,.2), var(--hud)); }
.chart-dashboard--futuristic :is(.chart-fallback span,.chart-fallback b) { color:var(--hud-ink); }
@keyframes chart-hud-pulse { 50% { opacity:.35; box-shadow:0 0 2px var(--hud); } }
@media (prefers-reduced-motion: reduce) { .application-panel[data-panel-type="charts"] .chart-dashboard--futuristic .eyebrow::before { animation:none; } }
@media (max-width:700px) { .application-panel[data-panel-type="charts"] .chart-dashboard { min-height:320px; } }
.explorer-results-table { display:grid; gap:5px; min-height:150px; }.explorer-results-table > header { display:flex; align-items:center; gap:7px; }.explorer-results-table > header span { margin-right:auto; color:var(--muted); font-size:9px; }.explorer-results-table > header label { color:var(--muted); font-size:9px; }.explorer-results-table select,.explorer-results-table header button { padding:4px; border:1px solid var(--line); color:var(--ink); background:var(--surface); }
.results-table { max-height:260px; overflow:auto; border:1px solid var(--line); background:var(--surface); }.results-row { display:grid; grid-template-columns:minmax(130px,1.5fr) minmax(90px,1fr) 72px; width:100%; padding:7px 8px; border:0; border-bottom:1px solid var(--line); color:var(--ink); background:transparent; text-align:left; font-size:10px; cursor:pointer; }.results-row--head { position:sticky; top:0; z-index:1; color:var(--muted); background:var(--surface-2); font-weight:700; cursor:default; }.results-row.is-selected { background:color-mix(in srgb,var(--green-2) 14%,var(--surface)); box-shadow:inset 3px 0 var(--green-2); }.explorer-results-table footer { display:flex; justify-content:center; align-items:center; gap:8px; color:var(--muted); font-size:9px; }.explorer-results-table footer button { padding:4px 8px; border:1px solid var(--line); background:var(--surface); }
.detail-actions { display:flex; flex-wrap:wrap; gap:5px; }.detail-actions button,.briefing-context button { padding:6px 8px; border:1px solid var(--green); color:var(--green); background:var(--surface); cursor:pointer; font-size:10px; }
.coverage-details div { display:grid; grid-template-columns:120px 1fr; gap:10px; padding:8px 0; border-bottom:1px solid var(--line); }.coverage-details dt { color:var(--muted); }.coverage-details dd { margin:0; overflow-wrap:anywhere; }
.mode-dashboard--briefing,.mode-dashboard--briefing * { min-width:0; max-width:100%; box-sizing:border-box; }
.mode-dashboard--briefing { overflow-x:hidden; }
.mode-dashboard--briefing h2,.mode-dashboard--briefing :is(strong,small,p,dt,dd) { overflow-wrap:anywhere; }
.mode-dashboard--briefing .presentation-compact-header { position:relative; grid-template-columns:minmax(0,1fr); padding-right:38px; }
.mode-dashboard--briefing .compact-dataset,.mode-dashboard--briefing .compact-dataset select { width:100%; max-width:100%; }
.briefing-search { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.35fr) 34px; gap:7px; align-items:end; }.briefing-search > .field { margin-bottom:0; }.briefing-search > button { align-self:stretch; margin-top:22px; height:auto; min-height:34px; border:1px solid var(--line); border-radius:var(--ui-radius-small,7px); background:var(--surface); color:var(--muted); font-size:18px; line-height:1; }.briefing-records { max-height:38vh; overflow-x:hidden; }
/* Desktop: the feature list folds like a door and fills the panel down to the footer (height set in JS). */
.briefing-records-fold { border:1px solid var(--line); border-radius:var(--ui-radius-small,7px); background:var(--surface); }
.briefing-records-fold > summary { display:flex; align-items:center; gap:8px; min-height:38px; padding:8px 12px; color:var(--ink); font:800 13px/1.2 var(--ui-font); list-style:none; cursor:pointer; }
.briefing-records-fold > summary::-webkit-details-marker { display:none; }
.briefing-records-fold > summary small { color:var(--muted); font-weight:600; }
.briefing-records-fold > summary::after { content:"⌄"; margin-left:auto; color:var(--green); font-size:18px; line-height:1; transition:transform .15s; }
.briefing-records-fold[open] > summary::after { transform:rotate(180deg); }
.briefing-records-fold[open] > summary { border-bottom:1px solid var(--line); }
.briefing-records-fold > .briefing-scope { border:0; border-bottom:1px solid var(--line); }
.briefing-records-fold > .briefing-records { margin:0; border:0; overflow-y:auto; overscroll-behavior:contain; }
.briefing-scope { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px; padding:8px; border:1px solid var(--line); background:var(--surface-2); color:var(--muted); font-size:10px; }
.briefing-scope label { display:flex; align-items:center; gap:6px; color:var(--ink); font-weight:700; }
.briefing-record { display:grid; grid-template-columns:32px minmax(0,1fr); border-bottom:1px solid var(--line); }
.briefing-record .mode-record { width:100%; border:0; }
.briefing-record__include { display:grid; place-items:center; border-right:1px solid var(--line); background:var(--surface-2); cursor:pointer; }
.briefing-record.is-included { box-shadow:inset 3px 0 var(--green-2); }
.briefing-context-host:empty { display:none; }
/* Briefing slides: a Features / Slides tab pair, the slide list and editor, and the preview player. */
.briefing-tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; margin:10px 0 4px; padding:3px; border:1px solid var(--line); border-radius:var(--ui-radius-small,8px); background:var(--surface-2); }
.briefing-tabs button { min-height:34px; border:0; border-radius:calc(var(--ui-radius-small,8px) - 2px); color:var(--muted); background:transparent; font-weight:700; cursor:pointer; }
.briefing-tabs button[aria-selected="true"] { color:var(--ink); background:var(--surface); box-shadow:0 1px 3px rgb(17 39 33 / 14%); }
.briefing-slides-host { display:none; min-height:0; }
.mode-dashboard--briefing.is-slides .briefing-slides-host { display:block; }
.mode-dashboard--briefing.is-slides > :not(header):not(.briefing-tabs):not(.briefing-slides-host) { display:none!important; }
body.briefing-slides-tab #briefing-context-host { display:none; }
.briefing-slides { display:grid; gap:10px; min-height:0; padding-top:6px; }
.briefing-slides__authoring { display:grid; gap:10px; min-height:0; }
.briefing-slides button { cursor:pointer; }
.briefing-slides__add { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:end; }
.briefing-slides__add label, .briefing-slides__transition, .briefing-field { display:grid; gap:4px; font-size:12px; font-weight:700; color:var(--ink); }
.briefing-field small, .briefing-slides__add small { color:var(--muted); font-weight:500; }
.briefing-slides select, .briefing-slides input:not([type="checkbox"]), .briefing-slides textarea { width:100%; min-height:34px; padding:7px 9px; border:1px solid var(--line); border-radius:var(--ui-radius-small,7px); color:var(--ink); background:var(--surface); font:inherit; font-weight:500; }
.briefing-slides textarea { resize:vertical; line-height:1.4; }
.briefing-slides__add button, .briefing-slides__included, .briefing-slides__present, .briefing-camera button { min-height:34px; padding:6px 12px; border:1px solid var(--green); border-radius:var(--ui-radius-small,7px); color:var(--green); background:var(--surface); font-weight:700; }
.briefing-slides__present, .briefing-slides__add button { color:var(--on-accent,#fff); background:var(--green); }
.briefing-slides__actions { display:flex; gap:8px; }
.spec-issues { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.spec-issue { padding:9px 11px; border-left:3px solid var(--danger,#a73c2e); border-radius:6px; background:var(--surface-2); }
.spec-issue--warning { border-left-color:var(--amber); }
.spec-issue p { margin:4px 0 0; }
.spec-issue small { display:block; margin-top:4px; color:var(--muted); }
.spec-issue code { color:var(--muted); font-size:11px; }
.layer-scale-note:not([hidden]) { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.layer-scale-note [data-scale-text] { flex:1 1 160px; }
.layer-scale-note button { padding:3px 9px; border:1px solid currentColor; border-radius:999px; background:transparent; color:inherit; font-size:11px; font-weight:700; cursor:pointer; }
.workflow-grid__photo { border-style:dashed!important; }
.briefing-slides__auto { display:flex; flex-wrap:wrap; gap:8px; }
.briefing-slides__auto button, .briefing-select__generate { flex:1; min-height:32px; padding:5px 12px; border:1px dashed var(--green); border-radius:var(--ui-radius-small,7px); background:color-mix(in srgb, var(--green) 9%, var(--surface)); color:var(--green); font-weight:800; }
.briefing-select { display:grid; gap:7px; padding:8px; border:1px solid var(--line); border-radius:var(--ui-radius-small,7px); background:var(--surface); }
.briefing-select__modes { display:flex; flex-wrap:wrap; gap:6px; align-items:end; }
.briefing-select__modes > button { min-height:30px; padding:4px 10px; border:1px solid var(--line); border-radius:999px; background:var(--surface-2); color:var(--ink); font-size:12px; font-weight:700; }
.briefing-select__modes > button[aria-pressed="true"] { border-color:var(--green); background:var(--green); color:var(--on-accent,#fff); }
.briefing-select__group { display:block; margin-left:auto; }
.briefing-select__group select { min-height:30px; max-width:140px; padding-block:3px; border-radius:999px; font-size:12px; }
.briefing-conditions { display:grid; gap:6px; }
.briefing-condition { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr) minmax(0,1fr) 28px; gap:5px; align-items:center; }
.briefing-condition :is(select,input) { min-width:0; min-height:30px; font-size:12px; }
.briefing-condition > button { height:30px; border:1px solid var(--line); background:var(--surface-2); }
.condition-builder { display:grid; gap:6px; container-type:inline-size; }
@container (max-width: 440px) {
  .condition-builder .condition-builder__row { grid-template-columns:minmax(0,1fr) minmax(0,.8fr) 28px; }
  .condition-builder .condition-builder__values { grid-column:1 / -1; grid-row:2; }
}
.condition-builder__logic { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:12px; }
.condition-builder__logic select { min-height:28px; font-size:12px; }
.condition-builder__rows { display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.condition-builder__row { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.8fr) minmax(0,1.3fr) 28px; gap:5px; align-items:center; }
.condition-builder__row :is(select,input) { min-width:0; width:100%; min-height:30px; font-size:12px; }
.condition-builder__row.is-incomplete :is(input) { border-style:dashed; }
.condition-builder__values { display:flex; min-width:0; }
.condition-builder__range { display:flex; flex:1; gap:4px; align-items:center; min-width:0; font-size:11px; color:var(--muted); }
.condition-builder__range input { flex:1 1 0; }
.condition-builder__row > button { height:30px; border:1px solid var(--line); border-radius:var(--ui-radius-small,8px); background:var(--surface-2); color:var(--ink); }
.condition-builder__add { justify-self:start; padding:4px 0; border:0; background:none; color:var(--green-2,var(--green)); font-weight:700; font-size:12px; cursor:pointer; }
.condition-builder__add:hover { text-decoration:underline; }
.explorer-conditions { margin:8px 0; }
.briefing-condition__range { display:flex; gap:4px; align-items:center; min-width:0; font-size:11px; color:var(--muted); }
.briefing-condition__range input { flex:1 1 0; min-width:0; }
.briefing-groups { display:flex; flex-wrap:wrap; gap:5px; max-height:96px; overflow:auto; }
.briefing-group { display:inline-flex; border:1px solid var(--line); border-radius:999px; overflow:hidden; background:var(--surface-2); font-size:12px; }
.briefing-group button { padding:4px 8px; border:0; background:transparent; color:var(--ink); }
.briefing-group button b { color:var(--muted); font-weight:700; }
.briefing-group button + button { border-left:1px solid var(--line); color:var(--green); font-weight:800; }
.briefing-group.is-active { border-color:var(--green); background:color-mix(in srgb, var(--green) 14%, var(--surface)); }
.briefing-select__bulk { display:flex; flex-wrap:wrap; align-items:center; gap:6px; color:var(--muted); font-size:12px; }
.briefing-select__bulk span { margin-right:auto; }
.briefing-select__bulk button { min-height:28px; padding:3px 9px; border:1px solid var(--line); border-radius:var(--ui-radius-small,7px); background:var(--surface); color:var(--green); font-weight:700; }
body.briefing-map-select #view-div, body.briefing-map-select .esri-view-surface { cursor:crosshair !important; }
.feed-card__more { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; padding-top:8px; border-top:1px dashed var(--line); }
.feed-card__more button { min-height:30px; padding:4px 10px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--green); font-size:12px; font-weight:700; }
.share-export { display:grid; gap:12px; }
.share-export__grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; }
.share-export__card { display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:10px; row-gap:3px; align-items:start; min-height:96px; padding:14px; border:1px solid var(--line); border-radius:var(--ui-radius,10px); background:var(--surface); color:var(--ink); text-align:left; cursor:pointer; transition:border-color .15s, transform .15s, box-shadow .15s; }
.share-export__card:hover:not(:disabled) { border-color:var(--green); transform:translateY(-1px); box-shadow:0 8px 20px rgb(0 0 0 / 10%); }
.share-export__card:disabled { opacity:.55; cursor:not-allowed; }
.share-export__icon { grid-row:span 2; display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:color-mix(in srgb, var(--green) 14%, var(--surface)); color:var(--green); font-size:17px; }
.share-export__card strong { font-size:15px; }
.share-export__card small { color:var(--muted); font-size:12px; line-height:1.35; }
.workflow-share__notice { margin:0; padding:9px 12px; border:1px solid color-mix(in srgb, var(--amber) 55%, transparent); border-radius:var(--ui-radius-small,7px); background:color-mix(in srgb, var(--amber) 14%, var(--surface)); color:var(--ink); font-size:13px; font-weight:600; }
.workflow-share__long { margin:0; padding:12px; border-radius:var(--ui-radius-small,7px); background:var(--surface-2); color:var(--ink); }
.briefing-slides__actions > button { flex:1; }
.briefing-slides__actions [data-slides-share] { min-height:34px; padding:6px 12px; border:1px solid var(--green); border-radius:var(--ui-radius-small,7px); color:var(--green); background:var(--surface); font-weight:700; }
.briefing-slides__included:disabled { opacity:.5; cursor:default; }
.briefing-slides__empty { margin:0; padding:12px; border:1px dashed var(--line); border-radius:var(--ui-radius-small,8px); color:var(--muted); font-size:12px; line-height:1.45; }
.briefing-slide-list { display:grid; gap:4px; min-height:0; max-height:min(42vh,520px); margin:0; padding:0 4px 0 0; overflow-y:auto; overscroll-behavior:contain; list-style:none; counter-reset:none; scrollbar-gutter:stable; }
.briefing-slide-item { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:4px; padding:4px; border:1px solid var(--line); border-radius:var(--ui-radius-small,8px); background:var(--surface); }
.briefing-slide-item.is-selected { border-color:var(--green); box-shadow:inset 3px 0 0 var(--green); }
.briefing-slide-item.is-hidden { opacity:.6; }
.briefing-slide-item__main { display:flex; align-items:center; gap:8px; min-width:0; padding:4px; border:0; color:var(--ink); background:transparent; text-align:left; }
.briefing-slide-item__number { flex:none; display:grid; place-items:center; width:24px; height:24px; border-radius:50%; color:var(--on-accent,#fff); background:var(--green); font-size:11px; font-weight:800; }
.briefing-slide-item__text { display:grid; min-width:0; }
.briefing-slide-item__text strong { overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.briefing-slide-item__text small { color:var(--muted); font-size:11px; }
.briefing-slide-item__actions { display:flex; gap:2px; }
.briefing-slide-item__actions button { display:grid; place-items:center; width:26px; height:26px; padding:0; border:1px solid transparent; border-radius:6px; color:var(--muted); background:transparent; font-size:13px; }
.briefing-slide-item__actions button:hover:not(:disabled) { border-color:var(--line); color:var(--ink); background:var(--surface-2); }
.briefing-slide-item__actions button:disabled { opacity:.3; cursor:default; }
.briefing-slide-item__actions .briefing-slide-item__delete:hover { border-color:color-mix(in srgb, var(--danger,#a33b2f) 55%, var(--line)); color:var(--danger,#a33b2f); background:color-mix(in srgb, var(--danger,#a33b2f) 9%, var(--surface)); }
.briefing-slides__issues { padding:8px 10px; border:1px solid color-mix(in srgb, var(--amber) 55%, var(--line)); border-radius:var(--ui-radius-small,8px); background:color-mix(in srgb, var(--amber) 9%, var(--surface)); font-size:12px; }
.briefing-slides__issues summary { font-weight:700; cursor:pointer; }
.briefing-slides__issues ul { margin:6px 0 0; padding-left:16px; }
.briefing-slides__issues button { padding:2px 0; border:0; color:var(--ink); background:none; text-align:left; text-decoration:underline; }
.briefing-slides__issues .is-error button { color:#a33b2f; }
.briefing-slide-editor { display:grid; align-content:start; gap:10px; min-height:0; padding:12px; overflow:auto; overscroll-behavior:contain; border:1px solid var(--line); border-radius:var(--ui-radius-small,8px); background:var(--surface-2); }
.briefing-slide-editor:empty { display:none; }
.briefing-slide-editor__header { display:flex; align-items:center; justify-content:space-between; }
.briefing-link-button { padding:0; border:0; color:var(--green-2); background:none; font-size:12px; font-weight:700; text-decoration:underline; }
.briefing-camera p { margin:0; color:var(--muted); font-size:12px; font-weight:500; }
.briefing-camera div { display:flex; flex-wrap:wrap; gap:6px; }
.briefing-facts div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px 8px; max-height:180px; overflow:auto; font-weight:500; }
.briefing-facts label { display:flex; align-items:center; gap:6px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.briefing-facts legend, .briefing-stat legend { padding:0 4px; font-size:12px; font-weight:700; }
.briefing-facts, .briefing-stat { margin:0; padding:8px 10px; border:1px solid var(--line); border-radius:var(--ui-radius-small,8px); background:var(--surface); }
.briefing-stat { display:grid; gap:8px; }
.briefing-stat label { display:grid; gap:3px; font-size:11px; font-weight:700; }
.briefing-stat__row { display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:8px; }
.briefing-stat__preview { margin:0; font-size:12px; }
.briefing-stat__preview strong { font-size:20px; }
.briefing-stat__preview small { color:var(--muted); }
.detail-actions .detail-actions__slide { width:auto!important; min-width:0!important; padding:0 10px!important; font-size:12px!important; font-weight:800; }

/* Desktop authoring is a two-pane dock: the briefing outline stays visible on
   the left while the selected slide's settings scroll independently beside it. */
@media (min-width:881px) {
  body.briefing-slides-tab:not(.presentation-workspace-panels-open) #app[data-presentation="briefing"] { --sidebar:clamp(720px,58vw,980px); }
  body.briefing-slides-tab #presentation-dashboard { flex:1 1 auto; min-height:0; overflow:hidden; }
  body.briefing-slides-tab .mode-dashboard--briefing { grid-template-rows:max-content max-content minmax(0,1fr); height:100%; overflow:hidden; }
  body.briefing-slides-tab .briefing-slides-host { height:100%; overflow:hidden; }
  body.briefing-slides-tab .briefing-slides { grid-template-columns:minmax(340px,.9fr) minmax(360px,1.1fr); height:100%; overflow:hidden; }
  body.briefing-slides-tab .briefing-slides__authoring { display:flex; flex-direction:column; overflow:hidden; }
  body.briefing-slides-tab .briefing-slide-list { flex:1 1 220px; max-height:none; }
  body.briefing-slides-tab .briefing-slide-editor { height:100%; }
  /* Features: the same width as Slides, with search and filters on the left and the feature list on the right. */
  body.briefing-features-tab:not(.presentation-workspace-panels-open) #app[data-presentation="briefing"] { --sidebar:clamp(720px,58vw,980px); }
  body.briefing-features-tab:not(.presentation-workspace-panels-open) #presentation-dashboard { flex:1 1 auto; min-height:0; overflow:hidden; }
  body.briefing-features-tab:not(.presentation-workspace-panels-open) .mode-dashboard--briefing { grid-template-columns:minmax(320px,.9fr) minmax(340px,1.1fr); grid-template-rows:max-content max-content max-content max-content minmax(0,1fr); column-gap:16px; align-content:start; height:100%; overflow:hidden; }
  body.briefing-features-tab:not(.presentation-workspace-panels-open) .mode-dashboard--briefing > :is(header,.briefing-tabs) { grid-column:1 / -1; }
  body.briefing-features-tab:not(.presentation-workspace-panels-open) .mode-dashboard--briefing > :is(.briefing-search,.briefing-select,.briefing-location-details) { grid-column:1; }
  body.briefing-features-tab:not(.presentation-workspace-panels-open) .mode-dashboard--briefing > .briefing-location-details { grid-row:5; align-self:start; max-height:100%; overflow:auto; }
  body.briefing-features-tab:not(.presentation-workspace-panels-open) .mode-dashboard--briefing > .briefing-records-fold { grid-column:2; grid-row:3 / -1; display:flex; flex-direction:column; min-height:0; overflow:hidden; }
  body.briefing-features-tab:not(.presentation-workspace-panels-open) .briefing-records-fold > .briefing-records { flex:1 1 auto; min-height:0; max-height:none!important; overflow:auto; }
  body.presentation-workspace-panels-open .presentation-utility .briefing-slides { grid-template-columns:1fr; height:auto; overflow:visible; }
  body.presentation-workspace-panels-open .presentation-utility .briefing-slides__authoring { display:grid; overflow:visible; }
  body.presentation-workspace-panels-open .presentation-utility .briefing-slide-list { max-height:38vh; }
  body.presentation-workspace-panels-open .presentation-utility .briefing-slide-editor { height:auto; overflow:visible; }
}
/* Briefing player. While presenting, the map fills the window and the app's panels step aside. */
body.briefing-presenting .app-shell { grid-template-columns:minmax(0,1fr)!important; }
body.briefing-presenting .map-workspace { grid-column:1/-1; }
body.briefing-presenting :is(.sidebar,.sidebar__open,.utility-panel,.welcome-panel,.insights-overlay,.map-nav-shell,.map-status,.mobile-map-brand,.mobile-panel-nav,.mobile-menu-drawer,.mobile-action-bar,.mobile-map-tool-strip,.mobile-presentation-controls,#briefing-context-host,#mobile-workflow-root,.application-dock,.toast-region) { display:none!important; }
/* Desktop stage: a 16:9 frame; outside it the map is dimmed but still pannable. */
.briefing-stage { position:fixed; z-index:70; inset:0; pointer-events:none; }
.briefing-stage > *:not(.briefing-stage__frame) { pointer-events:auto; }
.briefing-stage__frame { position:absolute; left:50%; top:calc(50% - 34px); display:grid; grid-template-columns:minmax(300px,38%) minmax(0,1fr); width:min(calc(100vw - 64px), calc((100vh - 150px) * 16 / 9)); aspect-ratio:16 / 9; border:2px solid color-mix(in srgb, var(--green) 70%, #fff); border-radius:var(--ui-radius,14px); box-shadow:0 0 0 200vmax rgb(6 18 15 / 52%), 0 20px 60px rgb(0 0 0 / 35%); transform:translate(-50%,-50%); overflow:hidden; }
.briefing-stage__frame.is-full { grid-template-columns:1fr; }
.briefing-stage__panel { min-height:0; overflow:auto; display:grid; align-content:center; background:var(--surface); pointer-events:auto; border-right:1px solid var(--line); }
.briefing-stage__frame.is-full .briefing-stage__panel { border-right:0; padding:0 6%; }
.briefing-stage__window { pointer-events:none; }
.briefing-stage__frame.is-full .briefing-slide { max-width:900px; }
.briefing-stage__frame .briefing-slide { padding:clamp(18px, 3vw, 40px); }
.briefing-stage__frame .briefing-slide h2 { font-size:clamp(24px, 2.6vw, 40px); }
.briefing-stage__frame .briefing-slide--title h2 { font-size:clamp(30px, 3.6vw, 56px); }
.briefing-stage__frame.is-full .briefing-slide__stat strong { font-size:clamp(28px, 3.4vw, 52px); }
.briefing-insight { position:absolute; z-index:2; top:18px; right:18px; width:min(340px, calc(100vw - 36px)); max-height:min(60vh, 520px); overflow:auto; border:1px solid var(--line); border-radius:var(--ui-radius,12px); background:var(--surface); color:var(--ink); box-shadow:var(--shadow); pointer-events:auto; }
.briefing-insight header { display:flex; justify-content:space-between; gap:10px; padding:12px 14px 8px; border-bottom:1px solid var(--line); }
.briefing-insight header > span { display:grid; gap:2px; min-width:0; overflow-wrap:anywhere; }
.briefing-insight small { color:var(--amber); font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.briefing-insight strong { font-size:16px; }
.briefing-insight header span span { color:var(--muted); font-size:12px; }
.briefing-insight header button { flex:none; align-self:start; width:30px; height:30px; border:1px solid var(--line); border-radius:999px; color:var(--ink); background:var(--surface-2); cursor:pointer; }
.briefing-insight dl { margin:0; padding:0 14px 10px; }
.briefing-insight dl div { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); gap:9px; padding:7px 0; border-top:1px solid var(--surface-2); font-size:13px; line-height:1.4; }
.briefing-insight dl div:first-child { border-top:0; }
.briefing-insight dt { color:var(--muted); overflow-wrap:anywhere; }
.briefing-insight dd { min-width:0; margin:0; overflow-wrap:anywhere; }
.briefing-insight p { margin:0; padding:0 14px 12px; color:var(--muted); font-size:12px; }
.briefing-insight--inline { position:static; width:auto; max-height:none; margin-top:6px; box-shadow:none; border-color:var(--green); }
.briefing-insight--inline header { background:var(--surface-2); }
body.briefing-presenting--cards .briefing-insight { top:auto; left:12px; right:12px; bottom:calc(84px + env(safe-area-inset-bottom)); width:auto; max-height:40vh; }
body.briefing-presenting--cards .briefing-insight--inline { position:static; width:auto; max-height:none; margin:6px 0 2px; }
.briefing-stage__controls { position:absolute; left:50%; bottom:18px; display:flex; align-items:center; gap:6px; padding:6px; border:1px solid var(--line); border-radius:999px; background:var(--surface); box-shadow:var(--shadow); transform:translateX(-50%); }
.briefing-stage__controls button { min-width:38px; height:36px; padding:0 12px; border:1px solid var(--line); border-radius:999px; color:var(--ink); background:var(--surface); font-weight:700; cursor:pointer; }
.briefing-stage__controls button[aria-pressed="true"] { border-color:var(--green); color:var(--green-2); background:var(--surface-2); }
.briefing-stage__controls :is([data-stage="previous"],[data-stage="next"]) { border-color:var(--green); color:var(--green); }
.briefing-stage__controls button:disabled { opacity:.35; cursor:default; }
.briefing-stage__controls .briefing-stage__exit { border-color:var(--green); color:var(--on-accent,#fff); background:var(--green); }
.briefing-stage__count { min-width:56px; color:var(--muted); font-size:13px; font-weight:800; text-align:center; }
.briefing-stage__thumbs { position:absolute; left:50%; bottom:72px; display:flex; gap:8px; max-width:calc(100vw - 48px); padding:8px; overflow-x:auto; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:var(--shadow); transform:translateX(-50%); }
.briefing-stage__thumbs[hidden], .briefing-stage__notes[hidden] { display:none; }
.briefing-thumb { display:grid; align-content:start; gap:4px; flex:none; width:150px; aspect-ratio:16 / 9; padding:8px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:var(--surface-2); text-align:left; cursor:pointer; }
.briefing-thumb span { color:var(--green-2); font-size:11px; font-weight:800; }
.briefing-thumb strong { display:-webkit-box; overflow:hidden; font-size:12px; line-height:1.25; -webkit-line-clamp:3; -webkit-box-orient:vertical; }
.briefing-thumb.is-current { border-color:var(--green); box-shadow:inset 0 0 0 1px var(--green); }
.briefing-stage__notes { position:absolute; right:18px; top:18px; display:grid; gap:8px; width:min(360px, calc(100vw - 36px)); max-height:40vh; padding:12px 14px; overflow:auto; border:1px solid var(--line); border-radius:12px; color:var(--ink); background:var(--surface); box-shadow:var(--shadow); font-size:14px; line-height:1.45; }
.briefing-stage__notes header { display:flex; align-items:center; justify-content:space-between; }
.briefing-stage__notes header button { border:0; background:none; font-size:18px; cursor:pointer; }
.briefing-player-settings { position:absolute; z-index:3; left:50%; bottom:72px; display:grid; gap:11px; width:min(360px,calc(100vw - 36px)); padding:14px; border:1px solid var(--line); border-radius:12px; color:var(--ink); background:var(--surface); box-shadow:var(--shadow); transform:translateX(-50%); pointer-events:auto; }
.briefing-player-settings[hidden] { display:none; }
.briefing-player-settings header { display:flex; align-items:start; justify-content:space-between; gap:12px; }
.briefing-player-settings header span { display:grid; gap:2px; }
.briefing-player-settings header small { color:var(--amber); font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.briefing-player-settings header strong { font:700 20px/1.1 var(--ui-heading,Georgia,serif); }
.briefing-player-settings header button { width:30px; height:30px; padding:0; border:0; border-radius:50%; color:var(--ink); background:var(--surface-2); font-size:20px; cursor:pointer; }
.briefing-player-settings > label { display:grid; gap:5px; color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.02em; text-transform:uppercase; }
.briefing-player-settings select { width:100%; min-height:38px; padding:7px 9px; border:1px solid var(--line); border-radius:7px; color:var(--ink); background:var(--surface); font:600 14px var(--ui-font,system-ui,sans-serif); }
.briefing-player-settings select:disabled { opacity:.5; }
.briefing-player-settings > label > small { color:var(--muted); font-size:11px; font-weight:500; letter-spacing:0; line-height:1.35; text-transform:none; }
.briefing-player-settings__check { display:flex!important; grid-template-columns:auto 1fr; align-items:center; gap:8px!important; color:var(--ink)!important; font-size:13px!important; letter-spacing:0!important; text-transform:none!important; }
.briefing-player-settings__check input { inline-size:16px; block-size:16px; accent-color:var(--green); }
/* Phone cards: one full-screen card per slide, snapping vertically; the map shows through the top of map slides. */
.briefing-cards { position:fixed; z-index:70; inset:0; pointer-events:none; }
.briefing-cards__deck { position:absolute; inset:0; overflow-y:auto; overscroll-behavior:contain; scroll-snap-type:y mandatory; pointer-events:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
.briefing-cards__deck::-webkit-scrollbar { display:none; }
.briefing-card { position:relative; display:flex; flex-direction:column; height:100%; scroll-snap-align:start; scroll-snap-stop:always; }
.briefing-card.is-full { background:var(--paper); }
.briefing-card__map { flex:1 1 auto; display:grid; align-items:end; justify-items:center; min-height:0; padding:0 0 14px; border:0; background:linear-gradient(to bottom, rgb(6 18 15 / 30%), transparent 22%); cursor:pointer; }
.briefing-card__map span { padding:6px 12px; border-radius:999px; color:#fff; background:rgb(6 18 15 / 62%); font-size:12px; font-weight:700; backdrop-filter:blur(6px); }
.briefing-card__body { flex:0 1 auto; display:flex; flex-direction:column; max-height:58%; overflow:hidden; padding-bottom:calc(12px + env(safe-area-inset-bottom)); border-radius:18px 18px 0 0; background:var(--surface); box-shadow:0 -12px 30px rgb(17 39 33 / 22%); }
.briefing-card.is-full .briefing-card__body { flex:1 1 auto; max-height:none; justify-content:center; border-radius:0; box-shadow:none; background:var(--paper); }
.briefing-card__content { flex:1 1 auto; min-height:0; overflow:hidden; }
.briefing-card.is-full .briefing-card__content, .briefing-card.is-expanded .briefing-card__content { max-height:none; overflow:auto; }
.briefing-card.is-expanded .briefing-card__body { max-height:85%; }
.briefing-card__more { flex:none; align-self:center; margin:0 0 10px; padding:6px 16px; border:1px solid var(--green); border-radius:999px; color:var(--green); background:var(--surface); font-weight:700; }
.briefing-card .briefing-slide { padding:18px 18px 10px; }
.briefing-card .briefing-slide h2 { font-size:26px; }
.briefing-card .briefing-slide__facts { grid-template-columns:1fr 1fr; }
.briefing-cards__top { position:absolute; top:calc(10px + env(safe-area-inset-top)); left:12px; right:12px; display:flex; align-items:center; justify-content:space-between; pointer-events:none; }
.briefing-cards__top > * { pointer-events:auto; }
.briefing-cards__progress { padding:6px 12px; border-radius:999px; color:#fff; background:rgb(6 18 15 / 66%); font-size:12px; font-weight:800; backdrop-filter:blur(6px); }
.briefing-cards__actions { display:flex; gap:6px; }
.briefing-cards__top button { width:40px; height:40px; border:0; border-radius:50%; color:#fff; background:rgb(6 18 15 / 66%); font-size:22px; backdrop-filter:blur(6px); }
.briefing-cards__hint { position:absolute; left:50%; top:calc(60px + env(safe-area-inset-top)); padding:6px 12px; border-radius:999px; color:#fff; background:rgb(6 18 15 / 62%); font-size:12px; font-weight:700; transform:translateX(-50%); pointer-events:none; animation:briefing-hint 2.4s ease-in-out 2; }
@keyframes briefing-hint { 50% { transform:translate(-50%, -6px); } }
@media (prefers-reduced-motion: reduce) { .briefing-cards__hint { animation:none; } }
.briefing-cards__done { position:absolute; left:50%; bottom:calc(20px + env(safe-area-inset-bottom)); min-height:46px; padding:0 22px; border:0; border-radius:999px; color:var(--on-accent,#fff); background:var(--green); box-shadow:var(--shadow); font-weight:800; transform:translateX(-50%); pointer-events:auto; }
.briefing-cards__done[hidden] { display:none; }
body.briefing-exploring .briefing-cards__deck, body.briefing-exploring .briefing-cards__hint { display:none; }
.briefing-slide { display:grid; gap:10px; padding:20px 22px; color:var(--ink); }
.briefing-slide__eyebrow { color:var(--green-2); font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.briefing-slide h2 { margin:0; font:700 clamp(22px, 3vw, 30px)/1.1 var(--ui-heading, Georgia, serif); }
.briefing-slide--title h2 { font-size:clamp(28px, 4vw, 40px); }
.briefing-slide__subtitle { margin:0; color:var(--muted); font-size:15px; }
.briefing-slide__text { font-size:14px; line-height:1.5; }
.briefing-slide__text > :first-child { margin-top:0; }
.briefing-slide__text > :last-child { margin-bottom:0; }
.briefing-slide__facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 16px; margin:0; }
.briefing-slide__facts div { display:grid; gap:2px; padding-bottom:6px; border-bottom:1px solid var(--line); }
.briefing-slide__facts dt { color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.briefing-slide__facts dd { margin:0; font-size:14px; font-weight:600; }
.briefing-slide__stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:10px; }
.briefing-slide__stat { display:grid; gap:2px; padding:12px; border-radius:var(--ui-radius-small,8px); background:var(--surface-2); }
.briefing-slide__stat strong { color:var(--green-2); font:800 28px/1 var(--ui-font); }
.briefing-slide__stat span { font-size:12px; font-weight:700; }
.briefing-slide__stat small { color:var(--muted); font-size:10px; }
.briefing-slide__list { margin:0; padding-left:20px; font-size:14px; line-height:1.5; }
.briefing-slide__links { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
.briefing-slide__links a { padding:6px 10px; border:1px solid var(--green); border-radius:999px; color:var(--green-2); font-size:13px; font-weight:700; text-decoration:none; }
.briefing-slide__warning { margin:0; padding:8px 10px; border-radius:var(--ui-radius-small,8px); color:#7a2e24; background:#fbe9e5; font-size:12px; }
@media (max-width: 640px), (max-width: 880px) and (orientation: portrait) {
  .briefing-slide__facts { grid-template-columns:1fr; }
}
.briefing-context { position:fixed; z-index:11; top:210px; right:18px; width:min(380px,calc(100vw - var(--sidebar) - 36px)); max-height:calc(100vh - 228px); overflow:auto; backdrop-filter:blur(16px); background:color-mix(in srgb,var(--surface) 94%,transparent)!important; }
body.map-tools-collapsed .briefing-context { top:18px; max-height:calc(100vh - 36px); }
body.application-right-open .briefing-context { right:calc(var(--application-right-width, 380px) + 18px); width:min(380px,calc(100vw - var(--sidebar) - var(--application-right-width, 380px) - 42px)); }
body[data-briefing-context-dock="right"] #viewDiv { right:400px; } body[data-briefing-context-dock="right"] .briefing-context { top:0; right:0; width:400px; height:100%; max-height:none; border-radius:0; } body.application-right-open[data-briefing-context-dock="right"] .briefing-context { right:var(--application-right-width, 380px); }
body[data-briefing-context-dock="left"] #viewDiv { left:400px; } body[data-briefing-context-dock="left"] .briefing-context { top:0; left:var(--sidebar); right:auto; width:400px; height:100%; max-height:none; border-radius:0; }
body[data-briefing-context-dock="top"] #viewDiv { top:300px; } body[data-briefing-context-dock="top"] .briefing-context { top:0; right:0; left:var(--sidebar); width:auto; height:300px; max-height:none; border-radius:0; }
body[data-briefing-context-dock="bottom"] #viewDiv { bottom:300px; } body[data-briefing-context-dock="bottom"] .briefing-context { top:auto; right:0; bottom:0; left:var(--sidebar); width:auto; height:300px; max-height:none; border-radius:0; }
body.sidebar-collapsed[data-briefing-context-dock="left"] .briefing-context,
body.sidebar-collapsed[data-briefing-context-dock="top"] .briefing-context,
body.sidebar-collapsed[data-briefing-context-dock="bottom"] .briefing-context { left:0; }
.briefing-location-details { display:grid; gap:7px; padding:10px; border:1px solid var(--line); border-radius:var(--ui-radius-small); background:var(--surface-2); }.briefing-location-details p { margin:0; color:var(--muted); font-size:11px; line-height:1.4; }.briefing-coordinates { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; align-items:center; }.briefing-coordinates code { display:block; padding:7px; overflow-wrap:anywhere; border:1px solid var(--line); background:var(--surface); user-select:all; }.briefing-coordinates button { padding:7px; border:1px solid var(--green); color:var(--green); background:var(--surface); cursor:pointer; }
.context-settings-button { position:absolute; top:8px; right:8px; width:30px; height:30px; padding:0!important; border:1px solid var(--line)!important; border-radius:50%!important; color:var(--muted)!important; background:var(--surface)!important; font-size:15px!important; }
.briefing-context .detail-actions button { display:grid; place-items:center; min-width:34px; min-height:34px; padding:0; font-size:17px; }.briefing-settings { display:grid; gap:14px; }.briefing-settings fieldset { display:grid; gap:7px; margin:0; padding:10px; border:1px solid var(--line); }.briefing-settings legend { color:var(--muted); font-size:10px; font-weight:700; text-transform:uppercase; }.briefing-settings label { font-size:12px; }
.mode-dashboard > header { position:relative; }.presentation-dock-button { position:absolute; top:0; right:0; width:30px; height:30px; padding:0; border:0; color:var(--muted); background:transparent; cursor:pointer; font-size:22px; line-height:1; }.presentation-dock-button:hover { color:var(--green); background:var(--surface-2); }.atlas-present-action button { width:100%; padding:8px 10px; border:1px solid var(--green); border-radius:6px; color:white; background:var(--green); cursor:pointer; font-weight:700; }
.tour-share-card { display:grid; gap:10px; margin-top:12px; }
.tour-share-card canvas { display:block; width:min(100%,320px); height:auto; margin:0 auto; border:1px solid var(--line); border-radius:14px; background:#082f2b; box-shadow:0 10px 28px rgb(17 39 33 / 18%); }
.tour-share-card__status { margin:0; color:var(--muted); font-size:10px; text-align:center; }
.tour-share-options { display:grid; gap:7px; margin:12px 0; padding:0; border:0; }
.tour-share-options legend { margin-bottom:5px; font-size:11px; font-weight:700; }
.tour-share-options label { display:grid; grid-template-columns:auto 1fr; gap:9px; align-items:start; padding:10px; border:1px solid var(--line); border-radius:var(--ui-radius-small); background:var(--surface-2); cursor:pointer; }
.tour-share-options label:has(input:checked) { border-color:var(--green-2); box-shadow:0 0 0 1px var(--green-2); }
.tour-share-options span { display:grid; gap:2px; }
.tour-share-options small { color:var(--muted); font-size:10px; line-height:1.35; }
.tour-embed { margin-top:10px; padding:10px; border:1px solid var(--line); border-radius:var(--ui-radius-small); background:var(--surface-2); }
.tour-embed summary { cursor:pointer; font-weight:700; }
.tour-embed textarea { width:100%; margin:8px 0; padding:8px; border:1px solid var(--line); border-radius:5px; color:var(--ink); background:var(--surface); font:11px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace; resize:vertical; }
.tour-embed button { padding:7px 9px; border:1px solid var(--green); border-radius:5px; color:var(--green); background:var(--surface); cursor:pointer; }

/* A tour-only link is a purpose-built viewer: the map, story, and playback
   remain, while every authoring or general GIS entry point is removed. */
body.shared-tour-only .app-shell { grid-template-columns:minmax(0,1fr)!important; }
body.shared-tour-only :is(.sidebar,.sidebar__open,.mobile-panel-nav,.mobile-menu-drawer,.mobile-map-brand,.map-nav-shell,.welcome-panel,.map-status,.insights-overlay,.utility-panel,.application-dock,.application-edit-return) { display:none!important; }
body.shared-tour-only .map-workspace { grid-column:1/-1; }
body.shared-tour-only .atlas-tour-exit { display:none!important; }
/* Embeds are viewers, not compact copies of the authoring workspace. The map
   stays interactive, including native engine navigation, but project editing
   controls do not appear inside someone else's page. */
body.shared-embed .app-shell { grid-template-columns:minmax(0,1fr)!important; }
body.shared-embed :is(.studio-header,.workspace-rail,.sidebar,.sidebar__open,.mobile-panel-nav,.mobile-menu-drawer,.mobile-map-brand,.welcome-panel,.map-status,.insights-overlay,.utility-panel,.application-dock,.application-edit-return,.toast-region) { display:none!important; }
body.shared-embed .map-workspace { grid-column:1/-1; }
body.shared-embed .mobile-map-tool-strip { display:none!important; }
/* Dataset Studio's private viewer is intentionally map-only: no authoring chrome,
   saved project controls, or data-management controls inside the iframe. */
body.si-preview-embed .map-workspace { border-radius:0; }
/* The Query Console places its own tools over the map. */
body.si-console-embed .map-workspace { border-radius:0; }
body.si-console-embed :is(.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right) { display:none; }
.si-embed-rail { position:absolute; z-index:30; top:14px; left:14px; display:none; gap:6px; padding:6px; border:1px solid color-mix(in srgb,var(--line) 82%,white); border-radius:12px; background:rgb(255 255 255 / 92%); box-shadow:0 8px 24px rgb(29 16 61 / 16%); backdrop-filter:blur(10px); }
.si-embed-rail button { display:grid; width:38px; height:38px; place-items:center; padding:0; border:0; border-radius:8px; color:var(--green); background:transparent; cursor:pointer; }
.si-embed-rail button:hover,.si-embed-rail button:focus-visible { color:white; background:var(--purple); outline:none; }
.si-embed-rail svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
body.si-preview-embed .si-embed-rail { display:grid; }
@media (max-width:640px) { .si-embed-rail { top:8px; left:8px; gap:4px; padding:4px; } .si-embed-rail button { width:34px; height:34px; } }
.presentation-utility #presentation-dashboard { margin:0; padding:10px 12px 16px; }.bookmark-editor-list { display:grid; gap:10px; max-height:52vh; overflow:auto; }.bookmark-editor { display:grid; gap:7px; padding:10px; border:1px solid var(--line); border-radius:var(--ui-radius-small); background:var(--surface-2); }.bookmark-editor__coordinates { display:grid; grid-template-columns:1fr 1fr; gap:7px; }.bookmark-editor__coordinates label { display:grid; gap:3px; color:var(--muted); font-size:10px; font-weight:700; }.bookmark-editor__coordinates input { min-width:0; padding:7px; border:1px solid var(--line); color:var(--ink); background:var(--surface); }
.briefing-context h4 { margin:8px 0 4px; }.briefing-context section { padding-top:7px; border-top:1px solid var(--line); }.context-tabs { display:flex; flex-wrap:wrap; gap:4px; }.context-tabs span { padding:4px 6px; color:var(--muted); background:var(--surface); border:1px solid var(--line); font-size:8px; text-transform:uppercase; }.context-settings { display:grid; grid-template-columns:1fr 1fr; gap:5px; }.context-settings label { color:var(--muted); font-size:9px; }.context-settings input,.context-settings select { width:100%; padding:5px; border:1px solid var(--line); color:var(--ink); background:var(--surface); }.context-fact { display:block!important; width:100%; margin:3px 0; text-align:left; }
.explorer-histogram button:hover span, .explorer-histogram button:focus-visible span { outline: 2px solid var(--green); outline-offset: 1px; }
.explorer-range { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.explorer-range label { display: grid; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 700; }
.explorer-range input { width: 100%; padding: 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--surface); }
.explorer-legend { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; }
.explorer-legend i { width: 10px; height: 10px; border-radius: 50%; background: #2f7f9d; }.explorer-legend i:nth-of-type(2) { background: #e0ad35; }.explorer-legend i:nth-of-type(3) { background: #b23f62; }.explorer-legend i.is-missing { background: #9ca3a0; }
.explorer-results .mode-record { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.explorer-results .mode-record strong, .explorer-results .mode-record small { grid-column: 1; }
.explorer-results .mode-record span { grid-column: 2; grid-row: 1 / span 2; color: var(--green-2); font-weight: 700; }
.explorer-details .explorer-measurement { color: var(--green-2); font-size: 22px; font-weight: 700; }
.explorer-details > a { color: var(--green-2); font-size: 11px; font-weight: 700; }
.explorer-details details { border-top: 1px solid var(--line); padding-top: 7px; }
.explorer-details summary { cursor: pointer; font-size: 11px; font-weight: 700; }
.explorer-details details dl { margin-top: 8px; max-height: 250px; overflow: auto; }
.explorer-limitation { margin: 0; padding: 9px; border-left: 3px solid var(--amber); color: var(--muted); background: var(--surface-2); font-size: 10px; line-height: 1.45; }
.mode-records { display: grid; max-height: min(38vh, 360px); overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.mode-record { display: grid; gap: 3px; padding: 10px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.mode-record:last-child { border-bottom: 0; }
.mode-record:hover, .mode-record.is-selected { background: var(--surface-2); box-shadow: inset 3px 0 var(--green-2); }
.mode-record small { color: var(--muted); }
.mode-details { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.mode-details h3 { margin: 0; font: 600 19px/1.15 "Newsreader", Georgia, serif; }
.mode-details p { margin: 0; color: var(--muted); font-size: 12px; }
.mode-details dl { display: grid; gap: 5px; margin: 0; }
.mode-details dl div { display: grid; grid-template-columns: minmax(90px, .8fr) 1.2fr; gap: 8px; padding-bottom: 5px; border-bottom: 1px solid var(--line); font-size: 11px; }
.mode-details dt { color: var(--muted); }.mode-details dd { margin: 0; overflow-wrap: anywhere; }
.atlas-playback-mode, .atlas-skin-control, .atlas-title-control { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 700; }
.atlas-playback-mode select, .atlas-skin-control select, .atlas-title-control input { min-width: 0; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); }
.atlas-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.atlas-actions button, .atlas-chapter div button { min-width: 0; padding: 8px 10px; border: 1px solid var(--green); border-radius: 6px; color: var(--green); background: var(--surface); cursor: pointer; font-size: 11px; }
.atlas-actions button:first-child { color: white; background: var(--green); font-weight: 700; }
.atlas-actions [data-atlas-capture] { color: white; background: var(--green); }
.atlas-settings { display: grid; gap: 14px; }
.atlas-settings .field { margin: 0; }
.atlas-chapter { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); }.atlas-chapter > button { display: grid; grid-template-columns: 22px 1fr; gap: 2px 8px; border: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }.atlas-chapter > button span { grid-row: span 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: white; background: var(--green-2); font-size: 10px; }.atlas-chapter small { grid-column: 2; color: var(--muted); }
.atlas-geocoder { margin: 2px 0 15px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.atlas-geocoder .field { margin-bottom: 8px; }
.atlas-geocoder__search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.atlas-geocoder__search input, .atlas-camera-fields input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); }
.atlas-geocoder__search button, .atlas-reverse-place button { padding: 8px 10px; border: 1px solid var(--green); border-radius: 6px; color: var(--green); background: var(--surface); cursor: pointer; }
.atlas-place-results { display: grid; gap: 3px; max-height: 180px; margin-bottom: 9px; overflow: auto; }
.atlas-place-results[hidden] { display: none; }
.atlas-place-results button { padding: 8px; border: 0; border-radius: 5px; color: var(--ink); background: var(--surface); text-align: left; cursor: pointer; }
.atlas-place-results button[aria-selected="true"] { color:white; background:var(--green); }
.atlas-place-results p { margin: 5px; color: var(--muted); font-size: 11px; }
.atlas-reverse-place { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; }
.atlas-reverse-place > span { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.atlas-reverse-place output { grid-column: 1; font-size: 11px; line-height: 1.4; }
.atlas-reverse-place button { grid-column: 2; grid-row: 1 / span 2; }
.atlas-camera-fields, .atlas-layer-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; margin: 0 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.atlas-chapter-advanced { margin-top:12px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); }
.atlas-chapter-advanced > summary { padding:11px 12px; color:var(--ink); cursor:pointer; font-weight:700; }
.atlas-chapter-advanced__content { padding:2px 12px 12px; }
.atlas-camera-fields legend, .atlas-layer-fields legend { padding: 0 6px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.atlas-camera-fields label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.atlas-layer-fields { grid-template-columns: 1fr; max-height: 190px; overflow: auto; }
.atlas-layer-choice { display: flex; align-items: center; gap: 8px; font-size: 11px; cursor: pointer; }
.atlas-layer-choice input { accent-color: var(--green-2); }
.presentation-empty { display: grid; gap: 10px; margin-top: 18px; padding: 16px; border: 1px dashed var(--line); border-radius: 9px; background: var(--surface-2); }
.presentation-empty div { display: flex; flex-wrap: wrap; gap: 6px; }.presentation-empty button { padding: 8px 10px; border: 1px solid var(--green); border-radius: 6px; color: white; background: var(--green); cursor: pointer; font-size: 11px; }
#app[data-presentation="briefing"] { --sidebar: clamp(340px, 27vw, 430px); }
#app[data-presentation="briefing"] .sidebar__scroll { display: flex; flex-direction: column; }
#app[data-presentation="briefing"] #intelligence-panel { order: -2; border-left: 4px solid var(--amber); }
#app[data-presentation="briefing"] #layers-panel { order: -1; }
#app[data-presentation="explorer"] { --sidebar: clamp(390px, 30vw, 480px); }
#app[data-presentation="explorer"] .sidebar__scroll { display: flex; flex-direction: column; }
#app[data-presentation="explorer"] #layers-panel { order: -3; }
#app[data-presentation="explorer"] #places-panel { order: -2; }
#app[data-presentation="atlas"] { --sidebar: clamp(340px, 28vw, 450px); }
#app[data-presentation="atlas"] .sidebar__scroll { display: flex; flex-direction: column; }
#app[data-presentation="atlas"] #bookmarks-panel { order: -3; border-left: 4px solid var(--amber); }
#app[data-presentation="atlas"] #places-panel { order: -2; }
@media (min-width: 881px), (min-width: 641px) and (orientation: landscape) {
  #app[data-presentation="briefing"] #bookmarks-panel,
  #app[data-presentation="briefing"] #draw-panel,
  #app[data-presentation="explorer"] #bookmarks-panel,
  #app[data-presentation="explorer"] #draw-panel,
  #app[data-presentation="atlas"] #draw-panel { display: none; }
  body.presentation-workspace-panels-open #app[data-presentation] .sidebar__scroll > .panel[data-presentation-hidden] { display: block; }
}
@media (max-width: 640px), (max-width: 880px) and (orientation: portrait) {
  /* One docked row above the bottom navigation: map tools on the Map route,
     the workflow's own actions in Briefing and Tours. Sheets sit flush on it. */
  body.mobile-map-route .mobile-map-tool-strip,
  .mobile-action-bar {
    position: fixed;
    z-index: 63;
    right: 0;
    bottom: calc(64px + env(safe-area-inset-bottom));
    left: 0;
    box-sizing: border-box;
    height: 60px;
    display: grid;
    gap: 6px;
    padding: 5px 8px;
    overflow: hidden;
    border-top: 1px solid var(--line);
    background: var(--paper);
  }
  body.mobile-map-route .mobile-map-tool-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
  .mobile-action-bar { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center; }
  .mobile-action-bar[hidden] { display: none; }
  .mobile-action-bar button { height: 46px; min-width: 0; padding: 4px 6px; border: 1px solid var(--green); border-radius: 9px; color: var(--green); background: var(--surface); font: 700 14px/1.1 var(--ui-font); cursor: pointer; }
  .mobile-action-bar button.is-primary { color: var(--on-accent, #fff); background: var(--green); }
  .mobile-action-bar button:disabled { opacity: .45; }
  body.mobile-action-bar-open #presentation-dashboard :is(.atlas-actions, .presentation-empty > div) { display: none; }
  .mobile-map-tool-strip button { display:grid; min-width:0; place-items:center; gap:3px; min-height:48px; padding:5px 1px; border:0; border-radius:9px; color:var(--green-2); background:transparent; }
  .mobile-map-tool-strip button svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
  .mobile-map-tool-strip button.is-active { color:white; background:var(--green); }
  .mobile-map-tool-strip small { min-width:0; max-width:100%; overflow:hidden; font:600 10px/1 var(--ui-font); text-overflow:ellipsis; }
  body.mobile-menu-open :is(.mobile-map-tool-strip,.mobile-action-bar), body.mobile-workflow-open .mobile-map-tool-strip, body.mobile-atlas-presenting :is(.mobile-map-tool-strip,.mobile-action-bar) { display:none; }
  body.mobile-workflow-open:not(.mobile-action-bar-open) .mobile-action-bar { display:none; }
  /* Task screens hand their main buttons to the docked bar and end just above it. */
  body.mobile-action-bar-open :is(.mobile-workflow, .briefing-slides-host) [data-mobile-bar] { display:none; }
  body.mobile-action-bar-open .mobile-workflow:not([hidden]) { bottom:calc(124px + env(safe-area-inset-bottom)); }
  body.mobile-workflow-open .mobile-presentation-controls { display:none!important; }
  .skin-picker { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
  .skin-card { grid-template-columns:1fr; gap:4px; padding:8px; }
  .skin-card .skin-mini { grid-row:auto; width:100%; height:38px; }
  .presentation-compact-header { grid-template-columns:1fr; }.presentation-compact-header .eyebrow { grid-column:auto; }
  .compact-dataset select { max-width:none; width:100%; }
  .explorer-counts:has(button) { grid-template-columns:1fr 1fr; }
  .briefing-search { grid-template-columns:minmax(0,1fr) 34px; } .briefing-search > label:first-child { grid-column:1/-1; }
  .briefing-context { position:static; width:auto; max-height:none; }
  .results-row { grid-template-columns:minmax(110px,1.5fr) minmax(70px,1fr); }.results-row span:last-child { display:none; }
  #app[data-presentation="explorer"] #presentation-dashboard,
  #app[data-presentation="briefing"] #presentation-dashboard { margin-inline:8px; }
}
#viewDiv { position: absolute; inset: 0; }
.welcome-panel { position: absolute; z-index: 5; top: 50%; left: 50%; width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; transform: translate(-50%, -50%); padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.welcome-panel[hidden] { display: none; }
.welcome-panel__close { position: absolute; top: 10px; right: 11px; width: 30px; height: 30px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; cursor: pointer; font-size: 21px; line-height: 1; }
.welcome-panel__close:hover { color: var(--ink); background: var(--surface-2); }
.welcome-panel h1 { margin: 4px 0 8px; color: var(--ink); font: 600 27px/1.1 "Newsreader", Georgia, serif; }
.welcome-panel p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.welcome-panel__actions { display: grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:7px; margin-top:15px; }
.welcome-panel__actions :is(a, button) { display:flex; align-items:center; justify-content:center; min-height:38px; padding:8px 10px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:var(--surface-2); cursor:pointer; font:600 12px/1.3 var(--ui-font, sans-serif); text-align:center; text-decoration:none; }
.welcome-panel__actions button { border-color:var(--green); color:white; background:var(--green); }
.welcome-panel__actions :is(a, button):hover { border-color:var(--green-2); color:var(--green-2); }
.welcome-panel__actions button:hover { color:white; background:var(--green-2); }
.welcome-panel__actions :is(a, button):focus-visible { outline:2px solid var(--green-2); outline-offset:2px; }
.welcome-panel__preference { display:flex; align-items:center; gap:7px; margin-top:15px; color:var(--muted); font-size:11px; cursor:pointer; }
.welcome-panel__resources { margin-top: 12px !important; font-size: 11px !important; }
.welcome-panel__resources a { color: var(--green); font-weight: 700; }
.example-guide { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 12px; padding:11px; border:1px solid var(--line); border-left:3px solid var(--amber); border-radius:8px; background:var(--surface-2); }
.example-guide > div { min-width:0; }
.example-guide .eyebrow { display:block; margin-bottom:2px; }
.example-guide strong { display:block; font-size:13px; }
.example-guide p { margin:3px 0 0; color:var(--muted); font-size:11px; line-height:1.4; }
.example-guide:has(.example-guide__close) { position:relative; padding-right:30px; }
.example-guide .example-guide__close { position:absolute; top:4px; right:4px; min-width:0; min-height:0; padding:2px 7px; border:0; background:none; color:var(--muted); font-size:18px; line-height:1; }
.example-guide .example-guide__close:hover { color:var(--ink); }
.example-guide button { flex:0 0 auto; min-height:32px; padding:6px 9px; border:1px solid var(--green); border-radius:6px; color:white; background:var(--green); font:700 11px/1.2 var(--ui-font, sans-serif); cursor:pointer; }
.example-guide button:hover { background:var(--green-2); }
.map-nav-shell { position:absolute; z-index:8; top:18px; right:18px; display:grid; justify-items:stretch; gap:5px; }
.map-nav { display: grid; grid-template-columns: repeat(2, 38px); gap: 5px; }
.map-nav button, .map-button { width: 38px; height: 38px; font-size: 19px; box-shadow: 0 6px 20px rgb(20 46 39 / 18%); }
.map-nav__toggle { width:100%; height:24px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:var(--surface); box-shadow:0 4px 14px rgb(20 46 39 / 16%); cursor:pointer; font-size:17px; line-height:1; }
body.map-tools-collapsed :is(.map-nav,.globe-top-nav) { display:none!important; }
body.map-tools-collapsed .map-nav-shell { justify-items:end; }
body.map-tools-collapsed .map-nav__toggle { width:38px; height:32px; }
.sidebar__open { display: none; position: absolute; z-index: 9; top: 18px; left: 18px; }
.sidebar__open[hidden] { display:none!important; }
.map-status { position: absolute; z-index: 7; right: 12px; bottom: 24px; padding: 6px 9px; border-radius: 4px; color: white; background: rgb(18 63 53 / 86%); backdrop-filter: blur(8px); font-size: 10px; letter-spacing: .02em; pointer-events: none; }
.insights-overlay { position: absolute; z-index: 8; top: 18px; left: 18px; width: min(390px, calc(100% - 36px)); max-height: calc(100% - 70px); overflow: auto; border: 1px solid rgb(255 255 255 / 30%); border-radius: 12px; background: var(--surface-glass); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.insights-resizer { display: none; position: absolute; z-index: 3; touch-action: none; }
body.sidebar-collapsed[data-insights-position="upper-left"] .insights-overlay { left: 70px; }
body[data-insights-position="lower-left"] .insights-overlay { top: auto; bottom: 54px; }
body[data-insights-position="bottom"] .insights-overlay { inset: auto 14px 14px; width: auto; max-height: min(44vh, 470px); }
/* The title scrolls away with the attributes; the feature tabs stay pinned at the top. */
.insights-overlay > header { display: flex; justify-content: space-between; align-items: start; padding: 16px; border-bottom: 1px solid var(--line); background: var(--surface-glass); }
.insights-actions { display: flex; gap: 4px; }
.insights-expand-button { display: none; }
.insights-expand-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.insights-expanded .insights-expand-button .icon-expand, body:not(.insights-expanded) .insights-expand-button .icon-collapse { display: none; }
.insights-ai-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.insights-overlay h2 { margin: 2px 0 0; font: 600 20px/1.15 "Newsreader", Georgia, serif; }
#insights-content { padding: 0 14px 16px; }
#insights-content > .insight-tabs { position: sticky; top: 0; z-index: 1; margin: 0 -14px; padding: 8px 14px; background: var(--surface-glass); }
:root:not([data-skin="gismap"]) #insights-content > .insight-tabs { background: var(--surface); }
.insight-tabs { display: flex; gap: 5px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: thin; }
.insight-tabs button { flex: 0 0 auto; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 10px; }
.insight-tabs button[aria-selected="true"] { border-color: var(--green); background: var(--green); color: white; }
.insight-tabs button.is-isolated-muted { opacity: .42; filter: grayscale(1); }
.insight-tabs button.is-isolated-muted:hover { opacity: .72; }
.insight-panel { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; }
.insight-panel > header { display: flex; justify-content: space-between; gap: 10px; padding: 10px; }
.insight-panel > header > span { display: grid; }
.insight-panel > header strong { font-size: 12px; }
.insight-panel > header small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.insight-ai-select { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.insight-ai-select input { accent-color: var(--green-2); }
.insight-panel dl { margin: 0; padding: 0 10px 10px; }
.insight-panel dl div { display: grid; grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr); gap: 9px; padding: 5px 0; border-top: 1px solid var(--surface-2); font-size: 10px; }
.insight-panel dt { color: var(--muted); overflow-wrap: anywhere; }
.insight-panel dd { margin: 0; overflow-wrap: anywhere; }
.eyebrow { color: var(--amber); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; }
.toast-region { position: absolute; z-index: 50; left: 18px; bottom: 22px; display: grid; gap: 7px; pointer-events: none; }
.toast { max-width: 350px; padding: 10px 13px; border-radius: 7px; color: white; background: var(--green); box-shadow: var(--shadow); font-size: 12px; animation: toast-in 180ms ease-out; }
.toast--error { background: var(--danger); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.loading-row { display: flex; align-items: center; gap: 8px; padding: 12px 0; color: var(--muted); font-size: 12px; }
.loading-row span { width: 13px; height: 13px; border: 2px solid var(--line); border-top-color: var(--green-2); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

dialog { padding: 0; color: var(--ink); border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(12 28 23 / 48%); backdrop-filter: blur(3px); }
.app-dialog { width: min(580px, calc(100% - 32px)); }
.utility-dialog-content { min-height:0; height:100%; overflow:hidden; }
.utility-dialog-content .app-dialog--docked[open] { position: static; inset: auto; z-index: auto; display: grid; min-width: 0; min-height: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.app-dialog--docked .dialog__shell { min-height:0; height:100%; max-height:none; overflow:hidden; grid-template-rows:minmax(0,1fr) auto; }
.app-dialog--docked .dialog__header { display: none; }
.app-dialog--docked .dialog__content { min-height:0; overflow-y:auto; overscroll-behavior:contain; }
.app-dialog--docked .dialog__actions { position:sticky; bottom:0; padding-top:12px; background:var(--paper); border-top:1px solid var(--line); }
.dialog__shell { display: grid; max-height: min(760px, calc(100vh - 50px)); margin: 0; }
/* The Cinematic guide's setup: a non-modal panel floating over the map, clear of the guide card (right). */
.app-dialog--floating[open] { position:fixed; z-index:1000; inset:72px auto auto 72px; width:clamp(360px, calc(100vw - 500px), 540px); max-width:none; max-height:calc(100dvh - 96px); margin:0; padding:0; border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 36px rgb(17 39 33 / 26%); }
.app-dialog--floating .dialog__shell { max-height:calc(100dvh - 96px); grid-template-rows:auto minmax(0, 1fr) auto; }
.app-dialog--floating .dialog__content { min-height:0; overflow-y:auto; overscroll-behavior:contain; }
@media (max-width: 960px) { .app-dialog--floating[open] { inset:72px auto auto 16px; width:min(540px, calc(100vw - 32px)); max-height:calc(100dvh - 330px); } .app-dialog--floating .dialog__shell { max-height:calc(100dvh - 330px); } }
.dialog__header { display: flex; justify-content: space-between; align-items: start; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.dialog__header h2 { margin: 3px 0 0; font: 600 27px/1.1 "Newsreader", Georgia, serif; }
.dialog__content { padding: 20px 22px; overflow: auto; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 7px; min-height: 0; padding: 0 22px 20px; }
.dialog__actions:empty { display: none; }
.dialog__actions .button--primary { color: white; border-color: var(--green); background: var(--green); }
.dialog__actions button:disabled { opacity: .6; cursor: wait; }
.display-choices { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.display-choices legend { margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.display-choices--docked { margin-top: 16px; }
.display-choice { display: flex; align-items: start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.display-choice:has(input:checked) { border-color: var(--green-2); box-shadow: inset 0 0 0 1px var(--green-2); }
.display-choice input { margin-top: 3px; accent-color: var(--green-2); }
.display-choice span { display: grid; gap: 2px; }
.display-choice small { color: var(--muted); }
.display-basemap { margin-top: 18px; }
.display-checkbox { display: flex; align-items: center; gap: 8px; margin-top: 11px; font-size: 12px; cursor: pointer; }
.display-checkbox input { accent-color: var(--green-2); }
.display-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feedback-settings { display: grid; gap: 9px; margin: 18px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.feedback-settings legend { padding: 0 6px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.feedback-settings .display-checkbox { margin-top: 0; }
.highlight-color { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.highlight-color input { width: 38px; height: 28px; padding: 2px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.highlight-color output { color: var(--muted); font-family: ui-monospace, monospace; font-size: 10px; }
@media (max-width: 720px) { .display-settings-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field[hidden] { display: none; }
.workspace-tool .field[hidden], .workspace-tool [data-extrusion-options][hidden] { display: none !important; }
.workspace-tool input[type="color"] { height: 42px; min-height: 42px; padding: 4px; cursor: pointer; }
.workspace-tool input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.workspace-tool input[type="color"]::-webkit-color-swatch { border: 1px solid var(--line); border-radius: 4px; }
.workspace-tool input[type="color"]::-moz-color-swatch { border: 1px solid var(--line); border-radius: 4px; }
.field > span { font-size: 11px; font-weight: 700; }
.field small { color: var(--muted); font-weight: 400; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-note { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.connection-actions { display:flex; flex-wrap:wrap; gap:8px; }
.connection-actions button, .connection-browser button, .connection-panel input[type="file"]::file-selector-button { min-height:40px; padding:8px 12px; border:1px solid var(--line); border-radius:var(--ui-radius-small, 6px); color:var(--ink); background:var(--surface); font:600 12px/1.25 var(--ui-font, sans-serif); cursor:pointer; }
.connection-actions .button--primary { color:var(--on-accent, #fff); background:var(--green); border-color:var(--green); }
.connection-actions button:not(:disabled):hover, .connection-browser button:not(:disabled):hover, .connection-panel input[type="file"]::file-selector-button:hover { border-color:var(--green-2); }
.connection-actions button:focus-visible, .connection-browser button:focus-visible, .connection-panel input:focus-visible { outline:2px solid var(--green-2); outline-offset:2px; }
.connection-actions button:disabled, .connection-browser button:disabled { opacity:.6; cursor:wait; }
.connection-panel { display:grid; gap:16px; }
.connection-panel > .form-note { margin:0; }
.connection-group { padding-top:14px; border-top:1px solid var(--line); }
.connection-group h3 { margin:0 0 12px; font:700 14px/1.3 var(--ui-font, sans-serif); }
.connection-panel input[type="file"] { padding:6px; font:inherit; }
.connection-panel input[type="file"]::file-selector-button { margin-right:10px; }
.connection-panel pre:empty { display:none; }
.connection-browser { margin-top:18px; border-top:1px solid var(--line); padding-top:14px; }
.connection-browser h3 { margin:0 0 12px; }
.connection-browser__controls { display:grid; grid-template-columns:2fr 1fr 1fr; gap:10px; }
.connection-browser__controls .field { min-width:0; margin:0; }
.connection-browser__list { display:grid; gap:7px; max-height:340px; overflow:auto; margin:10px 0 0; padding:0; list-style:none; }
.connection-browser__item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.connection-browser__info { display:grid; gap:3px; min-width:0; overflow-wrap:anywhere; }
.connection-browser__info small { color:var(--muted); }
.connection-browser__badge { font-weight:700; }
.connection-browser__item button { flex:none; }
.connection-browser__empty { padding:12px; color:var(--muted); }
.connection-browser__preview { max-height:260px; overflow:auto; padding:12px; border:1px solid var(--line); background:var(--surface); white-space:pre-wrap; overflow-wrap:anywhere; }
@media (max-width: 600px) { .connection-browser__controls { grid-template-columns:1fr 1fr; } .connection-browser__controls .field:first-child { grid-column:1 / -1; } .connection-browser__item { align-items:flex-start; flex-wrap:wrap; } }
.export-progress { display: grid; gap: 10px; }
.export-progress progress { width: 100%; height: 12px; accent-color: var(--green-2); }
.export-progress strong { font-size: 13px; }
.export-progress small { color: var(--muted); line-height: 1.5; }
.ollama-setup { margin: 4px 0 12px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-tint); font-size: 11px; line-height: 1.5; }
.ollama-setup p { margin: 7px 0; }
.ollama-setup > code { display: block; overflow-x: auto; padding: 9px 10px; border-radius: 5px; color: white; background: var(--green); white-space: nowrap; user-select: all; }
.ollama-setup small { display: block; color: var(--muted); }
.connection-status { margin: 0 0 12px; padding: 10px 12px; border-radius: 7px; font-size: 11px; line-height: 1.45; }
.connection-status--testing { color: #71520e; background: #f8ebc8; }
.connection-status--success { color: #145642; background: #dff2ea; }
.connection-status--error { color: #70291f; background: #fbebe8; }
.connection-manager { display: grid; gap: 14px; }
.connection-list { display: grid; gap: 8px; }
.connection-card { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.connection-card__head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.connection-card__head strong, .connection-card__head small { display: block; }
.connection-card__head strong { font-size: 13px; }
.connection-card__head small { margin-top: 2px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.connection-card > code { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.connection-card__actions { display: flex; gap: 6px; }
.connection-card__actions button, .inline-primary, .copy-field button { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; background: var(--surface); cursor: pointer; font-size: 11px; }
.connection-card__actions button:first-child, .inline-primary { border-color: var(--green); color: white; background: var(--green); }
.connection-card__actions button:disabled, .inline-primary:disabled { opacity: .6; cursor: wait; }
.connection-badge { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: #71520e; background: #f8ebc8; font-size: 9px; }
.connection-badge.is-connected { color: #145642; background: #dff2ea; }
.connection-setup { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.connection-setup > summary { padding: 12px; cursor: pointer; font-size: 12px; font-weight: 700; }
.connection-setup > summary small { color: var(--muted); font-weight: 400; }
.connection-setup > h3 { margin: 0; padding: 12px; color: var(--ink); font-size: 12px; }
.connection-setup__body { padding: 2px 12px 14px; border-top: 1px solid var(--surface-2); }
.application-brand-settings { display: grid; gap: 13px; }
.application-brand-settings__preview { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.application-brand-settings__preview img { width: 44px; height: 44px; object-fit: contain; }
.application-brand-settings__preview strong { font-size: 15px; overflow-wrap: anywhere; }
.copy-field { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.copy-field input { min-width: 0; }
.connection-security { font-size: 11px; }
.connection-report { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-tint); font-size: 11px; }
.connection-report > strong { display: block; margin-bottom: 8px; font-size: 12px; }
.connection-report dl { display: grid; gap: 5px; margin: 0; }
.connection-report dl div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.connection-report dt { color: var(--muted); }
.connection-report dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.connection-report p { margin: 10px 0 0; color: #70291f; line-height: 1.45; }
.warning-box { padding: 14px; border: 1px solid #e3b1a9; border-radius: 8px; color: #70291f; background: #fbebe8; font-size: 12px; }
.warning-box p { margin: 5px 0 0; }
.project-list, .catalog-list { display: grid; gap: 8px; }
.server-directory-card { display: grid; gap: 12px; margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.server-directory-card h3 { margin: 3px 0 4px; font-size: 15px; }
.server-directory-card > div > p { margin: 0 0 7px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.server-directory-card a { color: var(--green-2); font-size: 11px; font-weight: 700; }
.catalog-directory-link { margin: 14px 0 0; text-align: center; }
.catalog-directory-link a { color: var(--green-2); font-size: 12px; font-weight: 700; }
.server-directory-form { display: grid; gap: 6px; }
.server-directory-form .field { margin: 0; }
.server-directory-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.server-directory-input input { min-width: 0; }
.server-directory-input button { border: 1px solid var(--green); border-radius: 6px; padding: 8px 11px; color: white; background: var(--green); cursor: pointer; font-size: 11px; }
.catalog-path { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.catalog-path button { border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; background: var(--surface); cursor: pointer; }
.catalog-path button:disabled { opacity: .35; cursor: default; }
.catalog-path code { min-width: 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.catalog-path small { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.directory-filter { width: 100%; margin-bottom: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; }
.enterprise-list { display: grid; gap: 5px; }
.enterprise-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--surface); text-align: left; }
button.enterprise-row { cursor: pointer; }
button.enterprise-row:hover { border-color: var(--green-2); }
.enterprise-row span { display: grid; gap: 2px; min-width: 0; }
.enterprise-row[hidden] { display: none; }
.enterprise-row strong { font-size: 12px; overflow-wrap: anywhere; }
.enterprise-row small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.enterprise-row > button { border: 1px solid var(--line); border-radius: 5px; padding: 6px 10px; background: var(--paper); cursor: pointer; font-size: 11px; }
.project-card { display: grid; gap: 3px; width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-align: left; cursor: pointer; }
.project-card:hover { border-color: var(--green-2); }
.project-card span { color: var(--muted); font-size: 10px; }
.smart-image-intro { padding: 15px; border: 1px solid color-mix(in srgb, var(--green-2) 42%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--green-2) 8%, var(--surface)); }
.smart-image-intro strong { display: block; margin-bottom: 5px; font: 700 20px/1.15 Georgia, serif; color: var(--ink); }
.smart-image-intro p { margin: 0; color: var(--muted); line-height: 1.5; }
.project-download-formats { display: grid; gap: 0; margin: 14px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.project-download-formats div { padding: 11px 13px; background: var(--surface); }
.project-download-formats div + div { border-top: 1px solid var(--line); }
.project-download-formats dt { font-weight: 750; color: var(--ink); }
.project-download-formats dd { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.catalog-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.catalog-card h3 { margin: 3px 0; font-size: 13px; }
.catalog-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
@media (max-width: 560px) { .server-directory-input { grid-template-columns: 1fr; } }
.about-copy p { margin-top: 0; line-height: 1.6; }
.about-copy dl { padding: 0; }

.table-dialog { position: fixed; inset: auto 14px 14px calc(var(--table-dock-left, var(--sidebar)) + 14px); width: auto; max-width: none; height: min(44vh, 470px); max-height: none; margin: 0; z-index: 40; resize: vertical; }
.table-resizer { display: none; position: absolute; z-index: 3; touch-action: none; }
.table-dialog__shell { display: grid; grid-template-rows: auto auto 1fr auto; width: 100%; height: 100%; }
.table-dialog .dialog__header { align-items: center; padding: 7px 14px 5px; }
.table-dialog .dialog__header h2 { display: inline; margin-left: 8px; font-size: 18px; }
.table-dialog .dialog__header .eyebrow { display: inline; }
.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 14px; }
.table-summary { min-width: 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-search { display: flex; gap: 5px; min-width: min(440px, 50%); }
.table-search input { min-width: 0; flex: 1; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.table-search button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; font-size: 11px; }
.table-scroll { min-height: 0; overflow: auto; margin: 0 14px; border: 1px solid var(--line); background: var(--surface); }
.table-scroll table { border-collapse: collapse; min-width: 100%; font-size: 11px; }
.table-scroll th { position: sticky; top: 0; z-index: 1; background: var(--green); color: white; text-align: left; }
.table-scroll th, .table-scroll td { max-width: 320px; padding: 6px 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-scroll tbody tr:nth-child(even) { background: var(--surface-alt); }
:root[data-skin="gismap"][data-theme="dark"] .brand { background: linear-gradient(120deg, #111a17, #0b1210); }
:root[data-skin="gismap"][data-theme="dark"] .insights-overlay,
:root[data-skin="gismap"][data-theme="dark"] .insights-overlay > header,
:root[data-skin="gismap"][data-theme="dark"] #insights-content > .insight-tabs { background: rgb(11 18 16 / 96%); }
:root[data-skin="gismap"][data-theme="dark"] dialog::backdrop { background: rgb(0 0 0 / 62%); }
:root[data-skin="gismap"][data-theme="dark"] .connection-status--testing,
:root[data-skin="gismap"][data-theme="dark"] .connection-badge { color: #f5cf80; background: #3a3019; }
:root[data-skin="gismap"][data-theme="dark"] .connection-status--success,
:root[data-skin="gismap"][data-theme="dark"] .connection-badge.is-connected { color: #8cdbc5; background: #17372f; }
:root[data-skin="gismap"][data-theme="dark"] .connection-status--error,
:root[data-skin="gismap"][data-theme="dark"] .warning-box { color: #ffb3a7; background: #3d211d; border-color: #714239; }
:root[data-skin="gismap"][data-theme="dark"] .connection-report,
:root[data-skin="gismap"][data-theme="dark"] .ollama-setup { background: #13251f; border-color: #315047; }
.table-scroll tbody tr[data-feature-index] { cursor: pointer; }
.table-scroll tbody tr[data-feature-index]:hover,
.table-scroll tbody tr[data-feature-index]:focus { background: var(--surface-hover); outline: 2px solid var(--green-2); outline-offset: -2px; }
.table-footer { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 5px 10px; font-size: 10px; }
.table-footer button:disabled { opacity: .4; cursor: default; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

body.sidebar-collapsed .app-shell { grid-template-columns: 0 1fr; }
body.sidebar-collapsed .sidebar {
  visibility: hidden;
  transform: translateX(-100%);
  pointer-events: none;
}
body.sidebar-collapsed #sidebar-open { display: grid !important; place-items: center; z-index: 30; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
@media (min-width: 881px), (min-width: 641px) and (orientation: landscape) { body.sidebar-collapsed #app[data-presentation="atlas"] .atlas-chapter-overlay { left:70px; width:min(520px,calc(100% - 202px)); } }
body.sidebar-collapsed .table-dialog { left: 14px; }

@media (min-width: 881px) {
  body.dialog-panel-open .app-shell { grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--dialog-panel-width, 460px); }
  body.dialog-panel-open .utility-panel { display: none !important; }
  body.dialog-panel-open .table-dialog { right: calc(var(--dialog-panel-width, 460px) + 14px); }
  body.utility-panel-open .app-shell { grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--utility-panel-width, 360px); }
  body.sidebar-collapsed.utility-panel-open .app-shell { grid-template-columns: 0 minmax(0, 1fr) var(--utility-panel-width, 360px); }
  body.dialog-panel-open.utility-panel-open .app-shell { grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--dialog-panel-width, 460px); }
  body.sidebar-collapsed.dialog-panel-open.utility-panel-open .app-shell { grid-template-columns: 0 minmax(0, 1fr) var(--dialog-panel-width, 460px); }
  body.utility-panel-open .table-dialog { right: calc(var(--utility-panel-width, 360px) + 14px); }
  body.utility-panel-open.table-open[data-table-position="dock-right"] .table-dialog {
    right: var(--utility-panel-width, 360px);
  }
  body.utility-panel-open.table-open[data-table-position="dock-bottom"] .table-dialog {
    right: var(--utility-panel-width, 360px);
  }
  body.table-open[data-table-position="dock-left"] #app .map-workspace {
    width: calc(100% - var(--table-dock-width, 520px));
    margin-left: var(--table-dock-width, 520px);
  }
  body.table-open[data-table-position="dock-right"] #app .map-workspace {
    width: calc(100% - var(--table-dock-width, 520px));
  }
  body.table-open[data-table-position="dock-bottom"] #app .map-workspace {
    height: calc(100% - var(--table-dock-height, 420px));
  }
  body.table-open[data-table-position="dock-top"] #app .map-workspace {
    height: calc(100% - var(--table-dock-height, 420px));
    margin-top: var(--table-dock-height, 420px);
  }
  body.table-open[data-table-position^="dock-"] .table-dialog {
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
    resize: none;
  }
  body.table-open[data-table-position="dock-left"] .table-dialog {
    inset: 0 auto 0 var(--table-dock-left, var(--sidebar));
    width: var(--table-dock-width, 520px);
    height: auto;
  }
  body.sidebar-collapsed.table-open[data-table-position="dock-left"] .table-dialog { left: 0; }
  body.table-open[data-table-position="dock-right"] .table-dialog {
    inset: 0 0 0 auto;
    width: var(--table-dock-width, 520px);
    height: auto;
  }
  body.table-open[data-table-position="dock-bottom"] .table-dialog {
    inset: auto 0 0 var(--table-dock-left, var(--sidebar));
    width: auto;
    height: var(--table-dock-height, 420px);
  }
  body.table-open[data-table-position="dock-top"] .table-dialog {
    inset: 0 0 auto var(--table-dock-left, var(--sidebar));
    width: auto;
    height: var(--table-dock-height, 420px);
  }
  body.sidebar-collapsed.table-open[data-table-position="dock-bottom"] .table-dialog { left: 0; }
  body.table-open[data-table-position^="dock-"] .table-resizer { display: block; }
  body.table-open[data-table-position="dock-left"] .table-resizer {
    inset: 0 -5px 0 auto;
    width: 10px;
    cursor: col-resize;
  }
  body.table-open[data-table-position="dock-right"] .table-resizer {
    inset: 0 auto 0 -5px;
    width: 10px;
    cursor: col-resize;
  }
  body.table-open[data-table-position="dock-bottom"] .table-resizer {
    inset: -5px 0 auto;
    height: 10px;
    cursor: row-resize;
  }
  body.table-open[data-table-position="dock-top"] .table-resizer {
    inset: auto 0 -5px;
    height: 10px;
    cursor: row-resize;
  }
  body.table-open[data-table-position="dock-left"] .table-resizer::after,
  body.table-open[data-table-position="dock-right"] .table-resizer::after {
    content: "";
    position: absolute;
    inset: 0 4px;
    background: var(--line);
  }
  body.table-open[data-table-position="dock-top"] .table-resizer::after,
  body.table-open[data-table-position="dock-bottom"] .table-resizer::after {
    content: "";
    position: absolute;
    inset: 4px 0;
    background: var(--line);
  }
  body.table-resizing { cursor: col-resize; user-select: none; }
  body.table-resizing[data-table-position="dock-top"],
  body.table-resizing[data-table-position="dock-bottom"] { cursor: row-resize; }
  body.table-resizing iframe, body.table-resizing canvas { pointer-events: none; }

  body.insights-open[data-insights-position="dock-left"] #app .map-workspace {
    display: grid;
    grid-template: minmax(0, 1fr) / var(--insights-dock-width, 420px) minmax(0, 1fr);
    grid-template-areas: "insight map";
  }
  body.insights-open[data-insights-position="dock-right"] #app .map-workspace {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr) var(--insights-dock-width, 420px);
    grid-template-areas: "map insight";
  }
  body.insights-open[data-insights-position="dock-bottom"] #app .map-workspace {
    display: grid;
    grid-template: minmax(0, 1fr) var(--insights-dock-height, 360px) / minmax(0, 1fr);
    grid-template-areas: "map" "insight";
  }
  body.insights-open[data-insights-position="dock-top"] #app .map-workspace {
    display: grid;
    grid-template: var(--insights-dock-height, 360px) minmax(0, 1fr) / minmax(0, 1fr);
    grid-template-areas: "insight" "map";
  }
  body.insights-open[data-insights-position^="dock-"] #viewDiv {
    position: relative;
    inset: auto;
    grid-area: map;
    min-width: 0;
    min-height: 0;
  }
  body.insights-open[data-insights-position^="dock-"] .insights-overlay {
    position: relative;
    inset: auto;
    grid-area: insight;
    width: auto;
    max-height: none;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
  }
  body.insights-open[data-insights-position^="dock-"] .insights-resizer { display: block; }
  body.insights-open[data-insights-position="dock-left"] .insights-resizer {
    inset: 0 -5px 0 auto;
    width: 10px;
    cursor: col-resize;
  }
  body.insights-open[data-insights-position="dock-right"] .insights-resizer {
    inset: 0 auto 0 -5px;
    width: 10px;
    cursor: col-resize;
  }
  body.insights-open[data-insights-position="dock-bottom"] .insights-resizer {
    inset: -5px 0 auto;
    height: 10px;
    cursor: row-resize;
  }
  body.insights-open[data-insights-position="dock-top"] .insights-resizer {
    inset: auto 0 -5px;
    height: 10px;
    cursor: row-resize;
  }
  body.insights-open[data-insights-position="dock-left"] .insights-resizer::after,
  body.insights-open[data-insights-position="dock-right"] .insights-resizer::after {
    content: "";
    position: absolute;
    inset: 0 4px;
    background: var(--line);
  }
  body.insights-open[data-insights-position="dock-top"] .insights-resizer::after,
  body.insights-open[data-insights-position="dock-bottom"] .insights-resizer::after {
    content: "";
    position: absolute;
    inset: 4px 0;
    background: var(--line);
  }
  body.insights-open[data-insights-position="dock-right"] .map-nav { right: calc(var(--insights-dock-width, 420px) + 18px); }
  body.insights-open[data-insights-position="dock-bottom"] .map-status,
  body.insights-open[data-insights-position="dock-bottom"] .toast-region { bottom: calc(var(--insights-dock-height, 360px) + 22px); }
  body.sidebar-collapsed.insights-open[data-insights-position="dock-left"] .sidebar__open { left: calc(var(--insights-dock-width, 420px) + 18px); }
  body.insights-resizing { cursor: col-resize; user-select: none; }
  body.insights-resizing[data-insights-position="dock-top"],
  body.insights-resizing[data-insights-position="dock-bottom"] { cursor: row-resize; }
  body.insights-resizing iframe, body.insights-resizing canvas { pointer-events: none; }
}

@media (min-width: 881px) {
  body[data-navigation-layout="top"] .app-shell {
    grid-template: 64px minmax(0, 1fr) / minmax(0, 1fr);
  }
  body[data-navigation-layout="top"].utility-panel-open .app-shell {
    grid-template: 64px minmax(0, 1fr) / minmax(0, 1fr) var(--utility-panel-width, 360px);
  }
  body[data-navigation-layout="top"].utility-panel-open .sidebar { grid-column: 1 / -1; }
  body[data-navigation-layout="top"].utility-panel-open .utility-panel { grid-column: 2; grid-row: 2; }
  body[data-navigation-layout="top"] .sidebar {
    z-index: 45;
    display: grid;
    grid-template: 64px / 190px 110px minmax(0, 1fr) auto;
    width: 100%;
    height: 64px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgb(17 39 33 / 8%);
  }
  body[data-navigation-layout="top"] .brand { height: 64px; padding: 5px 10px; border: 0; border-right: 1px solid var(--line); }
  body[data-navigation-layout="top"] .brand__mark { width: 46px; height: 46px; }
  body[data-navigation-layout="top"] .brand__wordmark strong { font-size: 18px; }
  body[data-navigation-layout="top"] .brand__wordmark span { margin-top: 3px; font-size: 7px; }
  body[data-navigation-layout="top"] .brand__wordmark small,
  body[data-navigation-layout="top"] .sidebar__close { display: none; }
  body[data-navigation-layout="top"] .menu-bar { position: relative; display: block; align-self: stretch; padding: 0; border: 0; border-right: 1px solid var(--line); }
  body[data-navigation-layout="top"] .menu-bar__all-trigger { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 64px; border: 0; background: var(--surface); font-weight: 700; cursor: pointer; }
  body[data-navigation-layout="top"] .menu-bar.is-consolidated-open .menu-bar__all-trigger { color: var(--green-2); background: var(--surface-2); }
  body[data-navigation-layout="top"] .menu-bar__categories { display: none; position: absolute; z-index: 55; top: 65px; left: 0; width: min(620px, calc(100vw - 210px)); min-height: 390px; max-height: calc(100vh - 82px); overflow: auto; grid-template: repeat(5, auto) minmax(0, 1fr) / 180px minmax(0, 1fr); align-items: start; gap: 4px 10px; padding: 10px; border: 1px solid var(--line); border-radius: 0 0 9px 9px; background: var(--surface); box-shadow: var(--shadow); }
  body[data-navigation-layout="top"] .menu-bar.is-consolidated-open .menu-bar__categories { display: grid; }
  body[data-navigation-layout="top"] .menu { display: contents; }
  body[data-navigation-layout="top"] .menu__trigger { grid-column: 1; height: auto; justify-content: space-between; padding: 12px 11px; border-radius: 6px; }
  body[data-navigation-layout="top"] .menu:nth-child(1) .menu__trigger { grid-row: 1; }
  body[data-navigation-layout="top"] .menu:nth-child(2) .menu__trigger { grid-row: 2; }
  body[data-navigation-layout="top"] .menu:nth-child(3) .menu__trigger { grid-row: 3; }
  body[data-navigation-layout="top"] .menu:nth-child(4) .menu__trigger { grid-row: 4; }
  body[data-navigation-layout="top"] .menu:nth-child(5) .menu__trigger { grid-row: 5; }
  body[data-navigation-layout="top"] .menu__content,
  body[data-navigation-layout="top"] .menu:nth-last-child(-n + 2) .menu__content { position: static; grid-column: 2; grid-row: 1 / 7; align-self: stretch; width: 100%; max-height: none; margin: 0; overflow: auto; padding: 4px 8px 8px; border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: none; }
  body[data-navigation-layout="top"] .sidebar__scroll { display: flex; align-items: stretch; overflow: visible; }
  body[data-navigation-layout="top"] .panel { position: relative; border: 0; }
  body[data-navigation-layout="top"] .panel summary { height: 64px; gap: 0; padding: 0 16px; align-items: center; }
  body[data-navigation-layout="top"] .panel summary span { font: 700 12px/1 system-ui, sans-serif; }
  body[data-navigation-layout="top"] .panel-dock,
  body[data-navigation-layout="top"] .panel summary small,
  body[data-navigation-layout="top"] .panel summary::after { display: none; }
  body[data-navigation-layout="top"] .panel[open] summary { color: var(--green-2); background: var(--surface-2); }
  body[data-navigation-layout="top"] .panel .panel__body {
    position: absolute;
    z-index: 50;
    top: calc(100% + 1px);
    left: 0;
    width: min(370px, 90vw);
    max-height: calc(100vh - 82px);
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 0 0 9px 9px;
    background: var(--paper);
    box-shadow: var(--shadow);
  }
  body[data-navigation-layout="top"] .sidebar__footer { align-items: center; border: 0; border-left: 1px solid var(--line); }
  body[data-navigation-layout="top"] .map-workspace { height: auto; min-height: 0; }
  body[data-navigation-layout="top"].sidebar-collapsed .app-shell { grid-template-rows: 0 minmax(0, 1fr); grid-template-columns: 1fr; }
  body[data-navigation-layout="top"].sidebar-collapsed .sidebar { transform: translateY(-100%); }
  body[data-navigation-layout="top"].sidebar-collapsed .sidebar__open { display: block; }
  body[data-navigation-layout="top"] .table-dialog,
  body[data-navigation-layout="top"].table-open[data-table-position="dock-left"] .table-dialog,
  body[data-navigation-layout="top"].table-open[data-table-position="dock-bottom"] .table-dialog { left: 0; }
}

@media (min-width: 1200px) {
  body[data-navigation-layout="top"] .sidebar__scroll > .panel { flex: 0 0 auto; min-width: 0; }
  body[data-navigation-layout="top"] .sidebar__scroll > .panel[open] { display: flex; flex: 1 1 560px; align-items: stretch; }
  body[data-navigation-layout="top"] .sidebar__scroll > .panel[open] > summary { flex: 0 0 auto; }
  body[data-navigation-layout="top"] .sidebar__scroll > .panel[open] > .panel__body {
    position: static;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 9px;
    width: auto;
    min-width: 0;
    height: 64px;
    max-height: none;
    overflow: hidden;
    padding: 7px 10px;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }
  body[data-navigation-layout="top"] #places-panel .place-search-combobox { flex: 1 1 280px; min-width: 180px; }
  body[data-navigation-layout="top"] #places-panel > .panel__body { overflow: visible; }
  body[data-navigation-layout="top"] #places-panel .search-row input { padding: 8px 9px; }
  body[data-navigation-layout="top"] #places-panel .search-row button { width: 38px; height: 38px; }
  body[data-navigation-layout="top"] #bookmarks-panel .section-heading { display: flex; flex: 0 0 auto; margin: 0; white-space: nowrap; }
  body[data-navigation-layout="top"] #bookmarks-panel #bookmarks-list { flex: 1 1 auto; min-width: 160px; max-height: 48px; margin: 0; overflow: auto; }
  body[data-navigation-layout="top"] #draw-panel .draw-tools { display: flex; }
  body[data-navigation-layout="top"] #draw-panel .draw-tools button { min-width: 72px; padding: 8px 10px; }
  body[data-navigation-layout="top"] #intelligence-content { white-space: nowrap; text-overflow: ellipsis; }
  body[data-navigation-layout="top"] #intelligence-content .location-card { min-width: 240px; max-height: 50px; margin: 0; padding: 7px 10px; overflow: hidden; }
  body[data-navigation-layout="top"] #layers-panel > .panel__body { overflow-x: auto; }
  body[data-navigation-layout="top"] #layers-panel .layers-list { display: flex; gap: 7px; }
  body[data-navigation-layout="top"] #layers-panel .layer-card { flex: 0 0 260px; margin: 0; }
  body[data-navigation-layout="top"] #layers-panel .opacity-row,
  body[data-navigation-layout="top"] #layers-panel .layer-card__actions { display: none; }
}

@media (max-width: 880px) {
  :root { --sidebar: min(88vw, 380px); }
  .app-shell,
  body.sidebar-collapsed .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: absolute; inset: 0 auto 0 0; width: var(--sidebar); }
  .sidebar__open { display: block; }
  body:not(.sidebar-collapsed) .sidebar__open { display: none; }
  .table-dialog { left: 14px; }
  body[data-insights-position^="dock-"] .insights-overlay { inset: auto 12px 54px; width: auto; max-height: min(44vh, 470px); }
  body.utility-panel-open .utility-panel { position: fixed; z-index: 58; inset: 52px 0 0 auto; width: min(88vw, 440px); box-shadow: -14px 0 34px rgb(17 39 33 / 22%); }
  body.utility-panel-open .utility-resizer { display: none; }
  body:not(.sidebar-collapsed) .welcome-panel { left:calc(var(--sidebar) + (100% - var(--sidebar)) / 2); width:min(620px, calc(100% - var(--sidebar) - 24px)); }
  body:not(.sidebar-collapsed) .welcome-panel__actions { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 641px) and (max-width: 880px) and (orientation: landscape) {
  .app-dialog--docked { position: fixed; inset: 0 0 0 auto; width: min(480px, 94vw); height: 100dvh; }
  body.utility-panel-open:not(.sidebar-collapsed) .sidebar {
    top: 0;
    bottom: auto;
    height: 46vh;
    height: 46dvh;
  }
  body.utility-panel-open:not(.sidebar-collapsed) .utility-panel {
    inset: 46vh auto 0 0;
    inset: 46dvh auto 0 0;
    width: var(--sidebar);
    height: 54vh;
    height: 54dvh;
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-left: 0;
    box-shadow: 8px -8px 26px rgb(17 39 33 / 14%);
  }
  body.sidebar-collapsed.utility-panel-open .utility-panel {
    inset: auto 0 0;
    width: 100%;
    height: min(54vh, 560px);
    height: min(54dvh, 560px);
    border-top: 1px solid var(--line);
    border-left: 0;
    box-shadow: 0 -12px 30px rgb(17 39 33 / 18%);
  }
}

@media (max-width: 640px), (max-width: 880px) and (orientation: portrait) {
  .atlas-chapter-overlay { top: 8px; right: 8px; left: 8px; grid-template-columns: 1fr; width: auto; gap: 10px; padding:12px 14px; }
  .atlas-chapter-overlay__copy { display:grid; grid-template-columns:48px minmax(0,1fr); gap:11px; align-items:center; padding-right:0; }
  .atlas-chapter-brand-mark { display:block; width:48px; height:48px; object-fit:contain; }
  .atlas-chapter-brand-name { display:block; margin-bottom:3px; color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
  .atlas-chapter-overlay h2 { margin-top:1px; font-size:23px; }
  .atlas-tour-exit { display:none; }
  .atlas-chapter-overlay__navigation { display:none; }
  .atlas-chapter-description { right: 10px; bottom: 196px; width: min(360px, calc(100% - 20px)); max-height: 38vh; }
  .mobile-presentation-controls { position:fixed; z-index:64; right:10px; bottom:calc(72px + env(safe-area-inset-bottom)); left:10px; display:grid; min-height:58px; padding:7px; border:1px solid var(--line); border-radius:14px; background:color-mix(in srgb,var(--surface) 96%,transparent); box-shadow:0 -8px 24px rgb(17 39 33 / 18%); backdrop-filter:blur(14px); }
  .mobile-presentation-controls[hidden] { display:none; }
  .mobile-presentation-controls[data-presentation="atlas"] { grid-template-columns:1fr; }
  .mobile-presentation-controls[data-presentation="briefing"] { grid-template-columns:1fr; }
  .mobile-atlas-controls { display:grid; grid-template-columns:1fr 1.25fr 1fr; gap:6px; }
  .mobile-atlas-controls button, .mobile-atlas-menu button, .mobile-briefing-context-button { min-height:44px; border:1px solid var(--green); border-radius:9px; color:var(--green); background:var(--surface); font-size:20px; font-weight:700; }
  .mobile-atlas-controls button:nth-child(2), .mobile-briefing-context-button { color:white; background:var(--green); }
  .mobile-atlas-controls button:disabled, .mobile-atlas-menu button:disabled, .mobile-briefing-context-button:disabled { opacity:.4; }
  .mobile-atlas-menu { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:6px; }
  .mobile-atlas-menu button { min-height:36px; font-size:11px; }
  .mobile-briefing-context-button { font-size:14px; }
  .mobile-presentation-controls[data-presentation="atlas"] .mobile-briefing-context-button, .mobile-presentation-controls[data-presentation="briefing"] :is(.mobile-atlas-controls,.mobile-atlas-menu) { display:none; }
  body.mobile-atlas-presenting .app-shell { grid-template-columns:minmax(0,1fr)!important; }
  body.mobile-atlas-presenting :is(.sidebar,.sidebar__open,.mobile-panel-nav,.mobile-menu-drawer,.mobile-map-brand,.map-nav-shell) { display:none!important; }
  body.mobile-atlas-presenting .map-workspace { grid-column:1/-1; }
  body.mobile-atlas-presenting .mobile-presentation-controls { bottom:calc(10px + env(safe-area-inset-bottom)); }
  body.shared-tour-only .atlas-chapter-overlay { top:10px; }
  body.shared-tour-only .mobile-presentation-controls { bottom:calc(10px + env(safe-area-inset-bottom)); }
  body.shared-tour-only .atlas-chapter-description, body.mobile-atlas-presenting .atlas-chapter-description { bottom:calc(136px + env(safe-area-inset-bottom)); }
  /* Phones: the feature list and its context fold open inside the Briefing sheet
     instead of floating over it. */
  .briefing-context-host .briefing-context { display:none; }
  .panel-dock { display:none; }
  .briefing-fold { margin-top:10px; border:1px solid var(--line); border-radius:var(--ui-radius-small); background:var(--surface); }
  .briefing-fold > summary { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:46px; padding:10px 12px; color:var(--ink); font:800 15px/1.2 var(--ui-font); list-style:none; cursor:pointer; }
  .briefing-fold > summary::-webkit-details-marker { display:none; }
  .briefing-fold > summary::after { content:"⌄"; color:var(--green); font-size:20px; line-height:1; transition:transform .15s; }
  .briefing-fold[open] > summary { border-bottom:1px solid var(--line); }
  .briefing-fold[open] > summary::after { transform:rotate(180deg); }
  .briefing-fold > .briefing-records { max-height:none; margin:0; padding:8px; }
  #app[data-presentation="briefing"] .briefing-fold > .briefing-context { position:relative; inset:auto; display:block; width:auto; max-height:none; margin:0; padding:10px 12px 14px; overflow:visible; border:0; border-radius:0; box-shadow:none; backdrop-filter:none; background:transparent!important; }
  .atlas-camera-fields { grid-template-columns: 1fr; }
  .app-dialog { width:calc(100vw - 16px); max-width:calc(100vw - 16px); height:min(760px,calc(100dvh - 16px)); max-height:calc(100dvh - 16px); margin:auto; overflow:hidden; }
  .app-dialog .dialog__shell { height:100%; max-height:none; overflow:hidden; grid-template-rows:auto minmax(0,1fr) auto; }
  .app-dialog--docked { position: fixed; inset:max(8px,env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom)); width:auto; max-width:none; height:auto; max-height:none; }
  .app-dialog :is(input,select,textarea,button),
  .utility-panel :is(input,select,textarea,button) { font-size:16px; }
  .app-dialog .dialog__content,
  .app-dialog--docked .dialog__content { min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y; -webkit-overflow-scrolling:touch; }
  .map-workspace,
  #viewDiv {
    overscroll-behavior: none;
    touch-action: none;
  }
  .welcome-panel { left:50%; width:calc(100% - 24px); max-height:calc(100dvh - 140px - env(safe-area-inset-bottom)); padding:16px; }
  .welcome-panel__actions { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  body:not(.sidebar-collapsed) .welcome-panel { display: none; }
  .welcome-panel h1 { font-size: 23px; }
  .mobile-map-brand {
    position: fixed;
    z-index: 68;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    height: calc(34px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 12px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    color: var(--ink);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: 0 3px 12px rgb(17 39 33 / 10%);
    backdrop-filter: blur(14px);
    pointer-events: none;
  }
  .mobile-map-brand span { width:7px; height:7px; border-radius:50%; background:var(--amber); box-shadow:0 0 0 3px color-mix(in srgb,var(--amber) 16%,transparent); }
  .mobile-map-brand strong { font:700 12px/1 var(--ui-font); letter-spacing:.02em; }
  .mobile-menu-drawer:not([hidden]) {
    position: fixed;
    z-index: 67;
    top: calc(34px + env(safe-area-inset-top));
    right: 0;
    left: 0;
    bottom: calc(64px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    max-height: none;
    overflow: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .mobile-menu-drawer__header { display:flex; align-items:center; justify-content:space-between; min-height:48px; padding:8px 14px; border-bottom:1px solid var(--line); background:var(--surface-2); }
  .mobile-menu-drawer__header strong { font:600 20px/1.1 var(--ui-heading); }
  .mobile-menu-drawer__header button { width:36px; height:36px; padding:0; border:1px solid var(--line); border-radius:50%; color:var(--ink); background:var(--surface); cursor:pointer; font-size:24px; line-height:1; }
  .mobile-menu-drawer .menu-bar { display:grid; grid-template-columns:1fr; align-content:start; min-height:0; padding:6px 10px 18px; overflow-y:auto; overscroll-behavior:contain; border:0; -webkit-overflow-scrolling:touch; }
  .mobile-menu-drawer .menu { border-bottom: 1px solid var(--line); }
  .mobile-menu-drawer .menu:last-child { border-bottom: 0; }
  .mobile-menu-drawer .menu__trigger { justify-content:space-between; min-height:54px; padding:14px 10px; font-size:16px; }
  .mobile-menu-drawer .menu-bar__discover { justify-content:space-between; min-height:54px; padding:14px 10px; border-bottom:1px solid var(--line); font-size:16px; }
  .mobile-menu-drawer .menu__content {
    position: static;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 2px 4px 12px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  /* Mobile menus must remain readable regardless of the presentation skin
     that was active when the drawer opened. */
  :root[data-skin="clean-light"] .mobile-menu-drawer { color:var(--ink); background:var(--surface); }
  :root[data-skin="clean-light"] .mobile-menu-drawer__header { color:var(--ink); background:var(--surface-2); }
  :root[data-skin="clean-light"] .mobile-menu-drawer .menu__trigger,
  :root[data-skin="clean-light"] .mobile-menu-drawer .menu__content :is(button,.menu__link) { color:var(--ink); }
  :root[data-skin="clean-light"] .mobile-menu-drawer .menu.is-open > .menu__trigger,
  :root[data-skin="clean-light"] .mobile-menu-drawer .menu__content :is(button,.menu__link):hover,
  :root[data-skin="clean-light"] .mobile-menu-drawer .menu__content button.is-active { color:var(--green); background:var(--surface-2); }
  .mobile-menu-drawer .mobile-workflows-menu .menu__content :is(button,.menu__link) { font-weight:700; }
  .app-shell,
  body.sidebar-collapsed .app-shell { grid-template-columns: 1fr; }
  .map-workspace { position:absolute; inset:calc(34px + env(safe-area-inset-top)) 0 0; height:auto; }
  .sidebar {
    position: fixed;
    inset: auto 0 calc(64px + env(safe-area-inset-bottom));
    width: 100%;
    height: auto;
    max-height: calc(28dvh + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-right: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 30px rgb(17 39 33 / 14%);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "mobile-content";
    padding: 0;
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    backdrop-filter: blur(16px);
    transform: translateY(0);
    transition: none;
  }
  body.sidebar-collapsed .sidebar { display: none; }
  body.sidebar-collapsed .sidebar__scroll { display: none; }
  .sidebar > .brand, .sidebar > .menu-bar, .sidebar__footer { display: none; }
  .mobile-panel-nav {
    position: fixed;
    z-index: 65;
    inset: auto 0 0;
    height: calc(64px + env(safe-area-inset-bottom));
    background: var(--paper);
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    width: 100%;
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid var(--line);
  }
  .mobile-panel-nav::-webkit-scrollbar { display: none; }
  .mobile-panel-nav :is(button,a) { display: grid; min-width: 0; place-items: center; gap: 4px; height: 54px; padding: 5px 1px; border: 0; border-radius: 10px; background: transparent; color: var(--green-2); cursor: pointer; font-weight: 600; text-decoration:none; }
  .mobile-panel-nav :is(button,a) svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-panel-nav :is(button,a) small { font-size: 9px; font-weight: 600; letter-spacing: 0; }
  .mobile-panel-nav button.is-active { color: white; background: var(--green); }
  .sidebar__scroll {
    grid-area: mobile-content;
    max-height: calc(28dvh - 65px);
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  /* Tool sheets size to their content (Draw is one row; Layers can be long)
     and never cover more than 60% of the screen. Dragging the handle sets an
     explicit height. */
  body.mobile-map-route:not(.sidebar-collapsed) .sidebar {
    bottom: calc(124px + env(safe-area-inset-bottom));
    height: var(--mobile-tool-drawer-height, auto);
    max-height: 60dvh;
    padding-top: 18px;
  }
  body.mobile-map-route:not(.sidebar-collapsed) .sidebar__scroll { height:100%; max-height:calc(60dvh - 18px); }
  body.mobile-map-route:not(.sidebar-collapsed) .mobile-drawer-handle,
  body:not(.mobile-map-route) #app[data-presentation="briefing"] .mobile-drawer-handle,
  body:not(.mobile-map-route) #app[data-presentation="atlas"] .mobile-drawer-handle {
    position:absolute;
    z-index:3;
    top:0;
    left:0;
    display:block;
    width:100%;
    height:20px;
    padding:0;
    border:0;
    color:var(--muted);
    background:transparent;
    cursor:ns-resize;
    touch-action:none;
  }
  body.mobile-map-route:not(.sidebar-collapsed) .mobile-drawer-handle span,
  body:not(.mobile-map-route) #app[data-presentation="briefing"] .mobile-drawer-handle span,
  body:not(.mobile-map-route) #app[data-presentation="atlas"] .mobile-drawer-handle span { position:absolute; top:7px; left:calc(50% - 22px); width:44px; height:4px; border-radius:999px; background:currentColor; }
  body.mobile-drawer-resizing { cursor:ns-resize; user-select:none; }
  .sidebar__scroll > .panel { display: none; min-height: 0; border-bottom: 0; }
  .sidebar__scroll > .panel.is-mobile-active { display: block; }
  .sidebar__scroll > .panel summary { display: none; }
  .sidebar__scroll .intelligence-toolbar, .sidebar__scroll .workspace-launch { display: none; }
  .sidebar__scroll > .panel summary span { font-size: 18px; }
  .sidebar__scroll > .panel summary::after { display: none; }
  .sidebar__scroll > .panel .panel__body { padding: 12px; }
  body.mobile-places-active #places-panel .search-row { grid-template-columns: 1fr 48px; }
  body.mobile-places-active #places-panel .search-row input { min-height: 48px; padding: 12px; font-size: 16px; }
  body.mobile-places-active #places-panel .search-row button { min-height: 48px; font-size: 24px; }
  body.mobile-places-active #places-panel .search-suggestions { position: static; max-height: min(32dvh, 280px); margin-top: 8px; padding: 6px; }
  body.mobile-places-active #places-panel .search-suggestions > button { min-height: 48px; padding: 12px; font-size: 14px; }
  body.mobile-places-active #places-panel .recent-places .compact-list > button { min-height: 44px; padding: 10px 12px; font-size: 14px; }
  body.mobile-menu-open .utility-panel,
  body:not(.sidebar-collapsed) .utility-panel { display: none; }
  body.mobile-workflow-open :is(.sidebar,.utility-panel,.insights-overlay,.welcome-panel) { display:none!important; }
  .mobile-workflow:not([hidden]) {
    position:fixed;
    z-index:64;
    inset:calc(34px + env(safe-area-inset-top)) 0 calc(64px + env(safe-area-inset-bottom));
    width:auto;
    border-left:0;
    box-shadow:none;
    display:grid;
    grid-template-rows:auto minmax(0,1fr);
    overflow:hidden;
    color:var(--ink);
    background:var(--paper);
  }
  .map-status { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .toast-region { position:fixed; z-index:75; top:calc(42px + env(safe-area-inset-top)); right:10px; bottom:auto; left:10px; justify-items:center; }
  .toast { max-width:min(420px,100%); }
  body #sidebar-open.sidebar__open,
  body.sidebar-collapsed #sidebar-open.sidebar__open { display:none!important; }
  .map-nav-shell { z-index:auto; top:8px; right:8px; justify-items:end; transform:none; }
  .map-nav-shell > .map-nav { position:relative; z-index:8; }
  .map-nav {
    display:none;
    max-height: min(390px, 74dvh);
    padding: 7px;
    overflow-y: auto;
    border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    box-shadow: -7px 7px 24px rgb(17 39 33 / 18%);
    backdrop-filter: blur(14px);
  }
  .map-nav button { width: 42px; height: 42px; box-shadow: none; }
  .map-nav__toggle,
  body.mobile-map-tools-open .map-nav__toggle {
    position:fixed;
    z-index:69;
    top:calc(4px + env(safe-area-inset-top));
    right:8px;
    width:44px;
    height:26px;
    border:1px solid color-mix(in srgb, var(--line) 85%, transparent);
    border-radius:7px;
    box-shadow:none;
    background:var(--surface);
  }
  .map-nav__toggle::before { content:""; position:absolute; top:2px; bottom:2px; left:-9px; width:1px; background:var(--line); }
  body.mobile-map-tools-open .map-nav__toggle { color:var(--surface); background:var(--green); border-color:var(--green); }
  body.mobile-map-tools-open .map-nav { display:grid; }
  body:not(.mobile-map-route) .map-nav-shell { display:none; }
  /* Map Insight is a left side panel: one third of the map, slides open to full screen. */
  .insights-overlay,
  body[data-insights-position] .insights-overlay {
    inset: 0 auto calc(64px + env(safe-area-inset-bottom)) 0;
    width: var(--insights-overlay-width, 33.333%);
    min-width: min(150px, 100%);
    max-width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    border-width: 0 1px 0 0;
    border-radius: 0 14px 14px 0;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr);
    transition: width .22s ease;
  }
  body:is(.mobile-map-route, .mobile-action-bar-open) .insights-overlay,
  body:is(.mobile-map-route, .mobile-action-bar-open)[data-insights-position] .insights-overlay { bottom: calc(124px + env(safe-area-inset-bottom)); }
  body.insights-expanded .insights-overlay,
  body.insights-expanded[data-insights-position] .insights-overlay { width: 100%; border-radius: 0; border-right-width: 0; }
  body.insights-resizing .insights-overlay { transition: none; }
  .insights-overlay:not([hidden]) { display: grid; }
  body.sidebar-collapsed .insights-overlay { left: 0; }
  .insights-expand-button { display: inline-grid; place-items: center; }
  .insights-resizer {
    display: block;
    inset: 0 -12px 0 auto;
    width: 24px;
    cursor: ew-resize;
  }
  .insights-resizer::after { content: ""; position: absolute; top: calc(50% - 22px); right: 10px; width: 4px; height: 44px; border-radius: 999px; background: var(--scrollbar-thumb); }
  body.insights-expanded .insights-resizer { inset: 0 0 0 auto; }
  body.insights-expanded .insights-resizer::after { right: 4px; }
  .insights-overlay > header { gap: 6px; padding: 8px 10px; }
  .insights-overlay > header > div:first-child { min-width: 0; }
  .insights-overlay > header h2 { overflow-wrap: anywhere; }
  body:not(.insights-expanded) .insights-overlay .insights-actions { flex-direction: column; }
  body:not(.insights-expanded) .insight-panel dl div { grid-template-columns: minmax(0, 1fr); gap: 1px; }
  body:not(.insights-expanded) .insight-note-actions { flex-direction: column; align-items: stretch; }
  .insights-overlay h2 { font-size: 16px; }
  #insights-content { display: flex; min-height: 0; flex-direction: column; padding: 4px 10px 8px; overflow: hidden; }
  #insights-content .insight-panel { min-height: 0; overflow: auto; }
  .insight-tabs { order: 2; flex: 0 0 auto; padding: 6px 0 0; }
  #insights-content > .insight-tabs { position: static; margin: 0; padding: 6px 0 0; background: none; }
  .insight-tabs button { padding: 5px 8px; }
  .insight-panel > header { padding: 6px 8px; }
  .insight-panel > header > span { display: none; }
  .insight-panel dl { padding: 0 8px 6px; }
  .insight-panel dl div { padding: 3px 0; }
  body.table-open[data-table-position="dock-top"] .table-dialog { inset: 0 0 auto; width: 100%; height: min(var(--table-dock-height, 420px), 45dvh); margin: 0; border: 0; border-radius: 0 0 14px 14px; resize: none; }
  body.table-open[data-table-position="dock-top"] .table-resizer { display: block; inset: auto 0 -10px; height: 20px; cursor: ns-resize; }
  body.table-open[data-table-position="dock-top"] .table-resizer::after { content: ""; position: absolute; right: calc(50% - 22px); bottom: 7px; width: 44px; height: 4px; border-radius: 999px; background: var(--scrollbar-thumb); }
  .table-dialog { top: 60px; right: 7px; bottom: auto; left: 7px; width: auto; height: 44dvh; resize: vertical; }
  .table-dialog .dialog__header { padding: 8px 10px 6px; }
  .table-dialog .dialog__header h2 { font-size: 17px; }
  .table-tools { display: grid; gap: 5px; padding: 5px 8px; }
  .table-summary { font-size: 9px; }
  .table-search { min-width: 0; width: 100%; }
  .table-search input, .table-search button { padding: 6px 7px; font-size: 10px; }
  .table-scroll { margin: 0 7px; }
  .table-footer { padding: 6px; }
  body.utility-panel-open .utility-panel {
    inset: auto 8px calc(78px + env(safe-area-inset-bottom));
    width: auto;
    height: min(70vh, 620px);
    height: min(70dvh, 620px);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 -12px 34px rgb(17 39 33 / 24%);
  }
  body.mobile-measurement-panel-open .utility-panel { height:min(32dvh, 300px); }
  body.mobile-measurement-panel-open .map-nav { max-height:max(44px, calc(100dvh - min(32dvh, 300px) - 150px - env(safe-area-inset-bottom))); overflow-y:auto; }
  body.mobile-presentation-panel-open :is(.atlas-chapter-description,.mobile-presentation-controls) { display:none!important; }
  body.mobile-presentation-panel-open .utility-panel {
    inset:auto 0 0;
    width:100%;
    height:60dvh;
    max-height:none;
    grid-template-rows:auto minmax(0,1fr);
    border:1px solid var(--line);
    border-radius:16px 16px 0 0;
    box-shadow:0 -14px 34px rgb(17 39 33 / 24%);
  }
  body.mobile-presentation-panel-open .utility-panel > header,
  body.mobile-presentation-panel-open .utility-tabs { display:none; }
  body.mobile-presentation-panel-open .utility-panel { grid-template-rows:minmax(0,1fr); }
  body.mobile-presentation-panel-open .utility-panes,
  body.mobile-presentation-panel-open .presentation-utility { min-height:0; height:100%; overflow:hidden; }
  body.mobile-presentation-panel-open .presentation-utility #presentation-dashboard { min-height:100%; max-height:100%; margin:0; padding:16px 14px calc(24px + env(safe-area-inset-bottom)); overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y; -webkit-overflow-scrolling:touch; }
  body.mobile-presentation-panel-open .presentation-utility .mode-dashboard { min-width:0; }
  body.mobile-presentation-panel-open .presentation-utility .mode-records { max-height:none; }
  /* Atlas can be opened from Tours or directly from the Map menu. Keep both
     routes on one compact authoring layout instead of depending on a body
     class that is only set by the workflow router. */
  /* Briefing and Tour sheets sit above their control bar instead of under it,
     and shrink to their content so the map stays visible. */
  /* They open at half the screen; the handle drags them up to the top bar. */
  #app[data-presentation="briefing"] .sidebar,
  #app[data-presentation="atlas"] .sidebar { bottom:calc(124px + env(safe-area-inset-bottom)); height:var(--mobile-sheet-height, 50dvh); max-height:calc(100dvh - 158px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding-top:18px; }
  #app[data-presentation="briefing"] .sidebar__scroll,
  #app[data-presentation="atlas"] .sidebar__scroll { height:100%; max-height:none; }
  #app[data-presentation="atlas"] .mode-dashboard--atlas { align-content:start; grid-auto-rows:max-content; min-height:0; }
  #app[data-presentation="atlas"] .mode-dashboard--atlas > header { display:none; }
  #app[data-presentation="atlas"] .mode-dashboard--atlas .atlas-title-control { order:-2; grid-template-columns:1fr; gap:4px; }
  #app[data-presentation="atlas"] .mode-dashboard--atlas .atlas-title-control span { font-size:9px; text-transform:uppercase; letter-spacing:.08em; }
  #app[data-presentation="atlas"] .mode-dashboard--atlas .atlas-title-control input { padding:8px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; font:700 22px/1.15 var(--ui-heading); }
  #app[data-presentation="atlas"] .mode-dashboard--atlas .atlas-actions { order:-1; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:6px; }
  #app[data-presentation="atlas"] .mode-dashboard--atlas .atlas-actions [data-atlas-settings] { display:none; }
  #app[data-presentation="atlas"] .mode-dashboard--atlas .atlas-actions button { height:40px; min-height:0; max-height:40px; padding:7px 4px; font-size:12px; }
  #app[data-presentation="atlas"] .mode-dashboard--atlas .mode-records { align-self:start; min-height:120px; }
  .app-dialog--presentation-sheet { position:fixed; z-index:72; inset:auto 0 calc(70px + env(safe-area-inset-bottom)); width:100%; max-width:none; height:60dvh; max-height:calc(100dvh - 120px - env(safe-area-inset-bottom)); margin:0; padding:0; border:0; background:transparent; }
  .app-dialog--presentation-sheet .dialog__shell { grid-template-rows:minmax(0,1fr) auto; height:100%; border-radius:16px 16px 0 0; box-shadow:0 -14px 34px rgb(17 39 33 / 24%); }
  .app-dialog--presentation-sheet .dialog__header { min-height:54px; padding:9px 12px; }
  .app-dialog--presentation-sheet .dialog__header h2 { font-size:20px; }
  .app-dialog--presentation-sheet #dialog-dock { display:none; }
  .app-dialog--presentation-sheet .dialog__content { padding:10px 12px; }
  .app-dialog--presentation-sheet .atlas-geocoder { margin-top:0; }
  .app-dialog--presentation-sheet .dialog__header { position:absolute; z-index:3; top:8px; right:8px; min-height:0; padding:0; border:0; background:transparent; }
  .app-dialog--presentation-sheet .dialog__header > div { display:none; }
  .app-dialog--presentation-sheet .dialog__header-actions { padding:0; }
  .app-dialog--presentation-sheet .dialog__content { min-height:0; padding-top:14px; overflow-y:auto; }
  .app-dialog--presentation-sheet .dialog__actions { align-items:center; flex:0 0 auto; padding:8px 12px calc(8px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:var(--paper); }
  .app-dialog--presentation-sheet .dialog__actions button { flex:0 0 auto; width:auto; min-width:88px; height:40px; min-height:40px; max-height:40px; padding:7px 14px; }
  .app-dialog--presentation-sheet .atlas-chapter-advanced { background:var(--surface); }

  /* Every compact dialog/tool uses the same sheet above both navigation rows. */
  body { --mobile-sheet-bottom:calc(64px + env(safe-area-inset-bottom)); }
  body.mobile-map-route:not(.mobile-menu-open):not(.mobile-workflow-open),
  body.mobile-action-bar-open:not(.mobile-menu-open) { --mobile-sheet-bottom:calc(124px + env(safe-area-inset-bottom)); }
  #dialog-dock, #utility-open-modal { display:none !important; }
  .mobile-sheet-resize { display:grid; position:absolute; z-index:4; top:0; left:0; width:100%; height:24px; padding:0; place-items:center; border:0; background:transparent; cursor:ns-resize; touch-action:none; }
  .mobile-sheet-resize span { width:42px; height:4px; border-radius:999px; background:var(--muted); }
  .mobile-sheet-resize:focus-visible { outline:2px solid var(--green-2); outline-offset:-3px; }
  .app-dialog:not(.app-dialog--docked)[open] { position:fixed; z-index:61; inset:auto 8px var(--mobile-sheet-bottom); width:auto; max-width:none; height:var(--mobile-dialog-height, min(60dvh, 620px)); max-height:calc(100dvh - var(--mobile-sheet-bottom) - 52px); margin:0; overflow:hidden; border:1px solid var(--line); border-radius:14px 14px 0 0; background:var(--paper); }
  .app-dialog:not(.app-dialog--docked) .dialog__shell { position:relative; height:100%; max-height:none; grid-template-rows:auto minmax(0,1fr) auto; background:var(--paper); }
  .app-dialog:not(.app-dialog--docked) .dialog__header { position:static; display:flex; min-height:0; padding:26px 16px 10px; border-bottom:1px solid var(--line); background:var(--paper); }
  .app-dialog:not(.app-dialog--docked) .dialog__header > div { display:block; }
  .app-dialog:not(.app-dialog--docked) .dialog__content { min-height:0; padding:14px 16px; overflow:auto; }
  .app-dialog:not(.app-dialog--docked) .dialog__actions { padding:10px 16px; border-top:1px solid var(--line); background:var(--paper); }
  body.utility-panel-open .utility-panel,
  body.mobile-measurement-panel-open .utility-panel,
  body.mobile-presentation-panel-open .utility-panel { inset:auto 8px var(--mobile-sheet-bottom); width:auto; height:var(--mobile-utility-height, min(50dvh, 620px)); max-height:calc(100dvh - var(--mobile-sheet-bottom) - 52px); grid-template-rows:auto auto minmax(0,1fr); border:1px solid var(--line); border-radius:14px 14px 0 0; }
  body.utility-panel-open .utility-panel > header { padding-top:26px; }
  body.utility-panel-open .map-nav { max-height:max(44px, calc(100dvh - var(--mobile-utility-height, min(50dvh, 620px)) - var(--mobile-sheet-bottom) - 110px)); overflow-y:auto; }
  body.mobile-presentation-panel-open .utility-panel > header { display:flex; }
  body.mobile-presentation-panel-open .utility-tabs:not([hidden]) { display:flex; }
  body:has(.app-dialog:not(.app-dialog--docked)[open]) .utility-panel { visibility:hidden; pointer-events:none; }
  body.mobile-map-route:has(.app-dialog:not(.app-dialog--docked)[open]) .sidebar { visibility:hidden; pointer-events:none; }
}

@media (max-width: 480px) {
  .field-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.atlas-empty { margin:0; padding:14px; color:var(--muted); font-size:13px; line-height:1.45; }
.mobile-skin-section { margin-top:20px; }
.mobile-skin-section h2 { margin:0 0 4px; font:700 18px/1.2 var(--ui-heading); }

/* Style options: ranked styles suggested from a field's values. */
.style-options { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 6px); background: var(--surface-2); }
.style-options__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.style-options__list:empty { display: none; }
.style-options__list { display: grid; gap: 8px; margin-top: 8px; }
.style-options__list > .form-note { margin: 0; color: var(--muted); font-size: 12px; }
.style-option { padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 6px); background: var(--surface); }
.style-option.is-recommended { border-color: var(--green); }
.style-option.is-applied { box-shadow: inset 3px 0 0 var(--green); }
.style-option__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.style-option__badge { flex: none; padding: 1px 7px; border-radius: 999px; color: white; background: var(--green); font-size: 11px; font-weight: 600; }
.style-option p { margin: 4px 0 6px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.style-option__classes { display: grid; gap: 2px; margin: 0 0 8px; padding: 0; list-style: none; font-size: 11px; font-variant-numeric: tabular-nums; }
.style-option__classes li { display: flex; align-items: center; gap: 6px; }
.style-option__swatch { flex: none; border: 1px solid rgb(0 0 0 / 15%); border-radius: 2px; }
.style-option__swatch.is-symbol { border-radius: 50%; }
.style-option button { padding: 5px 10px; border: 1px solid var(--green); border-radius: 6px; color: var(--green); background: transparent; cursor: pointer; font-size: 12px; }
.symbol-gallery { margin: 12px 0; }
.symbol-gallery__choices { display: grid; grid-template-columns: repeat(5, minmax(54px, 1fr)); gap: 7px; }
.symbol-gallery__choice { display: grid; justify-items: center; gap: 4px; min-height: 62px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--surface); cursor: pointer; font-size: 11px; font-weight: 600; }
.symbol-gallery__choice:hover,.symbol-gallery__choice.is-selected { border-color: var(--green); background: var(--green-pale, #e4f0ec); box-shadow: inset 0 0 0 1px var(--green); }
.symbol-gallery__choice img { width: 26px; height: 26px; }
.symbol-gallery__dot { width: 22px; height: 22px; border: 2px solid #fff; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px var(--green); }

/* Compound attribute filters: one row per condition, combined with AND or OR. */
.filter-builder { display: grid; gap: 10px; }
.filter-builder [hidden] { display: none !important; }
.filter-conditions { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.filter-condition { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 8px; align-items: start; padding: 8px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 7px); background: var(--surface); }
.filter-condition .field { min-width: 0; margin-bottom: 0; }
.filter-condition .filter-remove { width: 34px; height: 38px; margin-top: 22px; }
.filter-builder .filter-add { justify-self: start; }
.filter-builder .filter-logic { margin-bottom: 0; }
@media (max-width: 640px) {
  .filter-condition { grid-template-columns: minmax(0, 1fr) 34px; }
  .filter-condition .field { grid-column: 1; }
  .filter-condition .filter-remove { grid-column: 2; grid-row: 1; }
}
.filter-value-hint { min-height: 1em; color: var(--muted); font-size: 11px; font-weight: 500; }

/* Briefing slide details: the other layers shown with the main layer. */
.briefing-layers { display: grid; gap: 8px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 7px); }
.briefing-layers legend { padding: 0 4px; }
.briefing-layers [hidden] { display: none !important; }
.briefing-layer { display: grid; gap: 6px; padding: 8px; border-radius: var(--ui-radius-small, 7px); background: var(--surface); }
.briefing-layer__show { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.briefing-layer__relation { display: grid; gap: 6px; padding-left: 24px; }
.briefing-layer__relation label { display: grid; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
.briefing-layer__distance { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 6px; }
.briefing-layers .form-note { margin: 0; font-size: 11px; font-weight: 500; color: var(--muted); }
.briefing-select__add-slides { width:100%; min-height:34px; padding:6px 12px; border:1px solid var(--green); border-radius:var(--ui-radius-small,7px); color:var(--green); background:var(--surface); font-weight:800; cursor:pointer; }

/* Map assistant: a chat with the configured AI model that acts on the map. */
.assistant-utility { display: flex; min-height: 0; }
.assistant { display: flex; flex: 1; flex-direction: column; gap: 10px; min-height: 0; height: 100%; padding: 12px; }
.assistant__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.assistant__head > div { display: grid; }
.assistant__head small { color: var(--muted); font-size: 11px; }
.assistant__log { flex: 1 1 auto; min-height: 180px; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px; }
.assistant__message { max-width: 92%; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.assistant__message p { margin: 0 0 6px; }
.assistant__message p:last-child { margin-bottom: 0; }
.assistant__message--user { align-self: flex-end; color: white; background: var(--green); border-bottom-right-radius: 4px; }
.assistant__message--assistant { align-self: flex-start; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.assistant__message--error { align-self: stretch; color: var(--danger, #b3261e); background: color-mix(in srgb, var(--danger, #b3261e) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger, #b3261e) 35%, var(--line)); }
.assistant__message--note { align-self: center; color: var(--muted); font-size: 12px; }
.assistant__tool { align-self: flex-start; max-width: 92%; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 12px; }
.assistant__tool summary { display: flex; gap: 6px; align-items: baseline; padding: 6px 10px; color: var(--ink); cursor: pointer; list-style: none; }
.assistant__tool summary::-webkit-details-marker { display: none; }
.assistant__tool.is-done summary > span { color: var(--green); font-weight: 800; }
.assistant__tool.is-failed summary > span { color: var(--danger, #b3261e); font-weight: 800; }
.assistant__tool.is-pending summary { color: var(--muted); }
.assistant__tool pre { max-height: 220px; margin: 0; padding: 8px 10px; overflow: auto; border-top: 1px solid var(--line); font-size: 11px; white-space: pre-wrap; word-break: break-word; }
.assistant__thinking { align-self: flex-start; color: var(--muted); font-size: 12px; animation: assistant-pulse 1.4s ease-in-out infinite; }
@keyframes assistant-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .assistant__thinking { animation: none; } }
.assistant__empty p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.assistant__starters { display: grid; gap: 6px; }
.assistant__starters button { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); text-align: left; font-size: 12px; cursor: pointer; }
.assistant__starters button:hover { border-color: var(--green); }
.assistant__form { display: grid; gap: 6px; }
.assistant__form textarea { width: 100%; min-height: 64px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); font: inherit; font-size: 13px; resize: vertical; }
.assistant__actions { display: flex; justify-content: flex-end; gap: 6px; }
.assistant__actions button { min-height: 32px; padding: 6px 14px; border: 1px solid var(--green); border-radius: 6px; color: var(--green); background: var(--surface); font-weight: 700; cursor: pointer; }
.assistant__actions .button--primary { color: white; background: var(--green); }
.assistant__actions button:disabled { opacity: .5; cursor: progress; }
.assistant__note { margin: 0; color: var(--muted); font-size: 11px; }
.assistant__setup { display: grid; gap: 8px; }
.assistant__setup h3 { margin: 0; }
.assistant__setup p { margin: 0; color: var(--muted); font-size: 13px; }
.assistant__setup button { justify-self: start; padding: 8px 14px; border: 1px solid var(--green); border-radius: 6px; color: white; background: var(--green); font-weight: 700; cursor: pointer; }

/* Links use the chapter/task coordinates; they do not alter the QR payload. */
.atlas-chapter-overlay__copy { position:relative; padding-right:96px; }
.atlas-google-maps { position:absolute; top:0; right:0; color:var(--green); font-size:11px; font-weight:700; white-space:nowrap; }
.atlas-google-maps[hidden] { display:none; }
.task-location-row .task-feature-actions { display:flex; align-items:center; }
.task-feature-actions { align-items:center; flex-wrap:wrap; }
.task-google-maps { color:var(--green); font-size:12px; font-weight:700; white-space:nowrap; }
@media (max-width: 640px), (max-width: 880px) and (orientation: portrait) {
  .atlas-chapter-overlay__copy { padding-right:96px; }
  /* Keep dialog actions tappable rather than behind the tour's control bar. */
  body.mobile-atlas-presenting:has(.app-dialog:not(.app-dialog--docked)[open]) .mobile-presentation-controls { display:none; }
  .app-dialog:not(.app-dialog--docked) .dialog__actions { flex-wrap:wrap; }
}

/* The shared utility panel hosts the MapLibre basemap gallery on desktop and mobile. */
.basemap-gallery { display:grid; gap:12px; padding:12px; }
.basemap-gallery p { margin:0; }
.basemap-gallery__list { display:grid; gap:8px; }
.basemap-gallery__item { display:flex; gap:5px; align-items:stretch; }
.basemap-gallery__choice { flex:1; display:flex; gap:10px; align-items:center; min-width:0; padding:8px; text-align:left; }
.basemap-gallery__choice[aria-pressed="true"] { border-color:var(--green-2); box-shadow:inset 0 0 0 1px var(--green-2); }
.basemap-gallery__choice img { object-fit:cover; border-radius:4px; flex:none; }
.basemap-gallery__choice span { display:grid; gap:3px; }
.basemap-gallery__choice small { color:var(--muted); line-height:1.35; }
.basemap-gallery__favorite { min-width:44px; font-size:1.35em; }

/* DuckDB query workspace: the same dialog becomes a dock or mobile sheet. */
.query-workspace { display:grid; gap:16px; }
.query-layout { display:grid; grid-template-columns:minmax(150px, .7fr) minmax(0, 2fr); gap:16px; }
.query-layout aside, .query-layout main { min-width:0; display:grid; align-content:start; gap:10px; }
.query-layout aside { border-right:1px solid var(--line); padding-right:14px; }
.query-workspace button { min-height:40px; padding:8px 12px; border:1px solid var(--line); border-radius:var(--ui-radius-small, 6px); color:var(--ink); background:var(--surface); font:600 12px/1.25 var(--ui-font, sans-serif); cursor:pointer; }
.query-workspace button.button--primary { background:var(--green); border-color:var(--green); color:var(--on-accent, #fff); }
.query-workspace button:focus-visible { outline:2px solid var(--green-2); outline-offset:2px; }
.query-tabs { display:flex; flex-wrap:wrap; gap:6px; }
.query-tabs [aria-selected="true"] { background:var(--green); color:var(--on-accent, #fff); border-color:var(--green); }
.query-schema, .query-fields { max-height:170px; overflow:auto; border:1px solid var(--line); border-radius:6px; padding:8px; }
.query-schema div, .query-fields label { display:block; overflow-wrap:anywhere; padding:3px 0; }
.query-schema small { color:var(--muted); }
.query-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.query-run { display:flex; flex-wrap:wrap; align-items:end; gap:8px; }
.query-run .field { flex:1 1 160px; }
.query-workspace [hidden] { display:none !important; }
@media (max-width: 750px) { .query-layout { grid-template-columns:1fr; } .query-layout aside { border-right:0; border-bottom:1px solid var(--line); padding:0 0 12px; } }
.app-dialog--docked .query-layout { grid-template-columns:1fr; }
.app-dialog--docked .query-layout aside { border-right:0; border-bottom:1px solid var(--line); padding:0 0 12px; }

/* Progressive disclosure keeps layer controls compact without losing actions. */
.layer-card__more { margin-top: 8px; border-top: 1px solid var(--line); }
.layer-card__more summary { padding: 9px 2px 2px; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; }
.layer-card__more summary:hover { color: var(--green-2); }
.layer-card__more[open] summary { color: var(--ink); }
.layer-card__head > div { min-width: 0; }
.layer-card__head strong { max-width: 100%; }

/* A table's grid items must be allowed to shrink: wide rows scroll inside it. */
.table-dialog, .table-dialog__shell { min-width: 0; min-height: 0; }
.table-dialog__shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; }
.table-dialog__shell > * { min-width: 0; max-width: 100%; }
.table-tools { flex-wrap: wrap; }
.table-search { flex: 1 1 220px; min-width: 0; max-width: 100%; }
.table-scroll { min-width: 0; max-width: calc(100% - 28px); }
.table-footer { flex-wrap: wrap; }

/* Query uses a compact single column in both a dialog and a resizable dock. */
.query-utility { padding: 18px; }
.query-workspace { min-width: 0; gap: 14px; }
.query-workspace > *, .query-layout > * { min-width: 0; }
.query-layout, .app-dialog--docked .query-layout { grid-template-columns: minmax(0, 1fr); }
.query-layout aside, .app-dialog--docked .query-layout aside { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 14px; }
.query-intro { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.query-disclosure { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.query-disclosure summary { color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 700; }
.query-disclosure summary small { color: var(--muted); font-weight: 400; }
.query-disclosure[open] > :not(summary) { margin-top: 10px; }
.query-fields { max-height: 180px; padding: 4px 0; border: 0; }
.query-fields label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 4px; font-size: 12px; overflow-wrap: anywhere; }
.query-fields label input[type="checkbox"] { width: 16px; min-width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--green-2); }
.query-fields label small { color: var(--muted); font-size: 10px; }
.query-workspace section, .query-workspace .sql-result { min-width: 0; max-width: 100%; }
.query-workspace .sql-result { overflow: auto; }
.query-workspace [data-q-pane] > .field, .query-workspace [data-q-pane] > .query-disclosure { margin-bottom: 10px; }
.query-limit { flex: 0 1 auto; }
.query-limit .field { min-width: 150px; }
@media (max-width: 450px) { .query-grid { grid-template-columns: minmax(0, 1fr); } .table-tools { align-items: stretch; } .table-search { flex-basis: 100%; } }
@media (min-width: 881px) { body[data-navigation-layout="top"] #layers-panel .layer-card__more { display: none; } }
.query-workspace { container-type: inline-size; }
@container (max-width: 480px) { .query-grid { grid-template-columns: minmax(0, 1fr); } }
.table-dialog .dialog__header > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The game uses its existing standalone page in the shared dialog. */
.dragon-game-frame { display:block; width:100%; height:min(72dvh, 850px); min-height:0; border:0; border-radius:8px; background:var(--paper); }
/* A hidden tab bar must not put the game pane in the auto-sized tab row. */
body.utility-panel-open .utility-panel:has(.dragon-game-frame) .utility-panes { grid-row:3; }
/* The docked iframe owns the remaining pane height, instead of being clipped
   by a fixed-height frame nested inside the scrollable dialog content. */
.app-dialog--docked .dialog__content:has(> .dragon-game-frame) { display:flex; padding:0; overflow:hidden; }
.app-dialog--docked .dragon-game-frame { flex:1; height:100%; border-radius:0; }
.app-dialog--docked .dialog__shell:has(.dragon-game-frame) { grid-template-rows:minmax(0,1fr); }
.app-dialog--docked .dialog__shell:has(.dragon-game-frame) .dialog__actions:empty { display:none; }

/* Project-owned Map Notes: compact, readable cards in the existing dialog. */
.map-notes-panel { display: grid; gap: 1.25rem; min-width: 0; }
.map-notes-panel section { display: grid; gap: .75rem; min-width: 0; }
.map-notes-panel h3 { margin: 0; }
.map-notes-panel [data-note-form] { display: grid; gap: .75rem; }
.map-notes-panel__head, .map-note-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.map-notes-panel__head { justify-content: space-between; }
.map-note-card { min-width: 0; padding: .85rem; border: 1px solid var(--border, #c7d4ce); border-radius: .6rem; overflow-wrap: anywhere; }
.map-note-card p { white-space: pre-wrap; margin: .4rem 0; }
.map-note-card small { display: block; margin-bottom: .5rem; }
.si-note-status:empty { display: none; }
.si-note-chip { display: inline-block; padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: .8rem; font-weight: 600; }
.si-note-chip--waiting, .si-note-chip--working { border-color: var(--amber); }
.si-note-chip--done { border-color: var(--green-2); }
.si-note-chip--declined { border-color: var(--danger); color: var(--danger); }
.si-note-reply { margin: .4rem 0 0; padding: .4rem .6rem; border-left: 3px solid var(--green-2); background: var(--surface-2); white-space: pre-wrap; }
.si-note-workspace { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .4rem; }
.map-notes-panel [data-note-error]:empty { display: none; }

/* Map Notes is a map-first workspace, not a blocking settings dialog. */
body.map-notes-authoring #viewDiv canvas { cursor: crosshair !important; }
.map-note-marker { width: 16px; height: 16px; border: 2px solid white; border-radius: 50%; background: #087c68; box-shadow: 0 1px 5px #0008; pointer-events: none; }
.map-note-marker--draft { width: 20px; height: 20px; background: #eaa51f; }
.map-notes-panel .field textarea { width: 100%; min-width: 0; min-height: 5rem; resize: vertical; border: 1px solid var(--line); border-radius: 6px; padding: 10px 11px; background: var(--surface); color: var(--ink); font: inherit; }
.map-notes-panel button { border: 1px solid var(--line); border-radius: 6px; padding: .55rem .75rem; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.map-notes-panel button.button--primary { background: var(--accent); color: white; }
.map-notes-panel button:disabled { opacity: .55; cursor: not-allowed; }

.map-note-qr { display: block; width: min(100%, 560px); height: auto; image-rendering: pixelated; background: #fff; }
/* Keep the data notes pane in the flexible row even when its tab bar is hidden. */
body.utility-panel-open .utility-panel:has([data-utility-pane="data-notes"]:not([hidden])) .utility-panes { grid-row: 3; }

.map-note-context:not(:empty) { display: grid; gap: .5rem; margin-block: .75rem 1rem; }
.map-note-context label { display: flex; align-items: baseline; gap: .5rem; overflow-wrap: anywhere; }
.map-note-context input { flex: none; }

/* Map Note tools and insight actions share the rest of the application's controls. */
.insight-note-actions { display:flex; flex-wrap:wrap; gap:.5rem; padding:0 10px 10px; }
.insight-note-actions button, .map-note-mode button, [data-note-history] { appearance:none; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); padding:.55rem .8rem; font:inherit; cursor:pointer; }
.insight-note-actions button { padding:4px 7px; border-color:transparent; color:var(--muted); font-size:11px; font-weight:600; }
.insight-attributes summary { padding:0 10px 10px; color:var(--green-2); font-size:11px; font-weight:600; cursor:pointer; }
.insight-note-actions button:hover, .map-note-mode button:hover, [data-note-history]:hover { border-color:var(--accent); color:var(--accent); }
.map-note-mode { display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:.85rem; margin:1rem 0; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.map-note-mode p { margin:.25rem 0 0; }
.map-note-mode button { flex:none; }
.map-note-mode button[aria-pressed="true"] { background:var(--accent); color:white; }
.map-note-category-grid { display:flex; flex-wrap:wrap; gap:.5rem; margin:.75rem 0; }
.map-note-category-grid label { display:inline-flex; align-items:center; gap:.4rem; padding:.4rem .65rem; border:1px solid var(--line); border-radius:999px; background:var(--surface); font-size:.9em; }
.map-note-category-grid label:has(input:checked) { border-color:var(--accent); color:var(--accent); }
[data-map-note-location-history] details { margin:.75rem 0; }
[data-note-history] { margin:.35rem .35rem 0 0; }
@media (max-width:480px) { .map-note-mode { align-items:flex-start; flex-direction:column; } }

/* Map Notes: prioritize the annotation and progressively disclose metadata. */
.map-notes-panel [data-data-note-form] { display: grid; gap: 12px; min-width: 0; }
.map-notes-panel [data-data-note-form] .field,
.map-notes-panel [data-map-note-filter-panel] .field { margin: 0; min-width: 0; }
.map-notes-panel [data-data-note-form] .field > span small { color: var(--muted); font-weight: 400; }
.map-note-metadata { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); align-items: start; gap: 12px; }
.map-note-metadata [data-custom-category], .map-note-extra-categories { grid-column: 1 / -1; }
.map-note-extra-categories, .map-note-target-details, .map-note-context__details, .map-notes-panel [data-map-note-filter-panel] > details { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.map-note-extra-categories summary, .map-note-target-details summary, .map-note-context__details summary, .map-notes-panel [data-map-note-filter-panel] > details > summary { cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }
.map-note-target-details[open], .map-note-extra-categories[open], .map-note-context__details[open] { display: grid; gap: 10px; }
.map-note-context:not(:empty) { display: block; margin: 0; }
.map-note-context__details label { margin-top: 8px; }
.map-note-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; margin-top: 12px; }
.map-notes-panel [data-map-note-error]:empty { display: none; }
.map-notes-panel [data-map-note-error]:not(:empty) { margin: 0; color: var(--ink); }
.map-notes-panel .map-note-mode { margin: 0; }

/* Map Notes workspace responds to its panel, not the browser window. */
#utility-data-notes-content { container-type: inline-size; }
.map-notes-panel { gap: 16px; }
.map-notes-panel section[hidden] { display: none; }
.map-note-workspace-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.map-note-workspace-head h3 { font: 600 23px/1.15 "Newsreader", Georgia, serif; }
.map-note-workspace-head p { margin: 4px 0 0; }
.map-note-kicker { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.map-note-size-controls, .map-note-view-nav { display: flex; gap: 6px; }
.map-notes-panel .map-note-size-controls button { min-width: 36px; padding: .4rem; }
.map-note-view-nav { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.map-notes-panel .map-note-view-nav button { border-color: transparent; background: transparent; color: var(--muted); font-weight: 700; }
.map-notes-panel .map-note-view-nav button[aria-pressed="true"] { color: var(--ink); background: var(--surface); border-color: var(--line); }
.map-note-view-nav span { font-size: .8em; opacity: .7; }
.map-note-section-heading p { margin: 5px 0 0; }
.map-note-mode { padding: 10px 12px; }
.map-note-mode strong { font-size: .85em; }
.map-note-mode p { font-size: .85em; }
.map-notes-panel [data-data-note-form] > .map-note-card__actions { position: sticky; bottom: 0; z-index: 1; justify-content: flex-end; padding: 10px 0; background: var(--paper); }
.map-note-list { display: grid; gap: 8px; min-width: 0; }
.map-note-list .map-note-card { display: grid; gap: 6px; }
.map-note-list .map-note-card > p:not([data-note-workflow]), .map-note-list .map-note-card > details { display: none; }
.map-note-list .map-note-card small, .map-note-list .map-note-card [data-note-workflow] { margin: 0; color: var(--muted); }
.map-note-bulk { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.map-note-bulk summary { cursor: pointer; font-weight: 600; }
.map-note-bulk[open] > *:not(summary) { margin-top: 10px; }
.map-notes-panel [data-note-review] > button { justify-self: start; }
.map-notes-panel [data-note-review-slot] .map-note-card { display: grid; gap: 10px; }
.map-notes-panel [data-note-review-slot] .map-note-card p { margin: 0; }
@container (min-width: 680px) {
  .map-note-list { gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
  .map-note-list .map-note-card { grid-template-columns: minmax(150px, 1.2fr) minmax(120px, 1fr) minmax(140px, 1fr) auto; align-items: center; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .map-note-list .map-note-card:last-child { border-bottom: 0; }
  .map-note-list .map-note-card__actions { justify-content: end; }
  .map-note-list .map-note-card__actions [data-map-note-edit], .map-note-list .map-note-card__actions [data-map-note-remove] { display: none; }
}
@media (max-width: 760px) { .map-note-size-controls { display: none; } }
.map-note-target-control { display: grid; gap: 7px; min-width: 0; }
.map-note-target-control > span { font-size: 11px; font-weight: 700; }
.map-note-target-options { display: flex; flex-wrap: wrap; gap: 5px; }
.map-notes-panel .map-note-target-options button { flex: 1 1 auto; text-transform: capitalize; padding: .45rem .65rem; font-size: .9em; }
.map-notes-panel .map-note-target-options button[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); background: var(--surface-2, var(--surface)); }
.map-note-filter-grid { margin-top: 0; }
.map-note-list .map-note-card[hidden] { display: none; }
.map-note-list .map-note-review-context { display: none; }
.map-note-review-context { display: grid; gap: 6px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.map-note-review-context p { margin: 0; color: var(--muted); font-size: .9em; }
.map-note-review-context button { justify-self: start; }
.map-note-review-label, .map-note-suggestions > span { font-size: .75em; font-weight: 700; color: var(--muted); }
.map-note-tags { display: grid; gap: 8px; min-width: 0; }
.map-note-suggestions > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.map-notes-panel .map-note-suggestions button { border-radius: 999px; padding: .3rem .6rem; font-size: .8em; }
.map-note-filter-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.map-note-filter-actions p { margin: 0; }
.map-notes-panel [data-note-review-slot] [data-note-review-open] { display: none; }

/* Map Notes composer: a compact editor beside its geographic context. */
.map-note-composer-grid { display: grid; gap: 16px; min-width: 0; align-items: start; }
.map-note-composer-main, .map-note-composer-context { display: grid; gap: 14px; min-width: 0; }
.map-note-composer-context { padding: 14px; border: 1px solid var(--line); border-radius: var(--ui-radius, 10px); background: var(--surface-2); }
.map-note-context-header { display: flex; gap: 10px; align-items: flex-start; }
.map-note-context-header > span { color: var(--green-2); font-size: 20px; line-height: 1; }
.map-note-context-header p { margin: 3px 0 0; }
.map-note-context { display: grid !important; gap: 8px; }
.map-note-context-card { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 7px); background: var(--surface); overflow-wrap: anywhere; }
.map-note-context-card span { color: var(--muted); font-size: .75em; font-weight: 700; }
.map-note-context-card strong { font-size: .9em; font-weight: 600; }
.map-note-context > .form-note { margin: 0; }
.map-note-other-targets { color: var(--muted); font-size: .85em; }
.map-note-other-targets summary { cursor: pointer; }
.map-note-other-targets[open] .field { margin-top: 8px; }
.map-note-metadata { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.map-note-metadata .map-note-extra-categories { grid-column: auto; align-self: end; }
.map-note-metadata [data-custom-category] { grid-column: 1 / -1; }
.map-note-extra-categories { padding: 9px 12px; }
.map-note-extra-categories summary { font-size: .85em; }
.map-note-extra-categories[open] { grid-column: 1 / -1; }
.map-note-extra-categories .form-note { margin: 6px 0; }
.map-note-target-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 7px); overflow: hidden; }
.map-notes-panel .map-note-target-options button { min-width: 0; padding: 9px 4px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: var(--surface); }
.map-notes-panel .map-note-target-options button:last-child { border-right: 0; }
.map-notes-panel .map-note-target-options button[aria-pressed="true"] { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 -3px var(--green-2); }
.map-notes-panel [data-data-note-form] .map-note-card__actions { border-top: 1px solid var(--line); gap: 8px; }
.map-notes-panel button.button--primary { color: #fff; background: var(--green); border-color: var(--green); font-weight: 700; }
.map-notes-panel button.button--primary:hover { background: var(--green-2); border-color: var(--green-2); }
.map-note-draft-status { margin: 0; font-size: .8em; }
@container (min-width: 720px) {
  .map-note-composer-grid { grid-template-columns: minmax(0, 1.6fr) minmax(220px, .9fr); }
}
@container (max-width: 400px) {
  .map-note-metadata { grid-template-columns: minmax(0, 1fr); }
  .map-note-metadata [data-custom-category], .map-note-extra-categories[open] { grid-column: auto; }
  .map-note-target-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-notes-panel .map-note-target-options button:nth-child(2) { border-right: 0; }
  .map-notes-panel .map-note-target-options button:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
.map-note-context-card [data-draft-note-zoom] { justify-self: start; margin-top: 4px; padding: .4rem .65rem; font-size: .85em; }
.map-note-target-fields { display: grid; gap: 10px; min-width: 0; }
.map-note-target-fields > [hidden] { display: none; }
.map-note-target-fields:has(> :not([hidden])) { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 7px); background: var(--surface); }
.map-note-target-fields .form-note { margin: 6px 0 0; }

/* Project notes overview shares the sidebar's skin and docks like Layers. */
.notes-hub { display:grid; gap:12px; }
.notes-hub__project { display:grid; grid-template-columns:1fr auto; align-items:center; gap:2px 8px; }
.notes-hub__project span { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
.notes-hub__project strong { grid-column:1; overflow-wrap:anywhere; }
.notes-hub__project button { grid-column:2; grid-row:1 / 3; }
.notes-hub__tabs { display:flex; gap:4px; flex-wrap:wrap; }
.notes-hub__tabs button { flex:1 1 auto; }
.notes-hub__tabs button[aria-pressed="true"] { background:var(--green); color:#fff; }
.notes-hub__tabs span { margin-left:5px; opacity:.75; }
.notes-hub__list { display:grid; gap:6px; max-height:280px; overflow:auto; }
.notes-hub__item { display:grid; text-align:left; gap:4px; min-width:0; }
.notes-hub__item strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.notes-hub__item small, .notes-hub__empty { color:var(--muted); }
.notes-hub__empty { margin:0; padding:14px; text-align:center; border:1px dashed var(--line); border-radius:var(--ui-radius-small); }
.notes-hub__actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(135px,1fr)); gap:6px; }
.notes-hub button { padding:8px; border:1px solid var(--line); border-radius:var(--ui-radius-small); background:var(--surface); color:var(--ink); cursor:pointer; }
.notes-hub button:hover:not(:disabled) { border-color:var(--green-2); }
.notes-hub button:disabled { opacity:.5; cursor:not-allowed; }
.notes-hub__tabs button[aria-pressed="true"] { background:var(--green); color:#fff; }

/* Keep Notes aligned with the compact typography used by Layers. */
.notes-hub,
.map-notes-panel {
  font: 400 12px/1.5 var(--ui-font, "DM Sans", sans-serif);
}
.notes-hub button,
.map-notes-panel button,
.map-notes-panel input:not([type="checkbox"]):not([type="radio"]),
.map-notes-panel select,
.map-notes-panel textarea {
  font-family: var(--ui-font, "DM Sans", sans-serif);
  font-size: 12px;
  line-height: 1.4;
}
.notes-hub button { min-height: 38px; font-weight: 600; }
.notes-hub__project strong,
.notes-hub__item strong { font-size: 12px; }
.notes-hub__empty { font-size: 12px; line-height: 1.5; }
.map-notes-panel h3 { font: 700 16px/1.25 var(--ui-font, "DM Sans", sans-serif); }
.map-notes-panel .map-note-workspace-head h3 { font: 600 19px/1.1 "Newsreader", Georgia, serif; }
.map-notes-panel .field > span,
.map-notes-panel .map-note-target-control > span { font-size: 11px; }
.map-notes-panel button { min-height: 38px; padding: 7px 10px; font-weight: 600; }
.map-notes-panel .map-note-size-controls button { min-height: 36px; }
.map-notes-panel .map-note-mode strong,
.map-notes-panel .map-note-mode p { font-size: 12px; }
.map-notes-panel .map-note-extra-categories summary,
.map-notes-panel .map-note-target-details summary,
.map-notes-panel [data-map-note-filter-panel] > details > summary { font-size: 12px; }
/* iOS zooms small editable text on focus; keep mobile editing comfortable. */
@media (max-width: 760px) {
  .map-notes-panel input:not([type="checkbox"]):not([type="radio"]),
  .map-notes-panel select,
  .map-notes-panel textarea { font-size: 16px; }
}

/* Field Notes follows the Field Tasks overview and editor surfaces. */
.field-notes-panel [hidden] { display: none !important; }
.field-notes-panel [data-field-note-overview] { gap: 14px; }
.field-notes-panel [data-field-note-overview] .mobile-workflow__subtitle { margin: 0; font-size: 12px; }
.field-notes-panel [data-field-note-overview] .mobile-primary { width: 100%; margin: 0; min-height: 44px; background: var(--green); border-color: var(--green); color: var(--on-accent, #fff); font-weight: 700; }
.field-notes-panel .mobile-empty, .field-notes-panel .map-note-card, .field-notes-editor__card { background: var(--surface); border-color: var(--line); }
.field-notes-panel .mobile-empty h2 { font: 700 19px/1.15 var(--ui-heading); }
.field-notes-editor { display: grid; gap: 12px; min-width: 0; }
.field-notes-editor > button { justify-self: start; }
.field-notes-editor__card { margin: 0; }
.field-notes-editor__card .field { margin: 0; }
.field-notes-panel .field-notes-editor__card :is(input:not([type="checkbox"]), select, textarea) { background: var(--surface-2); }
.field-note-review-card { display: grid; gap: 6px; min-width: 0; }
.field-note-review-card .status-pill { justify-self: start; margin-bottom: 0; font-size: 10px; }
.field-note-review-card h3, .field-note-review-card p, .field-note-review-card .feed-card__meta { margin: 0; }
.field-note-review-card .feed-card__actions { margin-top: 6px; }
.field-note-review-card .feed-card__actions button:first-child[data-note-edit] { color: var(--on-accent, #fff); background: var(--green); border-color: var(--green); }

/* Data-driven Brief preview: progressive disclosure without altering slides. */
.briefing-series-preview { border:1px solid var(--line); border-radius:8px; padding:10px; }
.briefing-series-preview summary { cursor:pointer; font-size:13px; font-weight:700; }
.briefing-series-preview[open] > * + * { margin-top:8px; }
.briefing-series-preview [data-series-results] ul { max-height:14rem; overflow:auto; padding-left:1.4rem; font-size:12px; }

/* Data-driven timeline controls stay separate from the slide navigation. */
.briefing-field[hidden], .briefing-timeline-playback[hidden] { display:none !important; }
.briefing-timeline-playback { position:absolute; z-index:3; left:50%; bottom:78px; transform:translateX(-50%); display:flex; align-items:center; flex-wrap:wrap; justify-content:center; gap:8px; width:max-content; max-width:calc(100% - 24px); padding:8px 12px; border:1px solid var(--line); border-radius:12px; color:var(--ink); background:var(--surface); box-shadow:var(--shadow); font-size:12px; }
.briefing-timeline-playback label { display:flex; align-items:center; gap:5px; }
.briefing-timeline-playback input[type="range"] { width:100px; }
.briefing-timeline-playback select, .briefing-timeline-playback button { font:inherit; color:var(--ink); background:var(--surface-2); border:1px solid var(--line); border-radius:6px; padding:5px; }
.briefing-cards .briefing-timeline-playback { top:calc(58px + env(safe-area-inset-top)); bottom:auto; }

/* Cinematic reserves the map for the story. The rail contains only a small
   transport and progressive disclosures; the primary scrubber lives on-map. */
.cinematic-dashboard { gap:12px; align-content:start; }
.cinematic-dashboard header { display:grid; gap:4px; }
.cinematic-dashboard header .eyebrow { font-size:11px; }
.cinematic-dashboard header h2 { font-size:25px; }
.cinematic-dashboard [data-cinematic-time-label] { min-block-size:0; margin:0; font-size:13px; font-variant-numeric:tabular-nums; line-height:1.45; }
.cinematic-mode-strip { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.07em; }
.cinematic-mode-strip label { display:flex; align-items:center; gap:6px; font-weight:700; }
.cinematic-mode-strip select { padding:3px 5px; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:5px; font:600 11px var(--ui-font, system-ui, sans-serif); text-transform:none; letter-spacing:normal; }
.cinematic-inspector { display:grid; gap:5px; padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); }
.cinematic-inspector > .eyebrow { font-size:10px; }
.cinematic-inspector > strong { font-size:13px; }
.cinematic-inspector p { display:grid; gap:2px; margin:0; font-size:12px; }
.cinematic-inspector p span, .cinematic-inspector small { color:var(--muted); font-size:11px; line-height:1.35; }
.cinematic-quick-controls { display:flex; align-items:center; gap:6px; }
.cinematic-quick-controls button, .cinematic-actions button, .cinematic-footer-actions button { min-height:34px; padding:6px 9px; font:600 13px/1 var(--ui-font, system-ui, sans-serif); color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:7px; }
.cinematic-quick-controls [data-cinematic-play] { color:var(--on-accent, #fff); background:var(--green); border-color:var(--green); }
.cinematic-provenance { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.cinematic-disclosure { border-top:1px solid var(--line); }
.cinematic-disclosure summary { padding:10px 0; color:var(--ink); cursor:pointer; font-size:13px; font-weight:700; list-style-position:inside; }
.cinematic-disclosure[open] summary { border-bottom:1px solid var(--line); }
.cinematic-controls { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px 10px; padding:10px 0 2px; }
.cinematic-controls label { display:flex; align-items:center; justify-content:space-between; gap:7px; min-width:0; color:var(--muted); font-size:12px; font-weight:600; }
.cinematic-controls select { min-width:0; max-width:126px; padding:5px 6px; font:inherit; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:6px; }
.cinematic-controls input[type="range"] { min-width:0; width:100%; }
.cinematic-controls__scrub { grid-column:1 / -1; }
.cinematic-disclosure .form-note { margin:7px 0 0; font-size:11px; line-height:1.45; }
.animate-options { display:grid; gap:10px; margin:12px 0 4px; }
.animate-option { display:grid; gap:5px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.animate-option header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.animate-option__kind { color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.animate-option strong { font-size:14px; }
.animate-option p { margin:0; color:var(--muted); font-size:12px; line-height:1.45; }
.animate-option__actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.animate-option__actions button { min-height:30px; padding:5px 10px; font:600 12px/1 var(--ui-font, system-ui, sans-serif); color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:7px; cursor:pointer; }
.animate-option__actions .button--primary { color:var(--on-accent, #fff); background:var(--green); border-color:var(--green); }
.cinematic-needs-data { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; margin-top:14px; }
.cinematic-needs-data button { display:grid; gap:4px; align-content:start; min-width:0; padding:12px 14px; text-align:left; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:10px; cursor:pointer; font:inherit; }
.cinematic-needs-data button:hover, .cinematic-needs-data button:focus-visible { border-color:var(--green); }
.cinematic-needs-data strong { font-size:14px; }
.cinematic-needs-data span { color:var(--muted); font-size:12px; line-height:1.4; }
@media (max-width: 560px) { .cinematic-needs-data { grid-template-columns:1fr; } }
.cinematic-badge { display:inline-block; margin:0 4px 2px 0; padding:1px 7px; border-radius:999px; font-size:10px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; vertical-align:1px; color:var(--ink); background:var(--surface); border:1px solid var(--line); }
.cinematic-badge--observed { color:#0f5e48; background:#e3f4ec; border-color:#a9d9c2; }
.cinematic-badge--illustrative { color:#7a4a05; background:#fdf1dc; border-color:#efcf94; }
.cinematic-badge--modeled, .cinematic-badge--forecast { color:#284c8a; background:#e6eefb; border-color:#b3c7ec; }
.cinematic-badge--interpolated { color:#6a2d78; background:#f3e7f6; border-color:#d8b6e0; }
.cinematic-track-motion { grid-column:1 / -1; font-size:12px; }
.cinematic-track-motion summary { cursor:pointer; color:var(--muted); font-weight:600; }
.cinematic-track-motion__grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px 10px; padding:6px 0 0; }
.cinematic-track-motion__grid label { display:flex; align-items:center; justify-content:space-between; gap:6px; min-width:0; color:var(--muted); font-weight:600; }
.cinematic-track-motion__grid select { min-width:0; max-width:110px; padding:3px 5px; font:inherit; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:6px; }
.cinematic-track-motion__grid input[type="color"] { width:34px; height:22px; padding:0; border:1px solid var(--line); border-radius:4px; background:none; }
.cinematic-tracks { display:grid; gap:8px; margin:0; padding:10px 0 4px; list-style:none; }
.cinematic-tracks li { display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:center; gap:4px 8px; }
.cinematic-tracks li > span { display:grid; gap:2px; min-width:0; font-size:12px; }
.cinematic-tracks b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); }
.cinematic-tracks small { color:var(--muted); font-size:11px; }
.cinematic-tracks select, .cinematic-track-add select { min-width:0; max-width:140px; padding:5px 6px; font:inherit; font-size:12px; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:6px; }
.cinematic-track-remove { grid-column:2; justify-self:end; padding:0; color:var(--muted); background:transparent; border:0; font:600 11px/1.2 var(--ui-font, system-ui, sans-serif); text-decoration:underline; text-underline-offset:2px; cursor:pointer; }
.cinematic-track-remove:hover { color:var(--ink); }
.cinematic-track-add { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; align-items:end; padding:8px 0 0; border-top:1px dashed var(--line); }
.cinematic-track-add label { display:grid; gap:3px; min-width:0; color:var(--muted); font-size:12px; font-weight:600; }
.cinematic-track-add select { max-width:none; width:100%; }
.cinematic-track-add button { grid-column:1 / -1; min-height:32px; font:600 12px/1 var(--ui-font, system-ui, sans-serif); color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:7px; }
.cinematic-actions { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px; padding:0 0 8px; }
.cinematic-actions button { min-width:0; font-size:12px; }
.cinematic-actions .cinematic-clip-summary { grid-column:1 / -1; margin:0 0 2px; }
.cinematic-dates { display:grid; gap:8px; margin:10px 0 0; padding:10px 0 0; border:0; border-top:1px solid var(--line); }
.cinematic-dates legend { padding:0; font-weight:700; font-size:13px; }
.cinematic-dates__range { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.cinematic-dates label { display:grid; gap:3px; font-size:12px; color:var(--muted); }
.cinematic-dates input { min-width:0; min-height:32px; font-size:12px; }
.cinematic-dates__actions { display:flex; gap:8px; }
.cinematic-dates__goto { display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:end; gap:8px; }
.cinematic-dates button { min-height:32px; padding:5px 10px; font-size:12px; }
.cinematic-dates .form-note { margin:0; }
[data-clip-custom][hidden] { display:none; }
.clip-cameras, .clip-captions { display:grid; gap:8px; margin:12px 0 0; }
.clip-camera { display:grid; grid-template-columns:44px minmax(0, 1fr) auto auto; align-items:center; gap:8px; font-size:13px; }
.clip-camera span { min-width:0; color:var(--muted); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.clip-camera button, .clip-captions > button { min-height:32px; padding:5px 10px; font-size:12px; }
.clip-captions > button { justify-self:start; }
.clip-caption { display:grid; grid-template-columns:76px minmax(0, 1fr) auto; align-items:center; gap:8px; }
.clip-caption input { min-width:0; min-height:34px; }
@media (max-width:560px) { .clip-camera { grid-template-columns:44px minmax(0, 1fr); } .clip-camera button { grid-column:span 1; } }
.cinematic-footer-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:2px; }
.cinematic-footer-actions button { border:0; padding-inline:0; color:var(--muted); background:transparent; }
.cinematic-footer-actions [data-cinematic-exit] { color:var(--green); }
/* Sits inside the map, where MapLibre sets its own font, so every skin token is named here. */
.cinematic-map-timeline { position:absolute; z-index:8; left:50%; bottom:28px; transform:translateX(-50%); display:grid; gap:.35rem; width:min(720px, calc(100% - 32px)); padding:.65rem .8rem; color:var(--ink); background:color-mix(in srgb, var(--surface) 94%, transparent); border:var(--ui-border-width, 1px) solid var(--line); border-radius:var(--ui-radius, 10px); box-shadow:var(--ui-panel-shadow, var(--shadow)); font-family:var(--ui-font, inherit); font-size:.78rem; font-variant-numeric:tabular-nums; }
.cinematic-map-timeline__meta, .cinematic-map-timeline__controls { display:flex; align-items:center; gap:.55rem; }
.cinematic-map-timeline__meta { justify-content:space-between; }
.cinematic-map-timeline__meta strong { font-family:var(--ui-heading, inherit); font-size:.9rem; color:var(--green-2); }
.cinematic-map-timeline__meta span { color:var(--muted); }
.cinematic-map-timeline__controls input { accent-color:var(--green-2); }
.cinematic-map-timeline__controls input[type="range"] { flex:1 1 10rem; min-width:5rem; }
.cinematic-map-timeline__controls button { font:inherit; font-weight:600; color:var(--ink); background:var(--surface-2); border:var(--ui-border-width, 1px) solid var(--line); border-radius:var(--ui-radius-small, 6px); padding:.28rem .48rem; }
.cinematic-map-timeline__controls button[aria-pressed="true"] { color:var(--surface); background:var(--green-2); border-color:var(--green-2); }
.cinematic-map-timeline__controls label { white-space:nowrap; }
:root[data-skin="highway"] .cinematic-map-timeline { background-image:linear-gradient(rgb(23 32 43 / 2%) 1px,transparent 1px); background-size:100% 24px; }
:root[data-skin="highway"] .cinematic-map-timeline__meta strong { text-transform:uppercase; letter-spacing:.06em; }
:root[data-skin="violet-circuit"] .cinematic-map-timeline { background-image:linear-gradient(90deg,transparent 97%,rgb(143 99 255 / 10%) 100%); background-size:24px 24px; }
.cinematic-map-timeline__body { display:grid; gap:.35rem; }
.cinematic-chart { margin:0; display:grid; gap:.2rem; --chart-bar:var(--chart-lit, #ff9a3c); }
.cinematic-chart figcaption { display:flex; justify-content:space-between; gap:.6rem; color:var(--muted); font-size:.72rem; }
.cinematic-chart figcaption small { font-size:inherit; opacity:.8; }
.cinematic-chart [data-cinematic-chart-count] { color:var(--ink); font-weight:600; }
.cinematic-chart svg { display:block; width:100%; height:44px; overflow:visible; cursor:pointer; }
.cinematic-chart__future rect { fill:color-mix(in srgb, var(--muted) 38%, transparent); }
.cinematic-chart__past rect { fill:var(--chart-bar); }
.cinematic-chart__base { stroke:var(--line); stroke-width:1; }
.cinematic-chart__head { stroke:var(--ink); stroke-width:1.25; }
.cinematic-chart__axis { position:relative; height:1em; color:var(--muted); font-size:.68rem; }
.cinematic-chart__axis span { position:absolute; top:0; transform:translateX(-50%); white-space:nowrap; }
.cinematic-chart__axis span:first-child { transform:none; }
.cinematic-chart__axis span:last-child { transform:translateX(-100%); }
@media (max-width: 720px) { .cinematic-map-timeline { bottom:68px; } .cinematic-chart svg { height:32px; } .cinematic-chart__axis span:nth-child(even) { display:none; } .cinematic-map-timeline__controls span { display:none; } }

/* Compact, readable timeline preview at both workspace widths. */
.timeline-preview-chart { display: grid; gap: .45rem; margin: .75rem 0; }
.timeline-preview-chart__row { display: grid; grid-template-columns: minmax(5rem, 1fr) minmax(3rem, 2fr) auto; gap: .55rem; align-items: center; font-size: .85rem; }
.timeline-preview-chart__row small { grid-column: 1 / -1; }
.timeline-preview-chart__track { height: .5rem; border-radius: 1rem; background: var(--border, #aab8b4); overflow: hidden; }
.timeline-preview-chart__track > span { display: block; height: 100%; background: var(--accent, #238a70); border-radius: inherit; }

.briefing-grid-locator { width: 4rem; max-height: 4rem; display: block; color: var(--accent, #238a70); margin: .5rem 0; }

/* ?briefingLayout=2: Deck in the sidebar, Data docked at the bottom of the map, Inspector on the right. */
body.briefing-v2 .briefing-tabs { display:none; }
body.briefing-v2 #briefing-context-host { display:none; }
body.briefing-v2 .map-status { bottom:calc(var(--briefing-dock-height, 36vh) + 10px); }
.briefing-data-dock { position:absolute; z-index:6; left:0; right:0; bottom:0; height:var(--briefing-dock-height, 36vh); display:grid; grid-template-rows:auto auto minmax(0,1fr); background:var(--surface); color:var(--ink); border-top:1px solid var(--line); box-shadow:0 -10px 28px rgb(0 0 0 / 14%); }
.briefing-data-dock[hidden] { display:none; }
.briefing-data-dock.is-collapsed { height:auto; }
.briefing-data-dock.is-collapsed .briefing-data-dock__body { display:none; }
.briefing-data-dock__resizer { height:7px; cursor:ns-resize; background:linear-gradient(var(--line),var(--line)) center / 44px 3px no-repeat; }
.briefing-data-dock__resizer:focus-visible { outline:2px solid var(--green-2,var(--green)); }
.briefing-data-dock__header { display:flex; align-items:center; gap:12px; padding:2px 14px 6px; }
.briefing-data-dock__header strong { font-size:14px; }
.briefing-data-dock__header span { color:var(--muted); font-size:12px; }
.briefing-data-dock__header button { margin-left:auto; }
.briefing-data-dock__body { display:grid; grid-template-columns:minmax(320px,420px) minmax(0,1fr); gap:16px; min-height:0; padding:0 14px 12px; overflow:hidden; }
.briefing-data-dock__filters, .briefing-data-dock__records { min-height:0; overflow:auto; }
.briefing-data-dock__filters { display:grid; gap:10px; align-content:start; }
.briefing-data-dock__records .briefing-records { max-height:none; }
.briefing-data-dock__actions { position:absolute; z-index:1; bottom:calc(100% + 12px); left:50%; transform:translateX(-50%); display:flex; gap:10px; max-width:calc(100% - 24px); padding:10px; border:1px solid var(--line); border-radius:var(--ui-radius,12px); background:var(--surface); box-shadow:0 8px 24px rgb(7 29 23 / 22%); }
.briefing-data-dock__actions[hidden] { display:none; }
.briefing-data-dock__actions button { min-height:48px; padding:10px 20px; border:1px solid var(--green); border-radius:var(--ui-radius-small,7px); color:var(--green); background:var(--surface); font-size:15px; font-weight:700; white-space:nowrap; cursor:pointer; }
.briefing-data-dock__actions .briefing-slides__present { color:var(--on-accent,#fff); background:var(--green); }
.briefing-data-dock__camera { position:absolute; z-index:1; bottom:calc(100% + 12px); left:12px; display:flex; flex-wrap:wrap; align-items:center; gap:6px; max-width:260px; padding:8px; border:1px solid var(--line); border-radius:var(--ui-radius,12px); background:var(--surface); box-shadow:0 8px 24px rgb(7 29 23 / 18%); }
.briefing-data-dock__camera[hidden] { display:none; }
.briefing-data-dock__camera span { width:100%; font-size:11px; font-weight:700; }
.briefing-data-dock__camera small { width:100%; color:var(--muted); font-size:10px; }
.briefing-data-dock__camera button { padding:6px 9px; border:1px solid var(--line); border-radius:var(--ui-radius-small,8px); color:var(--ink); background:var(--surface-2); cursor:pointer; }
body.briefing-v2:has(#briefing-data-dock:not([hidden])) .briefing-slides__actions { display:none; }
.briefing-slides__templates { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:8px 0; }
.briefing-slides__templates span { flex-basis:100%; color:var(--muted); font-size:12px; font-weight:700; }
.briefing-slides__templates button { padding:4px 10px; border:1px solid var(--line); border-radius:999px; background:var(--surface-2); color:var(--ink); font-size:12px; }
.briefing-slides__templates button[aria-pressed="true"] { border-color:var(--green-2,var(--green)); color:var(--green-2,var(--green)); font-weight:700; }
.briefing-inspector { display:grid; gap:16px; align-content:start; }
.briefing-inspector__feature { display:grid; gap:10px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.briefing-inspector__feature .briefing-context { position:static; width:auto; max-height:none; margin:0; box-shadow:none; }
.briefing-inspector__slide { display:grid; gap:12px; }
body.briefing-presenting .briefing-data-dock { display:none!important; }
body.briefing-v2 .briefing-groups { display:none; }
.briefing-new-slides { padding:10px 12px; border:1px solid var(--line); border-radius:var(--ui-radius,12px); background:var(--surface-2); }
.briefing-new-slides summary { cursor:pointer; font-size:14px; font-weight:700; }
.briefing-new-slides[open] > :not(summary) { margin-top:10px; }
.briefing-new-slides h3 { margin:0; font-size:14px; }
.briefing-new-slides__row { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.briefing-new-slides__row > span { flex-basis:100%; color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.briefing-new-slides__row button:not(.briefing-slides__auto button), .briefing-new-slides [data-new-blank] { padding:4px 10px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--ink); font-size:12px; }
.briefing-new-slides .briefing-slides__auto { display:flex; flex-wrap:wrap; gap:6px; width:100%; }
.briefing-new-slides .briefing-slides__auto button, .briefing-new-slides [data-slides-add-included] { flex:1 1 auto; margin:0; }
.briefing-template-form { display:grid; gap:8px; padding:12px; border:1px solid var(--line); border-radius:var(--ui-radius-small,10px); }
.briefing-template-form[hidden], .briefing-inspector__feature[hidden] { display:none; }
.briefing-template-form h3 { margin:0; font-size:15px; }
.briefing-inspector :is(select,input:not([type="checkbox"]),textarea) { width:100%; min-width:0; min-height:36px; padding:7px 10px; border:1px solid var(--line); border-radius:var(--ui-radius-small,8px); background:var(--surface); color:var(--ink); font:inherit; }
.briefing-inspector :is(.briefing-template-form,.briefing-slide-editor) button:not(.briefing-link-button) { min-height:36px; padding:7px 12px; border:1px solid var(--line); border-radius:var(--ui-radius-small,8px); background:var(--surface); color:var(--ink); cursor:pointer; }
.briefing-editor-tabs { display:flex; gap:6px; max-width:100%; overflow-x:auto; padding:2px 2px 8px; }
.briefing-editor-tabs button { flex:0 0 auto; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:8px 10px; border:1px solid var(--line); border-radius:var(--ui-radius-small,8px); color:var(--ink); background:var(--surface); cursor:pointer; }
.briefing-editor-tabs button[aria-current="true"] { border-color:var(--green); background:var(--surface-2); font-weight:700; }
.briefing-editor-content-actions { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.briefing-editor-content-actions span { flex-basis:100%; font-size:12px; font-weight:700; }
.briefing-data-dock__add-slides { justify-self:start; min-height:36px; padding:7px 12px; border:1px solid var(--green); border-radius:var(--ui-radius-small,8px); color:var(--green); background:var(--surface); font-weight:700; cursor:pointer; }
body.briefing-v2 .briefing-slide-list { max-height:none; }
.briefing-data-table { display:grid; gap:6px; }
.briefing-data-table__pagination { display:flex; align-items:center; flex-wrap:wrap; gap:8px; color:var(--muted); font-size:12px; }
.briefing-data-table__pagination button { padding:6px 10px; border:1px solid var(--line); border-radius:var(--ui-radius-small,8px); background:var(--surface); color:var(--ink); cursor:pointer; }
.briefing-data-table__pagination button:disabled { opacity:.5; cursor:default; }
.briefing-data-table__toolbar { display:flex; align-items:center; gap:10px; font-size:12px; color:var(--muted); }
.briefing-data-table__toolbar button { margin-left:auto; padding:4px 10px; border:1px solid var(--green-2,var(--green)); border-radius:999px; background:none; color:var(--green-2,var(--green)); font-weight:700; }
.briefing-data-table table { width:100%; border-collapse:collapse; font-size:12px; }
.briefing-data-table thead th { position:sticky; top:0; z-index:1; background:var(--surface); text-align:left; border-bottom:1px solid var(--line); }
.briefing-data-table thead button { padding:6px 4px; border:0; background:none; color:var(--muted); font-weight:700; font-size:11px; cursor:pointer; }
.briefing-data-table :is(td, tbody th) { padding:5px 4px; border-bottom:1px solid var(--line); text-align:left; vertical-align:middle; font-weight:400; }
.briefing-data-table tbody th { font-weight:700; }
.briefing-data-table tr[data-dt-row] { cursor:pointer; }
.briefing-data-table tr[data-dt-row]:hover { background:var(--surface-2); }
.briefing-data-table tr.is-selected { background:color-mix(in srgb, var(--green-2, var(--green)) 14%, transparent); }
.briefing-data-table td:last-child { text-align:right; white-space:nowrap; }
.briefing-data-table td button { padding:2px 8px; border:1px solid var(--line); border-radius:999px; background:var(--surface-2); color:var(--ink); font-size:11px; }
.briefing-data-table__group td { background:var(--surface-2); }
.briefing-data-table__toggle { border:0!important; background:none!important; padding:2px 0!important; font-size:12px!important; }
.briefing-data-table__toggle small { color:var(--muted); }
body.briefing-v2 .briefing-data-dock :is(.briefing-select__add-slides, .briefing-select__generate) { display:none; }
.maplibre-legend__height { display:inline-block; flex:0 0 auto; width:12px; align-self:flex-end; border-radius:2px 2px 0 0; background:var(--green-2,var(--green)); opacity:.75; }

/* Cartography Lab (js/cartography-lab.js): numbered steps, saved styles, outputs. */
.cartography-lab { gap: 14px; }
.cartography-lab h3 { margin-top: -6px; }
.cartography-lab__intro { margin: -4px 0 0; }
.cartography-lab .field { margin-bottom: 10px; min-width: 0; }
.cartography-lab .field-grid > [hidden] { display: none; }
.cartography-lab__dimension { grid-template-columns: 1fr 1fr; margin: 0; }
.cartography-lab__dimension button { min-height: 34px; }
.cartography-lab__dimension button:disabled { opacity: .45; cursor: not-allowed; }
.cartography-lab__step { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 8px); background: var(--surface); }
.cartography-lab__step[hidden] { display: none; }
.cartography-lab__step h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 13px; }
.cartography-lab__step h4 > span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--on-accent, #fff); background: var(--green); font-size: 11px; }
.cartography-lab__step h4 small { color: var(--muted); font-weight: 500; }
.cartography-lab__step .display-checkbox { margin-top: 2px; }
.cartography-lab__inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cartography-lab__inline input { flex: 1 1 80px; min-width: 0; }
.cartography-lab__kept { margin: 0; }
.cartography-lab__kept code { word-break: break-word; }
.cartography-lab__actions { position: sticky; bottom: -16px; z-index: 1; display: flex; align-items: center; gap: 10px; margin: 0 -16px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--paper); }
.cartography-lab__actions .form-note { margin: 0; }
.cartography-lab button.button--primary, .cartography-lab button.button--secondary, .cartography-lab a.button--secondary { padding: 8px 12px; border: 1px solid var(--green); border-radius: 6px; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; }
.cartography-lab .button--primary { color: var(--on-accent, #fff); background: var(--green); }
.cartography-lab .button--secondary { color: var(--green-2); background: var(--surface); }
.cartography-lab .button--secondary:disabled { border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.cartography-lab__save { display: flex; gap: 8px; }
.cartography-lab__save input { flex: 1; min-width: 0; }
.cartography-lab__styles { display: grid; gap: 6px; margin: 4px 0; padding: 0; list-style: none; }
.cartography-lab__style { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.cartography-lab__style.is-new { border-color: var(--green-2); }
.cartography-lab__style small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.cartography-lab__badge { padding: 1px 6px; border-radius: 999px; color: var(--green-2); background: var(--surface-2); font-size: 10px; font-weight: 800; }
.cartography-lab__style-actions { display: flex; gap: 12px; font-size: 12px; }
.cartography-lab__import { justify-self: start; font-size: 12px; }
.cartography-lab__outputs { display: flex; flex-wrap: wrap; gap: 8px; }
.cartography-lab__tour { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.cartography-lab__tour input { width: 52px; }
.cartography-lab__result:empty { display: none; }
.cartography-lab__result .field { margin: 8px 0 4px; }
.cartography-lab [hidden] { display: none !important; }
.cartography-lab__actions button { flex: none; white-space: nowrap; }

/* The "Made with" credit in the map's attribution row: skin colours, so it stays legible over any basemap. */
.gismap-made-with { display: inline-block; padding: 0 4px; border-radius: 2px; background: var(--surface); color: var(--ink) !important; font-weight: 600; text-decoration: underline; }
.gismap-made-with:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

.spatial-analysis { display: grid; gap: 10px; }
.spatial-analysis__draw { border: 1px solid var(--line, #8884); border-radius: 6px; padding: 8px; }
.spatial-analysis__done { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); }

/* Map link loading: one stage per layer and analysis step, with real counts (load-progress.js). */
.load-progress { position:absolute; z-index:60; top:12px; left:50%; max-width:calc(100% - 32px); transform:translateX(-50%); pointer-events:none; transition:opacity .4s ease; }
.load-progress.is-finished { opacity:0; transition-delay:.9s; }
.load-progress ol { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:4px 0; margin:0; padding:6px 10px; list-style:none; border:1px solid var(--line); border-radius:999px; background:color-mix(in srgb, var(--surface) 92%, transparent); box-shadow:0 6px 20px rgb(17 39 33 / 14%); backdrop-filter:blur(6px); font-size:12px; }
.load-progress__stage { position:relative; display:flex; align-items:baseline; gap:6px; padding:3px 8px 5px; color:var(--muted); white-space:nowrap; }
.load-progress__stage + .load-progress__stage::before { content:"→"; position:absolute; left:-6px; color:var(--line); }
.load-progress__label { font-weight:600; }
.load-progress__count, .load-progress__left { font-variant-numeric:tabular-nums; }
.load-progress__left { opacity:.75; }
.load-progress__stage.is-active { color:var(--ink); }
.load-progress__stage.is-active::after { content:""; position:absolute; left:8px; right:8px; bottom:1px; height:2px; border-radius:2px; background:linear-gradient(90deg, var(--green-2) calc(var(--progress, .35) * 100%), color-mix(in srgb, var(--green-2) 18%, transparent) 0); }
.load-progress__stage.is-active:not([style])::after { background:linear-gradient(90deg, transparent, var(--green-2), transparent) 0 0 / 50% 100% no-repeat; animation:load-progress-sweep 1.2s linear infinite; }
.load-progress__stage.is-done { color:var(--green-2); }
.load-progress__stage.is-done .load-progress__label::before { content:"✓ "; }
.load-progress__stage.is-failed { color:#b2182b; }
@keyframes load-progress-sweep { from { background-position:-100% 0; } to { background-position:200% 0; } }
@media (prefers-reduced-motion: reduce) { .load-progress__stage.is-active:not([style])::after { animation:none; background:var(--green-2); opacity:.5; } .load-progress { transition:none; } }
@media (max-width: 760px) { .load-progress { top:8px; } .load-progress ol { border-radius:12px; font-size:11px; } }

/* Tools › Infographics (Flow Map editor) */
.app-dialog:has(.infographic-editor) { width: min(1320px, calc(100% - 32px)); }
.app-dialog:has(.infographic-editor) .dialog__content { overflow-x: hidden; }
.infographic-editor { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.infographic-editor__inspector { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.infographic-editor__inspector details, .infographic-editor__preview details { border-top: 1px solid var(--line, rgb(127 127 127 / 25%)); padding: 8px 0 2px; }
.infographic-editor summary { cursor: pointer; font-weight: 700; padding: 4px 0 8px; }
.infographic-editor__mode { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.infographic-editor__mode legend { font-size: 12px; margin-bottom: 4px; }
.infographic-editor__toggles { border: 0; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.infographic-editor__toggles legend { font-size: 12px; margin-bottom: 6px; width: 100%; }
.infographic-editor__toggles small, .infographic-editor td small { color: var(--muted); }
.infographic-editor__note { border-left: 3px solid var(--line, rgb(127 127 127 / 25%)); padding-left: 10px; margin-bottom: 10px; }
.infographic-editor__note small { color: var(--muted); font-size: 11px; }
.infographic-editor__preview { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.infographic-editor__status { margin: 0; font-size: 12px; color: var(--muted); min-height: 1.4em; }
.infographic-editor__status.is-error { color: #b42318; }
.infographic-editor__canvas { display: flex; justify-content: center; }
.infographic-editor__canvas svg { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: 0 0 0 1px rgb(127 127 127 / 25%); }
.infographic-editor__canvas [data-flow-key] { cursor: pointer; }
.infographic-editor__selection { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.infographic-editor__selection p { margin: 0; font-size: 13px; flex: 1 1 320px; }
.infographic-editor__selection div { display: flex; gap: 8px; }
.infographic-editor__table-scroll { overflow-x: auto; max-width: 100%; }
.infographic-editor table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.infographic-editor th, .infographic-editor td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line, rgb(127 127 127 / 20%)); white-space: nowrap; }
.infographic-editor .is-number { text-align: right; font-variant-numeric: tabular-nums; }
.infographic-editor tr.is-selected { background: var(--surface-tint); color: var(--ink); }
.infographic-editor tr.is-muted td { color: var(--muted); }
.infographic-editor__pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding-top: 6px; font-size: 12px; }
.infographic-editor .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.infographic-editor :focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; }
@media (max-width: 900px) {
  .infographic-editor { grid-template-columns: minmax(0, 1fr); }
  .infographic-editor__preview { order: -1; }
}
.infographic-editor [hidden] { display: none !important; }
.infographic-editor__mode label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.infographic-editor__mode input, .infographic-editor__toggles input { width: auto; height: auto; min-height: 0; margin: 0; flex: none; }
.infographic-editor__toggles label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.infographic-editor__add { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 4px; }
.infographic-editor__add button, .infographic-editor__link button { min-height: 34px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 6px); color: var(--ink); background: var(--surface); font: 600 12px/1.2 var(--ui-font, sans-serif); cursor: pointer; }
.infographic-editor__add button:hover, .infographic-editor__link button:hover { border-color: var(--green-2); }
.infographic-editor__link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.infographic-editor__link .field { margin: 0; }
[data-ig-add-status].is-error { color: var(--danger, #b42318); }
/* Full window: the inspector and the preview scroll on their own, and the graphic fits the height. */
.app-dialog--fullwindow .infographic-editor { height: 100%; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 24px; }
.app-dialog--fullwindow .infographic-editor__inspector, .app-dialog--fullwindow .infographic-editor__preview { max-height: 100%; min-height: 0; overflow-y: auto; padding-right: 6px; align-content: start; }
.app-dialog--fullwindow .infographic-editor__canvas svg { width: auto; max-width: 100%; max-height: calc(100dvh - var(--fullwindow-top, 0px) - 230px); }
.infographic-editor__views { display: inline-flex; flex-wrap: wrap; gap: 0; justify-self: start; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 6px); overflow: hidden; }
.infographic-editor__views button { min-height: 32px; padding: 6px 14px; border: 0; border-right: 1px solid var(--line); color: var(--ink); background: var(--surface); font: 600 12px/1.2 var(--ui-font, sans-serif); cursor: pointer; }
.infographic-editor__views button:last-child { border-right: 0; }
.infographic-editor__views button[aria-pressed="true"] { color: var(--on-accent, #fff); background: var(--green); }
.infographic-editor__views button:disabled { color: var(--muted); cursor: not-allowed; opacity: .55; }
.infographic-editor__check { display: flex; gap: 8px; align-items: flex-start; grid-column: 1 / -1; }
.infographic-editor__check input { width: auto; height: auto; min-height: 0; margin: 3px 0 0; flex: none; }
.infographic-editor__check span { display: grid; gap: 2px; font-size: 13px; }
.infographic-editor__check small { color: var(--muted); font-size: 11px; }

/* Data › Add data from a link */
.link-loader { display: grid; gap: 10px; }
.link-loader .field { margin-bottom: 0; }
.link-loader__card:empty { display: none; }
.link-loader__result { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 6px); background: var(--surface); color: var(--ink); }
.link-loader__result.is-verified { border-color: var(--green-2); }
.link-loader__result p { margin: 0; font-size: 13px; line-height: 1.5; }
.link-loader__kind { font: 700 11px/1.3 var(--ui-font, sans-serif); letter-spacing: .08em; text-transform: uppercase; color: var(--green-2); }
.link-loader__result.is-unknown .link-loader__kind { color: var(--muted); }
.link-loader__confidence { font-weight: 700; }
.link-loader__layers { margin: 0; padding-left: 18px; font-size: 13px; columns: 2; column-gap: 18px; }
.link-loader__layers small, .link-loader__alternatives { color: var(--muted); }
.link-loader .is-error, [data-link-status].is-error { color: var(--danger, #b42318); }

/* Flow Map on the live map: legend and controls for the 3D arcs */
.flow-map-card { position: absolute; left: max(14px, env(safe-area-inset-left, 0px)); bottom: 36px; z-index: 6; width: min(290px, calc(100% - 28px)); max-height: min(58%, 420px); overflow-y: auto; display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--ui-radius, 10px); background: var(--surface); color: var(--ink); box-shadow: var(--ui-panel-shadow, 0 12px 30px rgb(0 0 0 / 18%)); font: 13px/1.45 var(--ui-font, sans-serif); }
.flow-map-card header { display: grid; gap: 2px; }
.flow-map-card header strong { font: 700 15px/1.25 var(--ui-heading, var(--ui-font, sans-serif)); }
.flow-map-card__eyebrow { font: 700 10.5px/1.2 var(--ui-font, sans-serif); letter-spacing: .08em; text-transform: uppercase; color: var(--green-2); }
.flow-map-card__legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; list-style: none; }
.flow-map-card__legend li { display: inline-flex; align-items: center; gap: 6px; }
.flow-map-card i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }
.flow-map-card__note { margin: 0; color: var(--muted); font-size: 12px; }
.flow-map-card__flows { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.flow-map-card__flows button { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; padding: 5px 6px; border: 0; border-radius: var(--ui-radius-small, 6px); color: var(--ink); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.flow-map-card__flows button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-map-card__flows button b { font-variant-numeric: tabular-nums; font-weight: 600; }
.flow-map-card__flows button:hover, .flow-map-card__flows button[aria-pressed="true"] { background: var(--surface-2); }
.flow-map-card__flows button:focus-visible, .flow-map-card__actions button:focus-visible { outline: 2px solid var(--green-2); outline-offset: 1px; }
.flow-map-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.flow-map-card__actions button { min-height: 32px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 6px); color: var(--ink); background: var(--surface); font: 600 12px/1.2 var(--ui-font, sans-serif); cursor: pointer; }
.flow-map-card__actions button:first-child { color: var(--on-accent, #fff); background: var(--green); border-color: var(--green); }
.flow-map-card header { position: relative; padding-right: 30px; }
.flow-map-card__toggle { position: absolute; top: -4px; right: -4px; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 6px); color: var(--ink); background: var(--surface); font: 700 15px/1 var(--ui-font, sans-serif); cursor: pointer; }
.flow-map-card.is-collapsed :is(.flow-map-card__legend, .flow-map-card__note, .flow-map-card__flows) { display: none; }

/* Flow Map: a table typed or pasted into the editor */
.infographic-editor__grid { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 6px); background: var(--surface); color: var(--ink); }
.infographic-editor__grid .field { margin-bottom: 0; }
.infographic-editor__grid-table { min-width: 0; }
.infographic-editor__grid-table th, .infographic-editor__grid-table td { padding: 2px; border-bottom: 0; white-space: normal; }
.infographic-editor__grid-table th small { color: var(--muted); font-weight: 400; }
.infographic-editor__grid-table input { width: 100%; min-width: 64px; min-height: 30px; padding: 4px 6px; font-size: 12.5px; }
.infographic-editor__grid-remove { width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 6px); color: var(--muted); background: var(--surface); cursor: pointer; }
.infographic-editor__grid-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.infographic-editor__grid-actions button { min-height: 32px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 6px); color: var(--ink); background: var(--surface); font: 600 12px/1.2 var(--ui-font, sans-serif); cursor: pointer; }
.infographic-editor__grid-actions .button--primary { color: var(--on-accent, #fff); background: var(--green); border-color: var(--green); }
.infographic-editor__grid-actions .form-note { margin: 0; flex: 1 1 200px; }
[data-ig-grid-status].is-error { color: var(--danger, #b42318); }

/* Flow Map: drawing flows on the map */
.flow-draw-layer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; overflow: visible; }
.flow-draw-card { z-index: 8; }
.flow-draw-card__prompt { margin: 0; font-weight: 700; }
.flow-draw-card__form, .flow-draw-card__names { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.flow-draw-card__form .flow-map-card__actions { grid-column: 1 / -1; }
.flow-draw-card label { display: grid; gap: 3px; font-size: 12px; font-weight: 600; }
.flow-draw-card label small { color: var(--muted); font-weight: 400; }
.flow-draw-card input { width: 100%; min-height: 30px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 6px); color: var(--ink); background: var(--paper); font: 13px/1.3 var(--ui-font, sans-serif); }
.flow-draw-card__details summary { cursor: pointer; font-weight: 600; }
.flow-draw-card__details[open] { display: grid; gap: 8px; }
.flow-draw-card__places { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0; padding: 0; list-style: none; }
.flow-draw-card__flow { display: grid; grid-template-columns: minmax(0, 1fr) auto 26px; gap: 6px; align-items: center; padding: 3px 4px; font-size: 12.5px; }
.flow-draw-card__flow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-draw-card__flow small { color: var(--muted); }
.flow-draw-card__flow b { font-variant-numeric: tabular-nums; font-weight: 600; }
.flow-draw-card__flow button { width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: var(--ui-radius-small, 6px); color: var(--muted); background: var(--surface); cursor: pointer; }
[data-flow-draw-status].is-error { color: var(--danger, #b42318); }
.flow-map-card__actions button:disabled { opacity: .5; cursor: not-allowed; }
