/* Vocabee — the app's own surface, printed on the web.
   Every colour here is a token out of Vocabee/Design/Theme.swift; every space is a
   multiple of 4; there are three radii (10 / 16 / 28) and no drop shadows. Depth is a
   4px bottom edge in the deep token, and a press drops the face onto it. Labels are ink
   on a coloured face and brand yellow on ink — white text appears nowhere.

   2026-09-12 — the page is banded. Every section stands on its own ground out of the
   palette (paper, cream, cloud, brand, clover, sand) and carries a 4px bottom edge in
   that colour's deep tone, the way a card in the app stands on its edge. There is no
   night theme any more: the bee lives in daylight, so each colour is painted here and
   the page never borrows the host's ground. */

@keyframes rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
@keyframes sway{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(3deg)}}
@keyframes flap{0%,100%{transform:scaleY(1)}50%{transform:scaleY(.84)}}
@keyframes drift{0%,100%{transform:translate(0,0) rotate(-4deg)}33%{transform:translate(12px,-10px) rotate(3deg)}66%{transform:translate(-8px,6px) rotate(-2deg)}}
@keyframes draw{from{stroke-dashoffset:var(--len,600)}to{stroke-dashoffset:0}}
@keyframes pop{0%{transform:scale(.2);opacity:0}70%{transform:scale(1.18)}100%{transform:scale(1);opacity:1}}
@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
@keyframes toHive{
  0%{opacity:0; transform:translate(-320px,-96px) rotate(-10deg) scale(.9)}
  12%{opacity:1}
  55%{transform:translate(-120px,-56px) rotate(6deg) scale(1)}
  88%{opacity:1; transform:translate(-10px,-4px) rotate(-2deg) scale(.9)}
  100%{opacity:0; transform:translate(0,0) rotate(0) scale(.45)}
}
@keyframes outHive{
  0%{opacity:0; transform:translate(0,0) scale(.4)}
  20%{opacity:1; transform:translate(-24px,-28px) scale(1)}
  100%{opacity:0; transform:translate(-180px,-140px) rotate(-14deg) scale(.9)}
}
@keyframes bubble{
  0%{opacity:0; transform:translateY(8px) scale(.86)}
  14%{opacity:1; transform:translateY(0) scale(1)}
  86%{opacity:1; transform:translateY(0) scale(1)}
  100%{opacity:0; transform:translateY(-6px) scale(.96)}
}
@keyframes squish{0%{transform:scale(1,1)}30%{transform:scale(1.12,.86)}60%{transform:scale(.94,1.08)}100%{transform:scale(1,1)}}
@keyframes across{
  from{opacity:0; transform:translate(-10vw,0) rotate(-6deg)}
  10%{opacity:1}
  90%{opacity:1}
  to{opacity:0; transform:translate(102vw,-72px) rotate(8deg)}
}

:root{
  /* ground and paper */
  --cream:#FFF4D6; --paper:#FFFFFF; --sand:#EBDCB8; --sand-deep:#D9C7A0;
  /* the bee */
  --brand:#FFD500; --bee:#FFC21A; --honey:#F0A500; --honey-deep:#C0840B;
  /* ink */
  --ink:#2E1B12; --ink-deep:#1A0F0A; --cocoa:#6B4E3D; --latte:#B89A7A;
  /* signals */
  --clover:#45C46A; --clover-deep:#33A354; --clover-tint:#DFF5E5;
  --coral:#FF6B6B; --coral-deep:#D94F4F;
  --sky:#8ED0FF; --sky-deep:#59B2EE; --cloud:#EAF6FF;

  /* roles, so a band swap is one block */
  --bg:var(--cream); --face:var(--paper); --edge:var(--sand-deep); --rule:var(--sand-deep);
  --fg:var(--ink); --fg-2:var(--cocoa); --fg-3:#8C6B51;   /* latte, darkened so small text reads */
  --accent:var(--honey);

  --display:"Fredoka","Trebuchet MS",system-ui,sans-serif;
  --body:ui-rounded,"SF Pro Rounded","Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;

  --r-sm:10px; --r-card:16px; --r-sheet:28px;
  --gut:clamp(16px,4vw,48px);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%; scroll-behavior:smooth; scroll-padding-top:96px}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

body{
  margin:0; background:var(--cream); color:var(--fg);
  font-family:var(--body);
  font-size:clamp(16px,15px + .25vw,18px); line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:clip;
}

img,svg{max-width:100%; height:auto; display:block}
a{color:inherit; text-decoration:none}
p{margin:0 0 16px}

