/* Coactive Science design tokens — temp/coactive_design_system/tokens/colors.css,
   the dark (default) scope. Variable names kept stable from the app's original
   theme so every existing var() reference re-skins automatically; values are
   now the real brand palette instead of the placeholder lime-green theme. */
:root {
  color-scheme: dark;
  --ink: #FFFFFF;            /* --text-heading */
  --muted: #A0B2C8;          /* --text-muted (slate-400) */
  --muted-faint: #7E93AE;    /* --text-faint (slate-500) */
  --panel: #050A12;          /* --bg-page (navy-950) */
  --panel-soft: #0D2946;     /* --surface-card (navy-800) */
  --panel-raised: #12314F;   /* --surface-raised */
  --line: rgba(158, 190, 224, .14);  /* --border-subtle */
  --line-strong: #1F3C5C;    /* --border-default (navy-700) */
  --lime: #58DCFF;           /* --accent-primary (cyan-400) — kept the old var name */
  --lime-bright: #9AEBFF;    /* --accent-primary-hover (cyan-300) */
  --lime-press: #2FC8F0;     /* --accent-primary-press (cyan-500) */
  --text-on-accent: #050A12;
  --blue: #1BA3C9;           /* cyan-600, for secondary map markers */
  --amber: #FFB33D;          /* --amber-500 */
  --green: #4BB06E;          /* --green-500 */
  --danger: #FF6F4E;         /* --coral-500 */
  --iris: #8978FF;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--panel);
  color: var(--ink);
  font-family: "DM Sans", -apple-system, "Segoe UI", sans-serif;
}

h1, h2, h3, .brand-copy strong, .panel-title, .chat-title {
  font-family: "Space Grotesk", "DM Sans", -apple-system, "Segoe UI", sans-serif;
}

