/* Five of the Week: pub blackboard
   A signwritten menu board: black board in a dark oak frame with a gilt bead,
   white chalk lettering in traditional serifs and one antique-gold accent.
   html = frame, body = board. Chalk texture is inline SVG noise, so it works
   offline and straight from disk. */
:root {
  --board: #18191a;
  --board-2: #212324;
  --chalk: #f0ede4;
  --chalk-dim: #c4c0b4;
  --rule: rgba(240, 237, 228, 0.5);      /* chalk lines */
  --rule-faint: rgba(240, 237, 228, 0.16);
  --gold: #d8b26a;                        /* the one accent */
  --smoke: #c9bfd4;
  --warn: #dba4a0;
  --oak: #3b2416;
  --oak-2: #5a3a24;
  --oak-dark: #1f130b;

  --display: "IM Fell English SC", "Playfair Display SC", Georgia, serif;
  --serif: "IM Fell English", Georgia, serif;          /* italics and flourishes */
  --body: "EB Garamond", Garamond, Georgia, serif;
  --chalk-caps: "Fredericka the Great", "IM Fell English SC", Georgia, serif;  /* chalkboard signwriting: headings and drink names */
  --sign: "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;  /* small signwriter caps */

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .3 0 0 0 -.085'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* faint half-wiped haze: a 1600×1200 tile that wraps seamlessly
     (stitchTiles, with the filter region pinned to the tile), so it repeats
     down a page of any length */
  --residue: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='1200'%3E%3Cfilter id='r' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0022 .006' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .22 0 0 0 -.08'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23r)'/%3E%3C/svg%3E");
  /* speckle masks: chalk never lays down solid colour */
  --chalk-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 -1.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  --chalk-mask-soft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 -.8'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
  /* The human wipe (see "Motion"), pre-drawn by tools/textures.py. A duster
     stroke, stretched over three page-widths and the stroke's height: alpha is
     how much chalk it takes off, 0.97 behind the edge (left third), nothing
     ahead (right third). Streaky noise drags the edge about like felt, streaks
     behind it take off less (the smudges), and the top and bottom fade out.
     --wipe-rl is the same, mirrored. --dust-smear is the chalk dust a duster
     spreads: long faint streaks, in patches. */
  --wipe-lr: url("img/wipe-lr.png");
  --wipe-rl: url("img/wipe-rl.png");
  --dust-smear: url("img/dust-smear.png");
  /* ornamental divider: rule, dot, diamond, dot, rule */
  --flourish: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 16'%3E%3Cg fill='none' stroke='%23d8b26a' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M4 8H98M142 8H236'/%3E%3Cpath d='M120 2.5L127 8L120 13.5L113 8Z'/%3E%3Ccircle cx='106' cy='8' r='1.5' fill='%23d8b26a'/%3E%3Ccircle cx='134' cy='8' r='1.5' fill='%23d8b26a'/%3E%3C/g%3E%3C/svg%3E");

  /* motion */
  --ease-out: cubic-bezier(.22, .8, .24, 1);
  --ease-in: cubic-bezier(.55, 0, .75, .2);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

/* Where each duster stroke has got to (animated; see "Motion") */
@property --w1 { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
@property --w2 { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --w3 { syntax: "<percentage>"; inherits: false; initial-value: 100%; }

* { box-sizing: border-box; }

/* ---------- Frame and board ---------- */
html {
  scrollbar-gutter: stable;   /* no sideways jump when a scrollbar appears */
  background-color: var(--oak-dark);
  background-image:
    repeating-linear-gradient(91deg, rgba(0,0,0,0) 0 9px, rgba(0,0,0,.18) 9px 10px, rgba(0,0,0,0) 10px 23px),
    repeating-linear-gradient(89deg, rgba(255,210,160,.035) 0 2px, rgba(0,0,0,0) 2px 17px),
    linear-gradient(90deg, var(--oak-dark), var(--oak) 18%, var(--oak-2) 50%, var(--oak) 82%, var(--oak-dark));
}

body {
  --frame: clamp(14px, 2.6vw, 30px);
  margin: var(--frame);
  min-height: calc(100vh - 2 * var(--frame));
  display: flex; flex-direction: column;
  position: relative; isolation: isolate;
  color: var(--chalk);
  font: 400 1.15rem/1.55 var(--body);
  /* The board runs the full length of the page. Every layer is a fixed-size
     tile pinned to the top and repeated downwards, so nothing stops after the
     first screen, and nothing stretches or shifts when a recipe opens and the
     page gets taller. (background-attachment: fixed would also do it, but
     iPad Safari ignores it.) The two chalk-light pools repeat on different
     heights so the pattern doesn't visibly line up. Only the top light is
     screen-sized, and it fades into the board colour, so it has no edge. */
  background:
    var(--noise),
    var(--residue),
    radial-gradient(800px 240px at 20% 20%, rgba(240,237,228,.05), transparent 70%),
    radial-gradient(600px 200px at 80% 70%, rgba(240,237,228,.04), transparent 70%),
    linear-gradient(170deg, var(--board-2), var(--board) 55%);
  background-size: auto, auto, 100% 1300px, 100% 1700px, 100% 100vh;
  background-repeat: repeat, repeat, repeat-y, repeat-y, no-repeat;
  background-color: var(--board);
  /* bevelled frame edge, then a thin gilt bead on the moulding */
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.7),
    inset 0 0 100px rgba(0,0,0,.6),
    0 0 0 2px var(--oak-dark),
    0 0 0 5px rgba(216, 178, 106, 0.35),
    0 0 0 7px var(--oak-dark);
  text-shadow: 0 0 1px rgba(240, 237, 228, 0.45), 0 0 5px rgba(240, 237, 228, 0.08);
}
main { flex: 1 0 auto; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.75rem 4rem; }

a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
[hidden] { display: none !important; }

/* Chalk speckle on lettering and lines */
.brand-name, .hero h1, .hero .theme, .recipe h1, .az-group h2 {
  -webkit-mask-image: var(--chalk-mask); mask-image: var(--chalk-mask);
}
.kicker, .label, .tag, .sitenav, .more {
  -webkit-mask-image: var(--chalk-mask-soft); mask-image: var(--chalk-mask-soft);
}

/* ---------- Masthead ---------- */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.75rem 0.5rem;
}
.brand { display: flex; align-items: center; gap: 0.9rem; font: 400 1.75rem/1 var(--display); text-decoration: none; letter-spacing: 0.02em; }
.brand img { width: 64px; height: auto; flex: none; filter: drop-shadow(0 3px 6px rgba(0,0,0,.55)); }
.brand-name small { display: block; margin-top: 0.35rem; font: italic 400 1.05rem/1 var(--serif); color: var(--gold); letter-spacing: 0.01em; }
.foot .motto { font: italic 400 1.1rem/1.3 var(--serif); color: var(--gold); margin-bottom: 0.35rem; }

