:root {
  --bg: #020611;
  --sidebar: #030a16;
  --surface: #061120;
  --surface-2: #08182a;
  --surface-3: #0b1e31;
  --line: #102d49;
  --line-bright: #16608a;
  --text: #edf5ff;
  --muted: #718da8;
  --cyan: #24d7ed;
  --jade: #2ed29b;
  --gold: #f1b84b;
  --red: #f05f78;
  --blue: #4f7dff;
  --violet: #8c62ff;
  --map-none: #e8edf0;
  --map-coverage-low: #bd6c63;
  --map-coverage-basic: #c89b4e;
  --map-coverage-substantial: #4d9b86;
  --map-coverage-high: #3e7fa7;
  --map-growth-contraction: #c45262;
  --map-growth-weak: #d98a4a;
  --map-growth-steady: #a8b0b1;
  --map-growth-strong: #4ba77b;
  --map-growth-rapid: #208fa2;
  --map-value-very-low: #52647f;
  --map-value-low: #417fa3;
  --map-value-middle: #3f9c8a;
  --map-value-high: #86ad66;
  --map-value-very-high: #d1aa54;
  --radius: 6px;
  color-scheme: dark;
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  letter-spacing: 0;
}

* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; background: var(--bg); color: var(--text); }
body { overflow-x: hidden; background-image: linear-gradient(rgba(27,91,139,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(27,91,139,.035) 1px, transparent 1px); background-size: 42px 42px; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
svg { width: 18px; height: 18px; flex: 0 0 auto; }
* { scrollbar-width: thin; scrollbar-color: #164b70 #040c18; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #040c18; }
::-webkit-scrollbar-thumb { background: #164b70; border: 2px solid #040c18; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 218px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 900; width: 218px; display: flex; flex-direction: column; padding: 14px 12px; background: rgba(3,10,22,.98); border-right: 1px solid #0e3455; box-shadow: 10px 0 35px rgba(0,0,0,.28); }
.brand-lockup { min-height: 66px; display: flex; align-items: center; gap: 11px; padding: 5px 6px 15px; border-bottom: 1px solid var(--line); }
.brand-lockup strong { display: block; font-size: 16px; line-height: 1.35; }
.brand-lockup small { display: block; margin-top: 3px; color: var(--cyan); font-size: 8px; font-weight: 700; }
.brand-lockup em { display: block; margin-top: 3px; color: #425d76; font-size: 6px; font-style: normal; }
.brand-mark { position: relative; width: 40px; height: 40px; display: grid; place-items: center; color: var(--cyan); border: 1px solid var(--line-bright); background: #07172a; box-shadow: inset 0 0 18px rgba(36,215,237,.08), 0 0 18px rgba(36,215,237,.08); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 8px; height: 8px; border-color: var(--gold); }
.brand-mark::before { top: -2px; left: -2px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.brand-mark::after { right: -2px; bottom: -2px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); }
.brand-mark svg { width: 23px; height: 23px; }
.brand-mark span { position: absolute; width: 5px; height: 5px; right: 7px; top: 7px; border-radius: 50%; background: var(--red); }
.brand-logo { position: relative; z-index: 1; width: 100%; height: 100%; display: block; border-radius: 2px; object-fit: cover; }
.brand-mark::before, .brand-mark::after { z-index: 2; }

.primary-nav { display: grid; gap: 14px; padding: 18px 0; }
.nav-group { display: grid; gap: 7px; }
.nav-group-tools { padding-top: 13px; border-top: 1px solid var(--line); }
.nav-group-label { margin: 0 9px 2px; color: #54718a; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.nav-item { position: relative; width: 100%; min-height: 54px; display: grid; grid-template-columns: 32px minmax(0, 1fr) 14px; align-items: center; gap: 9px; padding: 0 10px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.nav-item > svg:first-child { width: 30px; height: 30px; padding: 7px; border: 1px solid #102c46; border-radius: 5px; background: #061326; }
.nav-item .nav-arrow { width: 13px; height: 13px; color: #31536d; }
.nav-item:hover { color: var(--text); background: #061527; border-color: var(--line); }
.nav-item.active { color: var(--text); background: #08203a; border-color: #12517c; box-shadow: inset 3px 0 0 var(--cyan), 0 0 22px rgba(36,215,237,.08); }
.nav-item.active > svg:first-child { color: var(--cyan); border-color: #18628e; box-shadow: 0 0 16px rgba(36,215,237,.22); }
.nav-item.active .nav-arrow { color: var(--cyan); }
.nav-item span { min-width: 0; font-size: 12px; font-weight: 700; }
.nav-item span small { display: block; margin-top: 3px; color: #4d6c87; font-size: 7px; font-weight: 700; }
html[lang="zh-CN"] .brand-lockup small,
html[lang="zh-CN"] .brand-lockup em,
html[lang="zh-CN"] .auth-brand small,
html[lang="zh-CN"] .nav-item span small,
html[lang="zh-CN"] .topbar-title .eyebrow,
html[lang="zh-CN"] .section-code,
html[lang="zh-CN"] .metric small,
html[lang="zh-CN"] .globe-heading > span,
html[lang="zh-CN"] .region-navigator-heading small,
html[lang="zh-CN"] .region-navigator-state,
html[lang="zh-CN"] .rail-live,
html[lang="zh-CN"] .xiaoyexiao-identity small { display: none; }
html[lang="zh-CN"] .nav-item { min-height: 46px; }
.sidebar-status { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 12px 9px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sidebar-status strong, .sidebar-status small { display: block; }
.sidebar-status strong { font-size: 11px; }
.sidebar-status small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(239,184,63,.09); }
.status-dot.online { background: var(--jade); box-shadow: 0 0 0 4px rgba(54,199,143,.09); }
.status-dot.offline { background: var(--red); }
.attribution { padding: 12px 9px 0; color: var(--muted); font-size: 9px; }
.attribution a:hover { color: var(--cyan); }
.map-source-label { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.25; }

.main-stage { grid-column: 2; width: 100%; min-width: 0; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 850; height: 68px; display: grid; grid-template-columns: minmax(180px,.55fr) minmax(260px,1fr) auto; align-items: center; gap: 18px; padding: 8px 18px; background: rgba(2,6,17,.94); border-bottom: 1px solid #0e3455; backdrop-filter: blur(14px); }
.topbar h1 { margin: 2px 0 0; font-size: 17px; line-height: 1.2; }
.mobile-brand-logo { display: none; }
.eyebrow, .section-code { color: var(--cyan); font-size: 9px; font-weight: 800; }
.global-search { width: min(520px, 100%); height: 36px; display: grid; grid-template-columns: 18px minmax(0,1fr) 28px; align-items: center; gap: 7px; justify-self: center; padding: 0 5px 0 11px; border: 1px solid #102a44; border-radius: 6px; background: #050f1f; }
.global-search > svg { width: 15px; height: 15px; color: #50708b; }
.global-search input { height: 32px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.global-search input:focus { border: 0; box-shadow: none; }
.global-search button { width: 27px; height: 27px; display: grid; place-items: center; padding: 0; border: 1px solid #123653; border-radius: 4px; background: #09192b; color: var(--cyan); cursor: pointer; }
.global-search button:hover { border-color: var(--cyan); }
.global-search button svg { width: 14px; height: 14px; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 11px; }
.help-manual-button { display: grid; place-items: center; }
.xiaoyexiao-button { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 5px; border: 1px solid #32677c; border-radius: 5px; background: #071a26; color: var(--text); font-size: 10px; font-weight: 700; cursor: pointer; }
.xiaoyexiao-button:hover { border-color: var(--cyan); color: var(--cyan); }
.xiaoyexiao-button img { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; }
.topbar .utility-menu-toggle { display: none; }
.utility-menu { position: absolute; top: calc(100% - 3px); right: 14px; z-index: 30; width: 188px; padding: 8px; border: 1px solid var(--line-bright); border-radius: 6px; background: rgba(5,17,31,.98); box-shadow: 0 16px 34px rgba(0,0,0,.32); }
.utility-menu > span { display: block; padding: 3px 7px 8px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.utility-menu button { width: 100%; min-height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 7px; border: 0; border-top: 1px solid rgba(35,84,113,.52); background: transparent; color: var(--text); font-size: 10px; font-weight: 700; text-align: left; cursor: pointer; }
.utility-menu button:hover { color: var(--cyan); background: rgba(36,215,237,.07); }
.utility-menu button svg { width: 15px; height: 15px; color: var(--blue); }
.account-control { height: 32px; min-width: 0; max-width: 180px; display: inline-flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--muted); cursor: pointer; }
.account-control:hover { border-color: var(--cyan); color: var(--text); }
.account-control svg { width: 15px; height: 15px; flex: 0 0 auto; }
.account-control span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.site-switcher { width: 208px; height: 34px; display: grid; grid-template-columns: 17px minmax(0,1fr) 30px; align-items: center; gap: 6px; padding: 0 2px 0 9px; border: 1px solid #24435c; border-radius: 4px; background: #071524; color: #9aafc0; }
.site-switcher[hidden] { display: none; }
.site-switcher > svg { width: 15px; height: 15px; color: var(--cyan); }
.site-switcher select { min-width: 0; height: 30px; padding: 0 4px; border: 0; background: transparent; color: var(--text); box-shadow: none; font-size: 10px; text-overflow: ellipsis; }
.site-switcher select:focus { border: 0; box-shadow: none; }
.site-manage-button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-left: 1px solid #24435c; background: transparent; color: #86a4b8; cursor: pointer; }
.site-manage-button:hover { color: var(--cyan); }
.site-manage-button svg { width: 14px; height: 14px; }
.channel-state { display: flex; align-items: center; gap: 7px; color: var(--jade); font-size: 11px; }
.channel-state svg { width: 15px; }
.language-switch { width: 104px; height: 30px; display: grid; grid-template-columns: 1fr 1fr; padding: 2px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.language-switch button { min-width: 0; padding: 0 5px; border: 0; border-radius: 2px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 750; cursor: pointer; }
.language-switch button:hover { color: var(--text); }
.language-switch button.active { background: var(--cyan); color: #021015; }
.version { padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--gold); font: 700 10px ui-monospace, monospace; }

.view { display: none; min-height: calc(100vh - 68px); padding: 16px 18px 26px; }
.view.active { display: block; }
h2, h3, p { margin-top: 0; }
h2 { margin-bottom: 6px; font-size: 25px; line-height: 1.25; }
h3 { margin: 3px 0 0; font-size: 15px; }
p { color: var(--muted); }

.dashboard-lead { position: relative; min-height: 118px; display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 10px 14px 16px; border: 1px solid var(--line); border-bottom: 0; background: rgba(4,14,29,.76); overflow: hidden; }
.dashboard-lead::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(110deg, transparent 58%, rgba(36,215,237,.08) 58.2%, transparent 58.5%), linear-gradient(70deg, transparent 79%, rgba(140,98,255,.08) 79.2%, transparent 79.5%); }
.dashboard-lead > * { position: relative; z-index: 1; }
.dashboard-lead p { margin: 0; font-size: 13px; }
.status-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.status-chips span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid #103653; border-radius: 3px; background: rgba(4,19,34,.9); color: #7ea1ba; font-size: 8px; }
.status-chips svg { width: 11px; height: 11px; color: var(--jade); }
.command, .text-command, .icon-command { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 4px; cursor: pointer; }
.command { min-height: 39px; padding: 0 14px; border: 1px solid var(--line-bright); font-size: 12px; font-weight: 750; }
.command.primary { background: #0a92b2; border-color: #2adff1; color: #f4feff; box-shadow: inset 0 0 18px rgba(36,215,237,.18), 0 0 18px rgba(36,215,237,.1); }
.command.primary:hover { background: #0aaac7; }
.command.secondary { background: #071426; color: var(--text); }
.command.secondary:hover { border-color: var(--cyan); color: var(--cyan); }
.command:disabled { opacity: .4; cursor: not-allowed; }
.icon-command { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.icon-command:hover { color: var(--cyan); border-color: var(--cyan); }
.text-command { border: 0; background: transparent; color: var(--cyan); font-size: 11px; }
.text-command svg { width: 14px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px 0; }
.metric { position: relative; min-height: 92px; display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(6,17,32,.9); overflow: hidden; }
.metric::before { content: ""; position: absolute; top: -1px; left: 12%; right: 12%; height: 1px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.metric.jade::before { background: var(--jade); }
.metric.gold::before { background: var(--gold); }
.metric.red::before { background: var(--violet); }
.metric-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #155074; border-radius: 6px; background: #071b31; color: var(--cyan); box-shadow: inset 0 0 18px rgba(36,215,237,.12), 0 0 14px rgba(36,215,237,.08); }
.metric-icon svg { width: 22px; height: 22px; }
.metric.jade .metric-icon { color: var(--jade); border-color: #175a4a; }
.metric.gold .metric-icon { color: var(--gold); border-color: #624f29; }
.metric.red .metric-icon { color: var(--violet); border-color: #473a77; }
.metric span, .metric small { display: block; color: var(--muted); font-size: 10px; }
.metric strong { display: block; margin: 5px 0 2px; color: var(--cyan); font: 700 25px ui-monospace, monospace; }
.metric.jade strong { color: var(--jade); }
.metric.gold strong { color: var(--gold); }
.metric.red strong { color: var(--violet); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px, .58fr); grid-template-areas: "map pulse" "map recent"; grid-template-rows: minmax(300px, 1fr) minmax(190px, .65fr); gap: 12px; }
.dashboard-grid > .map-panel { grid-area: map; }
.dashboard-grid > .pulse-panel { grid-area: pulse; }
.dashboard-grid > .recent-panel { grid-area: recent; }
.panel { position: relative; background: rgba(6,17,32,.94); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 0 0 28px rgba(31,98,151,.035); }
.panel::before { content: ""; position: absolute; z-index: 2; top: -1px; left: 13px; width: 52px; height: 1px; background: var(--cyan); box-shadow: 0 0 10px rgba(36,215,237,.65); pointer-events: none; }
.panel-heading { min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.panel-heading > strong { color: var(--gold); font: 700 18px ui-monospace, monospace; }
.runtime-settings-layout { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; padding: 14px; }
.ai-model-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: stretch; }
.ai-model-control .command { min-height: 36px; white-space: nowrap; }
.runtime-settings-layout label small { min-height: 25px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.runtime-provider-docs { align-self: start; color: var(--cyan); font-size: 9px; line-height: 1.35; }
.runtime-provider-docs:hover { text-decoration: underline; }
.runtime-settings-action { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.runtime-settings-action .command { min-height: 36px; }
.runtime-settings-action span { min-width: 150px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.runtime-settings-success { color: var(--jade) !important; }
.runtime-settings-error { color: var(--red) !important; }
.runtime-mode-badge { color: var(--gold); font: 700 9px ui-monospace, monospace; }
.ai-insight-content { white-space: pre-wrap; line-height: 1.7; }
.map-canvas { width: 100%; min-height: 440px; background: #07121a; }
.dashboard-grid .map-panel { min-height: 520px; overflow: hidden; }
.dashboard-grid .map-canvas { height: calc(100% - 58px); min-height: 460px; border-radius: 0 0 var(--radius) var(--radius); }
.leaflet-container { font-family: inherit; background: #07121a; }
.leaflet-overlay-pane > svg { width: auto; height: auto; max-width: none; max-height: none; }
.leaflet-tile-pane { filter: none; }
.tianditu-base-pane .leaflet-tile { outline: 1px solid transparent; }
.leaflet-control-zoom a { color: var(--text) !important; background: var(--surface) !important; border-bottom-color: var(--line) !important; }
.leaflet-control-attribution { color: var(--muted); background: rgba(4,9,20,.82) !important; font-size: 9px; }
.leaflet-control-attribution a { color: var(--cyan); }
.commerce-pin { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #a2f8f7; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(37,211,220,.14); color: #021015; }
.commerce-pin.phone { background: var(--jade); border-color: #adffdc; box-shadow: 0 0 0 5px rgba(54,199,143,.14); }
.commerce-pin::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { color: var(--text); background: var(--surface-2); }
.leaflet-popup-content-wrapper { border: 1px solid var(--line-bright); border-radius: 5px; }
.map-popup { min-width: 190px; }
.map-popup strong, .map-popup span, .map-popup a { display: block; }
.map-popup span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.map-popup a { margin-top: 7px; color: var(--cyan); font-size: 11px; }

.pulse-panel { padding-bottom: 8px; overflow: hidden; }
.radar-visual { position: relative; width: min(130px, 54%); aspect-ratio: 1; margin: 14px auto 10px; border: 1px solid var(--line-bright); border-radius: 50%; box-shadow: inset 0 0 28px rgba(36,215,237,.08), 0 0 24px rgba(36,215,237,.06); }
.radar-visual::before, .radar-visual::after { content: ""; position: absolute; inset: 18%; border: 1px solid var(--line); border-radius: 50%; }
.radar-visual::after { inset: 36%; }
.radar-visual i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.radar-visual i:nth-child(2) { top: 28%; left: 30%; }
.radar-visual i:nth-child(3) { right: 24%; top: 46%; background: var(--red); }
.radar-visual i:nth-child(4) { bottom: 22%; left: 47%; background: var(--jade); }
.radar-line { position: absolute; left: 50%; top: 50%; width: 43%; height: 1px; transform-origin: left center; background: var(--jade); animation: radar-spin 5s linear infinite; }
@keyframes radar-spin { to { transform: rotate(360deg); } }
.pulse-rows { padding: 0 14px; }
.pulse-rows > div { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line); font-size: 10px; }
.pulse-rows span { color: var(--muted); }
.pulse-rows strong { color: var(--jade); }
.recent-panel { min-height: 0; margin-top: 0; overflow: hidden; }
.recent-panel .compact-list { max-height: calc(100% - 58px); overflow: auto; }
.recent-panel .compact-row { grid-template-columns: minmax(120px,1fr) 76px; gap: 8px; }
.recent-panel .compact-row span:nth-of-type(2), .recent-panel .compact-row span:nth-of-type(3) { display: none; }

.quick-actions-panel { display: grid; grid-template-columns: 150px minmax(0,1fr); align-items: stretch; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(5,15,29,.9); }
.quick-actions-heading { display: flex; flex-direction: column; justify-content: center; padding: 12px 15px; border-right: 1px solid var(--line); }
.quick-actions-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.quick-actions-grid button { min-height: 82px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.quick-actions-grid button:last-child { border-right: 0; }
.quick-actions-grid button:hover { background: #081a2e; }
.quick-actions-grid button > svg { width: 34px; height: 34px; padding: 8px; border: 1px solid #155078; border-radius: 5px; color: var(--cyan); background: #071b31; box-shadow: 0 0 16px rgba(36,215,237,.08); }
.quick-actions-grid span, .quick-actions-grid small { display: block; text-align: left; }
.quick-actions-grid span { font-size: 11px; font-weight: 700; }
.quick-actions-grid small { margin-top: 4px; color: var(--muted); font-size: 7px; }

.dashboard-metrics { padding-top: 0; }
.globe-command { position: relative; margin: 0 -18px; overflow: hidden; border-top: 1px solid #123d61; border-bottom: 1px solid #123d61; background: #020814; isolation: isolate; }
.globe-command::before, .globe-command::after { content: ""; position: absolute; z-index: 6; width: 90px; height: 26px; pointer-events: none; }
.globe-command::before { top: 0; left: 0; border-top: 1px solid var(--cyan); border-left: 1px solid var(--cyan); }
.globe-command::after { right: 0; bottom: 0; border-right: 1px solid var(--violet); border-bottom: 1px solid var(--violet); }
.globe-toolbar { position: relative; z-index: 5; min-height: 58px; display: grid; grid-template-columns: 200px minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 8px 20px; border-bottom: 1px solid var(--line); background: rgba(3,12,25,.96); }
.globe-heading span, .globe-heading strong { display: block; }
.globe-heading span { color: var(--cyan); font: 700 8px ui-monospace, monospace; }
.globe-heading strong { margin-top: 4px; font-size: 15px; }
.region-breadcrumb { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 0; overflow: hidden; }
.region-breadcrumb span { min-width: 0; max-width: 170px; display: inline-flex; align-items: center; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.region-breadcrumb span + span::before { content: "/"; flex: 0 0 auto; margin: 0 8px; color: #2b526c; }
.region-breadcrumb span.active { color: var(--gold); }
.globe-toolbar-actions { display: flex; align-items: center; gap: 7px; }
.globe-theme-control { position: relative; min-width: 0; display: flex; align-items: center; gap: 6px; }
.globe-theme-switch { min-width: 0; max-width: min(55vw, 720px); height: 31px; display: flex; align-items: stretch; overflow-x: auto; padding: 2px; border: 1px solid #1b506d; border-radius: 4px; background: #041322; scrollbar-width: thin; scrollbar-color: #1b5b7a #061221; }
.globe-theme-switch button { min-width: 58px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 8px; border: 0; border-radius: 2px; background: transparent; color: #7896aa; font-size: 8px; cursor: pointer; white-space: nowrap; }
.globe-theme-switch button + button { border-left: 1px solid rgba(31,86,112,.5); }
.globe-theme-switch button:hover { color: var(--text); background: #092239; }
.globe-theme-switch button.active { background: #0b3855; color: #d9f8ff; box-shadow: inset 0 0 0 1px #257da0; }
.globe-theme-switch button:focus-visible { outline: 1px solid var(--cyan); outline-offset: 1px; }
.globe-theme-switch svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--cyan); }
.globe-theme-manager-toggle { flex: 0 0 auto; width: 31px; height: 31px; }
.globe-theme-manager { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: 390px; padding: 0; border: 1px solid #28718e; border-radius: 4px; background: rgba(3,16,31,.985); box-shadow: 0 16px 42px rgba(0,0,0,.5), 0 0 22px rgba(36,215,237,.12); }
.globe-theme-manager[hidden] { display: none; }
.globe-theme-manager header { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 7px 0 11px; border-bottom: 1px solid #17415a; }
.globe-theme-manager header strong { color: var(--text); font-size: 10px; }
.globe-theme-manager header .icon-command { width: 26px; height: 26px; border: 0; }
.globe-theme-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); padding: 7px; }
.globe-theme-option { min-width: 0; height: 36px; display: grid; grid-template-columns: 15px 16px minmax(0,1fr); align-items: center; gap: 7px; padding: 0 7px; border: 1px solid transparent; color: #a9c1d0; font-size: 9px; cursor: pointer; }
.globe-theme-option:hover { border-color: #174c68; background: #061d32; color: var(--text); }
.globe-theme-option input { width: 14px; height: 14px; margin: 0; accent-color: var(--cyan); }
.globe-theme-option input:disabled { cursor: not-allowed; opacity: .6; }
.globe-theme-option svg { width: 15px; height: 15px; color: var(--cyan); }
.globe-theme-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.globe-theme-reset { width: calc(100% - 14px); min-height: 32px; justify-content: center; gap: 6px; margin: 0 7px 7px; border: 1px solid #17415a; }
.globe-theme-reset svg { width: 13px; height: 13px; }
.region-level { min-width: 66px; padding: 5px 7px; border: 1px solid #1c5776; border-radius: 3px; color: var(--cyan); font: 700 8px ui-monospace, monospace; text-align: center; }
.globe-viewport { position: relative; height: clamp(390px, calc(100vh - 390px), 620px); min-height: 390px; overflow: hidden; }
.globe-canvas { position: absolute; z-index: 1; inset: 0; cursor: grab; touch-action: none; }
.globe-canvas:active { cursor: grabbing; }
.globe-canvas canvas { width: 100%; height: 100%; display: block; }
.globe-grid { position: absolute; z-index: 0; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(30,104,163,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(30,104,163,.055) 1px, transparent 1px); background-size: 50px 50px; mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 85%, transparent); }
.globe-tilt-control { position: absolute; z-index: 4; top: 50%; left: 17px; width: 50px; height: 220px; display: grid; grid-template-rows: 30px minmax(0,1fr) 30px; place-items: center; transform: translateY(-50%); border: 1px solid #185173; border-radius: 4px; background: rgba(3,16,31,.9); box-shadow: 0 0 24px rgba(36,215,237,.12), inset 0 0 18px rgba(36,215,237,.04); }
.globe-tilt-control > svg { width: 18px; height: 18px; color: var(--cyan); pointer-events: none; }
.globe-tilt-control input { width: 154px; height: 24px; margin: 0; padding: 0; transform: rotate(90deg); appearance: none; border: 0; outline: 0; background: transparent; cursor: ns-resize; }
.globe-tilt-control input::-webkit-slider-runnable-track { height: 5px; border: 1px solid #176080; background: #08243c; }
.globe-tilt-control input::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -8px; appearance: none; border: 2px solid #8ef4ff; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px rgba(36,215,237,.72); }
.globe-tilt-control input::-moz-range-track { height: 5px; border: 1px solid #176080; background: #08243c; }
.globe-tilt-control input::-moz-range-thumb { width: 16px; height: 16px; border: 2px solid #8ef4ff; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px rgba(36,215,237,.72); }
.globe-tilt-control input:focus-visible { filter: drop-shadow(0 0 5px var(--cyan)); }
.globe-pick-status { position: absolute; z-index: 4; left: 16px; bottom: 16px; max-width: min(410px, calc(100% - 32px)); padding: 9px 12px; border: 1px solid #22749a; border-radius: 4px; background: rgba(3,16,31,.94); color: var(--cyan); font-size: 10px; box-shadow: 0 0 28px rgba(36,215,237,.16); }
.globe-pick-status.error { color: #ffc2bd; border-color: var(--red); }
.globe-coverage-legend { position: absolute; z-index: 4; right: 16px; bottom: 16px; width: min(465px, calc(100% - 100px)); padding: 9px 11px; border: 1px solid #28556d; border-radius: 4px; background: rgba(3,16,31,.92); box-shadow: 0 0 24px rgba(36,215,237,.1); pointer-events: none; }
.globe-coverage-legend strong, .globe-coverage-legend small { display: block; }
.globe-coverage-legend strong { color: var(--text); font-size: 9px; }
.globe-coverage-legend > div { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 7px; }
.globe-coverage-legend span { display: inline-flex; align-items: center; gap: 5px; color: #b8cbd7; font-size: 8px; white-space: nowrap; }
.globe-coverage-legend small { margin-top: 6px; color: var(--muted); font-size: 7px; }
.coverage-swatch { width: 11px; height: 8px; display: inline-block; border: 1px solid rgba(255,255,255,.48); }
.coverage-swatch.none { background: var(--map-none); }
.coverage-swatch.low { background: var(--map-coverage-low); }
.coverage-swatch.basic { background: var(--map-coverage-basic); }
.coverage-swatch.substantial { background: var(--map-coverage-substantial); }
.coverage-swatch.high { background: var(--map-coverage-high); }
.coverage-swatch.growth-contraction { background: var(--map-growth-contraction); }
.coverage-swatch.growth-weak { background: var(--map-growth-weak); }
.coverage-swatch.growth-steady { background: var(--map-growth-steady); }
.coverage-swatch.growth-strong { background: var(--map-growth-strong); }
.coverage-swatch.growth-rapid { background: var(--map-growth-rapid); }
.coverage-swatch.value-very-low { background: var(--map-value-very-low); }
.coverage-swatch.value-low { background: var(--map-value-low); }
.coverage-swatch.value-middle { background: var(--map-value-middle); }
.coverage-swatch.value-high { background: var(--map-value-high); }
.coverage-swatch.value-very-high { background: var(--map-value-very-high); }
.coverage-swatch.physical-terrain { background: linear-gradient(90deg, #3c5364, #d4d8d7); }
.region-navigator { position: relative; z-index: 5; min-height: 88px; display: grid; grid-template-columns: 205px minmax(0,1fr); border-top: 1px solid #123d61; background: rgba(2,11,23,.98); }
.region-navigator-heading { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 11px 16px; border-right: 1px solid var(--line); }
.region-navigator-heading > div { min-width: 0; display: flex; align-items: center; gap: 9px; }
.region-navigator-heading > div > svg { width: 28px; height: 28px; flex: 0 0 auto; padding: 6px; border: 1px solid #19597c; border-radius: 4px; color: var(--cyan); background: #061a2f; }
.region-navigator-heading span, .region-navigator-heading small, .region-navigator-heading strong { min-width: 0; display: block; }
.region-navigator-heading small { color: var(--cyan); font: 700 7px ui-monospace, monospace; }
.region-navigator-heading strong { margin-top: 3px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.region-navigator-state { color: var(--jade); font: 700 7px ui-monospace, monospace; }
.region-navigator-steps { min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(168px, 1fr); align-items: center; gap: 8px; padding: 10px 14px; overflow-x: auto; scrollbar-color: #1b5b7a #061221; }
.region-navigator-field { min-width: 0; gap: 5px; }
.region-navigator-field > span { overflow: hidden; color: #6d91a8; font: 700 8px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.region-navigator-field select { height: 34px; padding-inline: 9px 28px; border-color: #185173; background: #05182b; font-size: 10px; text-overflow: ellipsis; }
.region-navigator-field select:not(:disabled):hover { border-color: #2386a9; }
.region-availability { position: relative; z-index: 5; border-top: 1px solid var(--line); background: rgba(4,15,28,.96); }
.region-availability-heading { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.region-availability-heading h4 { margin: 2px 0 0; font-size: 12px; }
.region-availability-state { flex: 0 0 auto; padding: 4px 6px; border: 1px solid #285069; color: var(--muted); font: 700 8px ui-monospace, monospace; }
.region-availability-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.region-availability-item { min-width: 0; min-height: 80px; display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: start; gap: 8px; padding: 11px 14px; border-right: 1px solid var(--line); }
.region-availability-item:last-child { border-right: 0; }
.region-availability-item > svg { width: 27px; height: 27px; padding: 6px; border: 1px solid #1c5374; color: var(--cyan); background: #061a2f; }
.region-availability-item span, .region-availability-item strong, .region-availability-item small { min-width: 0; display: block; overflow-wrap: anywhere; }
.region-availability-item span { color: #6d91a8; font: 700 8px ui-monospace, monospace; }
.region-availability-item strong { margin-top: 4px; color: var(--text); font-size: 10px; line-height: 1.35; }
.region-availability-item small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.region-availability-item[data-state="available"] > svg { border-color: #1f6a55; color: var(--jade); }
.region-availability-item[data-state="limited"] > svg, .region-availability-item[data-state="reference"] > svg { border-color: #6b5524; color: var(--gold); }
.region-availability-item[data-state="missing"] > svg { border-color: #5b3a44; color: var(--red); }
.region-availability-item[data-state="loading"] > svg { color: var(--cyan); }
.region-availability-item[data-state="reference"] strong, .region-availability-item[data-state="limited"] strong { color: #e4c67d; }
.region-availability-item[data-state="missing"] strong { color: #f1a1ad; }
.region-availability-note { margin: 0; padding: 8px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; line-height: 1.45; }
.globe-footer { position: relative; z-index: 5; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 20px; border-top: 1px solid var(--line); background: rgba(3,12,25,.96); }
.region-focus { min-width: 0; display: flex; align-items: center; gap: 10px; }
.region-focus > svg { width: 34px; height: 34px; padding: 8px; border: 1px solid #145278; border-radius: 4px; color: var(--cyan); background: #071b31; }
.region-focus span, .region-focus strong { display: block; }
.region-focus span { color: var(--muted); font: 700 8px ui-monospace, monospace; }
.region-focus strong { max-width: 420px; margin-top: 3px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.globe-footer-actions { display: flex; align-items: center; gap: 8px; }
.globe-action { min-width: 230px; height: 43px; display: grid; grid-template-columns: 22px minmax(0,1fr) 16px; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid #1a789e; border-radius: 4px; background: rgba(4,29,50,.9); color: var(--text); cursor: pointer; box-shadow: 0 0 25px rgba(36,215,237,.15), inset 0 0 20px rgba(36,215,237,.06); }
.globe-action:hover { border-color: var(--cyan); background: #073550; }
.globe-action span, .globe-action small { display: block; }
.globe-action span { font-size: 11px; font-weight: 700; }
.globe-action small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.globe-action > svg { color: var(--cyan); }

.region-intelligence { margin-top: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(3,12,24,.72); }
.region-intel-heading { min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.region-intel-actions { display: flex; align-items: center; gap: 8px; }
.region-intel-heading h3 { font-size: 14px; }
.data-quality { padding: 5px 8px; border: 1px solid #285069; border-radius: 3px; color: var(--muted); font: 700 8px ui-monospace, monospace; }
.data-quality.verified { color: var(--jade); border-color: #1f6a55; }
.data-quality.partial { color: var(--gold); border-color: #6b5524; }
.data-quality.missing { color: var(--muted); }
.region-intel-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.intel-module { min-width: 0; min-height: 230px; border-right: 1px solid var(--line); }
.intel-module:last-child { border-right: 0; }
.module-heading { min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.module-heading h4 { margin: 2px 0 0; font-size: 12px; }
.module-heading > svg { width: 18px; color: var(--cyan); }
.region-bars, .benchmark-list { min-height: 150px; padding: 10px 14px; }
.key-metric-list { min-height: 150px; padding: 8px 12px; }
.region-product-market-signals { min-height: 150px; padding: 8px 12px; }
.region-product-market-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, .75fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(31,86,112,.45); }
.region-product-market-row:last-child { border-bottom: 0; }
.region-product-market-row > div { min-width: 0; }
.region-product-market-row strong,
.region-product-market-row span,
.region-product-market-row small { display: block; overflow-wrap: anywhere; }
.region-product-market-row strong { color: var(--text); font-size: 10px; }
.region-product-market-row span { margin-top: 4px; color: var(--gold); font-size: 8px; line-height: 1.45; }
.region-product-market-row small { margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 1.45; }
.region-product-market-row em { align-self: start; color: #bd9a57; font-size: 8px; font-style: normal; line-height: 1.45; }
.region-product-reference { margin: 0; padding: 8px 0; border-bottom: 1px solid rgba(107,85,36,.7); color: #c5a765; font-size: 8px; line-height: 1.5; }
.key-metric-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; min-height: 47px; border-bottom: 1px solid rgba(31,86,112,.45); }
.key-metric-row:last-child { border-bottom: 0; }
.key-metric-row > div { min-width: 0; }
.key-metric-row strong, .key-metric-row small { display: block; }
.key-metric-row strong { overflow: hidden; color: var(--text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.key-metric-row small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.key-metric-row > span { color: var(--gold); font: 700 10px ui-monospace, monospace; text-align: right; white-space: nowrap; }
.metric-scope { display: inline-flex !important; width: fit-content; max-width: 100%; margin-top: 4px; padding: 2px 4px; border: 1px solid #1b5d72; color: var(--jade) !important; font-size: 7px !important; }
.metric-scope.reference { border-color: #72551a; color: var(--gold) !important; }
.region-history-module { grid-column: span 2; }
.region-history-controls { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(120px,.6fr); gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.region-history-controls label { min-width: 0; }
.region-history-controls label > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 7px; }
.region-history-controls select { width: 100%; height: 30px; min-width: 0; padding-inline: 7px; font-size: 8px; }
.region-history-content { min-height: 180px; padding: 10px 12px 12px; }
.history-chart { margin: 0; color: var(--cyan); }
.history-chart svg { display: block; width: 100%; height: 170px; overflow: visible; }
.history-chart text { fill: var(--muted); font: 7px ui-monospace, monospace; letter-spacing: 0; }
.history-axis { stroke: rgba(79,113,137,.65); stroke-width: 1; vector-effect: non-scaling-stroke; }
.history-lines circle { fill: var(--gold); stroke: #071522; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.history-chart figcaption { margin-top: 3px; color: var(--muted); font-size: 7px; }
.history-series-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(31,86,112,.45); color: var(--muted); font-size: 7px; }
.history-series-meta a { color: var(--cyan); }
.history-table-wrap { max-height: 168px; margin-top: 8px; overflow: auto; border: 1px solid rgba(31,86,112,.45); }
.history-table-wrap table { width: 100%; border-collapse: collapse; }
.history-table-wrap th, .history-table-wrap td { padding: 6px 8px; border-bottom: 1px solid rgba(31,86,112,.35); color: var(--muted); font: 7px ui-monospace, monospace; text-align: left; }
.history-table-wrap td:nth-child(2) { color: var(--gold); }
.region-bar { display: grid; grid-template-columns: minmax(76px,.8fr) minmax(80px,1.3fr) 54px; gap: 8px; align-items: center; min-height: 32px; }
.region-bar > span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.region-bar > strong { color: var(--gold); font: 700 9px ui-monospace, monospace; text-align: right; }
.region-bar-track { height: 5px; overflow: hidden; background: #122838; }
.region-bar-track i { display: block; height: 100%; background: var(--cyan); box-shadow: 0 0 8px rgba(36,215,237,.35); }
.consumption-share-module .region-bar-track i { background: var(--jade); }
.benchmark-row { min-height: 45px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; align-items: center; border-bottom: 1px solid var(--line); }
.benchmark-row:last-child { border-bottom: 0; }
.benchmark-row span, .benchmark-row small { display: block; }
.benchmark-row span { color: var(--muted); font-size: 9px; line-height: 1.4; }
.benchmark-row small { margin-top: 3px; color: #4f7189; font-size: 7px; }
.benchmark-row strong { color: var(--cyan); font: 700 12px ui-monospace, monospace; text-align: right; }
.region-evidence-strip { min-height: 42px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.region-evidence-strip a { color: var(--cyan); }
.region-evidence-strip span { display: inline-flex; align-items: center; gap: 5px; }
.region-evidence-strip span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--jade); }
.region-evidence-strip .region-data-gap { color: var(--gold); }
.region-evidence-strip .region-data-gap::before { background: var(--gold); }
.weather-context { min-height: 120px; padding: 10px 14px 14px; }
.weather-context.empty { color: var(--muted); font-size: 9px; }
.weather-current { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); }
.weather-current strong { color: var(--cyan); font: 700 18px ui-monospace, monospace; }
.weather-current span, .weather-current small { display: block; color: var(--muted); font-size: 8px; line-height: 1.45; }
.weather-current small { margin-top: 3px; color: #4f7189; }
.weather-forecast { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px; padding-top: 8px; }
.weather-forecast span { display: block; color: var(--muted); font-size: 7px; line-height: 1.4; }
.weather-forecast strong { display: block; margin-top: 2px; color: var(--gold); font: 700 9px ui-monospace, monospace; }

.dashboard-lower-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(300px,.72fr); gap: 12px; margin-top: 12px; }
.coverage-map-panel { min-height: 310px; overflow: hidden; }
.coverage-map-panel .map-canvas { min-height: 252px; }
.dashboard-lower-grid .quick-actions-panel { grid-template-columns: 1fr; margin-top: 0; }
.dashboard-lower-grid .quick-actions-heading { border-right: 0; border-bottom: 1px solid var(--line); }
.dashboard-lower-grid .quick-actions-grid { grid-template-columns: 1fr 1fr; }
.dashboard-lower-grid .quick-actions-grid button { min-height: 105px; }
.dashboard-lower-grid .quick-actions-grid button:nth-child(2) { border-right: 0; }
.dashboard-lower-grid .quick-actions-grid button:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

.intel-rail { position: sticky; top: 0; grid-column: 3; height: 100vh; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 10px; overflow: auto; border-left: 1px solid #103657; background: rgba(2,8,18,.98); }
.rail-profile { min-height: 48px; display: grid; grid-template-columns: 35px minmax(0,1fr) 16px; align-items: center; gap: 9px; padding: 4px 5px 10px; border-bottom: 1px solid var(--line); }
.rail-avatar { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid #3155a5; border-radius: 50%; background: #0a1b42; color: var(--violet); box-shadow: 0 0 18px rgba(140,98,255,.22); }
.rail-avatar svg { width: 20px; height: 20px; }
.rail-profile strong, .rail-profile span { display: block; }
.rail-profile strong { font-size: 10px; }
.rail-profile span { margin-top: 3px; color: var(--muted); font-size: 7px; }
.rail-profile > svg { width: 14px; color: var(--jade); }
.rail-panel { border: 1px solid var(--line); border-radius: 6px; background: #061120; box-shadow: inset 0 0 24px rgba(36,215,237,.025); }
.rail-heading { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--line); }
.rail-heading h3 { font-size: 12px; }
.rail-heading > svg { width: 15px; color: var(--cyan); }
.rail-live { padding: 3px 6px; border: 1px solid #19594b; border-radius: 3px; color: var(--jade); font: 700 7px ui-monospace, monospace; }
.rail-orbit { position: relative; width: 132px; aspect-ratio: 1; display: grid; place-items: center; margin: 14px auto 10px; border-radius: 50%; background: conic-gradient(var(--cyan) 0 32%, var(--violet) 32% 58%, var(--jade) 58% 81%, #133653 81%); box-shadow: 0 0 24px rgba(36,215,237,.1); }
.rail-orbit::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #061120; box-shadow: inset 0 0 22px rgba(36,215,237,.08); }
.rail-orbit > div { position: relative; z-index: 1; text-align: center; }
.rail-orbit strong, .rail-orbit span { display: block; }
.rail-orbit strong { color: var(--text); font: 700 22px ui-monospace, monospace; }
.rail-orbit span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.rail-stats { padding: 0 11px 10px; }
.rail-stats > div { min-height: 29px; display: grid; grid-template-columns: 7px minmax(0,1fr) auto; align-items: center; gap: 7px; border-top: 1px solid var(--line); font-size: 9px; }
.rail-stats i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.rail-stats i.jade { background: var(--jade); }
.rail-stats i.gold { background: var(--gold); }
.rail-stats span { color: var(--muted); }
.rail-stats strong { color: var(--text); font: 700 10px ui-monospace, monospace; }
.rail-wave { height: 62px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 10px; overflow: hidden; }
.rail-wave i { width: 3px; height: 24%; background: var(--cyan); box-shadow: 0 0 8px rgba(36,215,237,.55); animation: rail-wave 1.4s ease-in-out infinite alternate; }
.rail-wave i:nth-child(2), .rail-wave i:nth-child(8) { height: 42%; animation-delay: -.4s; }
.rail-wave i:nth-child(3), .rail-wave i:nth-child(7) { height: 70%; animation-delay: -.8s; }
.rail-wave i:nth-child(4), .rail-wave i:nth-child(6) { height: 92%; animation-delay: -.2s; background: var(--violet); }
.rail-wave i:nth-child(5) { height: 56%; background: var(--jade); animation-delay: -.6s; }
@keyframes rail-wave { to { transform: scaleY(.42); opacity: .55; } }
.rail-pulse .pulse-rows { padding-bottom: 6px; }
.rail-pulse .pulse-rows > div { font-size: 9px; }
.rail-recent { min-height: 180px; }
.rail-recent .compact-row { grid-template-columns: minmax(0,1fr) 66px; gap: 6px; min-height: 45px; padding: 7px 10px; }
.rail-recent .compact-row span:nth-of-type(2), .rail-recent .compact-row span:nth-of-type(3) { display: none; }
.rail-boundary { margin-bottom: 2px; }
.boundary-state { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 55px; padding: 9px 11px; }
.boundary-state span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; }
.boundary-state span i { width: 6px; height: 6px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 8px var(--jade); }
.boundary-state strong { color: var(--jade); font: 700 8px ui-monospace, monospace; }

.compact-list { min-height: 84px; }
.compact-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(120px, .7fr) minmax(120px, .7fr) 110px; gap: 14px; align-items: center; min-height: 52px; padding: 8px 14px; border-top: 1px solid var(--line); }
.compact-row:first-child { border-top: 0; }
.compact-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.compact-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }

.search-command-grid { display: grid; grid-template-columns: 286px minmax(0, 1fr); gap: 12px; align-items: start; }
.map-workspace-region { margin-top: 14px; }
.search-main-stack { min-width: 0; }
.search-console { position: sticky; top: 84px; display: grid; gap: 12px; padding: 14px; scroll-margin-top: 84px; border: 1px solid #154b70; border-radius: var(--radius); background: rgba(6,17,32,.96); box-shadow: inset 0 0 28px rgba(31,98,151,.05), 0 0 24px rgba(36,215,237,.04); }
.search-console::before { content: ""; position: absolute; top: -1px; left: 18px; width: 76px; height: 1px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.console-heading { min-height: 44px; display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.console-heading > svg { width: 31px; height: 31px; padding: 7px; border: 1px solid #18577e; border-radius: 4px; color: var(--cyan); background: #071a30; box-shadow: 0 0 16px rgba(36,215,237,.08); }
.console-heading h3 { font-size: 13px; }
.console-heading p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.collector-policy-line { display: flex; align-items: flex-start; gap: 8px; padding: 9px; border: 1px solid rgba(49,211,156,.2); border-radius: 4px; background: rgba(49,211,156,.055); }
.collector-policy-line svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: var(--jade); }
.collector-policy-line span { min-width: 0; display: grid; gap: 3px; }
.collector-policy-line strong { font-size: 10px; }
.collector-policy-line small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.search-region-policy { margin: -2px 0 0; padding: 8px 9px; border-left: 2px solid var(--gold); background: rgba(241,184,75,.07); color: #d8c079; font-size: 10px; line-height: 1.45; }
.country-picker { min-width: 0; display: grid; gap: 8px; }
.country-picker-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.country-picker-heading > span { padding-bottom: 9px; color: var(--muted); font: 700 8px ui-monospace, monospace; white-space: nowrap; }
.country-select-field { margin-top: -1px; }
.country-filter-panel { border: 1px solid var(--line); border-radius: 4px; background: color-mix(in srgb, var(--surface-2) 72%, transparent); }
.country-filter-panel summary { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 9px; cursor: pointer; list-style: none; }
.country-filter-panel summary::-webkit-details-marker { display: none; }
.country-filter-panel summary > span { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 9px; font-weight: 700; }
.country-filter-panel summary svg { width: 13px; height: 13px; color: var(--blue); }
.country-filter-panel summary small { color: var(--blue); font-size: 8px; }
.country-filter-body { display: grid; gap: 9px; padding: 9px; border-top: 1px solid var(--line); }
.country-filter-modes { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.country-filter-modes button { min-height: 31px; border: 0; border-right: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 9px; font-weight: 700; cursor: pointer; }
.country-filter-modes button:last-child { border-right: 0; }
.country-filter-modes button.active { background: var(--blue); color: #fff; }
.country-filter-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.country-missing-toggle { min-height: 38px; display: grid; grid-template-columns: 17px minmax(0, 1fr); align-items: start; gap: 8px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.country-missing-toggle input { width: 16px; height: 16px; margin: 1px 0 0; padding: 0; accent-color: var(--blue); }
.country-missing-toggle strong, .country-missing-toggle small { display: block; }
.country-missing-toggle strong { color: var(--text); font-size: 9px; }
.country-missing-toggle small, .country-filter-source { color: var(--muted); font-size: 8px; line-height: 1.45; }
.country-filter-source { display: block; }
.search-optional-panel { grid-column: 1 / -1; min-width: 0; border: 1px solid var(--line); border-radius: 4px; background: rgba(5, 16, 29, .7); }
.search-optional-panel > summary { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; cursor: pointer; list-style: none; }
.search-optional-panel > summary::-webkit-details-marker { display: none; }
.search-optional-panel > summary > span { min-width: 0; display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 9px; font-weight: 700; }
.search-optional-panel > summary svg { width: 14px; height: 14px; color: var(--cyan); }
.search-optional-panel > summary small { color: var(--muted); font-size: 8px; line-height: 1.4; text-align: right; }
.search-optional-panel[open] > summary { border-bottom: 1px solid var(--line); }
.search-optional-panel > .location-fields,
.search-options-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
.search-result-options { grid-column: 1 / -1; }
.location-fields, .industry-fields { display: grid; gap: 10px; align-items: end; }
.search-command-grid .location-fields, .search-command-grid .industry-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.industry-capability-note { grid-column: 1 / -1; display: grid; gap: 3px; margin: 0; padding: 8px 9px; border-left: 2px solid var(--blue); background: rgba(31,98,151,.08); color: var(--muted); font-size: 9px; line-height: 1.45; }
.industry-capability-note[hidden] { display: none; }
.industry-capability-note strong { color: var(--text); font-size: 9px; }
.industry-capability-note.osm_candidate { border-left-color: var(--gold); background: rgba(241,184,75,.07); }
.industry-capability-note.external_required { border-left-color: #d66b6b; background: rgba(214,107,107,.07); }
.search-command-grid .keyword-field, .search-command-grid .command.primary { grid-column: 1 / -1; }
.search-command-grid .command.primary { width: 100%; justify-content: center; }
label { display: grid; gap: 6px; min-width: 0; }
label > span { color: var(--muted); font-size: 10px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #143653; border-radius: 4px; outline: none; background: #061426; color: var(--text); }
input, select { height: 39px; padding: 0 10px; }
textarea { padding: 10px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(37,211,220,.08); }
input::placeholder, textarea::placeholder { color: #526b73; }
select:disabled { opacity: .45; }
.toggle-field { min-height: 39px; display: flex; flex-direction: row; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid #143653; border-radius: 4px; background: #061426; white-space: nowrap; }
.toggle-field input { width: 16px; height: 16px; padding: 0; accent-color: var(--jade); }
.toggle-field span { color: var(--text); }
.search-status { min-height: 45px; display: flex; align-items: center; justify-content: space-between; margin: 8px 0; padding: 0 12px; border-left: 2px solid var(--cyan); background: rgba(5,16,29,.72); color: var(--muted); font-size: 11px; }
.search-status strong { color: var(--gold); font: 700 17px ui-monospace, monospace; }
.contact-stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: -2px 0 8px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: rgba(5,16,29,.72); }
.contact-stat-strip[hidden] { display: none; }
.contact-stat-strip > div { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 9px 11px; border-right: 1px solid var(--line); }
.contact-stat-strip > div:last-child { border-right: 0; }
.contact-stat-strip span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.contact-stat-strip strong { display: inline-flex; align-items: baseline; gap: 5px; color: var(--text); font: 700 13px ui-monospace, monospace; }
.contact-stat-strip strong small { color: var(--jade); font-size: 8px; font-weight: 700; }
.search-workspace { height: calc(100vh - 137px); min-height: 570px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .75fr); border: 1px solid #154b70; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 24px rgba(36,215,237,.05); }
.search-map-panel { position: relative; min-width: 0; border-right: 1px solid var(--line); }
.search-map-panel .map-canvas { height: 100%; min-height: 100%; }
.map-legend { position: absolute; z-index: 500; left: 12px; bottom: 12px; display: flex; gap: 13px; padding: 8px 10px; border: 1px solid #165278; border-radius: 4px; background: rgba(3,11,22,.92); box-shadow: 0 0 16px rgba(36,215,237,.08); font-size: 9px; }
.map-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.legend-dot.phone { background: var(--jade); }
.results-pane { min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #061120; }
.results-actions { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.result-command-group { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.result-command-group .command { padding: 0 10px; }
.result-list { overflow: auto; }
.result-row { position: relative; padding: 13px; border-bottom: 1px solid var(--line); cursor: pointer; }
.result-row:hover, .result-row.active { background: #091e34; box-shadow: inset 2px 0 0 var(--cyan); }
.result-row h4 { margin: 0 32px 5px 0; font-size: 13px; }
.result-row .result-category { color: var(--gold); font-size: 9px; }
.result-row address { margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.5; font-style: normal; }
.result-contact { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.result-contact a, .result-contact span { display: inline-flex; align-items: center; gap: 4px; color: var(--cyan); font-size: 10px; }
.result-contact .phone { color: var(--jade); }
.result-contact .email { color: var(--gold); overflow-wrap: anywhere; }
.website-enrichment-command { min-height: 30px; display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 0 9px; border: 1px solid #176178; border-radius: 4px; background: rgba(7,34,48,.82); color: var(--cyan); font-size: 9px; font-weight: 700; cursor: pointer; }
.website-enrichment-command:hover { border-color: var(--cyan); background: rgba(9,48,64,.9); }
.website-enrichment-command:disabled { cursor: wait; opacity: .7; }
.website-enrichment-command:disabled svg { animation: spin .9s linear infinite; }
.website-enrichment-result { margin-top: 10px; padding: 10px 0 0 10px; border-top: 1px solid var(--line); border-left: 2px solid var(--jade); }
.website-enrichment-result.partial { border-left-color: var(--gold); }
.website-enrichment-result.blocked_by_robots, .website-enrichment-result.no_contact { border-left-color: var(--muted); }
.website-enrichment-result.error { border-left-color: var(--red); }
.website-enrichment-heading { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.website-enrichment-heading svg { width: 14px; height: 14px; color: var(--jade); }
.website-enrichment-result.error .website-enrichment-heading svg { color: var(--red); }
.website-enrichment-heading strong { color: var(--text); font-size: 10px; }
.website-enrichment-heading span { color: var(--muted); font-size: 8px; }
.website-enrichment-contacts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.website-enrichment-contacts a { display: inline-flex; max-width: 100%; align-items: center; gap: 4px; overflow-wrap: anywhere; color: var(--jade); font-size: 10px; }
.website-enrichment-contacts a.email { color: var(--gold); }
.website-enrichment-contacts svg { width: 12px; height: 12px; flex: 0 0 auto; }
.website-enrichment-result p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.website-enrichment-result ul { display: grid; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; }
.website-enrichment-result li { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 8px; padding-top: 5px; border-top: 1px dotted rgba(46,103,128,.55); font-size: 8px; }
.website-enrichment-result li span { min-width: 0; overflow-wrap: anywhere; color: var(--muted); text-transform: capitalize; }
.website-enrichment-result li a { display: inline-flex; align-items: center; gap: 3px; color: var(--cyan); }
.website-enrichment-result li a svg { width: 10px; height: 10px; }
.website-enrichment-result li time { grid-column: 1 / -1; color: #66808a; }
.website-enrichment-result > small { display: block; margin-top: 8px; color: #78909a; font-size: 8px; line-height: 1.5; }
.save-one { position: absolute; top: 11px; right: 10px; width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.save-one:hover, .save-one.saved { color: var(--gold); border-color: var(--gold); }

.toolbar-band { display: grid; grid-template-columns: minmax(260px, 1fr) 170px auto auto; gap: 10px; align-items: end; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(6,17,32,.94); }
.search-box { position: relative; display: block; }
.search-box svg { position: absolute; left: 10px; top: 10px; color: var(--muted); }
.search-box input { padding-left: 36px; }
.lead-layout { height: calc(100vh - 164px); min-height: 520px; display: grid; grid-template-columns: minmax(400px, 1.2fr) minmax(330px, .8fr); gap: 12px; margin-top: 12px; }
.lead-table-panel, .lead-detail { overflow: hidden; }
.lead-list { height: calc(100% - 58px); overflow: auto; }
.lead-row { display: grid; grid-template-columns: minmax(170px, 1fr) 110px 100px 16px; gap: 10px; align-items: center; min-height: 61px; padding: 9px 13px; border-bottom: 1px solid var(--line); cursor: pointer; }
.lead-row:hover, .lead-row.active { background: #091e34; box-shadow: inset 2px 0 0 var(--cyan); }
.lead-row strong, .lead-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-row strong { font-size: 12px; }
.lead-row span { color: var(--muted); font-size: 10px; }
.stage-badge { width: max-content; padding: 4px 6px; border: 1px solid var(--line-bright); border-radius: 3px; color: var(--cyan) !important; }
.stage-badge.interested, .stage-badge.closed { color: var(--jade) !important; border-color: var(--jade); }
.stage-badge.blocked { color: var(--red) !important; border-color: var(--red); }
.lead-detail { overflow: auto; }
.lead-detail-content { padding: 17px; }
.lead-detail-content h2 { font-size: 20px; }
.lead-meta { display: grid; gap: 1px; margin-top: 16px; border-top: 1px solid var(--line); }
.lead-meta > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lead-meta span { color: var(--muted); font-size: 10px; }
.lead-meta strong, .lead-meta a { overflow-wrap: anywhere; font-size: 11px; }
.lead-meta a { color: var(--cyan); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.analysis-controls { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(6,17,32,.94); }
.analysis-controls::before { content: ""; position: absolute; top: -1px; left: 18px; width: 76px; height: 1px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.analysis-controls > div:first-child { min-width: 0; }
.analysis-controls > div:first-child p { max-width: 720px; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.analysis-controls + .analysis-controls { display: block; margin-top: 10px; }
.analysis-first-use-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; padding: 11px 14px; border: 1px solid rgba(49,196,141,.34); border-left: 3px solid var(--jade); background: rgba(8,36,32,.68); }
.analysis-first-use-note > svg { flex: 0 0 16px; width: 16px; height: 16px; color: var(--jade); }
.analysis-first-use-note strong, .analysis-first-use-note span { display: block; }
.analysis-first-use-note strong { color: #dff8ee; font-size: 11px; }
.analysis-first-use-note span { margin-top: 3px; color: #91b2a6; font-size: 9px; line-height: 1.6; }
.analysis-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 9px; align-items: end; margin-top: 14px; }
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.analysis-product-market-panel { grid-column: 1 / -1; min-height: 0; }
.analysis-product-market-panel .panel-heading > span { color: var(--muted); font-size: 8px; }
.analysis-product-market-panel .region-product-market-signals { min-height: 90px; }
.analysis-product-market-panel .region-product-market-signals:empty::before,
.analysis-product-market-panel .region-product-market-signals.empty::before { min-height: 0; display: block; box-sizing: border-box; padding: 28px 8px; overflow-wrap: anywhere; line-height: 1.6; text-align: center; white-space: normal; }
.category-panel, .evidence-panel { min-height: 310px; }
.category-bars, .evidence-list { padding: 12px 14px; }
.category-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) 58px; gap: 10px; align-items: center; min-height: 35px; }
.category-row > span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.category-row strong { color: var(--gold); font: 700 10px ui-monospace, monospace; text-align: right; }
.bar-track { height: 5px; background: #14252e; }
.bar-track i { display: block; height: 100%; background: var(--cyan); }
.evidence-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(120px, auto) minmax(75px, auto); gap: 10px; min-height: 58px; align-items: center; border-bottom: 1px solid var(--line); }
.evidence-primary { min-width: 0; }
.evidence-primary strong, .evidence-primary > span { display: block; }
.evidence-primary strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-primary > span { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-tags { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.evidence-kind { color: var(--muted); font-size: 8px; }
.evidence-value { color: var(--jade) !important; font: 700 11px ui-monospace, monospace; text-align: right; }
.recommendations-section { margin-top: 14px; padding: 0 14px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(5,15,29,.78); }
.section-heading { min-height: 55px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.estimate-badge { padding: 5px 8px; border: 1px solid var(--gold); border-radius: 3px; color: var(--gold); font-size: 9px; }
.recommendation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 12px; }
.recommendation-card { min-height: 210px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #071426; box-shadow: inset 0 1px 0 rgba(36,215,237,.08); }
.recommendation-score { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.recommendation-score strong { color: var(--gold); font: 700 23px ui-monospace, monospace; }
.recommendation-score span { color: var(--muted); font-size: 9px; }
.recommendation-card.unscored { border-color: #72551a; }
.recommendation-score.unscored strong { color: var(--gold); font: 700 11px ui-monospace, monospace; }
.recommendation-card h4 { min-height: 37px; margin: 8px 0 9px; font-size: 13px; }
.recommendation-card p { margin-bottom: 10px; font-size: 10px; line-height: 1.6; }
.confidence-line { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 9px; }
.confidence-line strong { color: var(--jade); }
.confidence-line.pending strong { color: var(--gold); }
.recommendation-card small { display: block; margin-top: 9px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.warning-strip { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 11px; color: var(--muted); font-size: 9px; }
.warning-strip span { padding-left: 8px; border-left: 2px solid var(--red); }

.data-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 14px; }
.package-center { margin-bottom: 14px; overflow: hidden; }
.package-center::before { width: 96px; background: var(--jade); box-shadow: 0 0 12px rgba(46,210,155,.7); }
.package-center-heading { background: linear-gradient(90deg, rgba(46,210,155,.06), transparent 42%); }
.package-trust-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #28684f; border-radius: 3px; color: var(--jade); font: 700 8px ui-monospace, monospace; }
.package-trust-badge.untrusted { border-color: #754050; color: var(--red); }
.package-trust-badge svg { width: 13px; height: 13px; }
.package-overview { min-height: 106px; display: grid; grid-template-columns: minmax(250px,.9fr) minmax(320px,1.15fr) minmax(230px,.75fr); border-bottom: 1px solid var(--line); }
.package-current, .package-trust { min-width: 0; display: flex; align-items: center; gap: 13px; padding: 15px; }
.package-current { border-right: 1px solid var(--line); }
.package-current small, .package-current strong, .package-current span, .package-trust small, .package-trust strong, .package-trust span { display: block; }
.package-current small, .package-trust small { color: var(--muted); font-size: 8px; }
.package-current strong { max-width: 190px; margin-top: 5px; overflow: hidden; color: var(--jade); font: 700 17px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.package-current span, .package-trust span { margin-top: 5px; color: var(--muted); font-size: 8px; }
.package-core { position: relative; width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border: 1px solid #28684f; color: var(--jade); background: rgba(8,40,35,.55); box-shadow: inset 0 0 18px rgba(46,210,155,.08); }
.package-core::before, .package-core::after { content: ""; position: absolute; width: 7px; height: 7px; border-color: var(--gold); }
.package-core::before { top: -2px; left: -2px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.package-core::after { right: -2px; bottom: -2px; border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold); }
.package-core span { position: absolute; right: 5px; top: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 8px var(--jade); }
.package-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-right: 1px solid var(--line); }
.package-kpis > div { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 14px; border-right: 1px solid var(--line); }
.package-kpis > div:last-child { border-right: 0; }
.package-kpis span { color: var(--muted); font-size: 8px; }
.package-kpis strong { overflow: hidden; color: var(--cyan); font: 700 18px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.package-kpis strong.warning { color: var(--red); }
.package-trust > svg { width: 32px; height: 32px; flex: 0 0 32px; color: var(--gold); }
.package-trust strong { max-width: 150px; margin-top: 5px; overflow: hidden; color: var(--gold); font: 700 10px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.package-workspace { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); border-bottom: 1px solid var(--line); }
.package-workspace > div { min-width: 0; min-height: 286px; padding: 14px; border-right: 1px solid var(--line); background: rgba(4,14,27,.42); }
.package-workspace > div:last-child { border-right: 0; }
.package-module-heading, .package-history-heading { min-height: 38px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.package-module-heading h4, .package-history-heading h4 { margin: 3px 0 0; font-size: 12px; }
.package-module-heading > span { color: var(--muted); font: 700 8px ui-monospace, monospace; }
.package-file-drop { position: relative; min-height: 142px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; margin-top: 8px; border: 1px dashed var(--line-bright); border-radius: 4px; background: rgba(5,19,37,.9); cursor: pointer; }
.package-file-drop:hover, .package-file-drop.drag { border-color: var(--jade); background: rgba(8,31,42,.92); }
.package-file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.package-file-drop svg { width: 30px; height: 30px; color: var(--jade); }
.package-file-drop strong { font-size: 12px; }
.package-file-drop span { max-width: 90%; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.package-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.package-result { min-height: 34px; padding: 9px 0 0; line-height: 1.5; }
.package-preview-empty { min-height: 184px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: var(--muted); }
.package-preview-empty svg { width: 30px; height: 30px; color: #345a77; }
.package-preview-empty span { font-size: 10px; }
.package-preview-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 8px 0 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.package-preview-grid > div { min-width: 0; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.package-preview-grid dt { color: var(--muted); font-size: 8px; }
.package-preview-grid dd { min-height: 17px; margin: 5px 0 0; overflow: hidden; color: var(--text); font: 700 10px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
#package-preview-signature { color: var(--jade); }
#package-preview-state { color: var(--muted); font: 700 8px ui-monospace, monospace; }
#package-preview-state.verified { color: var(--jade); }
#package-preview-state.error { color: var(--red); }
.package-preview-note { min-height: 35px; padding-top: 9px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.package-preview-note.success { color: var(--jade); }
.package-preview-note.error { color: var(--red); }
.package-publisher label { margin-top: 10px; }
.package-publisher input { font-family: ui-monospace, monospace; }
.publisher-stats { min-height: 62px; display: flex; align-items: center; gap: 18px; margin: 10px 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.publisher-stats span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.publisher-stats svg { width: 15px; height: 15px; color: var(--gold); }
.package-publisher .command { width: 100%; }
.package-history { padding: 13px 14px 14px; }
.package-history-heading { align-items: center; padding-bottom: 9px; }
.package-history-list { border-top: 1px solid var(--line); }
.package-history-empty { min-height: 60px; display: grid; place-items: center; color: var(--muted); font-size: 9px; }
.package-history-row { min-height: 58px; display: grid; grid-template-columns: 92px minmax(150px,1fr) 105px 125px 34px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.package-history-row > div { min-width: 0; }
.package-history-row > div > strong, .package-history-row > div > small, .package-history-row > div > span { display: block; }
.package-history-row > div > strong { overflow: hidden; font: 700 11px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.package-history-row > div > small, .package-history-row > div > span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.package-history-row code { color: var(--gold); font: 700 9px ui-monospace, monospace; }
.package-history-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.package-history-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.package-history-status.installed { color: var(--jade); }
.package-history-status.installed i { background: var(--jade); box-shadow: 0 0 7px var(--jade); }
.package-history-status.rolled-back { color: var(--gold); }
.package-history-status.rolled-back i { background: var(--gold); }
.package-rollback:disabled { opacity: .25; cursor: not-allowed; }
.package-center.busy .package-core span { animation: update-pulse 1s ease-in-out infinite; }
.github-update-panel { margin-bottom: 14px; }
.github-update-panel::before { width: 96px; background: var(--cyan); box-shadow: 0 0 12px rgba(36,215,237,.7); }
.github-update-layout { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(220px,.7fr); align-items: end; gap: 14px; padding: 14px; }
.github-manifest-field { min-width: 0; }
.github-manifest-field input { width: 100%; font-family: ui-monospace, monospace; }
.github-manifest-field small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.github-update-actions { display: flex; gap: 8px; }
.github-update-actions .command { white-space: nowrap; }
.github-update-state { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.github-update-state svg { width: 16px; height: 16px; flex: 0 0 16px; }
.github-update-state.available { border-color: #28684f; color: var(--jade); }
.github-update-state.current { border-color: #31536d; color: var(--cyan); }
.github-update-panel.busy .github-update-state svg { animation: update-spin .9s linear infinite; }
.github-update-result { margin: 0 14px 14px; }
.public-update-panel { margin-bottom: 14px; }
.update-source-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #2d685a; border-radius: 3px; color: var(--jade); font: 700 8px ui-monospace, monospace; }
.update-source-badge svg { width: 13px; height: 13px; }
.public-update-layout { min-height: 118px; display: grid; grid-template-columns: minmax(250px,.85fr) minmax(430px,1.5fr) 150px; align-items: stretch; }
.public-update-state { display: flex; align-items: center; gap: 13px; padding: 16px; border-right: 1px solid var(--line); }
.public-update-state strong, .public-update-state span, .public-update-state small { display: block; }
.public-update-state strong { color: var(--jade); font-size: 13px; }
.public-update-state span { margin-top: 4px; font-size: 10px; }
.public-update-state small { margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.update-radar { position: relative; width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--cyan); }
.update-radar::before, .update-radar span { position: absolute; inset: 6px; border: 1px solid rgba(36,215,237,.23); border-radius: 50%; content: ""; }
.update-radar span { inset: 14px; }
.update-radar svg { width: 18px; height: 18px; }
.public-update-panel.updating .update-radar { animation: update-pulse 1.2s ease-in-out infinite; }
.public-update-panel.updating .public-update-command svg { animation: update-spin .9s linear infinite; }
.public-update-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.public-update-stats > div { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 14px; border-right: 1px solid var(--line); }
.public-update-stats span { color: var(--muted); font-size: 8px; }
.public-update-stats strong { overflow: hidden; color: var(--text); font: 700 18px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.public-update-stats strong[id$="-updated"] { overflow: visible; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
#public-data-updated { font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
.public-update-command { align-self: center; justify-self: center; width: 126px; }
.malaysia-cpi-panel .public-update-stats { grid-template-columns: repeat(5,minmax(0,1fr)); }
.malaysia-cpi-panel #malaysia-cpi-updated { font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
.malaysia-gdp-panel .public-update-stats, .malaysia-labour-panel .public-update-stats { grid-template-columns: repeat(5,minmax(0,1fr)); }
.malaysia-gdp-panel #malaysia-gdp-updated, .malaysia-labour-panel #malaysia-labour-updated { font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
.public-update-result { min-height: 28px; padding-top: 8px; border-top: 1px solid var(--line); }
.governance-panel { margin-bottom: 14px; overflow: hidden; }
.governance-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.governance-summary > div { min-width: 0; min-height: 88px; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 12px 14px; border-right: 1px solid var(--line); }
.governance-summary > div:last-child { border-right: 0; }
.governance-summary span, .governance-summary small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.governance-summary strong { color: var(--cyan); font: 700 17px ui-monospace, monospace; }
.governance-summary.empty { display: block; padding: 12px 14px; color: var(--red); font-size: 9px; }
.governance-datasets { display: grid; }
.governance-dataset { min-width: 0; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.governance-dataset:last-child { border-bottom: 0; }
.governance-dataset-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.governance-dataset-heading > div:first-child { min-width: 0; }
.governance-dataset-heading strong, .governance-dataset-heading small { display: block; }
.governance-dataset-heading strong { overflow-wrap: anywhere; color: var(--text); font-size: 11px; }
.governance-dataset-heading small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.governance-badges, .governance-permissions { display: flex; flex-wrap: wrap; gap: 5px; }
.governance-badges { justify-content: flex-end; }
.governance-status, .governance-permission { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 6px; border: 1px solid #31536d; color: var(--muted); font: 700 7px ui-monospace, monospace; }
.governance-status.positive, .governance-permission.positive { border-color: #28684f; color: var(--jade); }
.governance-status.warning, .governance-permission.warning { border-color: #72551a; color: var(--gold); }
.governance-status.negative, .governance-permission.negative { border-color: #754050; color: var(--red); }
.governance-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 11px 0 10px; border-top: 1px solid rgba(31,86,112,.45); border-bottom: 1px solid rgba(31,86,112,.45); }
.governance-facts > div { min-width: 0; padding: 8px 9px; border-right: 1px solid rgba(31,86,112,.45); }
.governance-facts > div:last-child { border-right: 0; }
.governance-facts dt { color: #6d91a8; font-size: 7px; }
.governance-facts dd { margin: 4px 0 0; overflow-wrap: anywhere; color: var(--text); font-size: 8px; line-height: 1.45; }
.governance-notices { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 14px; border-top: 1px solid var(--line); }
.governance-notices span { padding-left: 8px; border-left: 2px solid var(--gold); color: var(--muted); font-size: 8px; line-height: 1.45; }
.source-catalog-panel { margin-bottom: 14px; overflow: hidden; }
.source-catalog-summary { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; line-height: 1.5; }
.source-catalog-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.source-category { min-width: 0; border-right: 1px solid var(--line); }
.source-category:last-child { border-right: 0; }
.source-category[open] { grid-column: 1 / -1; border-top: 1px solid var(--line); border-right: 0; }
.source-category summary { min-height: 116px; display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: 1fr auto; gap: 7px 9px; padding: 13px; cursor: pointer; list-style: none; }
.source-category summary::-webkit-details-marker { display: none; }
.source-category summary > span { min-width: 0; }
.source-category summary strong, .source-category summary small { display: block; }
.source-category summary strong { color: var(--text); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.source-category summary small { margin-top: 7px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.source-category summary em { align-self: end; color: var(--cyan); font: normal 700 7px ui-monospace, monospace; }
.source-category summary svg { width: 14px; height: 14px; color: var(--muted); transition: transform .18s ease; }
.source-category[open] summary svg { transform: rotate(180deg); }
.source-entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); padding: 0 13px 13px; }
.source-entry { padding: 8px 0; border-top: 1px solid var(--line); }
.source-entry-grid .source-entry { min-width: 0; padding: 10px 11px; border-right: 1px solid var(--line); }
.source-entry-grid .source-entry:nth-child(4n) { border-right: 0; }
.source-entry strong, .source-entry small { display: block; }
.source-entry strong { color: var(--cyan); font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.source-entry small { margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 1.45; }
.source-entry a { color: inherit; }
.source-governance { display: grid; gap: 5px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.source-governance > div { min-width: 0; display: grid; grid-template-columns: minmax(62px,.42fr) minmax(0,1fr); gap: 7px; align-items: start; }
.source-governance span { color: var(--muted); font-size: 7px; line-height: 1.45; }
.source-governance strong { color: var(--text); font-size: 7px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.source-status { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; padding: 2px 4px; border: 1px solid #31536d; color: var(--muted); font: 700 7px ui-monospace, monospace; }
.source-status::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.source-status.connected { border-color: #28684f; color: var(--jade); }
.source-status.import_required { border-color: #72551a; color: var(--gold); }
.source-status.ready { border-color: #31536d; color: var(--cyan); }
.collector-panel { margin-bottom: 14px; overflow: hidden; }
.collector-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.collector-heading-actions .source-status { margin-top: 0; }
.collector-runtime-toggle { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid var(--line); background: rgba(5,22,34,.72); color: var(--muted); font-size: 9px; cursor: pointer; }
.collector-runtime-toggle input { width: 14px; height: 14px; accent-color: var(--jade); }
.collector-runtime-toggle:has(input:checked) { border-color: rgba(67,226,174,.5); color: var(--jade); }
.collector-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.collector-summary > div { min-width: 0; padding: 10px 14px; border-right: 1px solid var(--line); }
.collector-summary > div:last-child { border-right: 0; }
.collector-summary span, .collector-summary strong { display: block; }
.collector-summary span { color: var(--muted); font-size: 8px; }
.collector-summary strong { margin-top: 4px; overflow-wrap: anywhere; color: var(--text); font: 700 12px ui-monospace, monospace; }
.collector-load-notices { display: grid; gap: 1px; border-bottom: 1px solid var(--line); background: rgba(255,91,82,.035); }
.collector-load-notices[hidden] { display: none; }
.collector-load-notices > div { min-width: 0; display: grid; grid-template-columns: 16px minmax(0,1fr); gap: 8px; align-items: start; padding: 8px 14px; color: #ffc2bd; font-size: 8px; line-height: 1.5; }
.collector-load-notices svg { width: 14px; height: 14px; margin-top: 1px; color: var(--red); }
.collector-load-notices strong { margin-right: 7px; color: var(--text); font-size: 8px; }
.collector-plan { border-top: 1px solid var(--line); background: rgba(3, 15, 26, .35); }
.collector-plan-heading { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.collector-plan-heading h4 { margin: 2px 0 0; color: var(--text); font-size: 11px; }
.collector-plan-count { flex: 0 0 auto; color: var(--cyan); font: 700 8px ui-monospace, monospace; }
.collector-plan-note { margin: 0; padding: 9px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 8px; line-height: 1.55; }
.collector-plan-list { display: grid; gap: 0; }
.collector-plan-state { min-height: 54px; display: grid; place-items: center; padding: 12px 14px; color: var(--muted); font-size: 8px; text-align: center; }
.collector-plan-state.error { color: var(--red); }
.collector-plan-group { min-width: 0; border-bottom: 1px solid var(--line); }
.collector-plan-group:last-child { border-bottom: 0; }
.collector-plan-group-heading { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 14px 7px; background: rgba(13, 41, 61, .32); }
.collector-plan-group-heading strong { min-width: 0; color: var(--text); font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.collector-plan-group-heading span { flex: 0 0 auto; color: var(--muted); font-size: 7px; white-space: nowrap; }
.collector-plan-group-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.collector-plan-row { min-width: 0; min-height: 66px; display: grid; grid-template-columns: 20px minmax(0, 1fr) 112px; align-items: center; gap: 8px; padding: 9px 14px; border-top: 1px solid rgba(31, 86, 112, .45); cursor: pointer; }
.collector-plan-row:nth-child(2n) { border-left: 1px solid rgba(31, 86, 112, .45); }
.collector-plan-row:hover { background: rgba(32, 104, 132, .12); }
.collector-plan-toggle { display: inline-grid; place-items: center; width: 18px; height: 18px; }
.collector-plan-toggle input { width: 15px; height: 15px; margin: 0; accent-color: var(--cyan); }
.collector-plan-copy { min-width: 0; }
.collector-plan-copy strong, .collector-plan-copy small { display: block; overflow-wrap: anywhere; }
.collector-plan-copy strong { color: var(--text); font-size: 9px; line-height: 1.4; }
.collector-plan-copy small { margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 1.45; }
.collector-plan-row select { min-width: 0; width: 112px; height: 30px; padding-inline: 7px; font-size: 8px; }
.collector-plan-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 14px 2px; }
.collector-plan-result { min-height: 25px; padding-top: 7px; }
.collector-form { display: grid; grid-template-columns: minmax(170px,.75fr) minmax(260px,1.5fr) minmax(170px,.75fr); gap: 10px; padding: 13px 14px 10px; }
.collector-form label { min-width: 0; }
.collector-form label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; }
.collector-form select, .collector-form input, .collector-form textarea { width: 100%; }
.collector-instructions { grid-column: 1 / span 2; }
.collector-selection { min-height: 34px; display: flex; align-items: center; padding: 7px 10px; border: 1px solid var(--line); color: var(--cyan); font-size: 8px; overflow-wrap: anywhere; }
.collector-form .command { grid-column: 3; width: 100%; min-width: 0; }
.free-collector-panel { margin-bottom: 14px; }
.free-batch-console { border-bottom: 1px solid var(--line); background: rgba(3,15,26,.38); }
.world-bank-history-settings { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(120px,.4fr) minmax(120px,.4fr) minmax(240px,1.2fr); gap: 10px; align-items: end; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(13,42,57,.32); }
.world-bank-history-settings label { min-width: 0; }
.world-bank-history-settings label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; }
.world-bank-history-settings select, .world-bank-history-settings input { width: 100%; height: 32px; }
.world-bank-history-settings > small { display: flex; align-items: center; gap: 6px; min-height: 32px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.world-bank-history-settings > small svg { flex: 0 0 auto; width: 14px; color: var(--jade); }
.free-batch-toolbar { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.free-batch-toolbar > div:first-child { min-width: 0; }
.free-batch-toolbar h4 { margin: 2px 0 0; color: var(--text); font-size: 11px; }
.free-batch-toolbar small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.free-batch-actions { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.danger-command { border-color: rgba(255,91,82,.45); color: #ffc2bd; }
.danger-command:hover:not(:disabled) { border-color: var(--red); color: #fff; }
.free-batch-progress { padding: 11px 14px 0; }
.free-batch-progress-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.free-batch-progress-heading strong { min-width: 0; color: var(--text); font-size: 9px; overflow-wrap: anywhere; }
.free-batch-progress-heading span { flex: 0 0 auto; color: var(--cyan); font: 700 8px ui-monospace, monospace; }
.free-batch-progress-track { height: 4px; margin-top: 8px; overflow: hidden; border: 1px solid rgba(31,86,112,.6); background: rgba(1,10,17,.8); }
.free-batch-progress-track span { display: block; width: 0; height: 100%; background: var(--cyan); transition: width .2s ease; }
.free-batch-items { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 9px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.free-batch-item { min-width: 0; min-height: 48px; display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.free-batch-item > span:nth-child(2) { min-width: 0; }
.free-batch-item strong, .free-batch-item small { display: block; overflow-wrap: anywhere; }
.free-batch-item strong { color: var(--text); font-size: 8px; line-height: 1.4; }
.free-batch-item small { margin-top: 2px; color: var(--muted); font-size: 7px; line-height: 1.4; }
.free-batch-item em { color: var(--muted); font: 700 7px ui-monospace, monospace; white-space: nowrap; }
.free-batch-dot { width: 6px; height: 6px; border-radius: 50%; background: #587184; }
.free-batch-item.running .free-batch-dot, .free-batch-item.pause_requested .free-batch-dot, .free-batch-item.cancel_requested .free-batch-dot { background: var(--cyan); box-shadow: 0 0 8px rgba(56,208,255,.6); }
.free-batch-item.succeeded .free-batch-dot { background: var(--jade); }
.free-batch-item.succeeded_with_warnings .free-batch-dot { background: var(--gold); box-shadow: 0 0 8px rgba(247,190,64,.5); }
.free-batch-item.failed .free-batch-dot { background: var(--red); }
.free-batch-item.paused .free-batch-dot, .free-batch-item.cancelled .free-batch-dot, .free-batch-item.skipped .free-batch-dot { background: var(--gold); }
.free-batch-empty { grid-column: 1 / -1; min-height: 42px; display: grid; place-items: center; padding: 9px; color: var(--muted); font-size: 8px; text-align: center; }
.free-batch-history { margin-top: 10px; border-top: 1px solid var(--line); }
.free-batch-history-heading { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 14px; }
.free-batch-history-heading > span { color: var(--muted); font-size: 8px; }
#free-batch-history-list { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border-top: 1px solid var(--line); }
#free-batch-history-list > div:not(.free-batch-empty) { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 8px 10px; border-right: 1px solid var(--line); }
#free-batch-history-list > div:last-child { border-right: 0; }
#free-batch-history-list span { min-width: 0; }
#free-batch-history-list strong, #free-batch-history-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#free-batch-history-list strong { color: var(--text); font-size: 7px; }
#free-batch-history-list small { margin-top: 2px; color: var(--muted); font: 600 6px ui-monospace, monospace; }
#free-batch-history-list em { color: var(--cyan); font: 700 7px ui-monospace, monospace; white-space: nowrap; }
.free-collector-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.free-collector-row { min-width: 0; min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.free-collector-row:nth-child(2n) { border-right: 0; }
.free-collector-row span { min-width: 0; }
.free-collector-row strong, .free-collector-row small { display: block; }
.free-collector-row strong { color: var(--text); font-size: 10px; }
.free-collector-row small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.free-collector-actions { display: flex; gap: 6px; }
#free-collector-result { padding: 0 14px 10px; }
.collector-result { padding: 0 14px 10px; }
.collector-recent { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); border-top: 1px solid var(--line); }
.collector-recent > span { grid-column: 1 / -1; padding: 10px 14px; color: var(--muted); font-size: 8px; }
.collector-recent > div { min-width: 0; padding: 9px 11px; border-right: 1px solid var(--line); }
.collector-recent > div:last-child { border-right: 0; }
.collector-recent strong, .collector-recent span, .collector-recent small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collector-recent strong { color: var(--cyan); font-size: 8px; }
.collector-recent span, .collector-recent small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.collector-recent > span.error { color: #ffc2bd; }
.collector-staged-section { border-top: 1px solid var(--line); }
.collector-staged-heading { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.collector-staged-heading h4 { margin: 2px 0 0; font-size: 11px; }
.collector-review-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.collector-select-all, .collector-staged-select { display: inline-flex; align-items: center; gap: 6px; }
.collector-select-all { color: var(--muted); font-size: 8px; white-space: nowrap; }
.collector-select-all input, .collector-record-checkbox { width: 14px; height: 14px; accent-color: var(--cyan); }
.compact-command { min-height: 30px; padding: 7px 10px; font-size: 8px; }
.collector-review-note-row { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.collector-review-note-row label { display: flex; align-items: center; gap: 8px; min-width: min(520px, 100%); flex: 1; }
.collector-review-note-row label span { color: var(--muted); font-size: 8px; white-space: nowrap; }
.collector-review-note-row input { min-width: 0; width: 100%; border: 1px solid var(--line-bright); background: var(--panel); color: var(--text); padding: 7px 9px; font-size: 8px; }
.collector-staged-select { min-height: 20px; flex-wrap: wrap; }
.collector-review-status { display: inline-flex; align-items: center; min-height: 18px; padding: 2px 6px; border: 1px solid var(--line-bright); color: var(--muted); font-size: 7px; }
.collector-review-status.trusted { border-color: rgba(88, 220, 161, .45); color: var(--jade); }
.collector-review-status.pending { color: var(--amber); }
.collector-readonly-note { max-width: min(420px,55%); display: inline-flex; align-items: center; gap: 6px; color: var(--jade); font-size: 8px; line-height: 1.45; text-align: right; }
.collector-readonly-note svg { width: 14px; height: 14px; flex: 0 0 auto; }
.collector-staged-list { display: grid; }
.collector-staged-state { min-height: 58px; display: grid; place-items: center; padding: 12px 14px; color: var(--muted); font-size: 8px; text-align: center; }
.collector-staged-state.error { color: #ffc2bd; }
.collector-staged-record { min-width: 0; display: grid; grid-template-columns: minmax(180px,.8fr) minmax(260px,1.35fr) minmax(130px,.55fr); gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.collector-staged-record:last-child { border-bottom: 0; }
.collector-staged-identity, .collector-staged-measure { min-width: 0; }
.collector-staged-identity > strong, .collector-staged-identity > small, .collector-staged-measure > span, .collector-staged-measure > strong, .collector-staged-measure > small { display: block; }
.collector-scope { display: inline-flex; width: fit-content; margin-bottom: 6px; padding: 2px 5px; border: 1px solid #28684f; color: var(--jade); font: 700 7px ui-monospace, monospace; }
.collector-scope.parent_reference { border-color: #72551a; color: var(--gold); }
.collector-scope.unknown { border-color: var(--red); color: #ffc2bd; }
.collector-staged-identity > strong { color: var(--text); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.collector-staged-identity > small { margin-top: 4px; color: var(--muted); font-size: 7px; line-height: 1.45; overflow-wrap: anywhere; }
.collector-staged-source a { color: var(--cyan); }
.collector-staged-geographies { min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.collector-staged-geographies > div { min-width: 0; padding-left: 9px; border-left: 2px solid var(--line-bright); }
.collector-staged-geographies span, .collector-staged-geographies strong { display: block; }
.collector-staged-geographies span, .collector-staged-measure > span, .collector-staged-evidence > span { color: var(--muted); font-size: 7px; }
.collector-staged-geographies strong { margin-top: 4px; color: var(--text); font-size: 8px; line-height: 1.5; overflow-wrap: anywhere; }
.collector-staged-measure { align-self: center; text-align: right; }
.collector-staged-measure > strong { margin-top: 5px; color: var(--cyan); font: 700 13px ui-monospace, monospace; line-height: 1.4; overflow-wrap: anywhere; }
.collector-staged-measure > small { margin-top: 5px; color: var(--muted); font-size: 7px; }
.collector-staged-evidence { min-width: 0; grid-column: 1 / -1; display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 5px 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.collector-staged-evidence > span { grid-row: 1 / span 2; }
.collector-staged-evidence blockquote { max-height: 96px; margin: 0; overflow: auto; color: var(--text); font-size: 8px; line-height: 1.55; overflow-wrap: anywhere; }
.collector-staged-evidence small { color: var(--muted); font-size: 7px; line-height: 1.45; overflow-wrap: anywhere; }
@keyframes update-pulse { 50% { border-color: var(--jade); box-shadow: 0 0 18px rgba(62,224,172,.2); } }
@keyframes update-spin { to { transform: rotate(360deg); } }
.import-panel, .semantics-panel { min-height: 360px; }
#indicator-import-form { padding: 15px; }
.file-drop { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; border: 1px dashed var(--line-bright); border-radius: var(--radius); background: #051325; cursor: pointer; box-shadow: inset 0 0 35px rgba(36,215,237,.035); }
.file-drop:hover, .file-drop.drag { border-color: var(--cyan); background: var(--surface-2); }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-drop svg { width: 34px; height: 34px; color: var(--cyan); }
.file-drop strong { font-size: 13px; }
.file-drop span { color: var(--muted); font-size: 10px; }
.import-actions { display: flex; gap: 9px; margin-top: 12px; }
.import-result { min-height: 24px; padding: 0 15px 14px; color: var(--muted); font-size: 10px; }
.import-result.success { color: var(--jade); }
.import-result.error { color: var(--red); }
.semantics-list { padding: 5px 14px 14px; }
.semantics-list > div { display: flex; align-items: center; gap: 11px; min-height: 66px; border-bottom: 1px solid var(--line); }
.semantics-list svg { color: var(--gold); }
.semantics-list strong, .semantics-list small { display: block; }
.semantics-list strong { font-size: 11px; }
.semantics-list small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.compliance-panel { margin-top: 14px; }
.compliance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compliance-grid > div { min-height: 110px; padding: 16px; border-right: 1px solid var(--line); }
.compliance-grid > div:last-child { border-right: 0; }
.compliance-grid strong, .compliance-grid span { display: block; }
.compliance-grid strong { color: var(--jade); font-size: 11px; }
.compliance-grid span { margin-top: 8px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.api-access-panel { margin-top: 14px; }
.api-access-layout { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; }
.api-access-layout strong { display: block; color: var(--text); font-size: 13px; }
.api-access-layout p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
@media (max-width: 600px) {
  .api-access-layout { align-items: stretch; flex-direction: column; }
  .api-access-layout .command { width: 100%; justify-content: center; }
}

.empty-slot:empty::before, .empty-slot.empty::before { content: attr(data-empty); min-height: 100px; display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.empty-state { min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; }
.empty-state svg { width: 31px; height: 31px; color: var(--cyan); }
.empty-state strong { font-size: 13px; }
.empty-state span { color: var(--muted); font-size: 10px; }

dialog { width: min(520px, calc(100vw - 30px)); padding: 0; border: 1px solid var(--line-bright); border-radius: var(--radius); background: #061120; color: var(--text); box-shadow: 0 0 45px rgba(36,215,237,.12); }
dialog::backdrop { background: rgba(2,6,12,.8); }
.help-manual-dialog { width: min(920px, calc(100vw - 30px)); max-width: none; max-height: min(820px, calc(100vh - 30px)); overflow: hidden; }
.xiaoyexiao-dialog { width: min(680px, calc(100vw - 30px)); max-width: none; max-height: min(760px, calc(100vh - 30px)); overflow: hidden; }
.xiaoyexiao-heading { min-height: 68px; align-items: center; padding: 12px 16px; }
.xiaoyexiao-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.xiaoyexiao-identity > img { width: 38px; height: 38px; border-radius: 5px; object-fit: cover; }
.xiaoyexiao-identity > span { min-width: 0; display: grid; gap: 2px; }
.xiaoyexiao-identity small { color: var(--muted); font-size: 7px; font-style: normal; font-weight: 700; }
.xiaoyexiao-identity strong { font-size: 15px; }
.xiaoyexiao-identity em { margin-left: 3px; padding: 4px 7px; border: 1px solid #35664e; border-radius: 4px; color: var(--jade); font-size: 8px; font-style: normal; font-weight: 700; white-space: nowrap; }
.xiaoyexiao-messages { height: min(390px, calc(100vh - 355px)); min-height: 220px; overflow-y: auto; display: grid; align-content: start; gap: 12px; padding: 18px 16px; background: #04101c; }
.xiaoyexiao-message { max-width: 88%; display: grid; gap: 4px; }
.xiaoyexiao-message > span { color: var(--muted); font-size: 8px; font-weight: 700; }
.xiaoyexiao-message p { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; background: #0a1928; color: var(--text); font-size: 11px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.xiaoyexiao-message.user { justify-self: end; }
.xiaoyexiao-message.user > span { text-align: right; }
.xiaoyexiao-message.user p { border-color: #32677c; background: #0a2430; }
.xiaoyexiao-message.error p { border-color: #7e4d4d; color: #ffd0c9; }
.xiaoyexiao-prompts { display: flex; gap: 7px; overflow-x: auto; padding: 10px 16px; border-top: 1px solid var(--line); background: #071523; }
.xiaoyexiao-prompts button { flex: 0 0 auto; min-height: 28px; padding: 0 9px; border: 1px solid var(--line-bright); border-radius: 4px; background: transparent; color: var(--muted); font-size: 9px; cursor: pointer; }
.xiaoyexiao-prompts button:hover { border-color: var(--cyan); color: var(--text); }
.xiaoyexiao-proposal { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid #755f32; border-bottom: 1px solid #755f32; background: #1b180f; }
.xiaoyexiao-proposal > div:first-child { min-width: 0; display: grid; gap: 4px; }
.xiaoyexiao-proposal span { color: var(--gold); font-size: 8px; font-weight: 800; }
.xiaoyexiao-proposal strong { font-size: 11px; }
.xiaoyexiao-proposal p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.xiaoyexiao-proposal-actions { display: flex; gap: 7px; }
.xiaoyexiao-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 12px 16px; }
.xiaoyexiao-form textarea { min-width: 0; max-height: 120px; resize: vertical; }
.xiaoyexiao-form .command { min-height: 42px; }
.xiaoyexiao-boundary { min-height: 38px; display: flex; align-items: center; gap: 7px; margin: 0; padding: 8px 16px; border-top: 1px solid var(--line); background: #050f1d; color: var(--muted); font-size: 8px; line-height: 1.5; }
.xiaoyexiao-boundary svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--jade); }
.help-manual-heading { padding: 18px 20px 14px; }
.help-manual-heading h3 { margin: 3px 0 4px; font-size: 20px; }
.help-manual-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.manual-context { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: #071829; }
.manual-context > div { min-width: 0; display: grid; gap: 4px; padding: 12px 20px; border-right: 1px solid var(--line); }
.manual-context > div:last-child { border-right: 0; }
.manual-context span { color: var(--muted); font-size: 8px; font-weight: 700; }
.manual-context strong { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.manual-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 12px; border-bottom: 1px solid var(--line); background: #050f1d; }
.manual-tabs button { min-width: 0; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 8px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.manual-tabs button:hover { color: var(--text); }
.manual-tabs button[aria-selected="true"] { border-bottom-color: var(--cyan); color: var(--cyan); }
.manual-tabs button svg { width: 15px; height: 15px; }
.manual-content { min-height: 310px; max-height: min(480px, calc(100vh - 300px)); overflow: auto; padding: 8px 20px 16px; }
.manual-panel { min-width: 0; }
.manual-step-list { margin: 0; padding: 0; list-style: none; }
.manual-step-list li { min-width: 0; min-height: 72px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.manual-step-list li:last-child { border-bottom: 0; }
.manual-step-list li > span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #2d6484; border-radius: 50%; color: var(--cyan); font: 800 11px ui-monospace, monospace; }
.manual-step-list strong, .manual-step-list p { display: block; }
.manual-step-list strong { font-size: 11px; }
.manual-step-list p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.manual-step-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.manual-step-list .command { min-width: 126px; min-height: 32px; }
.manual-directory { margin: 0; }
.manual-directory > div { min-height: 68px; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; border-bottom: 1px solid var(--line); }
.manual-directory > div:last-child { border-bottom: 0; }
.manual-directory dt { color: var(--text); font-size: 11px; font-weight: 700; }
.manual-directory dd { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.manual-rule-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.manual-rule-list li { min-width: 0; min-height: 118px; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-content: start; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.manual-rule-list li:nth-child(2n) { border-right: 0; }
.manual-rule-list li:nth-last-child(-n + 2) { border-bottom: 0; }
.manual-rule-list svg { width: 19px; height: 19px; color: var(--jade); }
.manual-rule-list strong { font-size: 11px; }
.manual-rule-list p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.manual-footer { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 20px; border-top: 1px solid var(--line); background: #050f1d; }
.manual-footer > span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.manual-footer > span svg { width: 15px; height: 15px; color: var(--gold); }
.site-manager-dialog { width: min(880px, calc(100vw - 30px)); max-width: none; max-height: min(840px, calc(100vh - 30px)); }
.site-manager-shell { padding: 18px; overflow: auto; }
.site-local-boundary { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--gold); background: rgba(239,184,63,.07); color: var(--muted); font-size: 10px; line-height: 1.6; }
.site-local-boundary svg { width: 16px; height: 16px; margin-top: 1px; color: var(--gold); }
.site-local-boundary strong { display: block; margin-bottom: 2px; color: var(--text); font-size: 11px; }
.site-console-tabs { display: flex; gap: 8px; margin-top: 14px; padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.site-console-tabs button { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 10px; cursor: pointer; }
.site-console-tabs button:hover { color: var(--text); }
.site-console-tabs button.active { border-bottom-color: var(--cyan); color: var(--cyan); }
.site-console-tabs button svg { width: 15px; height: 15px; }
.site-platform-directory { padding-top: 14px; }
.site-platform-site-list { display: grid; gap: 8px; margin-top: 12px; }
.site-platform-site-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); background: rgba(10, 25, 35, .35); }
.site-platform-site-row.current { border-color: rgba(36,215,237,.46); }
.site-platform-site-logo { width: 42px; height: 42px; display: block; border: 1px solid var(--line); border-radius: 4px; object-fit: cover; background: #091a26; }
.site-platform-site-row > div { min-width: 0; display: grid; gap: 5px; }
.site-platform-site-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.site-platform-site-row small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.site-platform-site-row .command { min-height: 30px; font-size: 9px; white-space: nowrap; }
.site-manager-section { padding: 17px 0; border-bottom: 1px solid var(--line); }
.site-manager-section:last-child { border-bottom: 0; padding-bottom: 0; }
.site-create-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border: 0; padding: 0; margin: 0; }
.site-create-choice legend { grid-column: 1 / -1; padding: 0; color: var(--text); font-size: 12px; font-weight: 700; }
.site-create-choice label { display: flex; align-items: flex-start; gap: 9px; min-height: 70px; padding: 11px 12px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; }
.site-create-choice label:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.site-create-choice label span { display: grid; gap: 4px; }
.site-create-choice label small { color: var(--muted); line-height: 1.45; }
@media (max-width: 600px) { .site-create-choice { grid-template-columns: 1fr; } }
.site-section-heading { min-height: 32px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.site-section-heading h4 { margin: 3px 0 0; font-size: 14px; }
.site-section-heading > span { color: var(--muted); font-size: 10px; }
.site-status-badge { padding: 4px 7px; border: 1px solid rgba(54,199,143,.4); border-radius: 3px; color: var(--jade) !important; background: rgba(54,199,143,.07); }
.site-status-badge.disabled { border-color: rgba(255,105,97,.45); color: #ffc2bd !important; background: rgba(255,105,97,.06); }
.site-form-grid { display: grid; grid-template-columns: minmax(180px,1.15fr) minmax(150px,.8fr) minmax(115px,.45fr) auto; align-items: end; gap: 10px; margin-top: 12px; }
.site-form-grid label, .site-member-add label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 9px; }
.site-form-grid label small { overflow: hidden; color: #657d90; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.site-form-grid input, .site-form-grid select, .site-member-add input, .site-member-add select { width: 100%; }
.site-logo-editor { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 12px; }
.site-logo-editor > img { width: 76px; height: 76px; display: block; border: 1px solid var(--line-bright); border-radius: 4px; object-fit: cover; background: #091a26; }
.site-logo-editor-fields { min-width: 0; display: grid; gap: 7px; }
.site-logo-editor-fields label { display: grid; gap: 6px; color: var(--muted); font-size: 9px; }
.site-logo-editor-fields small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.site-logo-upload-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.site-logo-upload-row input { min-width: 0; color: var(--muted); font-size: 9px; }
.site-logo-upload-row .command { white-space: nowrap; }
.site-form-command { display: flex; align-items: end; }
.site-form-command .command { white-space: nowrap; }
.site-form-result { min-height: 16px; margin: 8px 0 0; color: var(--jade); font-size: 10px; }
.site-form-result.error { color: #ffc2bd; }
.site-member-add { display: grid; grid-template-columns: minmax(220px,1fr) minmax(120px,.35fr) auto; align-items: end; gap: 10px; margin-top: 12px; }
.site-member-list { margin-top: 8px; border-top: 1px solid var(--line); }
.site-member-row { min-height: 52px; display: grid; grid-template-columns: minmax(0,1fr) 130px 32px; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.site-member-row > div { min-width: 0; }
.site-member-row strong, .site-member-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-member-row strong { font-size: 11px; }
.site-member-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.site-member-row select { width: 100%; height: 32px; font-size: 10px; }
.icon-command.danger { color: #d88d88; }
.icon-command.danger:hover { border-color: var(--red); color: #ffc2bd; }
.site-audit-list { margin-top: 10px; }
.site-audit-row { min-height: 34px; display: grid; grid-template-columns: minmax(150px,.8fr) minmax(180px,1fr) 145px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); font-size: 9px; }
.site-audit-row span { color: var(--text); }
.site-audit-row strong { overflow: hidden; color: var(--muted); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.site-audit-row time { color: #657d90; font-family: ui-monospace, monospace; text-align: right; }
.site-manager-section h4 { margin: 0; }
.site-manager-section .site-boundary-note { max-width: 760px; margin: 8px 0 12px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.site-manager-section .site-wide-field { grid-column: 1 / -1; }
.site-platform-form { grid-template-columns: repeat(3, minmax(140px, 1fr)) auto; }
.site-xiaoyexiao-form { grid-template-columns: minmax(155px,.55fr) minmax(230px,1fr) minmax(190px,.8fr) auto; }
.site-xiaoyexiao-actions { align-self: end; flex-wrap: nowrap; }
.site-xiaoyexiao-status { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 11px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 9px; }
.site-xiaoyexiao-status span { min-width: 100px; }
.site-checkbox-label { min-height: 34px; display: flex !important; align-items: center; gap: 8px; padding: 0 2px; }
.site-checkbox-label input { width: 16px; height: 16px; margin: 0; }
.site-module-editor { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 11px; border: 1px solid var(--line); }
.site-module-editor legend { padding: 0 6px; color: var(--muted); font-size: 9px; }
.site-module-editor label { min-height: 50px; display: flex; align-items: flex-start; gap: 9px; padding: 9px; border: 1px solid rgba(52, 92, 117, .55); background: rgba(10, 25, 35, .35); cursor: pointer; }
.site-module-editor input { width: 16px; height: 16px; flex: 0 0 auto; margin: 1px 0 0; }
.site-module-editor label > span { min-width: 0; display: grid; gap: 4px; }
.site-module-editor strong { color: var(--text); font-size: 10px; }
.site-module-editor small { color: var(--muted); font-size: 8px; line-height: 1.45; white-space: normal; }
.site-module-editor > p { grid-column: 1 / -1; margin: 1px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.site-module-editor[aria-disabled="true"] { opacity: .52; }
.site-company-module-editor { min-width: 0; margin: 0; padding: 11px; border: 1px solid var(--line); }
.site-company-module-editor legend { padding: 0 6px; color: var(--muted); font-size: 9px; }
.site-company-preset-editor { min-width: 0; margin: 0; padding: 11px; border: 1px solid var(--line); }
.site-company-preset-editor legend { padding: 0 6px; color: var(--muted); font-size: 9px; }
.site-company-preset-editor > p { margin: 9px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.site-company-preset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.site-company-preset { min-width: 0; min-height: 118px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 11px; border: 1px solid rgba(52, 92, 117, .55); border-radius: 6px; background: rgba(10, 25, 35, .35); color: var(--text); text-align: left; cursor: pointer; }
.site-company-preset:hover { border-color: var(--cyan); }
.site-company-preset.selected { border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.site-company-preset > span { color: var(--cyan); font-size: 8px; font-weight: 700; }
.site-company-preset > strong { font-size: 10px; }
.site-company-preset > small { color: var(--muted); font-size: 8px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.site-company-module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.site-company-module { min-width: 0; min-height: 126px; display: flex; align-items: flex-start; gap: 9px; padding: 10px; border: 1px solid rgba(52, 92, 117, .55); background: rgba(10, 25, 35, .35); cursor: pointer; }
.site-company-module.required { border-left: 3px solid var(--jade); }
.site-company-module input { width: 16px; height: 16px; flex: 0 0 auto; margin: 1px 0 0; }
.site-company-module > span { min-width: 0; display: grid; gap: 5px; }
.site-company-module strong { color: var(--text); font-size: 10px; }
.site-company-module small, .site-company-module em, .site-company-module b { font-style: normal; font-weight: 500; font-size: 8px; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
.site-company-module small { color: var(--muted); }
.site-company-module em { color: var(--cyan); }
.site-company-module b { color: var(--jade); }
.site-agent-harness-status { min-width: 0; display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 9px 10px; border: 1px solid var(--line); color: var(--muted); font-size: 9px; line-height: 1.55; }
.site-agent-harness-status svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--cyan); }
.site-company-workflow { min-width: 0; display: grid; gap: 10px; padding: 11px; border: 1px solid var(--line); }
.site-company-workflow > div { display: grid; gap: 4px; }
.site-company-workflow > div strong { color: var(--text); font-size: 10px; }
.site-company-workflow > div small { color: var(--muted); font-size: 8px; line-height: 1.5; }
.site-company-workflow ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.site-company-workflow li { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 7px; align-items: start; padding: 8px; border-top: 2px solid var(--jade); background: rgba(10, 25, 35, .28); }
.site-company-workflow li.optional { border-top-color: var(--blue); }
.site-company-workflow li > span { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--text); font-size: 8px; }
.site-company-workflow li > div { min-width: 0; display: grid; gap: 3px; }
.site-company-workflow li strong { color: var(--text); font-size: 9px; overflow-wrap: anywhere; }
.site-company-workflow li small { color: var(--muted); font-size: 7px; line-height: 1.4; overflow-wrap: anywhere; }
.site-agent-next-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 11px; border-top: 1px solid var(--line); }
.site-agent-next-actions[hidden] { display: none; }
.site-agent-next-actions > span { margin-right: auto; color: var(--text); font-size: 10px; font-weight: 700; }
.site-agent-next-actions button img { width: 17px; height: 17px; border-radius: 3px; }
.site-weight-grid { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 9px; margin-top: 12px; }
.site-weight-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 9px; }
.site-weight-grid input { width: 100%; }
.site-weight-total { align-self: end; display: flex; align-items: center; min-height: 33px; color: var(--jade); font-size: 10px; }
.site-inline-form { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)) auto; align-items: end; gap: 10px; margin-top: 12px; }
.site-inline-form label, .site-call-form label, .site-card-form label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 9px; }
.site-inline-form input, .site-inline-form select, .site-call-form input, .site-call-form select, .site-card-form input, .site-card-form select, .site-card-form textarea { width: 100%; }
.site-inline-note { align-self: center; color: var(--muted); font-size: 9px; line-height: 1.45; }
.site-own-api-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 10px; padding: 11px; border: 1px solid var(--line); background: rgba(14, 31, 42, .35); }
.site-own-api-fields label { display: grid; gap: 6px; color: var(--muted); font-size: 9px; }
.site-api-platform-library { display: grid; gap: 8px; margin: 12px 0; }
.site-api-platform-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); background: rgba(10, 25, 35, .28); }
.site-api-platform-row > div { min-width: 0; display: grid; gap: 3px; flex: 1; }
.site-api-platform-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.site-api-platform-row small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.site-api-platform-row .command { flex: 0 0 auto; }
.site-ecosystem-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.site-item-list { display: grid; gap: 8px; margin-top: 12px; }
.site-item-list.compact { max-height: 250px; overflow: auto; padding-right: 3px; }
.site-ecosystem-item { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); background: rgba(10, 25, 35, .35); }
.site-ecosystem-item-head { display: flex; min-width: 0; align-items: center; gap: 8px; }
.site-ecosystem-item-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.site-ecosystem-item-head small { margin-left: auto; flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.site-ecosystem-meta { display: flex; flex-wrap: wrap; gap: 5px 11px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.site-ecosystem-copy { margin: 0; color: var(--text); font-size: 10px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.site-ecosystem-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.site-ecosystem-actions .command { min-height: 29px; font-size: 9px; }
.site-call-form { display: grid; grid-template-columns: minmax(160px, .65fr) minmax(140px, .5fr) minmax(0, 1.6fr) auto; gap: 10px; align-items: end; margin-top: 12px; }
.site-two-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.site-mini-heading { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.site-transcript { display: grid; gap: 7px; margin-top: 12px; }
.site-transcript:empty { display: none; }
.site-turn { padding: 9px 10px; border-left: 2px solid var(--line); background: rgba(10, 25, 35, .28); font-size: 10px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.site-turn.owner { border-left-color: var(--jade); }
.site-turn.assistant { border-left-color: var(--cyan); }
.site-turn small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; }
.site-card-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.site-card-form .site-wide-field { grid-column: 1 / -1; }
.site-review-reply { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px; }
.site-review-reply textarea { width: 100%; min-height: 34px; resize: vertical; }
.site-review-replies { display: grid; gap: 5px; padding-top: 6px; border-top: 1px solid var(--line); }
.site-review-replies div { color: var(--muted); font-size: 9px; line-height: 1.45; }
.site-empty-state { min-height: 70px; display: grid; place-items: center; color: var(--muted); font-size: 10px; }
.auth-gate { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 20px; overflow: auto; background: rgba(2, 7, 15, .96); }
.auth-gate[hidden] { display: none; }
.auth-card { width: min(430px, 100%); display: grid; gap: 18px; padding: 26px; border: 1px solid var(--line-bright); border-radius: 6px; background: #061120; box-shadow: 0 24px 80px rgba(0,0,0,.45); }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-mark { position: relative; flex: 0 0 38px; }
.auth-brand div { display: grid; gap: 2px; }
.auth-brand strong { font-size: 15px; }
.auth-brand small { color: var(--muted); font-size: 9px; }
.auth-heading { display: grid; gap: 6px; }
.auth-heading h1 { margin: 0; font-size: 22px; letter-spacing: 0; }
.auth-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.auth-card label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; }
.auth-card input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: #040c18; color: var(--text); outline: none; }
.auth-card input:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(36,215,237,.08); }
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-result { min-height: 18px; margin: -4px 0 0; color: #ffc2bd; font-size: 11px; }
.auth-boundary { display: flex; align-items: flex-start; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.6; }
.auth-boundary svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; color: var(--jade); }
#lead-form { padding: 15px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.dialog-heading h3 { font-size: 16px; }
#lead-form > label { margin-top: 13px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.toast { position: fixed; z-index: 1000; right: 20px; bottom: 20px; max-width: min(390px, calc(100vw - 40px)); padding: 11px 14px; border: 1px solid var(--line-bright); border-radius: 4px; background: var(--surface-2); color: var(--text); font-size: 11px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: var(--red); color: #ffc2bd; }

@media (max-width: 1420px) {
  .app-shell { grid-template-columns: 218px minmax(0, 1fr); }
  .intel-rail { display: none; }
}

@media (max-width: 1500px) {
  .channel-state { display: none; }
}

@media (max-width: 1180px) {
  .topbar { grid-template-columns: minmax(170px,.45fr) minmax(240px,1fr) auto; }
  .channel-state { display: none; }
  .search-command-grid { grid-template-columns: 1fr; }
  .search-console { position: relative; top: auto; }
  .search-console .console-heading { grid-column: 1 / -1; }
  .search-command-grid .location-fields { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
  .search-command-grid .industry-fields { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .keyword-field { grid-column: span 2; }
  .search-workspace { height: calc(100vh - 330px); min-height: 520px; }
  .search-workspace { grid-template-columns: 1.35fr .8fr; }
  .recommendation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compliance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compliance-grid > div:nth-child(2) { border-right: 0; }
  .compliance-grid > div { border-bottom: 1px solid var(--line); }
  .package-overview { grid-template-columns: minmax(230px,.8fr) minmax(320px,1.2fr); }
  .package-trust { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .package-kpis { border-right: 0; }
  .package-workspace { grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); }
  .package-history-row { grid-template-columns: 86px minmax(140px,1fr) 95px 34px; }
  .package-history-row > div:nth-of-type(3) { display: none; }
}

@media (max-width: 900px) {
  .app-shell { display: block; padding-bottom: 65px; }
  .intel-rail { display: none; }
  .sidebar { inset: auto 0 0 0; width: auto; height: 64px; padding: 0; border: 0; border-top: 1px solid var(--line); }
  .brand-lockup, .sidebar-status, .attribution { display: none; }
  .primary-nav { height: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; padding: 0; }
  .primary-nav .nav-group-flow { display: contents; }
  .primary-nav .nav-group-tools, .primary-nav .nav-group-label { display: none; }
  .nav-item { min-height: 63px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 0 2px; border-radius: 0; }
  .nav-item > svg:first-child { width: 24px; height: 24px; padding: 3px; border: 0; background: transparent; }
  .nav-item .nav-arrow, .nav-item span small { display: none; }
  .nav-item span { max-width: 100%; overflow-wrap: anywhere; font-size: 9px; line-height: 1.1; text-align: center; }
  .main-stage { width: 100%; }
  .topbar { grid-template-columns: minmax(0,1fr) auto; padding: 10px 15px; }
  .topbar .utility-menu-toggle { display: grid; place-items: center; }
  .utility-menu { top: 58px; right: 12px; }
  .site-switcher { width: 164px; }
  .version { display: none; }
  .topbar-title { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 9px; align-items: center; }
  .mobile-brand-logo { width: 34px; height: 34px; display: block; grid-column: 1; grid-row: 1 / 3; border: 1px solid #386d9d; border-radius: 4px; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,.22); }
  .topbar-title .eyebrow, .topbar-title h1 { min-width: 0; grid-column: 2; }
  .global-search { display: none; }
  .view { padding: 15px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 1px solid var(--line); }
  .dashboard-grid, .dashboard-lower-grid, .data-grid, .analysis-grid, .lead-layout { grid-template-columns: 1fr; height: auto; }
  .lead-table-panel { height: min(58svh, 520px); min-height: 360px; }
  .lead-list { height: calc(100% - 58px); }
  .lead-detail { scroll-margin-top: 76px; }
  .runtime-settings-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .governance-summary, .governance-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .governance-summary > div:nth-child(2), .governance-facts > div:nth-child(2) { border-right: 0; }
  .governance-summary > div:nth-child(-n+2), .governance-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .public-update-layout { grid-template-columns: minmax(220px,.8fr) minmax(0,1.2fr); }
  .public-update-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .public-update-stats > div:nth-child(2) { border-right: 0; }
  .public-update-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .malaysia-cpi-panel .public-update-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .malaysia-gdp-panel .public-update-stats, .malaysia-labour-panel .public-update-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .public-update-command { grid-column: 1 / -1; width: calc(100% - 28px); margin: 0 14px 14px; }
  .dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .globe-command { height: auto; margin-inline: -15px; }
  .globe-toolbar { grid-template-columns: minmax(0,1fr) auto; gap: 7px 12px; padding: 9px 14px; }
  .globe-heading { min-width: 0; }
  .globe-theme-control { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .globe-theme-switch { width: 100%; max-width: none; }
  .globe-theme-switch button { min-width: 82px; flex: 1 0 auto; }
  .globe-theme-manager { right: 0; width: min(390px, calc(100vw - 28px)); }
  .globe-theme-options { max-height: 300px; grid-template-columns: 1fr; overflow-y: auto; }
  .region-breadcrumb { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; overflow-x: auto; padding: 3px 0 1px; scrollbar-width: none; -ms-overflow-style: none; }
  .region-breadcrumb::-webkit-scrollbar { display: none; }
  .region-breadcrumb span { flex: 0 0 auto; max-width: 190px; }
  .globe-toolbar-actions { grid-column: 2; grid-row: 1; }
  .globe-viewport { height: clamp(430px, 63vh, 570px); min-height: 430px; }
  .region-navigator { grid-template-columns: 1fr; }
  .region-navigator-heading { flex-direction: row; align-items: center; justify-content: space-between; padding: 8px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .region-navigator-steps { grid-auto-columns: minmax(170px, .6fr); }
  .region-availability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .region-availability-item:nth-child(2) { border-right: 0; }
  .region-availability-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .globe-footer { align-items: flex-start; flex-wrap: wrap; padding: 10px 14px; }
  .globe-footer-actions { margin-left: auto; }
  .region-intel-grid { grid-template-columns: 1fr; }
  .region-history-module { grid-column: auto; }
  .intel-module { min-height: 205px; border-right: 0; border-bottom: 1px solid var(--line); }
  .intel-module:last-child { border-bottom: 0; }
  .dashboard-lower-grid .quick-actions-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .dashboard-lower-grid .quick-actions-grid button { min-height: 88px; border-bottom: 0; }
  .dashboard-lower-grid .quick-actions-grid button:nth-child(2) { border-right: 1px solid var(--line); }
  .dashboard-lower-grid .quick-actions-grid button:nth-child(-n+2) { border-bottom: 0; }
  .quick-actions-panel { grid-template-columns: 1fr; }
  .quick-actions-heading { border-right: 0; border-bottom: 1px solid var(--line); }
  .search-command-grid .location-fields { grid-template-columns: repeat(2, 1fr); }
  .search-workspace { height: auto; grid-template-columns: 1fr; }
  .search-map-panel { min-height: 430px; border-right: 0; border-bottom: 1px solid var(--line); }
  .results-pane { min-height: 500px; }
  .result-command-group { flex-wrap: nowrap; }
  .analysis-inputs { grid-template-columns: repeat(2, 1fr); }
  .lead-detail { min-height: 420px; }
  .package-overview { grid-template-columns: 1fr; }
  .package-current, .package-kpis { border-right: 0; border-bottom: 1px solid var(--line); }
  .package-trust { grid-column: auto; border-top: 0; }
  .package-workspace { grid-template-columns: 1fr; }
  .package-workspace > div { min-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .package-workspace > div:last-child { border-bottom: 0; }
  .site-company-preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-company-workflow ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .github-update-layout { grid-template-columns: 1fr; align-items: stretch; }
  .github-update-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .collector-staged-record { grid-template-columns: minmax(0,1fr) minmax(150px,.55fr); }
  .collector-staged-identity { grid-column: 1; grid-row: 1; }
  .collector-staged-measure { grid-column: 2; grid-row: 1; }
  .collector-staged-geographies { grid-column: 1 / -1; grid-row: 2; }
  .collector-staged-evidence { grid-row: 3; }
}

@media (max-width: 600px) {
  .topbar { height: 64px; }
  .topbar .channel-state { display: none; }
  .topbar-title .eyebrow { display: none; }
  .topbar-title { grid-template-rows: 1fr; }
  .mobile-brand-logo { grid-row: 1; }
  .topbar h1 { margin: 0; overflow: hidden; font-size: 14px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { gap: 8px; }
  .site-switcher { width: 118px; grid-template-columns: minmax(0,1fr) 28px; padding-left: 4px; }
  .site-switcher > svg { display: none; }
  .account-control { width: 32px; padding: 0 8px; }
  .account-control span { display: none; }
  .auth-card { padding: 20px; }
  .auth-actions { grid-template-columns: 1fr; }
  .site-manager-dialog { width: calc(100vw - 14px); max-height: calc(100vh - 14px); }
  .site-manager-shell { padding: 14px; }
  .site-console-tabs { gap: 2px; }
  .site-console-tabs button { flex: 1 1 0; justify-content: center; padding-inline: 6px; }
  .site-platform-site-row { grid-template-columns: 1fr; align-items: stretch; }
  .site-platform-site-logo { width: 48px; height: 48px; }
  .site-platform-site-row .command { width: 100%; }
  .site-logo-editor { grid-template-columns: 60px minmax(0, 1fr); align-items: start; }
  .site-logo-editor > img { width: 60px; height: 60px; }
  .site-logo-upload-row { grid-template-columns: 1fr; }
  .site-logo-upload-row .command { width: 100%; }
  .site-form-grid, .site-member-add, .site-platform-form, .site-inline-form, .site-call-form, .site-card-form, .site-own-api-fields { grid-template-columns: 1fr; }
  .site-module-editor { grid-template-columns: 1fr; }
  .site-company-preset-grid { grid-template-columns: 1fr; }
  .site-company-module-grid { grid-template-columns: 1fr; }
  .site-company-workflow ol { grid-template-columns: 1fr; }
  .site-agent-next-actions { align-items: stretch; flex-direction: column; }
  .site-agent-next-actions > span { margin-right: 0; }
  .site-agent-next-actions .command { width: 100%; }
  .site-xiaoyexiao-actions { flex-wrap: wrap; }
  .site-form-command .command, .site-member-add .command { width: 100%; }
  .site-two-column { grid-template-columns: 1fr; }
  .site-weight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-member-row { grid-template-columns: minmax(0,1fr) 104px 32px; }
  .site-audit-row { grid-template-columns: minmax(0,1fr) 115px; padding: 7px 0; }
  .site-audit-row strong { grid-column: 1 / -1; grid-row: 2; }
  .site-audit-row time { grid-column: 2; grid-row: 1; }
  .language-switch { width: 90px; }
  .view { min-height: calc(100vh - 64px); padding: 12px; }
  .search-console { gap: 9px; padding: 10px; }
  .contact-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-stat-strip > div:nth-child(2) { border-right: 0; }
  .contact-stat-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .location-fields, .industry-fields { gap: 8px; }
  .search-optional-panel > summary { align-items: flex-start; flex-direction: column; gap: 3px; padding-block: 8px; }
  .search-optional-panel > summary small { text-align: left; }
  .search-optional-panel > .location-fields,
  .search-options-grid { grid-template-columns: 1fr; gap: 8px; padding: 9px; }
  label { gap: 4px; }
  input, select { height: 36px; }
  .toggle-field, .command { min-height: 36px; }
  .dashboard-lead { align-items: stretch; flex-direction: column; }
  h2 { font-size: 20px; }
  .search-command-grid .location-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-command-grid .industry-fields { grid-template-columns: minmax(0, 1fr); }
  .toolbar-band, .analysis-inputs { grid-template-columns: 1fr; }
  .analysis-controls { align-items: stretch; flex-direction: column; }
  .analysis-controls > .command { width: 100%; }
  .analysis-product-market-panel .panel-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .analysis-product-market-panel .panel-heading > span { max-width: 100%; overflow-wrap: anywhere; }
  .runtime-settings-layout { grid-template-columns: 1fr; }
  .runtime-settings-action { align-items: stretch; }
  .runtime-settings-action .command { flex: 1 1 150px; }
  .runtime-settings-action span { flex: 1 1 100%; }
  .ai-model-control { grid-template-columns: 1fr; }
  .keyword-field, .search-command-grid .command.primary { grid-column: 1 / -1; }
  .lead-table-panel { height: min(54svh, 440px); min-height: 320px; }
  .console-heading { min-height: 38px; }
  .globe-command { height: auto; margin-inline: -12px; }
  .globe-toolbar { min-height: 72px; padding: 9px 11px; }
  .globe-theme-switch { height: 34px; }
  .globe-theme-switch button { padding-inline: 5px; font-size: 8px; }
  .globe-heading strong { font-size: 13px; }
  .globe-heading span { font-size: 7px; }
  .region-level { min-width: 58px; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .region-breadcrumb span { max-width: 145px; }
  .region-breadcrumb span + span::before { margin: 0 6px; }
  .globe-viewport { height: clamp(270px, calc(100svh - 574px), 430px); min-height: 270px; }
  .globe-tilt-control { left: 8px; width: 42px; height: 166px; grid-template-rows: 26px minmax(0,1fr) 26px; }
  .globe-tilt-control input { width: 108px; height: 21px; }
  .globe-tilt-control > svg { width: 16px; height: 16px; }
  .globe-tilt-control input::-webkit-slider-thumb { width: 17px; height: 17px; margin-top: -7px; }
  .globe-tilt-control input::-moz-range-thumb { width: 14px; height: 14px; }
  .globe-pick-status { right: 11px; bottom: 108px; left: 11px; max-width: none; }
  .globe-coverage-legend { top: auto; right: 9px; bottom: 9px; width: 178px; padding: 7px 8px; }
  .globe-coverage-legend > div { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 7px; margin-top: 5px; }
  .globe-coverage-legend small { margin-top: 5px; }
  .region-navigator-heading { padding: 7px 11px; }
  .region-navigator-heading > div > svg { width: 25px; height: 25px; }
  .region-navigator-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: unset;
    gap: 7px;
    padding: 8px 11px 10px;
    overflow-x: visible;
  }
  .region-navigator-field select { height: 35px; }
  .region-availability-heading { min-height: 44px; padding: 8px 11px; }
  .region-availability-heading h4 { font-size: 11px; }
  .region-availability-item { min-height: 84px; grid-template-columns: 24px minmax(0, 1fr); gap: 7px; padding: 9px 11px; }
  .region-availability-item > svg { width: 24px; height: 24px; padding: 5px; }
  .region-availability-item strong { font-size: 9px; }
  .region-availability-item small { font-size: 7px; }
  .region-availability-note { padding: 8px 11px; font-size: 8px; }
  .globe-footer { align-items: stretch; flex-direction: column; gap: 9px; padding: 10px 11px; }
  .region-focus strong { max-width: calc(100vw - 82px); }
  .globe-footer-actions { width: 100%; display: grid; grid-template-columns: minmax(112px,.72fr) minmax(0,1.28fr); margin-left: 0; }
  .globe-footer-actions .command { min-width: 0; padding-inline: 8px; font-size: 10px; }
  .globe-action { width: 100%; min-width: 0; padding-inline: 9px; }
  .region-intel-heading { align-items: flex-start; }
  .region-intel-heading h3 { overflow-wrap: anywhere; }
  .data-quality { flex: 0 0 auto; }
  .intel-module { min-height: 195px; }
  .module-heading { min-height: 52px; }
  .region-bars, .benchmark-list { min-height: 138px; padding-inline: 11px; }
  .region-bar { grid-template-columns: minmax(70px,.9fr) minmax(62px,1fr) 48px; gap: 6px; }
  .region-history-controls { grid-template-columns: 1fr; }
  .history-series-meta { align-items: flex-start; flex-direction: column; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 94px; grid-template-columns: 34px minmax(0,1fr); gap: 9px; padding: 11px; }
  .metric-icon { width: 34px; height: 34px; }
  .metric-icon svg { width: 18px; height: 18px; }
  .metric strong { font-size: 23px; }
  .dashboard-lower-grid .quick-actions-grid, .quick-actions-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-lower-grid .quick-actions-grid button:nth-child(2), .quick-actions-grid button:nth-child(2) { border-right: 0; }
  .dashboard-lower-grid .quick-actions-grid button:nth-child(-n+2), .quick-actions-grid button:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .recommendation-grid, .compliance-grid { grid-template-columns: 1fr; }
  .update-source-badge { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .public-update-panel .update-source-badge { padding: 4px 6px; font-size: 7px; line-height: 1.2; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
  .source-catalog-grid { grid-template-columns: 1fr; }
  .source-category, .source-category[open] { grid-column: auto; border-top: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .source-category:last-child { border-bottom: 0; }
  .source-category summary { min-height: 92px; }
  .source-entry-grid { grid-template-columns: 1fr; }
  .source-entry-grid .source-entry { border-right: 0; }
  .collector-plan-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .collector-plan-group-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .collector-plan-group-list { grid-template-columns: 1fr; }
  .collector-plan-row { grid-template-columns: 20px minmax(0, 1fr) minmax(94px, 112px); padding-inline: 11px; }
  .collector-plan-row:nth-child(2n) { border-left: 0; }
  .collector-plan-row select { width: 100%; }
  .collector-plan-actions { padding-inline: 11px; }
  .collector-summary { grid-template-columns: 1fr 1fr; }
  .collector-summary > div:nth-child(2) { border-right: 0; }
  .collector-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .collector-form { grid-template-columns: 1fr; }
  .free-collector-list { grid-template-columns: 1fr; }
  .world-bank-history-settings { grid-template-columns: 1fr; }
  .world-bank-history-settings > small { grid-column: auto; }
  .free-collector-row { border-right: 0; }
  .free-batch-toolbar { align-items: flex-start; flex-direction: column; }
  .world-bank-history-settings { grid-template-columns: 1fr 1fr; }
  .world-bank-history-settings > small { grid-column: 1 / -1; }
  .free-batch-actions { width: 100%; justify-content: flex-start; }
  .free-batch-items { grid-template-columns: 1fr; }
  #free-batch-history-list { grid-template-columns: 1fr; }
  #free-batch-history-list > div:not(.free-batch-empty) { border-right: 0; border-bottom: 1px solid var(--line); }
  #free-batch-history-list > div:last-child { border-bottom: 0; }
  .collector-instructions { grid-column: auto; }
  .collector-form .command { grid-column: auto; }
  .collector-recent { grid-template-columns: 1fr; }
  .collector-recent > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .collector-recent > div:last-child { border-bottom: 0; }
  .collector-staged-heading { align-items: flex-start; flex-direction: column; }
  .collector-review-tools { width: 100%; justify-content: space-between; }
  .collector-review-note-row { align-items: stretch; flex-direction: column; }
  .collector-review-note-row label { min-width: 0; flex-direction: column; align-items: stretch; gap: 5px; }
  .collector-readonly-note { max-width: none; text-align: left; }
  .collector-staged-record { grid-template-columns: 1fr; gap: 10px; padding-inline: 11px; }
  .collector-staged-identity, .collector-staged-measure, .collector-staged-geographies, .collector-staged-evidence { grid-column: 1; grid-row: auto; }
  .collector-staged-geographies { grid-template-columns: 1fr; }
  .collector-staged-measure { text-align: left; }
  .collector-staged-evidence { grid-template-columns: 1fr; }
  .collector-staged-evidence > span { grid-row: auto; }
  .governance-summary, .governance-facts { grid-template-columns: 1fr; }
  .governance-summary > div, .governance-summary > div:nth-child(2), .governance-facts > div, .governance-facts > div:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .governance-summary > div:last-child, .governance-facts > div:last-child { border-bottom: 0; }
  .governance-dataset-heading { flex-direction: column; }
  .governance-badges { justify-content: flex-start; }
  .evidence-row { grid-template-columns: minmax(0, 1fr) auto; align-items: start; padding: 9px 0; }
  .evidence-tags { grid-column: 1; grid-row: 2; flex-direction: row; flex-wrap: wrap; }
  .evidence-value { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; gap: 8px; padding-block: 9px; }
  .public-update-layout { grid-template-columns: 1fr; }
  .public-update-state { border-right: 0; border-bottom: 1px solid var(--line); }
  .public-update-stats > div:nth-child(2) { border-right: 0; }
  .public-update-command { grid-column: auto; }
  .compliance-grid > div { border-right: 0; }
  .compact-row { grid-template-columns: minmax(140px, 1fr) 100px; }
  .compact-row span:nth-of-type(2), .compact-row span:nth-of-type(3) { display: none; }
  .lead-row { grid-template-columns: minmax(150px, 1fr) 90px 16px; }
  .lead-row > span:nth-child(2) { display: none; }
  .package-center-heading { align-items: flex-start; flex-direction: column; }
  .package-kpis > div { padding: 11px; }
  .package-history-row { grid-template-columns: 78px minmax(100px,1fr) 34px; gap: 8px; }
  .package-history-row > div:nth-of-type(2), .package-history-row > div:nth-of-type(3) { display: none; }
  .package-actions { grid-template-columns: 1fr; }
  .package-preview-grid { grid-template-columns: 1fr 1fr; }
  .github-update-actions { grid-template-columns: 1fr; }
}

/* Evidence-bound article video */
.article-video-panel {
  min-width: 0;
  margin-top: 14px;
  padding: 16px;
  border-top: 3px solid var(--jade);
}
.article-video-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.article-video-heading > div { min-width: 0; }
.article-video-heading h3 { margin: 4px 0 5px; font-size: 19px; }
.article-video-heading p { max-width: 780px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.article-video-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, .8fr);
  align-items: end;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.article-video-controls label { min-width: 0; }
.article-video-narration .switch-control {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.article-video-narration .switch-control input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; accent-color: var(--jade); }
.article-video-narration .switch-control input:disabled { opacity: 1; }
.article-video-narration .switch-control span { min-width: 0; font-size: 9px; line-height: 1.35; }
.article-video-actions { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.article-video-actions .command { width: 100%; }
.article-video-media {
  min-width: 0;
  margin-top: 12px;
  padding: 12px 0 2px;
  border-top: 1px solid var(--line);
}
.article-video-media[hidden] { display: none; }
.article-video-media-heading,
.article-video-media-heading > div,
.article-video-media-search-row {
  min-width: 0;
  display: flex;
  align-items: center;
}
.article-video-media-heading { justify-content: space-between; gap: 12px; }
.article-video-media-heading > div { gap: 10px; }
.article-video-media-heading strong { font-size: 11px; }
.article-video-media-heading span { color: var(--muted); font-size: 8px; }
.article-video-media-heading > div span { color: var(--jade); }
.article-video-media-search-row { align-items: end; gap: 9px; margin-top: 10px; }
.article-video-media-search-row label { min-width: 0; flex: 1 1 auto; }
.article-video-media-search-row .command { flex: 0 0 auto; min-width: 150px; }
.article-video-media-status { min-height: 18px; margin: 7px 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.article-video-media-status.busy { color: var(--cyan); }
.article-video-media-status.error { color: var(--red); }
.article-video-media-results {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.article-video-media-empty { grid-column: 1 / -1; padding: 18px 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 9px; text-align: center; }
.article-video-media-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}
.article-video-media-item:has(input:checked) { border-color: color-mix(in srgb, var(--jade) 70%, var(--line)); }
.article-video-media-thumb { width: 96px; aspect-ratio: 16 / 9; overflow: hidden; background: #0b1114; }
.article-video-media-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.article-video-media-item > div { min-width: 0; }
.article-video-media-item label { display: flex; align-items: flex-start; gap: 7px; cursor: pointer; }
.article-video-media-item input { width: 15px; height: 15px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--jade); }
.article-video-media-item strong { min-width: 0; overflow-wrap: anywhere; font-size: 9px; line-height: 1.4; }
.article-video-media-item p { margin: 6px 0; overflow-wrap: anywhere; color: var(--muted); font-size: 8px; line-height: 1.45; }
.article-video-media-item footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.article-video-media-item footer span { min-width: 0; color: var(--jade); font-size: 8px; }
.article-video-media-item footer a { flex: 0 0 auto; color: var(--cyan); font-size: 8px; text-decoration: none; }
.article-video-status {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}
.article-video-status.busy { color: var(--cyan); }
.article-video-status.success { color: var(--jade); }
.article-video-status.error { color: var(--red); }
.article-video-storyboard {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.article-video-empty {
  grid-column: 1 / -1;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}
.article-video-empty svg { width: 28px; height: 28px; color: var(--jade); }
.article-video-empty strong { color: var(--text); font-size: 11px; }
.article-video-empty span { max-width: 420px; font-size: 9px; }
.article-video-scene {
  min-width: 0;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-2) 82%, #0b1114);
}
.article-video-scene[data-kind="opening"] { border-top: 3px solid var(--jade); }
.article-video-scene[data-kind="review_boundary"] { border-top: 3px solid var(--gold); }
.article-video-scene header { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 8px; }
.article-video-scene header strong { color: var(--cyan); font-size: 9px; }
.article-video-scene h4 { margin: 18px 0 9px; overflow-wrap: anywhere; font-size: 13px; line-height: 1.4; }
.article-video-scene p { margin: 0; overflow-wrap: anywhere; color: var(--text); font-size: 10px; line-height: 1.75; }
.article-video-concepts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.article-video-concepts span {
  padding: 3px 6px;
  border: 1px solid color-mix(in srgb, var(--jade) 35%, var(--line));
  border-radius: 3px;
  color: var(--jade);
  background: color-mix(in srgb, var(--jade) 6%, var(--surface));
  font-size: 8px;
  line-height: 1.2;
}
.article-video-scene footer { margin-top: auto; padding-top: 16px; overflow-wrap: anywhere; color: var(--jade); font-size: 8px; }
.article-video-result {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--jade) 45%, var(--line));
  background: color-mix(in srgb, var(--jade) 5%, var(--surface-2));
}
.article-video-result[hidden] { display: none; }
.article-video-result video { width: 100%; max-height: 440px; background: #0b1114; }
.article-video-result > div { min-width: 0; }
.article-video-result strong,
.article-video-result span { display: block; }
.article-video-result strong { font-size: 13px; }
.article-video-result span { margin-top: 5px; color: var(--muted); font-size: 9px; }
.article-video-result p { margin: 10px 0; color: var(--text); font-size: 9px; line-height: 1.6; }
.article-video-result nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.article-video-result nav a { text-decoration: none; }
.article-video-boundary {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}
.article-video-boundary svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--gold); }

@media (max-width: 1180px) {
  .article-video-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-video-actions { grid-column: 1 / -1; }
  .article-video-media-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-video-storyboard { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .article-video-panel { padding: 12px; }
  .article-video-heading { flex-direction: column; gap: 8px; }
  .article-video-controls { grid-template-columns: 1fr; padding: 10px; }
  .article-video-actions { grid-column: 1; grid-template-columns: 1fr; }
  .article-video-media-heading,
  .article-video-media-search-row { align-items: stretch; flex-direction: column; }
  .article-video-media-heading > div { justify-content: space-between; }
  .article-video-media-search-row .command { width: 100%; min-width: 0; }
  .article-video-media-results { grid-template-columns: 1fr; }
  .article-video-media-item { grid-template-columns: 110px minmax(0, 1fr); }
  .article-video-media-thumb { width: 110px; }
  .article-video-storyboard { grid-template-columns: 1fr; }
  .article-video-scene { min-height: 190px; }
  .article-video-result { grid-template-columns: 1fr; padding: 10px; }
  .article-video-result video { max-height: 520px; }
  .article-video-result nav { align-items: stretch; flex-direction: column; }
  .article-video-result nav .command { width: 100%; }
}

/* Evidence-bound WeChat article workspace */
.article-workspace-header {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}
.article-workspace-header > div { min-width: 0; }
.article-workspace-header h2 { margin: 4px 0 0; font-size: 24px; }
.article-workspace-header p { max-width: 780px; margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.article-review-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid color-mix(in srgb, var(--gold) 48%, var(--line));
  border-radius: 4px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
}
.article-review-badge svg { width: 15px; height: 15px; }
.article-boundary {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--jade) 40%, var(--line));
  border-left: 3px solid var(--jade);
  background: color-mix(in srgb, var(--jade) 5%, var(--surface));
}
.article-boundary > svg { width: 23px; height: 23px; color: var(--jade); }
.article-boundary strong,
.article-boundary span { display: block; min-width: 0; overflow-wrap: anywhere; }
.article-boundary strong { font-size: 10px; }
.article-boundary span { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.article-workspace-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(280px, .7fr) minmax(520px, 1.3fr);
  gap: 12px;
  align-items: start;
}
.hot-news-panel { min-width: 0; margin-bottom: 12px; }
.hot-news-heading { align-items: center; }
.hot-news-actions { display: flex; align-items: center; gap: 8px; }
.hot-news-actions select { width: 92px; min-width: 92px; }
.hot-news-boundary { margin: 0; padding: 0 13px 10px; color: var(--muted); font-size: 8px; line-height: 1.55; }
.hot-news-list { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 13px 13px; }
.hot-news-list > p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 9px; }
.hot-news-item { min-width: 0; display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); border-left: 3px solid var(--cyan); border-radius: 4px; background: var(--surface-2); }
.hot-news-item.ineligible { border-left-color: var(--line-bright); }
.hot-news-item header { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 8px; }
.hot-news-item h4 { margin: 0; overflow-wrap: anywhere; font-size: 11px; line-height: 1.45; }
.hot-news-related { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.hot-news-related em { padding: 2px 5px; border: 1px solid var(--line-bright); border-radius: 3px; color: var(--text); font-style: normal; }
.hot-news-item p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.hot-news-original-title { opacity: .72; overflow-wrap: anywhere; }
.hot-news-translation-note { color: var(--amber) !important; }
.hot-news-regional-attention { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.hot-news-regional-attention p { padding: 5px 7px; border: 1px solid var(--line); background: var(--surface); overflow-wrap: anywhere; }
.hot-news-regional-attention p[data-status="observed"] { border-color: color-mix(in srgb, var(--amber) 55%, var(--line)); color: var(--amber); }
.hot-news-item button { width: 100%; min-height: 32px; }
.runtime-switch-field .switch-control { min-height: 36px; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); background: var(--surface-2); }
.runtime-switch-field .switch-control input { width: 16px; height: 16px; }
.runtime-switch-field .switch-control span { font-size: 9px; line-height: 1.35; }
.runtime-fallback-field { grid-column: span 2; }
.runtime-fallback-field textarea { min-height: 82px; resize: vertical; }
.article-brief-panel,
.article-editor-panel { min-width: 0; }
.article-brief-panel { padding-bottom: 13px; }
.article-brief-panel > .panel-heading { margin-bottom: 12px; }
.article-brief-panel > .panel-heading > svg { width: 18px; height: 18px; color: var(--cyan); }
.article-location-grid,
.article-option-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding-inline: 13px;
}
.article-location-grid .wide { grid-column: 1 / -1; }
.article-type-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 11px 13px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 4px;
  background: var(--surface-2);
}
.article-type-grid label[hidden] { display: none; }
.article-type-grid small { min-height: 26px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.article-type-rule {
  min-width: 0;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 6px;
  margin: 8px 13px 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}
.article-type-rule svg { width: 13px; height: 13px; color: var(--cyan); }
.article-options-status {
  min-height: 16px;
  margin: 5px 13px 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}
.article-options-status.busy { color: var(--cyan); }
.article-options-status.error { color: var(--red); }
.article-topic-field { margin: 11px 13px; }
.article-option-grid { grid-template-columns: 1fr; }
.article-generate-button { width: calc(100% - 26px); min-height: 38px; margin: 13px 13px 0; }
.article-generation-status {
  min-height: 18px;
  margin: 8px 13px 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}
.article-generation-status.busy { color: var(--cyan); }
.article-generation-status.success { color: var(--jade); }
.article-generation-status.error { color: var(--red); }
.article-evidence-readiness { margin: 11px 13px 0; border-top: 1px solid var(--line); }
.article-evidence-readiness header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
}
.article-evidence-readiness header strong { font-size: 10px; }
.article-evidence-readiness header span { color: var(--muted); font-size: 8px; text-align: right; }
#article-data-gaps { min-width: 0; padding-top: 7px; }
#article-data-gaps p {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  gap: 6px;
  margin: 0;
  padding: 5px 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}
#article-data-gaps svg { width: 14px; height: 14px; color: var(--gold); }
.article-editor-panel { min-height: 720px; }
.article-editor-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 66px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}
.article-editor-toolbar > div:first-child { min-width: 0; }
.article-editor-toolbar h3 { margin-top: 3px; font-size: 14px; }
.article-editor-toolbar small { display: block; margin-top: 4px; overflow-wrap: anywhere; color: var(--muted); font-size: 8px; }
.article-editor-actions { flex: 0 0 auto; display: flex; gap: 7px; }
.article-editor-empty {
  min-height: 650px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
.article-editor-empty svg { width: 34px; height: 34px; color: var(--cyan); }
.article-editor-empty strong { color: var(--text); font-size: 12px; }
.article-editor-empty span { max-width: 360px; font-size: 9px; line-height: 1.5; }
.article-editor-fields { min-width: 0; padding: 13px; }
.article-editor-fields > label + label { margin-top: 10px; }
.article-editor-fields #article-title { height: 42px; font-size: 16px; font-weight: 700; }
.article-editor-fields #article-dek { min-height: 62px; }
.article-body-field textarea { min-height: 390px; font-size: 11px; line-height: 1.8; }
.article-editor-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px;
}
.article-source-appendix { margin-top: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.article-source-appendix summary { padding: 9px 0; color: var(--text); font-size: 9px; font-weight: 700; cursor: pointer; }
.article-source-appendix pre {
  max-height: 260px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  background: var(--surface-2);
  color: var(--muted);
  font-family: inherit;
  font-size: 8px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.article-editor-note { margin: 10px 0 0; overflow-wrap: anywhere; color: var(--gold); font-size: 8px; line-height: 1.55; }

@media (max-width: 1180px) {
  .article-workspace-layout { grid-template-columns: minmax(260px, .62fr) minmax(430px, 1.38fr); }
}

@media (max-width: 900px) {
  .article-workspace-layout { grid-template-columns: 1fr; }
  .article-editor-panel { min-height: 620px; }
  .article-editor-empty { min-height: 520px; }
  .hot-news-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .article-workspace-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .article-workspace-header h2 { font-size: 20px; }
  .article-review-badge { align-self: flex-start; }
  .article-boundary { grid-template-columns: 24px minmax(0, 1fr); padding: 9px 10px; }
  .article-boundary > svg { width: 20px; height: 20px; }
  .article-location-grid { grid-template-columns: 1fr; padding-inline: 10px; }
  .article-location-grid .wide { grid-column: 1; }
  .article-type-grid { grid-template-columns: 1fr; margin-inline: 10px; }
  .article-type-rule,
  .article-options-status { margin-inline: 10px; }
  .article-topic-field { margin-inline: 10px; }
  .article-option-grid { padding-inline: 10px; }
  .article-generate-button { width: calc(100% - 20px); margin-inline: 10px; }
  .article-generation-status,
  .article-evidence-readiness { margin-inline: 10px; }
  .article-editor-toolbar { align-items: flex-start; flex-direction: column; }
  .article-editor-actions { width: 100%; justify-content: flex-end; }
  .article-editor-fields { padding: 10px; }
  .article-editor-fields #article-title { height: auto; min-height: 42px; font-size: 14px; }
  .article-body-field textarea { min-height: 360px; }
  .article-editor-foot { align-items: flex-start; flex-direction: column; }
  .hot-news-heading { align-items: flex-start; flex-direction: column; }
  .hot-news-actions { width: 100%; }
  .hot-news-actions select { flex: 1; width: auto; }
  .hot-news-list { grid-template-columns: 1fr; padding-inline: 10px; }
  .runtime-fallback-field { grid-column: auto; }
}

/* Local workstation theme: restrained iOS 6 / iPhone 4S cues around the dark map. */
:root {
  --bg: #eef0f2;
  --sidebar: #202226;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef1f4;
  --line: #d5d9de;
  --line-bright: #aeb6bf;
  --text: #1f2328;
  --muted: #68717b;
  --cyan: #3478f6;
  --jade: #18864b;
  --gold: #b56b00;
  --red: #c43b40;
  --blue: #3478f6;
  --violet: #7656b3;
  --radius: 6px;
  color-scheme: light;
}
html, body { background: var(--bg); color: var(--text); }
body { background-image: linear-gradient(rgba(80,90,100,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(80,90,100,.025) 1px, transparent 1px); background-size: 48px 48px; }
* { scrollbar-color: #aeb6bf #eef0f2; }
::-webkit-scrollbar-track { background: #eef0f2; }
::-webkit-scrollbar-thumb { background: #aeb6bf; border-color: #eef0f2; }
.sidebar { background: linear-gradient(#27292d, #1d1f23); border-right-color: #111216; box-shadow: 8px 0 24px rgba(26,29,34,.16); }
.brand-lockup { border-bottom-color: #44484f; }
.brand-lockup strong { color: #f6f7f8; }
.brand-lockup small { color: #9ec1ff; }
.brand-lockup em { color: #858c95; }
.brand-mark { border-color: #6c747d; background: #30343a; color: #a9c7ff; box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 2px 8px rgba(0,0,0,.2); }
.brand-mark::before, .brand-mark::after { border-color: #d8dde2; }
.brand-mark span { background: #ff9d4d; }
.nav-item { color: #b5bbc2; }
.nav-item > svg:first-child { border-color: #4b5159; background: #2f3338; }
.nav-item .nav-arrow { color: #737b85; }
.nav-item:hover { color: #fff; background: #34383e; border-color: #555b63; }
.nav-item.active { color: #fff; background: #3b4047; border-color: #626a73; box-shadow: inset 3px 0 0 #7eafff, 0 2px 8px rgba(0,0,0,.17); }
.nav-item.active > svg:first-child { color: #a9c7ff; border-color: #79828d; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.nav-item.active .nav-arrow { color: #a9c7ff; }
.nav-item span small { color: #89919a; }
.sidebar-status { border-color: #44484f; }
.sidebar-status strong { color: #eef1f4; }
.sidebar-status small, .attribution { color: #a0a7af; }
.topbar { background: rgba(249,250,251,.94); border-bottom-color: #d1d5da; box-shadow: 0 1px 7px rgba(45,50,56,.08); }
.topbar h1 { color: #21252a; }
.eyebrow, .section-code { color: #456da7; }
.global-search { border-color: #cbd1d7; background: #fff; box-shadow: inset 0 1px 2px rgba(0,0,0,.04); }
.global-search > svg { color: #7a858f; }
.global-search button { border-color: #c5ccd4; background: #f4f6f8; color: #3478f6; }
.global-search button:hover { border-color: #3478f6; }
.channel-state { color: #287947; }
.account-control { border-color: #cbd1d7; background: #fff; color: #59636d; }
.account-control:hover { border-color: #3478f6; color: #1f2328; }
.language-switch { border-color: #cbd1d7; background: #eef1f4; }
.language-switch button { color: #66707a; }
.language-switch button.active { background: #3478f6; color: #fff; }
.version { border-color: #d0a564; color: #996017; background: #fffaf2; }
.view { background: transparent; }
.panel, .quick-actions-panel { background: rgba(255,255,255,.96); border-color: #d5d9de; box-shadow: 0 2px 8px rgba(46,52,58,.06), inset 0 1px 0 rgba(255,255,255,.8); }
.panel::before { background: #7eafff; box-shadow: none; }
.panel-heading { border-bottom-color: #e1e4e7; }
.panel-heading h3, .module-heading h4, .quick-actions-heading h3 { color: #20242a; }
.panel-heading > strong { color: #996017; }
.command.primary { background: #3478f6; border-color: #2866d4; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 1px 3px rgba(42,85,160,.2); }
.command.primary:hover { background: #286adf; }
.command.secondary { background: #f7f8fa; border-color: #c7cdd3; color: #2c333a; }
.command.secondary:hover { border-color: #3478f6; color: #2459b4; background: #eef4ff; }
.icon-command { border-color: #c7cdd3; background: #fff; color: #68717b; }
.icon-command:hover { color: #3478f6; border-color: #3478f6; }
input, select, textarea { border-color: #cbd1d7 !important; background: #fff !important; color: #252a30 !important; }
input::placeholder, textarea::placeholder { color: #9aa2aa; }
input:focus, select:focus, textarea:focus { border-color: #3478f6 !important; box-shadow: 0 0 0 3px rgba(52,120,246,.14) !important; }
.metric { background: #fff; border-color: #d5d9de; box-shadow: 0 2px 6px rgba(46,52,58,.06); }
.metric::before { background: #3478f6; box-shadow: none; }
.metric.jade::before { background: #3aa66c; }
.metric.gold::before { background: #d08a22; }
.metric.red::before { background: #8063b9; }
.metric-icon { border-color: #c7d3e5; background: #f2f6fc; color: #3478f6; box-shadow: inset 0 1px 0 #fff; }
.metric.jade .metric-icon { color: #18864b; border-color: #b8ddc8; background: #f1faf4; }
.metric.gold .metric-icon { color: #b56b00; border-color: #e1c99d; background: #fff9ef; }
.metric.red .metric-icon { color: #7656b3; border-color: #d6c9e8; background: #f8f5fc; }
.metric span, .metric small, p { color: #68717b; }
.metric strong { color: #2e69d8; }
.metric.jade strong { color: #18864b; }
.metric.gold strong { color: #b56b00; }
.metric.red strong { color: #7656b3; }
.quick-actions-panel { background: #fff; }
.quick-actions-heading { border-right-color: #e0e3e6; }
.quick-actions-grid button { border-right-color: #e0e3e6; color: #252a30; }
.quick-actions-grid button:hover { background: #f4f7fb; }
.quick-actions-grid button > svg { border-color: #c8d5e8; color: #3478f6; background: #f2f6fc; box-shadow: inset 0 1px 0 #fff; }
.quick-actions-grid small { color: #7a848e; }
.globe-command { border-color: #172d40; }
.region-intelligence { background: transparent; }
.region-intel-heading { border-bottom-color: #d5d9de; }
.region-intel-heading h3 { color: #20242a; }
.data-quality { border-color: #cbd1d7; background: #fff; }
.intel-module { background: #fff; border-color: #d5d9de; box-shadow: 0 2px 7px rgba(46,52,58,.05); }
.module-heading { border-bottom-color: #e1e4e7; }
.module-heading > svg { color: #3478f6; }
.site-company-module, .site-company-preset, .site-company-workflow li, .site-agent-harness-status { background: #fff; border-color: #d5d9de; }
.site-company-preset > strong, .site-company-module strong, .site-company-workflow li strong { color: #252a30; }
.site-company-preset > small, .site-company-module small, .site-company-workflow li small { color: #68717b; }
.site-company-module em { color: #2e69d8; }
.site-company-module b { color: #18864b; }
.region-bars, .benchmark-list { background: #fff; }
.region-bar-track { background: #e9edf1; }
.region-bar-track i { background: #4f88f8; }
.benchmark-row { border-bottom-color: #e3e6e9; }
.benchmark-row small, .key-metric-row small { color: #7a848e; }
.key-metric-row { border-bottom-color: #e3e6e9; }
.weather-context { background: #f7f8fa; }
.region-evidence-strip { border-top-color: #d5d9de; }
.region-evidence-strip a, .region-evidence-strip span { color: #4c6f9f; }
.data-workspace-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 14px; padding: 6px 2px 0; }
.data-workspace-header h2 { margin: 4px 0; color: #20242a; font-size: 24px; }
.data-workspace-header p { margin: 0; font-size: 12px; }
.data-workspace-tabs { display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid #ccd2d8; border-radius: 7px; background: #e7eaed; box-shadow: inset 0 1px 1px rgba(0,0,0,.04); }
.data-workspace-tabs button { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border: 0; border-radius: 5px; background: transparent; color: #69737c; font-size: 11px; font-weight: 700; cursor: pointer; }
.data-workspace-tabs button:hover { color: #27313a; }
.data-workspace-tabs button.active { background: #fff; color: #2e69d8; box-shadow: 0 1px 3px rgba(30,36,43,.14); }
.data-workspace-tabs svg { width: 15px; height: 15px; }
#view-data[data-active-section="updates"] > [data-data-section]:not([data-data-section~="updates"]), #view-data[data-active-section="collect"] > [data-data-section]:not([data-data-section~="collect"]), #view-data[data-active-section="catalog"] > [data-data-section]:not([data-data-section~="catalog"]), #view-data[data-active-section="settings"] > [data-data-section]:not([data-data-section~="settings"]) { display: none; }
.github-publisher-console { margin: 12px 14px 14px; padding: 13px; border: 1px solid #cfdae8; border-radius: 6px; background: #f7faff; }
.github-publisher-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.github-publisher-heading h4 { margin: 4px 0 0; color: #242a31; font-size: 13px; }
.github-publisher-heading > span { color: #2e69d8; font: 700 9px ui-monospace, monospace; }
#github-publisher-repository { margin: 8px 0; color: #677687; font-size: 11px; }
.github-publisher-actions { display: flex; align-items: end; gap: 9px; }
.github-publisher-actions label { width: 210px; }
.github-publisher-console > small { display: block; margin-top: 8px; color: #77818b; font-size: 10px; }
.data-dimension-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.region-dimension-workbench { margin: 14px 0; padding: 14px; border: 1px solid #d5d9de; border-radius: 6px; background: rgba(255,255,255,.94); box-shadow: 0 2px 7px rgba(46,52,58,.05); }
.dimension-workbench-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.dimension-workbench-heading h4 { margin: 3px 0 0; color: #20242a; font-size: 14px; }
.dimension-method-note { display: inline-flex; align-items: center; gap: 5px; color: #68717b; font-size: 10px; }
.dimension-method-note svg { width: 14px; height: 14px; color: #18864b; }
.data-dimension { position: relative; min-width: 0; min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 10px; border: 1px solid #d7dce1; border-radius: 5px; background: #fbfcfd; color: #273038; text-align: left; cursor: pointer; overflow: hidden; }
.data-dimension:hover { border-color: #9ab5df; background: #f4f8ff; }
.data-dimension.active { border-color: #6e9be3; background: #f2f6fd; box-shadow: inset 3px 0 0 #3478f6; }
.data-dimension > span { min-width: 0; }
.data-dimension strong, .data-dimension small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-dimension strong { font-size: 11px; }
.data-dimension small { margin-top: 5px; color: #78828c; font-size: 9px; }
.data-dimension em { align-self: start; color: #2e69d8; font: 700 13px ui-monospace, monospace; font-style: normal; }
.data-dimension.none em { color: #8b939c; }
.data-dimension.partial em, .data-dimension.limited em { color: #b56b00; }
.data-dimension.strong em { color: #18864b; }
.dimension-progress { grid-column: 1 / -1; height: 4px; margin-top: 4px; overflow: hidden; border-radius: 2px; background: #e3e7eb; }
.dimension-progress b { display: block; height: 100%; background: #5a8fe6; }
.data-dimension.none .dimension-progress b { background: #b6bdc5; }
.data-dimension-detail { margin-top: 11px; padding: 12px; border: 1px solid #d9dde2; border-radius: 5px; background: #fafbfc; }
.dimension-empty { min-height: 68px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #7c858e; font-size: 11px; }
.dimension-empty svg { color: #7896be; }
.dimension-skeleton { height: 72px; border: 1px solid #dfe3e7; border-radius: 5px; background: linear-gradient(90deg, #f2f4f6, #fff, #f2f4f6); background-size: 200% 100%; animation: dimension-loading 1.4s linear infinite; }
@keyframes dimension-loading { to { background-position: -200% 0; } }
.dimension-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid #e3e6e9; }
.dimension-detail-heading span, .dimension-detail-heading strong { display: block; }
.dimension-detail-heading span { color: #456da7; font-size: 10px; font-weight: 700; }
.dimension-detail-heading strong { margin-top: 4px; color: #2d343b; font-size: 11px; font-weight: 500; }
.dimension-detail-heading > b { color: #2e69d8; font: 700 21px ui-monospace, monospace; }
.dimension-detail-heading > b small { margin-left: 2px; font-size: 11px; }
.dimension-signal-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px 0; }
.dimension-signal-groups > div > span { display: block; margin-bottom: 5px; color: #7a838c; font-size: 9px; }
.dimension-signal-groups > div > div { display: flex; flex-wrap: wrap; gap: 4px; }
.dimension-signal { display: inline-flex; padding: 3px 6px; border: 1px solid #cfd6de; border-radius: 3px; background: #fff; color: #59646f; font-size: 9px; }
.dimension-signal.covered { border-color: #b9ddc8; background: #f1faf4; color: #287947; }
.dimension-signal.reference { border-color: #e1c99d; background: #fff9ef; color: #98631a; }
.dimension-signal.missing { border-color: #d8dde2; background: #f1f3f5; color: #858e97; }
.dimension-evidence-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dimension-evidence-columns section { min-width: 0; }
.dimension-evidence-columns h5 { margin: 4px 0; color: #3a424a; font-size: 10px; }
.dimension-evidence-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(78px, .6fr) minmax(80px, .8fr); gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid #e4e7ea; }
.dimension-evidence-row > div { min-width: 0; }
.dimension-evidence-row strong, .dimension-evidence-row small, .dimension-evidence-row a, .dimension-evidence-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dimension-evidence-row strong { color: #343c44; font-size: 10px; }
.dimension-evidence-row small { margin-top: 3px; color: #818a93; font-size: 8px; }
.dimension-evidence-row b { color: #2e69d8; font: 700 12px ui-monospace, monospace; text-align: right; }
.dimension-evidence-row b small { font: 500 8px inherit; text-align: right; }
.dimension-evidence-row a { color: #4b6d9b; font-size: 9px; }
.dimension-evidence-row.reference b { color: #a76a11; }
.dimension-no-evidence { margin: 0; padding: 8px 0; color: #8a929a; font-size: 10px; }

@media (min-width: 901px) and (max-width: 1050px) {
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { width: 190px; }
  .intel-rail { display: none; }
}
@media (max-width: 1050px) {
  .data-dimension-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .data-workspace-header { display: block; }
  .data-workspace-tabs { width: 100%; margin-top: 12px; overflow-x: auto; }
  .data-workspace-tabs button { flex: 1 0 auto; }
  .data-dimension-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dimension-signal-groups, .dimension-evidence-columns { grid-template-columns: 1fr; }
  .github-publisher-actions { align-items: stretch; flex-direction: column; }
  .github-publisher-actions label { width: 100%; }
}
@media (max-width: 600px) {
  .data-workspace-header h2 { font-size: 20px; }
  .data-workspace-header p { font-size: 10px; }
  .data-dimension-grid { gap: 6px; }
  .data-dimension { min-height: 68px; padding: 8px; }
  .dimension-workbench-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .data-dimension-detail { padding: 9px; }
  .dimension-evidence-row { grid-template-columns: minmax(0, 1fr) auto; }
  .dimension-evidence-row > div:last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* Map-led dashboard composition. */
#view-dashboard { padding-top: 0; }
.dashboard-start { display: grid; gap: 16px; padding: 24px 26px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(8,29,48,.82), rgba(5,15,29,.92)); }
.dashboard-start-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.dashboard-start-heading > div { min-width: 0; max-width: 760px; }
.dashboard-start-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.dashboard-start-actions .command { min-height: 31px; padding-inline: 9px; font-size: 9px; }
.dashboard-start h2 { margin: 5px 0 7px; color: var(--text); font-size: 24px; line-height: 1.25; }
.dashboard-start p { max-width: 720px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.workflow-summary { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #1e526f; border-radius: 4px; background: rgba(4,18,31,.65); color: #acc6d8; font: 700 9px ui-monospace, monospace; white-space: nowrap; }
.workflow-summary svg { width: 14px; height: 14px; color: var(--cyan); }
.workflow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); background: rgba(3,13,25,.42); }
.workflow-step { position: relative; min-width: 0; display: grid; grid-template-columns: 29px minmax(0, 1fr); grid-template-rows: auto auto; gap: 6px 9px; padding: 13px; border-right: 1px solid var(--line); }
.workflow-step:last-child { border-right: 0; }
.workflow-step::before { content: ""; position: absolute; top: -1px; right: 0; left: 0; height: 2px; background: #36526a; }
.workflow-step[data-state="next"]::before { background: var(--cyan); }
.workflow-step[data-state="complete"]::before { background: var(--jade); }
.workflow-number { width: 29px; height: 29px; display: grid; place-items: center; grid-row: 1 / 3; border: 1px solid #31536c; border-radius: 50%; background: #07182a; color: #9cb5c7; font: 800 11px ui-monospace, monospace; }
.workflow-step[data-state="next"] .workflow-number { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 0 3px rgba(36,215,237,.08); }
.workflow-step[data-state="complete"] .workflow-number { border-color: var(--jade); color: var(--jade); }
.workflow-step strong, .workflow-step small { display: block; }
.workflow-step strong { color: var(--text); font-size: 11px; line-height: 1.35; }
.workflow-step small { min-height: 37px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.workflow-step .command { grid-column: 2; justify-self: start; min-height: 30px; padding-inline: 8px; font-size: 9px; }
.dashboard-secondary-control { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid var(--line); background: rgba(4,17,29,.56); }
.dashboard-secondary-control > div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.dashboard-secondary-control > div > svg { color: var(--gold); }
.dashboard-secondary-control strong, .dashboard-secondary-control small { display: block; }
.dashboard-secondary-control strong { font-size: 10px; }
.dashboard-secondary-control small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.dashboard-secondary-control .command { flex: 0 0 auto; min-height: 32px; }
#view-dashboard[data-secondary-expanded="false"] > .dashboard-map-workspace,
#view-dashboard[data-secondary-expanded="false"] > .region-intelligence,
#view-dashboard[data-secondary-expanded="false"] > .dashboard-lower-grid { display: none; }
#dashboard-map-workspace { min-width: 0; }
#dashboard-map-workspace > .globe-command { margin-top: 0; }
.globe-viewport {
  height: clamp(560px, calc(100svh - 127px), 760px);
  min-height: 560px;
  background: #020814;
}
.dashboard-hero-overlay {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
#dashboard-map-workspace[data-region-level="country"] .dashboard-hero-overlay,
#dashboard-map-workspace[data-region-level="state"] .dashboard-hero-overlay,
#dashboard-map-workspace[data-region-level="county"] .dashboard-hero-overlay,
#dashboard-map-workspace[data-region-level="city"] .dashboard-hero-overlay,
#dashboard-map-workspace[data-region-level="district"] .dashboard-hero-overlay,
#dashboard-map-workspace[data-region-level="subdistrict"] .dashboard-hero-overlay,
#dashboard-map-workspace[data-region-level="street"] .dashboard-hero-overlay {
  opacity: 0;
  visibility: hidden;
}
.dashboard-hero-overlay .dashboard-lead {
  position: absolute;
  top: 34px;
  left: 86px;
  width: min(500px, calc(100% - 118px));
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  text-shadow: 0 2px 18px #020611, 0 1px 3px #020611;
}
.dashboard-hero-overlay .dashboard-lead::before { display: none; }
.dashboard-hero-overlay .dashboard-lead h2 {
  margin: 8px 0 10px;
  font-size: 32px;
  line-height: 1.22;
}
.dashboard-hero-overlay .dashboard-lead p {
  max-width: 460px;
  color: #a5bfd3;
  font-size: 13px;
  line-height: 1.55;
}
.dashboard-hero-overlay .status-chips { margin-top: 14px; }
.dashboard-hero-overlay .status-chips span {
  background: rgba(3, 16, 31, .9);
  border-color: #175578;
  color: #b8cddd;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .25);
}
.dashboard-hero-overlay .dashboard-metrics {
  position: absolute;
  right: 26px;
  bottom: 24px;
  left: 26px;
  gap: 8px;
  padding: 0;
}
.dashboard-hero-overlay .metric {
  min-height: 82px;
  border-color: #174261;
  background: rgba(4, 16, 31, .94);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .3), inset 0 0 22px rgba(36, 215, 237, .035);
}
.dashboard-hero-overlay .metric strong { font-size: 22px; }
.command.primary {
  border-color: #ff9d4d;
  background: #dc671b;
  color: #fff8f1;
  box-shadow: inset 0 0 18px rgba(255, 190, 108, .13), 0 0 18px rgba(232, 111, 29, .12);
}
.command.primary:hover { background: #ef7824; }

@media (max-width: 900px) {
  #view-dashboard { padding-top: 0; }
  .dashboard-hero-overlay .dashboard-lead {
    top: 26px;
    left: 78px;
    width: min(520px, calc(100% - 98px));
  }
  .dashboard-hero-overlay .dashboard-lead h2 { font-size: 28px; }
  .dashboard-hero-overlay .dashboard-metrics { right: 16px; bottom: 18px; left: 16px; }
  .globe-viewport { height: clamp(590px, 72svh, 720px); min-height: 590px; }
}

@media (max-width: 600px) {
  .dashboard-hero-overlay .dashboard-lead {
    top: 20px;
    right: 12px;
    left: 61px;
    width: auto;
  }
  .dashboard-hero-overlay .dashboard-lead h2 { margin-top: 6px; font-size: 21px; }
  .dashboard-hero-overlay .dashboard-lead p { font-size: 11px; }
  .dashboard-hero-overlay .status-chips { gap: 5px; margin-top: 9px; }
  .dashboard-hero-overlay .status-chips span { padding: 3px 6px; font-size: 7px; }
  .dashboard-hero-overlay .dashboard-metrics { right: 10px; bottom: 12px; left: 10px; gap: 6px; }
  .dashboard-hero-overlay .metric {
    min-height: 68px;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    padding: 9px;
  }
  .dashboard-hero-overlay .metric-icon { width: 32px; height: 32px; }
  .dashboard-hero-overlay .metric-icon svg { width: 17px; height: 17px; }
  .dashboard-hero-overlay .metric strong { margin: 2px 0; font-size: 18px; }
  .dashboard-hero-overlay .metric span,
  .dashboard-hero-overlay .metric small { font-size: 8px; }
  .globe-viewport { height: 620px; min-height: 620px; }
  .globe-pick-status { bottom: 166px; }
}

.command.primary { background: #3478f6; border-color: #2866d4; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 1px 3px rgba(42,85,160,.2); }
.command.primary:hover { background: #286adf; }
.dashboard-hero-overlay .dashboard-lead h2 { color: #f4f7fb; text-shadow: 0 2px 18px #020611, 0 1px 3px #020611; }
.dashboard-hero-overlay .dashboard-lead .section-code { color: #72b8f4; }
.dashboard-hero-overlay .dashboard-metrics .metric span { color: #a9bfd0; }
.dashboard-hero-overlay .dashboard-metrics .metric small { color: #748ea3; }
.dashboard-hero-overlay .dashboard-metrics .metric strong { color: #62a5ff; }
.dashboard-hero-overlay .dashboard-metrics .metric.jade strong { color: #52d399; }
.dashboard-hero-overlay .dashboard-metrics .metric.gold strong { color: #f2bf60; }
.dashboard-hero-overlay .dashboard-metrics .metric.red strong { color: #ad92ef; }
.globe-coverage-legend { bottom: 118px; }
@media (max-width: 600px) { .globe-coverage-legend { bottom: 158px; } }

@media (max-width: 1180px) {
  .workflow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-step:nth-child(2) { border-right: 0; }
  .workflow-step:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .dashboard-start { gap: 14px; padding: 18px 15px; }
  .dashboard-start-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .dashboard-start-actions { width: 100%; justify-content: space-between; }
  .help-manual-button { display: none; }
  .xiaoyexiao-button span { display: none; }
  .xiaoyexiao-button { width: 34px; padding: 4px; justify-content: center; }
}

@media (max-width: 600px) {
  .xiaoyexiao-dialog { width: calc(100vw - 14px); max-height: calc(100vh - 14px); }
  .xiaoyexiao-heading { padding: 10px 12px; }
  .xiaoyexiao-identity em { display: none; }
  .xiaoyexiao-messages { height: calc(100vh - 340px); min-height: 190px; padding: 14px 12px; }
  .xiaoyexiao-message { max-width: 94%; }
  .xiaoyexiao-prompts { padding-inline: 12px; }
  .xiaoyexiao-proposal { grid-template-columns: 1fr; padding: 10px 12px; }
  .xiaoyexiao-proposal-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xiaoyexiao-proposal-actions .command { width: 100%; }
  .xiaoyexiao-form { padding: 10px 12px; }
  .xiaoyexiao-form .command { width: 42px; min-width: 42px; padding-inline: 0; }
  .xiaoyexiao-form .command span { display: none; }
  .xiaoyexiao-boundary { padding-inline: 12px; }
  .help-manual-dialog { width: calc(100vw - 14px); max-height: calc(100vh - 14px); }
  .help-manual-heading { padding: 14px; }
  .manual-context { grid-template-columns: 1fr; }
  .manual-context > div { padding: 9px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .manual-context > div:last-child { border-bottom: 0; }
  .manual-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 7px; }
  .manual-tabs button { min-height: 40px; }
  .manual-content { min-height: 260px; max-height: calc(100vh - 330px); padding: 6px 14px 12px; }
  .manual-step-list li { grid-template-columns: 28px minmax(0, 1fr); gap: 8px 10px; }
  .manual-step-list li > span { width: 28px; height: 28px; }
  .manual-step-actions { grid-column: 2; }
  .manual-step-list .command { width: 100%; min-width: 0; }
  .manual-directory > div { grid-template-columns: 1fr; gap: 5px; align-content: center; padding: 10px 0; }
  .manual-rule-list { grid-template-columns: 1fr; }
  .manual-rule-list li, .manual-rule-list li:nth-child(2n), .manual-rule-list li:nth-last-child(-n + 2) { min-height: 0; padding: 14px 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .manual-rule-list li:last-child { border-bottom: 0; }
  .manual-footer { align-items: stretch; flex-direction: column; padding: 10px 14px; }
  .manual-footer .command { width: 100%; }
  .dashboard-start { margin-inline: -12px; padding: 16px 12px; }
  .dashboard-start h2 { font-size: 21px; }
  .dashboard-start p { font-size: 10px; }
  .workflow-summary { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .workflow-steps { grid-template-columns: 1fr; }
  .workflow-step, .workflow-step:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow-step:last-child { border-bottom: 0; }
  .workflow-step small { min-height: 0; }
  .dashboard-secondary-control { align-items: stretch; flex-direction: column; }
  .dashboard-secondary-control .command { width: 100%; }
}

/* Reviewed outreach and customer-service workspace. */
#view-outreach { min-width: 0; }
.outreach-workspace-header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 12px;
  padding: 4px 2px;
}
.outreach-workspace-header h2 { margin: 3px 0 4px; font-size: 22px; }
.outreach-workspace-header p { max-width: 760px; margin: 0; font-size: 12px; line-height: 1.55; }
.outreach-tabs {
  min-width: 292px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
}
.outreach-tabs button {
  min-width: 0;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}
.outreach-tabs button:hover { color: var(--text); }
.outreach-tabs button.active { border-color: var(--line-bright); background: var(--surface); color: var(--cyan); }
.outreach-tabs button svg { width: 15px; height: 15px; }
.outreach-tabs button strong {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--gold);
  font: 700 9px ui-monospace, monospace;
}
.outreach-boundary {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  padding: 10px 13px;
  border: 1px solid color-mix(in srgb, var(--jade) 42%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--jade) 7%, var(--surface));
}
.outreach-boundary > svg { width: 26px; height: 26px; color: var(--jade); }
.outreach-boundary strong,
.outreach-boundary span { display: block; overflow-wrap: anywhere; }
.outreach-boundary strong { font-size: 11px; }
.outreach-boundary span { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.outreach-section { min-width: 0; }
.outreach-channel-band { min-width: 0; margin-bottom: 12px; }
.outreach-section-heading {
  min-height: 43px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 0 2px 8px;
}
.outreach-section-heading h3 { font-size: 14px; }
.outreach-section-heading > span { color: var(--muted); font-size: 9px; text-align: right; }
.outreach-channel-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.outreach-channel-card {
  min-width: 0;
  min-height: 112px;
  display: grid;
  grid-template-rows: 1fr auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.outreach-channel-card.active { border-color: var(--line-bright); box-shadow: inset 3px 0 0 var(--cyan); }
.outreach-channel-card.disabled { opacity: .76; }
.outreach-channel-card > header {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 8px;
  align-items: start;
  gap: 9px;
  padding: 11px;
}
.outreach-channel-card > header > div { min-width: 0; }
.outreach-channel-card strong,
.outreach-channel-card small { display: block; min-width: 0; }
.outreach-channel-card strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.outreach-channel-card small { margin-top: 4px; overflow-wrap: anywhere; color: var(--muted); font-size: 8px; line-height: 1.4; }
.outreach-channel-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--cyan);
}
.outreach-channel-icon svg { width: 17px; height: 17px; }
.outreach-channel-dot { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--muted); }
.outreach-channel-dot.ready { background: var(--jade); box-shadow: 0 0 0 3px color-mix(in srgb, var(--jade) 12%, transparent); }
.outreach-channel-dot.not_configured { background: var(--gold); }
.outreach-channel-dot.official_authorization_required { background: var(--red); }
.outreach-channel-dot.manual_helper_only { background: var(--blue); }
.outreach-channel-card > footer {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  border-top: 1px solid var(--line);
}
.outreach-channel-card > footer:has(> :only-child) { justify-content: flex-end; }
.outreach-channel-card .text-command { min-height: 24px; padding: 0 2px; }
.outreach-channel-lock {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}
.outreach-channel-lock svg { width: 12px; height: 12px; }
.outreach-loading {
  grid-column: 1 / -1;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 10px;
}
.outreach-loading svg { color: var(--cyan); }
.outreach-compose-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(310px, .82fr) minmax(470px, 1.18fr);
  gap: 12px;
  align-items: start;
}
.outreach-lead-panel,
.outreach-draft-panel,
.outreach-message-panel,
.outreach-message-detail { min-width: 0; overflow: hidden; }
.outreach-lead-tools { padding: 11px 12px 8px; border-bottom: 1px solid var(--line); }
.outreach-lead-tools .search-box input { height: 36px; }
.outreach-selection-bar {
  min-width: 0;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 7px;
  color: var(--muted);
  font-size: 9px;
}
.outreach-selection-bar label { min-width: 0; display: flex; align-items: center; gap: 7px; }
.outreach-selection-bar input,
.outreach-lead-row > input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; accent-color: var(--cyan); }
.outreach-selection-bar > span { flex: 0 0 auto; }
.outreach-selection-bar strong { color: var(--cyan); }
.outreach-lead-list { min-height: 300px; max-height: 620px; overflow: auto; }
.outreach-lead-row {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}
.outreach-lead-row:last-child { border-bottom: 0; }
.outreach-lead-row:hover { background: var(--surface-2); }
.outreach-lead-row.active { background: color-mix(in srgb, var(--cyan) 8%, var(--surface)); box-shadow: inset 3px 0 0 var(--cyan); }
.outreach-lead-row.suppressed { background: color-mix(in srgb, var(--red) 5%, var(--surface)); }
.outreach-lead-row > input { align-self: center; justify-self: center; }
.outreach-lead-row > button {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(118px, 1fr) minmax(84px, .72fr) auto 14px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px 9px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.outreach-lead-row > button > span { min-width: 0; }
.outreach-lead-row > button strong,
.outreach-lead-row > button small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outreach-lead-row > button strong { font-size: 10px; }
.outreach-lead-row > button small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.outreach-recipient-preview { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.outreach-lead-row > button > svg,
.outreach-message-row > svg { width: 14px; height: 14px; color: var(--muted); }
.outreach-status,
.outreach-draft-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.outreach-status.pending_review,
.outreach-status.approved,
.outreach-draft-state.pending_review,
.outreach-draft-state.approved { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); color: var(--gold); }
.outreach-status.sent,
.outreach-status.manual_confirmed,
.outreach-status.replied,
.outreach-draft-state.sent { border-color: color-mix(in srgb, var(--jade) 55%, var(--line)); color: var(--jade); }
.outreach-status.sending { border-color: color-mix(in srgb, var(--blue) 55%, var(--line)); color: var(--cyan); }
.outreach-status.failed,
.outreach-status.rejected,
.outreach-draft-state.failed,
.outreach-draft-state.rejected { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); color: var(--red); }
#outreach-draft-form { min-width: 0; padding: 13px 14px 14px; }
.outreach-draft-context {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
}
.outreach-draft-context .wide { grid-column: span 2; }
.outreach-draft-context .full { grid-column: 1 / -1; }
.outreach-draft-context input,
.outreach-draft-context select,
.outreach-draft-context textarea { width: 100%; }
.outreach-evidence {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  margin: 12px 0;
  padding: 9px 10px;
  border-left: 2px solid var(--jade);
  background: color-mix(in srgb, var(--jade) 6%, var(--surface-2));
}
.outreach-evidence > svg { width: 17px; height: 17px; margin-top: 1px; color: var(--jade); }
.outreach-evidence > div,
.outreach-evidence > span { min-width: 0; }
.outreach-evidence strong,
.outreach-evidence span,
.outreach-evidence a { display: block; overflow-wrap: anywhere; }
.outreach-evidence strong { font-size: 10px; }
.outreach-evidence span { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.outreach-evidence > span { margin-top: 1px; }
.outreach-evidence a { margin-top: 4px; color: var(--cyan); font-size: 8px; }
.outreach-subject-field { margin-bottom: 10px; }
#outreach-draft-body { min-height: 214px; }
.outreach-ai-meta {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 9px;
  padding: 8px 9px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}
.outreach-ai-meta svg { width: 14px; height: 14px; margin-top: 1px; color: var(--violet); }
.outreach-ai-meta span { min-width: 0; overflow-wrap: anywhere; }
.outreach-draft-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.outreach-draft-actions .command { min-width: 0; padding-inline: 9px; line-height: 1.25; text-align: center; }
#generate-outreach-drafts { grid-column: 1 / -1; }
.outreach-result { min-height: 18px; margin: 9px 0 0; overflow-wrap: anywhere; color: var(--muted); font-size: 9px; line-height: 1.5; }
.outreach-result.success { color: var(--jade); }
.outreach-result.error { color: var(--red); }
.outreach-inbox-layout {
  min-width: 0;
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(290px, .72fr) minmax(470px, 1.28fr);
  gap: 12px;
  align-items: stretch;
}
.outreach-message-tools {
  min-height: 53px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: end;
  gap: 8px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
}
.outreach-message-tools label { gap: 3px; }
.outreach-message-tools select { height: 32px; }
.outreach-message-list { max-height: calc(100vh - 262px); overflow: auto; }
.outreach-message-row {
  width: 100%;
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.outreach-message-row:hover { background: var(--surface-2); }
.outreach-message-row.active { background: color-mix(in srgb, var(--cyan) 8%, var(--surface)); box-shadow: inset 3px 0 0 var(--cyan); }
.outreach-message-row > span { min-width: 0; }
.outreach-message-row strong,
.outreach-message-row small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outreach-message-row strong { font-size: 10px; }
.outreach-message-row small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.outreach-message-detail { scroll-margin-top: 74px; }
.outreach-message-detail-content { min-width: 0; }
.outreach-message-detail-content > header { min-width: 0; padding: 14px; border-bottom: 1px solid var(--line); }
.outreach-message-detail-content > header h2 { margin: 4px 0; overflow-wrap: anywhere; font-size: 19px; }
.outreach-message-detail-content > header p { margin: 0; overflow-wrap: anywhere; font-size: 9px; }
.outreach-original-message { min-width: 0; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.outreach-original-message > span { display: block; color: var(--muted); font-size: 8px; }
.outreach-original-message > strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 11px; }
.outreach-original-message pre {
  max-height: 260px;
  margin: 9px 0 0;
  overflow: auto;
  color: var(--text);
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.outreach-reply-history { min-width: 0; padding: 0 14px 11px; }
.outreach-subheading {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.outreach-subheading strong { font-size: 10px; }
.outreach-subheading span { color: var(--muted); font-size: 8px; }
.outreach-reply-row { min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.outreach-reply-row header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.outreach-reply-row header strong { color: var(--jade); font-size: 9px; }
.outreach-reply-row header span,
.outreach-reply-row > small { color: var(--muted); font-size: 8px; }
.outreach-reply-row p { margin: 7px 0; overflow-wrap: anywhere; color: var(--text); font-size: 10px; line-height: 1.6; white-space: pre-wrap; }
.outreach-no-replies { margin: 0; padding: 12px 0 2px; color: var(--muted); font-size: 9px; }
.outreach-reply-form { min-width: 0; padding: 0 14px 14px; border-top: 1px solid var(--line); }
.outreach-reply-form > label { margin-top: 11px; }
.outreach-reply-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, .45fr); gap: 10px; margin-top: 10px; }
.outreach-reply-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
#outreach-channel-form,
#outreach-send-form { min-width: 0; padding: 14px; }
.outreach-dialog-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0;
  padding: 9px 10px;
  border-left: 2px solid var(--jade);
  background: color-mix(in srgb, var(--jade) 6%, var(--surface-2));
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}
.outreach-dialog-note svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: var(--jade); }
.outreach-channel-fields { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.outreach-channel-fields .wide { grid-column: 1 / -1; }
.outreach-send-summary {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.outreach-send-summary > div { min-width: 0; padding: 9px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.outreach-send-summary span,
.outreach-send-summary strong { display: block; min-width: 0; overflow-wrap: anywhere; }
.outreach-send-summary span { color: var(--muted); font-size: 8px; }
.outreach-send-summary strong { margin-top: 4px; font-size: 10px; line-height: 1.45; }
.outreach-send-confirm {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  border-radius: 5px;
  background: color-mix(in srgb, var(--gold) 6%, var(--surface));
}
.outreach-send-confirm input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--gold); }
.outreach-send-confirm strong,
.outreach-send-confirm small { display: block; overflow-wrap: anywhere; }
.outreach-send-confirm strong { font-size: 10px; }
.outreach-send-confirm small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.5; }

@media (max-width: 1280px) {
  .outreach-channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .outreach-compose-layout { grid-template-columns: 1fr; }
  .outreach-lead-list { max-height: 390px; }
  .outreach-inbox-layout { grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); }
}

@media (max-width: 900px) {
  .outreach-compose-layout,
  .outreach-inbox-layout { grid-template-columns: 1fr; min-height: 0; }
  .outreach-message-list { max-height: 360px; }
  .outreach-message-detail { min-height: 360px; }
}

@media (max-width: 760px) {
  .outreach-workspace-header { grid-template-columns: 1fr; align-items: start; }
  .outreach-tabs { width: 100%; min-width: 0; }
  .outreach-draft-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outreach-draft-context .wide { grid-column: span 2; }
  .outreach-draft-context .full { grid-column: 1 / -1; }
  .outreach-channel-fields { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .primary-nav .nav-item { min-width: 0; }
  .primary-nav .nav-item span { white-space: normal; }
  .outreach-workspace-header h2 { font-size: 20px; }
  .outreach-workspace-header p { font-size: 10px; }
  .outreach-tabs button { min-height: 42px; padding: 4px 6px; line-height: 1.2; white-space: normal; }
  .outreach-boundary { grid-template-columns: 24px minmax(0, 1fr); padding: 9px 10px; }
  .outreach-boundary > svg { width: 22px; height: 22px; }
  .outreach-section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .outreach-section-heading > span { text-align: left; }
  .outreach-channel-grid { grid-template-columns: 1fr; }
  .outreach-channel-card { min-height: 104px; }
  .outreach-lead-list { min-height: 240px; max-height: 340px; }
  .outreach-lead-row > button { grid-template-columns: minmax(0, 1fr) auto 14px; }
  .outreach-recipient-preview { display: none; }
  .outreach-status { max-width: 92px; white-space: normal; }
  #outreach-draft-form { padding: 11px; }
  .outreach-draft-context { grid-template-columns: 1fr; }
  .outreach-draft-context .wide,
  .outreach-draft-context .full { grid-column: 1; }
  #outreach-draft-body { min-height: 190px; }
  .outreach-draft-actions { grid-template-columns: 1fr; }
  #generate-outreach-drafts { grid-column: 1; }
  .outreach-message-tools { grid-template-columns: minmax(0, 1fr) 34px; }
  .outreach-message-row { grid-template-columns: minmax(0, 1fr) auto 14px; padding-inline: 9px; }
  .outreach-message-detail-content > header,
  .outreach-original-message { padding-inline: 11px; }
  .outreach-reply-history,
  .outreach-reply-form { padding-inline: 11px; }
  .outreach-reply-fields { grid-template-columns: 1fr; }
  .outreach-reply-actions { align-items: stretch; flex-direction: column; }
  .outreach-reply-actions .command { width: 100%; }
  #outreach-channel-form,
  #outreach-send-form { padding: 11px; }
  .outreach-channel-fields { grid-template-columns: 1fr; }
  .outreach-channel-fields .wide { grid-column: 1; }
  .outreach-send-summary { grid-template-columns: 1fr; }
  #outreach-channel-form .dialog-actions,
  #outreach-send-form .dialog-actions { display: grid; grid-template-columns: 1fr; }
  #outreach-channel-form .dialog-actions .command,
  #outreach-send-form .dialog-actions .command { width: 100%; }
}
