/* Alex & Matteo dinner proposal. Brand from options_deck_2026-11-09/build_deck.py */
:root {
  --ink: #303030;
  --soft: #5E5E58;
  --leaf: #5F7D43;
  --leaf-ink: #4E6B35;   /* leaf darkened for small text: 5.6:1 on cream */
  --leaf-deep: #3C5229;
  --cream: #F5F8EE;
  --pale: #DFEEC8;
  --paper: #FFFFFF;
  --line: #D6E3C3;
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "Lato", "Helvetica Neue", Arial, sans-serif;
  --bar-h: 56px;
  --gut: 20px;
  --maxw: 1120px;
  --r: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

/* Otium's own type, used only in the Otium welcome band. Built by build_media.py from the otium-branding skill fonts. */
@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url(media/otium_sora_600.woff) format("woff"); }
@font-face { font-family: "Spectral"; font-weight: 400; font-display: swap; src: url(media/otium_spectral_400.woff) format("woff"); }
@font-face { font-family: "Spectral"; font-weight: 600; font-display: swap; src: url(media/otium_spectral_600.woff) format("woff"); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
html.modal-open, html.modal-open body { overflow: hidden; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.15; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
a, button, label { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, .said, .gala p, .calc-pct, .cover-lede, .menu-note { text-wrap: balance; }
p, li { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 6px; }
.it { font-family: var(--serif); font-style: italic; }
section[id] { scroll-margin-top: calc(var(--bar-h) - 1px); }
#cover { scroll-margin-top: 0; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--bar-h);
  padding: env(safe-area-inset-top) var(--gut) 0;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  background: var(--cream); border-bottom: 1px solid var(--line);
  transition: transform .4s var(--ease), opacity .3s, visibility .4s;
}
.bar.on-cover { transform: translateY(-100%); opacity: 0; visibility: hidden; }
.bar-mark { display: none; position: relative; height: 24px; width: 208px; }
.bar-mark img { position: absolute; inset: 0; height: 100%; width: auto; transition: opacity .35s; }
.bar-course { text-align: left; font-size: 13px; color: var(--soft); white-space: nowrap; transition: opacity .3s; }
.bar-it { font-family: var(--serif); font-style: italic; color: var(--ink); font-size: 16px; }
.bar-menu {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--leaf); border-radius: 999px; background: var(--paper);
  color: var(--leaf-ink); font-weight: 700; font-size: 14px; letter-spacing: .02em;
}
.bar-menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.bar-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; }
.bar-progress span { display: block; height: 100%; width: 100%; background: var(--leaf); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 16px; text-decoration: none; letter-spacing: .01em;
  transition: transform .2s var(--ease), background .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--leaf); color: #fff; }
