:root {
  --bg: #0f0f11;
  --sidebar-bg: #09090a;
  --surface: #151517;
  --surface-raised: #1a1a1d;
  --surface-soft: #202024;
  --ink: #fafafa;
  --muted: #aaa9a4;
  --muted-2: #74736f;
  --line: rgba(245, 217, 141, .13);
  --line-strong: rgba(245, 217, 141, .32);
  --gold: #e8bf69;
  --gold-light: #f5d98d;
  --gold-deep: #aa7428;
  --gold-soft: rgba(232, 191, 105, .11);
  --green: #8bc39a;
  --green-soft: rgba(139, 195, 154, .12);
  --red: #de8679;
  --red-soft: rgba(222, 134, 121, .11);
  --amber: #e3b05c;
  --amber-soft: rgba(227, 176, 92, .12);
  --blue: #8aa7c8;
  --blue-soft: rgba(138, 167, 200, .12);
  --shadow: 0 28px 80px rgba(0, 0, 0, .46);
  --sidebar: 260px;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% -12%, rgba(232, 191, 105, .095), transparent 31%),
    linear-gradient(145deg, #111113, #0d0d0f 62%);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}
::selection { color: #171108; background: var(--gold-light); }

.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 10;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar);
  min-height: 100vh;
  padding: 25px 18px 20px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 8, 9, .99), rgba(13, 13, 15, .97));
}
.brand-lockup { display: grid; gap: 10px; padding: 0 10px 29px; }
.brand-logo { display: block; width: 186px; max-width: 100%; height: auto; object-fit: contain; object-position: left center; }
.brand-product { color: var(--ink); font-size: 10px; font-weight: 720; letter-spacing: .11em; text-transform: uppercase; }
.brand-product span { color: var(--muted-2); font-weight: 560; }
.sidebar-section-label, .section-kicker, .eyebrow {
  color: var(--gold);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.sidebar-section-label { padding: 0 10px 9px; color: var(--muted-2); }
.primary-nav { display: grid; gap: 4px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #97968f;
  background: transparent;
  text-align: left;
  font-size: 12px;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.nav-item:hover { color: var(--ink); background: rgba(255, 255, 255, .035); }
.nav-item.is-active {
  border-color: rgba(232, 191, 105, .25);
  color: var(--ink);
  background: linear-gradient(90deg, rgba(232, 191, 105, .15), rgba(232, 191, 105, .025));
  box-shadow: inset 2px 0 0 var(--gold);
  font-weight: 720;
}
.nav-item:active { transform: translateY(1px); }
.nav-icon { display: inline-grid; place-items: center; width: 22px; color: var(--gold); font-size: 9px; letter-spacing: .08em; }
.operator-nav { margin-top: 4px; border-top-color: rgba(245, 217, 141, .08); }
.sidebar-divider { height: 1px; margin: 22px 10px 19px; background: var(--line); }
.batch-rail { padding: 0 10px; }
.batch-rail-title { margin-bottom: 15px; font-size: 12px; font-weight: 720; line-height: 1.45; }
.field-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.date-input, .select-control, .search-control input, .interaction-form input, .interaction-form select, .interaction-form textarea, .contact-form input, .context-field input, .context-field select, .context-field textarea, .drawer-note-area, .draft-area {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, .035);
}
.date-input { padding: 9px; color-scheme: dark; font-size: 11px; }
.batch-rail-meta { display: flex; gap: 6px; margin-top: 9px; color: var(--muted-2); font-size: 9px; }
.integration-list { display: grid; gap: 11px; padding: 0 10px; }
.integration-row { display: grid; grid-template-columns: 7px 1fr auto; align-items: center; gap: 8px; color: var(--ink); font-size: 10px; }
.integration-row small { color: var(--muted-2); font-size: 8px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.status-dot.is-ready { background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft), 0 0 12px rgba(232, 191, 105, .3); }
.status-dot.is-locked { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.sidebar-footer { margin-top: auto; padding: 24px 10px 0; }
.footer-caption { color: var(--gold); font-size: 9px; font-weight: 720; }
.footer-copy { margin-top: 7px; color: var(--muted-2); font-size: 9px; line-height: 1.55; }

.main-content { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky;
  z-index: 8;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 13px 40px;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 15, 17, .86);
  backdrop-filter: blur(18px);
}
.topbar-context { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 10px; }
.topbar-brand { color: var(--gold); font-weight: 800; letter-spacing: .12em; }
.context-slash { color: #4b4a47; }
.live-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.topbar-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  margin: 0 16px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, .03);
  font-size: 8px;
  line-height: 1.35;
}
.topbar-banner .backup-banner-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.topbar-banner.is-green { color: #d4f6df; border-color: rgba(139, 195, 154, .42); background: var(--green-soft); }
.topbar-banner.is-green .backup-banner-dot { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.topbar-banner.is-amber { color: #ffe6b8; border-color: rgba(227, 176, 92, .45); background: var(--amber-soft); }
.topbar-banner.is-amber .backup-banner-dot { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.topbar-banner.is-red { color: #ffd2cb; border-color: rgba(222, 134, 121, .45); background: var(--red-soft); }
.topbar-banner.is-red .backup-banner-dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.topbar-banner-text { color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-control { display: flex; align-items: center; min-width: 250px; height: 37px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .025); }
.search-glyph { margin-right: 7px; color: var(--gold); font-size: 16px; }
.search-control input { min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; font-size: 10px; }
.search-control input::placeholder { color: var(--muted-2); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, .025);
  font-size: 10px;
  font-weight: 740;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.button:hover { border-color: rgba(245, 217, 141, .48); background: rgba(232, 191, 105, .08); }
.button:active { transform: translateY(1px); }
.button-primary {
  border-color: transparent;
  color: #1b1408;
  background: linear-gradient(135deg, var(--gold-light), #bc842f 70%, #96611b);
  box-shadow: inset 0 1px 0 rgba(255, 247, 216, .55), 0 12px 30px rgba(151, 96, 20, .16);
}
.button-primary:hover { border-color: transparent; background: linear-gradient(135deg, #ffe9aa, #c99139 70%, #9e681e); box-shadow: 0 16px 34px rgba(151, 96, 20, .27); }
.button-quiet { color: var(--muted); }
.button-soft { border-color: var(--line); color: var(--gold-light); background: var(--gold-soft); }
.button-danger { border-color: rgba(222, 134, 121, .28); color: #f0a79c; background: var(--red-soft); }
.operator-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 9px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, .025);
  text-align: left;
}
.operator-control:hover { border-color: var(--line-strong); background: var(--gold-soft); }
.operator-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: #1d1407; background: linear-gradient(135deg, var(--gold-light), #99651e); font-size: 9px; font-weight: 850; letter-spacing: .05em; }
.operator-control strong, .operator-control small { display: block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operator-control strong { font-size: 9px; }
.operator-control small { margin-top: 2px; color: var(--muted); font-size: 8px; }

.view { display: none; padding: 42px 40px 62px; animation: view-in .28s ease both; }
.view.is-active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; max-width: 1540px; margin: 0 auto 28px; }
.page-heading h1 { margin: 8px 0 7px; font-size: clamp(34px, 4vw, 54px); font-weight: 570; letter-spacing: -.052em; line-height: .98; }
.page-heading p { max-width: 630px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.compact-heading h1 { font-size: clamp(31px, 3.5vw, 46px); }
.heading-actions { flex: none; }
.metrics-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  max-width: 1540px;
  margin: 0 auto 24px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metric { position: relative; display: grid; align-content: center; min-height: 91px; padding: 15px 17px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-value { color: var(--ink); font-size: 24px; font-weight: 590; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.metric-label { margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 720; }
.metric-note { margin-top: 4px; color: var(--muted-2); font-size: 8px; line-height: 1.35; }
.toolbar-row, .radar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 1540px; margin: 0 auto 12px; }
.toolbar-title { display: flex; align-items: center; gap: 9px; font-size: 11px; }
.toolbar-count { color: var(--muted-2); font-size: 9px; }
.toolbar-controls { display: flex; align-items: center; gap: 7px; }
.select-control { width: auto; min-width: 138px; min-height: 35px; padding: 7px 28px 7px 9px; color-scheme: dark; font-size: 9px; }

.queue-layout { display: grid; grid-template-columns: minmax(0, 1fr) 275px; gap: 14px; max-width: 1540px; margin: 0 auto; }
.work-surface, .side-surface, .map-surface {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(25, 25, 28, .94), rgba(17, 17, 19, .94));
  box-shadow: inset 0 1px 0 rgba(255, 241, 197, .025), 0 20px 55px rgba(0, 0, 0, .13);
}
.surface-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 19px 15px; border-bottom: 1px solid var(--line); }
.surface-head.compact { padding-top: 16px; padding-bottom: 13px; }
.surface-head h2 { margin: 0; font-size: 12px; font-weight: 730; }
.surface-head .section-kicker + h2 { margin-top: 5px; }
.surface-head p { max-width: 650px; margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.surface-head-note { color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.table-scroll { overflow: auto; scrollbar-color: rgba(232, 191, 105, .35) transparent; }
.data-table { width: 100%; border-collapse: collapse; min-width: 940px; }
.data-table th { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted-2); font-size: 8px; font-weight: 770; letter-spacing: .09em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid rgba(245, 217, 141, .075); vertical-align: middle; font-size: 10px; }
.data-table tbody tr { cursor: pointer; transition: background .16s ease, box-shadow .16s ease; }
.data-table tbody tr:hover { background: linear-gradient(90deg, var(--gold-soft), transparent 76%); }
.data-table tbody tr.is-selected { background: linear-gradient(90deg, rgba(232, 191, 105, .16), transparent 82%); box-shadow: inset 2px 0 0 var(--gold); }
.company-cell { min-width: 190px; }
.company-name, .company-person, .location-cell strong, .action-title, .context-quote { display: block; }
.company-name { color: var(--ink); font-size: 10px; font-weight: 760; }
.company-person { margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.company-person.missing { color: var(--amber); }
.location-cell { min-width: 90px; color: var(--muted-2); font-size: 8px; line-height: 1.4; }
.location-cell strong { color: var(--ink); font-size: 9px; }
.context-cell { min-width: 230px; max-width: 330px; }
.context-quote { color: #d3d1ca; font-size: 9px; line-height: 1.45; }
.context-angle { display: block; margin-top: 5px; color: var(--gold); font-size: 8px; }
.action-cell { min-width: 160px; }
.action-title { color: var(--ink); font-size: 9px; font-weight: 710; }
.action-meta { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; }
.channel-summary { display: flex; align-items: center; gap: 5px; min-width: 108px; }
.channel-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted-2); font-size: 7px; font-weight: 760; }
.channel-dot.is-ready { border-color: rgba(232, 191, 105, .35); color: var(--gold-light); background: var(--gold-soft); }
.channel-count { color: var(--muted); font-size: 8px; white-space: nowrap; }
.stage-chip, .tiny-chip, .gate-chip, .readiness-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--gold-light);
  background: var(--gold-soft);
  font-size: 8px;
  font-weight: 730;
  line-height: 1;
  white-space: nowrap;
}
.stage-chip.is-radar, .tiny-chip { color: var(--muted); background: rgba(255, 255, 255, .025); }
.stage-chip.is-blocked, .gate-chip.is-pending { color: #e8bd72; background: var(--amber-soft); }
.stage-chip.is-success, .gate-chip.is-approved, .readiness-chip.is-ready { color: #a7d5b3; background: var(--green-soft); border-color: rgba(139, 195, 154, .22); }
.readiness-chip.is-thin { color: var(--muted); background: rgba(255, 255, 255, .025); }
.table-action { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--gold-light); background: transparent; font-size: 8px; font-weight: 730; }
.table-action:hover { border-color: var(--gold); background: var(--gold-soft); }
.queue-guide { padding-bottom: 14px; }
.cadence-list { padding: 2px 17px 0; }
.cadence-row { display: grid; grid-template-columns: 42px 1fr; gap: 10px; padding: 11px 0; border-top: 1px solid rgba(245, 217, 141, .09); }
.cadence-row:first-child { border-top: 0; }
.cadence-day { color: var(--muted-2); font-size: 9px; font-weight: 780; }
.cadence-row strong { font-size: 9px; }
.cadence-row p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.cadence-row.is-current strong, .cadence-row.is-current .cadence-day { color: var(--gold-light); }
.cadence-row.is-gated strong { color: var(--amber); }
.guide-note { display: grid; gap: 6px; margin: 12px 17px 0; padding: 11px 12px; border-left: 2px solid var(--gold); background: var(--gold-soft); }
.guide-note strong { color: var(--gold-light); font-size: 9px; }
.guide-note span { color: var(--muted); font-size: 8px; line-height: 1.45; }
.empty-state { padding: 34px 20px; color: var(--muted); font-size: 10px; text-align: center; }
.is-hidden { display: none !important; }

.radar-summary { color: var(--muted); font-size: 10px; }
.radar-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(410px, .95fr); gap: 14px; max-width: 1540px; margin: 0 auto; }
.map-wrap { min-height: 460px; padding: 10px 18px 5px; background: radial-gradient(circle at 50% 48%, rgba(232, 191, 105, .07), transparent 37%), #111113; }
#stateMap { display: block; width: 100%; height: 460px; }
.map-state { cursor: pointer; stroke: #111113; stroke-width: .9; transition: opacity .18s ease, filter .18s ease, stroke .18s ease; }
.map-state:hover, .map-state.is-selected { filter: brightness(1.18); stroke: var(--gold-light); stroke-width: 1.5; }
.map-state.is-active { stroke: var(--gold); stroke-width: 1.45; }
.map-label { pointer-events: none; fill: #f2ead9; font-size: 9px; font-weight: 760; text-anchor: middle; }
.map-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 11px 18px 15px; color: var(--muted); font-size: 9px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 9px; height: 9px; border-radius: 3px; background: #705d38; }
.legend-swatch.is-high { background: var(--gold); }
.legend-swatch.is-low { background: #3b3428; }
.legend-swatch.is-active { border: 1px solid var(--gold-light); background: #765f32; }
.radar-list-surface { min-height: 540px; }
.radar-table td { padding-top: 10px; padding-bottom: 10px; }
.radar-table .company-cell { min-width: 155px; }
.radar-status { color: var(--muted); font-size: 8px; line-height: 1.4; }
.radar-status strong { display: block; color: var(--ink); font-size: 9px; }

.memory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 1540px; margin: 0 auto 14px; }
.breakdown-list, .handoff-list { padding: 0 18px 17px; }
.breakdown-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid rgba(245, 217, 141, .09); }
.breakdown-row:first-child { border-top: 0; }
.breakdown-label { min-width: 0; color: var(--ink); font-size: 9px; font-weight: 690; }
.breakdown-label small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; font-weight: 430; }
.breakdown-count { color: var(--muted); font-size: 9px; text-align: right; }
.breakdown-bar { height: 3px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .055); }
.breakdown-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-deep), var(--gold-light)); }
.handoff-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid rgba(245, 217, 141, .09); color: var(--ink); background: transparent; text-align: left; }
.handoff-row:first-child { border-top: 0; }
.handoff-row:hover { color: var(--gold-light); }
.handoff-row strong { display: block; font-size: 9px; }
.handoff-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.handoff-status { color: var(--gold); font-size: 8px; white-space: nowrap; }
.memory-timeline-surface { max-width: 1540px; margin: 0 auto; }
.global-timeline { padding: 0 18px 17px; }
.timeline-item { display: grid; grid-template-columns: 108px 10px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-top: 1px solid rgba(245, 217, 141, .09); }
.timeline-item:first-child { border-top: 0; }
.timeline-date { color: var(--muted); font-size: 8px; line-height: 1.4; }
.timeline-dot { width: 7px; height: 7px; margin-top: 3px; border: 1px solid var(--gold); border-radius: 50%; box-shadow: 0 0 0 4px var(--gold-soft); }
.timeline-title { color: var(--ink); font-size: 9px; font-weight: 720; }
.timeline-title span { color: var(--muted); font-weight: 430; }
.timeline-text { margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }

.drawer-backdrop, .modal-backdrop { position: fixed; z-index: 20; inset: 0; background: rgba(0, 0, 0, .68); backdrop-filter: blur(4px); }
.detail-drawer {
  position: fixed;
  z-index: 21;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(600px, 100vw);
  height: 100vh;
  border-left: 1px solid var(--line-strong);
  color: var(--ink);
  background: #111113;
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform .24s cubic-bezier(.22, 1, .36, 1);
}
.detail-drawer.is-open { transform: translateX(0); }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 18px; border-bottom: 1px solid var(--line); background: #0d0d0f; }
.drawer-header h2 { max-width: 430px; margin: 7px 0 6px; font-size: 24px; font-weight: 570; letter-spacing: -.04em; line-height: 1.05; }
.drawer-subtitle { color: var(--muted); font-size: 9px; }
.icon-button { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: rgba(255, 255, 255, .025); font-size: 20px; }
.icon-button:hover { border-color: var(--line-strong); color: var(--ink); }
.drawer-scroll { overflow-y: auto; padding: 0 24px 36px; scrollbar-color: rgba(232, 191, 105, .35) transparent; }
.drawer-section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.drawer-section:last-child { border-bottom: 0; }
.drawer-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.drawer-section h3 { margin: 0; font-size: 12px; }
.drawer-section-note { color: var(--muted); font-size: 8px; }
.drawer-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 15px; }
.meta-item dt { color: var(--muted-2); font-size: 8px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.meta-item dd { margin: 5px 0 0; color: var(--ink); font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.meta-item dd.is-muted { color: var(--muted-2); }
.trigger-box { padding: 12px; border-left: 2px solid var(--gold); background: var(--gold-soft); }
.trigger-box strong { display: block; color: var(--gold-light); font-size: 9px; }
.trigger-box p { margin: 6px 0 0; color: #dedbd3; font-size: 10px; line-height: 1.55; }
.approval-gate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 15px; border: 1px solid rgba(227, 176, 92, .24); border-radius: 10px; background: linear-gradient(100deg, var(--amber-soft), rgba(255, 255, 255, .02)); }
.approval-gate.is-approved { border-color: rgba(139, 195, 154, .25); background: linear-gradient(100deg, var(--green-soft), rgba(255, 255, 255, .02)); }
.approval-gate strong { display: block; font-size: 10px; }
.approval-gate p { margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.approval-audit { margin-top: 7px; color: var(--muted-2); font-size: 8px; }
.readiness-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 11px; }
.operational-context-section { background: linear-gradient(90deg, rgba(232, 191, 105, .045), transparent 72%); }
.context-intro { margin: -2px 0 13px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.context-quality { display: inline-flex; align-items: center; padding: 5px 7px; border-radius: 99px; font-size: 8px; font-weight: 760; white-space: nowrap; }
.context-quality.is-sharp { color: #a7d5b3; background: var(--green-soft); }
.context-quality.is-review { color: #e8bd72; background: var(--amber-soft); }
.context-quality.is-thin { color: #eda398; background: var(--red-soft); }
.context-solution { display: grid; gap: 3px; margin: 14px 0 2px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(232, 191, 105, .045); }
.context-solution-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.context-solution-head strong { display: block; margin-top: 4px; color: var(--gold-light); font-size: 11px; }
.context-solution-module { max-width: 260px; color: var(--muted); font-size: 8px; line-height: 1.4; text-align: right; }
.context-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.context-field { display: grid; gap: 5px; margin-top: 9px; }
.context-field span { color: var(--muted); font-size: 8px; font-weight: 760; letter-spacing: .04em; }
.context-field small { color: var(--muted-2); font-size: 8px; line-height: 1.35; }
.context-field input, .context-field select { min-height: 34px; padding: 8px 9px; color-scheme: dark; font-size: 9px; }
.context-field textarea { min-height: 66px; padding: 9px; resize: vertical; font-size: 9px; line-height: 1.45; }
.context-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; color: var(--muted-2); font-size: 8px; line-height: 1.4; }
.context-actions { gap: 7px; }
.channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.channel-action { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 43px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: rgba(255, 255, 255, .025); text-align: left; }
.channel-action:hover:not(:disabled) { border-color: var(--gold); background: var(--gold-soft); }
.channel-action:disabled { cursor: not-allowed; color: var(--muted-2); background: rgba(255, 255, 255, .015); opacity: .58; }
.channel-action strong { display: block; font-size: 9px; }
.channel-action small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.channel-action .action-arrow { color: var(--gold); font-size: 14px; }
.channel-action.is-gated .action-arrow { color: var(--amber); }
.draft-tabs { display: flex; gap: 5px; margin-bottom: 8px; }
.draft-tab { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: transparent; font-size: 8px; font-weight: 730; }
.draft-tab.is-active { border-color: var(--gold); color: var(--gold-light); background: var(--gold-soft); }
.draft-area { min-height: 120px; padding: 10px; resize: vertical; font-size: 9px; line-height: 1.55; }
.draft-disclaimer, .form-note { margin: 7px 0 0; color: var(--muted-2); font-size: 8px; line-height: 1.45; }
.task-list { display: grid; gap: 0; }
.task-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 9px; align-items: start; padding: 10px 0; border-top: 1px solid rgba(245, 217, 141, .09); }
.task-row:first-child { border-top: 0; }
.task-check { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--gold); }
.task-label { color: var(--ink); font-size: 9px; font-weight: 690; line-height: 1.35; }
.task-meta { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.task-status { color: var(--muted); font-size: 8px; text-align: right; white-space: nowrap; }
.task-status.is-overdue { color: var(--red); font-weight: 730; }
.task-status.is-today { color: var(--gold-light); font-weight: 730; }
.task-status.is-blocked { color: var(--amber); font-weight: 730; }
.task-status.is-done { color: var(--green); font-weight: 730; }
.contact-form { display: grid; gap: 8px; }
.contact-form .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.contact-form label, .interaction-form label { display: grid; gap: 5px; }
.contact-form label span, .interaction-form label span { color: var(--muted); font-size: 8px; font-weight: 740; letter-spacing: .04em; }
.contact-form input, .interaction-form input, .interaction-form select, .interaction-form textarea { padding: 9px; color-scheme: dark; font-size: 10px; }
.contact-save-row { display: flex; justify-content: flex-end; margin-top: 3px; }
.source-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.source-list li { overflow-wrap: anywhere; color: var(--muted); font-size: 8px; line-height: 1.45; }
.source-list a { color: var(--gold-light); text-decoration: none; }
.source-list a:hover { text-decoration: underline; }
.detail-timeline .timeline-item { grid-template-columns: 88px 8px minmax(0, 1fr); }
.drawer-note-area { min-height: 84px; padding: 9px; resize: vertical; font-size: 9px; line-height: 1.5; }
.handoff-panel { padding: 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: linear-gradient(120deg, var(--gold-soft), rgba(255, 255, 255, .02)); }
.handoff-panel strong { display: block; font-size: 10px; }
.handoff-panel p { margin: 6px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.handoff-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; }

.interaction-modal {
  position: fixed;
  z-index: 22;
  top: 50%;
  left: 50%;
  width: min(640px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  color: var(--ink);
  background: #151517;
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
  animation: modal-in .2s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes modal-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)) scale(.985); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.operator-modal { width: min(560px, calc(100vw - 30px)); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 22px 23px 16px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .12); }
.modal-header h2 { margin: 7px 0 5px; font-size: 21px; font-weight: 580; letter-spacing: -.035em; }
.modal-header p { margin: 0; color: var(--muted); font-size: 9px; }
.interaction-form { display: grid; gap: 12px; padding: 20px 23px 23px; }
.form-grid { display: grid; gap: 10px; }
.form-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.interaction-form textarea { resize: vertical; }
.modal-footer { display: flex; justify-content: flex-end; gap: 7px; padding-top: 4px; }
.toast { position: fixed; z-index: 30; right: 22px; bottom: 22px; max-width: min(390px, calc(100vw - 44px)); padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); background: #1a1a1d; box-shadow: var(--shadow); font-size: 9px; line-height: 1.45; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-warning { border-color: rgba(227, 176, 92, .48); background: #211a11; }

@media (max-width: 1500px) {
  .queue-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1260px) {
  :root { --sidebar: 226px; }
  .brand-logo { width: 166px; }
  .topbar, .view { padding-left: 26px; padding-right: 26px; }
  .metrics-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric:nth-child(4n) { border-right: 0; }
  .metric:nth-child(n + 5) { border-top: 1px solid var(--line); }
  .radar-layout { grid-template-columns: minmax(0, 1fr); }
  .radar-list-surface { min-height: 0; }
  .memory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memory-grid > :last-child { grid-column: 1 / -1; }
  .topbar-actions > .button { display: none; }
}

@media (max-width: 940px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; display: grid; grid-template-columns: minmax(150px, 1fr) auto; align-items: center; width: 100%; min-height: auto; padding: 11px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-lockup { display: flex; align-items: center; gap: 12px; padding: 0; }
  .brand-logo { width: 135px; }
  .brand-product { font-size: 8px; }
  .sidebar-section-label, .batch-rail, .sidebar-divider, .integration-list, .sidebar-footer { display: none; }
  .primary-nav { display: flex; gap: 3px; }
  .nav-item { width: auto; min-height: 37px; padding: 8px; }
  .nav-item span:last-child { display: none; }
  .operator-nav { margin-top: 0; }
  .main-content { grid-column: auto; }
  .topbar { position: static; }
  .queue-layout { grid-template-columns: 1fr; }
  .queue-guide { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .queue-guide .surface-head { grid-column: 1 / -1; }
  .guide-note { margin-top: 12px; }
}

@media (max-width: 700px) {
  .sidebar { grid-template-columns: 1fr auto; padding: 10px 13px; }
  .brand-logo { width: 118px; }
  .brand-product { display: none; }
  .nav-item { min-height: 34px; padding: 6px; }
  .nav-icon { width: 19px; }
  .topbar { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 11px 14px; }
  .topbar-banner { margin: 0; }
  .topbar-actions { justify-content: stretch; }
  .search-control { flex: 1; min-width: 0; }
  .operator-control { flex: none; }
  .operator-control > span:last-child { display: none; }
  .view { padding: 29px 14px 48px; }
  .topbar-banner { margin: 8px 0 0; width: 100%; }
  .page-heading { display: block; margin-bottom: 22px; }
  .page-heading h1 { font-size: 38px; }
  .heading-actions { margin-top: 16px; }
  .metrics-row { grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 0; }
  .metric { min-height: 78px; border-bottom: 1px solid var(--line); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-child(n + 3) { border-top: 0; }
  .toolbar-row, .radar-toolbar { display: block; }
  .toolbar-controls { flex-wrap: wrap; margin-top: 11px; }
  .toolbar-controls .select-control { flex: 1; min-width: 125px; }
  .surface-head { padding: 15px 14px 13px; }
  .data-table { min-width: 920px; }
  .queue-guide { display: block; }
  .cadence-list { padding: 0 14px; }
  .guide-note { margin: 13px 14px; }
  .map-wrap { min-height: 320px; padding: 5px 6px; }
  #stateMap { height: 320px; }
  .memory-grid { grid-template-columns: 1fr; }
  .memory-grid > :last-child { grid-column: auto; }
  .context-grid, .drawer-meta-grid, .contact-form .form-grid, .form-grid.two-col { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 75px 8px minmax(0, 1fr); gap: 8px; }
  .drawer-header { padding: 19px 16px 14px; }
  .drawer-scroll { padding: 0 16px 28px; }
  .channel-grid { grid-template-columns: 1fr; }
  .context-solution-head { display: grid; gap: 5px; }
  .context-solution-module { max-width: none; text-align: left; }
  .approval-gate { grid-template-columns: 1fr; }
  .interaction-form { padding: 16px; }
  .modal-header { padding: 18px 16px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
