/* The public hub. Every colour is a token from tokens.css (the gate fails on a colour literal anywhere else), so the page follows the dark
   and light themes without a single theme-specific rule here. Measurements are decisions, not defaults:
     - the page is 1240px wide and sits on a 12-column grid with 24px gutters;
     - the headline takes eight columns and the lede four, so the type is left-weighted and nothing is centred for its own sake;
     - a card is a mat around a photograph, like a print: 10px of panel, then a photograph with a radius 8px smaller than the card's;
     - motion is one authored arrival (the .rise classes, 70ms apart), then hover; both stop for visitors who prefer reduced motion. */
:root {
  --page-max: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius-card: 22px;
  --radius-photo: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: var(--line-2) var(--ground); accent-color: var(--zone); }
body {
  margin: 0; min-height: 100dvh; color: var(--ink); font: 400 1rem/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background: radial-gradient(1400px 560px at 50% -160px, var(--stage-glow), transparent 72%), var(--ground);
}
::selection { background: var(--focus); color: var(--focus-ink); }
a, a:link, a:visited { color: var(--zone); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--zone-2); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

a.skip, a.skip:link, a.skip:visited {
  position: absolute; left: var(--gutter); top: -72px; z-index: 10; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--ground);
  font: 600 .875rem/1.2 var(--font-sans); text-decoration: none; transition: top .25s var(--ease-out);
}
a.skip:focus { top: 14px; }

/* ---- top bar: the product name on the left, the theme choice and the Houghton Photo mark on the right (the brand rule: mark top-right) -- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: var(--page-max); margin: 0 auto; padding: 22px var(--gutter); }
.top-brand { display: flex; align-items: center; gap: 12px; margin: 0; min-width: 0; }
.top-name { font: 650 .9375rem/1 var(--font-display); font-stretch: 112%; letter-spacing: .01em; }
/* The version where it is easy to see: a small pill beside the name. It is its own element, so a phone can hide the name and keep it. */
.top-version {
  display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--well); color: var(--ink-2);
  font: 500 .75rem/1 var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap;
}
.top-end { display: flex; align-items: center; gap: 22px; }
a.mark, a.mark:link, a.mark:visited { display: block; line-height: 0; border-radius: 6px; }
.mark-img {
  display: block; width: 104px; height: 39px; background: var(--logo); transition: background-color .4s var(--ease-out);
  -webkit-mask: url("../assets/houghton-photo-logo.png") center / contain no-repeat; mask: url("../assets/houghton-photo-logo.png") center / contain no-repeat;
}
a.mark:hover .mark-img { background: var(--zone-2); }

.theme { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--well); border: 1px solid var(--line); }
.theme[hidden] { display: none; }
.theme button {
  appearance: none; display: grid; place-items: center; width: 34px; height: 30px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink-3); cursor: pointer;
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.theme button:hover:not([aria-pressed="true"]) { color: var(--ink); }
/* The chosen button is a solid ink pill with a ground-coloured icon: ink on the well track is far above the 3:1 a UI state needs, in both themes. */
.theme button[aria-pressed="true"] { background: var(--ink); color: var(--ground); box-shadow: var(--shadow-key); }

/* ---- hero ------------------------------------------------------------------------------------------------------------------------- */
.hero {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 20px;
  max-width: var(--page-max); margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--gutter) clamp(40px, 5vw, 72px);
}
/* The headline takes seven columns and the lede sits to its right (Joe, 4 Oct 2026), from column nine, its last line on the headline's last
   baseline - so the two read as one statement and the hero is no taller than it needs to be. Below 960px they stack. */
.hero h1 {
  grid-column: 1 / span 7; margin: 0; font: 700 clamp(1.875rem, 5.1vw, 4.5rem)/1.04 var(--font-display); font-stretch: 118%; letter-spacing: -.03em; text-wrap: balance;
}
.lede { grid-column: 9 / -1; margin: 0; max-width: 38ch; color: var(--ink-2); font-size: 1.125rem; line-height: 1.55; text-wrap: pretty; }
.hero h1, .lede { align-self: end; align-self: last baseline; }