.btn.primary:hover { background: var(--leaf-deep); }
.btn.ghost { background: rgba(255, 255, 255, .14); color: var(--cream); border: 1.5px solid rgba(245, 248, 238, .8); }
.btn.wide { width: 100%; }
.link-btn { background: none; border: 0; padding: 8px 0; color: var(--leaf-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- video toggles ---------- */
.vid-toggle {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(48, 48, 48, .55); display: grid; place-items: center;
}
.vid-toggle span { width: 12px; height: 12px; display: block; }
.vid-toggle .i-pause { border-left: 4px solid #fff; border-right: 4px solid #fff; }
.vid-toggle .i-play { width: 0; height: 0; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }

/* ---------- cover: the front of the menu ---------- */
.cover { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); overflow: hidden; background: #2b2a26; }
.cover::before { content: ""; position: absolute; inset: -60px; background: url(media/aperitivo_poster.webp) center / cover; filter: blur(22px) brightness(.55) saturate(1.1); }
.cover-card {
  position: relative; z-index: 1; width: 100%; max-width: 460px; min-height: min(calc(100svh - 44px), 760px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: var(--paper); border-radius: 4px; padding: 54px 30px 36px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .75), 0 2px 6px rgba(0, 0, 0, .18);
}
.cover-card::before, .cover-card::after { content: ""; position: absolute; border: 1px solid var(--pale); border-radius: 2px; pointer-events: none; }
.cover-card::before { inset: 10px; }
.cover-card::after { inset: 15px; border-color: #EBF2DF; }
.cover-sprig { position: absolute; width: 104px; right: -14px; top: -30px; transform: rotate(8deg); pointer-events: none; }
.cover-kicker { font-size: 12px; font-weight: 900; letter-spacing: .22em; text-transform: uppercase; color: var(--leaf-ink); }
.cover-mark { width: min(100%, 290px); height: auto; margin-top: 16px; }
.cover-rule { position: relative; display: block; width: 76px; height: 1px; background: var(--leaf); margin: 30px auto 28px; }
.cover-rule::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; background: var(--leaf); transform: translate(-50%, -50%) rotate(45deg); }
.cover h1 { font-size: clamp(28px, 8vw, 40px); line-height: 1.12; color: var(--ink); max-width: 10.5em; }
.cover-lede { margin-top: 14px; font-size: 17px; color: var(--soft); max-width: 19em; }
.cover-open { margin-top: 34px; }
.cover-by { margin-top: 30px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }

/* ---------- Otium welcome (course 1) ---------- */
.host-band { max-width: var(--maxw); margin: 0 auto; padding: 34px var(--gut) 0; }
.host-band h3 { font-size: 22px; color: var(--leaf); margin-bottom: 14px; }
.host { max-width: 900px; margin: 0 auto 46px; display: grid; gap: 24px; }
.host-mark { display: grid; place-items: center; padding: 6px 0; }
.host-mark img { width: min(78%, 270px); height: auto; }
.host-lede { font-size: 18px; margin-bottom: 16px; }

/* Otium's own look for this band (otium-branding skill): clay ground, charcoal ink, oxblood accent, Sora and Spectral.
   The band runs edge to edge, so the transparent logo sits on Otium's own ground and never in a box. */
.host-band.otium {
  --o-ink: #3A3531; --o-red: #6F1A1F; --o-clay: #ECE3D5; --o-rule: rgba(156, 138, 114, .55);
  --o-sans: "Sora", "Lato", "Helvetica Neue", Arial, sans-serif;
  --o-serif: "Spectral", Georgia, "Times New Roman", serif;
  max-width: none; padding: 40px var(--gut) 104px; background: var(--o-clay); color: var(--o-ink);
  border-top: 4px solid var(--o-red);
}
.host-band.otium .host { margin-bottom: 0; gap: 26px; }
.host-band.otium .host-mark { padding: 0 0 28px; border-bottom: 1px solid var(--o-rule); }
.host-band.otium .host-mark img { width: min(64%, 232px); }
.host-band.otium h3 { font-family: var(--o-sans); font-weight: 600; font-size: 12.5px; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; color: var(--o-ink); margin-bottom: 12px; }
.host-band.otium .host-lede { font-family: var(--o-serif); font-size: 18.5px; line-height: 1.6; letter-spacing: -.012em; margin-bottom: 22px; }
.host-band.otium .host-lede strong { display: block; font-family: var(--o-sans); font-weight: 600; font-size: 25px; line-height: 1.24; letter-spacing: -.015em; color: var(--o-red); margin-bottom: 14px; text-wrap: balance; }
.host-band.otium .leaf-list li { font-family: var(--o-serif); font-size: 17.5px; line-height: 1.55; letter-spacing: -.012em; margin: 0; padding: 13px 0 13px 22px; border-top: 1px solid var(--o-rule); }
.host-band.otium .leaf-list li::before { left: 1px; top: calc(13px + .6em); width: 7px; height: 7px; border-radius: 0; transform: none; background: var(--o-red); }
.host-band.otium .leaf-list strong { font-weight: 600; }
.host-band.otium :focus-visible { outline-color: var(--o-red); }
.host-band + .course-body.welcome { padding-top: 0; }
/* tonight's menu sits half on Otium's band, half on the page */
.host-band.otium + .course-body.welcome .menu-card { margin-top: -64px; }

/* ---------- menu card (course 1) ---------- */
#aperitivo { overflow: hidden; }  /* the card's sprig hangs past the edge */
.course-body.welcome { padding-bottom: 8px; }
.menu-card {
  position: relative; max-width: 620px; margin: 0 auto; background: var(--paper);
  border: 1px solid var(--line); border-radius: 6px; padding: 34px 22px 26px;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(48, 62, 30, .35);
}
.menu-card::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--pale); border-radius: 3px; pointer-events: none; }
.menu-sprig { position: absolute; width: 92px; right: -26px; top: -46px; transform: rotate(8deg); pointer-events: none; }
.menu-eyebrow { font-family: var(--serif); font-style: italic; font-size: 30px; text-align: center; color: var(--leaf); }
.menu-note { text-align: center; color: var(--soft); font-size: 15px; margin: 8px auto 18px; max-width: 30em; }
.menu-list { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.menu-list > li { border-top: 1px solid var(--pale); counter-increment: c; }
.menu-list > li > a, .menu-list > li > .here {
  display: grid; grid-template-columns: 28px 1fr; column-gap: 6px; padding: 14px 4px; text-decoration: none; border-radius: 6px;
}
.menu-list > li > a::before, .menu-list > li > .here::before { content: counter(c); grid-row: 1 / 3; font-family: var(--serif); color: var(--leaf); font-size: 18px; line-height: 1.4; }
.menu-list .it { font-size: 21px; line-height: 1.25; }
.menu-list .en { font-size: 14px; color: var(--soft); }
.here-tag { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: var(--pale); color: var(--leaf-deep); font-style: normal; font-size: 12px; font-weight: 700; vertical-align: 1px; }
.menu-list > li > a:hover .it { color: var(--leaf-ink); }
.menu-dishes { list-style: none; margin: -4px 0 12px 34px; padding: 0; }
.menu-dishes button {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; column-gap: 6px; text-align: left; background: none; border: 0;
  padding: 9px 4px; font-size: 15px; border-radius: 6px;
}
.menu-dishes button:hover { background: var(--cream); }
.d-name { font-weight: 700; white-space: nowrap; }
.d-dots { flex: 1; border-bottom: 2px dotted #C5D6AC; transform: translateY(-4px); min-width: 12px; }
.d-price { text-align: right; font-weight: 700; color: var(--leaf-ink); white-space: nowrap; }
.d-sub { grid-column: 1 / -1; text-align: right; font-size: 13px; color: var(--soft); margin-top: 1px; text-wrap: balance; }

/* ---------- next course link ---------- */
.next-course {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 34px auto 0; padding: 18px var(--gut) 50px;
  text-decoration: none; color: var(--soft); font-size: 14px; letter-spacing: .04em;
}
.next-course b { font-weight: 400; font-size: 21px; color: var(--leaf-ink); }
.next-course span[aria-hidden] { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--pale); color: var(--leaf-deep); font-size: 16px; }

/* ---------- course head ---------- */
.course + .course { border-top: 1px solid var(--line); }
.course-head { position: relative; }
.course-media { position: relative; height: 56vh; height: 56svh; min-height: 330px; overflow: hidden; background: #2b2a26; }
.course-media video { width: 100%; height: 100%; object-fit: cover; }
.course-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,30,26,0) 28%, rgba(30,30,26,.55) 55%, rgba(30,30,26,.88) 100%); pointer-events: none; }
.course-title { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 var(--gut) 22px; color: var(--cream); pointer-events: none; text-shadow: 0 1px 12px rgba(0,0,0,.45); }
.course-title .head-sprig { display: none; }
.course-num { font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--pale); }
.course-title h2 { margin-top: 6px; }
.course-title h2 .it { display: block; font-size: clamp(44px, 13vw, 76px); line-height: 1; letter-spacing: -.01em; }
.course-title h2 .en { display: block; margin-top: 8px; font-size: 20px; line-height: 1.25; max-width: 18em; }
.course-media .vid-toggle { bottom: auto; top: 12px; }