.sitenav { display: flex; gap: 1.75rem; font: 400 0.85rem/1 var(--sign); letter-spacing: 0.2em; text-transform: uppercase; }
.sitenav a { text-decoration: none; color: var(--chalk-dim); }
.sitenav a:hover { color: var(--gold); }

.weeknav { display: flex; gap: 0.5rem; justify-content: center; padding-top: 0.75rem; }
.weeknav button {
  background: transparent; cursor: pointer;
  border: 1px solid var(--rule); border-radius: 0;
  padding: 0.4rem 1rem; font: 400 0.85rem/1.2 var(--sign); letter-spacing: 0.16em; text-transform: uppercase;
  transition: border-color .2s, color .2s;
}
.weeknav button:hover { border-color: var(--gold); color: var(--gold); }
.weeknav .today[aria-current="true"] { border-color: var(--gold); color: var(--gold); }

/* ---------- Hero: centred, like the top of a menu board ---------- */
.hero { padding: 2.75rem 0 2.5rem; max-width: 860px; margin: 0 auto; text-align: center; }
.kicker {
  margin: 0 0 0.9rem; color: var(--gold);
  font: 400 0.85rem/1.3 var(--sign); letter-spacing: 0.24em; text-transform: uppercase;
}
.hero h1, .hero .theme {
  margin: 0; font: 400 clamp(2.6rem, 7vw, 5rem)/1.02 var(--display); letter-spacing: 0.01em;
}
.hero .theme::after, .hero h1::after, .recipe h1::after {
  content: ""; display: block; width: 240px; max-width: 70%; height: 16px; margin: 1rem auto 0;
  background: var(--flourish) no-repeat center / contain;
}
.blurb { margin: 1rem auto 0; color: var(--chalk-dim); font: italic 400 1.35rem/1.45 var(--serif); max-width: 680px; }

/* ---------- Menu: one row per drink, tap the name to pour ----------
   Each drink is a <details>; the shared name="week-N" makes them an
   accordion (opening one closes the others) with no JavaScript. Built
   for a portrait tablet on the bar: everything fits without scrolling. */
.menu {
  list-style: none; margin: 0 auto; padding: 0; max-width: 900px;
  display: grid; gap: 0.9rem;
  counter-reset: drink;
}
.drink {
  position: relative; counter-increment: drink;
  animation: chalk-in .6s both;
}
/* chalk double-rule frame, drawn as its own layer so only the lines are speckled */
.drink::after, .card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border: 4px double var(--rule);
  -webkit-mask-image: var(--chalk-mask-soft); mask-image: var(--chalk-mask-soft);
}
.drink:nth-child(2) { animation-delay: .07s; }
.drink:nth-child(3) { animation-delay: .14s; }
.drink:nth-child(4) { animation-delay: .21s; }
.drink:nth-child(5) { animation-delay: .28s; }
@keyframes chalk-in { from { opacity: 0; } to { opacity: 1; } }

.drink > details > summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1.1rem;
  min-height: 4rem; padding: 0.65rem 1.4rem;
}
.drink > details > summary::-webkit-details-marker { display: none; }
.drink > details > summary::before {
  content: "No. " counter(drink);
  font: italic 400 1.05rem/1 var(--serif); color: var(--gold);
  -webkit-mask-image: var(--chalk-mask-soft); mask-image: var(--chalk-mask-soft);
}
.dname {
  font: 400 1.8rem/1.1 var(--display);
  -webkit-mask-image: var(--chalk-mask); mask-image: var(--chalk-mask);
}
.drink > details > summary .meta { margin: 0; justify-content: flex-end; }
/* chevron, turns when open */
.drink > details > summary::after {
  content: ""; width: 14px; height: 14px; margin-left: 0.2rem;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: translateY(-3px) rotate(45deg); transition: transform .2s;
}
.drink > details[open] > summary::after { transform: translateY(3px) rotate(225deg); }
.drink > details > summary:hover .dname, .drink > details[open] .dname { color: var(--gold); }
.drink > details > summary:focus-visible { outline-offset: -6px; }

.pour {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0.5rem 2rem;
  margin: 0 1.4rem; padding: 0.75rem 0 1rem;
  border-top: 1px dotted var(--rule-faint);
  animation: chalk-in .3s both;
}
.pour .ingredients { margin: 0; }
.pour .method { margin-bottom: 0.7rem; }
.pour .garnish { margin-bottom: 0.7rem; }
.pour .more { display: inline-block; margin-top: 0.2rem; padding: 0; border: 0; text-align: left; }

/* "Shop for this": a fold under the recipe link. Each thing to buy, with a
   link to it in each store's search (data/stores.json). */
.shop-for { margin-top: 0.15rem; }
.card .shop-for { margin-top: 0.9rem; }   /* recipe pages: a little air under the tags */
.shop-for summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.55rem 0 0.3rem; color: var(--gold);
  font: 400 0.78rem/1.2 var(--sign); letter-spacing: 0.2em; text-transform: uppercase;
  -webkit-mask-image: var(--chalk-mask-soft); mask-image: var(--chalk-mask-soft);
  transition: color .3s var(--ease-out);
}
.shop-for summary::-webkit-details-marker { display: none; }
.shop-for summary::after {
  content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .35s var(--ease-out);
}
.shop-for[open] summary::after { transform: translateY(2px) rotate(225deg); }
.shop-for summary:hover { color: var(--chalk); }
.shop-links { list-style: none; margin: 0.2rem 0 0; padding: 0 0 4px; }
/* the buttons sit beside the name; where there isn't room (phones, narrow
   recipe cards) they drop under it, still on the right */
