/* Intake surfaces: language switch, self-tape spec, release block, screening
   verdicts, Schedule A. Owned by the public + talent build.

   Nothing new is invented here. Every value is a token from styles.css; the
   only added shape is the spec slab, which is the one element this page is
   meant to be remembered by. */

/* ── Language switch ──────────────────────────────────────────────────── */
.langswitch {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600;
}
.langswitch b { color: var(--ink); font-weight: 700; }
.langswitch a { color: var(--dim); text-decoration: none; }
.langswitch a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.langswitch i { color: #CFC4B0; font-style: normal; font-weight: 400; }
.langswitch a, .langswitch b {
  display: inline-flex; align-items: center;
  min-height: 34px; padding: 0 4px;
}

/* The topbar hides its text links on a phone. The language switch is not a
   convenience link, so it stays. */
@media (max-width: 860px) {
  .topbar nav .langswitch a { display: inline-flex; }
  .topbar nav { gap: 14px; }
}
@media (max-width: 520px) {
  .langswitch a, .langswitch b { min-height: 44px; padding: 0 6px; }
}

/* ── The self-tape spec slab ──────────────────────────────────────────── */
.specblock {
  max-width: 660px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 26px);
  box-shadow: var(--shadow-card);
  margin-bottom: 26px;
}
.specblock.flagged { border-left-color: var(--bad); background: #FFFCFA; }
.spechead { display: flex; align-items: flex-start; gap: 18px; }
.spechead > div { min-width: 0; }
.spectake {
  flex: none;
  font-family: var(--display);
  font-size: 44px; font-weight: 700; line-height: .95; letter-spacing: -.045em;
  color: var(--amber);
}
.spectake small { display: block; font-family: var(--ui); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-top: 5px; }
.specblock.flagged .spectake { color: var(--bad); }
.spechead h3 { font-size: 18px; }
.specwhy { color: var(--dim); font-size: 14px; margin: 7px 0 0; }
.speclist {
  margin: 18px 0 0; padding-left: 22px;
  display: grid; gap: 8px;
  font-size: 14.5px; line-height: 1.5;
}
.speclist li::marker { color: var(--amber-deep); font-weight: 600; font-variant-numeric: tabular-nums; }
.specblock.flagged .speclist li::marker { color: var(--bad); }

/* ── A tape turned away by the machine ────────────────────────────────── */
.rejectblock {
  max-width: 660px;
  background: var(--bad-soft);
  border: 1px solid #EAD4CC;
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.rejectblock h3 { font-size: 17px; color: var(--bad); }
.rejectblock ul { margin: 12px 0 12px; padding-left: 20px; }
.rejectblock li { margin-bottom: 6px; font-weight: 500; }
.rejectblock p { margin: 0; font-size: 13.5px; color: var(--dim); }

/* ── The release, in the page ─────────────────────────────────────────── */
.legalgate { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 24px; }
.legalgate > h3 { font-size: 17px; margin-bottom: 16px; }

.releasewrap {
  background: #FCFAF6;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  margin: 4px 0 18px;
}
.releasehead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.releasehead h3 { font-size: 16px; min-width: 0; }
.releasewrap > .hint { font-size: 13.5px; color: var(--dim); margin: 0; }

.untranslated {
  background: var(--warn-soft);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 13.5px; line-height: 1.55;
  color: var(--amber-deep);
  margin: 12px 0 0;
}
.untranslated a { color: var(--amber-deep); font-weight: 600; }

.releasedoc { margin-top: 14px; }
.releasedoc > summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 10px;
  min-height: 44px;
  font-size: 14.5px; font-weight: 600;
}
.releasedoc > summary::-webkit-details-marker { display: none; }
.releasedoc > summary::after { content: "+"; margin-left: auto; color: var(--amber); font-size: 21px; font-weight: 400; }
.releasedoc[open] > summary::after { content: "–"; }
.releasebody {
  max-height: 360px;
  overflow-y: auto;
  overflow-x: auto;
  overscroll-behavior: contain;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 18px;
  font-size: 14px; line-height: 1.65;
}
.releasebody h4 { font-family: var(--display); font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; margin: 20px 0 7px; }
.releasebody h4:first-child { margin-top: 0; }
.releasebody p { margin: 0 0 10px; }
.releasebody ul { margin: 0 0 10px; padding-left: 20px; }
.releasebody li { margin-bottom: 5px; }
.releasebody a { color: var(--amber-deep); }

.consent.accept {
  background: var(--amber-soft);
  border: 1px solid #F3D7A6;
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-weight: 600;
}
.consent.accept:has(input:checked) { background: var(--ok-soft); border-color: #BFE3CE; }

/* T-5 §6.2 and §6.4 belong on the consent surface itself, not folded inside a
   collapsed document. Nothing here counts down toward a signature. */
.operative, .nodeadline {
  margin: 12px 0 0;
  font-size: 13.5px; line-height: 1.55;
}
.operative { font-weight: 600; color: var(--ink); }
.nodeadline { color: var(--dim); }
.releasewrap > .hint + .operative { margin-top: 10px; }
.releasewrap .hint a { color: var(--amber-deep); font-weight: 600; }

/* The T-5 retention table, inside the release body and on the public page. */
.releasebody table.t5table, .rettable table.t5table {
  width: 100%; border-collapse: collapse; margin: 4px 0 12px; font-size: 13.5px;
}
.t5table th, .t5table td {
  border: 1px solid var(--line); padding: 9px 11px;
  text-align: left; vertical-align: top; line-height: 1.5;
}
.t5table th { background: #F6F1E8; font-weight: 600; }
/* The retention table is three columns of prose inside an already-scrolling
   box. On a phone it is tightened until it fits rather than left to push a
   second scrollbar into the release. */
@media (max-width: 520px) {
  /* Matches the specificity of the base rule above, which is `table.t5table`
     and would otherwise win regardless of order. */
  .releasebody table.t5table { font-size: 12px; }
  .releasebody table.t5table th, .releasebody table.t5table td { padding: 6px 7px; }
}
.rettable { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rettable table.t5table { min-width: 520px; background: var(--panel); font-size: 14.5px; }
.rethead { font-size: 19px; margin: 4px 0 12px; }
.retcap { font-weight: 600; font-size: 14.5px; margin: 0 0 26px; }

/* ── The tape step, gated ─────────────────────────────────────────────────
   Inert is the real state here, not a visual hint: the input and the record
   button carry `disabled` until both releases are signed, and the server
   refuses the same submission in multer. The dimming just explains it. */
.tapestep.locked .tabs,
.tapestep.locked .filedrop,
.tapestep.locked .recorder { opacity: .5; }
.tapelock {
  margin: 0 0 14px;
  background: var(--amber-soft);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-size: 13.5px; line-height: 1.55;
  color: var(--amber-deep);
  font-weight: 600;
}
.tapestep > noscript .hint { display: block; margin-top: 12px; }

/* Screened out. This is a limit on us, so it reads as a plain statement, not
   as a rejection: no red, no alert styling, no exclamation. */
.ineligible {
  background: #FCFAF6;
  border: 1px solid var(--line);
  border-left: 4px solid var(--dim);
  border-radius: var(--r-md);
  padding: 18px 20px;
  max-width: 660px;
}
.ineligible p { margin: 0; font-size: 14.5px; line-height: 1.65; }
.ineligible h4 { font-size: 15.5px; margin: 0 0 8px; }

/* ── T-3 Part 1, at the top of the form ───────────────────────────────────
   Set apart from the rest of the form because it is not part of it: these two
   questions decide whether there is an application to make, and someone who
   answers them and stops should not have scrolled through a signup first. The
   revealed branches are quiet — same paper, no colour — because a branch that
   arrives in amber reads as a warning, and "you would record from where you
   are" is not a warning. */
.eligblock {
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: var(--r-md);
  background: #FCFAF6;
  padding: 22px 24px;
  margin: 0 0 30px;
}
.eligblock legend {
  font-family: var(--display);
  font-size: 19px; font-weight: 700; letter-spacing: -.02em;
  padding: 0 8px; margin-left: -8px;
}
.eligblock .eligsub { font-size: 14px; color: var(--dim); line-height: 1.6; margin: 6px 0 20px; max-width: 60ch; }
.eligblock .field + .field { margin-top: 18px; }
.eligreveal { margin-top: 18px; }
.eligcard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  max-width: 660px;
}
.eligcard.ok { border-left: 3px solid var(--ok); }
.eligcard h4 { font-size: 15px; margin: 0 0 7px; }
.eligcard p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--dim); }
.eligblock .ineligible { margin-top: 18px; }

@media (max-width: 640px) {
  .eligblock { padding: 18px 16px; }
}
/* The UA's `[hidden] { display: none }` loses to any author display rule, and
   .btn sets one — so hiding the submit button on the screened-out path did
   nothing until this existed. Anything hidden on these pages must be gone. */
.pub [hidden] { display: none; }

/* Stacked radio group for the Illinois question. */
.checkrow.stack { flex-direction: column; align-items: flex-start; gap: 8px; }
.checkrow.stack label { min-height: 34px; }

/* ── Inline language nudge on the dialect field ───────────────────────── */
.langnudge {
  margin: 10px 0 0;
  background: var(--amber-soft);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--amber-deep);
}
.langnudge a { color: var(--amber-deep); font-weight: 700; text-underline-offset: 3px; }

