/* Couples Court — the game scenes stay on Sunny's cool paper; the VERDICT is the one warm-register
   surface in this SPA (cream parchment, copper hairline, mono kicker), which is exactly how the
   courtroom reads in the reference. Everything else comes from base.css. */

/* The courtroom's three warm values, declared in both themes.

   The parchment was a single hardcoded cream, so at night the verdict — the whole point of the
   game — was a bright sheet of paper with near-white ink on it. And --co-ink-warm never flipped
   at all: on the START preview, which sits on --grad-soft, the sentence line measured 4.07:1 in
   light and 2.90:1 in dark. Same courtroom in both registers — parchment, copper rule, warm brown
   kicker — but at night the parchment is oak and the brown is brass. */
:root {
  --co-cream: #FBF6EF;
  --co-copper: #C08A4A;    /* the rule and the seal ring — border only, never text */
  --co-ink-warm: #7C5C31;  /* was #8A6A3A, 4.07:1 on the preview. This is 4.98 at worst, 5.69 on parchment */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --co-cream: #2E251B;   /* oak rather than paper; --ink on it is 13.5:1 */
    --co-copper: #D9A45E;
    --co-ink-warm: #DDB570; /* 7.52:1 at worst across parchment, paper and the dark --grad-soft */
  }
}
:root[data-theme="dark"] {
  --co-cream: #2E251B;
  --co-copper: #D9A45E;
  --co-ink-warm: #DDB570;
}

/* ---------- START preview ---------- */
.co-preview { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 80%; }
.co-preview__seal { font-size: 30px; line-height: 1; }
.co-preview__t { font-weight: 800; font-size: 18px; text-align: center; text-wrap: balance; }
.co-preview__bars { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.co-preview__bar { display: flex; align-items: center; gap: 8px; }
.co-preview__bar .p { font: 700 13px var(--mono); width: 44px; }
.co-preview__bar i { display: block; height: 8px; border-radius: 999px; }
.co-preview__bar.pink i { width: 62%; background: var(--pink); }
.co-preview__bar.blue i { width: 38%; background: var(--blue); }
.co-preview__sentence { font: 700 11px var(--mono); letter-spacing: .06em; color: var(--co-ink-warm); border: 1px dashed var(--co-copper); border-radius: 6px; padding: 8px 10px; text-align: center; }

/* ---------- CASE / ROUNDS ---------- */
.co-case { width: min(1120px, calc(100vw - 32px)); min-height: calc(100svh - var(--bar-h, 0px)); justify-content: center; }
.co-packs { grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); }
.co-own { border-style: dashed; border-color: var(--ink-faint); background: transparent; box-shadow: none; }
.co-own[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: -1px; }
.co-own-wrap { display: flex; flex-direction: column; gap: 4px; width: min(520px, 100%); }
.co-rounds { min-height: calc(100svh - var(--bar-h, 0px)); justify-content: center; gap: 22px; }
.co-sitting, .co-landmark { max-width: 42ch; }
.co-start { min-width: 240px; }

/* ---------- TESTIMONY ---------- */
.co-testimony { width: min(1040px, calc(100vw - 32px)); min-height: calc(100svh - var(--bar-h, 0px)); justify-content: center; gap: 10px; }
.co-meta { display: flex; align-items: center; justify-content: center; gap: 8px; }
.co-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: pulse 1.2s ease-in-out infinite; }
.co-kicker { color: var(--co-ink-warm); }
.co-charge { max-width: 24ch; }
.co-count { margin: 0; font-size: 15px; color: var(--ink-soft); max-width: 46ch; }
.co-clock { font: 700 clamp(32px, 6vw, 46px) var(--mono); letter-spacing: .06em; line-height: 1.1; }
.co-clock.is-low { color: var(--red); }