.shop-links li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 0.75rem;
  padding: 0.2rem 0; border-bottom: 1px dotted var(--rule-faint);
}
.shop-links li:last-child { border-bottom: 0; }
.shop-links .stores { flex: none; flex-wrap: nowrap; margin-left: auto; }   /* the three buttons stay in a row */
.stores { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.stores a {
  display: inline-flex; align-items: center; min-height: 2rem; padding: 0 0.65rem;
  border: 1px solid var(--rule-faint); color: var(--chalk-dim); text-decoration: none;
  font: 400 0.68rem/1 var(--sign); letter-spacing: 0.14em; text-transform: uppercase;
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out), background-color .3s var(--ease-out);
}
.stores a:hover, .stores a:focus-visible { color: var(--gold); border-color: var(--gold); background-color: rgba(216, 178, 106, 0.09); }
@media (max-width: 560px) {
  .stores a { padding: 0 0.5rem; letter-spacing: 0.1em; }
}
.store-term { font: italic 400 0.95rem/1.3 var(--serif); color: var(--chalk-dim); margin-left: 0.3rem; }
.store-term:first-child { margin-left: 0; }

.meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem; }
.tag {
  font: 400 0.7rem/1.2 var(--sign); letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.25rem 0.55rem; border: 1px solid var(--rule-faint); color: var(--chalk-dim);
}
.tag.base { border-color: var(--gold); color: var(--gold); }
.tag.smoke { border: 1px dashed var(--smoke); color: var(--smoke); }

/* Ingredient on the left, measure on the right, like a price list */
.ingredients { list-style: none; margin: 0 0 1rem; padding: 0; }
.ingredients li {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: baseline;
  padding: 0.3rem 0; border-bottom: 1px dotted var(--rule-faint);
}
.pour .ingredients li { padding: 0.18rem 0; }
.ingredients li:last-child { border-bottom: 0; }
.ingredients li > span:not(.amount) { order: 1; }
.amount {
  order: 2; text-align: right; white-space: nowrap; color: var(--gold);
  font: 400 0.9rem/1.4 var(--sign); letter-spacing: 0.06em; font-variant-numeric: tabular-nums;
}
.ingredients li.no-amount { grid-template-columns: 1fr; }

.label {
  display: block; margin-bottom: 0.15rem; color: var(--gold);
  font: 400 0.72rem/1.4 var(--sign); letter-spacing: 0.22em; text-transform: uppercase;
}
.method, .garnish { margin: 0 0 0.85rem; }
.garnish { font-style: italic; }
.garnish .label { font-style: normal; }
.note { margin: auto 0 0; padding-top: 0.9rem; color: var(--chalk-dim); font-style: italic; }

.more {
  margin-top: auto; padding-top: 0.8rem; text-align: center; text-decoration: none;
  color: var(--gold); font: 400 0.78rem/1.2 var(--sign); letter-spacing: 0.2em; text-transform: uppercase;
  border-top: 1px dotted var(--rule-faint);
}
.more:hover { color: var(--chalk); }

/* Without JS every week is listed; with JS only one shows */
.week + .week { margin-top: 4rem; }
.js .week + .week { margin-top: 0; }
.js .hero { padding-top: 1rem; }
/* wide screens: week controls sit in the masthead row, centred (narrower, the bar name needs the room) */
@media (min-width: 1100px) {
  .weeknav { position: absolute; top: clamp(1.1rem, 2vw, 1.5rem); left: 50%; transform: translateX(-50%); padding: 0; }
  .js .hero { padding-top: 0.25rem; }
}
/* the menu page is the bar tablet: keep the footer small */
.js body:has(.week) main { padding-bottom: 1rem; }
.js body:has(.week) .sitenav a:first-child { display: none; }  /* the This week button covers it */
.js body:has(.week) .foot { padding: 0.8rem 1.75rem 1rem; font-size: 0.9rem; }
.week .hero { padding-bottom: 1.25rem; }
.week .hero .theme { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.week .hero .theme::after { margin-top: 0.75rem; }
.week .blurb { margin-top: 0.6rem; font-size: 1.25rem; }

/* ---------- Footer ---------- */
.foot {
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 1.75rem 1.75rem 2.25rem;
  text-align: center; color: var(--chalk-dim); font: italic 400 1rem/1.4 var(--serif);
  border-top: 1px dotted var(--rule-faint);
}

/* ---------- Pen lettering (tools/pen.py) ----------
   Titles, drink names and recipe card headings are drawn in Hershey Script, a
   single-line pen font. Each word is a small inline SVG sized in ems, so it
   follows its heading's font-size and still wraps; it places letters whose
   strokes are defined once per page (.pen-defs). The box matches pen.py: 950
   font units tall (1.368em), 250 of them below the baseline (-0.36em). Stroke
   styles are set on the SVG so the shared letters inherit them. The real text
   sits alongside, visually hidden. */
.pen-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.pen svg {
  height: 1.368em; width: auto; vertical-align: -0.36em; overflow: visible;
  fill: none; stroke: currentColor; stroke-width: 32px; stroke-linecap: round; stroke-linejoin: round;
}
.pen-ink {
  word-spacing: 0.2em;   /* script letters reach into the gap, so give words a little more room */
  filter: drop-shadow(0 0 1px rgba(240, 237, 228, 0.35));   /* the chalk glow text gets */
}
.dname svg { stroke-width: 38px; }
.card h2.label.pen {
  margin: 0 0 0.15rem; color: var(--gold);
  font: 400 1.6rem/1.2 var(--body); letter-spacing: 0; text-transform: none;
}
.card h2.label.pen:not(:first-child) { margin-top: 1.1rem; }
.card h2.label.pen svg { stroke-width: 44px; }

/* ---------- Recipe pages ---------- */
.recipe { padding: 2.5rem 0 1rem; }
.recipe > .kicker, .recipe > h1, .recipe > .blurb { text-align: center; }
.recipe h1 { margin: 0; font: 400 clamp(2.6rem, 7vw, 4.6rem)/1.02 var(--display); letter-spacing: 0.01em; }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; text-underline-offset: 4px; }
.recipe-grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 2.5rem; }
.card { position: relative; padding: 1.6rem; }
.card h2.label { margin: 0 0 0.4rem; font-size: 0.78rem; }
.card h2.label:not(:first-child) { margin-top: 1.3rem; }
.card .method { font-size: 1.2rem; }
.card .meta { margin: 1.1rem 0 0; }
.on-menu a { color: var(--gold); text-underline-offset: 3px; }