h1,h2,h3{
  margin:0; font-family:var(--display); font-weight:600;
  letter-spacing:-.01em; line-height:1.1; text-wrap:balance;
}

.shell{max-width:1152px; margin:0 auto; padding:0 var(--gut)}
.prose{max-width:34rem}

:focus-visible{outline:3px solid var(--honey); outline-offset:3px; border-radius:4px}


/* ── the bands ───────────────────────────────────────────────────────────────
   One class per ground. Each sets the ground, the edge under it, and the face and
   rule a card standing on that ground should use, so nothing has to be restated
   inside the section. */

.band{
  position:relative; isolation:isolate;
  padding:clamp(48px,7vw,96px) 0;
  background:var(--band); border-bottom:4px solid var(--band-edge);
}
.band > .shell{position:relative; z-index:2}

.b-paper {--band:var(--paper);       --band-edge:var(--sand);      --face:var(--cream);      --edge:var(--sand-deep); --rule:var(--sand-deep)}
.b-cream {--band:var(--cream);       --band-edge:var(--sand-deep); --face:var(--paper);      --edge:var(--sand-deep); --rule:var(--sand-deep)}
.b-cloud {--band:var(--cloud);       --band-edge:var(--sky);       --face:var(--paper);      --edge:var(--sky);       --rule:var(--sky)}
.b-sky   {--band:var(--sky);         --band-edge:var(--sky-deep);  --face:var(--cloud);      --edge:var(--sky-deep);  --rule:var(--sky-deep)}
.b-clover{--band:var(--clover-tint); --band-edge:var(--clover);    --face:var(--paper);      --edge:var(--clover);    --rule:var(--clover)}
.b-sand  {--band:var(--sand);        --band-edge:var(--latte);     --face:var(--cream);      --edge:var(--sand-deep); --rule:var(--sand-deep)}
.b-brand {
  --band:var(--brand); --band-edge:var(--honey); --face:var(--cream);
  --edge:var(--honey); --rule:var(--honey);
  --fg-2:#5C3E2B; --fg-3:#7A5539; --accent:var(--honey-deep);
}

/* a faint field of honey dots, for the bands that want texture */
.dotted::before{
  content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background-image:radial-gradient(var(--honey) 1.4px,transparent 1.5px);
  background-size:24px 24px; opacity:.14;
}


/* ── masthead — a card that rides at the top ───────────────────────────────── */

/* the index wraps the masthead in its own short .shell, so that wrapper is what sticks;
   on the doc pages the .shell holds the whole page and the masthead sticks by itself */
.topbar{position:sticky; top:12px; z-index:50}
.masthead{
  position:sticky; top:12px; z-index:50;
  display:flex; align-items:center; gap:24px;
  margin:16px 0 0; padding:12px 20px;
  background:var(--paper); border-radius:var(--r-card);
  box-shadow:0 4px 0 var(--sand-deep);
}
.masthead .name{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--display); font-weight:600; font-size:20px; letter-spacing:-.01em;
}
.masthead .mark{width:30px; height:30px; border-radius:8px; flex:0 0 auto}
.masthead .name:hover .mark{animation:squish .5s ease}
.masthead .links{
  margin-left:auto; display:flex; flex-wrap:wrap; gap:8px 20px;
  font-size:15px; font-weight:600; color:var(--fg-2);
}
.masthead .links a{padding:4px 0; border-bottom:2px solid transparent}
.masthead .links a:hover{color:var(--fg); border-bottom-color:var(--brand)}
/* phones: one row that never wraps; the links slide sideways and fade at the edge */
@media (max-width:640px){
  .topbar,.masthead{top:8px}
  .masthead{gap:16px; padding:8px 8px 8px 16px}
  .masthead .name{font-size:18px}
  .masthead .mark{width:28px; height:28px}
  .masthead .links{
    flex:1 1 auto; min-width:0; flex-wrap:nowrap; gap:0; overflow-x:auto;
    scrollbar-width:none; font-size:14px; white-space:nowrap;
    -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent);
            mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent);
  }
  .masthead .links::-webkit-scrollbar{display:none}
  .masthead .links a{padding:12px 8px; border-bottom:0}
  .masthead .links a:first-child{margin-left:auto}
  .masthead .links a:last-child{padding-right:24px}
}


/* ── hero ───────────────────────────────────────────────────────────────── */

