/* ══════════════════════════════════════════════════════════════════════════
   gift.css — §ED939, THE BUYER FLOW (gift.html). WEB ONLY.

   NO RESTYLE. Every colour, radius, shadow and face below is a shipping
   token from css/tokens.css + css/global.css: the lime on the ground,
   --surface/-2/-3 for cards, --text-primary/-muted/-subtle for text,
   --r-sm/-md/-lg/-xl (6/12/16/24), --shadow-card on cards and
   --shadow-accent on the one primary CTA. Hue stays locked at 72°; there is
   no second accent anywhere on this page. Questions render in the treatment
   the tree ships TODAY (§ED936/§ED937): --font-display (Nohemi) at weight
   400, sentence case, letter-spacing -0.01em, never under 1rem.

   §ED937's floors hold: no text under 16px (1rem at a 16px root — every
   rem below is ≥ 1), no tap target under 44px. Inputs inherit global.css's
   max(16px, 1rem) floor.

   Three screens (a: offer, b: picker, c: delivery) plus the confirmation
   (d) share one page; js/gift.js shows one `.gf-screen` at a time via
   [hidden]. The page is chrome-light on purpose (membership.html's
   argument — a purchase decision should not compete with navigation):
   the shared site header/footer and ONE "Back" control per screen.
   ══════════════════════════════════════════════════════════════════════ */

body { background: var(--c-bg); }

.gf-page { max-width: 640px; margin: 0 auto; padding: calc(40px + var(--safe-top)) 24px calc(96px + var(--safe-bottom)); }
@media (min-width: 900px) { .gf-page { max-width: 760px; } }

.gf-screen[hidden] { display: none; }

/* ── back / return ───────────────────────────────────────────────────── */
.gf-return {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; margin: 0 0 8px -8px; padding: 8px;
  border: none; background: none; cursor: pointer;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  color: var(--text-muted); text-decoration: none;
}
.gf-return:hover { color: var(--text-primary); }
.gf-return svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── type ────────────────────────────────────────────────────────────── */
.gf-eyebrow {
  font-family: var(--font-body); font-size: 1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-subtle); margin: 0 0 10px;
}
.gf-h1 {
  font-family: var(--font-display); font-weight: 400; font-size: 2rem; line-height: 1.15;
  letter-spacing: -0.01em; color: var(--text-primary); margin: 0 0 16px; max-width: 18ch;
}
@media (min-width: 900px) { .gf-h1 { font-size: 2.5rem; } }
.gf-lede { font-family: var(--font-body); font-size: 1.15625rem; line-height: 1.6; color: var(--text-muted); margin: 0 0 24px; max-width: 48ch; }
.gf-p    { font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; color: var(--text-muted); margin: 0 0 16px; max-width: 52ch; }
.gf-note { font-family: var(--font-body); font-size: 1rem; line-height: 1.55; color: var(--text-subtle); margin: 8px 0 0; max-width: 52ch; }
.gf-err  { font-family: var(--font-body); font-size: 1.0625rem; color: var(--error); margin: 12px 0 0; }
.gf-err:empty { display: none; }

/* ── the price card (screen a) ───────────────────────────────────────── */
.gf-card {
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px 24px;
  background: var(--surface); box-shadow: var(--shadow-card); margin: 0 0 24px;
}
.gf-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0; font-family: var(--font-body); }
.gf-price-figure { font-size: 2.25rem; font-weight: 500; color: var(--text-primary); }
.gf-price-per { font-size: 1.0625rem; color: var(--text-subtle); }
.gf-price-note { font-family: var(--font-body); font-size: 1.0625rem; color: var(--text-subtle); margin: 8px 0 0; }

.gf-goods { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 52ch; }
.gf-goods li { font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.55; color: var(--text-primary); padding-left: 20px; position: relative; }
.gf-goods li::before { content: '—'; position: absolute; left: 0; color: var(--text-subtle); }

/* Ruling 7 — recordings survive non-renewal. The one reassurance a $-figure
   heritage purchase needs, in the same quiet left-rule treatment
   membership.html gives its guarantee line. */
.gf-keeps {
  font-family: var(--font-body); font-size: 1.15625rem; line-height: 1.55; color: var(--text-subtle);
  border-left: 3px solid var(--border-strong); padding: 4px 0 4px 14px; margin: 22px 0;
  max-width: 52ch;
}

