@import url("/assets/tokens.css");
@import url("/assets/board.css");

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--ground); color: var(--text); }
body { font: 400 var(--fs-body)/1.5 var(--font-body); }
/* Back Out Web is for titles only, and it has one weight: 400. */
h1, h2 { font-family: var(--font-display); font-weight: 400; margin: 0; }
h1 { font-size: var(--fs-title); line-height: 1.25; letter-spacing: 0.01em; overflow-wrap: anywhere; hyphens: auto; }
p { margin: 0; }
.dim { color: var(--text-dim); font-size: var(--fs-secondary); line-height: 1.45; }
.faint { color: var(--text-faint); font-size: var(--fs-caption); line-height: 1.4; }
::placeholder { color: var(--text-faint); opacity: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Phone. Every screen runs in the same order: eyebrow, title, sub-line, content, spacer, primary action, one quiet action. */
.phone { max-width: 480px; min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-5) 20px calc(var(--space-5) + env(safe-area-inset-bottom, 0px)); }
.phone .spacer { flex: 1; }
/* The reconnecting line: small and dim, never a banner or a modal. */
.phone .status { min-height: 20px; text-align: center; color: var(--text-dim); font-size: var(--fs-caption); line-height: 1.4; }
.eyebrow { font-size: var(--fs-label); font-weight: 600; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); }
/* A title with its sub-line: 4px between a label and the thing it labels, like the eyebrow above it. */
.head { display: flex; flex-direction: column; gap: var(--space-1); }
.head h1 + .dim { margin-top: var(--space-1); }

/* The action zone stays at the foot of the screen, and on a long screen follows the thumb rather than waiting at the end of the list. */
.foot { position: sticky; bottom: 0; display: flex; flex-direction: column; gap: var(--space-2); background: var(--ground);
  padding: var(--space-2) 0 0; margin-bottom: calc(-1 * env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); }

.primary { width: 100%; height: 52px; border-radius: var(--radius-action); border: 1.5px solid var(--accent);
  background: var(--accent-wash); color: var(--text); font: 600 16px var(--font-body); cursor: pointer; }
.primary, .option { transition: border-color 120ms, background-color 120ms; }
.primary:disabled { border: 1px solid var(--hairline); background: transparent; color: var(--text-faint); cursor: default; }
.quiet { min-height: 44px; min-width: 44px; background: none; border: 0; color: var(--text-faint); font: 400 var(--fs-secondary) var(--font-body); cursor: pointer; text-align: center; }

.wordmark { height: 40px; width: auto; align-self: flex-start; }
.lockup { display: flex; align-items: center; gap: var(--space-3); color: var(--text-dim); }
.mark { width: 24px; height: 24px; flex: none; color: var(--text-faint); }
.welcome h1 { font-size: 34px; line-height: 1.15; }
.welcome-motifs { display: flex; gap: var(--space-3); color: var(--text-faint); }

/* Motion: option select 120ms, screen crossfade 200ms, nudge fade 600ms. All three are instant under reduced motion. */
@keyframes screen-in { from { opacity: 0; } to { opacity: 1; } }
.phone.fade { animation: screen-in 200ms ease-out; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; background: var(--surface); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  padding: var(--space-5) 20px calc(var(--space-5) + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: var(--space-4); max-height: 90vh; overflow-y: auto; }

/* Choice screens: the one option row, used by every selection. */
.options { display: flex; flex-direction: column; gap: var(--space-2); }
.option { text-align: left; min-height: 56px; padding: 14px var(--space-4); border-radius: var(--radius-option); border: 1px solid var(--hairline);
  background: var(--surface); color: var(--text); font: 400 var(--fs-body) var(--font-body); cursor: pointer; display: flex; flex-direction: column; gap: 2px;
  overflow-wrap: anywhere; }
.option[aria-pressed="true"] { border: 1.5px solid var(--accent); background: var(--accent-wash); }
.option-name { font-weight: 600; line-height: 1.25; hyphens: auto; overflow-wrap: anywhere; }
.option-note { color: var(--text-dim); font-size: var(--fs-secondary); line-height: 1.4; overflow-wrap: anywhere; }
.options.words { flex-direction: row; flex-wrap: wrap; }
.option.word { min-height: 44px; padding: var(--space-2) 14px; }

/* An option with an icon: a 24 by 24 slot to the left of the name. The icon files are Kirsten's (filled, not line); see docs/artwork-handover.md. */
.option.has-icon { flex-direction: row; align-items: flex-start; gap: var(--space-3); }
.option-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.icon { width: 24px; height: 24px; flex: none; color: var(--text-dim); display: block; }
.icon svg, .icon img { width: 24px; height: 24px; display: block; }

.text { width: 100%; min-height: 56px; padding: var(--space-4); border-radius: var(--radius-option); border: 1px solid var(--hairline);
  background: var(--surface); color: var(--text); font: 400 var(--fs-body) var(--font-body); }
.reason { min-height: 20px; text-align: center; }
.nav { display: flex; justify-content: space-between; }
.nav .quiet:disabled { visibility: hidden; }
.text.tall { height: auto; min-height: 96px; resize: none; line-height: 1.45; overflow-wrap: anywhere; }
.option-card { display: flex; flex-direction: column; align-items: flex-start; }
.option-card .option { width: 100%; }
.option-card .more { min-height: 44px; padding: 0 var(--space-2); color: var(--text-dim); text-decoration: underline; }

/* Two-column grid for word-only cards: all eight fit without scrolling. */
.options.grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.options.grid .option { min-height: 64px; justify-content: center; text-align: center; align-items: center; padding-left: var(--space-3); padding-right: var(--space-3); }
.options.grid .option-note:empty { display: none; }

/* First-instinct nudge: a quiet dashed band, plainly not a button. It fades in and stays, and reserves its space so nothing shifts. */
.nudge { min-height: 40px; padding: 10px; border: 1px dashed transparent; border-radius: 12px; text-align: center;
  color: var(--text-faint); font-size: var(--fs-caption); line-height: 1.4; opacity: 0; transition: opacity 600ms; cursor: default; user-select: none; -webkit-user-select: none; pointer-events: none; }
.nudge.on { opacity: 1; border-color: var(--hairline); }
.nudge.instant { transition: none; }

/* Recall panels: the Change they named, the scenario they chose. */
/* Neither an action nor a selection, so no accent: a hairline rule and the raised fill (copy pack, Decisions). */
.recall { padding: var(--space-3) var(--space-4); border-left: 2px solid var(--hairline); border-radius: 0 12px 12px 0; background: var(--raised); overflow-wrap: anywhere; hyphens: auto; display: flex; flex-direction: column; gap: var(--space-1); }
/* Talk: one raised sheet holding the title and both questions, compact enough that both show on a 320 by 568 screen. */
.talk-sheet { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-action); }
.talk-questions { margin: 0; padding-left: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); font-size: 18px; line-height: 1.35; }
.talk-questions li::marker { color: var(--text-faint); font-weight: 600; }
.label { font-weight: 600; }
.phone h2 { font-size: 18px; margin-top: var(--space-3); }