.pour .smoked { margin: 0 0 0.7rem; }
.card .smoked, .pour .smoked { border-left: 1px dashed var(--smoke); padding-left: 0.85rem; }
.card .smoked strong, .pour .smoked strong { color: var(--smoke); font: italic 400 1.1em var(--serif); }

/* Bottles from data/bar.json */
.classic-note, .stock-note { display: block; font: italic 400 0.92rem/1.3 var(--body); color: var(--chalk-dim); }
.stock-note { color: var(--warn); }
.stock-banner {
  max-width: 46rem; margin: 1.5rem auto 0; padding: 0.75rem 1rem; text-align: center;
  border: 1px dashed var(--warn);
}
.az-out { font: italic 400 0.9rem/1.3 var(--body); color: var(--warn); order: 1; margin-left: auto; }
.az-group li .az-base { order: 2; }
.bar { margin: 0 0 3rem; }
.bar .label { text-align: center; font-size: 0.85rem; margin-bottom: 0.75rem; }
.bottles { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.bottles li { border: 1px solid var(--rule-faint); padding: 0.9rem 1rem; }
.bottles + .label { margin-top: 2.25rem; }
.bottles strong { font: 400 1.2rem/1.3 var(--display); color: var(--chalk); }
.bottle-notes { font-size: 1rem; color: var(--chalk-dim); font-style: italic; }

/* A-Z */
.az { columns: 260px; column-gap: 2.75rem; }
.az-group { break-inside: avoid; margin-bottom: 1.75rem; }
.az-group h2 { margin: 0 0 0.3rem; font: 400 2rem/1 var(--display); color: var(--gold); }
.az-group ul { list-style: none; margin: 0; padding: 0; }
.az-group li { padding: 0.2rem 0; border-bottom: 1px dotted var(--rule-faint); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.az-group a { text-decoration: none; }
.az-group a:hover { color: var(--gold); }
.az-base { color: var(--chalk-dim); font: 400 0.68rem/1.3 var(--sign); letter-spacing: 0.16em; text-transform: uppercase; }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .masthead { flex-direction: column; align-items: center; }
  .hero { padding-top: 2rem; }
  .drink > details > summary { grid-template-columns: auto 1fr auto; padding: 0.8rem 1rem; gap: 0.4rem 0.8rem; }
  .drink > details > summary .meta { grid-column: 2 / 3; grid-row: 2; justify-content: flex-start; }
  .drink > details > summary::after { grid-column: 3; grid-row: 1; }
  .dname { font-size: 1.5rem; }
  .pour { grid-template-columns: 1fr; margin: 0 1rem; }
  main { padding: 0 1.1rem 3rem; }
}

/* ---------- Print: plain ink on paper ---------- */
@media print {
  html, body { background: #fff; color: #000; box-shadow: none; text-shadow: none; margin: 0; }
  .drink::after, .card::after { display: none; }
  * { -webkit-mask-image: none !important; mask-image: none !important; }
  .masthead nav, .weeknav, .foot, .more { display: none; }
  .drink > details > summary::after { display: none; }
  /* print every recipe, even closed ones (browsers with ::details-content) */
  .drink details::details-content { content-visibility: visible; display: block; block-size: auto; opacity: 1; }
  .drink, .card { break-inside: avoid; border: 1px solid #999; animation: none; }
  .amount, .kicker, .label, .tag, .tag.base, .tag.smoke, .card .smoked strong, .brand-name small, .drink > details > summary::before { color: #000; border-color: #999; }
}

/* ---------- Shopping list ---------- */
.shop-link { text-align: center; margin: 1.25rem 0 0; }
.button {
  display: inline-block; text-decoration: none; color: var(--chalk);
  border: 1px solid var(--rule); padding: 0.6rem 1.3rem;
  font: 400 0.85rem/1.2 var(--sign); letter-spacing: 0.16em; text-transform: uppercase;
  -webkit-mask-image: var(--chalk-mask-soft); mask-image: var(--chalk-mask-soft);
  transition: border-color .2s, color .2s;
}
.button:hover { border-color: var(--gold); color: var(--gold); }
.shopping-page { max-width: 760px; margin: 0 auto 3rem; }
.shopping-page .label { display: block; text-align: center; font-size: 0.85rem; margin: 2.25rem 0 0.75rem; }
.shopping-page h3 { font: 400 1.25rem/1.3 var(--display); color: var(--gold); margin: 1.25rem 0 0.25rem; }
.shop-list { list-style: none; padding: 0; margin: 0; }
.shop-list li { padding: 0.45rem 0; border-bottom: 1px dotted var(--rule-faint); font-size: 1.15rem; }
.shop-list label { cursor: pointer; display: inline-flex; gap: 0.6rem; align-items: baseline; }
.shop-list input { width: 1.15rem; height: 1.15rem; accent-color: var(--gold); flex: none; transform: translateY(0.15rem); }
.shop-list input:checked + span { text-decoration: line-through; color: var(--chalk-dim); }
.shop-list .who { display: block; margin-left: 1.75rem; color: var(--chalk-dim); font: italic 400 0.95rem/1.35 var(--serif); }
.shop-list.plain .who { margin-left: 0; }
/* store links sit at the right of a row; the drinks line goes underneath */
.shop-list li:has(.stores) { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 1rem; }
.shop-list li:has(.stores) .who { flex-basis: 100%; }
.shop-list .stores { margin-left: auto; justify-content: flex-end; }
.shop-week { border-top: 1px dotted var(--rule-faint); padding: 0.6rem 0; }
.shop-week summary { cursor: pointer; font: 400 1.25rem/1.3 var(--display); }
@media print {
  .masthead, .foot, .shop-link, .shop-for, .stores { display: none; }
  .shop-list .who { display: none; }
}

/* ---------- Ingredient finder ----------
   Picker on the left, results on the right on wide screens; stacked on the
   portrait bar tablet, with the ingredient groups folded away. */
.sitenav { flex-wrap: wrap; justify-content: center; row-gap: 0.6rem; }
.finder { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); margin: 0 auto 3rem; max-width: 1100px; }
/* Narrow (the bar tablet): search, results, then every ingredient.
   Wide: search and ingredients on the left, results sticky on the right. */
@media (min-width: 900px) {
  .finder { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "pick results" "groups results"; align-items: start; row-gap: 1rem; }
  .finder-pick { grid-area: pick; }
  .ing-groups { grid-area: groups; }
  .finder-results { grid-area: results; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; padding-right: 0.5rem; }
  .finder-browse { display: none; }
}
.finder-browse { margin: 0; text-align: center; }
.finder-browse a { color: var(--gold); font: 400 0.75rem/1.3 var(--sign); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; }
.finder .label { text-align: center; font-size: 0.85rem; margin: 0 0 0.75rem; }
.finder-results .label:not(:first-child) { margin-top: 2rem; }

.finder-add input {
  width: 100%; padding: 0.7rem 0.9rem; font: 400 1.15rem/1.3 var(--body); color: var(--chalk);
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--rule); border-radius: 0;
}
.finder-add input::placeholder { color: var(--chalk-dim); font-style: italic; }
.finder-add input:focus { border-color: var(--gold); outline: none; }
.finder-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }
.finder-buttons button, .chip {
  background: transparent; cursor: pointer; border: 1px solid var(--rule-faint); border-radius: 0;
  padding: 0.35rem 0.8rem; font: 400 0.75rem/1.3 var(--sign); letter-spacing: 0.14em; text-transform: uppercase; color: var(--chalk-dim);
  transition: border-color .2s, color .2s;
}
.finder-buttons button:hover, .chip:hover { border-color: var(--gold); color: var(--gold); }
.finder-picked { margin: 0 0 1rem; color: var(--chalk-dim); font-style: italic; line-height: 2; }
.chip { font-style: normal; text-transform: none; letter-spacing: 0.04em; font-size: 0.85rem; color: var(--chalk); margin: 0 0.15rem; }

.ing-group { border-top: 1px dotted var(--rule-faint); }
.ing-group:last-child { border-bottom: 1px dotted var(--rule-faint); }
.ing-group summary { cursor: pointer; padding: 0.6rem 0; font: 400 1.25rem/1.3 var(--display); }
.ing-group summary:hover { color: var(--gold); }
.ing-count { color: var(--gold); font: italic 400 1rem var(--serif); }
.ing-list { list-style: none; margin: 0 0 0.9rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.ing-list label {
  display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer;
  padding: 0.3rem 0.7rem; border: 1px solid var(--rule-faint); font-size: 1.05rem;
}
.ing-list input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--gold); flex: none; }
.ing-list label:has(input:checked) { border-color: var(--gold); color: var(--gold); }
.ing-list label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