/* ---- groups ----------------------------------------------------------------------------------------------------------------------- */
.group { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }
.group + .group { margin-top: clamp(64px, 9vw, 120px); }
.group-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: baseline; margin-bottom: 28px; }
.group-head h2 { grid-column: 1 / span 6; margin: 0; font: 650 clamp(1.5rem, 2.6vw, 2rem)/1.15 var(--font-display); font-stretch: 112%; letter-spacing: -.015em; text-wrap: balance; }
.group-head p { grid-column: 7 / -1; margin: 0; max-width: 44ch; color: var(--ink-2); text-wrap: pretty; }

.grid { display: grid; gap: clamp(16px, 2vw, 28px); }
/* The two series lessons are peers, so they share one width and every photograph keeps its full 3:2 shape: the Reading a Histogram picture carries
   its histogram near the edges and must never be cropped. */
.grid-series { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-more { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-more .card { grid-column: span 2; }
.grid-more .card:nth-child(n+4) { grid-column: span 3; }
/* The two wide cards in the second row show a wider, shorter crop so the row does not tower over the one above it. */
.grid-more .card:nth-child(n+4) .card-media { aspect-ratio: 16 / 9; }

/* ---- cards ------------------------------------------------------------------------------------------------------------------------ */
.card {
  position: relative; display: flex; flex-direction: column; padding: 10px; border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow-lift);
  transition: transform .7s var(--ease-out), box-shadow .7s var(--ease-out), border-color .7s var(--ease-out);
}
.card-media { --mx: 50%; --my: 30%; position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-photo); aspect-ratio: 3 / 2; background: var(--well); }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.3s var(--ease-out), filter .6s var(--ease-out); }
.card-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; opacity: 0; pointer-events: none; transition: opacity .5s var(--ease-out);
  background: radial-gradient(340px circle at var(--mx) var(--my), color-mix(in srgb, var(--edge) 28%, transparent), transparent 64%);
}
.card-media::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--shade) 16%, transparent); }

