/* ============================================================
   Tokens — values taken from the approved design (oklch kept as-is)
   ============================================================ */
:root {
  --accent: oklch(70% 0.15 45);
  --accent-shadow: oklch(55% 0.13 45);
  --accent-soft: oklch(90% 0.03 85);

  --bg: oklch(97% 0.015 85);
  --bg-header: oklch(97% 0.015 85 / 0.92);
  --surface: #fff;

  --ink: oklch(28% 0.03 50);
  --ink-heading: oklch(30% 0.04 45);
  --ink-body: oklch(38% 0.03 50);
  --ink-muted: oklch(45% 0.02 50);
  --ink-soft: oklch(48% 0.02 50);

  /* The book cover's background purple, sampled from the cover art (#37206e). */
  --purple: oklch(32% 0.13 291);
  /* Lighter violet: the header rule and the light end of the stats band. */
  --purple-light: oklch(52% 0.17 308);
  /* Pale lilac: the home teacher card, the lessons intro, the about page
     resources box, the contact form, secondary buttons
     and the hero eyebrow pill. */
  --lilac: oklch(95% 0.03 295);
  --pill-bg: oklch(90% 0.1 95);
  --pill-ink: oklch(38% 0.08 60);

  --footer-ink: oklch(95% 0.02 85); /* light enough that 0.6 opacity clears 4.5:1 on purple */
  --footer-rule: oklch(45% 0.1 295);

  --line: oklch(90% 0.02 85);
  --line-strong: oklch(80% 0.04 60);
  --shadow-card: 0 4px 14px oklch(50% 0.05 50 / 0.08);
  --shadow-float: 0 12px 32px oklch(50% 0.05 50 / 0.18);
  --shadow-lift: 0 6px 18px oklch(50% 0.05 50 / 0.2);

  /* The audience is adults (teachers, parents), so the site reads in Inter:
     one variable family for headings, UI and body. */
  --font-head: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  /* Handlee, the closest free match to the book's own Noteworthy, is for the
     wordmark, the home hero's book title and summary line, and the home "Fun
     activities" heading and lede — the kids' printables carry it inside the PDFs. It has one
     weight: always 400, never bold, or the browser smears a fake bold over it. */
  --font-hand: 'Handlee', 'Inter', system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: 20px;
}
@media (min-width: 680px) { :root { --gutter: 32px; } }

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-text-size-adjust: 100%;

  /* Sticky footer: on a short page (404, a thin contact form) the footer sits
     on the bottom edge instead of leaving a band of background under it. dvh
     accounts for mobile browser chrome; the vh line is the fallback. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
/* The one growing child, so the footer is pushed down but never overlapped.
   The sticky header and the absolutely-positioned skip link are unaffected. */
main { flex: 1 0 auto; }
/* Keep anything scrolled into view (focus, #anchors) clear of the sticky header. */
html { scroll-padding-top: 100px; }
/* Browsers' default placeholder grey is too faint in Firefox (3.4:1). */
::placeholder { color: var(--ink-muted); opacity: 1; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-heading);
  margin: 0;
  line-height: 1.15;
}
p { margin: 0; line-height: 1.6; }
img { max-width: 100%; height: auto; }
::selection { background: oklch(80% 0.1 45 / 0.4); }

/* Focus rings appear for keyboard/AT users only — mouse and touch keep the
   design untouched. Never swap :focus-visible for :focus here. */
:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--surface);
  color: var(--ink-heading);
  font-family: var(--font-head);
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 0 0 12px 0;
  box-shadow: var(--shadow-lift);
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-header);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--purple-light);
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
@media (min-width: 680px) { .site-header { padding: 14px var(--gutter); } }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
/* The flower is an irregular shape on transparent ground — no circle behind it,
   and no border-radius, which would clip the petals. */
.brand__mark {
  display: block;
  width: 44px; height: 44px; flex-shrink: 0;
}
.brand__name {
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: 19px;
  line-height: 1;
  color: var(--ink-heading);
}
@media (min-width: 680px) { .brand__name { font-size: 26px; } }

