:root {
  --bg: #0c1218;
  --bg-2: #121a22;
  --surface: #171f28;
  --surface-2: #1d2732;
  --line: #2a3644;
  --fg: #e8e2d6;
  --muted: #8b9aaa;
  --brass: #c4a07a;
  --brass-2: #d8b896;
  --ink: #0c1218;
  --ok: #6aa88a;
  --ok-bg: #163028;
  --bad: #c57a6a;
  --bad-bg: #2e1c1a;
  --font-sans: "Figtree", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, ui-serif, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  background:
    radial-gradient(1100px 520px at 88% -8%, rgb(196 160 122 / 0.09), transparent 52%),
    radial-gradient(900px 480px at 0% 100%, rgb(106 168 138 / 0.06), transparent 48%),
    var(--bg);
}

button,
a {
  font: inherit;
}

button:not(:disabled),
[role="button"]:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  margin: 0 auto;
  min-height: 100dvh;
  width: 100%;
  max-width: 28rem;
  padding: max(1.25rem, env(safe-area-inset-top)) 1rem 4rem;
}

.page-narrow {
  max-width: 28rem;
}

@media (min-width: 640px) {
  .page {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .page {
    max-width: 72rem;
    padding: 2rem 2.5rem 4rem;
  }
  .page-narrow,
  .page-lesson,
  .page-done {
    max-width: 40rem;
  }
  .page-wide,
  .page-auth {
    max-width: 56rem;
  }
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

@media (min-width: 1024px) {
  .header {
    margin-bottom: 1.5rem;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mark {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .mark {
    width: 3rem;
    height: 3rem;
  }
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}

.title {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--fg);
}

@media (min-width: 640px) {
  .title {
    font-size: 1.875rem;
  }
}

@media (min-width: 1024px) {
  .title {
    font-size: 2.25rem;
  }
}

.chip {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brass-2);
}

.hero-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.7fr) 16rem;
    gap: 1.5rem;
    margin-bottom: 3rem;
  }
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.stat {
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.55rem 0.65rem;
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

@media (min-width: 1024px) {
  .stat-value {
    font-size: 1.35rem;
  }
}

.coach {
  order: 2;
  display: block;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.25rem;
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.28);
}

@media (min-width: 1024px) {
  .coach {
    order: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    border-radius: 1rem;
    padding: 2rem;
  }
}

.coach-title {
  margin-top: 0.25rem;
  font-size: 1.65rem;
  line-height: 1.15;
}

@media (min-width: 1024px) {
  .coach-title {
    font-size: 2.25rem;
  }
}

.coach-copy {
  margin-top: 0.5rem;
  max-width: 36rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}

@media (min-width: 1024px) {
  .coach-copy {
    font-size: 1rem;
  }
}

.btn-primary {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--brass);
  padding: 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.coach .btn-primary {
  margin-top: 1.25rem;
  width: 100%;
}

@media (min-width: 1024px) {
  .coach .btn-primary {
    margin-top: 0;
    width: auto;
    min-height: 3.5rem;
    min-width: 13rem;
    padding: 0 1.5rem;
    flex-shrink: 0;
  }
}

.btn-secondary {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 0 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
}

.btn-ghost {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brass-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.125rem;
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 1.5rem;
  }
}

.muted {
  color: var(--muted);
  font-size: 0.875rem;
}

.q-grid {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .q-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.q-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  height: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.9rem 1rem;
}

.q-card span {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}

.legal {
  margin-top: 2.5rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
}

.topbar {
  display: grid;
  grid-template-columns: 2.75rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.icon-btn {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
}

.progress {
  height: 0.375rem;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}

.progress > i {
  display: block;
  height: 100%;
  background: var(--brass);
  transition: width 0.2s ease;
}

.counter {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.kind {
  margin-bottom: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

.panel {
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

@media (min-width: 1024px) {
  .panel {
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 2rem;
  }
}

.prompt {
  font-size: 1.55rem;
  line-height: 1.25;
}

@media (min-width: 1024px) {
  .prompt {
    font-size: 1.875rem;
  }
}

.choices {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .choices {
    grid-template-columns: 1fr 1fr;
  }
}

.choice {
  min-height: 3rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.75rem 0.9rem;
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--fg);
}

@media (min-width: 1024px) {
  .choice {
    background: var(--bg-2);
  }
}

.choice:hover:not(:disabled) {
  border-color: color-mix(in oklab, var(--brass) 50%, var(--line));
}

.choice.right {
  border-color: var(--ok);
  background: var(--ok-bg);
}

.choice.wrong {
  border-color: var(--bad);
  background: var(--bad-bg);
}

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

.think {
  margin-top: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.5rem;
  text-align: center;
}

@media (min-width: 1024px) {
  .think {
    background: var(--bg-2);
  }
}

.think-num {
  font-family: var(--font-display);
  font-size: 3.75rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--brass-2);
}

.mic {
  margin-top: 1.25rem;
  min-height: 6rem;
  width: 100%;
  max-width: 28rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in oklab, var(--brass) 60%, var(--line));
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brass-2);
}