.card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 14px 14px; }
.chip { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 4px 11px 4px 9px; border-radius: 999px; font: 600 .75rem/1.3 var(--font-sans); letter-spacing: .015em; }
.chip-live { background: var(--chip-shipped-bg); color: var(--chip-shipped-ink); }
.chip-soon { background: var(--chip-planned-bg); color: var(--chip-planned-ink); }
.chip-mark { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-soon .chip-mark { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }

.card-title { margin: 0; font: 650 1.375rem/1.2 var(--font-display); font-stretch: 110%; letter-spacing: -.01em; text-wrap: balance; }
.card-feature .card-title { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.card-link, .card-link:link, .card-link:visited { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-card); }
.card-blurb { margin: 0; max-width: 46ch; color: var(--ink-2); font-size: .9375rem; line-height: 1.55; text-wrap: pretty; }
.card-cta { display: inline-flex; align-items: center; gap: 6px; margin: auto 0 0; padding-top: 8px; color: var(--zone); font: 600 .9375rem/1.2 var(--font-sans); transition: color .4s var(--ease-out); }
.arrow { transition: transform .55s var(--ease-spring); }

.card[data-status="live"]:hover { transform: translateY(-6px); border-color: var(--line-2); box-shadow: var(--shadow-plate); }
.card[data-status="live"]:hover .card-media img { transform: scale(1.045); }
.card[data-status="live"]:hover .card-media::before { opacity: 1; }
.card[data-status="live"]:hover .card-cta { color: var(--zone-2); }
.card[data-status="live"]:hover .arrow { transform: translateX(5px); }

/* Not ready yet: a dashed edge, a quieter photograph, no link and no hover. */
.card[data-status="soon"] { border-style: dashed; border-color: var(--line-2); box-shadow: var(--shadow-key); }
.card[data-status="soon"] .card-media img { filter: saturate(.7); }

/* Keyboard focus rings the whole card, not just the title. */
.card-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
@supports selector(:has(a)) {
  .card-link:focus-visible { outline: none; }
  .card:has(.card-link:focus-visible) { outline: 2px solid var(--focus); outline-offset: 4px; }
}

/* ---- the books: Joe's own covers on a lit stage, the words below on the page. A cover keeps its own proportions (the Lightroom books are A4,
   the rest about 2:3) and every cover stands at one height, so a row reads as books on a shelf. The stage is 5:7 and leaves 6% round the
   cover. Joe's covers are mostly near-black, so each gets a lit rim before its shadow: a black shadow cannot show on a black page. ---------- */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.group-head .disclosure { grid-column: 7 / -1; margin-top: 14px; max-width: 52ch; padding-left: 14px; border-left: 2px solid var(--line-2); font-size: .8125rem; line-height: 1.55; }

.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(32px, 3.4vw, 52px) clamp(16px, 2vw, 28px); }
.book { position: relative; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.book-stage {
  --mx: 50%; --my: 28%; position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; aspect-ratio: 5 / 7; padding: 6% 7%;
  border-radius: var(--radius-photo); border: 1px solid var(--line); box-shadow: var(--shadow-key);
  background: radial-gradient(110% 70% at 50% 8%, color-mix(in srgb, var(--edge) 9%, var(--panel)), var(--panel) 78%);
}
.book-stage::before {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; opacity: 0; pointer-events: none; transition: opacity .6s var(--ease-out);
  background: radial-gradient(260px circle at var(--mx) var(--my), color-mix(in srgb, var(--edge) 20%, transparent), transparent 66%);
}
.book-cover { position: relative; z-index: 1; display: block; flex: none; height: 100%; border-radius: 2px 5px 5px 2px; box-shadow: var(--shadow-book); transition: transform .8s var(--ease-out), box-shadow .8s var(--ease-out); }
.book-cover img { display: block; height: 100%; width: auto; border-radius: inherit; }
.book-cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 color-mix(in srgb, var(--edge) 22%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--edge) 10%, transparent); }
.book-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 0 2px; }
.book-title { margin: 0; font: 650 1.0625rem/1.25 var(--font-display); font-stretch: 108%; letter-spacing: -.005em; text-wrap: balance; }
.book-line { margin: 0; color: var(--ink-2); font-size: .875rem; line-height: 1.5; text-wrap: pretty; }
.book-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: auto 0 0; padding-top: 6px; }
.book-actions p { margin: 0; }
/* The PDF is the quieter second choice: a plain link in the secondary ink, above the stretched Amazon link so it can be clicked on its own. */
a.book-pdf-link, a.book-pdf-link:link, a.book-pdf-link:visited {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; color: var(--ink-2); font: 500 .875rem/1.3 var(--font-sans);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: color-mix(in srgb, var(--ink-2) 45%, transparent);
  transition: color .3s var(--ease-out), text-decoration-color .3s var(--ease-out);
}
a.book-pdf-link:hover { color: var(--ink); text-decoration-color: currentColor; }
.book-pdf-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.icon-doc { flex: none; }
a.book-link, a.book-link:link, a.book-link:visited { display: inline-flex; align-items: center; gap: 6px; color: var(--zone); font: 600 .9375rem/1.2 var(--font-sans); text-decoration: none; transition: color .4s var(--ease-out); }
a.book-link:hover { color: var(--zone-2); }
/* The buy link is stretched over the whole book, so the cover, the title and the words are all one target. */
.book-link::after { content: ""; position: absolute; inset: 0; }
.book:hover .book-cover { transform: translateY(-7px) scale(1.035); box-shadow: var(--shadow-book-hover); }
.book:hover .book-stage::before { opacity: 1; }
.book:hover .arrow { transform: translateX(5px); }
/* Pointing at the PDF link is not pointing at the Amazon link, so the cover stays put. */
@supports selector(:has(a)) {
  .book:has(.book-pdf-link:hover) .book-cover { transform: none; box-shadow: var(--shadow-book); }
  .book:has(.book-pdf-link:hover) .book-stage::before { opacity: 0; }
  .book:has(.book-pdf-link:hover) .arrow { transform: none; }
}
.book-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
@supports selector(:has(a)) {
  .book-link:focus-visible { outline: none; }
  .book:has(.book-link:focus-visible) { outline: 2px solid var(--focus); outline-offset: 8px; border-radius: var(--radius-photo); }
}

