/* Curious Kea shopfront — shared look for every page (docs/07 palette).
   Daylight paper, ink text, olive headings, orange reserved for the one
   discovery moment on the landing page. Handwriting = Caveat. */
:root {
  --paper: #f7f6f2;
  --paper-raised: #fffef9;
  --ink: #2b2b28;
  --olive: #5c6b46;
  --slate: #4a5257;
  --tussock: #c9a86a;
  --orange: #e8672b;
  --rule: #d9d4c7;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 70% -10%, #fffef9 0%, transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  line-height: 1.6;
  padding: 1.25rem 1.25rem 4rem;
}
main { max-width: 36rem; margin: 0 auto; }
.wide { max-width: 44rem; }
.hand { font-family: 'Caveat', cursive; font-weight: 600; }
a { color: var(--olive); text-underline-offset: 0.15em; }
a:hover, a:focus-visible { color: var(--ink); }
p { margin: 0 0 0.9rem; }
ul, ol { padding-left: 1.2rem; margin: 0 0 0.9rem; }
li { margin-bottom: 0.35rem; }
strong { font-weight: 600; }
h1 {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: clamp(2.6rem, 10vw, 4rem);
  line-height: 1;
  margin: 0 0 0.25rem;
  transform: rotate(-1.4deg);
  color: var(--olive);
}
h1 .kea-word { color: var(--ink); }
.short {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: clamp(1.5rem, 5.5vw, 1.9rem);
  color: var(--slate);
  margin: 0 0 2rem;
  transform: rotate(-0.5deg);
}
h2 {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1.1;
  color: var(--ink);
  margin: 2.5rem 0 0.6rem;
}
h3 {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.15;
  color: var(--olive);
  margin: 1.6rem 0 0.35rem;
}
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
blockquote {
  margin: 0 0 0.9rem;
  border-left: 3px solid var(--tussock);
  padding-left: 0.9rem;
  color: var(--slate);
  font-style: italic;
}
table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
}
th, td { text-align: left; vertical-align: top; padding: 0.4rem 0.6rem 0.4rem 0; border-bottom: 1px solid var(--rule); }
th { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.15rem; color: var(--olive); }
.table-scroll { overflow-x: auto; }

/* Top nav (docs/07 §4.2): wordmark + three handwritten links, "play"
   boxed. Inline at 320px; no menu, no JS. */
.nav {
  display: flex;
  align-items: baseline;
  gap: 1rem 1.1rem;
  flex-wrap: wrap;
  margin: 0 0 2.25rem;
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 1.35rem;
}
.nav .wordmark {
  margin-right: auto;
  color: var(--olive);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem;
}
.nav .wordmark .kea-word { color: var(--ink); }
.nav a { color: var(--ink); text-decoration: none; position: relative; }
.nav a:not(.wordmark):not(.play)::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -0.05em;
  height: 2px; background: var(--ink); border-radius: 2px;
  transform: scaleX(0) rotate(-1deg); transform-origin: left center;
  transition: transform 220ms ease;
}
.nav a:not(.wordmark):not(.play):hover::after,
.nav a:not(.wordmark):not(.play):focus-visible::after,
.nav a[aria-current="page"]::after { transform: scaleX(1) rotate(-1deg); }
.nav a:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

/* The wobbly hand-drawn box: the CTA, and the old "coming soon". */
.boxed {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  color: var(--ink);
  display: inline-block;
  border: 2px solid var(--ink);
  border-radius: 3px 12px 4px 14px / 12px 4px 14px 3px;
  padding: 0.15rem 0.9rem 0.3rem;
  transform: rotate(1.2deg);
  background: #fffef9;
  text-decoration: none;
  line-height: 1.2;
}
.boxed:hover, .boxed:focus-visible { background: var(--ink); color: var(--paper); outline: none; }
.nav .play { font-size: 1.25rem; }
.cta { font-size: 1.6rem; padding: 0.3rem 1.2rem 0.45rem; }

footer {
  margin-top: 3.5rem;
  font-size: 0.85rem;
  color: var(--slate);
  line-height: 1.8;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}
footer .hand { font-size: 1.15rem; }
footer a { color: var(--slate); }
footer .links a { margin-right: 0.9rem; }