.lede-hero{padding-top:clamp(32px,5vw,56px); overflow:hidden}
.lede-hero .shell{
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,38%);
  gap:clamp(32px,5vw,72px); align-items:center;
}
/* the sun the bee flies in front of */
.lede-hero::after{
  content:""; position:absolute; z-index:0; pointer-events:none;
  right:-8%; top:-12%; width:min(760px,86vw); aspect-ratio:1;
  border-radius:50%;
  background:radial-gradient(circle,rgba(255,213,0,.42) 0 42%,rgba(255,213,0,.16) 58%,transparent 72%);
}
.claim{
  /* the marked line never wraps, so the type has to stay inside the column:
     the column is ~62% of the shell and this size keeps the line shorter than it */
  font-size:clamp(36px,22px + 3.2vw,64px); letter-spacing:-.02em;
  line-height:1.02; margin-bottom:16px;
}
/* the marker the app paints behind a headword */
.hl{position:relative; white-space:nowrap; padding:0 8px}
.hl::before{
  content:""; position:absolute; z-index:-1;
  left:-2px; right:-2px; top:.1em; bottom:.06em;
  background:var(--brand); border-radius:var(--r-sm);
  transform:rotate(-1.2deg);
}
.sub{font-size:19px; color:var(--fg-2); max-width:38ch; margin-bottom:28px}

.store{
  display:inline-flex; align-items:center; gap:12px;
  background:var(--ink); color:var(--brand);
  padding:16px 24px; border-radius:var(--r-card);
  box-shadow:0 4px 0 var(--ink-deep);
  font-weight:700;
  transition:transform .12s ease, box-shadow .12s ease;
}
.store:hover{transform:translateY(-2px); box-shadow:0 6px 0 var(--ink-deep)}
.store:active{transform:translateY(4px); box-shadow:0 0 0 var(--ink-deep)}
.store span{line-height:1.15; font-size:17px}
.store b{
  display:block; font-family:var(--body); font-weight:600;
  font-size:11px; letter-spacing:.08em; text-transform:uppercase; opacity:.85;
}
.req{margin:16px 0 0; font-size:14px; color:var(--fg-3); font-weight:600}

/* Mel, and the two screens she is holding up */
.screens{
  position:relative; display:flex; justify-content:center; align-items:flex-end;
  min-height:440px;
}
.ph{width:min(248px,44vw)}
.ph-back{transform:translateX(14%) rotate(5deg) scale(.88); opacity:.96}
.ph-front{position:relative; z-index:2; transform:translateX(-10%) rotate(-2deg)}
.mel-hero{
  position:absolute; z-index:3; right:-12px; bottom:-20px;
  width:min(180px,32vw); cursor:pointer;
  background:none; border:0; padding:0;
  transition:transform .18s cubic-bezier(.2,.7,.2,1);
}
.mel-hero img{width:100%; pointer-events:none}
.mel-hero:hover{transform:translateY(-4px) rotate(-3deg)}
.mel-hero:active{transform:scale(.94)}

/* what Mel says when you poke her */
.say-bubble{
  position:absolute; z-index:4; right:132px; bottom:96px; width:220px;
  background:var(--paper); color:var(--fg);
  border-radius:var(--r-card); box-shadow:0 4px 0 var(--sand-deep);
  padding:12px 16px; font-size:15px; line-height:1.4;
  opacity:0; pointer-events:none;
}
.say-bubble b{display:block; font-family:var(--display); font-size:19px; margin-bottom:2px}
.say-bubble i{color:var(--fg-2); font-style:normal; font-size:14px}
.say-bubble::after{
  content:""; position:absolute; right:24px; bottom:-10px;
  width:0; height:0; border:10px solid transparent;
  border-top-color:var(--paper); border-bottom:0;
}
.say-bubble.on{animation:bubble 3.2s ease forwards}

@media (max-width:900px){
  .lede-hero .shell{grid-template-columns:1fr}
  .screens{margin-top:32px; min-height:0}
  .ph{width:min(208px,40vw)}
  .mel-hero{width:min(136px,28vw); right:0; bottom:-8px}
  .say-bubble{right:96px; bottom:72px; width:180px}
}


/* ── running sections ───────────────────────────────────────────────────── */

.eyebrow{
  display:inline-flex; align-items:center; gap:8px; margin:0 0 12px;
  font-family:var(--display); font-weight:600; font-size:13px;
  letter-spacing:.14em; text-transform:uppercase; color:var(--accent);
}
.eyebrow::before{
  content:""; flex:0 0 auto; width:12px; height:14px; background:currentColor;
  clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);
}
h2{
  font-size:clamp(30px,22px + 2.2vw,46px); max-width:24ch;
  margin-bottom:16px; color:var(--fg);
}
.lead{font-size:18px; color:var(--fg-2)}
.num{font-variant-numeric:tabular-nums; color:var(--honey-deep)}
.b-brand .num{color:var(--ink)}
.num{position:relative}
.num.rolling{color:transparent}
.odo-roll{position:absolute; inset:0; height:var(--lh); white-space:nowrap; pointer-events:none}
.odo,.odo-sep{position:absolute; top:0; height:var(--lh); text-align:center}
.odo{overflow:hidden}
.odo-strip{display:block; transition-property:transform; transition-timing-function:cubic-bezier(.2,1.1,.4,1)}
.odo-strip > span, .odo-sep{display:block; height:var(--lh); line-height:var(--lh)}