.public-landing {
  min-height: 100%;
  overflow: auto;
  background:
    radial-gradient(circle at 81% 13%, rgba(88, 220, 255, .15), transparent 24%),
    radial-gradient(circle at 58% 68%, rgba(86, 171, 166, .12), transparent 28%),
    linear-gradient(121deg, #071311 0%, #0d211e 54%, #0a1716 100%);
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding: 18px clamp(24px, 5vw, 78px);
  border-bottom: 1px solid rgba(219, 239, 229, .13);
}

.landing-brand { display: inline-flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.landing-header-status { display: flex; align-items: center; gap: 16px; }
.landing-header-note { display: inline-flex; align-items: center; gap: 8px; color: #b4c3bd; font-size: 12px; font-weight: 700; }
.landing-header-note i, .visual-card-signal i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(88, 220, 255, .12); }
.landing-user-identity { display: grid; gap: 2px; padding-right: 16px; border-right: 1px solid rgba(219, 239, 229, .13); font-size: 12px; line-height: 1.15; text-align: right; }
.landing-user-identity strong { font-weight: 800; }
.landing-user-identity span { color: var(--muted); font-size: 10px; text-transform: capitalize; }

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  align-items: center;
  gap: clamp(38px, 7vw, 120px);
  width: min(1380px, 100%);
  min-height: min(650px, calc(100vh - 88px));
  margin: 0 auto;
  padding: clamp(54px, 8vh, 112px) clamp(24px, 5vw, 78px) clamp(44px, 6vh, 78px);
}

.landing-copy { max-width: 690px; }
.landing-kicker { margin: 0 0 18px; color: var(--lime); font-size: 11px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.landing-copy h1 { max-width: 660px; margin: 0; font-size: clamp(42px, 5vw, 76px); line-height: .98; letter-spacing: -.065em; }
.landing-lede { max-width: 585px; margin: 28px 0 0; color: #bdcdc6; font-size: clamp(16px, 1.45vw, 20px); line-height: 1.55; }
.landing-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 22px; margin-top: 34px; }
.landing-sign-in { display: inline-flex; align-items: center; gap: 24px; border: 0; padding: 14px 17px 14px 19px; border-radius: 8px; background: var(--lime); color: #050A12; cursor: pointer; font-size: 14px; font-weight: 900; text-decoration: none; box-shadow: 0 14px 30px rgba(0, 0, 0, .2); transition: transform .16s ease, background .16s ease; }
.landing-sign-in[hidden] { display: none; }
.landing-sign-in:hover { background: var(--lime-bright); transform: translateY(-2px); }
.landing-sign-in:focus-visible { outline: 2px solid var(--lime-bright); outline-offset: 4px; }
.landing-sign-in span { font-size: 20px; line-height: .7; }
.landing-status { margin: 0; color: #c5d1cb; font-size: 13px; font-weight: 650; }
.landing-access-note { margin: 16px 0 0; color: #83958d; font-size: 12px; line-height: 1.5; }
.landing-auth { max-width: 430px; margin-top: 22px; padding: 20px; border: 1px solid rgba(217, 240, 226, .16); border-radius: 12px; background: rgba(6, 21, 18, .58); box-shadow: 0 18px 45px rgba(0, 0, 0, .17); }
.landing-auth-form { display: grid; gap: 13px; }
.landing-auth-form[hidden] { display: none; }
.landing-auth-form h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.landing-auth-form p { margin: -4px 0 2px; color: #aabdb4; font-size: 13px; line-height: 1.45; }
.landing-auth-form label { display: grid; gap: 6px; color: #d7e4dd; font-size: 12px; font-weight: 750; }
.landing-auth-form input { min-width: 0; border: 1px solid rgba(217, 240, 226, .2); border-radius: 7px; padding: 11px 12px; background: rgba(1, 12, 10, .58); color: var(--ink); outline: none; }
.landing-auth-form input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(88, 220, 255, .14); }
.landing-auth-submit { display: inline-flex; justify-content: center; align-items: center; gap: 15px; min-height: 43px; border: 0; border-radius: 7px; background: var(--lime); color: #050A12; cursor: pointer; font-weight: 900; }
.landing-auth-submit:disabled { cursor: progress; opacity: .68; }
.landing-auth-error { margin: 14px 0 0; color: #ffc1b7; font-size: 13px; font-weight: 650; }

.public-landing.landing-auth-active .landing-hero {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  width: min(620px, 100%);
  min-height: calc(100svh - 88px);
  padding-top: clamp(24px, 4vh, 42px);
  padding-bottom: 42px;
}
.public-landing.landing-auth-active .landing-copy { max-width: 520px; }
.public-landing.landing-auth-active .landing-kicker { margin-bottom: 12px; }
.public-landing.landing-auth-active .landing-copy h1 { max-width: 480px; font-size: clamp(38px, 4.7vw, 58px); line-height: 1; letter-spacing: -.05em; }
.public-landing.landing-auth-active .landing-lede { max-width: 470px; margin-top: 16px; font-size: 16px; line-height: 1.45; }
.public-landing.landing-auth-active .landing-actions { margin-top: 22px; }
.public-landing.landing-auth-active .landing-auth { margin-top: 16px; }
.public-landing.landing-auth-active .landing-access-note { margin-top: 12px; }
.public-landing.landing-auth-active .landing-visual,
.public-landing.landing-auth-active .landing-proof { display: none; }

.landing-visual { position: relative; isolation: isolate; min-height: 430px; overflow: hidden; border: 1px solid rgba(211, 235, 222, .13); border-radius: 22px; background: linear-gradient(145deg, rgba(33, 71, 64, .68), rgba(7, 22, 20, .92)); box-shadow: 0 38px 90px rgba(0, 0, 0, .28); }
.landing-visual::before { position: absolute; inset: 0; background-image: linear-gradient(rgba(203, 235, 219, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(203, 235, 219, .06) 1px, transparent 1px); background-size: 52px 52px; content: ""; mask-image: linear-gradient(to bottom, black, transparent); }
.visual-orbit { position: absolute; z-index: -1; border: 1px solid rgba(88, 220, 255, .2); border-radius: 50%; }
.orbit-one { width: 500px; height: 500px; top: -220px; right: -150px; }
.orbit-two { width: 360px; height: 360px; bottom: -215px; left: -170px; border-color: rgba(102, 183, 220, .22); }
.visual-lake { position: absolute; top: 53%; left: 51%; width: 72%; height: 47%; transform: translate(-50%, -50%) rotate(-15deg); border-radius: 48% 52% 43% 57% / 48% 39% 61% 52%; background: radial-gradient(ellipse at 35% 36%, #7ec3c7 0 3%, transparent 3.5%), radial-gradient(ellipse at 54% 67%, #9bd16b 0 3%, transparent 3.5%), linear-gradient(130deg, #2f8d8f, #176065 48%, #0f3d43); box-shadow: inset 0 0 70px rgba(189, 237, 225, .23), 0 0 0 28px rgba(76, 144, 122, .13), 0 0 0 58px rgba(76, 144, 122, .07); }
.visual-lake span { position: absolute; width: 42%; height: 2px; border-radius: 4px; background: rgba(232, 254, 244, .42); transform: rotate(18deg); }
.visual-lake span:nth-child(1) { top: 30%; left: 20%; }
.visual-lake span:nth-child(2) { top: 49%; right: 10%; width: 30%; }
.visual-lake span:nth-child(3) { bottom: 20%; left: 26%; width: 34%; }
.visual-card { position: absolute; border: 1px solid rgba(225, 245, 234, .16); border-radius: 11px; background: rgba(7, 23, 20, .8); box-shadow: 0 16px 34px rgba(0, 0, 0, .2); backdrop-filter: blur(12px); }
.visual-card-main { top: 34px; left: 30px; width: min(300px, calc(100% - 60px)); padding: 17px 18px; }
.visual-card small { display: block; color: var(--lime); font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.visual-card-main strong { display: block; margin-top: 8px; font-size: 18px; line-height: 1.13; }
.visual-card-main p { margin: 8px 0 0; color: #a5b8b0; font-size: 11px; }
.visual-card-signal { right: 24px; bottom: 25px; display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; padding: 13px 15px; }
.visual-card-signal i { grid-row: span 2; width: 7px; height: 7px; }
.visual-card-signal span { color: #a4b4ad; font-size: 10px; }
.visual-card-signal strong { margin-top: 2px; font-size: 12px; }

.landing-proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(1380px, 100%); margin: 0 auto; padding: 0 clamp(24px, 5vw, 78px) 55px; }
.landing-proof article { padding: 20px clamp(16px, 2vw, 28px); border-top: 1px solid rgba(215, 236, 226, .16); }
.landing-proof article:first-child { padding-left: 0; }
.landing-proof span { color: var(--lime); font-size: 10px; font-weight: 850; letter-spacing: .15em; }
.landing-proof strong { display: block; margin-top: 8px; font-size: 16px; }
.landing-proof p { max-width: 255px; margin: 7px 0 0; color: #91a49c; font-size: 12px; line-height: 1.5; }

button, input, select { font: inherit; }

.app-shell {
  display: grid;
  grid-template-rows: 54px minmax(0, 1fr);
  height: 100%;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: rgba(5, 10, 18, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.app-header .brand-mark { width: 34px; height: 34px; border-radius: 0; background: none; }
.app-header .brand-copy strong { font-size: 16px; }
.app-header .eyebrow { color: var(--muted); font-size: 9px; }

.app-layout {
  display: grid;
  grid-template-columns: 306px minmax(0, 1fr);
  min-height: 0;
}

.site-rail {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 8px;
  border-right: 1px solid var(--line);
  background: #091829;
}

.site-rail h2 { margin: 0 4px; font-size: 16px; }
.site-rail > p { margin: 5px 4px 14px; color: var(--muted); font-size: 12px; }
.site-rail .site-list { display: grid; gap: 5px; margin: 0; }
.site-button {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm, 6px);
  padding: 10px 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.site-button strong { font-size: 13px; }
.site-button small { color: var(--muted); font-size: 11px; }
.site-button.active { background: var(--panel-soft); }
.site-button:hover, .site-button:focus-visible { background: var(--panel-raised); outline: 2px solid var(--lime); outline-offset: -2px; }

.application-main {
  display: grid;
  grid-template-rows: 42px auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  border-bottom: 1px solid var(--line);
  background: #091829;
}

.workspace-switch { display: flex; gap: 4px; }
.workspace-switch button, .logout-button {
  border: 1px solid transparent;
  border-radius: var(--radius-sm, 6px);
  padding: 6px 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.workspace-switch button { color: var(--muted); }
.workspace-switch button:hover { color: var(--ink); }
.workspace-switch button.active { border-color: var(--lime); background: rgba(88, 220, 255, .1); color: var(--lime); }
.workspace-switch button:focus-visible, .logout-button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.logout-button { margin-left: 2px; border-color: var(--line-strong); color: var(--ink); }
.logout-button:hover { background: var(--panel-raised); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-copy { display: grid; gap: 1px; }
.brand-copy strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }

.tenant-switcher-label {
  display: none;
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.tenant-switcher {
  display: none;
  min-width: 158px;
  max-width: 240px;
  padding: 8px 30px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.tenant-switcher:hover:not(:disabled) { border-color: var(--lime); }
.tenant-switcher:focus-visible { outline: 2px solid var(--lime-bright); outline-offset: 2px; }
.tenant-switcher:disabled { cursor: wait; opacity: .64; }

.record-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.app-header:has(.tenant-switcher:not([hidden])) .record-badge { margin-left: 0; }

.record-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(88, 220, 255, .12);
}

.user-identity {
  display: grid;
  gap: 2px;
  min-width: 112px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.15;
}

.user-identity strong { font-weight: 800; }
.user-identity span { color: var(--muted); font-size: 10px; text-transform: capitalize; }

.beat-nav {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: #050A12;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
}

.beat-tab {
  position: relative;
  border: 0;
  background: transparent;
  color: #8da099;
  cursor: pointer;
  text-align: left;
  padding: 9px 14px 8px;
}

.beat-tab::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 3px;
  border-radius: 4px 4px 0 0;
  background: transparent;
  content: "";
}

.beat-tab span { display: block; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.beat-tab strong { display: block; margin-top: 3px; color: inherit; font-size: 14px; }
.beat-tab.active { color: var(--ink); }
.beat-tab.active span { color: var(--lime); }
.beat-tab.active::after { background: var(--lime); }

.ops-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
.ops-summary > div { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(4, 17, 15, .25); }
.ops-summary span { display: block; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.ops-summary strong { display: block; margin-top: 6px; font-size: 13px; line-height: 1.2; }
.ops-priority { width: 100%; border: 1px solid var(--line); background: #152522; color: inherit; cursor: pointer; text-align: left; }
.ops-priority:hover, .ops-priority:focus-visible { border-color: var(--amber); outline: none; }
.ops-agent { display: grid; gap: 10px; margin-top: 18px; padding: 15px; border: 1px solid rgba(102, 183, 220, .34); border-radius: 10px; background: rgba(31, 73, 80, .16); }
.ops-agent .panel-kicker { margin: 0; }
.ops-agent strong { display: block; margin-top: 4px; font-size: 15px; }
.ops-agent p { margin: 0; color: #b3c5be; font-size: 12px; line-height: 1.45; }
.ops-agent .primary-button { justify-self: start; }
@media (max-width: 820px) { .ops-summary { grid-template-columns: 1fr; } }

.workspace {
  display: grid;
  min-height: 0;
  /* map · draggable divider · panel (width set by panel-resize.js) */
  grid-template-columns: minmax(0, 1fr) 8px var(--panel-width, 410px);
}
.workspace.panel-collapsed { grid-template-columns: minmax(0, 1fr) 8px 0; }
.workspace.panel-collapsed #panel { display: none; }
.workspace:not(.intelligence-mode):not(.limited-release-mode) > .map-stage { grid-column: 1; grid-row: 1; }
.workspace:not(.intelligence-mode):not(.limited-release-mode) > .panel-resize-handle { grid-row: 1; }
.workspace:not(.intelligence-mode):not(.limited-release-mode) > #panel { grid-column: 3; grid-row: 1; }

.map-stage { position: relative; min-width: 0; overflow: hidden; background: #162724; }
#map { width: 100%; height: 100%; background: radial-gradient(circle at 48% 48%, #0D2946 0, #0A1F35 42%, #091829 100%); }

.map-stage.comparison-mode #map,
.map-stage.comparison-mode .map-heading,
.map-stage.comparison-mode .map-legend,
.map-stage.comparison-mode .map-source { display: none; }

.hyperspectral-stage {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 28px 30px 34px;
  background:
    radial-gradient(circle at 78% 14%, rgba(102, 183, 220, .09), transparent 28%),
    radial-gradient(circle at 12% 2%, rgba(88, 220, 255, .08), transparent 25%),
    #050A12;
}

.map-stage.comparison-mode .hyperspectral-stage { display: block; }
.hyperspectral-content { max-width: 1240px; margin: 0 auto; }
.hyperspectral-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.hyperspectral-header h2 { margin: 5px 0 0; font-size: 34px; line-height: 1; letter-spacing: -.04em; }
.hyperspectral-header p { margin: 0; color: var(--muted); font-size: 12px; }

.spectral-card { padding: 20px 20px 13px; border: 1px solid rgba(220, 238, 228, .13); border-radius: 14px; background: linear-gradient(155deg, #152c28 0, #0b1d1a 100%); box-shadow: 0 22px 55px rgba(0, 0, 0, .25); }
.spectral-card-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 6px 5px; }
.spectral-card-header strong { display: block; color: var(--ink); font-size: 17px; }
.spectral-card-header span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.spectral-chart { display: block; width: 100%; height: auto; min-height: 300px; }
.spectral-zone { opacity: .035; }
.spectral-grid-line { stroke: rgba(207, 229, 218, .12); stroke-width: 1; }
.spectral-difference { fill: #e4cc76; opacity: .09; }
.spectral-range { opacity: .1; }
.spectral-line { fill: none; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.spectral-target { stroke: #10231f; stroke-width: 1.5; }
.spectral-region-label { fill: #edf5f0; font-size: 18px; font-weight: 850; }
.spectral-region-subtitle { fill: #7E93AE; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.spectral-range-label { fill: #7E93AE; font-size: 11px; }
.spectral-axis-cue { fill: #5C7191; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.spectral-axis-break { fill: none; stroke: #5C7191; stroke-width: 2; stroke-linecap: round; opacity: .7; }
.spectral-leader { fill: none; stroke-width: 1.5; opacity: .75; }
.spectral-direct-label { font-size: 14px; font-weight: 900; }
.spectral-note { margin: 0 6px 2px; color: #7E93AE; font-size: 11px; }

.spectral-insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 24px; }
.spectral-insights article { min-height: 82px; padding: 13px 14px; border: 1px solid var(--line); border-top: 3px solid var(--insight-tone); border-radius: 9px; background: rgba(255, 255, 255, .025); }
.spectral-insights span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.spectral-insights strong { display: block; margin-top: 6px; font-size: 15px; line-height: 1.3; }

.sample-context { padding: 17px 18px; border: 1px solid var(--line); border-radius: 11px; background: rgba(7, 19, 17, .45); }
.sample-context > header { display: flex; align-items: start; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
.sample-context > header span { display: block; color: var(--lime); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.sample-context > header strong { display: block; margin-top: 4px; font-size: 16px; }
.sample-context > header p { max-width: 420px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.sample-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sample-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .025); }
.sample-card img { display: block; width: 92px; height: 92px; object-fit: cover; image-rendering: pixelated; }
.sample-card span { display: block; color: var(--lime); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.sample-card strong { display: block; margin-top: 4px; font-size: 14px; }
.sample-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }

.leaflet-tile-pane { filter: saturate(.52) brightness(.76) contrast(1.12); }
.leaflet-control-attribution { opacity: .55; font-size: 9px; }

.map-heading {
  position: absolute;
  z-index: 500;
  top: 20px;
  left: 22px;
  max-width: min(560px, 65%);
  padding: 10px 14px;
  border: 1px solid rgba(220, 238, 228, .15);
  border-radius: 8px;
  background: rgba(8, 22, 20, .84);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
  backdrop-filter: blur(9px);
}

.map-heading span { display: block; color: var(--lime); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.map-heading strong { display: block; margin-top: 3px; font-size: 17px; }

.map-legend {
  position: absolute;
  z-index: 500;
  bottom: 32px;
  left: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(220, 238, 228, .13);
  border-radius: 7px;
  background: rgba(8, 22, 20, .86);
  font-size: 11px;
  color: #d4dfda;
}

.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 11px; height: 11px; border: 2px solid currentColor; border-radius: 3px; background: currentColor; opacity: .9; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
/* COA-509: the background is a true-colour satellite photo, not a flat colour —
   show a small water/shore/cloud strip so the swatch matches what is on the map. */
.legend-swatch--imagery { border-color: rgba(212,223,218,.55); background: linear-gradient(135deg, #0f1712 0 38%, #3b4a33 38% 66%, #e9ece6 66%); opacity: 1; }
.ops-agent-briefing { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--amber, #f0b45f); background: rgba(240,180,95,.08); border-radius: 6px; }
.ops-agent-briefing p { margin: 6px 0 0; }
.legend-swatch--cloud { border-color: rgba(212,223,218,.55); background: #eef1ec; opacity: 1; }

.map-source {
  position: absolute;
  z-index: 500;
  right: 72px;
  bottom: 8px;
  color: rgba(225, 235, 230, .58);
  font-size: 9px;
  letter-spacing: .04em;
}

.story-panel {
  overflow-y: auto;
  padding: 28px 28px 22px;
  background: linear-gradient(180deg, var(--panel) 0, #050A12 100%);
  border-left: 1px solid var(--line);
}

.panel-kicker { color: var(--lime); font-size: 10px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.story-panel h1 { margin: 8px 0 10px; font-size: 30px; line-height: 1.03; letter-spacing: -.04em; }
.lede { margin: 0 0 20px; color: #c6d2cc; font-size: 14px; line-height: 1.55; }
.boundary { display: flex; gap: 9px; margin: 16px 0; padding: 11px 12px; border-left: 3px solid var(--amber); background: rgba(240, 180, 95, .08); color: #e4d7c4; font-size: 12px; line-height: 1.45; }
.data-warning { display: grid; gap: 3px; margin: 14px 0; padding: 11px 12px; border: 1px solid rgba(240, 180, 95, .42); border-radius: 8px; background: rgba(240, 180, 95, .09); color: #eadbc5; font-size: 12px; line-height: 1.45; }
.data-warning strong { color: #ffd99c; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.treatment-list { display: grid; gap: 7px; margin: 12px 0 16px; }
.treatment-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .025); }
.treatment-row span, .treatment-row small { color: var(--muted); font-size: 11px; }
.treatment-row small { grid-column: 1 / -1; }

.app-shell.limited-release-mode { grid-template-rows: 72px minmax(0, 1fr); }
.app-shell.limited-release-mode .beat-nav { display: none; }
.workspace.limited-release-mode { grid-template-columns: minmax(0, 1fr); }
.release-status-panel { display: grid; place-items: center; padding: clamp(28px, 6vw, 80px); background: radial-gradient(circle at 75% 20%, rgba(102, 183, 220, .1), transparent 34%), #050A12; }
.release-status-panel[hidden] { display: none; }
.release-status-copy { width: min(820px, 100%); padding: clamp(24px, 5vw, 50px); border: 1px solid rgba(88, 220, 255, .24); border-radius: 16px; background: linear-gradient(145deg, rgba(20, 55, 49, .92), rgba(10, 29, 26, .92)); box-shadow: 0 24px 70px rgba(0, 0, 0, .25); }
.release-status-copy h1 { max-width: 650px; margin: 9px 0 12px; font-size: clamp(28px, 4vw, 46px); line-height: 1.03; letter-spacing: -.04em; }
.release-status-copy > p:not(.panel-kicker) { max-width: 690px; color: #c6d2cc; line-height: 1.6; }
.release-status-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 28px 0 22px; }
.release-status-facts div { padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .025); }
.release-status-facts dt { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.release-status-facts dd { margin: 7px 0 0; color: var(--ink); font-size: 15px; font-weight: 800; line-height: 1.4; }
.release-status-guidance { margin-bottom: 0; padding: 13px 14px; border-left: 3px solid var(--amber); background: rgba(240, 180, 95, .08); color: #e4d7c4; }

.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 18px 0; }
.metric { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .025); }
.metric span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.acquisition-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 7px; margin: 15px 0; }
.acquisition-card { display: grid; gap: 4px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .025); }
.acquisition-card span, .acquisition-card small { color: var(--muted); font-size: 10px; }
.acquisition-card strong { overflow: hidden; font-size: 11px; line-height: 1.3; text-overflow: ellipsis; }
.metric strong { display: block; margin-top: 4px; font-size: 21px; }

.control-card { margin: 18px 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft); }
.control-row { display: flex; align-items: center; gap: 10px; }
.primary-button, .secondary-button, .toggle-button {
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
}
.primary-button { padding: 10px 14px; background: var(--lime); color: #050A12; }
.secondary-button { padding: 9px 12px; border-color: var(--line); background: transparent; color: var(--ink); }
.primary-button:hover { background: var(--lime-bright); }
.control-date { margin-left: auto; font-size: 12px; color: #d6e0dc; }
.range { width: 100%; margin: 13px 0 2px; accent-color: var(--lime); }

.rank-list, .candidate-list, .site-list { display: grid; gap: 7px; margin: 15px 0; }
.rank-row, .candidate-row, .site-row {
  display: grid;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .022);
  font-size: 12px;
}
.rank-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
.rank-number { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--blue); color: #0b1a19; font-weight: 900; }
.rank-row em { color: var(--muted); font-style: normal; }

.candidate-row { grid-template-columns: 28px minmax(0, 1fr) auto; cursor: pointer; text-align: left; color: var(--ink); }
.candidate-row.active { border-color: var(--lime); background: rgba(88, 220, 255, .08); }
.candidate-row .rank-number { background: var(--amber); }
.candidate-row small, .site-row small { display: block; margin-top: 2px; color: var(--muted); }

.toggle-group { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.toggle-button { padding: 9px; border-color: var(--line); background: transparent; color: var(--muted); }
.toggle-button.active { border-color: var(--lime); background: rgba(88, 220, 255, .1); color: var(--ink); }

.site-row { grid-template-columns: 12px minmax(0, 1fr); padding: 11px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 15%, transparent); }
.request-list { margin: 15px 0 18px; padding: 0; list-style: none; }
.request-list li { position: relative; padding: 7px 0 7px 23px; color: #ced8d3; font-size: 13px; border-bottom: 1px solid rgba(214, 233, 223, .08); }
.request-list li::before { position: absolute; left: 1px; color: var(--lime); content: "→"; }

.takeaway-card { margin: 15px 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .025); }
.takeaway-card.impact { border-color: rgba(88, 220, 255, .3); background: rgba(88, 220, 255, .065); }
.takeaway-card > span { display: block; color: var(--lime); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.takeaway-card strong { display: block; margin-top: 6px; font-size: 14px; line-height: 1.35; }
.takeaway-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

details.evidence { margin-top: 18px; border-top: 1px solid var(--line); }
details.evidence summary { padding: 14px 0; cursor: pointer; color: #c7d3cd; font-size: 12px; font-weight: 800; }
.evidence-body { padding: 0 0 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.evidence-body ul { margin: 0; padding-left: 18px; }
.evidence-body li { margin: 5px 0; }
.method-row { display: grid; grid-template-columns: 1fr 45px; gap: 8px; margin-top: 5px; }
.method-bar { grid-column: 1 / -1; height: 4px; background: rgba(255,255,255,.08); border-radius: 4px; }
.method-bar span { display: block; height: 100%; background: var(--lime); border-radius: inherit; }

.number-marker, .site-marker {
  display: grid;
  place-items: center;
  border: 2px solid #ecf5ef;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0,0,0,.48);
  color: #050A12;
  font-weight: 900;
}
.number-marker { width: 25px; height: 25px; background: var(--blue); font-size: 11px; }
.number-marker.amber { background: var(--amber); }
.number-marker.green { background: var(--green); }
.site-marker { width: 18px; height: 18px; border-width: 3px; }

.leaflet-tooltip.map-label { border: 0; border-radius: 4px; background: rgba(8, 22, 20, .92); color: #edf5f1; box-shadow: 0 4px 12px rgba(0,0,0,.28); font-size: 11px; }
.leaflet-tooltip.map-label::before { display: none; }

@media (max-width: 1100px) {
  .landing-hero { grid-template-columns: 1fr; min-height: auto; padding-top: 62px; }
  .landing-copy { max-width: 760px; }
  .landing-visual { min-height: 360px; }
  .story-panel { padding: 22px 22px 18px; }
  .story-panel h1 { font-size: 26px; }
  .beat-tab { padding-inline: 8px; }
  .hyperspectral-stage { padding: 22px; }
  .hyperspectral-header { align-items: start; flex-direction: column; gap: 7px; }
  .spectral-chart { min-height: 250px; }
  .sample-context > header { display: block; }
  .sample-context > header p { margin-top: 7px; }
  .tenant-switcher { min-width: 130px; max-width: 180px; }
  .tenant-switcher-label, .tenant-switcher { display: block; }
  .app-layout { grid-template-columns: minmax(0, 1fr); }
  .site-rail { display: none; }
}

@media (max-width: 760px) {
  .record-badge, .user-identity { display: none; }
  .app-header { gap: 8px; padding-inline: 10px; }
  .tenant-switcher-label { margin-left: auto; }
  .tenant-switcher { min-width: 110px; max-width: 150px; }
}

@media (max-width: 650px) {
  .landing-header { min-height: 74px; padding-inline: 20px; }
  .landing-header-note { display: none; }
  .landing-hero { gap: 44px; padding: 48px 20px 40px; }
  .landing-copy h1 { font-size: clamp(38px, 12vw, 56px); }
  .landing-lede { margin-top: 22px; font-size: 16px; }
  .landing-visual { min-height: 310px; border-radius: 16px; }
  .visual-card-main { top: 18px; left: 18px; }
  .visual-card-signal { right: 15px; bottom: 16px; }
  .landing-proof { grid-template-columns: 1fr; padding: 0 20px 36px; }
  .landing-proof article, .landing-proof article:first-child { padding: 16px 0; }
  .release-status-facts { grid-template-columns: 1fr; }
  .app-header .brand-copy .eyebrow { display: none; }
  .app-header .brand-copy strong { font-size: 13px; }
  .workspace-switch button { padding-inline: 7px; font-size: 11px; }
}

@media (max-height: 760px) {
  .app-shell { grid-template-rows: 54px minmax(0, 1fr); }
  .app-header { padding-inline: 20px; }
  .story-panel { padding-top: 20px; }
  .story-panel h1 { font-size: 26px; }
  .lede { margin-bottom: 12px; }
  .metric-grid { margin: 12px 0; }
  .rank-row { padding-block: 6px; }
  .hyperspectral-stage { padding-top: 20px; }
  .hyperspectral-header h2 { font-size: 28px; }
  .spectral-card { padding-top: 14px; }
  .spectral-chart { min-height: 230px; }
}

/* Release-owned operations Intelligence. The map stays persistently visible
   across every Intelligence tab (not a separate "Map" tab) — #intelligence-root
   is a slim top bar (site toolbar + tab nav) spanning both columns; the real
   shared map (left) and #panel (right, per-tab content) occupy the row below,
   the same shape the default (non-intelligence) workspace grid already uses.
   Used only once validation passes — see .limited-release-mode for the
   "Intelligence unavailable" fallback, which never gets this class. */
.workspace.intelligence-mode {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 8px var(--panel-width, 410px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
.workspace.intelligence-mode #intelligence-root {
  grid-column: 1 / -1;
  grid-row: 1;
  overflow: visible;
}
.workspace.intelligence-mode .map-stage { grid-row: 2; grid-column: 1; }
.workspace.intelligence-mode #panel { grid-row: 2; grid-column: 3; overflow-y: auto; }
@media (max-width: 1050px) {
  .workspace.intelligence-mode { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 2fr) minmax(220px, 1fr); }
  .workspace.intelligence-mode .map-stage { grid-row: 2; grid-column: 1; }
  .workspace.intelligence-mode #panel { grid-row: 3; grid-column: 1; }
  .workspace.intelligence-mode .panel-resize-handle { display: none; }
}

/* Draggable divider between the map and the details panel, shared by both
   workspaces (panel-resize.js). Drag to any width; the button collapses the
   panel for a full-width map. Width is per-viewer, remembered in localStorage. */
.panel-resize-handle {
  position: relative;
  grid-column: 2;
  cursor: col-resize;
  touch-action: none;
  background: var(--line);
}
.workspace.intelligence-mode .panel-resize-handle { grid-row: 2; }
.workspace.limited-release-mode .panel-resize-handle, .panel-resize-handle[hidden] { display: none; }
.panel-resize-handle:hover, .panel-resize-handle.dragging, .panel-resize-handle:focus-visible { background: var(--lime); outline: none; }
.panel-resize-handle::before { content: ''; position: absolute; inset: 0 -5px; }
body.panel-resizing { cursor: col-resize; user-select: none; }
body.panel-resizing #map { pointer-events: none; }
.panel-resize-toggle {
  position: absolute;
  z-index: 600;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 44px;
  padding: 0;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  background: var(--panel-soft);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
}
.workspace.intelligence-mode .panel-resize-toggle { padding: 0; }
.panel-resize-toggle:hover { border-color: var(--lime); color: var(--lime); }

/* Floating map-controls fieldset (layer select, overlay checkboxes, jump-to-cove
   list) — persistent chrome over the map itself, independent of which tab is
   active, same floating-corner-panel pattern the old Map Console used. */
.intel-map-controls {
  position: absolute;
  z-index: 500;
  top: 12px;
  left: 12px;
  /* COA-495: on short viewports this fieldset (layer select + 6 overlay
     checkboxes + jump-to-cove list) could grow taller than the map itself,
     hiding the map underneath with no way to scroll to the rest of the
     controls. Bounded to the map-stage's own height, scrolls internally. */
  max-height: calc(100% - 24px);
  overflow-y: auto;
  max-width: 240px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 10px);
  background: rgba(5, 10, 18, .82);
  backdrop-filter: blur(10px);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.intel-map-controls label:not(.intel-toggle) { display: grid; gap: 4px; font-size: 11px; color: var(--muted); }
.workspace.intelligence-mode .intel-map-controls-toggle { justify-self: start; padding: 3px 8px; font-size: 11px; color: var(--muted); background: none; }
/* Collapsed: keep only the toggle and the layer select over the map. */
.intel-map-controls.collapsed > :not(.intel-map-controls-toggle):not(label):not(legend) { display: none; }
.intel-layer-gradient-labels span:nth-child(2):not(:last-child) { text-align: center; }
.intel-layer-gradient { display: grid; gap: 4px; }
.intel-layer-gradient-bar { height: 8px; border-radius: 4px; }
.intel-layer-gradient-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.intel-layer-neutral-swatch { color: #30443c; }
.intel-map-controls select { font: inherit; background: var(--panel-soft); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 8px; }
.intel-map-controls summary { cursor: pointer; font-size: 11px; color: var(--muted); }
.intel-map-controls details button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--ink); padding: 3px 0; font-size: 12px; cursor: pointer; }
.intel-map-controls details button:hover { color: var(--lime); }

#intelligence-root { padding: 14px clamp(14px, 2.5vw, 36px) 8px; min-width: 0; color: var(--ink); }
.workspace.intelligence-mode #intelligence-root, .workspace.intelligence-mode #panel { color: var(--ink); }
.workspace.intelligence-mode h1 { font-size: 25px; margin: 12px 0; }
.workspace.intelligence-mode h2 { font-size: 17px; margin: 0 0 12px; }
.workspace.intelligence-mode #panel p { line-height: 1.6; }
.workspace.intelligence-mode button, .workspace.intelligence-mode select, .workspace.intelligence-mode input[type=text] { font: inherit; background: var(--panel-soft); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 7px; padding: 9px 12px; }
.workspace.intelligence-mode button { cursor: pointer; }
.workspace.intelligence-mode button:hover, .workspace.intelligence-mode button[aria-current=page] { border-color: var(--lime); background: var(--panel-raised); }
.workspace.intelligence-mode button:disabled { cursor: not-allowed; opacity: .5; }
.workspace.intelligence-mode :focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.workspace.intelligence-mode label { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.intel-toolbar, .intel-controls, .intel-nav { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin: 0 0 12px; }
.intel-toolbar { justify-content:space-between; }
.intel-toolbar p, .intel-note { font-size:12px; color:var(--muted); }
.intel-nav { border-bottom:1px solid var(--line); padding-bottom:12px; }
/* COA-495: at e.g. 1280×585 the toolbar and a wrapping tab row used most of
   the height, pushing the Overview cards below the fold. Compact both into
   single rows; the tabs scroll sideways instead of wrapping. */
@media (max-height: 760px) {
  .intel-toolbar, .intel-nav { margin-bottom: 6px; gap: 6px; }
  .intel-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .workspace.intelligence-mode .intel-nav button, .workspace.intelligence-mode .intel-toolbar select { padding: 5px 10px; font-size: 13px; white-space: nowrap; flex: none; }
  .intel-toolbar label { font-size: 13px; }
  .intel-content { gap: 12px; padding-top: 10px; }
  .workspace.intelligence-mode #panel { padding-top: 0; }
  .workspace.intelligence-mode #panel .intel-content > h1 { margin: 0; font-size: 22px; }
}
.intel-content { display:grid; gap:18px; padding: 18px clamp(14px, 2vw, 28px) 40px; }
.intel-content > h1, .intel-content > p { margin:0; }
.intel-card { background:var(--panel-soft); border:1px solid var(--line-strong); border-radius:10px; padding:18px; min-width:0; }
.infra-card { margin-bottom: 12px; }
.infra-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.infra-card-top strong { flex: 1; font-size: 14px; }
.infra-tier { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.infra-exposure { font-size: 11px; font-weight: 700; color: var(--danger); }
.infra-card p { margin: 4px 0 0; font-size: 13px; }
.infra-show-map { background: none !important; border: none !important; padding: 4px 0 0 !important; color: var(--lime) !important; font-size: 12px !important; font-weight: 600; text-align: left; }
.infra-show-map:hover { text-decoration: underline; background: none !important; }

/* Priority queue, crew route and EDRR — colored score-badge rows ported from
   coactive_unified_view's PrioritiesTab.vue in place of plain tables. */
.intel-priority-list, .intel-crew-list, .intel-edrr-list { display: grid; gap: 8px; margin-top: 10px; }
.intel-priority-row, .intel-crew-stop, .intel-edrr-row { display: flex; align-items: flex-start; gap: 10px; background: var(--panel-soft); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; }
.intel-priority-score, .intel-edrr-score {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #0b1120;
}
.intel-crew-order {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #0b1120;
}
.intel-priority-body, .intel-crew-stop-body, .intel-edrr-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.intel-priority-body button, .intel-crew-stop-body button, .intel-edrr-body button { align-self: flex-start; padding: 2px 0 !important; background: none !important; border: none !important; color: var(--ink) !important; font-weight: 600 !important; font-size: 13px !important; }
.intel-priority-body button:hover, .intel-crew-stop-body button:hover, .intel-edrr-body button:hover { color: var(--lime) !important; text-decoration: underline; }
.intel-priority-meta, .intel-crew-meta, .intel-crew-action, .intel-edrr-meta { margin: 0; font-size: 12px; color: var(--ink); }
.intel-priority-meta--muted, .intel-crew-action { color: var(--muted); }
.intel-dumbbell-legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.intel-legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.intel-legend-dot--now { background: #5eb1ff; }
.intel-legend-dot--later { background: #f87171; margin-left: 10px; }
.intel-dumbbell-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.intel-dumbbell { flex-shrink: 0; }
.intel-dumbbell-values { font-size: 11px; color: var(--muted); white-space: nowrap; }
.intel-warn-list { display: grid; gap: 6px; margin-top: 8px; }
.intel-warn-row { display: flex; align-items: flex-start; gap: 10px; background: var(--panel-soft); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px; }
.intel-warn-dot { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; }
.intel-warn-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.intel-warn-body button { align-self: flex-start; padding: 2px 0 !important; background: none !important; border: none !important; color: var(--ink) !important; font-weight: 600 !important; font-size: 13px !important; }
.intel-warn-body button:hover { color: var(--lime) !important; text-decoration: underline; }
.intel-warn-body p { margin: 0; font-size: 12px; color: var(--ink); }
.intel-boundary { border-left:3px solid var(--lime); padding:10px 14px; background:rgba(88,220,255,.06); font-size:13px; }
.intel-boundary p { margin:7px 0 0; }
.intel-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.intel-chart { display:block; width:100%; }
.intel-chart text { fill:var(--muted); font:11px system-ui,sans-serif; }
.intel-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.intel-metrics > div { display:grid; gap:9px; border:1px solid var(--line-strong); border-radius:9px; padding:16px; }
.intel-metrics span { font-size:12px; color:var(--muted); }
.intel-metrics strong { font-size:22px; }
.intel-table-wrap { max-width:100%; overflow:auto; }
.workspace.intelligence-mode table { border-collapse:collapse; width:100%; font-size:13px; }
.workspace.intelligence-mode th { text-align:left; color:var(--muted); font-size:11px; }
.workspace.intelligence-mode td, .workspace.intelligence-mode th { padding:10px 9px; border-bottom:1px solid var(--line); vertical-align:top; }
.workspace.intelligence-mode td button { text-align:left; padding:5px 7px; }
.workspace.intelligence-mode details { margin-top:10px; }
.workspace.intelligence-mode summary { cursor:pointer; padding:6px 0; }
.intel-weight-grid { display:grid; grid-template-columns:repeat(1,minmax(0,1fr)); gap:14px; margin:14px 0; }
.intel-weight-grid label { display:block; font-size:12px; }
.workspace.intelligence-mode output { color:var(--lime); padding:0 5px; }
.workspace.intelligence-mode input[type=range] { width:100%; accent-color:var(--lime); margin:10px 0; }
.workspace.intelligence-mode input[type=checkbox] { accent-color:var(--lime); }
.intel-toggle { font-size:12px; }
.intel-export-status { min-height:1.5em; font-size:13px; padding: 0 clamp(14px, 2vw, 28px); }
@media(max-width:700px) { .intel-grid,.intel-metrics {grid-template-columns:repeat(2,minmax(0,1fr));} .workspace-switch {flex-wrap:wrap;} .workspace.intelligence-mode select {max-width:100%;} }

/* Persistent floating chat — ported from coactive_unified_view's shared
   src/copilot/CopilotPanel.vue (draggable launcher + slide-over panel),
   rebuilt in vanilla JS/CSS. */
.chat-launcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  background: var(--lime);
  color: #050A12;
  cursor: grab;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.chat-launcher-ping {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid var(--lime);
  opacity: .5;
  animation: chat-ping 2s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes chat-ping { 75%, 100% { transform: scale(1.15); opacity: 0; } }
.chat-open .chat-launcher { display: none; }
.chat-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(400px, 100vw);
  z-index: 500;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(0, 0, 0, .35);
  transform: translateX(100%);
  transition: transform .25s ease;
}
.chat-open .chat-panel { transform: translateX(0); }
.chat-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: rgba(88, 220, 255, .08); }
.chat-header-text { flex: 1; min-width: 0; }
.chat-title { margin: 0; font-size: 13px; font-weight: 800; color: var(--ink); }
.chat-subtitle { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.chat-back, .chat-close { border: none; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.chat-back:hover, .chat-close:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-empty { text-align: center; padding-top: 8px; }
.chat-empty-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.chat-empty-desc { margin: 4px 24px 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.chat-prompts { display: grid; gap: 8px; margin-top: 16px; text-align: left; }
.chat-prompt { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); color: var(--ink); padding: 10px 12px; cursor: pointer; font: inherit; text-align: left; }
.chat-prompt:hover { border-color: var(--lime); }
.chat-prompt-text { flex: 1; min-width: 0; }
.chat-prompt-label { margin: 0; font-size: 12px; font-weight: 600; color: var(--ink); }
.chat-prompt-detail { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.chat-prompt-chevron { flex-shrink: 0; color: var(--muted); font-size: 14px; line-height: 1; }
.chat-msg { display: flex; }
.chat-msg--user { justify-content: flex-end; }
.chat-bubble-user { max-width: 85%; padding: 8px 12px; border-radius: 12px 12px 4px 12px; background: var(--lime); color: #050A12; font-size: 13px; }
.chat-bubble-agent { max-width: 100%; padding: 10px 12px; border-radius: 4px 12px 12px 12px; background: var(--panel-soft); border: 1px solid var(--line); }
.chat-answer { margin: 0; white-space: pre-wrap; font-size: 13px; color: var(--ink); line-height: 1.5; }
.chat-boundary { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); line-height: 1.4; }
.chat-followups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chat-followup { border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); color: var(--ink); padding: 5px 10px; font: inherit; font-size: 11px; cursor: pointer; }
.chat-followup:hover { border-color: var(--lime); color: var(--lime); }
.chat-steps { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.chat-step { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); font-family: ui-monospace, "SF Mono", monospace; animation: chat-step-in .18s ease; }
.chat-step-icon { color: var(--lime); }
@keyframes chat-step-in { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: translateY(0); } }
.chat-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 4px 0 8px; }
.chat-stat { display: grid; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-raised); }
.chat-stat span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.chat-stat strong { font-size: 16px; }
.chat-crew-list { display: grid; gap: 6px; margin: 4px 0 8px; }
.chat-crew-stop { display: flex; align-items: flex-start; gap: 8px; }
.chat-crew-order { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #0d1c1a; }
.chat-crew-stop-body p { margin: 0; }
.chat-crew-name { font-size: 12px; font-weight: 600; color: var(--ink); }
.chat-crew-action { font-size: 11px; color: var(--muted); }
.chat-warn-group-label { margin: 10px 0 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink); }
.chat-warn-group-label:first-child { margin-top: 0; }
.chat-callout-list { display: grid; gap: 6px; margin: 4px 0 8px; }
.chat-callout { padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid #5eb1ff; border-radius: 6px; background: var(--panel-raised); }
.chat-callout-title { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--ink); }
.chat-callout-text { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.4; }
.chat-input-row { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input { flex: 1; resize: none; max-height: 6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); color: var(--ink); font: inherit; font-size: 13px; padding: 8px 10px; }
.chat-send { border: none; border-radius: 8px; background: var(--lime); color: #050A12; font: inherit; font-weight: 700; font-size: 12px; padding: 8px 14px; cursor: pointer; }
.chat-send:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 700px) { .chat-panel { width: 100vw; } }

/* ─── Compact workspace layout (2026-10-10) ────────────────────────────────
   The map was ~44% of a 1280px window: a 306px rail for one site, a fixed
   410px panel, and ~175px of stacked header rows. Lean rail that collapses to
   initials, view switch in the header, one-line step tabs, smaller panel type.
   Layered on top of the rules above; tablet/phone breakpoints still win where
   they hide the rail. */
.application-main { grid-template-rows: auto minmax(0, 1fr); }
/* Pin the workspace to the flexible row: Intelligence hides the step tabs, and
   without this the workspace slid into the content-sized row, so the map got
   0px of height whenever the panel was hidden. */
.application-main > .workspace { grid-row: 2; }
/* Intelligence's own grid rule comes later; restate the collapsed width for it. */
.workspace.intelligence-mode.panel-collapsed { grid-template-columns: minmax(0, 1fr) 8px 0; }
.app-header .workspace-switch { margin-left: 18px; }
.app-header .workspace-switch button { padding: 5px 10px; }

@media (min-width: 1101px) {
  .app-layout { grid-template-columns: 200px minmax(0, 1fr); transition: grid-template-columns .16s ease; }
  .app-layout.site-rail-collapsed { grid-template-columns: 52px minmax(0, 1fr); }
}
.site-rail { padding: 12px 6px; }
.site-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0 4px; }
.site-rail h2 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.site-rail > p { margin: 3px 4px 10px; font-size: 11px; }
.site-rail-toggle { flex: none; width: 24px; height: 24px; padding: 0; border: 1px solid var(--line-strong); border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1; }
.site-rail-toggle:hover, .site-rail-toggle:focus-visible { border-color: var(--lime); color: var(--lime); outline: none; }
.site-button { padding: 7px 8px; }
.site-button strong { font-size: 12px; }
.site-button small { font-size: 10px; }
.site-initials { display: none; }
.site-rail-collapsed .site-rail { padding-inline: 6px; overflow-x: hidden; }
.site-rail-collapsed .site-rail-head { justify-content: center; margin: 0; }
.site-rail-collapsed .site-rail h2, .site-rail-collapsed .site-rail > p,
.site-rail-collapsed .site-button strong, .site-rail-collapsed .site-button small { display: none; }
.site-rail-collapsed .site-list { margin-top: 10px; }
.site-rail-collapsed .site-button { justify-items: center; padding: 6px 0; }
.site-rail-collapsed .site-initials { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--panel-raised); color: var(--ink); font-size: 12px; font-weight: 800; }
.site-rail-collapsed .site-button.active .site-initials { box-shadow: inset 0 0 0 2px var(--lime); color: var(--lime); }

/* One-line step tabs: "01 Monitor" on a single row that scrolls, not wraps. */
.beat-nav { display: flex; gap: 2px; overflow-x: auto; padding: 0 10px; scrollbar-width: thin; }
.beat-tab { flex: none; display: flex; align-items: baseline; gap: 6px; padding: 9px 12px 8px; white-space: nowrap; }
.beat-tab::after { right: 10px; left: 10px; }
.beat-tab span { display: inline; font-size: 10px; }
.beat-tab strong { display: inline; margin-top: 0; font-size: 13px; }

/* Map overlays: a small chip instead of a large title card. */
.map-heading { top: 12px; left: 12px; padding: 7px 11px; max-width: min(520px, calc(100% - 90px)); }
.map-heading span { font-size: 9px; }
.map-heading strong { font-size: 14px; margin-top: 2px; }

/* Panel density: smaller type and flatter cards. */
.story-panel { padding: 18px 20px 18px; }
.story-panel h1 { font-size: 22px; letter-spacing: -.02em; margin: 6px 0 8px; }
.lede { font-size: 13px; margin-bottom: 14px; }
.metric-grid { margin: 12px 0; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric { padding: 9px 4px; border: 0; border-radius: 0; background: none; }
.metric + .metric { border-left: 1px solid var(--line); padding-left: 12px; }
.metric strong { font-size: 18px; }
.control-card { margin: 12px 0; padding: 12px; }
.boundary { margin: 12px 0; padding: 9px 11px; }