/* ---- the books arrive as they are scrolled to, not at page load (they sit far below the fold, so a load-time stagger would finish unseen).
   Scroll-driven animation is an enhancement: a browser without it, or a visitor who prefers reduced motion, simply sees the books. ------- */
@keyframes shelf-in { from { opacity: 0; transform: translateY(28px) scale(.97); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .group-books .group-head, .book {
      animation-name: shelf-in; animation-timing-function: var(--ease-out); animation-fill-mode: backwards;
      animation-timeline: view(); animation-range: entry 0% entry 52%;
    }
    .book:nth-child(5n+2) { animation-range: entry 5% entry 57%; }
    .book:nth-child(5n+3) { animation-range: entry 10% entry 62%; }
    .book:nth-child(5n+4) { animation-range: entry 15% entry 67%; }
    .book:nth-child(5n+5) { animation-range: entry 20% entry 72%; }
  }
}

/* ---- footer ----------------------------------------------------------------------------------------------------------------------- */
.foot { max-width: var(--page-max); margin: clamp(72px, 10vw, 128px) auto 0; padding: 0 var(--gutter); color: var(--ink-3); font-size: .8125rem; line-height: 1.6; }
.foot-inner { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 14px; align-items: end; padding: 32px 0 52px; border-top: 1px solid var(--line); }
.foot-text { grid-column: 1 / span 7; }
.foot-text p, .foot-meta { margin: 0; }
.foot-text p + p { margin-top: 2px; }
.foot-meta { grid-column: 8 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: flex-end; }
.foot-version { font-family: var(--font-mono); font-size: .75rem; }

/* ---- the privacy notice (v0.3): a document, set like one. The headline takes ten columns; below it a contents rail (three columns, sticky
   on a wide screen) sits beside the text, which keeps to a 68-character measure from column five. Sections are numbered in the mono face,
   divided by a hairline, and every table stacks into labelled rows on a phone. Same tokens, same arrival as the hub. ------------------ */
a.top-home, a.top-home:link, a.top-home:visited { color: inherit; text-decoration: none; border-radius: 4px; }
a.top-home:hover { color: var(--zone-2); }
.doc { --measure: 68ch; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }
.doc-head { grid-column: 1 / span 10; padding: clamp(20px, 4vw, 48px) 0 clamp(40px, 5vw, 72px); }
.doc-back-row { margin: 0 0 clamp(28px, 4vw, 44px); }
a.doc-back, a.doc-back:link, a.doc-back:visited { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font: 600 .875rem/1.2 var(--font-sans); text-decoration: none; transition: color .4s var(--ease-out); }
a.doc-back:hover { color: var(--ink); }
a.doc-back:hover .arrow-back { transform: translateX(-4px); }
.doc-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; color: var(--ink-3); font: 500 .8125rem/1 var(--font-mono); letter-spacing: .02em; }
.doc-eyebrow::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--zone); }
.doc-head h1 { max-width: 17ch; margin: 0; font: 700 clamp(2rem, 5vw, 4rem)/1.04 var(--font-display); font-stretch: 118%; letter-spacing: -.03em; text-wrap: balance; }
.doc-lede { max-width: 52ch; margin: clamp(20px, 2.4vw, 28px) 0 0; color: var(--ink-2); font-size: 1.125rem; line-height: 1.55; text-wrap: pretty; }
.doc-updated { margin: 22px 0 0; color: var(--ink-3); font: 400 .75rem/1.4 var(--font-mono); letter-spacing: .02em; }