/* figure rows — a diagram carries each claim, alternating side */
.figrow{
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,400px);
  gap:clamp(32px,5vw,72px); align-items:center;
}
.figrow-flip{grid-template-columns:minmax(0,448px) minmax(0,1fr)}
.figrow-flip .figbox{order:-1}
.figtext h2{margin-bottom:16px}
.figtext .lead{max-width:40ch}
.figtext .lead:last-child{margin-bottom:0}

figure.figbox{
  position:relative; margin:0; color:var(--fg);
  background:var(--face); border:2px solid var(--rule);
  border-radius:var(--r-card); box-shadow:0 4px 0 var(--edge);
  padding:24px;
}
.figbox-tight{max-width:288px}
.fig{width:100%; height:auto; overflow:visible}
.fig text{font-family:var(--display); font-weight:500}
.fig-field{color:var(--fg)}
.fig-curve{color:var(--fg-2)}
.fig-chain{color:var(--fg)}
figcaption{
  margin-top:16px; font-size:14px; font-weight:600; color:var(--fg-3);
  max-width:36ch; line-height:1.5;
}

@media (max-width:880px){
  .figrow,.figrow-flip{grid-template-columns:1fr}
  .figrow-flip .figbox{order:0}
  .figbox-tight{max-width:none}
}

/* the mechanism — three numbered beats */
.mech{
  display:grid; gap:20px; grid-template-columns:repeat(auto-fit,minmax(272px,1fr));
  margin-top:32px;
}
.mech > div{
  background:var(--face); border:2px solid var(--rule);
  border-radius:var(--r-card); box-shadow:0 4px 0 var(--edge);
  padding:24px;
  transition:transform .16s cubic-bezier(.2,.7,.2,1), box-shadow .16s ease;
}
.mech > div:hover{transform:translateY(-4px); box-shadow:0 8px 0 var(--edge)}
.mech .n{
  display:inline-flex; align-items:center; justify-content:center;
  width:32px; height:32px; margin-bottom:12px;
  background:var(--brand); color:var(--ink);
  border-radius:var(--r-sm);
  font-family:var(--display); font-weight:600; font-size:16px;
  font-variant-numeric:tabular-nums;
}
.b-brand .mech .n{background:var(--ink); color:var(--brand)}
.mech > div:hover .n{animation:pulse .5s ease}
.mech h3{font-size:20px; margin-bottom:8px}
.mech p{color:var(--fg-2); font-size:16px; margin:0; max-width:36ch}

/* evidence — phone beside the claim */
.evidence{
  display:grid; grid-template-columns:1fr auto;
  gap:clamp(32px,6vw,80px); align-items:center;
}
.evidence .phone{width:min(240px,58vw)}
@media (max-width:760px){
  .evidence{grid-template-columns:1fr}
  .evidence .phone{margin-top:32px}
}


/* ── the hive — the app's own sky, on the page ─────────────────────────────── */

.hive-scene{
  position:relative; height:300px; margin-top:32px; overflow:hidden;
  border-radius:var(--r-sheet);
  background:
    radial-gradient(120% 120% at 50% 118%, var(--cloud) 0 46%, transparent 72%),
    linear-gradient(to bottom, var(--paper), var(--cream));
  border:2px solid var(--rule); box-shadow:0 4px 0 var(--edge);
}
.hive-scene .hive{
  position:absolute; left:50%; bottom:-4px; width:216px;
  transform:translateX(-50%);
  cursor:pointer; background:none; border:0; padding:0;
}
.hive-scene .hive img{width:100%; pointer-events:none}
/* the entrance sits at 0.84 of the hive's box: 216 * .16 ≈ 34px above its base */
.flier{position:absolute; left:50%; bottom:34px; width:44px; margin-left:-22px}
.flier img{width:100%}
.f1{transform:translate(-280px,-72px) rotate(-8deg)}
.f2{transform:translate(-176px,-128px) rotate(4deg)}
.f3{transform:translate(148px,-104px) rotate(-6deg) scaleX(-1)}
.f4{transform:translate(256px,-40px) rotate(6deg) scaleX(-1)}
.hive-count{
  position:absolute; left:20px; top:20px; z-index:2;
  background:var(--brand); color:var(--ink);
  border-radius:var(--r-card); box-shadow:0 4px 0 var(--honey);
  padding:8px 16px; font-family:var(--display); font-weight:600; font-size:17px;
}
.hive-count small{display:block; font-family:var(--body); font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; opacity:.7}
@media (max-width:560px){
  .hive-scene{height:240px}
  .hive-scene .hive{width:160px}
  .f1{transform:translate(-128px,-56px) rotate(-8deg)}
  .f2{transform:translate(40px,-152px) rotate(4deg)}
  .f3{transform:translate(72px,-88px) rotate(-6deg) scaleX(-1)}
  .f4{transform:translate(124px,-32px) rotate(6deg) scaleX(-1)}
}