/* ── the primary CTA — the one accent on the page ────────────────────── */
.gf-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 28px; border-radius: var(--r-md); border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 1.0625rem; font-weight: 700;
  background: var(--accent); color: var(--accent-text); box-shadow: var(--shadow-accent);
  text-decoration: none;
}
.gf-cta:hover:not(:disabled) { background: var(--accent-hover); }
.gf-cta:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.gf-cta-sub { font-family: var(--font-body); font-size: 1rem; color: var(--text-subtle); margin: 10px 0 0; }
.gf-secondary-link {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 18px;
  font-family: var(--font-body); font-size: 1.0625rem; color: var(--text-muted);
  text-decoration: underline; text-underline-offset: 2px;
}
.gf-secondary-link:hover { color: var(--text-primary); }

/* ── the picker (screen b) ───────────────────────────────────────────── */
/* Sticky beneath the FIXED site header (global.css: 64px, 56px ≤480px),
   not at 0 — at 0 it slid under the header and was never visible while
   scrolling the list it counts. */
.gf-counter {
  position: sticky; top: 64px; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 8px 0; margin: 0 0 12px;
  background: var(--c-bg);
  font-family: var(--font-body); font-size: 1.0625rem; font-weight: 700; color: var(--text-primary);
}
.gf-counter-hint { font-weight: 400; color: var(--text-subtle); }

.gf-group { margin: 0 0 8px; }
.gf-group-h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  min-height: 48px; padding: 10px 0; margin: 0; border: none; border-top: 1px solid var(--border);
  background: none; cursor: pointer; text-align: left;
  font-family: var(--font-body); font-size: 1rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-subtle);
}
.gf-group-h:hover { color: var(--text-primary); }
.gf-group-h .gf-group-count { font-weight: 400; text-transform: none; letter-spacing: 0; }
.gf-group-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gf-group-list[hidden] { display: none; }

/* A question row is a checkbox in all but markup: role="checkbox",
   aria-checked, the whole row the tap target. The tick lives in a box on
   the left; the question itself is the ratified question treatment. */
.gf-q {
  display: flex; align-items: flex-start; gap: 14px; width: 100%;
  min-height: 56px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); cursor: pointer; text-align: left;
  transition: border-color var(--c-m-toggle) ease, background var(--c-m-toggle) ease;
}
.gf-q:hover { border-color: var(--border-strong); }
.gf-q[aria-checked="true"] { border-color: var(--accent-ink); background: var(--surface-2); }
.gf-q:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.gf-q:disabled { opacity: 0.5; cursor: default; }
.gf-q-box {
  flex: 0 0 28px; width: 28px; height: 28px; margin-top: 2px; border-radius: var(--r-sm);
  border: 2px solid var(--border-strong); background: var(--surface-3);
  display: inline-flex; align-items: center; justify-content: center;
}
.gf-q[aria-checked="true"] .gf-q-box { background: var(--accent); border-color: var(--accent); }
.gf-q-box svg { width: 16px; height: 16px; stroke: var(--accent-text); display: none; }
.gf-q[aria-checked="true"] .gf-q-box svg { display: block; }
.gf-q-body {
  font-family: var(--font-display); font-weight: 400; font-size: 1.0625rem; line-height: 1.35;
  letter-spacing: -0.01em; text-transform: none; color: var(--text-primary);
}

/* "Write my own" — a fifth kind of option, not a control set apart. */
.gf-own { margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--border); }
.gf-own-label { display: block; font-family: var(--font-body); font-size: 1.0625rem; font-weight: 700; color: var(--text-primary); margin: 0 0 8px; }
.gf-own-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.gf-own-input {
  flex: 1 1 260px; min-height: 56px; padding: 12px 14px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-primary);
  font-family: var(--font-body); font-size: max(16px, 1rem); line-height: 1.4; resize: vertical;
}
.gf-own-add {
  min-height: 48px; min-width: 88px; padding: 10px 18px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-primary);
  font-family: var(--font-body); font-size: 1rem; font-weight: 700; cursor: pointer;
}
.gf-own-add:hover:not(:disabled) { border-color: var(--text-subtle); }
.gf-own-add:disabled { opacity: 0.45; cursor: default; }
.gf-own-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gf-own-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--accent-ink); border-radius: var(--r-md); background: var(--surface-2);
}
.gf-own-item .gf-q-body { flex: 1; }
.gf-own-remove {
  flex: 0 0 auto; min-height: 44px; min-width: 44px; padding: 0 10px; border: none; background: none;
  cursor: pointer; font-family: var(--font-body); font-size: 1rem; color: var(--text-subtle);
  text-decoration: underline; text-underline-offset: 2px;
}
.gf-own-remove:hover { color: var(--text-primary); }

.gf-actions { margin: 28px 0 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }

