/* Oil AI — Analysis Terminal, on the "Precision Instrument" design system (design.css).
   Dark app theme: slate surfaces, one brass accent, Space Grotesk + IBM Plex. */
html, body { height: 100%; overflow: hidden; }
#shell { display: grid; grid-template-rows: 52px 1fr; height: 100vh;
  background: radial-gradient(1100px 520px at 18% -12%, var(--accent-soft), transparent 62%), var(--bg); }

/* top bar */
#bar { display: flex; align-items: center; gap: 16px; padding: 0 18px; border-bottom: 1px solid var(--line); }
#bar .brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
#bar .brand em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--text-2); font-family: var(--font-sans); }
#bar .brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
#bar .bar-stat { color: var(--text-3); font-size: 12px; font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
#bar nav { margin-left: auto; display: flex; gap: 5px; }
#bar nav a { padding: 6px 13px; border-radius: var(--r-xs); border: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; font-weight: 500; transition: color var(--t) var(--ease), background var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t-fast) var(--ease); }
#bar nav a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
#bar nav a:active, .gt:active, .basin-switch .bs:active, #ai-send:active { transform: translateY(1px); }
#bar nav a:focus-visible, .gt:focus-visible, .basin-switch .bs:focus-visible, #ai-send:focus-visible, #globe-readout .gr-ask:focus-visible, .dock-button:focus-visible {
  outline: none; box-shadow: var(--ring); }

/* layout */
#app { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(390px, 0.84fr); gap: 13px; padding: 13px; min-height: 0; }
.right { display: grid; grid-template-rows: 0.82fr 1.5fr 1.18fr; gap: 13px; min-height: 0; }

.panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.phead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.phead .ptag { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 13.5px; letter-spacing: -.01em; }
.phead .ptag .ico { width: 16px; height: 16px; color: var(--accent); }
.phead .pmeta { min-width: 0; margin-left: auto; display: inline-flex; align-items: center; gap: 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text-3); font-size: 11.5px; font-family: var(--font-mono); }
.pbody { flex: 1; overflow: auto; min-height: 0; }
.pbody .empty { color: var(--text-3); padding: 20px 16px; font-size: 13px; line-height: 1.8; }
.pbody .empty .k { color: var(--text-2); }

/* panel state chip (syncing / ready / thinking / offline) — quiet sans label */
.pstate { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3);
  font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.pstate::before { content: ""; flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }
.panel[data-state="ready"] .pstate, .pstate[data-state="ready"] { color: var(--pos); }
.panel[data-state="ready"] .pstate::before, .pstate[data-state="ready"]::before { background: var(--pos); }
.panel[data-state="thinking"] .pstate, .pstate[data-state="thinking"] { color: var(--info); }
.panel[data-state="thinking"] .pstate::before, .pstate[data-state="thinking"]::before { background: var(--info); }
.panel[data-state="offline"] .pstate, .pstate[data-state="offline"] { color: var(--neg); }
.panel[data-state="offline"] .pstate::before, .pstate[data-state="offline"]::before { background: var(--neg); }

/* system readout in the bar */
.brand-mark { display: grid; place-items: center; width: 20px; height: 20px; }
.system-readout { min-width: 0; display: flex; align-items: center; gap: 12px; padding-left: 15px; border-left: 1px solid var(--line); }
.system-channel { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--text-3);
  font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.system-channel i { width: 5px; height: 5px; border-radius: 50%; background: var(--pos); }
#bar .bar-stat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mission-clock { margin-left: auto; white-space: nowrap; color: var(--text-3);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; font-feature-settings: "tnum" 1; }
.mission-clock + nav { margin-left: 0; }