/* ── bees loose on the page ─────────────────────────────────────────────────── */

.bee-deco{
  position:absolute; z-index:1; width:40px; pointer-events:none; opacity:.95;
}
.bee-tr{right:6%; top:48px; transform:scaleX(-1)}
.bee-br{right:8%; bottom:40px}
/* the hero's one bee sits in the empty strip under the phones, left of Mel, so it
   never lands on the headline whether the hero is one column or two */
.bee-hero{left:4%; bottom:12px; transform:scaleX(-1)}

/* Mel, peeking into a section */
.mel-peek{position:absolute; z-index:1; pointer-events:none}
/* every peek stands ON the band's bottom edge, never through it */
.peek-loop {right:0;  bottom:0;  width:min(208px,30vw)}
.peek-how  {right:2%; bottom:0;  width:min(168px,24vw)}
.peek-spec {right:0;  top:8px;   width:min(200px,26vw)}
.peek-wid  {left:0;   bottom:0;  width:min(184px,26vw)}
.peek-orig {right:3%; top:24px;  width:min(152px,22vw)}
/* Mel is honey on a honey ground in the daily-loop band, so she gets her own
   pool of light to stand in — the same cream as the cards beside her */
.peek-loop{background:radial-gradient(circle at 50% 56%,var(--cream) 0 46%,rgba(255,244,214,.55) 58%,transparent 68%)}
@media (max-width:900px){
  .mel-peek{opacity:.32}
  .peek-spec,.peek-orig{display:none}
}
@media (max-width:760px){
  .peek-loop,.peek-how{display:none}
  .peek-wid{left:auto; right:var(--gut); width:128px; opacity:1}
}

/* the swarm the fifth poke lets out */
.swarm{position:fixed; inset:0; z-index:40; pointer-events:none; overflow:hidden}
.swarm img{position:absolute; width:40px}


/* ── the specimen — one day, as a card ──────────────────────────────────── */

.spread{
  display:grid; grid-template-columns:minmax(0,1fr) 224px;
  gap:clamp(32px,5vw,72px); align-items:start;
}
.headword-sm{
  font-size:clamp(32px,24px + 3vw,52px); letter-spacing:-.02em; margin-top:24px;
}
.rule-sm{border:0; height:4px; background:var(--brand); border-radius:2px; margin:12px 0 16px; width:64px}
.gram{font-size:16px; color:var(--fg-2); margin-bottom:20px; font-weight:600}
.gram i{font-style:normal; color:var(--fg-3)}
.sense{
  font-family:var(--display); font-weight:500;
  font-size:clamp(20px,18px + 1.1vw,28px); line-height:1.3;
  max-width:28ch; margin-bottom:20px;
}
.root{
  max-width:40ch; color:var(--fg-2); font-size:16px;
  background:var(--clover-tint); border-radius:var(--r-card);
  padding:16px 20px; margin-bottom:28px;
}
.root b{font-weight:700; color:var(--clover-deep)}
.pitch{display:flex; align-items:center; gap:24px; flex-wrap:wrap}
.pitch .say{font-size:17px; max-width:32ch; margin:0}
.go{
  display:inline-block; font-weight:700; color:var(--ink);
  background:var(--brand); border-radius:var(--r-card);
  padding:12px 20px; box-shadow:0 4px 0 var(--honey);
  transition:transform .12s ease, box-shadow .12s ease;
}
.go:hover{transform:translateY(-2px); box-shadow:0 6px 0 var(--honey)}
.go:active{transform:translateY(4px); box-shadow:0 0 0 var(--honey)}

