/* Free Exam P and FM page (free.html only). Loaded after page.css, which
   supplies the shared chrome: the graph-paper canvas, tokens, header, the
   sheets (.panel) and their rhythm, section title, reveals, footer, toast.
   So this page is the same site as the home page: the $0 receipts lie on
   the paper the way the hero's study objects do, and "How to start" and the
   FAQ are the same sheets as the home page's sections, one rhythm apart.
   Every colour is a Clear token or a page token defined once per theme. */

/* ── Page tokens ───────────────────────────────────────────────────
   Receipts: bright paper and a slate-ink paper shadow in light; a raised
   card catching a top-edge light, deep shadow in dark. Wells: the inset
   panel at the top of each step, with mini UI sitting in it. */
:root, .theme-light {
  --slip: #ffffff;
  --slip-rule: var(--border);
  --slip-rule-strong: var(--card-foreground);
  --slip-edge: inset 0 0 0 1px rgb(22 29 40 / 0.06);
  --slip-shadow: drop-shadow(0 1px 1px rgb(22 29 40 / 0.06)) drop-shadow(0 6px 10px rgb(22 29 40 / 0.06)) drop-shadow(0 22px 30px rgb(22 29 40 / 0.12));
  --well: var(--background);
  --well-item: var(--paper);
}
.theme-dark {
  --slip: var(--popover);
  --slip-rule: #4e545c;
  --slip-rule-strong: var(--muted-foreground);
  --slip-edge: inset 0 1px 0 rgb(255 255 255 / 0.07), inset 0 0 0 1px rgb(255 255 255 / 0.06);
  --slip-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / 0.3)) drop-shadow(0 8px 14px rgb(0 0 0 / 0.3)) drop-shadow(0 26px 34px rgb(0 0 0 / 0.42));
  --well: var(--muted);
  --well-item: var(--surface-raised);
}

/* Maths: hidden until MathJax has typeset it (page.js adds .tex-ready). */
.js:not(.tex-ready) .tex { visibility: hidden; }

/* ── P and FM free: "the $0 receipt" ──────────────────────────────
   Each free course is an itemised order slip: what you get, line by line,
   then Total $0.00. Paper follows the page theme. Lane colours mark each
   line (the same dots Clear's Today uses); green is kept for money and
   the stamp. The slips sit straight, side by side with their tops level,
   and hold still: they are there to be read and compared. Heading centred
   above the receipts. */
/* overflow-x: clip keeps the landing stamp (scaled up mid-animation) from
   widening a phone's page; nothing at rest reaches the edge. */
.free { padding: 128px 0 0; overflow-x: clip; }
.free__inner { display: grid; grid-template-columns: 1fr; gap: 56px; justify-items: center; align-items: center; }
.free__copy--center { text-align: center; max-width: 720px; }
.free__title { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.05; }
.free__lede { margin: 16px auto 0; max-width: 600px; text-wrap: balance; font-size: 18px; line-height: 1.55; color: var(--muted-foreground); }

.free__slips { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; width: 100%; max-width: 760px; }
.slip__tilt { filter: var(--slip-shadow); }
/* The paper: square-cornered at the top, a torn zigzag along the bottom. */
.slip__paper {
  --z: 7px;
  position: relative; padding: 26px 26px calc(26px + var(--z));
  background: var(--slip); color: var(--card-foreground); border-radius: 3px 3px 0 0;
  box-shadow: var(--slip-edge);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--z)) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--z)) 100%;
}
.slip__course, .slip__items, .slip__terms { border-top: 1px dashed var(--slip-rule); }

.slip__head { text-align: center; }
.slip__mark { width: 22px; height: 18px; flex-shrink: 0; color: var(--brand); }
.slip__store { display: flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--card-foreground); }
.slip__kind { margin-top: 3px; font-family: var(--font-mono); font-size: 11px; line-height: 16px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }

.slip__course { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 18px; }
.slip__title { font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -0.028em; color: var(--card-foreground); }
.slip__sub { margin-top: 3px; font-size: 14px; line-height: 20px; color: var(--muted-foreground); }

/* Rubber stamp: green ink, double frame, set at an angle. */
.stamp { flex-shrink: 0; display: inline-flex; flex-direction: column; align-items: center; padding: 7px 11px 6px; margin-right: 2px; border: 2px solid var(--primary-text); border-radius: 7px; box-shadow: inset 0 0 0 2px var(--slip), inset 0 0 0 3px var(--primary-text); color: var(--primary-text); font-family: var(--font-mono); text-transform: uppercase; transform: rotate(-11deg); }
.stamp b { font-size: 22px; line-height: 1; font-weight: 800; letter-spacing: 0.14em; margin-right: -0.14em; }
.stamp small { margin-top: 3px; font-size: 10px; line-height: 12px; font-weight: 700; letter-spacing: 0.12em; }
.free__slips > .slip:nth-child(2) .stamp { transform: rotate(8deg); }