/* basin switcher — segmented control */
.basin-switch { display: inline-flex; margin-left: 4px; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.basin-switch .bs { background: var(--surface-2); border: 0; border-right: 1px solid var(--line); color: var(--text-2);
  padding: 5px 12px; font: inherit; font-family: var(--font-sans); font-size: 11.5px; font-weight: 600; cursor: pointer; transition: all var(--t) var(--ease); }
.basin-switch .bs:last-child { border-right: 0; }
.basin-switch .bs:hover { color: var(--accent); }
.basin-switch .bs.on { background: var(--accent-soft); color: var(--accent); }

.phead .globe-tools { margin-left: auto; display: flex; gap: 6px; }
.gt:disabled { opacity: .38; cursor: not-allowed; }
/* Three basins + five tools can exceed one row on narrower desktops: let the
   globe header wrap instead of clipping the Delaware button. */
.globe-panel .phead { flex-wrap: wrap; row-gap: 8px; }
.gt { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); border-radius: var(--r-xs);
  padding: 5px 11px; font: inherit; font-family: var(--font-sans); font-size: 11.5px; font-weight: 500; cursor: pointer; transition: all var(--t) var(--ease); }
.gt:hover { border-color: var(--accent); color: var(--accent); }
.gt.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* globe */
.globe-note { flex: 1 0 100%; margin: 0; color: var(--text-3); font-size: 10.5px; line-height: 1.55; }
.globe-note b { color: var(--text-2); font-weight: 600; }
.globe-note[hidden] { display: none; }
.globe-panel { position: relative; }
#globe { flex: 1; min-height: 0; }
#globe canvas { outline: none; }
#globe canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.maplibregl-ctrl-attrib { background: rgba(11,14,19,.7) !important; }
.maplibregl-ctrl-attrib a { color: var(--text-3) !important; }
.maplibregl-ctrl-group { overflow: hidden; border: 1px solid var(--line-2) !important; border-radius: var(--r-sm) !important;
  background: var(--surface-2) !important; box-shadow: var(--shadow-1) !important; }
.maplibregl-ctrl-group button { border-color: rgba(255,255,255,.08) !important; filter: invert(1) opacity(.8); }

/* viewport telemetry rack — real camera values: mono numbers, sans labels */
.spatial-overlay { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.telemetry-rack { position: absolute; left: 14px; right: 14px; bottom: 12px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden;
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); box-shadow: var(--shadow-1); }
.telemetry-rack > span { min-width: 0; padding: 7px 10px; border-right: 1px solid var(--line); }
.telemetry-rack > span:last-child { border-right: 0; }
.telemetry-rack small, .telemetry-rack b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.telemetry-rack small { color: var(--text-3); font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.telemetry-rack b { margin-top: 2px; color: var(--text-2); font-family: var(--font-mono); font-size: 11px; font-weight: 500; font-feature-settings: "tnum" 1; }

/* hover popup — dark + readable (library default is white, so the dark-theme
   light text was rendering white-on-white). */
.maplibregl-popup { font-family: var(--font-sans); }
.maplibregl-popup-content {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 9px 12px; font-size: 12px; line-height: 1.55;
  box-shadow: var(--shadow-2);
}
.maplibregl-popup-content b { display: block; font-family: var(--font-display); font-weight: 600; color: var(--text); font-size: 13px; letter-spacing: -.01em; }
.maplibregl-popup-content .pp-m { display: block; margin-top: 3px; color: var(--text-2); font-family: var(--font-mono); font-size: 10.5px; }
.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--surface-2) !important; }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--surface-2) !important; }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--surface-2) !important; }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--surface-2) !important; }
#globe-readout { position: absolute; left: 16px; bottom: 64px; z-index: 6; max-width: 320px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px);
  border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 13px 15px; box-shadow: var(--shadow-2); }
#globe-readout.hidden { display: none; }
#globe-readout .gr-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
#globe-readout .gr-meta { color: var(--text-2); font-size: 11.5px; margin-top: 4px; line-height: 1.7; font-family: var(--font-mono); }
#globe-readout .gr-score { display: flex; align-items: baseline; gap: 8px; margin-top: 9px; }
#globe-readout .gr-score b { font-family: var(--font-mono); font-size: 24px; font-weight: 600; }
#globe-readout .gr-ask { display: block; margin-top: 11px; padding: 0; border: 0; background: transparent;
  color: var(--accent); font: inherit; font-size: 12px; font-weight: 600; text-align: left; cursor: pointer; }