/* the margin word list */
.column{
  border-left:4px solid var(--rule); padding-left:20px;
  font-size:16px; line-height:1.8; color:var(--fg-3);
}
.column .lbl{
  display:block; font-family:var(--display); font-weight:600; font-size:14px;
  color:var(--fg-2); margin-bottom:8px;
}
.column ul{margin:0; padding:0}
.column li{list-style:none}
.column .here{color:var(--fg); font-weight:700; position:relative}
.column .here::after{
  content:""; position:absolute; left:-26px; top:.62em;
  width:8px; height:8px; border-radius:50%; background:var(--honey);
}
@media (max-width:880px){
  .spread{grid-template-columns:1fr}
  .column{border-left:0; border-top:4px solid var(--rule); padding:20px 0 0; columns:2; column-gap:32px}
  .column .lbl{column-span:all}
  .column .here::after{display:none}
  .column .here{color:var(--honey-deep)}
}


/* ── entry (poster-scale headword, used on the specimen page) ───────────── */

.entry{padding:clamp(40px,8vw,96px) 0 clamp(32px,6vw,56px)}
.headword{
  font-family:var(--display); font-weight:600;
  font-size:clamp(52px,24px + 12vw,144px); line-height:.92; letter-spacing:-.03em;
}
.headword .soft{color:var(--fg-3)}
.entry hr{border:0; height:4px; background:var(--brand); border-radius:2px; margin:clamp(16px,3vw,28px) 0 16px}


/* ── questions ──────────────────────────────────────────────────────────── */

/* the heading holds the left rail, the list takes the rest of the band */
.qarow{
  display:grid; grid-template-columns:minmax(0,344px) minmax(0,1fr);
  gap:clamp(32px,5vw,64px); align-items:start;
}
.qahead h2{max-width:14ch; margin-bottom:12px}
.qahead .lead{margin-bottom:12px}
.qamail{font-weight:600; color:var(--accent); border-bottom:2px solid var(--sand-deep)}
.qamail:hover{border-bottom-color:var(--accent)}
@media (max-width:880px){
  .qarow{grid-template-columns:1fr}
  .qahead h2{max-width:20ch}
}

.q{
  background:var(--face); border:2px solid var(--rule);
  border-radius:var(--r-card); box-shadow:0 4px 0 var(--edge);
  padding:4px 20px; margin-bottom:12px;
  transition:box-shadow .16s ease;
}
.q:hover{box-shadow:0 6px 0 var(--edge)}
.q summary{
  cursor:pointer; list-style:none; min-height:44px;
  display:flex; gap:16px; align-items:center;
  font-family:var(--display); font-weight:600; font-size:17px;
}
.q summary::-webkit-details-marker{display:none}
.q summary::after{
  content:""; margin-left:auto; width:10px; height:10px; flex:0 0 auto;
  border-right:3px solid var(--honey); border-bottom:3px solid var(--honey);
  border-radius:2px;
  transform:rotate(45deg) translateY(-3px); transition:transform .2s ease;
}
.q[open] summary::after{transform:rotate(225deg) translateY(-1px)}
.q p{margin:0 0 16px; color:var(--fg-2); max-width:60ch; font-size:16px}


/* ── folio and colophon — the page is put to bed on ink ─────────────────── */

.folio{
  display:flex; gap:16px; align-items:center; padding:24px 0;
  color:var(--fg-3); font-size:14px; font-weight:600;
}
.folio .fill{flex:1; height:2px; background:var(--sand-deep); border-radius:1px}