.doc-nav { grid-column: 1 / span 3; align-self: start; position: sticky; top: 28px; padding-top: 6px; }
.doc-nav-title { margin: 0 0 14px; color: var(--ink-3); font: 500 .75rem/1 var(--font-mono); letter-spacing: .02em; }
.doc-nav ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
a.doc-nav-link, a.doc-nav-link:link, a.doc-nav-link:visited {
  display: grid; grid-template-columns: 2.4ch minmax(0, 1fr); gap: 10px; margin-left: -1px; padding: 7px 0 7px 14px; border-left: 2px solid transparent;
  color: var(--ink-2); font-size: .875rem; line-height: 1.35; text-decoration: none; transition: color .35s var(--ease-out), border-color .35s var(--ease-out);
}
a.doc-nav-link:hover { color: var(--ink); border-left-color: var(--line-2); }
.doc-num { color: var(--ink-3); font: 500 .75rem/1.35 var(--font-mono); font-variant-numeric: tabular-nums; padding-top: .1em; }

.doc-body { grid-column: 5 / span 8; min-width: 0; }
/* Every section spans the body column, so the hairlines between them are one length; reading text keeps to the measure inside it. */
.doc-section { scroll-margin-top: 28px; }
.doc-section > h2, .doc-section > p, .doc-section > .doc-list { max-width: var(--measure); }
.doc-section + .doc-section { margin-top: clamp(44px, 5vw, 64px); padding-top: clamp(44px, 5vw, 64px); border-top: 1px solid var(--line); }
.doc-section h2 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 20px; font: 650 clamp(1.375rem, 2.2vw, 1.75rem)/1.2 var(--font-display); font-stretch: 112%; letter-spacing: -.015em; text-wrap: balance; }
.doc-section h2 .doc-num { font-size: .8125rem; color: var(--zone); }
.doc-section p { margin: 0; line-height: 1.7; text-wrap: pretty; }
.doc-section p + p, .doc-section .doc-list + p, .doc-section p + .doc-list, .doc-section p + .doc-table-wrap { margin-top: 18px; }
.doc-section strong { font-weight: 600; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.doc-list li { position: relative; padding-left: 22px; line-height: 1.65; text-wrap: pretty; }
.doc-list li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 8px; height: 2px; border-radius: 2px; background: var(--zone); }