#globe-readout .gr-ask:hover { text-decoration: underline; }
#globe-readout .gr-ask:focus-visible { border-radius: 3px; }

/* news */
#news { padding: 4px 0; }
.news-item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background var(--t) var(--ease), transform var(--t) var(--ease); }
.news-item:last-child { border-bottom: 0; }
.news-item:hover { background: var(--surface-2); transform: translateX(2px); }
.news-item:focus-visible { outline: 1px solid var(--accent); outline-offset: -2px; background: var(--surface-2); }
.news-item .nt { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text); }
.news-item .nm { margin-top: 6px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.news-item .nm b { color: var(--accent); font-weight: 600; }

/* stats */
#stats { padding: 15px 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 13px; }
.kpi .n { font-family: var(--font-mono); font-size: 21px; font-weight: 600; letter-spacing: -.02em; font-feature-settings: "tnum" 1; }
.kpi .n.pos { color: var(--pos); } .kpi .n.neg { color: var(--neg); }
.kpi .l { color: var(--text-3); font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; margin-top: 4px; font-family: var(--font-sans); }
.stats-h { color: var(--text-3); font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 18px 0 10px; }
.barrow { display: grid; grid-template-columns: 44px 1fr 88px; align-items: center; gap: 11px; padding: 3px 0; font-size: 11.5px; font-family: var(--font-mono); }
.barrow .bk { color: var(--text-2); text-align: right; }
.barrow .bt { height: 6px; background: rgba(255,255,255,.06); border-radius: var(--r-pill); overflow: hidden; }
.barrow .bt > i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-pill); }
.barrow .bv { color: var(--text-2); white-space: nowrap; }
.sel-well { margin-top: 16px; padding: 13px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-md); background: var(--accent-soft); }
.sel-well .sw-h { display: flex; justify-content: space-between; align-items: baseline; }
.sel-well .sw-h b { font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.sel-well .sw-h span { color: var(--accent); font-weight: 600; font-family: var(--font-mono); }
.sel-well .sw-rows { margin-top: 8px; font-size: 11.5px; color: var(--text-2); line-height: 1.85; font-family: var(--font-mono); }
.sel-well .sw-rows b { color: var(--text); font-weight: 600; }

/* AI chat */
.ai-panel { position: relative; }
#chat { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
#chat .empty { color: var(--text-3); font-size: 12.5px; line-height: 1.7; }
#chat .empty .ex { display: inline; padding: 0; border: 0; background: transparent; color: var(--accent);
  font: inherit; text-align: left; cursor: pointer; }
#chat .empty .ex:hover { text-decoration: underline; }
#chat .empty .ex:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.analyst-welcome { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.welcome-sigil { display: grid; place-items: center; width: 40px; height: 40px; color: var(--accent);
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  border: 1px solid var(--line-2); border-radius: 50%; background: var(--accent-soft); }
.welcome-copy b { display: block; color: var(--text); font-family: var(--font-display); font-size: 13px; font-weight: 600; }
.welcome-copy p { margin: 3px 0 9px; color: var(--text-2); font-size: 12px; line-height: 1.55; }
.prompt-grid { display: flex; flex-wrap: wrap; gap: 6px; }
#chat .empty .prompt-grid .ex { padding: 5px 9px; border: 1px solid var(--line); border-radius: var(--r-xs);
  background: var(--surface-2); color: var(--text-2); font-family: var(--font-sans); font-size: 11.5px; line-height: 1.4; }