.co-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; }
.co-seat { position: relative; min-height: 150px; border-radius: var(--r8); border: 1px solid var(--line); background: var(--paper-raised); box-shadow: var(--shadow-1); padding: 46px 16px 40px; display: grid; place-items: center; }
.co-seat--pink { background: linear-gradient(170deg, var(--pink-tint) 0%, var(--paper-raised) 60%); border-color: var(--pink); }
.co-seat--blue { background: linear-gradient(170deg, var(--blue-tint) 0%, var(--paper-raised) 60%); border-color: var(--blue); }
.co-seat.is-rested { outline: 2px solid var(--ink); outline-offset: -1px; }
.co-seat__badge { position: absolute; top: 12px; left: 12px; font: 700 11px var(--mono); letter-spacing: .12em; padding: 5px 9px; border-radius: 4px; background: var(--red); color: var(--on-red); }
.co-seat__badge.is-plaintiff { background: var(--green); }
.co-seat__body { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.co-seat__seal { font: 700 15px var(--mono); letter-spacing: .22em; color: var(--ink-faint); border: 2px dashed var(--ink-faint); border-radius: 6px; padding: 8px 14px; transform: rotate(-6deg); }
.co-seat__filed { font: 12px var(--mono); color: var(--ink-soft); }
.co-seat__name { position: absolute; bottom: 12px; left: 12px; font: 700 12px var(--mono); letter-spacing: .06em; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }

.co-controls { display: flex; flex-direction: column; gap: 8px; width: min(560px, 100%); }
.co-plea { min-height: 104px; }
.co-exhibit-wrap { display: flex; flex-direction: column; gap: 8px; }
.co-exhibit-row { gap: 8px; }
.co-file { flex: none; white-space: nowrap; }
.co-exhibits { display: flex; flex-wrap: wrap; gap: 6px; }
.co-status { min-height: 20px; }
.co-sealnote { max-width: 44ch; }

/* ---------- VERDICT: the one warm surface ---------- */
.co-verdict { width: min(1080px, calc(100vw - 32px)); min-height: calc(100svh - var(--bar-h, 0px)); justify-content: center; gap: 14px; }
.co-parchment {
  width: 100%; background: var(--co-cream); border: 1px solid var(--co-copper); border-radius: var(--r8);
  padding: 26px 22px 28px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: var(--shadow-1);
}
.co-seal { width: 62px; height: 62px; border-radius: 50%; border: 2px solid var(--co-copper); display: grid; place-items: center; font-size: 28px; }
.co-inCourt { color: var(--co-ink-warm); letter-spacing: .2em; }
.co-verdictLabel { color: var(--ink-soft); }
.co-hung { font: 700 14px var(--mono); letter-spacing: .06em; background: var(--yellow-tint); color: var(--on-yellow-tint); border-radius: 999px; padding: 7px 16px; }
.co-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; }
.co-party { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--r8); padding: 16px 18px; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.co-party.pink { border-color: var(--pink); }
.co-party.blue { border-color: var(--blue); }
.co-party__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.co-party__name { font-weight: 800; font-size: 18px; }
.co-party__role { font-size: 11px; letter-spacing: .12em; color: var(--ink-soft); }
.co-party__pct { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.co-bar { display: block; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.co-bar i { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.co-party.pink .co-bar i { background: var(--pink); }
.co-party.blue .co-bar i { background: var(--blue); }
.co-party__cap { font-size: 10px; }
.co-party__note { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.co-party__plea { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; border-top: 1px solid var(--line); padding-top: 8px; }
.co-party__plea.is-silent { color: var(--ink-faint); font-style: italic; }
.co-party__exhibits { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.co-exhibit { font-size: 12px; }
.co-ruling { margin: 0; font-style: italic; font-size: 16px; line-height: 1.5; color: var(--ink); max-width: 58ch; text-align: center; }
.co-sentence { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; border: 1px dashed var(--co-copper); border-radius: 6px; padding: 10px 16px; }
.co-sentence .eyebrow { color: var(--co-ink-warm); }
.co-sentence__t { font-weight: 700; font-size: 15px; }
.co-thinking { display: flex; justify-content: center; }
.co-bybook { display: flex; flex-direction: column; gap: 4px; align-items: center; max-width: 54ch; }
.co-bybook__t { font-size: 13px; color: var(--ink-faint); }
.co-next { min-width: 200px; }

/* ---------- RULING ---------- */
.co-ruling-scene { width: min(760px, calc(100vw - 32px)); }
.co-trophy { font-size: 46px; line-height: 1; }
/* The winner's name, in their own colour. --pink-label / --blue-label are those two literals in
   light and their readable counterparts at night; the literals were 2.5:1 on the dark ground. */
.co-winner[data-color="pink"] { color: var(--pink-label); }
.co-winner[data-color="blue"] { color: var(--blue-label); }
.co-sub { max-width: 42ch; }
.co-rows { display: flex; flex-direction: column; gap: 10px; width: min(420px, 100%); }
.co-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r8); background: var(--paper-raised); }
.co-row.is-winner.pink { border-color: var(--pink); }
.co-row.is-winner.blue { border-color: var(--blue); }
.co-row__n { font-weight: 800; }
.co-row__p { font-weight: 700; letter-spacing: .04em; }
.co-coin { font: 700 13px var(--mono); letter-spacing: .04em; color: var(--on-yellow-tint); background: var(--yellow-tint); border-radius: 999px; padding: 7px 14px; }
.co-list { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.co-list__row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; }
.co-list__c { font-size: 12px; color: var(--ink-faint); }
.co-list__m { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-list__w { font-size: 13px; font-weight: 700; }
/* 13px bold, so AA asks 4.5:1 — --pink is tuned for a fill, not for small type (see base.css). */
.co-list__w.pink { color: var(--pink-label); }
.co-list__w.blue { color: var(--blue-label); }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .co-stage { grid-template-columns: 1fr; }
  .co-parties { grid-template-columns: 1fr; }
  .co-seat { min-height: 128px; padding: 42px 14px 36px; }
  .co-parchment { padding: 20px 14px 22px; }
  .co-exhibit-row { flex-wrap: wrap; }
  .co-file { width: 100%; }
}