/* Tables sit wider than the measure (they are reference, not reading), on the panel, with a hairline under each row. */
.doc-table-wrap { border: 1px solid var(--line); border-radius: var(--radius-photo); background: var(--panel); box-shadow: var(--shadow-key); overflow: hidden; }
.doc-table { width: 100%; border-collapse: collapse; font-size: .9063rem; line-height: 1.5; }
.doc-table th, .doc-table td { padding: 14px 18px; text-align: left; vertical-align: top; }
.doc-table thead th { padding-top: 12px; padding-bottom: 12px; color: var(--ink-3); font: 500 .75rem/1.3 var(--font-mono); letter-spacing: .02em; border-bottom: 1px solid var(--line); }
.doc-table tbody tr + tr > * { border-top: 1px solid var(--line); }
.doc-table tbody th { font-weight: 600; color: var(--ink); }
.doc-table td { color: var(--ink-2); }
.doc-table .chip { white-space: nowrap; }
/* Fixed columns, sized to what each holds: the company (with its status chip beneath), what for, and where - the longest, so the widest. */
.doc-table-3, .doc-table-2 { table-layout: fixed; }
.doc-table-3 thead th:nth-child(1) { width: 26%; } .doc-table-3 thead th:nth-child(2) { width: 33%; }
.doc-table-2 thead th:nth-child(1) { width: 40%; }
.doc-table tbody th .chip { display: flex; width: fit-content; margin-top: 10px; font-weight: 600; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---- the arrival: one choreographed moment, 70ms between steps. The default state is the visible one: the keyframes only pull things
   down for the length of the animation, so a browser that skips them still shows the whole page. ------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 1s var(--ease-out) backwards; }
  .d0 { animation-delay: 0ms; } .d1 { animation-delay: 90ms; } .d2 { animation-delay: 190ms; } .d3 { animation-delay: 300ms; }
  .d4 { animation-delay: 380ms; } .d5 { animation-delay: 450ms; } .d6 { animation-delay: 520ms; } .d7 { animation-delay: 590ms; }
  .d8 { animation-delay: 660ms; } .d9 { animation-delay: 730ms; } .d10 { animation-delay: 800ms; } .d11 { animation-delay: 870ms; } .d12 { animation-delay: 940ms; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card-media img, .card-media::before, .arrow, .card-cta, a.skip, .mark-img, .book-cover, .book-stage::before, a.book-link, a.book-pdf-link, a.doc-back, a.doc-nav-link { transition: none; }
  a.doc-back:hover .arrow-back { transform: none; }
  .card[data-status="live"]:hover { transform: none; }
  .card[data-status="live"]:hover .card-media img, .card[data-status="live"]:hover .arrow, .book:hover .book-cover, .book:hover .arrow { transform: none; }
}

/* ---- narrower screens: the same page, stacked. A phone is a second-class screen here (computer-first), but it must stay sound. ------ */
@media (max-width: 960px) {
  .doc-head, .doc-body { grid-column: 1 / -1; }
  /* The contents rail becomes a plain list above the text. */
  .doc-nav { grid-column: 1 / -1; position: static; margin-bottom: clamp(36px, 6vw, 52px); }
  .doc-nav ol { columns: 2; column-gap: 24px; }
  .doc-nav li { break-inside: avoid; }
  .hero h1 { grid-column: 1 / -1; }
  .lede { grid-column: 1 / span 9; align-self: start; }
  .group-head h2 { grid-column: 1 / -1; }
  .group-head p { grid-column: 1 / -1; margin-top: 8px; }
  .group-head .disclosure { grid-column: 1 / -1; margin-top: 14px; }
  .grid-more .card, .grid-more .card:nth-child(n+4) { grid-column: span 3; }
/* The two wide cards in the second row show a wider, shorter crop so the row does not tower over the one above it. */
.grid-more .card:nth-child(n+4) .card-media { aspect-ratio: 16 / 9; }
  .grid-more .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .foot-text, .foot-meta { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 640px) {
  .doc-nav ol { columns: 1; }
  /* Each table row becomes a small labelled block: the column name (from data-label) above each value. */
  .doc-table-wrap { margin: 0; }
  .doc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .doc-table, .doc-table tbody, .doc-table tr, .doc-table th, .doc-table td { display: block; width: auto !important; }
  .doc-table tbody tr { padding: 14px 16px; }
  .doc-table tbody tr + tr > * { border-top: 0; }
  .doc-table tbody tr + tr { border-top: 1px solid var(--line); }
  .doc-table th, .doc-table td { padding: 3px 0; }
  .doc-table td::before { content: attr(data-label); display: block; margin: 8px 0 2px; color: var(--ink-3); font: 500 .6875rem/1.3 var(--font-mono); letter-spacing: .02em; }
  .grid-series, .grid-more { grid-template-columns: minmax(0, 1fr); }
  .grid-more .card, .grid-more .card:nth-child(n+4), .grid-more .card:last-child:nth-child(odd) { grid-column: auto; }
  /* The name goes; the version pill stays at the left, with the theme choice and the mark at the right. */
  .top-name { display: none; }
}
/* Below 1040px a book sits beside its words (cover left), two to a row: ten books make five even rows, never one left over. */
@media (max-width: 1039px) {
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px clamp(20px, 3vw, 36px); }
  .book { flex-direction: row; align-items: flex-start; gap: 18px; }
  .book-stage { flex: none; width: clamp(108px, 19vw, 140px); }
  .book-body { flex: 1; padding-top: 2px; }
  .book-actions { margin-top: 6px; padding-top: 0; }
}
@media (max-width: 559px) {
  .shelf { grid-template-columns: minmax(0, 1fr); gap: 26px; }
}
/* A 320px phone: the version pill, the three-way theme choice and the mark must all fit in one row. */
@media (max-width: 400px) {
  .top-end { gap: 12px; }
  .theme button { width: 30px; }
  .mark-img { width: 88px; height: 33px; }
  .book { gap: 14px; }
  .book-stage { width: clamp(96px, 28vw, 112px); }
}