#chat .empty .prompt-grid .ex:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.msg { max-width: 88%; padding: 9px 13px; border-radius: var(--r-md); font-size: 12.5px; line-height: 1.55; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); font-weight: 500; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.ai .tag { display: block; color: var(--text-3); font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 5px; }
.msg.ai .act { display: block; margin-top: 6px; color: var(--text-3); font-family: var(--font-mono); font-size: 10.5px; }
.thinking-dots { display: inline-flex; align-items: center; gap: 4px; min-height: 16px; }
.thinking-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); opacity: .35; }
#ai-form { display: flex; align-items: center; gap: 9px; padding: 12px 16px; border-top: 1px solid var(--line); }
.prompt-mark { color: var(--text-3); font-family: var(--font-mono); font-size: 12px; }
#ai-in { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--text);
  font: inherit; font-family: var(--font-sans); font-size: 13px; padding: 10px 13px; outline: none; transition: border-color var(--t), box-shadow var(--t); }
#ai-in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#ai-in::placeholder { color: var(--text-3); }
#ai-send { display: inline-flex; align-items: center; gap: 7px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--r-sm); padding: 0 17px; min-height: 37px; font: inherit;
  font-family: var(--font-sans); font-weight: 600; font-size: 12.5px; cursor: pointer; transition: background var(--t); }
#ai-send:hover { background: var(--accent-2); }
#ai-send:disabled { opacity: .5; cursor: default; }

/* loading skeletons (shimmer while panels fetch) */
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--r-sm); }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text-3) 16%, transparent), transparent);
  animation: skshimmer 1.3s infinite; }
@keyframes skshimmer { 100% { transform: translateX(100%); } }
.skel-news { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sk-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 15px 16px; }
.sk-kpi { height: 66px; }
.pbody .offline { color: var(--text-3); padding: 20px 16px; font-size: 13px; line-height: 1.75; }
.pbody .offline .k { color: var(--accent); font-family: var(--font-mono); font-size: 12px; }

/* Motion hierarchy: one quiet boot sequence, then short state-change cues.
   No infinite decorative animation; only loading feedback loops remain. */
