/* Founding 101 — application page.
   Follows "Founding 101 v2 - Apply" in the Claude Design package, plus the
   student path ("ask a grown-up") approved on 10 Oct. Standalone: it does not
   load /styles.css, which is sized to the countdown's fixed stage. */

:root {
  --bg: #060F22;
  --text: #F7F8FB;
  --text-2: #D6DBE2;
  --dim: #AAB3BF;
  --faint: #8A94A3;
  --blue: #9EC5FF;
  --peach: #FFB47A;
  --coral: #FF7E6B;
  --err: #FF8A7A;
  --err-text: #FFB4A8;
  --field: rgba(255,255,255,.04);
  --field-focus: rgba(255,255,255,.07);
  --line: rgba(255,255,255,.16);
  --cta: linear-gradient(90deg, #FF7E6B, #FFB47A);
  --ink: #16100A;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --ui: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.16,.84,.3,1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { color: var(--text); font-family: var(--ui); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: #fff; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--peach); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.layout { display: grid; grid-template-columns: minmax(320px, 42%) minmax(0, 1fr); min-height: 100vh; }

.art { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--bg); }
/* A close crop on the ring of stars, as in the approved flow designs: the
   art is scaled up around the ring (53% across, near the top) and fades
   to the page colour under the copy. Sized from the panel's height, so it
   holds the same crop at any desktop width. */
.art-img { position: absolute; top: -14.4%; left: 50%; height: 180%; width: auto; max-width: none; transform: translateX(-53.2%); display: block; }
.art-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,15,34,0) 26%, rgba(6,15,34,.85) 52%, #060F22 72%); }
.art-inner { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 24px clamp(20px, 3vw, 40px) clamp(24px, 3vw, 40px); }
.logo { display: inline-flex; align-self: flex-start; padding: 6px 0; }
.logo img { display: block; width: 150px; height: auto; }
.art-copy { display: flex; flex-direction: column; gap: 14px; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--peach); }
.art-copy h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(36px, 3.4vw, 52px); line-height: 1.04; letter-spacing: -.015em; }
#art-sub { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-2); max-width: 40ch; }