/* ── Recorder: the 4.5 minute floor made visible ──────────────────────── */
.recrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.recfloor { font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--dim); }
.rectimer.done { color: var(--ok); }
.recbar { height: 6px; border-radius: var(--r-pill); background: var(--line); margin-top: 14px; overflow: hidden; }
.recbar > i {
  display: block; height: 100%;
  background: var(--amber);
  border-radius: var(--r-pill);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  transition: transform .2s linear;
}
.recbar.done > i { background: var(--ok); }
.recnote { font-size: 13px; color: var(--dim); margin: 10px 0 0; }
.recnote.ok { color: #1D7544; font-weight: 600; }
.recnote.bad { color: var(--bad); font-weight: 600; }

/* ── Privacy and deletion pages ───────────────────────────────────────── */
.legalpage { border-top: none; padding-top: clamp(26px, 4vw, 48px); }
.legalpage h1 { font-size: clamp(28px, 3.4vw, 38px); margin-bottom: 10px; }
.legalpage > .sub { color: var(--dim); font-size: 16px; margin-bottom: 26px; max-width: 62ch; }
.legalpage.narrow .formcard, .legalpage.narrow .flash { max-width: 560px; }

.legalgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.legalitem { background: var(--panel); padding: 22px 24px; }
.legalitem h3 { font-size: 15.5px; margin-bottom: 8px; }
.legalitem p { color: var(--dim); font-size: 14.5px; margin: 0; line-height: 1.6; }
.legalitem a { color: var(--amber-deep); font-weight: 600; }

/* ── Landing odds and ends ────────────────────────────────────────────── */
.paynote { margin: 20px 0 0; color: var(--dim); font-size: 14.5px; max-width: 76ch; }
.applyalt { margin-top: 14px; font-size: 14px; color: var(--dim); }
.footcount { margin-left: auto; }

/* ── Hit targets on the public surface ────────────────────────────────── */
/* A text link is a 22px target at this font size. On the pages 3,500 people
   arrive at cold, every one of them clears the guideline. */
/* Scoped above the breakpoint on purpose: below it the topbar deliberately
   drops its section links, and re-declaring display here would bring them
   back and blow the 390px width. */
@media (min-width: 861px) {
  .pub .topbar nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 26px; }
}
.pub .footer a { display: inline-flex; align-items: center; min-height: 26px; }
.applyform .filedrop input[type=file] { font-size: 16px; }

@media (max-width: 640px) {
  .spechead { gap: 14px; }
  .spectake { font-size: 36px; }
  .footcount { margin-left: 0; }
}

@media (max-width: 520px) {
  /* Three things have to share 339px, and "Iniciar sesión" is wider than
     "Sign in". The eyebrow goes: it is repeated in the footer, and losing it
     is cheaper than wrapping every word in the bar. */
  .pub { padding: 0 14px; }
  .pub .topbar { gap: 10px; }
  .pub .topbar nav { gap: 10px; }
  .pub .topbar .logo-eyebrow { display: none; }
  .pub .topbar .logo-name { font-size: 19px; white-space: nowrap; }
  .pub .topbar nav a.btn { white-space: nowrap; padding: 0 10px; }
  .langswitch { gap: 4px; }
  .langswitch a, .langswitch b { padding: 0 2px; }
  .tabs button[role="tab"] { min-height: 44px; }
  .legalgate .consent { min-height: 44px; padding: 7px 0; }
  .checkrow.stack label { min-height: 44px; }
  .pub .footer a { min-height: 44px; }
}
