/* ═══════════════════════════════════════════════════════════════════════════
   CUPERTINO — the wing's own accent, inside the Fan Zone's system.

   Loaded AFTER site.css, fun/fanzone.css and (on the guide) fanzone/answers.css
   or (on the wing) fun/fun.css, on every Cupertino page and nowhere else. It
   restates no token those sheets own: the violet ground, the coral accent, the
   frost links and the heather eyebrows all stay exactly as the zone sets them.
   What it adds is one colour and one typeface the other wings do not use,
   scoped under .cu-scope (the guide) and .cu-wing (the games' wing), so no
   other page can pick it up:

   · LEGAL-PAD YELLOW, --cu-pad, for the rules, case numbers and the docket.
     It is the registry's seal colour for this wing (#e8c766), so the door's
     card, the seal and the page agree. Measured on --surface-2 #2c1d3a, the
     lightest ground it sits on: 10.3:1, well past the 4.5:1 text duty.
   · THE MONOSPACE STACK (--mono, already in site.css), for anything that is a
     reference rather than prose: "1×04", a date on the docket, a score. A
     court docket and a commit log are both lists of numbered entries, which is
     the Silicon Valley-meets-courtroom feel the owner's brief asks for, made
     with type and colour alone. No logo, no still, no imitation of the
     series' own marks.

   44px targets under `pointer: coarse` on every link this sheet styles, and
   no rule here sets a colour on text that site.css's ramp does not already
   carry, except the pad yellow itself.
   ═══════════════════════════════════════════════════════════════════════════ */

.cu-scope, .cu-wing {
  --cu-pad: #e8c766;
  --cu-pad-wash: rgba(232, 199, 102, 0.08);
  --cu-pad-edge: rgba(232, 199, 102, 0.42);
  --cu-rule: rgba(232, 199, 102, 0.14);
}

/* ── The guide's tab strip: every page in one row, the current one ruled ──── */
.cu-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--hair-strong);
  margin: 0 0 var(--s5);
  -webkit-overflow-scrolling: touch;
}
.cu-tabs::-webkit-scrollbar { display: none; }
.cu-tabs a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--s3);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.cu-tabs a:hover { color: var(--text-strong); }
.cu-tabs a[aria-current="page"] { color: var(--text-strong); border-bottom-color: var(--cu-pad); }
.cu-tabs .cu-tab-play { margin-left: auto; color: var(--cu-pad); }

/* ── Citations: the publisher names after a sourced sentence ─────────────── */
.cu-cite { font-size: 0.8em; color: var(--text-dim); white-space: normal; }
.cu-caveat { display: block; margin-top: 2px; font-size: 13px; color: var(--text-dim); font-style: italic; }
.cu-unknown {
  border: 1px dashed var(--cu-pad-edge);
  border-radius: var(--r-md);
  padding: var(--s3) var(--s4);
  color: var(--text-dim);
  font-size: 16px !important;
}
.cu-faq-src { margin-top: 6px !important; font-size: 13px !important; color: var(--text-dim) !important; }

/* ── The page body when there is no facts column ─────────────────────────── */
.cu-page:not(.fa-grid) > * { margin: 0 0 var(--s6); }
.cu-page h2 { color: var(--text-strong); }
.cu-scope .fa-head h1 { text-wrap: balance; }
.cu-scope .fa-eyebrow { font-family: var(--mono); letter-spacing: 0.04em; text-transform: none; color: var(--cu-pad); }
.cu-scope .fa-facts { border-top: 3px solid var(--cu-pad); }

/* ── Case numbers and the docket ─────────────────────────────────────────── */
.cu-no { font-family: var(--mono); font-size: 14px; color: var(--cu-pad); white-space: nowrap; }
.cu-docket td, .cu-docket th { vertical-align: top; }
.cu-docket th a { color: var(--text-strong); font-weight: 600; }
.cu-docket th a:hover { color: var(--frost-300); }
.cu-docket time { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.cu-scope .fa-episodes table.cu-docket { min-width: 600px; }

.cu-eplist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 10px;
}
.cu-eplist a {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "no t" "no d";
  column-gap: var(--s3);
  row-gap: 2px;
  align-items: baseline;
  min-height: 64px;
  padding: var(--s3) var(--s4);
  background: var(--surface-1);
  border: 1px solid var(--hair-strong);
  border-left: 3px solid var(--cu-pad);
  border-radius: var(--r-md);
  text-decoration: none;
}
.cu-eplist a:hover { border-color: var(--cu-pad-edge); border-left-color: var(--cu-pad); background: var(--surface-2); }
.cu-eplist .cu-no { grid-area: no; }
.cu-ep-t { grid-area: t; font-weight: 600; color: var(--text-strong); font-size: 16px; }
.cu-eplist time { grid-area: d; font-family: var(--mono); font-size: 12px; color: var(--text-dim); }