/* ---- the account link in every page's header, and the account page (Sprint v0.5) ------------------------------------------------
   The page reuses the notice's header (eyebrow, headline, lede) on the left five columns and puts the one thing to do - a raised card,
   lit like the hub's cards - on the right six, so the eye goes headline, then card. Buttons are rounded rectangles like the inputs; the
   one primary action in each step is solid ink. Nothing here is colour alone: every state has words. */
a.top-account, a.top-account:link, a.top-account:visited { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font: 600 .875rem/1 var(--font-sans); text-decoration: none; transition: color .4s var(--ease-out), background-color .4s var(--ease-out); }
a.top-account:hover { color: var(--ink); background: var(--well); }
a.top-account[aria-current="page"] { color: var(--ink); background: var(--well); box-shadow: inset 0 0 0 1px var(--line); }
a.top-account:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.icon-person { flex: none; }

.acct [hidden] { display: none !important; }
.acct-head { grid-column: 1 / span 5; }
.acct-head h1 { max-width: 12ch; }
.acct-privacy { margin: 22px 0 0; max-width: 40ch; color: var(--ink-2); font-size: .9375rem; line-height: 1.55; }
.acct-stage { grid-column: 7 / -1; align-self: start; padding-top: clamp(20px, 4vw, 48px); }
.acct-card { position: relative; padding: clamp(26px, 3.2vw, 44px); border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--raised); box-shadow: var(--shadow-plate); }
.acct-panel h2 { margin: 0; font: 650 clamp(1.375rem, 2.2vw, 1.75rem)/1.2 var(--font-display); font-stretch: 112%; letter-spacing: -.015em; text-wrap: balance; }
.acct-hint { margin: 10px 0 0; max-width: 46ch; color: var(--ink-2); line-height: 1.55; text-wrap: pretty; }
.acct-panel[data-panel="loading"] .acct-hint { margin: 0; color: var(--ink-3); font: 500 .8125rem/1.4 var(--font-mono); letter-spacing: .02em; }

.acct-status { margin: 0 0 22px; padding: 12px 16px; border-left: 3px solid var(--zone); border-radius: 4px 10px 10px 4px; background: var(--well); color: var(--ink); font-size: .9375rem; line-height: 1.5; text-wrap: pretty; }
.acct-status:empty { display: none; }
.acct-status[data-tone="warn"] { border-left-color: var(--focus); }