/* Landing-page furniture. */
.hero {
  display: block; width: 480px; max-width: 100%; height: auto; margin: 0 0 0.75rem -0.6rem;
  /* wash paper != site paper: multiply melts the background in; the fade
     hides the cut lines at the panorama ends */
  mix-blend-mode: multiply;
  mask-image: linear-gradient(to right, transparent, black 7%, black 93%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 7%, black 93%, transparent);
}
.blurb { font-size: 1.05rem; line-height: 1.65; margin: 0 0 1.75rem; max-width: 30rem; }
.blurb strong { color: var(--olive); font-weight: 600; }
/* One column, stacked — the same portrait-beside-prose row the about
   page uses, so the crew reads the same way in both places. */
.crew { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin: 0.5rem 0 0; }
.crew figure { margin: 0; display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.1rem; align-items: start; }
/* Profile circles: each portrait sits in a raised-paper coin. One
   separation treatment (the background), a hairline of tussock thread.
   Kea's drawing fills its box tighter than Rock's, so it gets extra
   padding (.pad) to sit at the same visual weight. */
.crew img, .coin {
  width: 4.5rem; height: 4.5rem;
  border-radius: 50%;
  background: var(--paper-raised);
  border: 1.5px solid var(--rule);
  padding: 0.4rem;
  object-fit: contain;
}
/* Kea's crop sits up-and-left in its box; uneven padding re-centres the
   bird in the coin (same total per axis, so the scale matches Rock). */
.crew img.pad, .coin.pad { padding: 0.75rem 0.45rem 0.45rem 0.75rem; }
.crew figcaption { font-size: 0.98rem; line-height: 1.5; }
.crew figcaption b { display: block; font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.4rem; color: var(--olive); line-height: 1.1; }
.locals { font-size: 0.95rem; color: var(--slate); margin-top: 1rem; }
.loop { list-style: none; padding: 0; counter-reset: beat; margin: 0.5rem 0 0; }
.loop li { position: relative; padding-left: 2.4rem; margin-bottom: 0.7rem; }
.loop li::before {
  counter-increment: beat; content: counter(beat);
  position: absolute; left: 0; top: 0.05em;
  font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.4rem; color: var(--tussock); line-height: 1;
}
.loop b { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.promise { border-left: 3px solid var(--tussock); padding-left: 0.9rem; font-style: italic; color: var(--slate); }
.strip {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem;
  font-family: 'Caveat', cursive; font-weight: 600; font-size: 1.3rem; color: var(--olive);
  margin: 0.5rem 0 0.25rem; padding: 0;
  list-style: none;
}
.strip li::before { content: "· "; color: var(--tussock); }
.strip li:first-child::before { content: ""; }

/* ------------------------------------------------------------------
   Page furniture (2026-08-19): the drawn devices the reading pages
   share, so a long page breaks into sections a reader can see. Three
   treatments only, each doing one job:
     hr.tussock — the base-camp ground line, as a section break
     .notebook  — ruled paper, borrowed from the app's Wonder Log, for
                  the one thing on a page worth copying out
     .coin      — a portrait in raised paper (shared with .crew)
   No new colours: tussock ink, olive, slate. Orange stays landing-only.
   ------------------------------------------------------------------ */

hr.tussock {
  border: 0;
  height: 34px;
  margin: 2.5rem 0 0;
  background: url("/art/tussock-rule.svg") center / 100% 100% no-repeat;
}
/* Hand-drawn things vary: every second rule is flipped, so the tufts
   swap sides down the page instead of stamping. */
hr.tussock:nth-of-type(even) { transform: scaleX(-1); }
/* The rule brings its own air, so the heading under it doesn't. */
hr.tussock + h2 { margin-top: 1.25rem; }

/* A page from the notebook: ruled paper and the hand, tilted a whisker
   off square. One treatment (the ruled ground) — no border, no shadow. */
.notebook {
  --rule: 2.1rem;
  margin: 1.4rem 0 1.6rem;
  padding: 0.55rem 1.1rem 0.75rem;
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 1.4rem;
  line-height: var(--rule);
  color: var(--ink);
  background: repeating-linear-gradient(
    to bottom,
    var(--paper-raised) 0,
    var(--paper-raised) calc(var(--rule) - 1px),
    var(--tussock) calc(var(--rule) - 1px),
    var(--tussock) var(--rule)
  );
  background-position: 0 0.45rem;
  transform: rotate(-0.35deg);
}
.notebook p { margin: 0; }
.notebook ul { list-style: none; padding: 0; margin: 0; }
.notebook li { margin: 0; line-height: var(--rule); }
/* Attribution under a quoted line: back in the reading face, quiet. */
.notebook .who {
  display: block;
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  font-weight: 400;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--slate);
  margin-top: 0.5rem;
}