.slip__items { margin-top: 18px; padding-top: 10px; }
.slip__items li { display: grid; grid-template-columns: minmax(0, 1fr) auto 3.3em; gap: 0 10px; align-items: baseline; padding: 7px 0; }
.slip__item { position: relative; padding-left: 18px; font-size: 15px; line-height: 21px; font-weight: 600; color: var(--card-foreground); }
.slip__item::before { content: ""; position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--tone); }
.slip__item small { display: block; margin-top: 1px; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--muted-foreground); }
.slip__qty, .slip__price { font-family: var(--font-mono); font-size: 13px; line-height: 21px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.slip__qty { font-weight: 700; text-transform: uppercase; color: var(--tone); }
.slip__qty--inf { font-family: var(--font-sans, inherit); font-size: 20px; line-height: 16px; font-weight: 600; }
.slip__price { color: var(--card-foreground); }

.slip__terms { margin-top: 10px; padding-top: 10px; font-family: var(--font-mono); font-size: 12px; line-height: 18px; }
.slip__terms div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 3px 0; }
.slip__terms dt { color: var(--muted-foreground); }
.slip__terms dd { margin: 0; font-weight: 600; color: var(--card-foreground); text-align: right; }
.slip__terms .slip__joke { align-items: center; }
.slip__joke .tex { font-size: 16px; }

.slip__total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 10px; padding-top: 14px; border-top: 3px double var(--slip-rule-strong); }
.slip__total span { font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--card-foreground); }
.slip__total strong { font-family: var(--font-mono); font-size: 38px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; color: var(--primary-text); font-variant-numeric: tabular-nums; }
.slip__cta { margin-top: 20px; }

.slip__foot { margin-top: 22px; text-align: center; }
.barcode { display: block; width: 168px; max-width: 70%; height: 30px; margin: 0 auto; color: var(--card-foreground); background:
  linear-gradient(90deg, currentColor 0 2px, transparent 2px 4px, currentColor 4px 5px, transparent 5px 8px, currentColor 8px 11px, transparent 11px 12px, currentColor 12px 13px, transparent 13px 16px, currentColor 16px 18px, transparent 18px 19px, currentColor 19px 20px, transparent 20px 23px, currentColor 23px 26px, transparent 26px 27px, currentColor 27px 28px, transparent 28px 31px, currentColor 31px 32px, transparent 32px 34px, currentColor 34px 36px, transparent 36px 37px) 0 0 / 37px 100% repeat-x; }
.slip__foot p { margin-top: 10px; font-family: var(--font-mono); font-size: 11.5px; line-height: 16px; color: var(--muted-foreground); }

/* The stamp settles in once, a beat after its slip scrolls in: a short
   fade and a small press, nothing that moves the slip. */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.orbit-static) .slip .stamp { opacity: 0; }
  .js:not(.orbit-static) .slip.is-in .stamp { animation: stamp-land 320ms var(--ease-signature) calc(var(--rd, 0ms) + 450ms) both; }
}
@keyframes stamp-land {
  from { opacity: 0; scale: 1.15; }
  to   { opacity: 1; scale: 1; }
}

/* ── How to start ─────────────────────────────────────────────────
   One sheet with three numbered steps, each opening on a small slice of
   Clear: the sign-up form, the exam and date picker, Today. Like the home
   page's features, the steps are chromeless inside their sheet: the well is
   the only boxed thing. Selected chips are Clear's selection blue; lane dots
   appear only on Today's content rows. */
.start { padding-top: var(--rhythm); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; margin-top: 40px; }
.step { display: flex; flex-direction: column; }
.step__peek { display: flex; flex-direction: column; justify-content: center; gap: 8px; height: 156px; box-sizing: border-box; padding: 0 22px; border-radius: var(--radius-xl); background: var(--well); box-shadow: inset 0 0 0 1px var(--edge); }
.step__body { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 0 14px; margin: 20px 0 0; }
.step__num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--primary-tint); box-shadow: inset 0 0 0 1px var(--primary-tint-border); color: var(--primary-tint-foreground); font-family: var(--font-mono); font-size: 14px; line-height: 1; font-weight: 700; }
.step h3 { padding-top: 4px; font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -0.01em; color: var(--card-foreground); }
.step p { margin-top: 4px; font-size: 15px; line-height: 1.55; color: var(--muted-foreground); }