.colophon{
  position:relative; overflow:hidden;
  background:var(--ink); color:var(--sand);
  padding:48px 0 56px; font-size:15px;
}
.colophon .shell{position:relative; z-index:2}
.colophon a{color:var(--brand); font-weight:600; border-bottom:2px solid #4A3225}
.colophon a:hover{border-bottom-color:var(--brand)}
.colophon p{margin:0 0 8px; max-width:46ch}
.colophon p:last-child{color:var(--latte); margin-top:16px}
.mel-foot{
  position:absolute; z-index:1; right:4%; bottom:-24px;
  width:min(200px,30vw); opacity:.9; pointer-events:none;
}
@media (max-width:720px){.mel-foot{width:132px; right:0; opacity:.45}}


/* ── motion ─────────────────────────────────────────────────────────────────
   Everything that moves lives in here, so Reduce Motion gets the same page
   standing still. */

.reveal{opacity:1}
@media (prefers-reduced-motion:no-preference){
  .claim,.sub,.store,.req{animation:rise .6s cubic-bezier(.2,.7,.2,1) backwards}
  .claim{animation-delay:.04s} .sub{animation-delay:.14s}
  .store{animation-delay:.24s} .req{animation-delay:.32s}
  .screens{animation:rise .7s cubic-bezier(.2,.7,.2,1) .18s backwards}

  .mel-hero img{animation:bob 3.6s ease-in-out infinite}
  .mel-peek{animation:bob 5.2s ease-in-out infinite}
  .peek-how{animation-duration:4.4s}
  .peek-wid{animation-duration:6s}
  .mel-foot{animation:bob 7s ease-in-out infinite}

  .bee-deco{animation:drift 7s ease-in-out infinite}
  .bee-tr{animation-duration:9s} .bee-br{animation-duration:8s} .bee-hero{animation-duration:6.4s}
  .bee-deco img,.flier img{animation:flap .22s ease-in-out infinite}

  .flier{animation:toHive 6.4s cubic-bezier(.4,0,.6,1) infinite}
  .f1{animation-delay:0s} .f2{animation-delay:1.6s}
  .f3{animation-delay:3.2s} .f4{animation-delay:4.8s}
  .hive-count{animation:bob 4.8s ease-in-out infinite}

  /* the page comes up as you reach it */
  .js .reveal{opacity:0; transform:translateY(24px);
    transition:opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1)}
  .js .reveal.in{opacity:1; transform:none}

  /* the forgetting curve draws itself, then the reviews land */
  .js .fig-curve polyline{--len:900; stroke-dasharray:var(--len)}
  .js .in .fig-curve polyline{animation:draw 1.6s ease-out backwards}
  .js .in .fig-curve polyline:nth-of-type(2){animation-delay:.5s}
  .js .in .fig-curve polyline:nth-of-type(3){animation-delay:1s}
  .js .fig-curve circle{transform-box:fill-box; transform-origin:50% 50%; opacity:0}
  .js .in .fig-curve circle{animation:pop .5s cubic-bezier(.2,.7,.2,1) forwards}
  .js .in .fig-curve circle:nth-of-type(1){animation-delay:.9s}
  .js .in .fig-curve circle:nth-of-type(2){animation-delay:1.5s}

  /* the forty-two thousand you already have, filling in */
  .js .fig-field circle[fill="currentColor"]{transform-box:fill-box; transform-origin:50% 50%; opacity:0}
  .js .in .fig-field circle[fill="currentColor"]{animation:pop .44s cubic-bezier(.2,.7,.2,1) forwards; fill:var(--honey)}
  .js .in .fig-field circle:nth-of-type(7n+1){animation-delay:.05s}
  .js .in .fig-field circle:nth-of-type(7n+2){animation-delay:.14s}
  .js .in .fig-field circle:nth-of-type(7n+3){animation-delay:.23s}
  .js .in .fig-field circle:nth-of-type(7n+4){animation-delay:.32s}
  .js .in .fig-field circle:nth-of-type(7n+5){animation-delay:.41s}
  .js .in .fig-field circle:nth-of-type(7n+6){animation-delay:.5s}
  .js .in .fig-field circle:nth-of-type(7n+7){animation-delay:.59s}

  /* the lineage arrives link by link */
  .js .fig-chain circle{transform-box:fill-box; transform-origin:50% 50%; opacity:0}
  .js .in .fig-chain circle{animation:pop .5s cubic-bezier(.2,.7,.2,1) forwards}
  .js .in .fig-chain circle:nth-of-type(2){animation-delay:.22s}
  .js .in .fig-chain circle:nth-of-type(3){animation-delay:.44s}
  .js .in .fig-chain circle:nth-of-type(4){animation-delay:.66s}

  .swarm img{animation:across 3.4s linear forwards}
  .out-bee{animation:outHive 1.6s ease-out forwards}
}
/* ── legal documents ────────────────────────────────────────────────────────
   The measure holds the text; the outer column carries the index, the way the
   app's word list sits beside the entry. */

.doc{
  display:grid; align-items:start; justify-content:space-between;
  grid-template-columns:minmax(0,608px) minmax(176px,224px);
  gap:clamp(32px,5vw,72px);
  padding:clamp(40px,6vw,64px) 0 72px;
}
.doc-body{grid-area:1/1; min-width:0; max-width:608px; margin-inline:auto}

.doc h1{font-size:clamp(30px,24px + 1.5vw,42px); margin-bottom:8px}
.doc .meta{color:var(--fg-3); font-size:15px; font-weight:600; margin:0}
.doc h1 + .meta{padding-bottom:20px; margin-bottom:32px; border-bottom:2px solid var(--rule)}
.doc .lede{font-size:18px; color:var(--fg); margin-bottom:28px}

