/* Chenaniah's website (home pages built by tool/build_site.dart).
   The app's colours and fonts (lib/core/theme/app_palette.dart); amber is
   kept for music and "now": chords, the current section, the main action.
   Static: no third-party requests (see site/_headers). */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/AtkinsonHyperlegibleNext-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/Outfit-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #121417;
  --bg-alt: #16191D;
  --surface: #1B1E23;
  --surface-high: #242830;
  --border: #2E333B;
  --text: #F2EEE6;
  --text-2: #A8ADB7;
  --accent: #F2B544;
  --accent-fg: #F2B544;
  --accent-soft: #3D3628;
  --on-accent: #121417;
  --live: #4FC38A;
  --live-soft: rgba(79, 195, 138, .16);
  --shadow: 0 1.75rem 3.5rem rgba(0, 0, 0, .5);
  --display: "Outfit", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --gutter: 1.25rem;
  --max: 72rem;
  /* Radii: the app's scale (AppRadii, DESIGN.md "rounded"), plus the frames
     of the drawn devices. */
  --radius-board: .375rem;
  --radius-s: .625rem;
  --radius-m: .75rem;
  --radius-l: .875rem;
  --radius-section: 1.125rem;
  --radius-pill: 999px;
  --radius-tablet: 1.5rem;
  --radius-device: 1.75rem;
  /* Motion: the app's (AppDurations, AppCurves.standard = easeOutCubic):
     things arrive, they do not bounce. */
  --ease: cubic-bezier(.33, 1, .68, 1);
  --short: 180ms;
  --medium: 280ms;
  /* The lamp on "now": the only light on the stage. */
  /* h3 in two sizes only: a chapter of a section, and an item of a list. */
  --h3-chapter: clamp(1.7rem, 3.4vw, 2.3rem);
  --h3-item: 1.3rem;
  --glow: 0 0 2rem rgba(242, 181, 68, .18);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F2F3F3;
    --bg-alt: #ECEEEE;
    --surface: #FBFBFA;
    --surface-high: #E6E8E9;
    --border: #D0D4D6;
    --text: #16181B;
    --text-2: #555B61;
    --accent-fg: #8A5600;
    --accent-soft: #FCEFD6;
    --live: #197647;
    --live-soft: rgba(25, 118, 71, .12);
    --shadow: 0 1.75rem 3.5rem rgba(22, 24, 27, .18);
    color-scheme: light;
  }
}
@media (min-width: 40rem) { :root { --gutter: 2rem; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-fg); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--accent-fg); outline-offset: 3px; border-radius: var(--radius-s); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; }
p { margin: 0 0 1rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: -999px; top: .5rem; z-index: 10;
  background: var(--accent); color: var(--on-accent);
  padding: .6rem 1rem; border-radius: var(--radius-s); font-weight: 700;
}
.skip:focus { left: .5rem; }

/* ---- Header ------------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}
.top .wrap { display: flex; align-items: center; gap: .75rem; min-height: 4rem; }
.brand {
  display: flex; align-items: center; gap: .6rem; margin-right: auto;
  color: var(--text); text-decoration: none;
  font: 600 1.25rem var(--display);
}
.brand img { width: 2.25rem; height: 2.25rem; }
.nav { display: none; }
.nav a, .langs a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 .7rem; border-radius: var(--radius-s);
  color: var(--text-2); text-decoration: none; font-size: .95rem; white-space: nowrap;
}
.nav a:hover, .langs a:hover { color: var(--text); background: var(--surface-high); }
.langs { display: flex; }
.langs a { padding: 0 .55rem; font-size: .9rem; }
.langs a[aria-current="page"] { color: var(--text); font-weight: 700; }
.brand { min-height: 44px; }
/* "Try it" stays in the header on phones too. Where the name, the
   languages and the button do not fit in one row the logo stands alone; the
   name is still read out. German ("Ausprobieren") needs more room. */
@media (max-width: 39.99rem) {
  .top .wrap { gap: .5rem; }
  .langs a { padding: 0 .4rem; }
}
@media (max-width: 23.99rem) {
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 26.49rem) {
  :lang(de) .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 64rem) {
  .nav { display: flex; gap: .15rem; }
}

/* ---- Buttons -------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.35rem; border-radius: var(--radius-l);
  font-weight: 700; text-decoration: none;
}
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: #F7CD7A; }
.button.quiet { background: var(--surface-high); color: var(--text); }
.button.quiet:hover { background: var(--border); }
.top .button { min-height: 44px; padding: .45rem 1rem; font-size: .95rem; white-space: nowrap; }

/* ---- Chords above syllables (hero title and the drawn stage) --------------- */
.syl { position: relative; white-space: nowrap; }
.chord {
  position: absolute; left: 0; bottom: 1.45em;
  font-family: var(--body); font-weight: 700; font-size: .78em; line-height: 1;
  color: #F2B544; letter-spacing: 0;
}

/* ---- Hero: the headline is a line of a chord chart --------------------------- */
/* The glow may spill above, never sideways: a page wider than the screen
   lets a phone zoom out onto empty space. */
.hero { position: relative; padding: 2rem 0 4.5rem; overflow-x: clip; }
.hero::before {
  content: ""; position: absolute; top: -12rem; right: -16rem;
  width: 44rem; height: 44rem; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(242, 181, 68, .14), transparent);
}
/* Wide screens: the words on the left, the phone beside them. */
.hero .wrap { position: relative; display: grid; align-items: center; }
.hero h1 {
  font-size: clamp(2.5rem, 7.4vw, 4.4rem); font-weight: 600;
  line-height: 1.42; letter-spacing: -.02em; margin-bottom: 1.5rem;
}
.h1-line { display: block; }
.h1-line .chord {
  bottom: 76%; font-family: var(--display); font-weight: 600;
  font-size: max(.34em, .9rem); color: var(--accent-fg); letter-spacing: .02em;
}
/* Narrow phones: a smaller title wraps less, and more leading leaves the
   chords room above their syllable instead of touching the line before. */
@media (max-width: 30rem) {
  .hero h1 { font-size: clamp(2.1rem, 10.4vw, 2.5rem); line-height: 1.66; }
}
.hero .lead { font-size: 1.2rem; color: var(--text-2); max-width: 33rem; margin-bottom: 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; }
.fine { font-size: .92rem; color: var(--text-2); margin: 0; }
/* Phones: title, buttons, phone, then the words, so the main action and the
   first notification both land in the first screen. */
@media (max-width: 61.99rem) {
  .hero-copy { display: contents; }
  .hero .actions { order: 1; margin-bottom: 2rem; }
  .hero .lock { order: 2; }
  .hero .lead { order: 3; }
  .hero .fine { order: 4; }
}
@media (min-width: 62rem) {
  .hero { padding: 5.5rem 0 6.5rem; }
  .hero .wrap { grid-template-columns: 1.08fr 1fr; column-gap: 4rem; }
  .hero h1 { grid-area: 1 / 1; align-self: end; }
  .hero .lock { grid-area: 1 / 2 / span 2; margin: 0; }
  .hero-copy { grid-area: 2 / 1; align-self: start; }
}