/* ── delivery (screen c) ─────────────────────────────────────────────── */
.gf-modes { display: flex; flex-direction: column; gap: 10px; margin: 0 0 24px; padding: 0; border: none; }
.gf-mode {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; min-height: 56px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
  cursor: pointer; box-shadow: var(--shadow-card);
  transition: border-color var(--c-m-toggle) ease;
}
.gf-mode:hover { border-color: var(--border-strong); }
.gf-mode.is-selected { border-color: var(--accent-ink); background: var(--surface-2); }
.gf-mode:focus-within { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.gf-mode input { width: 24px; height: 24px; min-width: 24px; margin: 4px 0 0; accent-color: var(--accent-ink, var(--accent)); }
.gf-mode-text { display: flex; flex-direction: column; gap: 4px; }
.gf-mode-h { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 700; color: var(--text-primary); }
.gf-mode-sub { font-family: var(--font-body); font-size: 1rem; line-height: 1.5; color: var(--text-subtle); }
.gf-date-row { margin: 10px 0 0 0; display: flex; flex-direction: column; gap: 6px; }
/* A date field with no value collapses to its picker glyph in Chromium
   unless it is given a width; it also needs the page's colour scheme so
   the native picker and placeholder text are legible on the dark ground. */
.gf-date-row input[type="date"] { width: 100%; max-width: 280px; color-scheme: dark; }
html.theme-light .gf-date-row input[type="date"] { color-scheme: light; }
.gf-date-row[hidden] { display: none; }

.gf-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 18px; }
.gf-label { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 700; color: var(--text-primary); }
.gf-input {
  width: 100%; box-sizing: border-box; min-width: 0;
  min-height: 52px; padding: 12px 14px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-primary);
  font-family: var(--font-body); font-size: max(16px, 1rem);
}

.gf-consent {
  display: flex; align-items: flex-start; gap: 10px; min-height: 44px; margin: 6px 0 14px;
  font-family: var(--font-body); font-size: 1.0625rem; color: var(--text-muted); cursor: pointer;
}
.gf-consent input { width: 28px; height: 28px; min-width: 28px; margin: 8px 0 0; accent-color: var(--accent-ink, var(--accent)); }
.gf-consent a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 2px; }

.gf-summary { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gf-summary li { font-family: var(--font-body); font-size: 1rem; line-height: 1.5; color: var(--text-subtle); }
.gf-summary li strong { color: var(--text-primary); font-weight: 600; }

/* ── confirmation (screen d) and the card ────────────────────────────── */
.gf-done-card {
  border: 1px solid var(--border); border-radius: var(--r-xl); padding: 26px 26px 22px;
  background: var(--surface); box-shadow: var(--shadow-card); margin: 8px 0 24px;
}
.gf-done-for { font-family: var(--font-body); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-subtle); margin: 0 0 8px; }
.gf-done-name { font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; line-height: 1.2; color: var(--text-primary); margin: 0 0 12px; }
.gf-done-line { font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.55; color: var(--text-muted); margin: 0 0 8px; }
.gf-done-qh { font-family: var(--font-body); font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-subtle); margin: 18px 0 8px; }
.gf-done-qs { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 8px; }
.gf-done-qs li { font-family: var(--font-display); font-weight: 400; font-size: 1.0625rem; line-height: 1.35; letter-spacing: -0.01em; color: var(--text-primary); }
.gf-done-foot { font-family: var(--font-body); font-size: 1rem; color: var(--text-subtle); margin: 20px 0 0; }
/* §ED940 — the printed card's way in. The code is display type, tracked,
   large enough to copy from paper; §ED937's floors hold (nothing under 16px). */
.gf-done-way { margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); }
.gf-done-way-line { font-family: var(--font-body); font-size: 1rem; line-height: 1.5; color: var(--text-muted); margin: 0 0 8px; }
.gf-done-way-line strong { color: var(--text-primary); font-weight: 600; }
.gf-done-code { font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; line-height: 1.2; letter-spacing: 0.12em; color: var(--text-primary); margin: 0 0 8px; user-select: all; -webkit-user-select: all; }
.gf-done-way-note { font-family: var(--font-body); font-size: 1rem; line-height: 1.5; color: var(--text-subtle); margin: 0; }
.gf-print {
  min-height: 48px; padding: 10px 20px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-primary);
  font-family: var(--font-body); font-size: 1rem; font-weight: 700; cursor: pointer;
}
.gf-print:hover { border-color: var(--text-subtle); }
.gf-loading { font-family: var(--font-body); font-size: 1.0625rem; color: var(--text-subtle); padding: 48px 0; }

@media (max-width: 480px) { .gf-counter { top: 56px; } }

@media print {
  .site-header, .site-footer, .gf-return, .gf-print, .gf-actions, .gf-secondary-link, .gf-eyebrow, .gf-h1, .gf-lede { display: none !important; }
  body { background: #fff; }
  .gf-done-card { box-shadow: none; border-color: #999; }
}