/* A portrait beside its paragraphs (the cast, on the about page). */
.figure-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.1rem;
  align-items: start;
  margin: 0 0 1.5rem;
}
.figure-row p:last-child { margin-bottom: 0; }
@media (max-width: 30rem) {
  .figure-row, .crew figure { grid-template-columns: 3.4rem 1fr; gap: 0.8rem; }
  .coin, .crew img { width: 3.4rem; height: 3.4rem; }
}

/* Lists go two-up once there's room — inside the reading column, never
   outside it: one container width is what holds the page together. */
@media (min-width: 40rem) {
  .loop { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
  .loop li { margin-bottom: 1rem; }
}

/* The five patches, sewn on: the app's own chips, so a parent sees what
   a child is actually collecting rather than reading a list of names.
   Tussock thread, each sitting a little crooked — hand-stitched. */
.patches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* a short second row sits under the first, not adrift left */
  gap: 0.65rem 0.8rem;
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 1.2rem;
}
.patches li {
  margin: 0;
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--ink);
  background: var(--paper-raised);
  border: 2px dashed var(--tussock);
  border-radius: 12px 5px 14px 6px / 6px 14px 5px 12px;
  padding: 0.1rem 0.75rem 0.2rem;
}
.patches li:nth-child(odd) { transform: rotate(-1.6deg); }
.patches li:nth-child(even) { transform: rotate(1.2deg); }

/* Lead-labelled points (grown-ups): the label in the hand, above its
   sentence, so a skimming parent can find the one they want. */
.keypoints { list-style: none; padding: 0; margin: 0.4rem 0 0.9rem; }
.keypoints li { margin-bottom: 0.9rem; }
/* Only the leading label becomes a heading — a nested <strong> inside the
   sentence must stay inline, or the point breaks into fragments. */
.keypoints > li > strong:first-child {
  display: block;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--olive);
}

/* Expedition shelves (generated on the landing page and the grown-ups hub).
   A pack reads as a chapter: its name spans the column, its episodes sit
   two-up beneath. Packs never share a row, so nothing lands in a gap. */
.shelves { margin: 0.6rem 0 0; }
@media (min-width: 40rem) {
  .shelf ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.75rem;
  }
  /* Each episode is a column of its own so the links can sit at its foot:
     a row stays level even when one title wraps and its neighbour doesn't. */
  .shelf li { display: flex; flex-direction: column; }
  .shelf li br { display: none; }
  .shelf .ep-links { margin-top: auto; padding-top: 0.25rem; }
  /* Narrower columns: the meta gets its own line so a title never wraps
     mid-phrase into "start / here · about 12 min". */
  .shelf .ep-meta { display: block; }
}
.shelf { margin: 0 0 1.4rem; }
.shelf-name { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.45rem; color: var(--olive); margin: 1.4rem 0 0.2rem; }
.shelf ol { list-style: none; padding: 0; margin: 0; }
.shelf li { padding: 0.35rem 0; border-bottom: 1px dashed var(--rule); }
.shelf .ep-title { font-weight: 600; }
.shelf .ep-meta { color: var(--slate); font-size: 0.9rem; }
.shelf .ep-hook { display: block; font-size: 0.9rem; line-height: 1.4; margin: 0.15rem 0 0.1rem; max-width: 40ch; }
.shelf .ep-links { font-size: 0.9rem; }
.shelf .ep-links a { margin-right: 0.8rem; }

/* Grown-ups card pages. */
.card-meta { font-style: italic; color: var(--slate); margin: -0.5rem 0 1.5rem; }
.card-actions { margin: 0 0 1.5rem; display: flex; gap: 0.6rem 1rem; flex-wrap: wrap; align-items: center; }
.card-actions .back { font-family: 'Caveat', cursive; font-weight: 600; font-size: 1.2rem; }