/* ── The premise, on a ruled pad ─────────────────────────────────────────── */
/* The ruling is 32px and every line of type in the card is set on a 32px
   line, with 32px of padding above, so the text sits on the rules rather
   than across them (the first draft ruled at 32 under 29.75px lines and the
   two drifted apart down the card, seen at 1440). */
.cu-brief, .cu-file {
  background-color: var(--surface-1);
  border: 1px solid var(--hair-strong);
  border-left: 3px solid var(--cu-pad);
  border-radius: var(--r-md);
  padding: var(--s4) var(--s5);
  margin: 0 0 var(--s6);
  max-width: 820px;
}
.cu-brief {
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, var(--cu-rule) 31px, var(--cu-rule) 32px);
  padding: 32px var(--s5) 32px;
}
.cu-brief h2 { margin: 0; font-size: 20px; line-height: 32px; color: var(--cu-pad); }
.cu-file h2 { margin: 0 0 var(--s2); font-size: 20px; color: var(--cu-pad); }
.cu-brief p { font-size: 17px; line-height: 32px; margin: 0; color: var(--text-strong); }
.cu-brief p + p { margin-top: 32px; }

/* The guide hub's facts read as a list, not as two far-apart columns. */
.cu-hub .fa-facts { max-width: 820px; margin: 0 0 var(--s6); }
.cu-scope .fa-fact { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }

.cu-watch { max-width: 820px; margin: 0 0 var(--s6); }
.cu-watch h2 { font-size: 20px; margin: 0 0 var(--s2); }
.cu-watch ul { margin: 0; padding-left: 20px; font-size: 16px; line-height: 1.7; }

/* ── Previous, all, next ─────────────────────────────────────────────────── */
.cu-steps { display: grid; grid-template-columns: 1fr; gap: 10px; }
.cu-step {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 64px;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--hair-strong);
  border-radius: var(--r-md);
  background: var(--surface-1);
  text-decoration: none;
}
a.cu-step:hover { border-color: var(--cu-pad-edge); }
.cu-step-k { font-family: var(--mono); font-size: 12px; color: var(--cu-pad); }
.cu-step-t { font-size: 15px; font-weight: 600; color: var(--text-strong); }
.cu-step-none { opacity: 0.7; border-style: dashed; }
.cu-step-none .cu-step-t { font-weight: 500; color: var(--text-dim); }
@media (min-width: 720px) { .cu-steps { grid-template-columns: 1fr 1fr 1fr; } }

/* ── The road to air ─────────────────────────────────────────────────────── */
.cu-timeline-sec h2 { margin: 0 0 var(--s3); }
.cu-road { list-style: none; margin: 0; padding: 0 0 0 var(--s4); border-left: 2px solid var(--cu-pad-edge); max-width: 760px; }
.cu-road li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 0 0 var(--s4) var(--s3); }
.cu-road li::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--s4) - 6px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cu-pad);
}
.cu-when { font-family: var(--mono); font-size: 13px; color: var(--cu-pad); }
.cu-what { font-size: 16px; line-height: 1.6; color: var(--text); }

/* ── Billing badges and scores ───────────────────────────────────────────── */
.cu-bill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--hair-strong);
  color: var(--text);
}
.cu-bill-lead { border-color: var(--cu-pad-edge); color: var(--cu-pad); background: var(--cu-pad-wash); }
.cu-bill-recurring { color: var(--text-dim); }
.cu-castlist td:last-child { min-width: 260px; }
.cu-castlist tr:target { background: var(--cu-pad-wash); }
.cu-score { font-family: var(--mono); font-size: 18px; color: var(--cu-pad); white-space: nowrap; }