/* Waiting: a placeholder image slot, kept to the width of the screen. */
.waiting-art { width: 100%; height: auto; aspect-ratio: 680 / 470; object-fit: contain; border-radius: var(--radius-action); background: var(--raised); display: block; }

/* Board */
.live-board { width: 100%; }
.phone input[type="email"].text { font-size: var(--fs-body); }

/* Keep: email and interest. The same warning treatment as the console's fields. */
.phone .text.invalid, .phone .options.invalid .option { border-color: var(--warning); }
.phone .warn { color: var(--warning); font-size: var(--fs-secondary); line-height: 1.45; }
.phone .warn:empty { display: none; }

/* Any value that could overflow its slot (Unspontaneous, Holistic Health Practitioner, a typed Name) hyphenates or breaks rather than spilling. */
.phone { overflow-wrap: anywhere; }
/* Hyphenation is for values and names. Running prose keeps whole words and only breaks if a word cannot fit at all. */
.phone .option-name, .phone .option.word, .phone .recall, .phone .text { hyphens: auto; }
.welcome.head { gap: var(--space-3); }
[hidden] { display: none !important; }
.head .eyebrow { margin-bottom: var(--space-1); }

/* Scene artwork (welcome and closing): decorative, so it never takes more room than a phone can spare. */
.scene-art { display: block; width: 100%; height: auto; border-radius: var(--radius-action); }
.welcome-art { max-height: 38vh; object-fit: cover; }
.closing-art { max-width: 536px; margin-inline: auto; }

/* Keep: the email and download screens (#28). The wrapper spaces the pack's order: field, consent line, What we keep, question, options, tick box. */
.contact { display: flex; flex-direction: column; gap: var(--space-3); }
.contact > p { margin: 0; }
.contact > .quiet { align-self: flex-start; min-height: 44px; padding-inline: 0; text-decoration: underline; }
.contact .options { gap: var(--space-2); }
.phone .reason { color: var(--text-dim); font-size: var(--fs-secondary); line-height: 1.4; }
.phone .reason:empty { display: none; }
/* The tick box: a real checkbox, quieter than the three options above it so it never reads as a fourth. */
.tick { display: flex; align-items: center; gap: var(--space-3); min-height: 44px; cursor: pointer; color: var(--text); font-size: var(--fs-body); line-height: 1.3; }
.tick input { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: 1.5px solid var(--text-faint); border-radius: 6px; background: transparent; display: grid; place-content: center; cursor: pointer; }
.tick input::after { content: ""; width: 12px; height: 7px; border: solid var(--ground); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.tick input:checked { background: var(--accent); border-color: var(--accent); }
.tick input:checked::after { opacity: 1; }

/* The privacy sheet: short paragraphs, each led by its bold phrase, in the sheet's own column. */
.sheet-item { margin: 0; line-height: 1.5; overflow-wrap: break-word; hyphens: manual; }
.sheet-item strong { color: var(--text); font-weight: 600; }