/* ---- The app's look, drawn (always dark) ---------------------------------------- */
.stage {
  background: #121417; color: #F2EEE6;
  border: 1px solid #2E333B; border-radius: var(--radius-device);
  box-shadow: var(--shadow);
}
.key {
  margin-left: auto; padding: .2em .8em; border-radius: var(--radius-pill);
  background: #3D3628; color: #F2B544; font-weight: 700; font-size: .85em; white-space: nowrap;
}
.live-pill {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .25em .8em; border-radius: var(--radius-pill);
  background: rgba(79, 195, 138, .15); color: #4FC38A; font-weight: 700; font-size: .8em;
}
.dot { width: .55em; height: .55em; border-radius: 50%; background: #4FC38A; }
.section-card {
  position: relative; padding: .7em 1.1em .8em;
  border: 2px solid transparent; border-radius: var(--radius-section); background: #16191D;
}
/* "Now": the lit card, as on the app's stage. */
.section-card.lit { border-color: #F2B544; background: #1B1E23; box-shadow: var(--glow); }
.section-card .label { font: 600 .8em var(--display); color: #A8ADB7; }
.lyrics { margin: 0; }
.line { display: block; line-height: 2.9; }

/* ---- The hero's phone: the week's notifications arriving ---------------------- */
/* One orchestrated moment on load: the clock, then three notifications, one
   after the other. Always dark, like the stage: it is a phone at night. */
.lock {
  position: relative; width: min(23rem, 100%); justify-self: center; margin-bottom: 2.5rem;
  padding: 2.25rem 1rem 1.25rem; border: 6px solid #2E333B; border-radius: 2.4rem;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(242, 181, 68, .16), transparent 70%),
    linear-gradient(#16191D, #121417);
  color: #F2EEE6; box-shadow: var(--shadow);
}
.lock::before {
  content: ""; position: absolute; top: .7rem; left: 50%; width: 5.5rem; height: 1.35rem;
  margin-left: -2.75rem; border-radius: var(--radius-pill); background: #000;
}
.lock-clock { display: grid; justify-items: center; margin: .75rem 0 1.5rem; }
.lock-day { color: #C9CDD4; font-size: .95rem; }
.lock-time { font: 300 4.6rem/1 var(--display); letter-spacing: -.02em; }
.pushes { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.push {
  padding: .8rem .95rem .9rem; border-radius: 1.3rem;
  background: rgba(54, 59, 69, .62); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .06);
}
.push-app { display: flex; align-items: center; gap: .45rem; margin-bottom: .3rem; color: #C9CDD4; font-size: .78rem; }
.push-app img { width: 1.15rem; height: 1.15rem; border-radius: .3rem; }
.push-when { margin-left: auto; }
.push strong { display: block; font-size: 1rem; line-height: 1.3; }
.push p { margin: 0; color: #C9CDD4; font-size: .92rem; line-height: 1.4; }
.p-live strong { display: flex; align-items: center; gap: .45rem; color: #4FC38A; }
.p-live strong::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: #4FC38A; box-shadow: 0 0 0 .3rem rgba(79, 195, 138, .2); }
.push-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.push-actions[hidden] { display: none; }
.push-actions button {
  min-height: 44px; border: 0; border-radius: var(--radius-m);
  font: 700 .95rem/1.2 var(--body); cursor: pointer;
  transition: background-color var(--short) var(--ease);
}
.push-actions [data-answer="yes"] { background: #F2B544; color: #121417; }
.push-actions [data-answer="yes"]:hover { background: #F7CD7A; }
.push-actions [data-answer="no"] { background: rgba(255, 255, 255, .1); color: #F2EEE6; }
.push-actions [data-answer="no"]:hover { background: rgba(255, 255, 255, .16); }
.push-said:empty { display: none; }
.push .push-said { margin-top: .6rem; color: #F2EEE6; font-weight: 700; }
.lock.said-yes .push-said { color: #4FC38A; }
.lock.said-no .push-said { color: #F28C6B; }
.lock :focus-visible { outline-color: #F2B544; }
@media (prefers-reduced-motion: no-preference) {
  .lock-clock { animation: arrive 700ms var(--ease) .1s both; }
  .push { animation: push-in 520ms var(--ease) both; }
  .p-squad { animation-delay: .7s; }
  .p-gap { animation-delay: 1.9s; }
  .p-live { animation-delay: 3.1s; }
}
/* The title's chords land on their syllables one after the other, as a hand
   pencils them in, before the first notification arrives. */
@media (prefers-reduced-motion: no-preference) {
  .h1-line .chord { animation: chord-in 520ms var(--ease) both; animation-delay: .2s; }
  .h1-line:nth-child(1) .syl:nth-of-type(2) .chord { animation-delay: .38s; }
  .h1-line:nth-child(2) .syl:nth-of-type(1) .chord { animation-delay: .44s; }
  .h1-line:nth-child(2) .syl:nth-of-type(2) .chord { animation-delay: .62s; }
  .h1-line:nth-child(2) .syl:nth-of-type(3) .chord { animation-delay: .8s; }
  .h1-line:nth-child(3) .syl:nth-of-type(1) .chord { animation-delay: .68s; }
  .h1-line:nth-child(3) .syl:nth-of-type(2) .chord { animation-delay: .86s; }
}
@keyframes chord-in { from { opacity: 0; transform: translateY(-.5em); } }
/* Wide screens: the hero has depth while it scrolls away; the lamp sinks
   slower than the page, the phone rises a little faster. The words never
   move. Browsers without scroll-driven animations keep it still. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 62rem) {
    .hero::before, .hero .lock {
      animation: linear both; animation-timeline: scroll(root); animation-range: 0 100vh;
    }
    .hero::before { animation-name: lamp-sink; }
    .hero .lock { animation-name: phone-rise; }
  }
}
@keyframes lamp-sink { to { transform: translateY(14rem); } }
@keyframes phone-rise { to { transform: translateY(-3.5rem); } }
@keyframes arrive { from { opacity: 0; transform: translateY(.5rem); } }
@keyframes push-in { from { opacity: 0; transform: translateY(-1rem) scale(.96); } }

/* ---- A week with the team -------------------------------------------------------- */
/* Each day a verse beside a drawn screen. The screens are live HTML in the
   app's own look; every change in them follows the reader's scroll through
   --p1 … --p5 (0 → 1 across that day, set by assets/home.js on .week-body).
   Without JavaScript the variables are missing and each screen shows the end
   of its day. */
.week-steps { list-style: none; margin: 0; padding: 0; }
.week-step { display: grid; gap: 2rem; align-items: center; padding: 2.5rem 0; }
.week-step + .week-step { border-top: 1px solid var(--border); }
.day-name {
  display: inline-flex; align-items: center; min-height: 2rem; margin: 0 0 .9rem; padding: 0 .8rem;
  border: 2px solid var(--border); border-radius: var(--radius-m);
  font: 600 .95rem var(--display); color: var(--text-2);
}
.week-step h3 { font-size: var(--h3-chapter); line-height: 1.1; margin-bottom: .8rem; }
.week-step .step-words > p { color: var(--text-2); font-size: 1.1rem; max-width: 34rem; }
.week-step ul { margin: 0; padding-left: 1.15rem; color: var(--text-2); }
.week-step li { margin: .3rem 0; }
.day-shot { display: grid; justify-items: center; font-size: 13px; }
@media (min-width: 52rem) {
  .week-step { grid-template-columns: 1fr auto; gap: 4rem; }
}
.week-stage { display: none; }

/* The drawn devices: sizes in em, so one font size scales a whole phone. */
.device {
  position: relative; width: 20em; height: 42em; overflow: hidden;
  border: .4em solid #2E333B; border-radius: 2.7em; background: #121417; color: #F2EEE6;
  box-shadow: var(--shadow);
}
.device::before {
  content: ""; position: absolute; z-index: 3; top: .65em; left: 50%; width: 5.4em; height: 1.4em;
  margin-left: -2.7em; border-radius: var(--radius-pill); background: #000;
}
.scr { position: relative; height: 100%; padding: 3em 1.2em 1.2em; }
.scr-head { display: flex; align-items: center; gap: .6em; margin-bottom: 1.1em; }
.scr-kicker { color: #A8ADB7; font-size: .8em; }
.scr-title { font: 600 1.55em/1.15 var(--display); }
.scr .section-card { font-size: .8em; }
.scr .line { line-height: 2.7; }

/* The notification that drops in over a screen (--bn: 0 hidden, 1 in). */
.banner {
  position: absolute; z-index: 2; top: 2.5em; left: .55em; right: .55em;
  display: flex; gap: .65em; align-items: center;
  padding: .75em .85em; border-radius: 1.2em;
  background: rgba(46, 51, 59, .97);
  box-shadow: 0 .8em 2em rgba(0, 0, 0, .45);
  opacity: var(--bn, 0); transform: translateY(calc((1 - var(--bn, 0)) * -130%));
}
.banner img { width: 1.9em; height: 1.9em; border-radius: .45em; }
.banner strong { display: block; font-size: .84em; line-height: 1.3; }
.banner span { display: block; color: #C9CDD4; font-size: .74em; line-height: 1.35; }

/* Monday and Wednesday: the squad. --k: 0 waiting, 1 "I'm in". */
.slots { list-style: none; margin: 0; padding: 0; }
.slot {
  --k: 1;
  display: grid; grid-template-columns: 2.3em minmax(0, 1fr) auto; gap: .7em; align-items: center;
  padding: .7em 0; border-bottom: 1px solid #2E333B;
}
.avatar {
  display: grid; width: 2.3em; height: 2.3em; border-radius: 50%; background: #242830;
  font-size: .95em; place-items: center;
}
.avatar b, .names span, .top-line span, .state span { grid-area: 1 / 1; }
.who { display: grid; min-width: 0; }
.top-line, .names, .state { display: grid; }
.pos, .slot-note { color: #A8ADB7; font-size: .72em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-note { color: #F28C6B; font-style: italic; opacity: 0; }
.names { font-weight: 700; font-size: .98em; }
.name-b { opacity: 0; }
.state { justify-items: end; }
.state span {
  padding: .3em .75em; border-radius: var(--radius-pill); font-size: .72em; font-weight: 700; white-space: nowrap;
}
.st-wait { background: #242830; color: #A8ADB7; opacity: calc(1 - var(--k)); }
.st-ok {
  background: rgba(79, 195, 138, .15); color: #4FC38A; opacity: var(--k);
  transform: scale(calc(1 + .5 * var(--k) * (1 - var(--k))));
}
.st-no { background: rgba(242, 140, 107, .16); color: #F28C6B; opacity: 0; }
.slot:nth-child(3) { margin: 0 -.6em; padding-left: .6em; padding-right: .6em; border-radius: .9em; background: #1B1E23; }
.scr-mon {
  --t: var(--p1, 1); --bn: clamp(0, min((var(--t) - .04) * 7, (.5 - var(--t)) * 7), 1);
  --k2: clamp(0, (var(--t) - .3) * 16, 1); --k3: clamp(0, (var(--t) - .42) * 16, 1);
  --k4: clamp(0, (var(--t) - .54) * 16, 1); --k5: clamp(0, (var(--t) - .66) * 16, 1);
  --yes: calc((1 + var(--k2) + var(--k3) + var(--k4) + var(--k5)) / 5);
}
.scr-mon .slot:nth-child(2) { --k: var(--k2); }
.scr-mon .slot:nth-child(3) { --k: var(--k3); }
.scr-mon .slot:nth-child(4) { --k: var(--k4); }
.scr-mon .slot:nth-child(5) { --k: var(--k5); }
/* Wednesday: Giulia can't (--n), Marco takes her place (--s) and says yes (--c). */
.scr-wed {
  --t: var(--p2, 1); --bn: clamp(0, min((var(--t) - .2) * 7, (.62 - var(--t)) * 7), 1);
  --n: clamp(0, (var(--t) - .1) * 16, 1);
  --s: clamp(0, (var(--t) - .58) * 16, 1);
  --c: clamp(0, (var(--t) - .78) * 16, 1);
  --yes: calc((4 + max(1 - var(--n), var(--c))) / 5);
}
.scr-wed .slot-swap .st-ok { opacity: max(calc(1 - var(--n)), var(--c)); transform: scale(calc(1 + .5 * var(--c) * (1 - var(--c)))); }
.scr-wed .slot-swap .st-no { opacity: calc(var(--n) * (1 - var(--s))); }
.scr-wed .slot-swap .st-wait { opacity: calc(var(--s) * (1 - var(--c))); }
.scr-wed .slot-swap .slot-note { opacity: calc(var(--n) * (1 - var(--s))); }
.scr-wed .slot-swap .pos { opacity: calc(1 - var(--n) * (1 - var(--s))); }
.scr-wed .slot-swap .name-a { opacity: calc(1 - var(--s)); }
.scr-wed .slot-swap .name-b { opacity: var(--s); }

/* Under the squad: how many said yes (--yes, 0 → 1), and the reminder. */
.tally { display: grid; grid-template-columns: auto 1fr; gap: .8em; align-items: center; margin-top: 1.4em; color: #A8ADB7; font-size: .76em; }
.tally i { position: relative; height: .5em; border-radius: var(--radius-pill); background: #242830; overflow: hidden; }
.tally i::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: #4FC38A;
  transform-origin: left; transform: scaleX(var(--yes, 1));
}
.reminder { margin: .9em 0 0; color: #A8ADB7; font-size: .72em; line-height: 1.45; }

/* Thursday: the setlist under the arc of its tempo. */
.scr-set { --t: var(--p3, 1); --draw: clamp(0, (var(--t) - .06) * 1.6, 1); }
.arc { position: relative; aspect-ratio: 300 / 80; margin: 0 0 1.2em; }
.arc svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arc path {
  fill: none; stroke: #C9CDD4; stroke-width: 2.4; stroke-linecap: round; opacity: .55;
  stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--draw));
}
.arc-key, .arc-bridge { position: absolute; transform: translate(-50%, -50%); text-align: center; }
.arc-key {
  display: grid; justify-items: center; gap: .15em;
  padding: .15em .6em; border-radius: var(--radius-pill); background: #3D3628; color: #F2B544;
  font-size: .72em; font-weight: 800;
}
.arc-key small { position: absolute; top: 100%; margin-top: .3em; color: #A8ADB7; font-size: .8em; font-weight: 600; }
.arc-key-1 { left: 13.33%; top: 22.5%; opacity: clamp(0, (var(--draw) - .02) * 10, 1); }
.arc-key-2 { left: 50%; top: 42.5%; opacity: clamp(0, (var(--draw) - .48) * 10, 1); }
.arc-key-3 { left: 86.67%; top: 70%; opacity: clamp(0, (var(--draw) - .94) * 10, 1); }
.arc-bridge { color: #F2B544; font-size: .66em; font-weight: 800; }
.arc-bridge-1 { left: 31.7%; top: 8%; opacity: clamp(0, (var(--t) - .62) * 9, 1); }
.arc-bridge-2 { left: 68.3%; top: 28%; opacity: clamp(0, (var(--t) - .7) * 9, 1); }
.songs { list-style: none; margin: 0; padding: 0; }
.song {
  --in: 1;
  display: grid; grid-template-columns: 2em minmax(0, 1fr) auto; gap: .7em; align-items: center;
  padding: .65em 0; border-bottom: 1px solid #2E333B;
  opacity: var(--in); transform: translateY(calc((1 - var(--in)) * 1.2em));
}
.song .num {
  display: grid; place-items: center; width: 2em; height: 2em; border-radius: .45em;
  background: #2B2620; color: #F4EFE6; font-size: .8em; font-weight: 800;
}
.song.moment .num { background: transparent; }
.song-words { display: grid; min-width: 0; }
.song-title { font-weight: 700; font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-meta { color: #A8ADB7; font-size: .72em; }
.moment .song-title { color: #A8ADB7; font-style: italic; font-weight: 400; }
.song .key { font-size: .74em; }
.team-note {
  justify-self: start; margin-top: .4em; padding: .2em .6em; border-left: 2px solid #B9A0F2;
  border-radius: 0 .4em .4em 0; background: #262136; color: #B9A0F2; font-size: .7em;
  opacity: clamp(0, (var(--t) - .82) * 9, 1);
}
.song:nth-child(1) { --in: clamp(0, (var(--t) - .04) * 8, 1); }
.song:nth-child(2) { --in: clamp(0, (var(--t) - .2) * 8, 1); }
.song:nth-child(3) { --in: clamp(0, (var(--t) - .36) * 8, 1); }
.song:nth-child(4) { --in: clamp(0, (var(--t) - .5) * 8, 1); }

/* Sharing the setlist: two quiet buttons at the foot of the screen. */
.share {
  position: absolute; left: 1.2em; right: 1.2em; bottom: 1.6em;
  display: grid; grid-template-columns: 1fr 1fr; gap: .5em;
  opacity: clamp(0, (var(--t) - .9) * 12, 1);
}
.share span { padding: .65em 0; border-radius: .9em; background: #242830; text-align: center; font-size: .76em; font-weight: 700; }

/* Saturday: one verse, three readers. --g: voice → guitar, --h: guitar → keys. */
.scr-song { --t: var(--p4, 1); --g: clamp(0, (var(--t) - .3) * 10, 1); --h: clamp(0, (var(--t) - .64) * 10, 1); }
.profiles {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr);
  margin-bottom: 1.1em; padding: .25em; border-radius: var(--radius-pill); background: #1B1E23;
}
.profiles span:not(.profile-lamp) { position: relative; padding: .45em 0; text-align: center; font-size: .78em; font-weight: 700; }
.profile-lamp {
  position: absolute; top: .25em; bottom: .25em; left: .25em; width: calc((100% - .5em) / 3);
  border-radius: var(--radius-pill); background: #3D3628; box-shadow: inset 0 0 0 1px #F2B544;
  transform: translateX(calc((var(--g) + var(--h)) * 100%));
}
.reads { display: grid; }
.reads > p { grid-area: 1 / 1; }
.read-voice { opacity: calc(1 - var(--g)); font-size: 1.2em; }
.read-voice .line { line-height: 1.7; padding-top: .7em; }
.read-guitar { opacity: calc(var(--g) * (1 - var(--h))); }
.read-keys { opacity: var(--h); }
.my-note {
  display: inline-block; margin-top: .5em; padding: .2em .65em; border-left: 2px solid #7FB2F0;
  border-radius: 0 .4em .4em 0; background: #1D2836; color: #7FB2F0; font-size: .72em;
  opacity: clamp(0, (var(--t) - .44) * 9, 1);
}

/* Under the verse, the song map: the verses as blocks, the one sung lit. */
.song-map { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35em; margin-top: 1em; }
.song-map span {
  padding: .5em 0; border: 2px solid transparent; border-radius: .6em; background: #1B1E23;
  color: #A8ADB7; text-align: center; font-size: .7em; font-weight: 700;
}
.song-map .is-now { border-color: #F2B544; color: #F2EEE6; box-shadow: var(--glow); }
.scr-song .section-card { font-size: .88em; }

/* The pads and the click, on, in one pill (ControlGroup). */
.tools {
  position: absolute; left: 1.2em; right: 1.2em; bottom: 1.6em;
  display: grid; grid-template-columns: 1fr 1fr; gap: .3em; padding: .3em;
  border-radius: var(--radius-pill); background: #1B1E23;
}
.tools span {
  padding: .55em 0; border-radius: var(--radius-pill); background: #3D3628; color: #F2B544;
  text-align: center; font-size: .78em; font-weight: 700;
}

/* Sunday: the leader's stage, live; verse 2 lights up (--v) everywhere. */
.scr-live { --t: var(--p5, 1); --v: clamp(0, (var(--t) - .66) * 10, 1); }
.scr-live .live-pill { margin-bottom: 1em; }
.scr-live .section-card + .section-card { margin-top: .8em; }
.verse-1 { --lit: calc(1 - var(--v)); }
.verse-2 { --lit: var(--v); }
.scr-live .section-card::after, .mini-verse::after {
  content: ""; position: absolute; inset: -2px; border: 2px solid #F2B544; border-radius: inherit;
  box-shadow: var(--glow); opacity: var(--lit);
}

/* With JavaScript: one device stays in view while the days scroll by. */
.week.is-scrolly .week-body { display: grid; grid-template-columns: minmax(0, 1fr); }
.week.is-scrolly .week-stage,
.week.is-scrolly .week-steps { grid-area: 1 / 1; }
.week.is-scrolly .day-shot { display: none; }
.week.is-scrolly .week-stage {
  /* --u: the device's em, as large as the stage allows. */
  --u: min(calc((100vw - 2.5rem) / 40), calc((58svh - 5.5rem) / 44), 16px);
  position: sticky; top: 4rem; z-index: 0; align-self: start;
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  height: 58svh; padding-top: .75rem;
}
.week.is-scrolly .week-steps { position: relative; z-index: 1; padding-top: 58svh; }
.week.is-scrolly .week-step { display: block; min-height: 100svh; padding: 0; border: 0; }
.week.is-scrolly .step-words {
  padding: 1.25rem; border-radius: var(--radius-section);
  background: color-mix(in srgb, var(--bg-alt) 96%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.week.is-scrolly .week-step:last-child { min-height: 70svh; }
@media (min-width: 62rem) {
  .week.is-scrolly .week-body { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); column-gap: 3rem; }
  .week.is-scrolly .week-stage {
    --u: min(calc((50vw - 6rem) / 40), calc((100svh - 11rem) / 44), 17px);
    grid-area: 1 / 1; height: calc(100svh - 4rem); justify-content: center; padding: 0;
  }
  .week.is-scrolly .week-steps { grid-area: 1 / 2; padding: 0; }
  .week.is-scrolly .week-step { display: flex; align-items: center; min-height: 100svh; }
  .week.is-scrolly .step-words { padding: 0; background: none; border: 0; }
  .week.is-scrolly .week-steps { padding-bottom: 50svh; }
}
/* Phones and narrow tablets: a larger device, cut at the foot, and under
   it a band where each day's words take their turn. */
@media (max-width: 61.99rem) {
  .week.is-scrolly .week-stage {
    --u: min(calc((100vw - 2.5rem) / 27), calc((62svh - 6rem) / 32), 13px);
    height: 62svh; overflow: clip;
    -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent);
  }
  .week.is-scrolly .week-steps { padding-top: 62svh; padding-bottom: 20svh; }
  .week.is-scrolly .week-step { min-height: 95svh; }
  .week.is-scrolly .step-words { position: sticky; top: calc(4rem + 62svh - 2.5rem); padding: 1rem 1.1rem; }
  .week.is-scrolly .week-step:not(.is-now) .step-words { opacity: 0; }
  .week.is-scrolly .step-words ul { display: none; }
  .week.is-scrolly .week-step h3 { font-size: var(--h3-item); margin-bottom: .4rem; }
  .week.is-scrolly .step-words > p { font-size: 1rem; line-height: 1.5; margin: 0; }
  .week.is-scrolly .day-name { margin-bottom: .6rem; min-height: 1.75rem; font-size: .85rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .week.is-scrolly .step-words { transition: opacity var(--medium) var(--ease); }
}
@media (min-width: 62rem) {
  .week.is-scrolly .week-step:not(.is-now) .step-words { opacity: .3; }
}
.week.is-scrolly .week-step.is-now .day-name { border-color: var(--accent-fg); color: var(--text); box-shadow: var(--glow); }

/* The days as a song map: the story's days in full, the current one lit
   like the section being sung, its line filling as the day goes by (--pa). */
.days {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem;
  width: min(100%, 26rem);
}
.days li {
  position: relative; display: grid; place-items: center; min-height: 2.4rem; overflow: hidden;
  border: 2px solid transparent; border-radius: var(--radius-m);
  background: var(--surface); color: var(--text-2); font-size: .8rem; opacity: .5;
  transition: border-color var(--medium) var(--ease), background-color var(--medium) var(--ease), opacity var(--medium) var(--ease);
}
.days li.has-story { opacity: 1; }
.days li.is-past { background: var(--surface-high); color: var(--text); }
.days li.is-now { border-color: var(--accent-fg); background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--glow); }
.days li.is-now::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent-fg);
  transform-origin: left; transform: scaleX(var(--pa, 0));
}

.week-devices {
  --f: clamp(0, (var(--p5, 0) - .06) * 3.2, 1);
  position: relative; flex: none; width: 40em; height: 44em; font-size: var(--u);
}
.week-devices .device.main {
  position: absolute; z-index: 2; left: 50%; top: 50%; margin: -21em 0 0 -10em;
  transform: translateY(calc(var(--f) * -3em)) scale(calc(1 - .2 * var(--f)));
}
.week-devices .screen-slot { position: absolute; inset: 0; }
.week-devices .scr { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.week-devices .scr.is-on { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: no-preference) {
  .week-devices .scr { transition: opacity var(--medium) var(--ease), visibility var(--medium); }
}
/* Sunday's three followers fly out from behind the leader's phone. */
.peer {
  position: absolute; z-index: 1; left: 50%; top: 50%; width: 11em; height: 21em; margin: -10.5em 0 0 -5.5em;
  padding: 2.2em .8em .8em; border: .35em solid #2E333B; border-radius: 1.8em; background: #121417; color: #F2EEE6;
  box-shadow: var(--shadow);
  opacity: var(--f);
  transform: translate(calc(var(--x) * var(--f)), calc(var(--y) * var(--f))) scale(calc(.55 + .35 * var(--f)));
}
.peer::before {
  content: ""; position: absolute; top: .55em; left: 50%; width: 3em; height: .9em; margin-left: -1.5em;
  border-radius: var(--radius-pill); background: #000;
}
.peer-1 { --x: -14em; --y: -1em; --lag: 0; }
.peer-2 { --x: 0em; --y: 16.5em; --lag: .03; z-index: 3; width: 18em; height: 11em; margin: -5.5em 0 0 -9em; padding-top: 1.1em; border-radius: 1.3em; }
.peer-2::before { content: none; }
.peer-3 { --x: 14em; --y: -1em; --lag: .06; }
.peer-name { display: flex; align-items: center; gap: .4em; margin-bottom: .6em; color: #4FC38A; font-size: .7em; font-weight: 700; white-space: nowrap; }
.peer-name::before { content: ""; flex: none; width: .55em; height: .55em; border-radius: 50%; background: #4FC38A; }
.mini-verse {
  --v: clamp(0, (var(--p5, 0) - .66 - var(--lag)) * 10, 1);
  position: relative; margin-top: .55em; padding: .5em .65em .65em; border-radius: .8em; background: #16191D;
}
.peer-2 .mini-verse { display: inline-block; width: calc(50% - .3em); vertical-align: top; }
.peer-2 .mini-verse + .mini-verse { margin-left: .5em; }
.mini-verse .label { color: #A8ADB7; font: 600 .62em var(--display); }
.mini-verse i { display: block; height: .38em; margin-top: .45em; border-radius: var(--radius-pill); background: #2E333B; }
.mini-verse i + i { width: 70%; }
.links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.links path {
  fill: none; stroke: #4FC38A; stroke-width: .35; stroke-linecap: round; opacity: .75;
  stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--l));
}
.link-1 { --l: clamp(0, (var(--p5, 0) - .3) * 5, 1); }
.link-2 { --l: clamp(0, (var(--p5, 0) - .34) * 5, 1); }
.link-3 { --l: clamp(0, (var(--p5, 0) - .38) * 5, 1); }

/* ---- One tap, and everyone turns the page ------------------------------------------ */
/* The leader's phone and three followers, all on verse [data-v]. Every
   device holds the three verses; one shows. Phones: the followers first,
   the leader's buttons under them, so a tap and its effect share the
   screen. Wide screens: the leader on the left. */
.sync { display: grid; gap: 1.25rem; font-size: 16px; }
.leader, .f {
  position: relative; background: #121417; color: #F2EEE6;
  border: .4em solid #2E333B; box-shadow: var(--shadow);
}
.leader { justify-self: center; width: min(23em, 100%); padding: 2.6em 1.2em 1.2em; border-radius: 2.6em; }
.leader::before, .f-voice::before {
  content: ""; position: absolute; top: .65em; left: 50%; width: 5.4em; height: 1.4em;
  margin-left: -2.7em; border-radius: var(--radius-pill); background: #000;
}
.leader .live-pill { margin-bottom: 1em; }
.leader .section-card { font-size: .9em; }
.sync .song-map { grid-template-columns: repeat(3, 1fr); }
.sync .song-map span { font-size: .8em; }
.sync[data-v="1"] .map-1, .sync[data-v="2"] .map-2, .sync[data-v="3"] .map-3 {
  border-color: #F2B544; color: #F2EEE6; box-shadow: var(--glow);
}
.lead-controls { display: grid; grid-template-columns: 1fr 1.6fr; gap: .5em; margin-top: 1.1em; }
.lead-controls[hidden] { display: none; }
.lead-controls button {
  min-height: 48px; border: 0; border-radius: var(--radius-m);
  font: 700 1rem/1.2 var(--body); cursor: pointer;
  transition: background-color var(--short) var(--ease), transform var(--short) var(--ease);
}
.lead-controls button:active { transform: scale(.97); }
.lead-controls [data-step="1"] { background: #F2B544; color: #121417; }
.lead-controls [data-step="1"]:hover { background: #F7CD7A; }
.lead-controls [data-step="-1"] { background: rgba(255, 255, 255, .1); color: #F2EEE6; }
.lead-controls [data-step="-1"]:hover { background: rgba(255, 255, 255, .16); }
.lead-controls [aria-disabled="true"] { opacity: .4; cursor: default; }
/* Until the first press: what to do, under the buttons. */
.sync-hint { grid-column: 1 / -1; margin: .2em 0 0; color: #A8ADB7; font-size: .85em; text-align: center; }
.sync.is-tried .sync-hint { display: none; }
.sync-next { margin-top: 2rem; }
.sync :focus-visible { outline-color: #F2B544; }

.followers { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.f { padding: 1em; }
.f .peer-name { margin: 0 0 .7em; }
/* The room's screen: a TV, words only, white on black. */
.f-screen { grid-column: 1 / -1; border-color: #000; border-width: 10px; border-radius: var(--radius-board); background: #000; outline: 1px solid var(--border); }
.f-words { display: grid; place-items: center; aspect-ratio: 16 / 7; text-align: center; }
.f-words .vv { margin: 0; font: 600 clamp(1rem, 2.4vw, 1.45rem)/1.4 var(--display); color: #fff; text-wrap: balance; }
.f-tab { border-radius: 1.5em; }
/* The tablet keeps each chord line on one row, as the app does when it fits. */
.f-tab .lyrics { font-size: .86em; }
.f-voice { padding-top: 2.4em; border-radius: 2em; }
.f .label { color: #A8ADB7; font: 600 .8em var(--display); margin-bottom: .2em; }
.f .lyrics { margin: 0; font-size: .92em; }
.f-voice .line { line-height: 1.5; font-size: 1.05em; }
.vv { display: none; }
.sync[data-v="1"] .vv-1, .sync[data-v="2"] .vv-2, .sync[data-v="3"] .vv-3 { display: block; }
@media (max-width: 61.99rem) {
  .followers { order: -1; }
}
@media (max-width: 30rem) {
  .sync { font-size: 15px; }
  .followers { grid-template-columns: 1fr; }
  .f-voice { display: none; }
}
@media (min-width: 62rem) {
  /* A fixed column: a longer verse never widens the phone under the tap. */
  .sync { grid-template-columns: 23em minmax(0, 1fr); gap: 3rem; align-items: start; }
}
/* A tap: the command reaches the followers a beat after the leader, one
   after the other, and their live dot answers. Only after a tap
   (.is-moving, home.js): on load everything stands still. */
@media (prefers-reduced-motion: no-preference) {
  .sync.is-moving .vv { animation: verse-in 320ms var(--ease) both; }
  .sync.is-moving .f-screen .vv { animation-delay: 60ms; }
  .sync.is-moving .f-tab .vv { animation-delay: 110ms; }
  .sync.is-moving .f-voice .vv { animation-delay: 160ms; }
  .sync.is-moving .peer-name::before { animation: ping 700ms var(--ease) both; }
  .sync.is-moving .f-tab .peer-name::before { animation-delay: 50ms; }
  .sync.is-moving .f-voice .peer-name::before { animation-delay: 100ms; }
  /* Once, when the demo first comes into view: «Avanti» lights twice. */
  .sync.is-inviting [data-step="1"] { animation: invite 280ms var(--ease) 4 alternate; }
}
@keyframes invite { to { box-shadow: 0 0 0 .35em rgba(242, 181, 68, .35), var(--glow); } }
@keyframes verse-in { from { opacity: 0; transform: translateY(.45em); } }
@keyframes ping {
  from { box-shadow: 0 0 0 0 rgba(79, 195, 138, .7); }
  to { box-shadow: 0 0 0 .8em rgba(79, 195, 138, 0); }
}

/* ---- Sections: each named like a part of a song --------------------------------- */
.band { padding: 4.5rem 0; }
.band:nth-of-type(even) { background: var(--bg-alt); }
.grid { display: grid; gap: .5rem 3rem; align-items: start; }
@media (min-width: 58rem) {
  .grid { grid-template-columns: 9rem 1fr; }
  .indent { margin-left: 12rem; }
}
.part {
  margin: .55rem 0 0;
  font: 600 1rem var(--display); color: var(--text-2);
  display: flex; align-items: center; gap: .6rem;
}
.part::before { content: ""; width: 1.5rem; height: 2px; background: currentColor; opacity: .6; }
.band h2 { font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.08; letter-spacing: -.015em; margin-bottom: 1rem; }
.intro { color: var(--text-2); font-size: 1.15rem; max-width: 40rem; margin-bottom: 2.5rem; }

/* The name */
.name blockquote {
  margin: 0 0 1rem; max-width: 50rem;
  font: 500 clamp(1.55rem, 3.9vw, 2.4rem)/1.28 var(--display); letter-spacing: -.01em;
}
.name .cite { color: var(--text-2); margin-bottom: 1.75rem; }
.name .body { color: var(--text-2); font-size: 1.1rem; max-width: 40rem; margin: 0; }

/* The manifesto: short lines, like verses */
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.25rem 3rem; }
@media (min-width: 46rem) { .principles { grid-template-columns: 1fr 1fr; } }
.principles h3 { font-size: var(--h3-item); line-height: 1.2; margin-bottom: .45rem; }
.principles p { color: var(--text-2); margin: 0; max-width: 32rem; }

/* Features: words beside the real screens */
.feature { display: grid; gap: 2rem; align-items: center; padding: 3rem 0; }
.feature + .feature { border-top: 1px solid var(--border); }
.feature h3 { font-size: var(--h3-chapter); line-height: 1.12; margin-bottom: .75rem; }
.feature p { color: var(--text-2); font-size: 1.1rem; }
.feature ul { margin: 0; padding-left: 1.15rem; color: var(--text-2); }
.feature li { margin: .35rem 0; }
.phone {
  width: min(16.5rem, 76%); justify-self: center;
  border: 6px solid #2E333B; border-radius: var(--radius-device); background: #121417;
  overflow: hidden; box-shadow: var(--shadow);
}
.tablet {
  width: 100%; border: 6px solid #2E333B; border-radius: var(--radius-tablet);
  background: #121417; overflow: hidden; box-shadow: var(--shadow);
}
@media (min-width: 52rem) {
  .feature { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .feature.flip .copy { order: 2; }
  .feature.wide { grid-template-columns: 1fr; gap: 2rem; }
  .feature.wide .copy { max-width: 40rem; }
}

figure { margin: 0; }
figcaption { color: var(--text-2); font-size: .95rem; margin-top: 1rem; }

/* From paper: a photocopied hymnal page, chords pencilled in, becomes the
   verse in the app. The steps are a real sequence, so they are numbered,
   on dark tiles like the hymn numbers. */
.paper-body { display: grid; gap: 3.5rem; align-items: center; }
@media (min-width: 66rem) { .paper-body { grid-template-columns: 1.05fr 1fr; } }
.from-paper .intro { margin-bottom: 1.75rem; }
.paper-steps { list-style: none; counter-reset: step; margin: 0 0 1.75rem; padding: 0; display: grid; gap: 1.25rem; }
.paper-steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 1rem; }
.paper-steps li::before {
  content: counter(step); grid-row: span 2; display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem; border-radius: var(--radius-s);
  background: var(--surface-high); color: var(--text); font: 600 1.05rem var(--display);
}
.paper-steps h3 { font-size: var(--h3-item); margin: .35rem 0 .25rem; }
.paper-steps p { margin: 0; color: var(--text-2); max-width: 34rem; }
.from-paper .fine { max-width: 36rem; }
.from-paper .fine a { color: var(--text); }

/* The drawing: the page is printed paper (a book face, pencil chords), the
   card is the app. Both are drawn from the same ChordPro lines. */
.convert { position: relative; padding-top: .5rem; }
.paper {
  position: relative; overflow: hidden;
  width: min(20rem, 86%); padding: 1.1rem 1.3rem 1.4rem;
  background: #FBF8F1; color: #2B2A27; border-radius: var(--radius-board);
  transform: rotate(-3.5deg); box-shadow: var(--shadow);
  font: .9rem/1 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
.paper p { margin: 0; }
.paper .paper-head { margin-bottom: 1.5rem; font-size: .82em; color: #57534B; }
.paper-head b { margin-right: .45em; }
.paper .line { line-height: 2.55; }
.paper .next { margin-top: .7em; }
.paper .chord {
  bottom: 1.2em; transform: rotate(-4deg); transform-origin: left bottom;
  font: italic 700 .88em/1 var(--body); color: #4A4F57;
}
.stage.mini {
  position: relative; width: min(21rem, 90%); margin: -3.25rem 0 0 auto; padding: .8rem;
  font-size: .92rem; border-radius: var(--radius-device);
}
/* home.js: once in view, a scanner's light crosses the page, then the card
   comes up and lights. Without JavaScript or with reduced motion it is
   simply lit. */
.paper::after {
  content: ""; position: absolute; left: 0; right: 0; top: -3rem; height: 3rem;
  pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, rgba(168, 173, 183, 0), rgba(168, 173, 183, .35));
  border-bottom: 2px solid rgba(87, 83, 75, .55);
}
@media (prefers-reduced-motion: no-preference) {
  .convert .stage.mini, .convert .section-card {
    transition: opacity var(--medium) var(--ease), transform var(--medium) var(--ease),
      border-color var(--medium) var(--ease), box-shadow var(--medium) var(--ease);
  }
  .convert.is-waiting .stage.mini { opacity: 0; transform: translateY(1rem); }
  .convert.is-waiting .section-card.lit { border-color: transparent; box-shadow: none; }
  .convert.is-scanning .paper::after { animation: scan 1.5s var(--ease) both; }
  .convert.is-scanning .stage.mini { transition-delay: 1.2s; }
  .convert.is-scanning .section-card { transition-delay: 1.6s; }
}
@keyframes scan {
  0% { top: -3rem; opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* The screen for the room: the hall's screen at the back, the control desk
   in front of it, both on the same verse. The screen is a TV (black bezel,
   nearly square corners), not a device; its caption carries the live green,
   the colour of what is on air. */
.room { display: grid; margin-bottom: 3rem; }
/* The screen's caption above it: below, the tablet covers it. */
.room-screen { width: 82%; justify-self: end; display: flex; flex-direction: column; }
.room-screen figcaption { order: -1; margin: 0 0 .75rem; }
/* On a phone the tablet takes the whole width, just touching the screen. */
.room-desk { width: 100%; margin-top: -2%; position: relative; }
.hall {
  display: block; width: 100%; height: auto;
  border: 10px solid #000; border-radius: var(--radius-board);
  outline: 1px solid var(--border); box-shadow: var(--shadow);
}
.room .tablet { display: block; height: auto; }
.room figcaption { display: flex; align-items: center; gap: .55rem; margin-top: .75rem; }
.room-screen figcaption { justify-content: flex-end; }
.on-air {
  flex: none; width: .6rem; height: .6rem; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 0 .3rem var(--live-soft);
}
@media (min-width: 52rem) {
  .room-screen { width: 64%; }
  /* The tablet tucks under the screen's words, never over them. */
  .room-desk { width: 70%; margin-top: -4%; }
}
.ways { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 1.75rem 3rem; }
@media (min-width: 52rem) { .ways { grid-template-columns: repeat(3, 1fr); } }
.ways h3 { font-size: var(--h3-item); line-height: 1.2; margin-bottom: .45rem; }
.ways p { margin: 0; color: var(--text-2); max-width: 32rem; }
.in-room .fine { max-width: 40rem; }
.in-room .fine a { color: var(--text); }

/* Free for good (#476): a list with dividers; only the live is green. */
.free-list { list-style: none; margin: 0 0 2rem; padding: 0; max-width: 52rem; }
.free-list li { padding: 1.1rem 0; border-top: 1px solid var(--border); }
.free-list li:last-child { border-bottom: 1px solid var(--border); }
.free-list h3 { font-size: var(--h3-item); line-height: 1.25; margin-bottom: .3rem; }
.free-list p { margin: 0; color: var(--text-2); max-width: 36rem; }
.free-list li:first-child h3 { display: flex; align-items: center; gap: .65rem; color: var(--live); }
.free-list li:first-child h3::before {
  content: ""; flex: none; width: .6rem; height: .6rem; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 0 .3rem var(--live-soft);
}
@media (min-width: 52rem) {
  .free-list li { display: grid; grid-template-columns: 17rem 1fr; gap: 2rem; align-items: baseline; }
  .free-list h3 { margin: 0; }
}
.free .fine { max-width: 40rem; }

/* Try it */
.choices { display: grid; gap: 1rem; }
@media (min-width: 46rem) { .choices { grid-template-columns: 1fr 1fr; } }
.choice {
  display: flex; flex-direction: column; padding: 1.75rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-section);
}
.choice h3 { font-size: var(--h3-item); margin-bottom: .5rem; }
.choice p { color: var(--text-2); flex: 1; margin-bottom: 1.25rem; }
.choice .button { align-self: flex-start; }

/* Footer */
.foot { padding: 3rem 0 4rem; border-top: 1px solid var(--border); color: var(--text-2); font-size: .95rem; }
.foot .wrap { display: grid; gap: 1.25rem; }
.foot .brand { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; column-gap: 1.5rem; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; }
.foot a { color: var(--text-2); }
.foot a:hover { color: var(--text); }
.foot p { margin: 0; }

/* The language chooser at chenaniah.app/ (shown only without JavaScript) */
.chooser main {
  min-height: 100vh; display: grid; place-content: center; justify-items: center;
  gap: 1rem; padding: 2rem; text-align: center;
}
.chooser h1 { font-size: 2.2rem; }
.chooser ul { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ---- Text pages: the guide, privacy, account deletion ------------------------ */
.doc { padding: 3rem 0 5rem; }
.narrow { max-width: 50rem; }
.doc h1 { font-size: clamp(2.2rem, 5.5vw, 3.2rem); line-height: 1.08; letter-spacing: -.015em; margin-bottom: 1rem; }
.doc .lead { font-size: 1.2rem; color: var(--text-2); max-width: 38rem; margin-bottom: 2rem; }
.crumb { margin-bottom: 1.5rem; }
.crumb a { color: var(--text-2); text-decoration: none; }
.crumb a:hover { color: var(--text); text-decoration: underline; }
.questions { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.questions li { border-bottom: 1px solid var(--border); }
.questions a {
  display: grid; gap: .25rem; padding: 1.25rem .25rem; text-decoration: none;
}
.questions .q { font: 600 1.35rem/1.25 var(--display); color: var(--text); }
.questions .a { color: var(--text-2); }
.questions a:hover .q { color: var(--accent-fg); }
.shot { margin: 0 0 2rem; width: min(17rem, 100%); }
.shot img { width: 100%; border: 6px solid #2E333B; border-radius: var(--radius-device); box-shadow: var(--shadow); }
@media (min-width: 52rem) {
  .shot { float: right; margin: .25rem 0 1.5rem 2.5rem; }
}
/* A guide's clip: real screens of the app, one per step
   (tool/site_screenshots.dart), with every step's caption always in view.
   Without JavaScript the screens sit side by side, numbered like the steps. */
.clip .screens {
  display: grid; grid-auto-flow: column; grid-auto-columns: 85%; gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; counter-reset: screen;
}
.clip .screen { position: relative; scroll-snap-align: start; }
.clip .screen::after {
  counter-increment: screen; content: counter(screen);
  position: absolute; top: .9rem; left: .9rem;
}
.clip .captions { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .15rem; }
.clip .captions li,
.clip .captions button { display: flex; gap: .6rem; align-items: baseline; color: var(--text-2); font-size: .95rem; }
.clip .captions li { padding: .35rem .25rem; }
.clip .num,
.clip .screen::after {
  flex: none; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-fg); font-weight: 700; font-size: .85rem;
}
/* With JavaScript (assets/clip.js): one screen at a time. The captions are
   buttons, the current one marked; once in view the clip goes through the
   steps once, the line under the current caption showing the time left,
   and stops while the pointer or the focus is on it. A tap takes over. */
.clip.is-stepper .screens { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; cursor: pointer; }
.clip.is-stepper .screen { grid-area: 1 / 1; opacity: 0; transition: opacity var(--medium) var(--ease); }
.clip.is-stepper .screen.is-current { opacity: 1; }
.clip.is-stepper .screen::after { content: none; }
.clip.is-stepper .captions li { padding: 0; }
.clip .captions button {
  position: relative; width: 100%; min-height: 44px; padding: .55rem .5rem .65rem;
  border: 0; border-radius: var(--radius-m); background: none;
  font: inherit; text-align: left; cursor: pointer;
  transition: background-color var(--short) var(--ease), color var(--short) var(--ease);
}
.clip .captions button:hover { background: var(--surface-high); color: var(--text); }
.clip .captions button .num { background: var(--surface-high); color: var(--text-2); transition: background-color var(--short) var(--ease), color var(--short) var(--ease); }
.clip .captions button[aria-current] { color: var(--text); }
.clip .captions button[aria-current] .num { background: var(--accent-soft); color: var(--accent-fg); }
.clip.is-playing .captions button[aria-current]::after {
  content: ""; position: absolute; left: 2.7rem; right: .5rem; bottom: .3rem; height: 2px;
  border-radius: var(--radius-pill); background: var(--text-2); opacity: .55;
  transform-origin: left; animation: clip-time 6.5s linear both;
}
.clip.is-playing:hover .captions button::after,
.clip.is-playing:focus-within .captions button::after,
.clip.is-playing.is-away .captions button::after { animation-play-state: paused; }
@keyframes clip-time { from { transform: scaleX(0); } }
.prose { max-width: 38rem; }
.prose h2 { font-size: 1.45rem; margin: 2.25rem 0 .6rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-2); }
.prose b, .prose strong { color: var(--text); font-weight: 700; }
.prose ol, .prose ul { padding-left: 1.3rem; margin: 0 0 1rem; }
.prose li { margin: .45rem 0; }
.prose li::marker { color: var(--text-2); font-weight: 700; }
.more { clear: both; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.more ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.more a {
  display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .9rem;
  border-radius: var(--radius-m); background: var(--surface-high); color: var(--text); text-decoration: none; font-size: .95rem;
}
.more a:hover { background: var(--border); }
.nav a[aria-current="page"] { color: var(--text); }

/* Legal pages keep the three languages on one address (the stores link it). */
.legal section + section { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--border); }
.legal h2 { font-size: 1.4rem; margin: 2.25rem 0 .6rem; }
.legal h3 { font-size: 1.15rem; margin: 1.5rem 0 .4rem; }
.legal p, .legal li { color: var(--text-2); }
.legal strong { color: var(--text); }
.legal ul { padding-left: 1.3rem; }
.legal li { margin: .35rem 0; }
.legal .updated { color: var(--text-2); font-size: .95rem; }
.legal .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-section); padding: 1.25rem 1.5rem; margin: 1.25rem 0; }
.legal .button { color: var(--on-accent); background: var(--accent); }
.chooser p { margin: 0; color: var(--text-2); }

/* ---- The invite page (site/join, #588): the code is the page ----------------- */
.join main { max-width: 34rem; }
.join-code { display: grid; justify-items: center; gap: .75rem; }
.chooser .invite-code {
  font-family: var(--display); font-weight: 600; color: var(--text);
  font-size: clamp(2.6rem, 12vw, 4rem); letter-spacing: .12em; line-height: 1.1;
  overflow-wrap: anywhere; user-select: all;
}
.join .copied { min-height: 1.5em; }

/* ---- The month on a tablet: the app's «Squadre» grid ------------------------------ */
/* People on the rows, Sundays on the columns. --pm (0 → 1 as it comes into
   view, set by assets/home.js) stands the tablet up, fills the columns from
   left to right and, last, lets Marco cover Giulia's place (--cv). Without
   JavaScript or with reduced motion it shows the end. */
.month { padding-top: 2rem; }
.month-words { max-width: 40rem; margin-bottom: 2.5rem; }
.month-words h3 { font-size: var(--h3-chapter); line-height: 1.1; margin-bottom: .8rem; }
.month-words p { color: var(--text-2); font-size: 1.1rem; margin: 0; }
@media (min-width: 58rem) { .month-words { margin-left: 12rem; } }
/* Phones: the grid keeps a readable size and pans sideways, as in the app. */
.month-frame {
  margin: 0 calc(-1 * var(--gutter)); padding: 1rem var(--gutter) 2rem;
  overflow-x: auto; perspective: 1800px;
}
.tablet-draw {
  --tilt: clamp(0, var(--pm, 1) * 1.8, 1);
  --cv: clamp(0, (var(--pm, 1) - .8) * 10, 1);
  width: 64em; margin: 0 auto; padding: 1.6em 1.8em 1.8em; font-size: 11px;
  border: .5em solid #2E333B; border-radius: 2em; background: #121417; color: #F2EEE6;
  box-shadow: var(--shadow);
  transform-origin: 50% 100%;
  transform: rotateX(calc((1 - var(--tilt)) * 26deg)) scale(calc(.92 + .08 * var(--tilt)));
}
@media (min-width: 48rem) {
  .month-frame { overflow: visible; }
  .tablet-draw { font-size: min(15px, calc((100vw - 2 * var(--gutter) - 2rem) / 64)); }
}
.icons { display: none; }
.tab-bar { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-bottom: 1.2em; }
.tab-month { display: flex; align-items: center; gap: .8em; }
.tab-month b { font-size: .95em; }
.chev { display: grid; place-items: center; width: 2em; height: 2em; border-radius: 50%; background: #1B1E23; color: #A8ADB7; }
.grid-month { display: grid; grid-template-columns: 9.5em repeat(5, minmax(0, 1fr)); border-top: 1px solid #2E333B; }
.grid-month > div { min-height: 3.7em; padding: .55em .75em; border-bottom: 1px solid #2E333B; }
/* Panning sideways, the names stay, as in a spreadsheet. */
.gp, .gcorner { position: sticky; left: 0; z-index: 1; background: #121417; }
.gh, .gc { border-left: 1px solid #2E333B; }
.gh { display: grid; align-content: start; justify-items: start; gap: .2em; }
.date { display: inline-grid; justify-items: center; min-width: 2.7em; padding: .25em .4em; border-radius: .55em; background: #242830; line-height: 1.1; }
.date small { color: #F2B544; font-size: .62em; font-weight: 700; }
.date b { font-size: 1.1em; }
.gh-title { font-size: .8em; font-weight: 700; }
.gh-st { display: grid; color: #A8ADB7; font-size: .72em; }
.gh-st span { grid-area: 1 / 1; }
.gh-missing { color: #F28C6B; opacity: calc(1 - var(--cv)); }
.gh-covered { opacity: var(--cv); }
.gh-prepare { padding: .35em .85em; border: 1px solid #3A404A; border-radius: .65em; font-size: .74em; font-weight: 700; }
.gp { display: grid; align-content: start; min-width: 0; }
.gp b { font-size: .92em; }
.gp span { color: #A8ADB7; font-size: .7em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-open b { color: #A8ADB7; font-weight: 600; }
.gc { display: grid; align-content: start; justify-items: start; gap: .2em; }
.gc-pos { font-size: .82em; }
.gc-st { display: inline-flex; align-items: center; gap: .3em; color: #A8ADB7; font-size: .7em; }
.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gc-open .gc-pos { color: #F28C6B; font-weight: 700; }
.gc-cover { background: rgba(27, 30, 35, var(--cv)); box-shadow: inset 0 0 0 2px rgba(242, 181, 68, calc(.6 * var(--cv))); }
.grid-month .c1 { --in: clamp(0, (var(--pm, 1) - .3) * 7, 1); }
.grid-month .c2 { --in: clamp(0, (var(--pm, 1) - .37) * 7, 1); }
.grid-month .c3 { --in: clamp(0, (var(--pm, 1) - .44) * 7, 1); }
.grid-month .c4 { --in: clamp(0, (var(--pm, 1) - .51) * 7, 1); }
.grid-month .c5 { --in: clamp(0, (var(--pm, 1) - .58) * 7, 1); }
.gh > *, .gc > * { opacity: var(--in, 1); transform: translateY(calc((1 - var(--in, 1)) * .6em)); }
.grid-month .gc-open > * { opacity: calc(var(--in, 1) * (1 - var(--cv))); }
.grid-month .gc-cover > * { opacity: calc(var(--in, 1) * var(--cv)); }
