/* Onboarding styles. External (not inline) so the site's CSP `style-src 'self'` allows it.
   Loaded by signup.html AND by the key screen that verify.ts renders.

   REWRITTEN 2026-08-28 onto the design tokens after its email field measured 1.02:1 in light: it
   hard-coded a dark field while taking its ink from `var(--text, #e8efe9)`, and that fallback can
   NEVER apply because --text is always defined. There are no var() fallbacks here for that reason
   — on an always-defined token a fallback is dead code wearing the costume of a safety net.

   ARCHETYPE D, 2026-08-28: every control is a min-height FLOOR, never height from padding. The
   submit button had already drifted to 43px because its height came from padding plus a
   font-metric-dependent `line-height: normal`. --control-h is 2.75rem (44px), rem-based so it
   cannot sink if --fs-0 is retuned. */

.form-card { max-width: 640px; }
.field { margin: 0 0 18px; }
.field label { display: block; font-size: var(--fs-0); font-weight: 600; margin-bottom: 6px;
               color: var(--text); }
/* mapped: the design specifies `.field .input`; these pages use real element selectors */
.field input[type=email], .field input[type=text], .field select, .free-input {
  width: 100%; min-height: var(--control-h); padding: 0 var(--sp-sm);
  font: 400 var(--fs-0)/1.2 var(--font-ui);
  color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.field input::placeholder, .free-input::placeholder { color: var(--muted); }
.free-input { margin-top: 10px; }

/* the pill IS the tap target for a 16px checkbox — the design's `.pill`, mapped to `.opts label` */
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.opts label { display: inline-flex; align-items: center; gap: var(--sp-xs);
              min-height: var(--control-h); padding: 0 var(--sp-sm);
              border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
              cursor: pointer; color: var(--text); font-weight: 400; font-size: var(--fs-0); }
.opts label:hover { border-color: var(--brand); background: var(--tint-brand); }
.opts input, .consent input { width: 1rem; height: 1rem; accent-color: var(--brand); }
.muted-sm { color: var(--muted); font-size: var(--fs-0); }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 18px;
           min-height: var(--control-h); }
.consent input { margin-top: 3px; }

.btn-go { width: 100%; min-height: var(--control-h); background: var(--brand);
          color: var(--on-brand); border: 0; border-radius: var(--radius-sm);
          font: 500 var(--fs-0)/1 var(--font-ui); cursor: pointer; }
.btn-go:hover { background: var(--brand-hover); }
.btn-go[disabled] { opacity: .55; cursor: not-allowed; }
.note { color: var(--danger); font-size: var(--fs-0); margin-top: 10px; min-height: 18px; }
.success { display: none; }

/* ---- the key screen (rendered by verify.ts) ------------------------------------------------
   NO copy button: it would be the site's second script. `user-select: all` gives one-tap
   selection in pure CSS, and the label says so. */
.key-panel { max-width: 30rem; margin: var(--sp-2xl) auto; padding: 0 var(--sp-md); }
.key-box { background: var(--code-bg); border-radius: var(--radius-sm); padding: var(--sp-md); }
.key-value { font: 500 var(--fs-1)/1.4 var(--font-mono); color: var(--code-text);
             overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
/* pre-wrap alone only breaks at whitespace, and the endpoint id has none */
.key-panel pre { white-space: pre-wrap; overflow-wrap: anywhere;
                 background: var(--code-bg); color: var(--code-text);
                 border-radius: var(--radius-sm); padding: var(--sp-sm); }
/* minmax(0,1fr): a grid item's automatic min-width is its content, so long code would otherwise
   widen the panel rather than wrap inside it */
.key-panel .cols { display: grid; gap: var(--sp-sm);
                   grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
@media (max-width: 560px) { .key-panel .cols { grid-template-columns: minmax(0,1fr); } }
.key-panel .btn { min-height: var(--control-h); }
/* the state that means "this will never be shown again" */
.key-box.unmailed { box-shadow: 0 0 0 2px var(--gold); }
.alert-spent { background: var(--tint-gold); padding: var(--sp-sm) var(--sp-md);
               border-block: 1px solid color-mix(in oklab, var(--gold) 35%, var(--surface)); }
.alert-spent .eyebrow { color: var(--warn-ink); font-weight: 700; }

pre.snippet { background: var(--code-bg); color: var(--code-text); padding: 14px;
              border-radius: var(--radius-sm); overflow-x: auto; white-space: pre-wrap;
              overflow-wrap: anywhere; font-size: 12.5px; }
.keybox { background: var(--brand-soft); border: 1px solid var(--brand);
          border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text);
          font-family: var(--font-mono); font-size: 14px; overflow-wrap: anywhere;
          -webkit-user-select: all; user-select: all; }
.copy { background: var(--brand); color: var(--on-brand); border: 0; border-radius: 8px;
        min-height: var(--control-h); padding: 6px 14px; font-size: 12.5px; font-weight: 600;
        cursor: pointer; margin-left: 8px; }

.mt6 { margin-top: 6px; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; }