.course-body { max-width: var(--maxw); margin: 0 auto; padding: 34px var(--gut) 0; }
.course-body h3 { font-size: 22px; color: var(--leaf); margin-bottom: 14px; }

/* leaf bullets */
.leaf-list { list-style: none; margin: 0; padding: 0; }
.leaf-list li { position: relative; padding-left: 28px; margin-bottom: 12px; }
.leaf-list li::before {
  content: ""; position: absolute; left: 2px; top: .42em; width: 14px; height: 9px; background: var(--leaf);
  border-radius: 0 100% 0 100%; transform: rotate(-24deg);
}
.leaf-list.small li { font-size: 15px; margin-bottom: 9px; }
.leaf-list .hl strong { background: linear-gradient(transparent 58%, var(--pale) 58%); font-weight: 700; }

/* ---------- 2. antipasto ---------- */
.ask-grid { display: grid; gap: 34px; }
.stats { display: grid; gap: 18px; align-content: start; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.stat .num { display: block; font-family: var(--serif); color: var(--leaf); font-size: 44px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat p { margin-top: 6px; font-size: 15px; }
.source { margin-top: 24px; font-size: 13px; color: var(--soft); max-width: 46em; }

/* ---------- 3. primo ---------- */
.hint { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--soft); margin-bottom: 18px; }
.tap-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--leaf); flex: none; box-shadow: 0 0 0 0 rgba(95,125,67,.5); }
.options { display: grid; gap: 14px; }
.opt {
  position: relative; display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; text-align: left;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 16px;
  box-shadow: 0 10px 26px -22px rgba(48, 62, 30, .5);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.opt::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--pale); border-radius: var(--r) var(--r) 0 0; }