.cu-reviews { max-width: 820px; }
.cu-reviews ul, .cu-srcgroup ol { margin: var(--s2) 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.cu-reviews a, .cu-srcgroup a, .cu-scope .fa-sources a { color: var(--frost-400); }
.cu-srcgroup { margin: 0 0 var(--s5); max-width: 900px; }
.cu-srcgroup h3 { margin: 0; font-size: 18px; color: var(--text-strong); display: flex; align-items: center; gap: var(--s2); }
.cu-count { font-family: var(--mono); font-size: 12px; color: var(--cu-pad); border: 1px solid var(--cu-pad-edge); border-radius: 999px; padding: 0 8px; }
.cu-scope .fa-located { word-break: break-all; }

/* ── The wing (games) ────────────────────────────────────────────────────── */
.cu-wing .eyebrow { font-family: var(--mono); letter-spacing: 0.04em; text-transform: none; color: var(--cu-pad); }
.cu-file dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 0; }
.cu-file { background-image: none; }
.cu-file dl > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 8px 0; border-top: 1px solid var(--cu-rule); }
@media (min-width: 560px) { .cu-file dl > div { grid-template-columns: 160px 1fr; gap: var(--s3); } }
.cu-file dl > div:first-child { border-top: 0; }
.cu-file dt { font-family: var(--mono); font-size: 13px; color: var(--cu-pad); }
.cu-file dd { margin: 0; font-size: 15px; color: var(--text-strong); }
.cu-file p { margin: var(--s3) 0 0; font-size: 13px; color: var(--text-dim); }
.cu-doors { list-style: none; margin: var(--s3) 0 var(--s6); padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.cu-doors a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 64px;
  padding: var(--s3) var(--s4);
  background: var(--surface-1);
  border: 1px solid var(--hair-strong);
  border-left: 3px solid var(--cu-pad);
  border-radius: var(--r-md);
  text-decoration: none;
}
.cu-doors a:hover { background: var(--surface-2); border-color: var(--cu-pad-edge); border-left-color: var(--cu-pad); }
.cu-doors b { color: var(--text-strong); font-size: 16px; }
.cu-doors span { color: var(--text-dim); font-size: 13px; }

/* ── The Docket game ─────────────────────────────────────────────────────── */
.cu-dk { max-width: 720px; }
.cu-dk-q { margin: 0 0 var(--s2); font-size: 18px; font-weight: 600; color: var(--text-strong); line-height: 1.4; }
.cu-dk h3 { margin: var(--s5) 0 var(--s2); font-size: 18px; color: var(--text-strong); }
.cu-dk-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s3) 0; }
.cu-dk-truth { margin: 0 0 var(--s4); padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--text); }
.cu-dk-truth li { padding: 6px 0; border-top: 1px solid var(--cu-rule); }
.cu-dk-list { list-style: none; margin: var(--s3) 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cu-dk-row {
  display: grid;
  grid-template-columns: 2.4em 1fr auto;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  background: var(--surface-1);
  border: 1px solid var(--hair-strong);
  border-left: 3px solid var(--cu-pad-edge);
  border-radius: var(--r-md);
}
.cu-dk-row.cu-dk-right { border-left-color: var(--ok); }
.cu-dk-row.cu-dk-wrong { border-left-color: var(--danger); }
.cu-dk-pos { font-family: var(--mono); font-size: 14px; color: var(--cu-pad); text-align: center; }
.cu-dk-title { font-weight: 600; color: var(--text-strong); font-size: 16px; line-height: 1.3; }
.cu-dk-title small { display: block; font-weight: 400; font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.cu-dk-moves { display: flex; gap: 6px; }
.cu-dk-moves button {
  min-width: 40px;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--hair-strong);
  background: var(--surface-2);
  color: var(--text-strong);
  font-size: 16px;
  cursor: pointer;
}
.cu-dk-moves button:hover:not([disabled]) { border-color: var(--cu-pad-edge); }
.cu-dk-moves button[disabled] { opacity: 0.35; cursor: default; }
.cu-dk-moves button:focus-visible { outline: 2px solid var(--cu-pad); outline-offset: 2px; }
.cu-dk-score { font-family: var(--mono); font-size: 28px; color: var(--cu-pad); margin: 0; }
.cu-dk-note { color: var(--text-dim); font-size: 14px; }

@media (pointer: coarse) {
  .cu-tabs a, .cu-step, .cu-eplist a, .cu-doors a, .cu-reviews a, .cu-srcgroup a, .cu-dk-moves button {
    min-height: 44px;
  }
  .cu-dk-moves button { min-width: 44px; }
  .cu-reviews li, .cu-srcgroup li { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
}
@media (prefers-reduced-motion: no-preference) {
  .cu-eplist a, .cu-doors a, a.cu-step { transition: border-color .12s ease-out, background-color .12s ease-out; }
}