@media print {
  body { background: #fff; padding: 0; }
  .nav, footer, .card-actions { display: none; }
  main { max-width: none; }
  a { color: inherit; text-decoration: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nav a::after { transition: none; }
}

/* The taster: one minute of the game on the landing page (taster.js). */
.taster {
  margin: 2.5rem 0 0.5rem;
  padding: 1rem 1.1rem 1.2rem;
  border-left: 3px solid var(--tussock);
  background: #fffef9;
}
.taster h2 { margin-top: 0; }
.taster .t-intro { color: var(--slate); }
.taster-stage:empty { display: none; }
.taster-stage { margin: 0.5rem 0 0.75rem; }
.t-line { margin: 0 0 0.9rem; }
.t-name { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.1rem; }
.t-name img { width: 32px; height: 32px; }
.t-name .hand { font-size: 1.25rem; font-weight: 700; color: var(--olive); }
.t-rock .t-name { flex-direction: row-reverse; justify-content: flex-start; }
.t-rock .t-name .hand { color: var(--slate); }
.t-rock { text-align: right; }
.t-text { margin: 0; line-height: 1.5; }
.t-narr .t-text { font-style: italic; color: var(--slate); }
.t-log .t-text {
  font-family: 'Caveat', cursive; font-weight: 600; font-size: 1.3rem;
  border-bottom: 1px solid var(--rule); display: inline-block; padding: 0 0.2rem 0.05rem;
}
.t-flash .t-text { transition: color 400ms ease; }
.t-flash-on .t-text { color: var(--orange); font-weight: 600; }
.t-choices { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; margin: 0.6rem 0 1rem; }
.t-choice { font-size: 1.2rem; text-align: left; cursor: pointer; }
.t-picked { color: var(--slate); font-size: 1.2rem; margin: 0 0 0.9rem; }
.t-end { margin: 1rem 0 0; }
.t-more { color: var(--slate); font-size: 0.95rem; margin: 0.8rem 0 0.4rem; }
.t-again { background: none; border: none; color: var(--slate); font-size: 1.1rem; padding: 0; cursor: pointer; border-bottom: 1px dotted var(--slate); }
.taster-start { font-size: 1.4rem; cursor: pointer; }

/* The kit objects on the grown-ups hub (2026-08-24). */
.kit-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem 0.9rem; margin: 1.5rem 0 0.5rem; }
.kit-row figure { margin: 0; }
/* Uniform boxes so the four captions sit on one line, whatever each
   drawing happened to trim to. */
.kit-row img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; mix-blend-mode: multiply; }
.kit-row figcaption { font-family: 'Caveat', cursive; font-weight: 600; font-size: 1.15rem; text-align: center; color: var(--slate); margin-top: 0.2rem; }

/* Wash art on the site (2026-08-25): white-balanced assets melt into the
   page with multiply; wide pieces fade at their cut ends. */
.card-art, .footer-scene {
  display: block; width: 100%; height: auto; mix-blend-mode: multiply;
  mask-image: linear-gradient(to right, transparent, black 7%, black 93%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 7%, black 93%, transparent);
}
.card-art { margin: 1rem 0 0.5rem; }
.footer-scene { margin: 3rem auto -0.5rem; max-width: 44rem; }
.badge-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.1rem 0.5rem; align-items: flex-start; margin: 1.4rem 0 0.6rem; }
.badge-row figure { margin: 0; width: 84px; text-align: center; }
.badge-row img { width: 64px; height: auto; mix-blend-mode: multiply; }
.badge-row figcaption { font-family: 'Caveat', cursive; font-weight: 600; font-size: 0.95rem; line-height: 1.15; color: var(--slate); margin-top: 0.15rem; }
.signpost-spot { float: right; width: 9.5rem; height: auto; margin: 0 0 0.4rem 1rem; mix-blend-mode: multiply; }
.crew-studies { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.2rem 0; }
.crew-studies img { width: 100%; height: auto; mix-blend-mode: multiply; }
.crew-studies figure { margin: 0; }
.crew-studies figcaption { font-family: 'Caveat', cursive; font-weight: 600; font-size: 1.1rem; text-align: center; color: var(--slate); }

/* Narrow-screen variants. These must come AFTER the rules they override:
   same specificity, so source order decides. */
/* Four kit objects: 4-up with room, 2x2 when narrow — never an orphan. */
@media (max-width: 560px) { .kit-row { grid-template-columns: repeat(2, 1fr); } }
/* Wrapped badges: centre the last line rather than justifying two lonely
   patches out to opposite edges. */
@media (max-width: 460px) { .badge-row { justify-content: center; gap: 1rem 1.1rem; } }
@media (max-width: 480px) { .signpost-spot { width: 7rem; } }