.doc h2{
  display:flex; gap:12px; align-items:baseline; max-width:none;
  font-size:22px; line-height:1.3; margin:48px 0 12px; scroll-margin-top:8px;
}
.doc h2:first-child{margin-top:0}
.doc h2 .num{
  flex:0 0 auto; min-width:24px; color:var(--honey);
  font-variant-numeric:tabular-nums;
}
.doc p,.doc li{color:var(--fg-2)}
.doc .clause{padding-left:48px; text-indent:-48px}
.doc .clause .cnum{
  display:inline-block; width:48px; font-size:inherit; line-height:1;
  text-indent:0; margin:0; color:var(--fg-3); font-weight:700;
  font-variant-numeric:tabular-nums;
}
.doc ul{margin:0 0 16px; padding-left:20px}
.doc li{margin:4px 0}
.doc li::marker{color:var(--honey)}
.doc a{color:var(--cocoa); font-weight:600; border-bottom:2px solid var(--rule); word-break:break-word}
.doc a:hover{color:var(--fg); border-bottom-color:var(--brand)}
.doc .inshort{
  background:var(--clover-tint); border-radius:var(--r-card);
  padding:16px 20px; color:var(--fg); margin:16px 0 20px; font-weight:600;
}
.doc dt{font-family:var(--display); font-weight:600; color:var(--fg); margin-top:24px}
.doc dd{margin:4px 0 0; color:var(--fg-2)}
.doc hr.rule{border:0; height:2px; background:var(--rule); border-radius:1px; margin:40px 0}

.doc .toc{margin:8px 0 24px; padding-left:20px; color:var(--fg-2); font-size:16px; line-height:1.7}
.doc .toc li{margin:2px 0}
.doc .toc a{color:inherit; border:0; font-weight:600}
.doc .toc a:hover{color:var(--honey)}

/* the margin index */
.rail{
  grid-area:1/2; position:sticky; top:96px; max-height:calc(100vh - 124px);
  overflow:auto; overscroll-behavior:contain;
  border-left:4px solid var(--rule); padding-left:20px;
  font-size:14px; line-height:1.45; color:var(--fg-3);
}
.rail p{
  font-family:var(--display); font-weight:600; color:var(--fg-2);
  margin:0 0 8px; font-size:14px;
}
.rail ul,.rail ol{list-style:none; margin:0; padding:0}
.rail ol{margin-bottom:24px}
.rail li{position:relative; margin:6px 0}
.rail a{display:block; color:var(--fg-2); border:0; font-weight:600; transition:color .15s ease}
.rail a:hover{color:var(--honey)}
.rail .here > a{color:var(--fg)}
.rail .here::after{
  content:""; position:absolute; left:-26px; top:.5em;
  width:8px; height:8px; border-radius:50%; background:var(--honey);
}
.rail-toc-num a{display:grid; grid-template-columns:28px minmax(0,1fr)}
.rail-toc .n{color:var(--fg-3); text-align:right; padding-right:8px; font-variant-numeric:tabular-nums}
.rail .here .n{color:var(--honey)}

@media (min-width:1001px){ .has-rail .toc, .has-rail .toc-head{display:none} }
@media (max-width:1000px){
  .doc{grid-template-columns:minmax(0,1fr); padding-bottom:56px}
  .rail{display:none}
}
@media (max-width:560px){
  .doc .clause{padding-left:36px; text-indent:-36px}
  .doc .clause .cnum{width:36px}
}



/* the legal pages get a paper sheet on the cream ground, like everything else */
.doc-body{
  max-width:688px;
  background:var(--paper); border-radius:var(--r-sheet);
  box-shadow:0 4px 0 var(--sand-deep);
  padding:clamp(24px,4vw,48px);
}
.doc h1{color:var(--fg)}
.doc .inshort{border-left:4px solid var(--clover)}

/* ── print — the legal pages get filed ──────────────────────────────────── */

@media print{
  body:has(main.doc){background:#fff; color:#000; font-size:10.5pt; line-height:1.5}
  body:has(main.doc) .masthead, .rail, body:has(main.doc) .colophon{display:none !important}
  body:has(main.doc) .shell{max-width:none; padding:0}
  .doc{display:block; padding:0}
  .doc-body{margin:0; max-width:none}
  .doc p, .doc li, .doc .meta, .doc dd{color:#000}
  .doc h2{break-after:avoid; margin-top:24px}
  .doc h2 .num, .doc li::marker{color:#000}
  .doc .inshort{background:none; border-left:2px solid #000; border-radius:0; padding:4px 0 4px 12px; color:#000}
  .doc a{color:#000; border:0}
  .doc-body a[href^="http"]::after{content:" <" attr(href) ">"; font-size:8.5pt; word-break:break-all}
  .doc p, .doc li{orphans:3; widows:3}
  .doc .toc{color:#000}
  .doc hr.rule{background:#000}
}