.finder-summary { text-align: center; margin: 0 0 0.5rem; font: italic 400 1.3rem/1.4 var(--serif); }
.finder-toggle { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-bottom: 1rem; cursor: pointer; color: var(--chalk-dim); }
.finder-toggle input { width: 1.05rem; height: 1.05rem; accent-color: var(--gold); }
.finder-list { list-style: none; margin: 0; padding: 0; }
.finder-list li {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.1rem 1rem;
  padding: 0.35rem 0; border-bottom: 1px dotted var(--rule-faint);
}
.finder-list a { text-decoration: none; font-size: 1.2rem; }
.finder-list a:hover { color: var(--gold); }
.finder-swap { flex-basis: 100%; font: italic 400 0.95rem/1.3 var(--body); color: var(--chalk-dim); }
.finder-need { flex-basis: 100%; font: italic 400 0.95rem/1.3 var(--body); color: var(--warn); }
.finder-empty { color: var(--chalk-dim); font-style: italic; justify-content: center !important; }
@media print { .finder-pick { display: none; } }

/* ---------- Motion ----------
   Page to page: the duster wipes the old page's chalk off the board, left to
   right (right to left when you go back), leaving a faint ghost that smudges
   away. Then the new page is chalked on, line by line. The board, frame and
   masthead don't move: it's the same board, rewritten.
   How: a cross-document view transition (Chrome, Edge, Safari 18.2+; other
   browsers just change page). The script in each page's <head> sets
   html[data-chalk]: "out" on the page being left, which names <main> and the
   footer so the browser snapshots the writing as its own transparent layer;
   "in" on the arriving page until the write-in is done, which plays it on
   the live page (chalk.js does the handwriting). Needs a real web server (same origin), so it doesn't
   happen when the files are opened straight from disk.
   Week to week: the menu slides along (app.js starts a same-page view
   transition and sets html[data-vt] to "next" or "prev").
   Opening a drink: the recipe unfolds instead of jumping open. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  html { scroll-behavior: smooth; }
}

/* Fallback if the script can't run: wipe the whole page instead. Old page on
   top, new page beneath. The mask is 2.4 page-widths wide: 1.1 transparent, a
   soft edge 0.2 wide, then 1.1 solid; sliding it 1.4 widths carries the edge
   right across. */