.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav__link {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  color: oklch(30% 0.03 50);
  background: transparent;
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 999px;
  transition: background 0.15s;
}
.nav__link:hover { background: var(--accent-soft); }
.nav__link[aria-current="page"] { background: var(--purple); color: #fff6c9; }


/* --- Mobile nav ------------------------------------------------------------
   The design bundle has no mobile nav, so this fills the gap using its own
   tokens. Progressive enhancement: the toggle only exists for JS users
   (`.js` is set in head.php before paint, so there is no flash of open nav).
   Without JS the header keeps its original wrapping row of links.          */
.nav-toggle { display: none; }

@media (max-width: 1019px) {
  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 15px;
    color: oklch(30% 0.03 50);
    background: transparent;
    border: 2px solid var(--line-strong);
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s;
  }
  .js .nav-toggle:hover { background: var(--accent-soft); }

  .js .nav-toggle__bars {
    display: grid;
    gap: 4px;
    width: 18px;
  }
  .js .nav-toggle__bars span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--accent-shadow);
    transition: transform 0.2s, opacity 0.2s;
  }
  .js .site-header.is-open .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .js .site-header.is-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
  .js .site-header.is-open .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* Panel drops out of the sticky header, which is its containing block. */
  .js .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--surface);
    border-bottom: 3px solid var(--purple-light);
    box-shadow: var(--shadow-float);
    padding: 10px var(--gutter) 16px;
  }
  .js .site-header.is-open .nav {
    display: flex;
    animation: navDrop 0.18s ease-out;
  }
  .js .nav__link { font-size: 17px; padding: 12px 16px; }
}

@keyframes navDrop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: none;
  border-radius: 14px;
  padding: 15px 28px;
  cursor: pointer;
}
/* Same colours as .btn--purple, at the larger hero size. */
.btn--primary {
  background: var(--purple);
  color: #fff;
  border-radius: 12px;
}
.btn--secondary {
  background: var(--lilac);
  color: oklch(32% 0.04 50);
  border: 2px solid var(--purple);
  padding: 13px 26px;
}
.btn--purple {
  background: var(--purple);
  color: #fff;
  font-size: 15px;
  border-radius: 12px;
  padding: 12px 24px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--purple);
  color: var(--footer-ink);
  padding: 32px var(--gutter) 22px;
  margin-top: 20px;
}
@media (min-width: 680px) { .site-footer { padding: 44px var(--gutter) 28px; } }