.tick { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; margin: 26px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--well); }
.tick input { width: 20px; height: 20px; margin: 1px 0 0; }
.tick label { display: grid; gap: 3px; cursor: pointer; }
.tick-label { font-weight: 600; }
.tick-hint { color: var(--ink-2); font-size: .875rem; line-height: 1.45; }
.tick input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.acct-google { margin-top: 26px; }
.gsi-slot { min-height: 44px; }
.acct-or { display: flex; align-items: center; gap: 14px; margin: 22px 0 0; color: var(--ink-3); font: 500 .75rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.acct-or::before, .acct-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.acct-form { display: grid; gap: 16px; margin-top: 22px; }
.acct-sent { margin: 0; color: var(--ink-2); line-height: 1.55; text-wrap: pretty; }
.field { display: grid; gap: 8px; }
.field label { color: var(--ink-2); font: 600 .875rem/1.3 var(--font-sans); }
.field input { width: 100%; padding: 13px 16px; border: 1px solid var(--ink-3); /* a field's outline is how you find it: 3:1 or better on the card */ border-radius: 12px; background: var(--ground); color: var(--ink); font: 400 1rem/1.4 var(--font-sans); transition: border-color .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.field input:hover { border-color: var(--ink-2); }
.field input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--zone); }
.code-input { font: 500 1.75rem/1.2 var(--font-mono) !important; letter-spacing: .38em; font-variant-numeric: tabular-nums; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 12px 20px; border: 1px solid transparent; border-radius: 12px; font: 600 .9375rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: transform .45s var(--ease-spring), box-shadow .45s var(--ease-out), background-color .3s var(--ease-out), border-color .3s var(--ease-out), color .3s var(--ease-out); }
.btn:focus-visible, .btn-text:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.btn:disabled { cursor: progress; transform: none; box-shadow: none; }
.btn-primary { justify-self: start; background: var(--ink); color: var(--ground); box-shadow: var(--shadow-key); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
a.btn-quiet, a.btn-quiet:link, a.btn-quiet:visited, .btn-quiet { border-color: var(--line-2); background: transparent; color: var(--ink); }
.btn-quiet:hover:not(:disabled) { border-color: var(--ink-3); background: var(--well); }
.btn-warn { justify-self: start; border-color: var(--focus); background: transparent; color: var(--ink); }
.btn-warn:hover:not(:disabled) { background: color-mix(in srgb, var(--focus) 14%, transparent); }
.btn-text { padding: 4px 0; border: 0; background: none; color: var(--zone); font: 600 .875rem/1.3 var(--font-sans); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
.btn-text:hover { color: var(--zone-2); text-decoration-color: currentColor; }
.acct-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; }
.acct-row { display: flex; flex-wrap: wrap; gap: 12px; }

.acct-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.acct-facts div { min-width: 0; }
/* An address is long and must read as one: it takes the full row, and may break only after its @ or a dot if it still won't fit. */
.acct-facts div:first-child { grid-column: 1 / -1; }
.acct-facts dt { color: var(--ink-3); font: 500 .75rem/1.3 var(--font-mono); letter-spacing: .02em; }
.acct-facts dd { margin: 6px 0 0; font-weight: 600; overflow-wrap: break-word; }
.acct-block { display: grid; gap: 12px; margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); }
.acct-block h3 { margin: 0; font: 650 1.0625rem/1.25 var(--font-display); font-stretch: 108%; }
.acct-block p { margin: 0; max-width: 52ch; color: var(--ink-2); line-height: 1.55; text-wrap: pretty; }
.acct-block .field { margin-top: 4px; max-width: 320px; }

@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .acct-panel:not([hidden]), .acct-form:not([hidden]) { animation: panel-in .7s var(--ease-out) backwards; }
  .acct-status:not(:empty) { animation: panel-in .5s var(--ease-out) backwards; }
}
@media (prefers-reduced-motion: reduce) {
  a.top-account, .btn, .field input { transition: none; }
  .btn-primary:hover:not(:disabled) { transform: none; }
}
@media (max-width: 960px) {
  .acct-head, .acct-stage { grid-column: 1 / -1; }
  .acct-head { padding-bottom: 0; }
  .acct-stage { padding-top: 32px; }
}
@media (max-width: 640px) {
  /* The header keeps the person icon; its words stay for a screen reader. */
  .top-account span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  a.top-account, a.top-account:link, a.top-account:visited { padding: 8px; }
}