@media (min-width: 1024px) {
  .mic {
    background: var(--bg-2);
  }
}

.mic.rec {
  border-color: var(--bad);
  background: var(--bad-bg);
  color: var(--fg);
}

.textarea {
  width: 100%;
  min-height: 8rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 0.85rem 1rem;
  color: var(--fg);
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.answer {
  margin-top: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1rem;
}

@media (min-width: 1024px) {
  .answer {
    background: var(--bg-2);
  }
}

.answer p.body {
  margin-top: 0.5rem;
  line-height: 1.55;
}

.follow {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.cite-btn {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  border: 0;
  background: transparent;
  padding: 0 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.cite-list {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
}

.self {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.self button {
  min-height: 2.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.self button.on {
  border-color: var(--brass);
  background: color-mix(in oklab, var(--brass) 15%, transparent);
  color: var(--fg);
}

.actions {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.5rem;
  max-width: 20rem;
}

.flag {
  margin-top: 0.75rem;
  width: 100%;
  min-height: 2.75rem;
  border-radius: 0.75rem;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  padding: 0 0.85rem;
}

.flag.on {
  border-color: color-mix(in oklab, var(--brass) 50%, var(--line));
  background: color-mix(in oklab, var(--brass) 10%, transparent);
  color: var(--brass-2);
}
.flag:disabled {
  opacity: 0.75;
  cursor: default;
}

.flag-dialog {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 1rem;
  background: rgb(6 10 14 / 0.62);
}
.flag-dialog-card {
  width: min(28rem, 100%);
  max-height: min(92vh, 40rem);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: 1.15rem 1.15rem 1.25rem;
  margin-bottom: 0.5rem;
}
.flag-dialog-prompt {
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.35;
}
.flag-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.flag-reasons button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.flag-reasons button.on {
  border-color: var(--brass);
  background: color-mix(in oklab, var(--brass) 16%, transparent);
  color: var(--brass-2);
}
.flag-label { display: grid; gap: 0.35rem; }
.flag-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.flag-dialog-actions .btn-primary { width: auto; min-width: 10rem; }

@media (min-width: 700px) {
  .flag-dialog { place-items: center; }
}

.score {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
}

.score.ok {
  color: var(--ok);
}

.score.near {
  color: #d4b15c;
}
.score.bad {
  color: var(--bad);
}

.said {
  margin-top: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 0.9rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.kp {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.kp .hit {
  color: var(--ok);
}

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

.result-score {
  font-family: var(--font-display);
  font-size: 3rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.result-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .result-list {
    grid-template-columns: 1fr 1fr;
  }
}

.result-list li {
  list-style: none;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.9rem 1rem;
}

.result-list ul {
  margin: 0;
  padding: 0;
}

.replay {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brass-2);
}

@media (min-width: 1024px) {
  .replay {
    background: var(--bg-2);
  }
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.hidden {
  display: none !important;
}


button.q-card,
button.ticket-card {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

button.ticket-card:active {
  transform: scale(0.99);
}


/* P0 additions */
.page { padding-bottom: calc(2.5rem + env(safe-area-inset-bottom)); }
.field { display: grid; gap: 0.35rem; margin-bottom: 0.85rem; }
.field label { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.field input {
  border: 1px solid var(--line);
  background: var(--bg-2);
  min-height: 2.85rem;
  color: var(--fg);
  border-radius: 0.75rem;
  padding: 0 0.9rem;
}
.field input:focus { outline: 1px solid var(--brass); border-color: var(--brass); }
.btn { border: 1px solid transparent; border-radius: 0.75rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.85rem; padding: 0 1rem; font-size: 0.95rem; font-weight: 600; }
.btn-primary { width: 100%; }
.btn-secondary { width: 100%; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: 1rem; padding: 1.15rem; }
.stack { display: grid; gap: 0.6rem; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.err { color: var(--bad); font-size: 0.8rem; min-height: 1.1rem; }
.primary-cta { width: 100%; margin: 0.25rem 0 1rem; }
.path { position: relative; padding: 0.35rem 0 1rem 0.15rem; }
.path::before {
  content: "";
  position: absolute;
  left: 1.7rem;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in oklab, var(--brass) 35%, var(--line)) 8%,
    color-mix(in oklab, var(--brass) 35%, var(--line)) 92%,
    transparent
  );
  pointer-events: none;
}
.path-section {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem 1rem;
  margin-bottom: 0.85rem;
}
.path-copy { min-width: 0; }
.path-copy .section-title { margin: 0; }
.node {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.node.next { border-color: var(--brass); color: var(--ink); background: var(--brass); }
.node.done { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.node.open { border-color: var(--brass); color: var(--brass-2); background: var(--surface); }
.node.locked { opacity: 0.45; }
.node-label { font-size: 0.78rem; font-weight: 600; line-height: 1.3; color: var(--muted); margin: 0.15rem 0 0; }
.home-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-top: 0.5rem; }
.home-links a, .home-links button {
  background: none; border: 0; color: var(--brass-2); font-size: 0.85rem; font-weight: 600; padding: 0; text-decoration: underline; text-underline-offset: 3px;
}
.gate-title { font-size: 2rem; margin-top: 0.35rem; }
.gold-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border: 1px solid color-mix(in oklab, var(--brass) 55%, var(--line));
  color: var(--brass-2); border-radius: 999px; padding: 0.2rem 0.65rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.75rem; }
.chip-hit, .chip-miss {
  border-radius: 999px; padding: 0.2rem 0.55rem; font-size: 0.75rem; font-weight: 600;
}
.chip-hit { background: var(--ok-bg); color: var(--ok); }
.chip-miss { background: var(--bad-bg); color: var(--bad); }
.ticket-row { width: 100%; text-align: left; }
.ticket-row .sub { font-size: 0.75rem; font-weight: 500; color: var(--muted); margin-top: 0.2rem; }
.lock-note { font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; }

.home-lead { margin-bottom: 0.85rem; }
.home-layout { display: flex; flex-direction: column; }
.home-rail { margin-bottom: 0.35rem; }
.home-foot { margin-top: 0.25rem; }
.auth-copy { display: block; padding-top: 0.15rem; margin-bottom: 1.25rem; }
.auth-kicker {
  margin-top: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1.2;
}
.auth-closer {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brass-2);
}

@media (min-width: 1024px) {
  .page-home {
    max-width: 72rem;
  }

  .page-wide {
    max-width: 56rem;
  }

  .page-narrow,
  .page-lesson,
  .page-done {
    max-width: 40rem;
  }

  .home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    grid-template-areas:
      "main rail"
      "foot rail";
    gap: 1.25rem 2.75rem;
    align-items: start;
  }

  .home-main { grid-area: main; }
  .home-foot { grid-area: foot; margin-top: 0; }
  .home-rail {
    grid-area: rail;
    order: 0;
    margin-bottom: 0;
    position: sticky;
    top: 1.5rem;
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    background: color-mix(in oklab, var(--surface) 88%, transparent);
    border-radius: 1.25rem;
  }

  .home-lead {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .primary-cta {
    margin: 0;
    min-height: 3.15rem;
    font-size: 1rem;
  }

  .home-rail .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
  }

  .home-rail .stat {
    padding: 0.85rem 0.7rem;
  }

  .home-rail .stat-value { font-size: 1.35rem; }

  .path {
    max-width: 28rem;
    margin: 0;
    padding: 0.75rem 0 1.5rem 0.15rem;
  }

  .path::before {
    left: 1.875rem;
    top: 1.1rem;
    bottom: 1.1rem;
  }

  .path-section {
    grid-template-columns: 3.75rem minmax(0, 1fr);
    margin-bottom: 1.15rem;
  }

  .node {
    width: 3.75rem;
    height: 3.75rem;
    font-size: 0.8rem;
  }

  .node:hover {
    transform: translateY(-1px);
    border-color: var(--brass-2);
  }

  .auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.95fr);
    gap: 2rem;
    align-items: start;
  }

  .auth-copy { display: block; padding-top: 0.35rem; margin-bottom: 0; }

  .auth-kicker {
    margin-top: 0.45rem;
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1.2;
  }

  .auth-closer {
    font-size: 1.45rem;
  }

  .page-auth { max-width: 56rem; }

  .page-wide .q-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-wide .stack .card {
    padding: 1.25rem 1.35rem;
  }
}

@media (min-width: 1200px) {
  .page-home { max-width: 78rem; }
  .home-layout { grid-template-columns: minmax(0, 1fr) 24rem; gap: 3.25rem; }
}

.order-label {
  margin: 1rem 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-2);
}
.order-built, .order-bank {
  display: grid;
  gap: 0.5rem;
}
.order-empty { margin: 0.15rem 0; font-size: 0.9rem; color: var(--muted); }
.order-chip {
  width: 100%;
  text-align: left;
  min-height: 3.15rem;
  border-radius: 0.75rem;
  border: 1px solid #4a5b6c;
  background: #243140;
  color: var(--fg);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 0.75rem 0.95rem;
}
.order-chip.in {
  border-color: var(--brass);
  background: color-mix(in oklab, var(--brass) 18%, #243140);
  color: #f4eee4;
}
.order-chip.right { border-color: var(--ok); background: var(--ok-bg); color: #d7f0e3; }
.order-chip.close { border-color: #c9a24a; background: #2e2614; color: #f0dd9a; }
.order-chip.wrong { border-color: var(--bad); background: var(--bad-bg); color: #f3d4cc; }
.order-actions { margin-top: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.order-actions .btn-primary { width: auto; min-width: 9rem; }