@keyframes terminal-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes terminal-bar-enter { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes value-update { 0% { color: var(--accent); opacity: .5; } 100% { color: inherit; opacity: 1; } }
@keyframes readout-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes readout-update { 0% { transform: translateY(3px); border-color: var(--accent); } 100% { transform: none; border-color: var(--line-2); } }
@keyframes readout-out { to { opacity: 0; transform: translateY(7px) scale(.99); } }
@keyframes item-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes selection-update { 0% { border-left-color: #f2bd75; } 100% { border-left-color: var(--accent); } }
@keyframes message-enter { from { opacity: 0; transform: translateY(5px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes message-update { from { opacity: .55; } to { opacity: 1; } }
@keyframes thinking-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .32; } 30% { transform: translateY(-3px); opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  #bar { animation: terminal-bar-enter .38s var(--ease) both; }
  .globe-panel { animation: terminal-enter .48s .06s var(--ease) both; }
  .news-panel { animation: terminal-enter .42s .12s var(--ease) both; }
  .stats-panel { animation: terminal-enter .42s .17s var(--ease) both; }
  .ai-panel { animation: terminal-enter .42s .22s var(--ease) both; }
  .value-updated { animation: value-update .48s var(--ease); }
  #globe-readout.is-entering { animation: readout-in .32s var(--ease) both; }
  #globe-readout.is-updating { animation: readout-update .32s var(--ease); }
  #globe-readout.is-leaving { animation: readout-out .18s var(--ease) both; }
  .news-item, .kpi, .barrow { animation: item-enter .34s var(--ease) both;
    animation-delay: min(calc(var(--item-index, 0) * 38ms), 300ms); }
  .barrow .bt > i { transform-origin: left; animation: bar-grow .62s var(--ease) both;
    animation-delay: min(calc(var(--item-index, 0) * 38ms + 100ms), 400ms); }
  .sel-well.is-updating { animation: selection-update .48s var(--ease); }
  .sel-well.is-updating .sw-h, .sel-well.is-updating .sw-rows { animation: item-enter .3s var(--ease) both; }
  .msg { animation: message-enter .28s var(--ease) both; }
  .msg.is-updating { animation: message-update .28s var(--ease); }
  .thinking-dots i { animation: thinking-dot 1s ease-in-out infinite; }
  .thinking-dots i:nth-child(2) { animation-delay: .12s; }
  .thinking-dots i:nth-child(3) { animation-delay: .24s; }
}

@media (prefers-reduced-motion: reduce) {
  #shell *, #shell *::before, #shell *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .news-item:hover { transform: none; }
}

/* mobile dock — quiet sans buttons, hidden on desktop */
.mobile-dock { display: none; }

@media (max-width: 1120px) {
  #app { grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); }
  .system-channel { display: none; }
  .system-readout { padding-left: 0; border-left: 0; }
  .mission-clock { display: none; }
  .globe-tools { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .globe-tools::-webkit-scrollbar { display: none; }
}

/* --- mobile: stack the fixed 2-col grid into a scrollable single column --- */
@media (max-width: 820px) {
  html, body { height: auto; overflow: auto; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  #shell { height: auto; min-height: 100vh; grid-template-rows: auto 1fr; }
  #bar { flex-wrap: wrap; height: auto; padding: 10px 14px; row-gap: 8px; }
  #bar .brand em { display: none; }
  #bar .bar-stat { width: auto; }
  .system-readout { order: 3; width: 100%; }
  #bar nav { margin-left: auto; }
  #bar nav a { padding: 6px 9px; }
  #app { display: flex; flex-direction: column; height: auto; padding: 10px; gap: 10px; }
  .right { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
  .right .ai-panel { order: -3; }
  .right .stats-panel { order: -2; }
  .right .news-panel { order: -1; }
  .globe-panel { height: 62vh; min-height: 430px; }
  .ai-panel { height: 500px; }
  .stats-panel { min-height: 390px; }
  .news-panel { height: 310px; }
  .phead { flex-wrap: wrap; row-gap: 8px; padding: 10px 12px; }
  .phead .pmeta { width: 100%; margin-left: 0; order: 4; }
  .globe-panel .pmeta { width: auto; }
  .phead .globe-tools { width: 100%; flex-wrap: nowrap; margin-left: 0; }
  .basin-switch { margin-left: 0; max-width: 100%; }
  .basin-switch .bs { padding: 6px 9px; white-space: nowrap; }
  .telemetry-rack { left: 8px; right: 8px; bottom: 8px; grid-template-columns: repeat(4, 1fr); }
  .telemetry-rack > span { padding: 6px 8px; }
  .telemetry-rack > span:nth-child(5) { display: none; }
  #globe-readout { left: 10px; bottom: 58px; max-width: calc(100% - 20px); }
  .mobile-dock { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 5px;
    border: 1px solid var(--line-2); border-radius: var(--r-lg);
    background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow-2); backdrop-filter: blur(14px); }
  .dock-button { min-width: 0; min-height: 46px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); cursor: pointer;
    font: inherit; font-family: var(--font-sans); font-size: 10.5px; font-weight: 600; }
  .dock-button span { font-size: 16px; line-height: 1; }
  .dock-button.on { color: var(--accent); background: var(--accent-soft); }
}

@media (max-width: 480px) {
  #bar nav a { padding: 5px 7px; font-size: 11px; }
  .globe-panel { min-height: 460px; }
  .globe-panel .phead { align-content: flex-start; }
  .phead .ptag { font-size: 12px; }
  .phead .globe-tools { gap: 4px; }
  .gt { padding: 5px 7px; }
  .telemetry-rack { grid-template-columns: repeat(3, 1fr); }
  .telemetry-rack > span:nth-child(4) { display: none; }
  .analyst-welcome { grid-template-columns: 1fr; }
  .welcome-sigil { width: 36px; height: 36px; }
  #ai-form { gap: 5px; }
  .prompt-mark { display: none; }
  #ai-send { padding: 0 11px; }
  #ai-send span:first-child { display: none; }
}

@media (prefers-contrast: more) {
  .panel, .phead, .telemetry-rack, .mobile-dock { border-color: rgba(255,255,255,.34); }
  .phead .pmeta, .telemetry-rack small, .system-channel { color: var(--text-2); }
}