/* Mini UI inside the wells: Clear's controls at a small size. */
.mini { display: flex; align-items: center; gap: 8px; box-sizing: border-box; height: 32px; padding: 0 12px; border-radius: var(--radius-lg); background: var(--well-item); box-shadow: inset 0 0 0 1px var(--edge); font-size: 13px; line-height: 18px; color: var(--muted-foreground); white-space: nowrap; }
.mini svg { width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mini b { margin-left: auto; font-weight: 600; color: var(--card-foreground); }
.mini--btn { justify-content: center; background: var(--primary-tint); box-shadow: inset 0 0 0 1px var(--primary-tint-border); color: var(--primary-tint-foreground); font-weight: 600; }
.mini-chips { display: flex; gap: 8px; }
.mini-chip { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px; height: 32px; border-radius: 999px; background: var(--well-item); box-shadow: inset 0 0 0 1px var(--border); font-size: 13px; font-weight: 600; color: var(--card-foreground); }
.mini-chip.is-on { background: var(--selection-solid); box-shadow: none; color: var(--selection-solid-foreground); }
.mini-chip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.mini-today { gap: 4px; }
.mini-today__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; padding: 0 2px; }
.mini-today__head b { font-size: 15px; line-height: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--card-foreground); }
.mini-today__head small { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.mini-row { display: grid; grid-template-columns: 14px 8px minmax(0, 1fr) auto; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: var(--radius-lg); background: var(--well-item); box-shadow: inset 0 0 0 1px var(--edge); font-size: 12.5px; line-height: 16px; font-weight: 500; color: var(--card-foreground); }
.mini-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.mini-row em { font-style: normal; font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.mini-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row__check { width: 14px; height: 14px; box-sizing: border-box; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.mini-row.is-done .mini-row__check { background: var(--success); box-shadow: none; }
.mini-row.is-done .mini-row__check svg { display: block; width: 14px; height: 14px; fill: none; stroke: var(--on-accent-fill); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mini-row__check svg { display: none; }
.mini-row.is-done span { color: var(--muted-foreground); }

/* ── FAQ: one sheet, the heading beside the questions ──────────── */
.faq { padding-top: var(--rhythm); }
.faq__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 56px; align-items: start; }
.faq__title { font-size: clamp(30px, 3.2vw, 40px); }
.faq__sub { margin-top: 12px; font-size: 16px; line-height: 1.55; color: var(--muted-foreground); }
.faq__list { border-top: 1px solid var(--border); }
.qa { border-bottom: 1px solid var(--border); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 4px; list-style: none; cursor: pointer; font-size: 18px; line-height: 26px; font-weight: 600; letter-spacing: -0.01em; color: var(--card-foreground); border-radius: var(--radius-lg); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ring); }
.qa__icon { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--border); color: var(--card-foreground); transition: background-color 150ms ease, transform 300ms var(--ease-signature); }
.qa__icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qa summary:hover .qa__icon { background: var(--nav-hover); }
.qa[open] .qa__icon { transform: rotate(180deg); }
.qa__a { padding: 0 60px 24px 4px; max-width: 640px; font-size: 16px; line-height: 1.6; color: var(--muted-foreground); }
.qa__a .link { font-weight: 600; }
/* Opening eases where the browser can animate to auto height. */
@media (prefers-reduced-motion: no-preference) {
  .faq__list { interpolate-size: allow-keywords; }
  .qa::details-content { height: 0; overflow: clip; transition: height 300ms var(--ease-signature), content-visibility 300ms allow-discrete; }
  .qa[open]::details-content { height: auto; }
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .free__inner { gap: 48px; }
  .free__copy--center { max-width: 620px; }
}
@media (max-width: 860px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step__peek { height: auto; padding-top: 20px; padding-bottom: 20px; }
  .faq__inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
/* The exam switch: phones only (see free.html). Clear's pill track, the
   chosen exam on a raised thumb. */
.free__pick { display: none; }
@media (max-width: 768px) {
  .free__pick { display: inline-flex; gap: 2px; margin-top: -28px; padding: 4px; border-radius: 999px; background: var(--muted); }
  .free__pick button { min-width: 112px; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; font: 600 15px var(--font-sans); color: var(--muted-foreground); cursor: pointer; transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease; -webkit-tap-highlight-color: transparent; }
  .free__pick button[aria-pressed="true"] { background: var(--popover-elevated); color: var(--card-foreground); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border-strong); }
  .free__pick button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
  .free__slips[data-show="p"] > .slip[data-exam="fm"], .free__slips[data-show="fm"] > .slip[data-exam="p"] { display: none; }
  .free { padding: 88px 0 0; }
  .free__slips { grid-template-columns: minmax(0, 1fr); gap: 36px; max-width: 420px; margin: 0 auto; }
  .free__slips > .slip:nth-child(2) { margin-top: 0; }
  .steps { gap: 32px; margin-top: 28px; }
  .qa summary { font-size: 17px; line-height: 24px; padding: 18px 2px; }
  .qa__a { padding: 0 2px 22px; }
}
@media (max-width: 480px) {
  .slip__paper { padding-left: 20px; padding-right: 20px; }
  .step__peek { padding-left: 16px; padding-right: 16px; }
}