.site-footer__top {
  max-width: var(--wrap);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.site-footer__brand { display: flex; align-items: center; gap: 10px; }
.site-footer__mark {
  display: block;
  width: 36px; height: 36px; flex-shrink: 0;
}
.site-footer__name { font-family: var(--font-hand); font-weight: 400; font-size: 20px; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer__link {
  color: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.8;
}
/* The ring is purple everywhere else; on the purple footer it would vanish. */
.site-footer :focus-visible { outline-color: #fff6c9; }
.site-footer__link:hover,
.site-footer__link:focus-visible,
.site-footer__link[aria-current="page"] { opacity: 1; }
.site-footer__legal {
  max-width: var(--wrap);
  margin: 20px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--footer-rule);
  font-size: 13px;
  opacity: 0.6;
  text-align: center;
}
/* Faded by colour rather than opacity, so the link can brighten on hover and
   focus; opacity on the link would multiply with the line's and dim it. */
.site-footer__credit {
  margin: 6px auto 0;
  font-size: 13px;
  color: color-mix(in srgb, var(--footer-ink) 60%, var(--purple));
  text-align: center;
}
.site-footer__credit a { color: inherit; }
.site-footer__credit a:hover,
.site-footer__credit a:focus-visible { color: var(--footer-ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Home — hero
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
  padding-block: 32px 28px;
}
@media (min-width: 680px) {
  .hero { grid-template-columns: 1.1fr 0.9fr; padding-block: 64px 40px; }
}

.eyebrow-pill {
  display: inline-block;
  background: var(--lilac);
  color: var(--pill-ink);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  padding: 6px 16px;
  border-radius: 999px;
  margin: 0 0 20px;
}
/* The book's title and its one-line summary below, in the book's voice — the
   one heading set in Handlee. */
.hero__title {
  font-family: var(--font-hand);
  font-weight: 400;
  letter-spacing: 0;
  font-size: 32px;
  line-height: 1.15;
  margin-bottom: 20px;
}
@media (min-width: 680px) { .hero__title { font-size: 52px; } }

.hero__lede {
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: 19px;
  color: var(--ink-body);
  margin-bottom: 28px;
}
@media (min-width: 680px) { .hero__lede { max-width: 480px; } }

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 0; }
.hero__buy { margin: 20px 0 0; font-size: 16px; }
.hero__buy a {
  color: var(--ink-heading);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 4px;
}
.hero__buy a:hover { text-decoration: underline; }
.hero__buy-arrow {
  display: inline-block;
  color: var(--accent);
  transition: transform 0.15s ease;
}
.hero__buy a:hover .hero__buy-arrow { transform: translateX(3px); }

.hero__art { position: relative; }
.hero__art picture { display: block; }
/* Natural ratio of the cover art (1023 x 981) — width/height attrs reserve the box. */
.hero__cover {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: var(--shadow-float);
  animation: floatSlow 5s ease-in-out infinite;
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* ============================================================
   Home — stats band
   ============================================================ */
/* A diagonal wash from a lighter violet through the cover purple to a deeper
   one, so the band doesn't read as a flat slab. White text clears AA all the
   way across (6:1 at the light end). It's twice the band's width and pans
   slowly left to right and back; reduced motion gets it standing still. */
.stats {
  background: var(--purple);
  background: linear-gradient(120deg, var(--purple-light), var(--purple) 50%, oklch(25% 0.1 285));
  background-size: 200% 100%;
  animation: statsPan 16s ease-in-out infinite alternate;
  padding-block: 28px;
  margin-top: 24px;
}
@media (min-width: 680px) { .stats { padding-block: 40px; } }
@keyframes statsPan {
  from { background-position: 100% 50%; }
  to   { background-position: 0% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .stats { animation: none; background-position: 50% 50%; }
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  text-align: center;
}
@media (min-width: 680px) {
  .stats__grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}
.stat { color: #fff; }
.stat__value { font-family: var(--font-head); font-weight: 700; font-size: 24px; }
@media (min-width: 680px) { .stat__value { font-size: 30px; } }
.stat__label { font-size: 14px; font-weight: 600; opacity: 0.9; }

/* ============================================================
   Home — learning experiences for teachers
   ============================================================ */
.teach { padding-block: 40px 0; }
@media (min-width: 680px)  { .teach { padding-block: 50px 0; } }
@media (min-width: 1020px) { .teach { padding-block: 60px 0; } }

/* DOM order is title, intro, list, button — the reading order on a phone. From
   680px the title, intro and button share the left column and the list takes
   the right. */
.teach__card {
  background: var(--lilac);
  border-radius: 24px;
  padding: 24px 20px;
  display: grid;
  grid-template-areas: "title" "intro" "list" "action";
  gap: 20px;
}
@media (min-width: 680px) {
  .teach__card {
    grid-template-columns: 0.8fr 1.2fr;
    grid-template-areas: "title list" "intro list" "action list";
    column-gap: 48px;
    align-content: center;
    padding: 44px;
  }
  .teach__title { align-self: end; }
  .teach__action { align-self: start; }
  .ticks { align-self: center; }
}
.teach__title { grid-area: title; font-size: 22px; }
@media (min-width: 680px) { .teach__title { font-size: 26px; } }
.teach__action { grid-area: action; margin: 0; }
.teach__intro { grid-area: intro; font-size: 16px; line-height: 1.6; color: var(--ink-body); }
.teach__intro p { margin: 0 0 12px; }
.teach__intro p:last-child { margin-bottom: 0; }

/* Ticks are drawn, not typed: a ✓ character would be read aloud on every item. */
.ticks { grid-area: list; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ticks li {
  position: relative;
  padding-left: 36px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-body);
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 0; top: 1px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--purple);
}
.ticks li::after {
  content: '';
  position: absolute;
  left: 9px; top: 6px;
  width: 7px; height: 12px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* ============================================================
   Home — feature cards
   ============================================================ */
.features { padding-block: 40px; }
@media (min-width: 680px)  { .features { padding-block: 50px; } }
@media (min-width: 1020px) { .features { padding-block: 60px; } }

/* Handlee, like the hero title, for this heading and the line under it: they
   introduce the kids' printables, which are set in it. */
.features__title {
  font-family: var(--font-hand);
  font-weight: 400;
  letter-spacing: 0;
  font-size: 26px;
  text-align: center;
  margin-bottom: 8px;
}
@media (min-width: 680px) { .features__title { font-size: 32px; } }
.features__lede {
  font-family: var(--font-hand);
  font-weight: 400;
  text-align: center;
  color: var(--ink-muted);
  margin-bottom: 40px;
}

.features__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  /* Flex rather than grid so a short last row sits centred instead of
     hanging off the left edge. */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
}

.feature { display: flex; flex: 0 0 100%; }
@media (min-width: 680px)  { .feature { flex-basis: calc((100% - 2 * 22px) / 3); } }
@media (min-width: 1020px) { .feature { flex-basis: calc((100% - 3 * 22px) / 4); } }
.feature__card {
  display: block;
  width: 100%;
  background: var(--surface);
  border-radius: 18px;
  padding: 26px 22px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s;
}
a.feature__card:hover { transform: translateY(-4px); }
/* Not downloadable yet: no link, no lift, a dashed outline instead of a shadow. */
.feature__card--soon {
  background: oklch(98.5% 0.01 85);
  border: 2px dashed var(--line-strong);
  box-shadow: none;
  padding: 24px 20px;
}
.feature__icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}
.feature__title {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink-heading);
  margin-bottom: 6px;
}
.feature__desc {
  display: block;
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.feature__soon {
  display: block;
  margin-top: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ============================================================
   404
   ============================================================ */
.notfound { padding-block: 60px 80px; max-width: 640px; }
.notfound__title { font-size: 28px; margin-bottom: 12px; }
@media (min-width: 680px) { .notfound__title { font-size: 38px; } }
.notfound__body { font-size: 17px; color: var(--ink-body); margin-bottom: 28px; }

/* ============================================================
   Privacy and disclaimer — a single readable column
   ============================================================ */
.legal { padding-block: 36px 56px; max-width: 760px; }
@media (min-width: 680px) { .legal { padding-block: 56px 80px; } }
.legal__title { font-size: 28px; margin-bottom: 12px; }
@media (min-width: 680px) { .legal__title { font-size: 38px; } }
.legal__lede { font-size: 17px; color: var(--ink-body); margin-bottom: 8px; }
.legal__section { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--line); }
.legal__heading { font-size: 22px; margin-bottom: 14px; }
@media (min-width: 680px) { .legal__heading { font-size: 24px; } }
.legal__subheading { font-size: 17px; margin: 22px 0 8px; }
.legal__body { font-size: 16px; line-height: 1.7; color: var(--ink-body); margin-bottom: 14px; }
.legal__body a { color: var(--purple); font-weight: 600; }

/* ============================================================
   Page headers (Activities)
   ============================================================ */
.page-head { padding-block: 36px 14px; }
@media (min-width: 680px) { .page-head { padding-block: 56px 20px; } }
.page-head--center { text-align: center; }

/* Karen's overview above the Lesson Plans view — the same words as the home
   page's teacher card, so it wears the same lilac. */
.lessons-intro {
  background: var(--lilac);
  border-radius: 20px;
  padding: 22px 20px;
  margin-top: 24px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-body);
}
@media (min-width: 680px) { .lessons-intro { padding: 32px 36px; } }
.lessons-intro__title { font-size: 20px; margin-bottom: 12px; }
@media (min-width: 680px) { .lessons-intro__title { font-size: 22px; } }
.lessons-intro p { margin: 0 0 12px; }
.lessons-intro p:last-child { margin-bottom: 0; }
.page-head--center .page-head__lede { margin-inline: auto; }

.page-head__title { font-size: 28px; margin-bottom: 10px; }
@media (min-width: 680px) { .page-head__title { font-size: 38px; } }
.page-head__lede {
  font-size: 17px;
  color: oklch(42% 0.03 50);
  max-width: 640px;
  margin-bottom: 30px;
}
.page-head--center .page-head__lede { margin-bottom: 40px; }

/* ============================================================
   Activities — filters + cards
   ============================================================ */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.filter {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 2px solid oklch(85% 0.03 60);
  background: var(--surface);
  color: oklch(35% 0.03 50);
  padding: 9px 18px;
  border-radius: 999px;
}
.filter:hover { border-color: var(--accent); }
/* Same as the current nav link. White on the old orange was 2.8:1. */
.filter[aria-current="true"] { background: var(--purple); border-color: var(--purple); color: #fff6c9; }

.resources { padding-block: 0 44px; }
@media (min-width: 680px) { .resources { padding-block: 0 70px; } }

.resources__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 680px)  { .resources__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .resources__grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  scroll-margin-top: 100px; /* clears the sticky header when linked to by #id */
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.card__preview { aspect-ratio: 4 / 3; border-radius: 0; }
img.card__preview { display: block; width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__category {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}
.card__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink-heading);
}
.card__desc { font-size: 13.5px; color: var(--ink-muted); line-height: 1.5; flex: 1; }
.card__action {
  margin: 8px 0 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  background: oklch(95% 0.02 85);
  color: oklch(32% 0.04 50);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
a.card__action:hover { background: var(--accent-soft); }
.card__actions { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.card__actions .card__action { margin: 0; }

/* ============================================================
   About
   ============================================================ */
.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
  padding-block: 36px 44px;
  max-width: 1100px;
}
@media (min-width: 680px) {
  .about { grid-template-columns: 0.9fr 1.1fr; gap: 48px; padding-block: 56px 70px; }
}
.about__art picture { display: block; }
/* The text column is long now, so the cover stays in view beside it. Only once
   the nav is a single row — below 1020px the header height varies. */
@media (min-width: 1020px) { .about__art { position: sticky; top: 100px; } }
/* Natural ratio of the cover art (1023 x 981) — width/height attrs reserve the box. */
.about__cover {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: var(--shadow-float);
}
.about__title { font-size: 26px; margin-bottom: 18px; }
@media (min-width: 680px) { .about__title { font-size: 34px; } }
.about__body {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-body);
  margin-bottom: 18px;
}
.about__body a { color: var(--purple); font-weight: 600; }
.about__section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.about__heading { font-size: 22px; margin-bottom: 16px; }
@media (min-width: 680px) { .about__heading { font-size: 24px; } }

.gift {
  background: var(--lilac);
  border-radius: 20px;
  padding: 24px 22px;
  margin-top: 18px;
}
@media (min-width: 680px) { .gift { padding: 32px; } }
.gift__action { margin: 4px 0 0; }
/* Sits under the cover, inside the sticky column, so it stays in view too. */
.about__buy {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px 14px;
  margin: 24px 0 0;
}
.about__buy-from { font-size: 15px; color: var(--ink-muted); }
.about__isbn {
  margin: 12px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.about__note { margin: 24px 0 0; font-size: 15px; }

.author {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}
/* The <picture> is the flex child now, so it carries the shrink rule. */
.author picture { display: block; flex-shrink: 0; line-height: 0; }
.author__portrait {
  display: block;
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.author__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink-heading);
  margin: 0;
}
.author__role { font-size: 14px; color: var(--ink-soft); margin: 0; }

/* ============================================================
   Contact
   ============================================================ */
.contact { max-width: 640px; padding-block: 36px 60px; }
@media (min-width: 680px) { .contact { padding-block: 60px 90px; } }
.contact__title { font-size: 26px; text-align: center; margin-bottom: 10px; }
@media (min-width: 680px) { .contact__title { font-size: 34px; } }
.contact__lede {
  font-size: 16px;
  color: oklch(42% 0.03 50);
  text-align: center;
  margin-bottom: 36px;
}

.notice { border-radius: 16px; padding: 20px 22px; margin-bottom: 24px; }
.notice__title { font-size: 19px; margin-bottom: 6px; }
.notice--ok {
  background: oklch(94% 0.05 150);
  border: 2px solid oklch(70% 0.11 150);
  color: oklch(30% 0.06 150);
}
.notice--error {
  background: oklch(95% 0.04 25);
  border: 2px solid oklch(60% 0.16 25);
  color: oklch(35% 0.12 25);
}

.form {
  background: var(--lilac);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (min-width: 680px) { .form { padding: 32px; } }

.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field__label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  color: oklch(32% 0.04 50);
  display: block;
  margin-bottom: 6px;
  padding: 0;
}
.field__input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid var(--purple);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
}
.field__input--area { resize: vertical; }
.field__input[aria-invalid="true"] { border-color: oklch(60% 0.16 25); }
.field__error {
  font-size: 13.5px;
  font-weight: 600;
  color: oklch(45% 0.16 25);
  margin: 6px 0 0;
}

.roles__options { display: flex; gap: 8px; }
.role { flex: 1; display: flex; }
.role__input { position: absolute; opacity: 0; width: 0; height: 0; }
.role__face {
  flex: 1;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13.5px;
  border: 2px solid var(--purple);
  background: var(--surface);
  color: oklch(35% 0.03 50);
  padding: 9px;
  border-radius: 10px;
  cursor: pointer;
}
.role__input:checked + .role__face {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}
/* The visual control is the span, so mirror the focus ring onto it. */
.role__input:focus-visible + .role__face {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}
.form__submit { width: 100%; }

/* Honeypot — off-screen rather than display:none, which some bots skip. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============================================================
   Preview gate
   ============================================================ */
.gate {
  max-width: 420px;
  padding-block: 60px 80px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gate__mark { display: block; margin-bottom: 16px; }
.gate__title { font-size: 24px; margin-bottom: 10px; }
.gate__lede { font-size: 15px; color: var(--ink-body); margin-bottom: 24px; }
.gate__form { width: 100%; text-align: left; }
.gate #code { text-align: center; letter-spacing: 4px; font-size: 20px; }
