:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #64716a;
  --line: #d8ded8;
  --panel: #ffffff;
  --bg: #f5f7f4;
  --accent: #255f4c;
  --accent-soft: #dfece5;
  --warn: #8c4a22;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  position: sticky;
  top: 0;
}

.brand { font-weight: 800; color: var(--ink); }
.topbar nav { display: flex; gap: 16px; flex-wrap: wrap; }

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 28px auto 64px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
}

h1, h2, h3 { margin: 0 0 10px; line-height: 1.1; }
h1 { font-size: 34px; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 700;
}

.muted { color: var(--muted); }

.grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel, .metric, .interview-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.privacy-page {
  width: min(800px, 100%);
  margin: 48px auto 80px;
}

body:has(.privacy-page) .topbar nav {
  display: none;
}

.privacy-intro {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.privacy-intro h1 {
  font-size: clamp(36px, 5vw, 52px);
  max-width: 14ch;
}

.privacy-lead {
  max-width: 68ch;
  margin: 18px 0 12px;
  font-size: 20px;
  line-height: 1.6;
}

.privacy-updated {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.privacy-sections > section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.privacy-sections h2 {
  margin-bottom: 12px;
  font-size: 20px;
}

.privacy-sections p {
  max-width: 72ch;
  margin: 0 0 14px;
  color: #344139;
  font-size: 16px;
  line-height: 1.7;
}

.privacy-sections p:last-child {
  margin-bottom: 0;
}

.metric span {
  display: block;
  font-size: 30px;
  font-weight: 800;
}
.metric label { color: var(--muted); }

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.button.secondary, button.secondary {
  background: #fff;
  color: var(--accent);
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.template-picker {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf8;
}
.template-picker p {
  grid-column: 1 / -1;
  margin: 0;
}
.template-status {
  padding: 8px 10px;
  border: 1px solid #d8e2d4;
  border-radius: 6px;
  background: #fff;
}
.template-cards {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.template-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 112px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.template-card strong {
  font-size: 13px;
  line-height: 1.25;
}
.template-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.template-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(49, 117, 85, .16);
}
.access-card {
  width: min(520px, 100%);
  margin: 72px auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.form-error {
  padding: 10px 12px;
  border: 1px solid #d89b74;
  border-radius: 6px;
  background: #fff7f2;
  color: var(--warn);
  font-weight: 700;
}

.copybox { min-height: 140px; }

.table { display: grid; gap: 0; }
.row {
  display: grid;
  grid-template-columns: 2fr 1.3fr .8fr 1fr;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.row.header {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  border-top: 0;
}

.pill, .chip {
  display: inline-flex;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 700;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-list {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px 16px;
  margin: 0;
}
.settings-list dt {
  color: var(--muted);
  font-weight: 800;
}
.settings-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.question-list { display: grid; gap: 12px; }
.question-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.question-card.rejected,
.question-card.hard-negative {
  border-left: 4px solid var(--warn);
  padding-left: 12px;
}
.question-card.hard-negative {
  background: #fff7f2;
}
.rank {
  display: grid;
  align-content: start;
  gap: 4px;
  font-weight: 800;
  color: var(--accent);
}
.rank span {
  color: var(--muted);
  font-size: 13px;
}
.rank strong {
  font-size: 24px;
  line-height: 1;
}
.rank small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.question-card form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) 150px auto;
  gap: 8px;
}
.question-card form input[name="question_text"] {
  grid-column: 1 / -1;
}
.risk { color: var(--warn); font-weight: 700; }
.feedback-note {
  color: var(--warn);
  font-weight: 800;
}

.answer {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.prose pre {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.5;
}

.respondent { background: #eef3ef; }
.respondent-void {
  min-height: 100vh;
  overflow: hidden;
  background: #050508;
  color: rgba(255,255,255,.86);
}
.qa-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}
.qa-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  min-height: 100vh;
  padding: 0 max(18px, env(safe-area-inset-left)) 0 max(18px, env(safe-area-inset-right));
}
.qa-third {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}
.qa-graph-zone {
  align-content: center;
  gap: 2px;
  padding-top: 10px;
}
.qa-graph {
  width: min(920px, 96vw);
  height: min(280px, 31vh);
}
.qa-model-count {
  margin: -12px 0 0;
  color: rgba(34,211,238,.18);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.qa-question-zone {
  text-align: center;
}
.qa-question-copy {
  width: min(760px, 92vw);
  display: grid;
  justify-items: center;
  gap: 18px;
}
.qa-kicker {
  margin: 0;
  color: rgba(255,255,255,.18);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: .35em;
  text-transform: uppercase;
}
.qa-kicker span {
  color: rgba(34,211,238,.45);
}
.qa-kicker em {
  font-style: normal;
}
.qa-question-copy h1 {
  max-width: 74ch;
  margin: 0;
  color: rgba(255,255,255,.86);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 200;
  line-height: 1.6;
  letter-spacing: 0;
  text-wrap: balance;
  transition: opacity 220ms ease;
}
.qa-progress-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 8px;
}
.qa-progress-dots span {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  transition: width 500ms cubic-bezier(.22, 1, .36, 1), height 500ms cubic-bezier(.22, 1, .36, 1), background 500ms cubic-bezier(.22, 1, .36, 1), box-shadow 500ms cubic-bezier(.22, 1, .36, 1);
}
.qa-progress-dots span.answered {
  background: rgba(34,211,238,.35);
  box-shadow: 0 0 8px rgba(34,211,238,.18);
}
.qa-progress-dots span.current {
  width: 5px;
  height: 5px;
  background: rgba(34,211,238,.85);
  box-shadow: 0 0 16px rgba(34,211,238,.38);
}
.qa-input-zone {
  align-items: start;
  padding-top: 8px;
}
.qa-answer-form {
  width: min(520px, 92vw);
  display: grid;
  gap: 12px;
}
.qa-input-line {
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: border-color 350ms cubic-bezier(.22, 1, .36, 1);
}
.qa-input-line:focus-within {
  border-bottom-color: rgba(34,211,238,.2);
}
.qa-input-line textarea {
  width: 100%;
  min-height: 146px;
  max-height: 180px;
  resize: none;
  overflow: auto;
  padding: 10px 54px 10px 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: rgba(255,255,255,.72);
  caret-color: #22d3ee;
  font: 300 .93rem/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scrollbar-width: none;
}
.qa-input-line textarea::-webkit-scrollbar {
  display: none;
}
.qa-input-line textarea::placeholder {
  color: rgba(255,255,255,.32);
}
.qa-send {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.qa-send svg {
  width: 26px;
  height: 26px;
  fill: rgba(255,255,255,.2);
  transition: fill 350ms cubic-bezier(.22, 1, .36, 1), transform 350ms cubic-bezier(.22, 1, .36, 1);
}
.qa-send:hover svg,
.qa-send:focus-visible svg {
  fill: rgba(255,255,255,.6);
  transform: translateX(1px);
}
.qa-voice-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.qa-voice {
  position: relative;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,.2);
  transition: border-color 350ms cubic-bezier(.22, 1, .36, 1), color 350ms cubic-bezier(.22, 1, .36, 1);
}
.qa-voice svg,
.qa-drawer-tab svg,
.qa-drawer-head button svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.qa-voice:hover,
.qa-voice:focus-visible {
  border-color: rgba(34,211,238,.2);
  color: rgba(34,211,238,.45);
}
.qa-voice.recording {
  border-color: rgba(34,211,238,.3);
  color: rgba(34,211,238,1);
}
.qa-voice.recording::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(34,211,238,.25);
  border-radius: 999px;
  animation: qa-pulse-ring 1.5s ease-out infinite;
}
.qa-voice-row p {
  margin: 0;
  color: rgba(255,255,255,.1);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.qa-voice.recording + p {
  color: rgba(34,211,238,.4);
}
.qa-drawer-tab {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 4;
  width: 28px;
  min-width: 28px;
  height: 82px;
  min-height: 82px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 6px 0;
  border: 1px solid rgba(255,255,255,.05);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: transparent;
  color: rgba(255,255,255,.15);
  transform: translateY(-50%);
}
.qa-drawer-tab span {
  color: rgba(34,211,238,.45);
  font-size: 10px;
  font-weight: 300;
}
.qa-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  width: min(340px, 88vw);
  padding: 22px 22px 24px;
  border-left: 1px solid rgba(255,255,255,.04);
  background: rgba(5,5,8,.97);
  backdrop-filter: blur(24px);
  transform: translateX(100%);
  transition: transform 500ms cubic-bezier(.22, 1, .36, 1);
}
.qa-drawer.open {
  transform: translateX(0);
}
.qa-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.qa-drawer-head p {
  margin: 0;
  color: rgba(34,211,238,.35);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.qa-drawer-head button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.22);
}
.qa-answer-list {
  height: calc(100vh - 74px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(34,211,238,.15) transparent;
}
.qa-answer-item {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  cursor: pointer;
  animation: qa-answer-in 420ms cubic-bezier(.22, 1, .36, 1) both;
}
.qa-answer-item.open {
  border-bottom-color: rgba(34,211,238,.25);
}
.qa-answer-label {
  margin: 0 0 8px;
  color: rgba(34,211,238,.35);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.qa-answer-item h2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 8px;
  color: rgba(255,255,255,.2);
  font-size: 11px;
  font-weight: 300;
  line-height: 1.45;
}
.qa-answer-item p:last-child {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  color: rgba(255,255,255,.65);
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.55;
}
.qa-answer-item.open h2,
.qa-answer-item.open p:last-child {
  display: block;
}
.qa-empty {
  margin: 28px 0 0;
  color: rgba(255,255,255,.2);
  font-size: 12px;
  font-weight: 300;
}
.qa-complete {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 28px;
  background: rgba(5,5,8,.92);
  backdrop-filter: blur(24px);
  text-align: center;
}
.qa-complete-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(34,211,238,.18);
  border-radius: 999px;
  box-shadow: 0 0 34px rgba(34,211,238,.13);
  animation: qa-complete-pop 520ms cubic-bezier(.2, 1.35, .25, 1) both;
}
.qa-complete-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: rgba(34,211,238,.7);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.qa-complete h1 {
  margin: 0;
  color: rgba(255,255,255,.88);
  font-size: 1.55rem;
  font-weight: 200;
  letter-spacing: 0;
}
.qa-complete p {
  max-width: 320px;
  margin: 0;
  color: rgba(255,255,255,.2);
  font-size: .88rem;
  font-weight: 300;
  line-height: 1.6;
}
.qa-complete a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 4px;
  padding: 9px 14px;
  border: 1px solid rgba(34,211,238,.18);
  border-radius: 999px;
  color: rgba(34,211,238,.6);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: border-color 350ms cubic-bezier(.22, 1, .36, 1), color 350ms cubic-bezier(.22, 1, .36, 1), box-shadow 350ms cubic-bezier(.22, 1, .36, 1);
}
.qa-complete a:hover,
.qa-complete a:focus-visible {
  border-color: rgba(34,211,238,.34);
  color: rgba(34,211,238,.82);
  box-shadow: 0 0 24px rgba(34,211,238,.12);
  text-decoration: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.interview-shell {
  width: min(720px, calc(100vw - 28px));
  margin: 28px auto;
}
.progress {
  color: var(--muted);
  font-weight: 800;
}
.interview-card h1 {
  font-size: 30px;
}
.answer-form { display: grid; gap: 12px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; }

@keyframes qa-pulse-ring {
  from { opacity: .7; transform: scale(.82); }
  to { opacity: 0; transform: scale(1.45); }
}
@keyframes qa-answer-in {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes qa-complete-pop {
  from { opacity: 0; transform: scale(0); }
  to { opacity: 1; transform: scale(1); }
}

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

@media (max-width: 820px) {
  .grid.two, .grid.four { grid-template-columns: 1fr; }
  .page-head { display: grid; }
  .row { grid-template-columns: 1fr; }
  .question-card { grid-template-columns: 1fr; }
  .question-card form { grid-template-columns: 1fr; }
  .settings-list { grid-template-columns: 1fr; }
  .template-cards { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .interview-shell { margin: 14px auto; }
  .interview-card { padding: 20px; }
  .interview-card h1 { font-size: 28px; }
  .answer-form textarea { min-height: 150px; }
  .qa-stage {
    min-height: 100svh;
    grid-template-rows: .86fr 1.05fr 1.09fr;
  }
  .qa-graph {
    width: 94vw;
    height: 26vh;
  }
  .qa-question-copy {
    gap: 14px;
  }
  .qa-question-copy h1 {
    font-size: 1.18rem;
    line-height: 1.55;
  }
  .qa-input-zone {
    padding-top: 20px;
  }
  .qa-drawer-tab {
    top: auto;
    right: 12px;
    bottom: 18px;
    width: 54px;
    min-width: 54px;
    height: 34px;
    min-height: 34px;
    grid-template-columns: auto auto;
    border-right: 1px solid rgba(255,255,255,.05);
    border-radius: 999px;
    transform: none;
  }
}

/* PROTOTYPE - wipe me after final admin page direction is selected. */
.prototype-notice {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  margin-bottom: 14px;
  border: 1px dashed #8c4a22;
  border-radius: 8px;
  background: #fff7f2;
  color: #5d3219;
}
.prototype-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.prototype-page-tabs a,
.proto-steps a,
.proto-dense-board aside a {
  display: inline-flex;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}
.prototype-page-tabs a.active,
.proto-steps a.active,
.proto-dense-board aside a.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.prototype-layout {
  margin-bottom: 110px;
}
.proto-hero,
.proto-focus-panel,
.proto-dense-head {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.proto-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
}
.proto-hero h1 {
  max-width: 760px;
  font-size: 38px;
}
.proto-hero-actions,
.proto-dense-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.proto-signal-strip,
.proto-kpis,
.proto-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.proto-signal-strip div,
.proto-kpis div,
.proto-summary div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.proto-signal-strip strong,
.proto-kpis strong,
.proto-summary strong {
  display: block;
  font-size: 24px;
}
.proto-signal-strip span,
.proto-kpis span,
.proto-summary span {
  color: var(--muted);
  font-weight: 700;
}
.proto-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
}
.proto-workspace,
.proto-rail {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.proto-rail {
  align-self: start;
  position: sticky;
  top: 86px;
}
.proto-focus-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
}
.proto-focus {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}
.proto-steps,
.proto-dense-board aside {
  display: grid;
  align-content: start;
  gap: 8px;
}
.proto-focus-panel {
  padding: 26px;
}
.proto-b .proto-focus-panel h1 {
  font-size: 42px;
}
.proto-dense-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.proto-dense-head h1 {
  font-size: 26px;
}
.proto-dense-head p {
  margin: 0;
  color: var(--muted);
}
.proto-dense-board {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 12px;
}
.proto-dense-board aside,
.proto-dense-board section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.proto-c .proto-list article,
.proto-c .proto-question-stack article {
  padding: 10px 0;
  border-radius: 0;
  border-width: 1px 0 0;
}
.proto-form-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.proto-form-split label:nth-child(n+3) {
  grid-column: 1 / -1;
}
.proto-list,
.proto-question-stack,
.proto-report {
  display: grid;
  gap: 10px;
}
.proto-list article,
.proto-question-stack article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.proto-list article {
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) auto;
  align-items: center;
}
.proto-list span,
.proto-question-stack span,
.proto-question-stack p {
  color: var(--muted);
}
.proto-question-stack article.warn {
  border-color: #d89b74;
  background: #fff7f2;
}
.proto-question-stack div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.proto-report {
  line-height: 1.55;
}
.proto-settings {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 16px;
  padding: 0;
}
.proto-settings dt {
  color: var(--muted);
  font-weight: 800;
}
.proto-settings dd {
  margin: 0;
}
.prototype-switcher {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
  padding: 10px 12px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}
.prototype-switcher button {
  min-width: 38px;
  min-height: 34px;
  border-color: #fff;
  background: #fff;
  color: #111;
}
@media (max-width: 820px) {
  .proto-hero,
  .proto-dense-head {
    display: grid;
  }
  .proto-signal-strip,
  .proto-kpis,
  .proto-summary,
  .proto-main-grid,
  .proto-focus,
  .proto-dense-board,
  .proto-form-split,
  .proto-list article {
    grid-template-columns: 1fr;
  }
  .proto-rail {
    position: static;
  }
  .prototype-switcher {
    width: calc(100vw - 24px);
    justify-content: center;
  }
}

.codex-map {
  position: fixed;
  inset: 62px 0 0;
  z-index: 4;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(21, 70, 58, .2), transparent 35%), #020405;
  color: #dce8e3;
}
.codex-map canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
}
.codex-map canvas:active {
  cursor: grabbing;
}
.codex-map-logo-orbit {
  position: absolute;
  left: 50%;
  top: 48%;
  z-index: 2;
  width: clamp(190px, 23vw, 360px);
  aspect-ratio: 3 / 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  perspective: 900px;
  filter: drop-shadow(0 0 22px rgba(216, 170, 87, .34)) drop-shadow(0 0 42px rgba(66, 245, 200, .12));
}
.codex-map-logo-orbit::before {
  content: "";
  position: absolute;
  inset: 16% 8%;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(216, 170, 87, .18), transparent 58%),
    radial-gradient(circle, rgba(66, 245, 200, .12), transparent 72%);
  filter: blur(16px);
  opacity: .86;
}
.codex-map-logo-orbit img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .84;
  mix-blend-mode: screen;
  transform: rotateY(var(--codex-logo-y, 0deg)) rotateZ(var(--codex-logo-z, 0deg)) scale(.98);
  transform-origin: center center;
  will-change: transform;
}
.codex-map-panel {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(122, 148, 141, .24);
  border-radius: 12px;
  background: rgba(8, 13, 17, .82);
  box-shadow: 0 18px 80px rgba(0,0,0,.38);
  backdrop-filter: blur(14px);
}
.codex-map-left {
  left: 18px;
  top: 18px;
  bottom: 18px;
  width: 300px;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
  overflow: auto;
}
.codex-map-right {
  right: 18px;
  top: 18px;
  width: 210px;
  padding: 16px;
}
.codex-map h1,
.codex-map h2,
.codex-map p {
  margin: 0;
}
.codex-map h1 {
  font-size: 20px;
  color: #f8fbfa;
}
.codex-map h2 {
  margin-bottom: 10px;
  color: #73817d;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#codex-map-counts,
.codex-map-inspector p,
.codex-map-inspector span,
.codex-map-help {
  color: #8b9b95;
  font-size: 13px;
  line-height: 1.45;
}
.codex-map-search {
  display: grid;
  gap: 7px;
  color: #8b9b95;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.codex-map-search input {
  border-color: rgba(122, 148, 141, .28);
  background: rgba(8, 16, 24, .86);
  color: #f8fbfa;
}
.codex-map-inspector {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(122, 148, 141, .18);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}
.codex-map-inspector strong {
  color: #f8fbfa;
}
.codex-map-inspector code {
  display: block;
  color: #48d9b0;
  overflow-wrap: anywhere;
}
.codex-map-list {
  display: grid;
  gap: 8px;
}
.codex-map-list button {
  justify-content: flex-start;
  min-height: 36px;
  border-color: rgba(122, 148, 141, .18);
  background: rgba(255,255,255,.04);
  color: #dce8e3;
}
.codex-map-filters {
  display: grid;
  gap: 9px;
}
.codex-map-filters label {
  display: grid;
  grid-template-columns: 18px 14px 1fr auto;
  gap: 8px;
  align-items: center;
  color: #dce8e3;
  font-size: 14px;
  font-weight: 700;
}
.codex-map-filters input {
  width: 14px;
  height: 14px;
  accent-color: #42f5c8;
}
.codex-map-filters .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--dot);
  box-shadow: 0 0 14px var(--dot);
}
.codex-map-filters em {
  color: #74817d;
  font-style: normal;
}
.codex-map-status {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(122, 148, 141, .18);
  color: #8b9b95;
}
#codex-map-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #8c4a22;
}
#codex-map-live-dot.active {
  background: #42f5c8;
  box-shadow: 0 0 18px #42f5c8;
}
.codex-map-toolbar {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 50%;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
  padding: 8px;
  border: 1px solid rgba(122, 148, 141, .18);
  border-radius: 999px;
  background: rgba(8, 13, 17, .82);
  backdrop-filter: blur(14px);
}
.codex-map-toolbar button {
  min-height: 34px;
  border-color: rgba(66, 245, 200, .42);
  background: rgba(66, 245, 200, .1);
  color: #dce8e3;
}
.codex-map-help {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 9px 14px;
  border: 1px solid rgba(122, 148, 141, .18);
  border-radius: 999px;
  background: rgba(8, 13, 17, .82);
  backdrop-filter: blur(14px);
}
.codex-map-error {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 92px;
  width: min(720px, calc(100vw - 40px));
  transform: translateX(-50%);
  padding: 14px 16px;
  border: 1px solid #d89b74;
  border-radius: 10px;
  background: rgba(42, 19, 10, .92);
  color: #ffe8dc;
  box-shadow: 0 18px 80px rgba(0,0,0,.42);
}
@media (max-width: 980px) {
  .codex-map-left {
    width: 260px;
  }
  .codex-map-right {
    display: none;
  }
}
@media (max-width: 720px) {
  .codex-map {
    inset-top: 112px;
  }
  .codex-map-left {
    right: 12px;
    bottom: auto;
    width: auto;
    max-height: 42vh;
  }
  .codex-map-logo-orbit {
    top: 58%;
    width: clamp(160px, 48vw, 260px);
  }
  .codex-map-toolbar {
    top: auto;
    bottom: 52px;
  }
  .codex-map-help {
    display: none;
  }
}