.steps { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 10px 0; font-size: 15px; font-weight: 500; color: var(--dim); }
.steps .dot { width: 30px; height: 30px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--text); border: 1px solid rgba(255,255,255,.3); }
.steps li.done { color: var(--text-2); }
.steps li.done .dot { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
.steps li.current { color: #fff; font-weight: 600; }
.steps li.current .dot { background: linear-gradient(135deg, #FF7E6B, #FFB47A); color: var(--ink); border-color: transparent; }

/* The form column sits beside the art rather than centred in what's left,
   so on a wide screen it doesn't drift off to the right. */
main { display: flex; justify-content: flex-start; padding: clamp(28px, 5vw, 72px) clamp(20px, 4vw, 56px) 72px clamp(28px, 5vw, 88px); }
.col { width: min(100%, 600px); display: flex; flex-direction: column; gap: 28px; }
.view { display: flex; flex-direction: column; gap: 26px; }
.view.enter { animation: rise .45s var(--ease) both; }

/* ── Type ───────────────────────────────────────────────────────────────── */
.head { display: flex; flex-direction: column; gap: 12px; }
.head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3.6vw, 44px); line-height: 1.08; text-wrap: balance; outline: none; }
.lede { margin: 0; font-size: 16px; line-height: 1.6; color: var(--dim); text-wrap: pretty; }
.lede strong { color: #fff; }
.note { margin: 0; font-size: 13px; line-height: 1.55; color: var(--faint); }
.dim { color: var(--dim); }
.peach { color: var(--peach); }
.help { font-size: 13px; color: var(--faint); }
.opt { font-weight: 400; color: var(--dim); }

.topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--dim); }
.topline a { color: var(--dim); }
.topline a:hover { color: #fff; }
.tag { padding: 6px 12px; border-radius: 999px; background: rgba(255,180,122,.12); color: var(--peach); font-size: 12px; font-weight: 600; letter-spacing: .04em; }

/* ── Fork ───────────────────────────────────────────────────────────────── */
.choices { display: flex; flex-direction: column; gap: 14px; }
.choice { display: flex; align-items: center; gap: 18px; width: 100%; text-align: left; padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, background .2s; }
.choice:hover { border-color: rgba(255,180,122,.6); background: rgba(255,255,255,.06); }
.choice-icon { width: 50px; height: 50px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.choice-icon.blue { background: rgba(158,197,255,.12); color: var(--blue); }
.choice-icon.peach { background: rgba(255,180,122,.12); color: var(--peach); }
.choice-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.choice-text strong { font-size: 18px; font-weight: 600; }
.choice-text span { font-size: 15px; color: var(--dim); }
.choice-arrow { color: var(--dim); font-size: 20px; }

/* ── Fields ─────────────────────────────────────────────────────────────── */
form { display: flex; flex-direction: column; gap: 22px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .label { font-size: 14px; font-weight: 600; line-height: 1.45; }
input[type=text], input[type=email], select, textarea {
  font: inherit; font-size: 16px; color: var(--text);
  background: var(--field); border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 16px; outline: none; width: 100%;
  transition: border-color .2s, background .2s;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 22px) 55%, calc(100% - 16px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
select option { background: #0C1424; color: var(--text); }
textarea { line-height: 1.5; resize: vertical; min-height: 130px; }
input::placeholder, textarea::placeholder { color: #6B7686; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); background-color: var(--field-focus); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
.upper { text-transform: uppercase; }
.invalid input, .invalid select, .invalid textarea, input.invalid, .check.invalid { border-color: var(--err) !important; }
.err { font-size: 13px; color: var(--err-text); min-height: 0; }
.err:empty { display: none; }
.split { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.count { color: var(--faint); margin-left: auto; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }

.check { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); font-size: 15px; line-height: 1.5; cursor: pointer; font-weight: 400 !important; }
.check input { appearance: none; width: 22px; height: 22px; flex: none; margin: 0; border-radius: 6px; border: 1px solid rgba(255,255,255,.35); background: transparent; display: grid; place-content: center; cursor: pointer; }
.check input::before { content: ''; width: 12px; height: 7px; border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: linear-gradient(135deg, #FF7E6B, #FFB47A); border-color: transparent; }
.check input:checked::before { opacity: 1; }
.check input:focus-visible { outline: 2px solid var(--peach); outline-offset: 3px; }
.check a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.age-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.chip { font: inherit; font-size: 14px; font-weight: 500; padding: 9px 15px; border-radius: 999px; cursor: pointer; color: var(--text-2); background: rgba(255,255,255,.03); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.chip.big { font-size: 16px; font-weight: 600; padding: 16px 10px; border-radius: 14px; }
.chip:hover { border-color: rgba(255,180,122,.55); }
.chip[aria-pressed=true], .chip[aria-checked=true] { color: #fff; background: rgba(255,180,122,.16); border-color: var(--peach); }
.invalid .chip:not([aria-checked=true]):not([aria-pressed=true]) { border-color: var(--err); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.cta { align-self: flex-start; display: inline-flex; align-items: center; gap: 12px; background: var(--cta); color: var(--ink); font: inherit; font-weight: 600; font-size: 16px; padding: 16px 28px; border-radius: 999px; border: 0; cursor: pointer; box-shadow: 0 12px 30px rgba(255,126,107,.3); transition: box-shadow .25s, filter .25s, opacity .2s; }
.cta:hover { color: var(--ink); box-shadow: 0 14px 36px rgba(255,126,107,.48); filter: brightness(1.04); }
.cta[aria-busy=true] { opacity: .6; cursor: progress; }
.cta.small, .ghost.small { padding: 12px 20px; font-size: 15px; }
.ghost { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,.06); color: var(--text); font: inherit; font-weight: 600; font-size: 15px; padding: 14px 24px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); cursor: pointer; transition: background .2s; }
.ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.link-btn { background: none; border: 0; padding: 12px 2px; color: var(--blue); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-align: left; }
.topline .link-btn { color: var(--dim); font-size: 14px; padding: 4px 0; }
.link-btn:hover { color: #fff; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.nav .cta { align-self: auto; }
.nav .back { color: var(--text-2); }

.aside-link { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--faint); }
.inline-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--blue); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(158,197,255,.4); text-underline-offset: 3px; }
.inline-link:hover { color: #fff; text-decoration-color: #fff; }
.student-hint { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; text-align: left; background: rgba(158,197,255,.06); border: 1px solid rgba(158,197,255,.2); border-radius: 14px; padding: 14px 16px; cursor: pointer; color: var(--text); font: inherit; font-size: 15px; line-height: 1.45; }
.student-hint:hover { background: rgba(158,197,255,.12); border-color: rgba(158,197,255,.4); }
.student-hint > span:last-child { color: var(--blue); flex: none; }

.guardian-err { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 14px; background: rgba(255,180,122,.08); }
.err-text { font-size: 14px; color: var(--err-text); }
.student-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: none; border: 0; padding: 0; font: inherit; color: #fff; text-align: left; cursor: pointer; }
.student-link > span:first-child { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.student-link strong { font-size: 15px; }
.student-link .peach { font-size: 15px; font-weight: 600; white-space: nowrap; }
.student-link:hover .peach { color: #FFD3B0; }

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.err-box { display: flex; gap: 14px; align-items: flex-start; background: rgba(255,126,107,.1); border: 1px solid rgba(255,138,122,.45); border-radius: 16px; padding: 16px 18px; margin: 0; font-size: 14px; line-height: 1.5; }
.err-box > div { display: flex; flex-direction: column; gap: 2px; }
.err-box strong { font-size: 15px; font-weight: 600; }
.err-box span { color: #FFC9BF; }
.err-box.net { flex-direction: column; }
.err-box.net.offline { background: rgba(158,197,255,.08); border-color: rgba(158,197,255,.4); }
.err-box.net.offline span { color: var(--text-2); }
.bang { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--err); color: var(--ink); font-size: 13px; font-weight: 700; display: flex !important; align-items: center; justify-content: center; }
p.err-box { color: #FFC9BF; }

/* ── Progress ───────────────────────────────────────────────────────────── */
.progress-wrap { display: flex; flex-direction: column; gap: 12px; }
.bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.bar-fill { height: 100%; width: 25%; background: linear-gradient(90deg, #9EC5FF, #FFB47A); transition: width .5s var(--ease); }

/* ── Student path ───────────────────────────────────────────────────────── */
.promise { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: rgba(158,197,255,.06); border: 1px solid rgba(158,197,255,.18); color: var(--blue); }
.promise svg { flex: none; margin-top: 2px; }
.promise p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.promise strong { color: #fff; }
.or { display: flex; align-items: center; gap: 14px; font-size: 12px; letter-spacing: .1em; color: var(--faint); }
.or span { flex: 1; height: 1px; background: rgba(255,255,255,.12); }
.share-self { display: flex; flex-direction: column; gap: 10px; }
.share-self strong { font-size: 15px; }
.share-row { display: flex; gap: 10px; }
.share-url { flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 16px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.22); color: var(--text-2); font-size: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.why { border-radius: 20px; background: rgba(158,197,255,.06); border: 1px solid rgba(158,197,255,.16); padding: 6px 24px 24px; }
.why summary { list-style: none; cursor: pointer; padding: 18px 0 6px; font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.why summary::-webkit-details-marker { display: none; }
.why summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim); transform: rotate(-135deg); margin-right: 4px; transition: transform .2s; }
.why:not([open]) summary::after { transform: rotate(45deg); }
.why-list { display: flex; flex-direction: column; gap: 16px; padding-top: 12px; }
.why-list div { display: flex; flex-direction: column; gap: 3px; }
.why-list strong { font-size: 15px; }
.why-list span { font-size: 14px; line-height: 1.55; color: var(--dim); }

.sent-star { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(255,180,122,.28), rgba(255,180,122,.06) 70%); border: 1px solid rgba(255,180,122,.4); }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card { border-radius: 20px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.03); }
.card.list { display: flex; flex-direction: column; padding: 6px 22px; }
.card.list > div { display: flex; flex-direction: column; gap: 3px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.card.list > div:last-child { border-bottom: 0; }
.card.list strong { font-size: 15px; font-weight: 600; }
.card.list span { font-size: 14px; line-height: 1.5; color: var(--dim); }
.card-label { margin: 0; padding-top: 12px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.card.share { display: flex; flex-direction: column; gap: 12px; padding: 22px; background: linear-gradient(135deg, rgba(255,126,107,.14), rgba(142,119,255,.10)); border-color: rgba(255,180,122,.3); }
.card.share > span { font-size: 15px; line-height: 1.5; color: var(--text-2); }
.share-title { font-family: var(--display); font-weight: 400; font-size: 24px; }
.status-pill { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: #7FE3C8; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2BB39E; box-shadow: 0 0 0 4px rgba(43,179,158,.2); }
.back-home { align-self: flex-start; font-size: 15px; font-weight: 600; }

/* ── Summary ────────────────────────────────────────────────────────────── */
.summary { margin: 0; display: flex; flex-direction: column; border-top: 1px solid rgba(255,255,255,.12); }
.summary > div { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.12); align-items: baseline; }
.summary dt { font-size: 13px; color: var(--dim); }
.summary dd { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.summary button { background: none; border: 0; color: var(--blue); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 0; }

/* ── Phone ──────────────────────────────────────────────────────────────── */
@media (max-width: 899px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .art { position: relative; height: 210px; }
  .art-copy { display: none; }
  .art-img { top: 50%; left: 50%; width: 375%; height: auto; transform: translate(-53.2%, -30%); }
  .art-shade { background: linear-gradient(180deg, rgba(6,15,34,.15), rgba(6,15,34,.1) 45%, var(--bg) 100%); }
  main { padding-top: 8px; padding-left: clamp(20px, 4vw, 56px); justify-content: center; }
}
@media (max-width: 520px) {
  .choice { padding: 18px; gap: 14px; }
  .choice-icon { width: 44px; height: 44px; }
  .share-row { flex-direction: column; }
  .share-url { min-height: 48px; }
  .share-row .ghost { justify-content: center; }
  .summary > div { grid-template-columns: minmax(0, 1fr) auto; }
  .summary dt { grid-column: 1 / -1; }
  .student-link { flex-direction: column; align-items: flex-start; }
  .nav .cta { padding: 16px 22px; }
}

/* ── Motion ─────────────────────────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Consent notice (consent.js) — same look as the countdown's ─────────── */
.consent { position: fixed; z-index: 50; inset-inline: 0; margin-inline: auto; bottom: max(16px, env(safe-area-inset-bottom, 0px)); width: min(640px, calc(100vw - 32px)); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 16px 20px; border-radius: 18px; border: 1px solid; border-color: rgba(180,200,255,.55) rgba(255,205,215,.44) rgba(255,205,190,.55) rgba(180,200,255,.44); background: rgba(10,14,40,.94); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2); box-shadow: 0 18px 50px rgba(0,0,0,.45); animation: rise .5s var(--ease) both; }
body.kid .consent { display: none !important; }
.consent-copy { flex: 1 1 280px; min-width: 0; }
.consent-title { margin: 0 0 3px; font-family: var(--display); font-weight: 400; font-size: 16.5px; line-height: 1.3; }
.consent-text { margin: 0; font-size: 13.5px; line-height: 1.55; color: #DDE2F4; }
.consent-text a { color: #A9C4FF; text-decoration: underline; text-underline-offset: 2px; }
.consent-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.consent-btn { font: inherit; font-size: 13.5px; font-weight: 500; padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(190,205,255,.5); background: rgba(120,150,255,.12); color: #fff; cursor: pointer; }
.consent-btn:not(.consent-btn--yes):hover { background: rgba(160,185,255,.28); }
.consent-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.consent-btn--yes:active { filter: brightness(.96); box-shadow: none; }
.consent-btn--yes, .consent-btn--yes:hover { border-color: transparent; background: linear-gradient(90deg, #FFBE8C, #F6A2CB); color: #1A1330; font-weight: 600; }
@media (max-width: 560px) {
  .consent { gap: 12px; padding: 14px 16px; bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 28px); }
  .consent-actions { width: 100%; flex-direction: column; gap: 8px; }
  .consent-btn { width: 100%; padding: 13px 18px; }

  /* Allow above No thanks, as on the countdown. Stacked on a phone, if
     anything still clips the bottom of the notice it can then only ever cost
     the decline -- never the accept. The DOM order is unchanged and focus
     already starts on Allow. */
  .consent-btn--yes { order: -1; }
}

/* The notice is fixed to the bottom of the viewport, and the button someone is
   reaching for -- Continue, or Send them the link -- sits at the end of the
   step. Reserve room for the notice instead of letting it cover that button.
   It is only in the DOM until a choice is made, hence :has(). */
body:has(.consent):not(.kid) main { padding-bottom: 180px; }
@media (max-width: 560px) { body:has(.consent):not(.kid) main { padding-bottom: 240px; } }