::view-transition-new(root) { animation: none; }
::view-transition-old(root) {
  z-index: 1;
  -webkit-mask: linear-gradient(100deg, transparent 45.8%, #000 54.2%) 100% 0 / 240% 100% no-repeat;
          mask: linear-gradient(100deg, transparent 45.8%, #000 54.2%) 100% 0 / 240% 100% no-repeat;
  animation: duster .65s var(--ease-in-out) both;
}
html:active-view-transition-type(back)::view-transition-old(root) {
  -webkit-mask-image: linear-gradient(260deg, transparent 45.8%, #000 54.2%);
          mask-image: linear-gradient(260deg, transparent 45.8%, #000 54.2%);
  animation-name: duster-back;
}
@keyframes duster      { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes duster-back { from { -webkit-mask-position: 0 0; mask-position: 0 0; } to { -webkit-mask-position: 100% 0; mask-position: 100% 0; } }

/* Normal case: the writing is its own layer, so the board just holds still
   (a quick fade covers any change in scroll position). */
html[data-chalk="out"] main { view-transition-name: chalk-out; }
html[data-chalk="out"] .foot { view-transition-name: chalk-out-foot; }
html[data-chalk="out"] .weeknav { view-transition-name: chalk-out-nav; }   /* sits outside <main>'s box, so needs its own layer */
html[data-chalk="in"]::view-transition-old(root) {
  -webkit-mask: none; mask: none;
  animation: board-hold .35s ease both;
}
@keyframes board-hold { to { opacity: 0; } }

/* Wiping the chalk, like a person with a duster. Normally the duster follows
   the old page's writing: the head script plans one stroke per band of lines
   (measured by chalk.js before leaving) and adds the rules for them. What's
   here is the fallback, three fixed rows, used when there's no fresh plan.
   Over the old writing:
     row 1 (top)     left to right    0    - .40s
     row 2 (middle)  right to left    .28s - .68s
     row 3 (bottom)  left to right    .56s - .96s
   then the smudges left behind blur and fade (1.0 - 1.6s). Going back, every
   stroke runs the other way. Each stroke takes chalk off where it has been
   (mask: everything, minus the strokes; where rows overlap it's cleaner) and
   leaves streaky smudges. The rows are a share of the screen, so the old
   page's scroll position matters: --old-top is where its <main> sat on screen
   (the head script passes it across). The top and bottom rows reach past the
   screen's edges, because a stroke's own edges wipe less. The stroke images
   are pre-drawn (img/), as drawing noise live every frame is far too slow. */
::view-transition-group(chalk-out), ::view-transition-group(chalk-out-foot), ::view-transition-group(chalk-out-nav) { animation: none; }
::view-transition-old(chalk-out) {
  -webkit-mask: none;
  mask-image: linear-gradient(#000, #000), var(--wipe-lr), var(--wipe-rl), var(--wipe-lr);
  mask-size: 100% 100%, 300% 46vh, 300% 44vh, 300% 46vh;
  mask-position: 0 0,
    var(--w1) calc(-8vh - var(--old-top, 0px)), var(--w2) calc(28vh - var(--old-top, 0px)),
    var(--w3) calc(62vh - var(--old-top, 0px));
  mask-repeat: no-repeat;
  mask-composite: subtract, add, add, add;
  animation: s1-lr .4s var(--stroke) both, s2-rl .4s var(--stroke) .28s both, s3-lr .4s var(--stroke) .56s both,
             chalk-gone .6s ease-out 1s both;
}
/* The week buttons and the footer go with the top and bottom rows. */
::view-transition-old(chalk-out-nav), ::view-transition-old(chalk-out-foot) {
  -webkit-mask: none;
  mask-image: linear-gradient(#000, #000), var(--wipe-lr);
  mask-size: 100% 100%, 300% 100%;
  mask-position: 0 0, var(--w1) 0;
  mask-repeat: no-repeat;
  mask-composite: subtract, add;
  animation: s1-lr .4s var(--stroke) both, chalk-gone .6s ease-out 1s both;
}
::view-transition-old(chalk-out-foot) { mask-position: 0 0, var(--w3) 0; animation: s3-lr .4s var(--stroke) .56s both, chalk-gone .6s ease-out 1s both; }
html:active-view-transition-type(back)::view-transition-old(chalk-out) {
  mask-image: linear-gradient(#000, #000), var(--wipe-rl), var(--wipe-lr), var(--wipe-rl);
  animation-name: s1-rl, s2-lr, s3-rl, chalk-gone;
}
html:active-view-transition-type(back)::view-transition-old(chalk-out-nav),
html:active-view-transition-type(back)::view-transition-old(chalk-out-foot) {
  mask-image: linear-gradient(#000, #000), var(--wipe-rl);
}
html:active-view-transition-type(back)::view-transition-old(chalk-out-nav) { animation-name: s1-rl, chalk-gone; }
html:active-view-transition-type(back)::view-transition-old(chalk-out-foot) { animation-name: s3-rl, chalk-gone; }
:root { --stroke: cubic-bezier(.45, .05, .4, 1); }   /* a stroke speeds up, then eases off */
/* left to right: the stroke image slides from its right third to its left */
@keyframes s1-lr { from { --w1: 100%; } to { --w1: 0%; } }
@keyframes s1-rl { from { --w1: 0%; } to { --w1: 100%; } }
@keyframes s2-lr { from { --w2: 100%; } to { --w2: 0%; } }
@keyframes s2-rl { from { --w2: 0%; } to { --w2: 100%; } }
@keyframes s3-lr { from { --w3: 100%; } to { --w3: 0%; } }
@keyframes s3-rl { from { --w3: 0%; } to { --w3: 100%; } }
@keyframes chalk-gone { from { opacity: 1; filter: blur(.6px); } to { opacity: 0; filter: blur(3px); } }

/* The dust the strokes spread, on the arriving page (.chalk-dust, one band per
   row): each band slides in behind its stroke, as if the duster drags the dust
   along, then it all settles as the new writing goes on. Behind the page's
   writing, over the board. Moved and faded only, so the browser doesn't have
   to repaint it every frame. */
.chalk-dust { display: none; }
html[data-chalk="in"] .chalk-dust {
  display: block; position: fixed; inset: var(--frame); z-index: -1; pointer-events: none; overflow: hidden;
  animation: dust-settle 1.2s ease-in .95s both;
}
.chalk-dust i {
  position: absolute; left: -20%; width: 160%;
  background: var(--dust-smear) 0 0 / 1000px 640px;
  mask-image: linear-gradient(90deg, #000 75%, transparent), linear-gradient(transparent, #000 18%, #000 82%, transparent);
  mask-composite: intersect;
}
.chalk-dust i:nth-child(1) { top: calc(-8vh - var(--frame)); height: 46vh; animation: dust-lr .4s var(--stroke) both; }
.chalk-dust i:nth-child(2) { top: calc(28vh - var(--frame)); height: 44vh; animation: dust-rl .4s var(--stroke) .28s both; }
.chalk-dust i:nth-child(3) { top: calc(62vh - var(--frame)); height: 46vh; animation: dust-lr .4s var(--stroke) .56s both; }
/* a right-to-left band: edge on its left, sitting 20% further left */
.chalk-dust i:nth-child(2), html:active-view-transition-type(back) .chalk-dust i:is(:nth-child(1), :nth-child(3)) {
  left: -40%;
  mask-image: linear-gradient(90deg, transparent, #000 25%), linear-gradient(transparent, #000 18%, #000 82%, transparent);
  animation-name: dust-rl;
}
html:active-view-transition-type(back) .chalk-dust i:nth-child(2) {
  left: -20%;
  mask-image: linear-gradient(90deg, #000 75%, transparent), linear-gradient(transparent, #000 18%, #000 82%, transparent);
  animation-name: dust-lr;
}
@keyframes dust-grow { from { transform: scaleX(0); } }   /* along a stroke planned from the writing (head script) */
@keyframes dust-lr { from { transform: translateX(-100%); } }
@keyframes dust-rl { from { transform: translateX(100%); } }
@keyframes dust-settle { from { opacity: .55; } to { opacity: 0; } }

/* Writing it back. Each line or block is revealed left to right through a
   soft-edged mask (2.25 widths: 1 solid, an edge 0.25 wide, 1 clear), top to
   bottom in turn. --d staggers them after --write-at (when the duster has
   mostly passed). Things that already carry a chalk speckle keep it as a
   second mask layer. Only on-screen-at-arrival matters; the rest finishes
   unseen. data-chalk="in" is removed once they have all finished. */
html[data-chalk="in"] {
  --write-at: .95s;   /* as the last row is wiped */
  --write: linear-gradient(90deg, #000 44.4%, transparent 55.6%);
}
html[data-chalk="in"] :is(
  .weeknav, .hero > :not(.pen), .drink, .shop-link,
  .recipe > :not(.recipe-grid, .pen), .card,
  .bar > *, .az-group, :where(#shop-out) > *, .shop-fallback, .finder > *, .foot
) {
  -webkit-mask: none;
  mask-image: var(--write);
  mask-size: 225% 100%;
  mask-repeat: no-repeat;
  mask-position: 0 0;
  animation: chalk-write var(--dur, .5s) cubic-bezier(.4, .1, .4, 1) calc(var(--write-at) + var(--d, 0s)) both;
}
/* Drinks have their own fade-in on page load (chalk-in). Keep it in the list
   here, already finished, so taking the write-in off afterwards doesn't count
   as a new animation and fade them in all over again. (.menu and the doubled
   .drink outrank the :is() list above, which counts as its most specific entry;
   that's also why #shop-out is wrapped in :where() there, to count for nothing.) */
html[data-chalk="in"] .menu > .drink.drink {
  animation: chalk-write var(--dur, .5s) cubic-bezier(.4, .1, .4, 1) calc(var(--write-at) + var(--d, 0s)) both, chalk-in 1ms both;
}
html[data-chalk="in"] :is(.hero > .kicker, .recipe > .kicker, .bar > .label, :where(#shop-out) > .label) {
  mask-image: var(--write), var(--chalk-mask-soft);
  mask-size: 225% 100%, auto; mask-repeat: no-repeat, repeat; mask-composite: intersect;
  --dur: .4s;
}
@keyframes chalk-write { from { mask-position: 100% 0, 0 0; } to { mask-position: 0 0, 0 0; } }

/* Handwriting (chalk.js). Where it runs, each line on screen is split into
   letters, and each letter is drawn left to right in turn; the clip reaches
   past the letter's box so italic tails aren't cut off. The reveal above then
   only draws the boxes and rules, re-timed by chalk.js to go just before the
   writing inside them. Without chalk.js the reveal above does it all. */
.chalk-ch { animation: chalk-letter var(--ld, .1s) linear var(--lt, 0s) both; }
@keyframes chalk-letter {
  from { opacity: 0; clip-path: inset(-40% 100% -40% -40%); }
  30%  { opacity: 1; }
  to   { opacity: 1; clip-path: inset(-40% -40% -40% -40%); }
}

/* Pen strokes. chalk.js gives each pen heading on screen its own copy of its
   letters' strokes (.pen-live), each with pathLength = 1 so 0 to 1 is the
   whole stroke, and --ps / --pf placing it within the heading's --pen-dur
   (from its writing length). Each stroke's dash then slides along it, one
   after another in the pen's order, from --pen-at. The dash starts just past
   the end (1.02) so the round cap doesn't leave a dot. A title's flourish is
   drawn once the title is written. */
.pen { --pen-dur: clamp(.35s, calc(var(--pen-len, 8) * .022s), 1.1s); }
html[data-chalk="in"] .pen-live path {
  stroke-dasharray: 1 2;
  animation: pen-stroke calc(var(--pf) * var(--pen-dur)) linear calc(var(--pen-at, 0s) + var(--ps) * var(--pen-dur)) both;
}
@keyframes pen-stroke { from { stroke-dashoffset: 1.02; } to { stroke-dashoffset: 0; } }
html[data-chalk="in"] :is(.hero > .pen-live, .recipe > .pen-live)::after {
  mask: var(--write) 100% 0 / 225% 100% no-repeat;
  animation: chalk-write .55s cubic-bezier(.4, .1, .4, 1) calc(var(--pen-at, 0s) + var(--pen-dur)) both;
}

/* Until chalk.js has planned the write-in (.chalk-ready), keep the arriving
   page's writing off the board; on a slow device it can take a moment to
   load. If chalk.js never runs, everything shows after 3 s anyway. */
html[data-chalk="in"]:not(.chalk-ready) main { animation: chalk-wait 3s; }
@keyframes chalk-wait { from, to { visibility: hidden; } }

/* Order: heading, title, blurb, then the content top to bottom, then footer. */
html[data-chalk="in"] :is(.hero, .recipe) > :nth-child(2) { --d: .1s; }
html[data-chalk="in"] :is(.hero, .recipe) > :nth-child(3) { --d: .38s; }
html[data-chalk="in"] .recipe > :nth-child(4) { --d: .5s; }
html[data-chalk="in"] :is(.drink, .card, .bar > *, :where(#shop-out) > *, .finder > *):nth-child(1) { --d: .55s; }
html[data-chalk="in"] :is(.drink, .card, .bar > *, :where(#shop-out) > *, .finder > *):nth-child(2) { --d: .63s; }
html[data-chalk="in"] :is(.drink, .card, .bar > *, :where(#shop-out) > *, .finder > *):nth-child(3) { --d: .71s; }
html[data-chalk="in"] :is(.drink, .card, .bar > *, :where(#shop-out) > *, .finder > *):nth-child(4) { --d: .79s; }
html[data-chalk="in"] :is(.drink, .card, .bar > *, :where(#shop-out) > *, .finder > *):nth-child(5) { --d: .87s; }
html[data-chalk="in"] :is(.drink, .card, .bar > *, :where(#shop-out) > *, .finder > *):nth-child(6) { --d: .95s; }
html[data-chalk="in"] :is(.drink, .card, .bar > *, :where(#shop-out) > *, .finder > *):nth-child(n+7) { --d: 1s; }
html[data-chalk="in"] .card { --dur: .65s; }
html[data-chalk="in"] :is(.shop-link, .shop-fallback, .az-group) { --d: 1s; }
html[data-chalk="in"] .foot { --d: 1.1s; }

/* Changing week: only the week's menu moves; the board, masthead and buttons
   stay put. The name is only set while a week change runs, so page-to-page
   wipes treat the menu as part of the page. */
html[data-vt] .week { view-transition-name: week; }
html[data-vt] .shop-link { view-transition-name: shop-link; }   /* glide, don't jump, */
html[data-vt] .foot { view-transition-name: foot; }             /* if the menu's height changes */
html[data-vt]::view-transition-old(root) { display: none; }
::view-transition-group(week), ::view-transition-group(shop-link), ::view-transition-group(foot) {
  animation-duration: .5s; animation-timing-function: var(--ease-out);
}
html[data-vt="next"]::view-transition-old(week) { animation: week-out .28s var(--ease-in) both; --dx: -56px; }
html[data-vt="next"]::view-transition-new(week) { animation: week-in .5s .1s var(--ease-out) both; --dx: 56px; }
html[data-vt="prev"]::view-transition-old(week) { animation: week-out .28s var(--ease-in) both; --dx: 56px; }
html[data-vt="prev"]::view-transition-new(week) { animation: week-in .5s .1s var(--ease-out) both; --dx: -56px; }
@keyframes week-out { to   { opacity: 0; transform: translateX(var(--dx)); filter: blur(4px); } }
@keyframes week-in  { from { opacity: 0; transform: translateX(var(--dx)); filter: blur(4px); } }

/* Opening and closing a drink (and every other <details>): animate to the
   content's natural height. interpolate-size lets "auto" be a transition end
   point; browsers without it (Safari, Firefox for now) open instantly. */
@media (prefers-reduced-motion: no-preference) {
  @supports (interpolate-size: allow-keywords) {
    :root { interpolate-size: allow-keywords; }
    details::details-content {
      block-size: 0; opacity: 0; overflow-y: clip;
      transition: block-size .5s var(--ease-out), opacity .35s var(--ease-out), content-visibility .5s allow-discrete;
    }
    details[open]::details-content { block-size: auto; opacity: 1; }
  }
}
.ing-list { padding-top: 4px; }   /* room for the focus ring inside the clipped content */

/* Drinks on the menu: lift on hover, gold frame when open */
.drink > details > summary { transition: background-color .35s var(--ease-out); }
.drink > details > summary:hover { background-color: rgba(240, 237, 228, 0.035); }
.dname { transition: color .35s var(--ease-out); }
.drink::after { transition: border-color .45s var(--ease-out); }
.drink:hover::after { border-color: rgba(240, 237, 228, 0.7); }
.drink:has(details[open])::after { border-color: rgba(216, 178, 106, 0.6); }
.drink > details > summary::after { transition: transform .5s var(--ease-out); }
.drink > details:not([open]) > summary:hover::after { transform: translateY(0) rotate(45deg); }

/* Text links: a chalk underline draws in from the left */
.sitenav a, .kicker a, .az-group a, .finder-list a, .finder-browse a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  transition: color .3s var(--ease-out), background-size .45s var(--ease-out);
}
.sitenav a:hover, .kicker a:hover, .az-group a:hover, .finder-list a:hover, .finder-browse a:hover,
.sitenav a:focus-visible, .kicker a:focus-visible, .az-group a:focus-visible, .finder-list a:focus-visible, .finder-browse a:focus-visible {
  background-size: 100% 1px; text-decoration: none;
}
.sitenav a { padding-block: 0.3em; }
.brand { transition: color .35s var(--ease-out); }
.brand:hover { color: var(--gold); }
.more { transition: color .3s var(--ease-out), transform .35s var(--ease-out); }
.more:hover { transform: translateX(4px); }
.on-menu a { transition: color .3s var(--ease-out), text-decoration-color .3s var(--ease-out); }
.on-menu a:hover { color: var(--chalk); }

/* Buttons: brass wash on hover, a small press when tapped */
.weeknav button, .button, .finder-buttons button, .chip {
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out),
              background-color .3s var(--ease-out), transform .2s var(--ease-out);
}
.weeknav button:hover, .button:hover, .finder-buttons button:hover, .chip:hover { background-color: rgba(216, 178, 106, 0.09); }
.weeknav button:active, .button:active, .finder-buttons button:active, .chip:active {
  transform: scale(0.95); transition-duration: .06s;
}

/* Finder and shopping list */
.ing-group summary, .shop-week summary { transition: color .3s var(--ease-out); }
.shop-week summary:hover { color: var(--gold); }
.ing-list label { transition: color .25s var(--ease-out), border-color .25s var(--ease-out), background-color .25s var(--ease-out); }
.ing-list label:hover { border-color: var(--rule); }
.finder-list li { animation: chalk-in .3s both; }
/* ticking an item draws a chalk line through it */
.shop-list input + span { position: relative; transition: color .35s var(--ease-out); }
.shop-list input:checked + span { text-decoration: none; }
.shop-list input + span::after {
  content: ""; position: absolute; left: -0.1em; right: -0.1em; top: 55%; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.shop-list input:checked + span::after { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .drink, .pour, .finder-list li, .chalk-ch, .pen path { animation: none; }
  * { transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Chalk capitals ----------
   Headings, week themes and drink names in chalkboard signwriting capitals.
   Replaces the script pen lettering; chalk.js writes them in like other text. */
.chalk-head { font-family: var(--chalk-caps); font-weight: 400; text-transform: uppercase; letter-spacing: 0.04em; }
.hero .theme.chalk-head, .recipe h1.chalk-head, .hero h1.chalk-head { font: 400 clamp(2.2rem, 6vw, 3.9rem)/1.1 var(--chalk-caps); letter-spacing: 0.04em; text-transform: uppercase; }
.week .hero .theme.chalk-head { font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
.drink .dname.chalk-head { font: 400 1.55rem/1.2 var(--chalk-caps); letter-spacing: 0.05em; }
.card h2.label.chalk-head {
  margin: 0 0 0.3rem; color: var(--gold);
  font: 400 1.25rem/1.2 var(--chalk-caps); letter-spacing: 0.08em; text-transform: uppercase;
}
.card h2.label.chalk-head:not(:first-child) { margin-top: 1.1rem; }
@media (max-width: 700px) { .drink .dname.chalk-head { font-size: 1.2rem; } }