.opt:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -20px rgba(48, 62, 30, .55); border-color: #C5D6AC; }
.opt-n { grid-row: 1 / 6; font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--leaf); }
.opt-name { font-family: var(--serif); font-size: 21px; line-height: 1.2; }
.opt-line { margin-top: 6px; font-size: 15px; color: var(--soft); }
.opt-price { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--pale); font-size: 19px; font-weight: 900; }
.opt-price small { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
.opt-more { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--leaf-ink); }
.opt-pick {
  position: absolute; right: 14px; top: -11px; padding: 3px 10px; border-radius: 999px; background: var(--leaf); color: #fff;
  font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; opacity: 0; transform: scale(.8); transition: .25s var(--ease);
}
.opt.picked { border-color: var(--leaf); box-shadow: 0 0 0 2px var(--leaf), 0 16px 30px -20px rgba(48, 62, 30, .55); }
.opt.picked .opt-pick { opacity: 1; transform: none; }

/* ---------- option sheet ---------- */
dialog { padding: 0; border: 0; color: var(--ink); }
dialog::backdrop { background: rgba(30, 32, 26, .55); }
.sheet {
  width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92vh; max-height: 92svh;
  border-radius: 20px 20px 0 0; background: var(--cream); display: none; flex-direction: column; overflow: hidden;
}
.sheet[open] { display: flex; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px 20px; border-bottom: 1px solid var(--line); background: var(--cream); }
.sheet-top::before { content: ""; position: absolute; left: 50%; top: 6px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #C9D6B6; }
.sheet-count { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.x { width: 44px; height: 44px; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--ink); border-radius: 50%; }
.x:hover { background: var(--pale); }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 24px; -webkit-overflow-scrolling: touch; }
.detail-photo { width: calc(100% + 40px); max-width: none; margin: 0 -20px 18px; height: 170px; object-fit: cover; }
.eyebrow { font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--leaf-ink); }
.sheet-title { font-size: 26px; margin: 6px 0 16px; }
.sub { color: var(--soft); font-size: 15px; margin: -6px 0 16px; }
.two-col { display: grid; gap: 18px; }
.two-col h4 { font-family: var(--sans); font-weight: 900; font-size: 17px; margin-bottom: 10px; }
.two-col h4 span { font-family: var(--serif); font-weight: 400; color: var(--leaf); font-size: 20px; margin-right: 6px; }
.more-box { margin-top: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.more-box b { color: var(--leaf-ink); display: block; margin-bottom: 2px; }
.num-steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.num-steps li { position: relative; counter-increment: s; padding-left: 40px; margin-bottom: 14px; }
.num-steps li::before { content: counter(s); position: absolute; left: 0; top: -4px; font-family: var(--serif); font-size: 28px; color: var(--leaf); }
.num-steps b { display: block; }
.num-steps span { display: block; color: var(--soft); font-size: 15px; }
.said { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--leaf-ink); margin: 16px 0; line-height: 1.5; }
.pill { display: inline-block; background: var(--pale); border-radius: 999px; padding: 9px 16px; font-weight: 900; font-size: 15px; }
.price-row { display: flex; gap: 14px; align-items: baseline; margin: -4px 0 18px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.price-row span { color: var(--leaf-ink); font-weight: 900; }
.price-row b { font-size: 17px; }
.sheet-foot { display: grid; grid-template-columns: 48px 1fr 48px; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.nav-btn { height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--cream); font-size: 26px; line-height: 1; color: var(--leaf-ink); }
.nav-btn:disabled { opacity: .35; cursor: default; }
#sheet-choose.chosen { background: var(--leaf-deep); }

/* ---------- menu dialog ---------- */
.menu-dialog { width: calc(100% - 24px); max-width: 640px; max-height: calc(100svh - 24px); margin: auto; background: transparent; overflow: visible; }
.menu-dialog .menu-slot { max-height: calc(100svh - 24px); overflow-y: auto; border-radius: 6px; }
.menu-dialog .menu-card { padding-top: 30px; }
.menu-dialog .menu-sprig { display: none; }
.menu-dialog .x { position: absolute; z-index: 3; right: 8px; top: 8px; background: var(--paper); box-shadow: 0 2px 10px rgba(0,0,0,.12); }

/* ---------- 4. secondo ---------- */
.math-blocks { display: grid; gap: 14px; }
.mblock { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.mblock .num { display: block; font-family: var(--serif); color: var(--leaf); font-size: 42px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mblock p { margin-top: 8px; font-size: 16px; }
.gala { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: center; margin: 28px 0 0; padding: 18px 20px; background: var(--pale); border-radius: var(--r); }
.gala p { font-family: var(--serif); font-size: 19px; line-height: 1.4; }
.gala-art { width: 100%; max-width: 268px; height: auto; }
.gala-art .ticket rect { fill: var(--paper); stroke: var(--leaf); stroke-width: 2; }
.gala-art .ticket path { stroke: var(--leaf); stroke-width: 1.5; fill: none; }
.gala-art text { font: 700 20px var(--serif); fill: var(--leaf); text-anchor: middle; }
.gala-art .arrow { fill: none; stroke: var(--leaf-ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
/* a place setting seen from above: fork, plate, knife (used here and in the calculator) */
.gala-art .cut { fill: none; stroke: var(--leaf-ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.gala-art .rim { fill: var(--paper); stroke: var(--leaf); stroke-width: 2.3; }
.gala-art .well { fill: none; stroke: var(--pale); stroke-width: 1.8; }
.calc { margin-top: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 16px 18px; box-shadow: 0 18px 40px -30px rgba(48, 62, 30, .6); }
.calc-head h3 { margin-bottom: 4px; }
.calc-head p { color: var(--soft); font-size: 15px; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 18px 0 8px; }
.step-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--leaf); color: #fff; font-size: 30px; line-height: 1; font-weight: 700; transition: transform .2s var(--ease), background .2s; }
.step-btn:active { transform: scale(.93); }
.step-btn:disabled { background: #B9C6A9; cursor: default; }
.step-val { min-width: 120px; text-align: center; }
.step-val output { display: block; font-family: var(--serif); font-size: 54px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.step-val span { font-size: 14px; color: var(--soft); }
/* eight place settings: tap one to set the number of dinners */
.plates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 4px; max-width: 328px; margin: 0 auto 4px; }
.plate { position: relative; aspect-ratio: 1; min-width: 44px; padding: 0; border: 0; background: none; border-radius: 16px; display: grid; place-items: center; transition: transform .25s var(--ease), background .2s; }
.plate svg { display: block; width: 100%; height: 100%; }
.plate .cut { fill: none; stroke: #C3D1B0; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.plate .rim { fill: var(--paper); stroke: #C3D1B0; stroke-width: 2; stroke-dasharray: 3.2 3.4; transition: stroke .3s, fill .3s; }
.plate .well { fill: none; stroke: #E6EDDB; stroke-width: 1.3; transition: stroke .3s; }
.plate-n { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 16px; line-height: 1; color: #7C9163; pointer-events: none; transition: color .3s; font-variant-numeric: lining-nums; }
.plate.on .cut { stroke: var(--leaf); }
.plate.on .rim { stroke: var(--leaf); stroke-dasharray: none; }
.plate.on .well { stroke: var(--pale); }
.plate.on .plate-n { color: var(--leaf-deep); }
.plate.cur .rim { fill: var(--leaf); }
.plate.cur .well { stroke: rgba(255, 255, 255, .5); }
.plate.cur .plate-n { color: #fff; font-weight: 700; }
.plate:hover { background: var(--cream); }
.plate:active { transform: scale(.93); }
/* what moves with the dinner count, and what stays the same */
.calc-out { display: grid; gap: 12px; margin-top: 12px; }
.lg { border-radius: 14px; padding: 14px 16px 16px; }
.lg-tag { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.lg-tag svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lg.moves { background: #F1F7E6; border: 1px solid var(--line); }
.lg.moves .lg-tag { color: var(--leaf-ink); }
.lg.fixed { background: #F6F5F1; border: 1px dashed #CFCDC2; }
.lg.fixed .lg-tag { color: #66665E; }
.bar-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14.5px; margin-bottom: 7px; color: var(--soft); }
.bar-label b { color: var(--ink); font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.big-label { font-size: 14.5px; color: var(--ink); }
.big-num { margin: 1px 0 9px; font-family: var(--serif); font-size: 31px; line-height: 1.15; }
.big-num b { font-weight: 400; }
.live { display: inline-block; color: var(--leaf-deep); font-variant-numeric: tabular-nums; }
.bar-label.once { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed #CFCDC2; }
.bar-track { height: 14px; border-radius: 999px; background: var(--paper); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(95, 125, 67, .14); }
.lg.fixed .bar-track { height: 8px; box-shadow: inset 0 0 0 1px rgba(60, 60, 50, .1); }
.bar-fill { display: block; height: 100%; border-radius: 999px; transform-origin: 0 50%; transition: transform .6s var(--ease); }
.bar-fill.in { background: var(--leaf); }
.bar-fill.cost { background: #8F8F84; min-width: 6px; }
.calc-pct { margin-top: 14px; font-family: var(--serif); font-size: 19px; line-height: 1.35; color: var(--ink); }
.calc-pct b { font-weight: 700; }
.fine { margin-top: 10px; font-size: 13.5px; color: var(--soft); line-height: 1.5; }
.calc-out .fine { margin-top: 2px; }
.calc-out .link-btn { justify-self: start; padding-top: 0; }

/* ---------- 5. dolce ---------- */
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--pale); }
.steps li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; margin-bottom: 22px; }
.step-n { width: 44px; height: 44px; border-radius: 50%; background: var(--paper); border: 2px solid var(--leaf); display: grid; place-items: center; font-family: var(--serif); font-size: 20px; color: var(--leaf); }
.steps p { font-size: 18px; padding-top: 8px; }
.why { margin-top: 10px; background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--leaf); border-radius: 12px; padding: 18px 20px; }
.why h3 { margin-bottom: 6px; }

/* ---------- 6. caffe ---------- */
.pick { max-width: 640px; margin: 0 auto; }
.pick fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.pick legend { font-family: var(--serif); font-size: 22px; color: var(--leaf); margin-bottom: 12px; padding: 0; }
.chip { position: relative; display: block; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 14px 52px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; transition: border-color .2s, box-shadow .2s, background .2s; }
.chip span::before { content: ""; position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; border: 2px solid #A9BC93; background: var(--paper); transition: .2s; }
.chip b { font-weight: 700; }
.chip small { color: var(--soft); font-size: 14px; }
.chip input:checked + span { border-color: var(--leaf); box-shadow: 0 0 0 1px var(--leaf); background: #FBFDF7; }
.chip input:checked + span::before { border-color: var(--leaf); background: radial-gradient(circle, var(--leaf) 0 5px, var(--paper) 6px); }
.chip input:focus-visible + span { outline: 3px solid var(--leaf); outline-offset: 2px; }
.notes { display: block; margin: 22px 0 18px; font-weight: 700; }
.notes small { font-weight: 400; color: var(--soft); }
.notes textarea { display: block; width: 100%; margin-top: 8px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: 400 16px/1.5 var(--sans); color: var(--ink); background: var(--paper); resize: vertical; }
.notes textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 1px var(--leaf); }
#pick-msg.warn { color: #8A3B1E; font-weight: 700; }

/* ---------- footer ---------- */
.foot { position: relative; margin-top: 64px; padding: 54px var(--gut) calc(48px + env(safe-area-inset-bottom)); text-align: center; background: var(--paper); border-top: 1px solid var(--line); overflow: hidden; color: var(--soft); font-size: 14px; }
.foot-sprig { position: absolute; width: 150px; left: -30px; top: -20px; opacity: .9; transform: rotate(-10deg); }
.grazie { font-family: var(--serif); font-style: italic; font-size: 34px; color: var(--leaf); margin-bottom: 10px; }
.foot-mark { width: 200px; height: auto; margin: 0 auto 10px; }
.back-top { display: inline-block; margin-top: 18px; color: var(--leaf-ink); font-weight: 700; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 60; transform: translate(-50%, 16px); opacity: 0; visibility: hidden;
  max-width: calc(100% - 32px); width: max-content; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .35s var(--ease), opacity .35s, visibility .35s; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- motion (only when allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .cover-card { animation: cover-in .9s var(--ease) backwards; }
  .cover-card { transition: transform .75s var(--ease), opacity .6s ease-in; transform-origin: 0 50%; }
  .cover.opening .cover-card { transform: perspective(1600px) rotateY(-75deg); opacity: 0; }
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js [data-reveal].in { opacity: 1; transform: none; }
  .js .leaf-list [data-reveal]:nth-child(2) { transition-delay: .06s; }
  .js .leaf-list [data-reveal]:nth-child(3) { transition-delay: .12s; }
  .js .leaf-list [data-reveal]:nth-child(4) { transition-delay: .18s; }
  .js .leaf-list [data-reveal]:nth-child(5) { transition-delay: .24s; }
  .js .leaf-list [data-reveal]:nth-child(6) { transition-delay: .3s; }
  .js .options [data-reveal]:nth-child(2), .js .steps [data-reveal]:nth-child(2) { transition-delay: .08s; }
  .js .options [data-reveal]:nth-child(3), .js .steps [data-reveal]:nth-child(3) { transition-delay: .16s; }
  .js .options [data-reveal]:nth-child(4) { transition-delay: .24s; }
  .js .course-title h2 .it { opacity: 0; transform: translateY(24px); letter-spacing: .06em; transition: opacity .9s var(--ease), transform .9s var(--ease), letter-spacing 1.2s var(--ease); }
  .js .course-title h2 .en, .js .course-num { opacity: 0; transition: opacity .9s .25s var(--ease); }
  .js .course.seen .course-title h2 .it { opacity: 1; transform: none; letter-spacing: -.01em; }
  .js .course.seen .course-title h2 .en, .js .course.seen .course-num { opacity: 1; }
  .head-sprig, .menu-sprig, .foot-sprig { animation: sway 7s ease-in-out infinite alternate; transform-origin: 10% 90%; }
  @keyframes sway { from { rotate: -2deg; } to { rotate: 3deg; } }
  .tap-dot { animation: ping 2.2s ease-out infinite; }
  @keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(95,125,67,.55); } 70%, 100% { box-shadow: 0 0 0 12px rgba(95,125,67,0); } }
  .sheet[open] { animation: up .38s var(--ease); }
  .opt-detail:not([hidden]) { animation: detail-in .32s var(--ease); }
  @keyframes detail-in { from { opacity: 0; transform: translateY(8px); } }
  @keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
  .menu-dialog[open] { animation: unfold .35s var(--ease); }
  @keyframes unfold { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
  .plate.on.pop { animation: pop .4s var(--ease); }
  @keyframes pop { 50% { transform: scale(1.12); } }
  /* the numbers that move with the dinner count flash when they change; the fixed costs never do */
  .lg.moves.tick { animation: flash .8s ease-out; }
  @keyframes flash { 0% { background: #DCEBC4; box-shadow: 0 0 0 3px rgba(95, 125, 67, .2); } 100% { background: #F1F7E6; box-shadow: 0 0 0 0 rgba(95, 125, 67, 0); } }
  .lg.moves.tick .live { animation: bump .45s var(--ease); }
  @keyframes bump { 0% { transform: translateY(6px); opacity: .3; } }
  /* cover: the lines settle in one after another */
  .js .cover-card > :not(.cover-sprig) { animation: rise .8s var(--ease) backwards; }
  .js .cover-kicker { animation-delay: .3s; }
  .js .cover-mark { animation-delay: .42s; }
  .js .cover-rule { animation-delay: .56s; }
  .js .cover h1 { animation-delay: .66s; }
  .js .cover-lede { animation-delay: .78s; }
  .js .cover-open { animation-delay: .92s; }
  .js .cover-by { animation-delay: 1.04s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } }
  /* each course photo eases in as its course arrives */
  .js .course-media video { transform: scale(1.07); transition: transform 2.8s var(--ease); }
  .js .course.seen .course-media video { transform: none; }
  .next-course span[aria-hidden] { animation: nudge 2.6s ease-in-out infinite; }
  @keyframes nudge { 50% { transform: translateY(4px); } }
  .gala.in .p1 { animation: drop .5s .2s both var(--ease); }
  .gala.in .p2 { animation: drop .5s .35s both var(--ease); }
  .gala.in .p3 { animation: drop .5s .5s both var(--ease); }
  @keyframes drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
}

/* ---------- wider screens ---------- */
@media (min-width: 700px) {
  .host { grid-template-columns: minmax(260px, 340px) 1fr; align-items: center; gap: 44px; }
  .host-band.otium { padding: 60px var(--gut) 124px; }
  .host-band.otium .host { grid-template-columns: minmax(220px, 300px) 1fr; gap: 0; }
  .host-band.otium .host-mark { align-self: stretch; padding: 0 44px 0 0; border-bottom: 0; border-right: 1px solid var(--o-rule); }
  .host-band.otium .host-mark img { width: 100%; }
  .host-band.otium .host-copy { padding-left: 44px; }
  .host-band.otium .host-lede strong { font-size: 28px; }
  :root { --gut: 32px; }
  .bar { grid-template-columns: auto 1fr auto; }
  .bar-mark { display: block; }
  .bar-course { text-align: center; }
  .options { grid-template-columns: repeat(2, 1fr); }
  .math-blocks { grid-template-columns: repeat(3, 1fr); }
  .gala { grid-template-columns: 268px 1fr; gap: 24px; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 28px; }
  .sheet { max-width: 760px; margin: auto; border-radius: 20px; max-height: 88vh; }
  .sheet-top::before { display: none; }
  .detail-photo { height: 210px; }
  .ask-grid { grid-template-columns: 1.15fr .85fr; gap: 48px; }
  .steps p { font-size: 19px; }
}
@media (min-width: 980px) {
  :root { --bar-h: 64px; }
  .bar { padding-left: 40px; padding-right: 40px; }
  .bar-mark { height: 26px; width: 225px; }
  .bar-course { font-size: 14px; }
  .bar-it { font-size: 18px; }
  .options { grid-template-columns: repeat(4, 1fr); }
  .opt { grid-template-columns: 1fr; padding: 22px 20px 18px; align-content: start; }
  .opt-n { grid-row: auto; margin-bottom: 10px; font-size: 46px; }
  .opt-line { min-height: 7.2em; }
  .course-head { display: grid; grid-template-columns: 1fr minmax(300px, 40%); max-width: var(--maxw); margin: 0 auto; padding: 56px 40px 0; gap: 48px; align-items: center; }
  .course-media { order: 2; height: min(64vh, 560px); min-height: 0; border-radius: 22px; box-shadow: 0 30px 60px -36px rgba(30, 40, 20, .6); }
  .course-media::after { display: none; }
  .course-title { position: relative; padding: 0; color: var(--ink); pointer-events: auto; text-shadow: none; }
  .course-title .head-sprig { display: block; width: 130px; margin: 0 0 8px -10px; }
  .course-num { color: var(--leaf-ink); }
  .course-title h2 .it { color: var(--leaf); font-size: 92px; }
  .course-title h2 .en { font-size: 30px; }
  .course-body { padding: 48px 40px 0; }
  .course-body.welcome { padding-top: 64px; }
  .cover-card { max-width: 540px; padding: 70px 56px 48px; }
  .cover-mark { width: 360px; }
  .cover h1 { font-size: 46px; }
  .menu-card { padding: 44px 44px 30px; }

  /* calculator in two columns: set the dinners on the left, read the figures on the right */
  .calc { display: grid; grid-template-columns: 1fr 1.15fr; column-gap: 44px; align-items: center; padding: 28px 32px 26px; }
  .calc-out { margin-top: 0; }
  .host-band { padding: 64px 40px 0; }
  .host-band.otium { margin-top: 56px; padding: 68px 40px 132px; }
}

@keyframes cover-in { from { opacity: 0; transform: translateY(22px) scale(.98); } }
