/* ==========================================================================
   NoteFlow landing, final: one continuous film

   The hero surrounds you with seven grey apps at three depths; they gather
   and fold into one NoteFlow window as you scroll, counted down from seven
   to one. Then one graphite stage in two movements (the old way against
   NoteFlow, and twenty-five minutes of focus) that comes to rest on the
   "Up next" pill, then the camera goes inside the app for a week, ending
   on a challenge you can play and back out to a window on the page,
   pricing, privacy and questions each composed to the screen, and a
   full-screen close about where studying is going. Ink on warm paper, one
   violet swipe per screen, the red pen for results only.

   Motion: .live is stamped on the root (by boot.js, before the first paint;
   main.js is the film) when motion is allowed.
   Everything hidden or moved lives under .live, so without scripting, or
   with reduced motion, every element stands at rest in its final state.
   ========================================================================== */

/* ---- tokens ---------------------------------------------------------------- */

:root {
  color-scheme: light;
  --paper: #F3F1EC;
  --sheet: #FFFEFB;
  --wash: #F4F2EC;
  --wash-2: #EDEAE3;
  --rail: #F3F1EC;
  --rail-on: #EAE7E0;
  --ink: #161615;
  --ink-2: #55534D;
  --ink-3: #67645D;
  --ink-4: #A9A59C;
  --on-ink: #FBFAF7;
  --rule: #ECE9E2;
  --rule-2: #DEDAD1;
  --rule-ink: #161615;
  --violet: #4F2A7F;
  --hl: #D6C2FF;
  --hl-ink: #161615;
  --hl-blend: multiply;
  --pen: #D23A2C;
  /* The ground of the one inverted stage, for the section that holds it. */
  --stage: #151514;
  /* v2: depth from height. One light, from above; every shadow is the
     shadow colour at a strength (--shade-k is 1 on paper, 2.8 on graphite). */
  --shade: 22 22 21; --shade-k: 1;
  --key-edge: #000000;
  --shadow-1: 0 1px 2px -2px rgb(var(--shade) / calc(0.07 * var(--shade-k))), 0 1px 2px rgb(var(--shade) / calc(0.04 * var(--shade-k)));
  --shadow-2: 0 10px 22px -8px rgb(var(--shade) / calc(0.13 * var(--shade-k))), 0 2.5px 5px rgb(var(--shade) / calc(0.055 * var(--shade-k)));
  --shadow-3: 0 15px 34px -12px rgb(var(--shade) / calc(0.166 * var(--shade-k))), 0 3.5px 7px rgb(var(--shade) / calc(0.064 * var(--shade-k)));
  /* The dialog shadow's two colours, for a window drawn at another scale. */
  --sh-a: rgba(22, 22, 21, 0.07); --sh-b: rgba(22, 22, 21, 0.22);
  /* Behind the app's drawer on a phone. */
  --scrim: rgba(22, 22, 21, 0.28);
  /* The one hero sheet: a hairline and the dialog shadow, never more. */
  --shadow-win: 0 0 0 1px var(--rule-2), var(--shadow-3);
  --tag-bio-bg: #E3EDDC; --tag-bio-fg: #305A2D;
  --tag-chem-bg: #DDE8F2; --tag-chem-fg: #1F4A6B;
  --tag-maths-bg: #F6E6D3; --tag-maths-fg: #6E3E14;
  --tag-eng-bg: #F5E1E7; --tag-eng-fg: #712C47;
  --tag-lang-bg: #F3EDCC; --tag-lang-fg: #625010;
}

/* The other apps' grey. The apps a student already has open (the hero and
   the fold) are drawn in one flat neutral grey, the same on every paper:
   surface, bar, fills, rules and text come from this set alone, so no
   paper tints them and no light falls on them, and the NoteFlow window is
   the only thing beside them in the paper's colour and in ink. The values
   are the design system's neutral greys, one step darker than Adaptive's
   stock, which the page stands on (in that same grey an app sank into
   the page): its inks are as they were. No paper restates these. */
:root {
  /* (Founder, 13 Nov: "I don't like the grey boxes". The other apps are now
     loose white sheets on the desk, v2's sheet and its inks a step quieter
     than the page's, with a shadow from their height; the set keeps its
     names.) */
  --ow-sheet: #FFFEFB;
  --ow-wash: #F6F4EF;
  --ow-wash-2: #ECE9E2;
  --ow-rule: #ECE9E2;
  --ow-rule-2: #DEDAD1;
  --ow-ink: #3A3833;
  --ow-ink-2: #67645D;
  --ow-ink-3: #A9A59C;
  /* Lighter than a menu's, and far lighter than the NoteFlow window's;
     and, folded in a phone's pile, a hairline's worth. */
  --ow-shadow: 0 1px 2px rgba(22, 22, 21, 0.06), 0 10px 24px -12px rgba(22, 22, 21, 0.2);
  --ow-shadow-1: 0 1px 0 rgba(20, 20, 20, 0.04);
}

/* The graphite stage: the dark set on a paper page. */
.invert {
  color-scheme: dark;
  --paper: #151514;
  --sheet: #1F1E1C;
  --wash: #252422;
  --wash-2: #2C2B29;
  --rail: #151514;
  --rail-on: #2A2927;
  --ink: #EDEBE5;
  --ink-2: #B5B1A8;
  --ink-3: #8E8A82;
  --ink-4: #5F5C56;
  --on-ink: #191918;
  --rule: #2A2927;
  --rule-2: #3A3936;
  --rule-ink: #EDEBE5;
  --violet: #C2A8F5;
  --hl: #4A3778;
  --hl-ink: #F4F0FF;
  --hl-blend: normal;
  --pen: #F2735F;
  --shade: 0 0 0; --shade-k: 2.8;
  --key-edge: #8E8A82;
  --shadow-1: 0 1px 2px -2px rgb(var(--shade) / calc(0.07 * var(--shade-k))), 0 1px 2px rgb(var(--shade) / calc(0.04 * var(--shade-k)));
  --shadow-2: 0 10px 22px -8px rgb(var(--shade) / calc(0.13 * var(--shade-k))), 0 2.5px 5px rgb(var(--shade) / calc(0.055 * var(--shade-k)));
  --shadow-3: 0 15px 34px -12px rgb(var(--shade) / calc(0.166 * var(--shade-k))), 0 3.5px 7px rgb(var(--shade) / calc(0.064 * var(--shade-k)));
  --tag-bio-bg: #232F22; --tag-bio-fg: #A6CD9A;
  --tag-chem-bg: #1D2A36; --tag-chem-fg: #9AC1E0;
  --tag-maths-bg: #35291C; --tag-maths-fg: #E4B78C;
  --tag-eng-bg: #35232A; --tag-eng-fg: #E6A8BE;
  --tag-lang-bg: #322D1A; --tag-lang-fg: #DCC774;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #151514; --sheet: #1F1E1C; --wash: #252422; --wash-2: #2C2B29;
    --rail: #151514; --rail-on: #2A2927;
    --ink: #EDEBE5; --ink-2: #B5B1A8; --ink-3: #8E8A82; --ink-4: #5F5C56; --on-ink: #191918;
    --rule: #2A2927; --rule-2: #3A3936; --rule-ink: #EDEBE5;
    --violet: #C2A8F5; --hl: #4A3778; --hl-ink: #F4F0FF; --hl-blend: normal; --pen: #F2735F;
    --stage: #F3F1EC;
    --sh-a: rgba(0, 0, 0, 0.35); --sh-b: rgba(0, 0, 0, 0.7); --scrim: rgba(0, 0, 0, 0.55);
    --shade: 0 0 0; --shade-k: 2.8; --key-edge: #8E8A82;
    --shadow-1: 0 1px 2px -2px rgb(var(--shade) / calc(0.07 * var(--shade-k))), 0 1px 2px rgb(var(--shade) / calc(0.04 * var(--shade-k)));
    --shadow-2: 0 10px 22px -8px rgb(var(--shade) / calc(0.13 * var(--shade-k))), 0 2.5px 5px rgb(var(--shade) / calc(0.055 * var(--shade-k)));
    --shadow-3: 0 15px 34px -12px rgb(var(--shade) / calc(0.166 * var(--shade-k))), 0 3.5px 7px rgb(var(--shade) / calc(0.064 * var(--shade-k)));
    --tag-bio-bg: #232F22; --tag-bio-fg: #A6CD9A;
    --tag-chem-bg: #1D2A36; --tag-chem-fg: #9AC1E0;
    --tag-maths-bg: #35291C; --tag-maths-fg: #E4B78C;
    --tag-eng-bg: #35232A; --tag-eng-fg: #E6A8BE;
    --tag-lang-bg: #322D1A; --tag-lang-fg: #DCC774;
    /* The other apps' grey, on graphite (the same neutral stock, dark). */
    --ow-sheet: #171717; --ow-wash: #1E1E1E; --ow-wash-2: #252525;
    --ow-rule: #202020; --ow-rule-2: #353535;
    --ow-ink: #C8C8C8; --ow-ink-2: #ADADAD; --ow-ink-3: #5E5E5E;
    --ow-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px -12px rgba(0, 0, 0, 0.5);
    --ow-shadow-1: 0 1px 0 rgba(0, 0, 0, 0.25);
  }
  /* On a graphite page the one inverted stage is paper. */
  :root:not([data-theme="light"]) .invert {
    color-scheme: light;
    --paper: #F3F1EC; --sheet: #FFFEFB; --wash: #F4F2EC; --wash-2: #EDEAE3;
    --rail: #F3F1EC; --rail-on: #EAE7E0;
    --ink: #161615; --ink-2: #55534D; --ink-3: #67645D; --ink-4: #A9A59C; --on-ink: #FBFAF7;
    --rule: #ECE9E2; --rule-2: #DEDAD1; --rule-ink: #161615;
    --violet: #4F2A7F; --hl: #D6C2FF; --hl-ink: #161615; --hl-blend: multiply; --pen: #D23A2C;
    --shade: 22 22 21; --shade-k: 1; --key-edge: #000000;
    --shadow-1: 0 1px 2px -2px rgb(var(--shade) / calc(0.07 * var(--shade-k))), 0 1px 2px rgb(var(--shade) / calc(0.04 * var(--shade-k)));
    --shadow-2: 0 10px 22px -8px rgb(var(--shade) / calc(0.13 * var(--shade-k))), 0 2.5px 5px rgb(var(--shade) / calc(0.055 * var(--shade-k)));
    --shadow-3: 0 15px 34px -12px rgb(var(--shade) / calc(0.166 * var(--shade-k))), 0 3.5px 7px rgb(var(--shade) / calc(0.064 * var(--shade-k)));
    --tag-bio-bg: #E3EDDC; --tag-bio-fg: #305A2D;
    --tag-chem-bg: #DDE8F2; --tag-chem-fg: #1F4A6B;
    --tag-maths-bg: #F6E6D3; --tag-maths-fg: #6E3E14;
    --tag-eng-bg: #F5E1E7; --tag-eng-fg: #712C47;
    --tag-lang-bg: #F3EDCC; --tag-lang-fg: #625010;
  }
}

/* ==========================================================================
   Papers

   The stock the page is drawn on. NoteFlow's colour themes are its papers
   (the app's tokens.css: "Paper" and "Lit papers"), and on this page a
   paper is what it is in the app: it restates only the grounds, the rules
   and the ink steps, and a lit paper lays one soft light on the page
   ground. The pens (the highlighter, the red pen, the violet mark), the
   tags and the shadows are the same on every paper, and sheets stay flat.

   The page is on one paper at a time, stamped on the root as data-paper
   (plain Paper has no attribute, as in the app), so the header, the forms,
   the drawn windows and everything else follow it. The page is light only,
   so a paper has light tones only, and applies only while the root is held
   light (data-theme="light"): undo that attribute and the page is plain
   Paper and graphite again. The graphite stage keeps its own set (.invert).

   Each paper is one block: its ground and its light as constants (always
   defined, so its layer can be drawn whichever paper is current), then the
   tokens it restates. The values are the app's; where this page turns one
   up, so that the light is seen at a glance, the block says by how much.


   A change of data-paper is one change of the whole screen, 280ms (a
   change of view; --paper-ms, for a scene that wants it longer): the
   tokens are registered colours, so they run from one paper's to the next
   on the root, and each paper's ground and light is a layer of its own
   (.grounds, at the end of this section) that fades in as the last one
   fades out. Every element is restyled on every frame of it, so it is for
   a moment when nothing scrubbed is moving (main.js, "The paper").

   To add a paper: a block here with its two constants and its tokens; its
   name in the two lists at the end of this section (the layer's ground,
   and the layer shown); an <i data-ground="name"> in both .grounds in
   index.html; and its name in boot.js if ?paper= should reach it.
   ========================================================================== */

@property --paper { syntax: "<color>"; inherits: true; initial-value: #FBFAF7; }
@property --sheet { syntax: "<color>"; inherits: true; initial-value: #FFFFFF; }
@property --wash { syntax: "<color>"; inherits: true; initial-value: #F4F2EC; }
@property --wash-2 { syntax: "<color>"; inherits: true; initial-value: #EDEAE3; }
@property --rail { syntax: "<color>"; inherits: true; initial-value: #F5F3EE; }
@property --rail-on { syntax: "<color>"; inherits: true; initial-value: #EAE7E0; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #161615; }
@property --ink-2 { syntax: "<color>"; inherits: true; initial-value: #55534D; }
@property --ink-3 { syntax: "<color>"; inherits: true; initial-value: #6E6B64; }
@property --ink-4 { syntax: "<color>"; inherits: true; initial-value: #A9A59C; }
@property --on-ink { syntax: "<color>"; inherits: true; initial-value: #FBFAF7; }
@property --rule { syntax: "<color>"; inherits: true; initial-value: #ECE9E2; }
@property --rule-2 { syntax: "<color>"; inherits: true; initial-value: #DEDAD1; }
@property --rule-ink { syntax: "<color>"; inherits: true; initial-value: #161615; }

:root {
  --paper-ms: 280ms;
  transition-property: --paper, --sheet, --wash, --wash-2, --rail, --rail-on, --ink, --ink-2, --ink-3, --ink-4, --on-ink, --rule, --rule-2, --rule-ink;
  transition-duration: var(--paper-ms);
  transition-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---- Paper: the app's default (the tokens at the top of this file). No
   light, no attribute and no layer: the page's own ground is all of it.
   (Its ground again as a constant, as every paper has: main.js reads it
   for the browser's theme-color.) ---- */
:root { --paper-ground: #FBFAF7; }

/* ---- Adaptive: the app's Adaptive (adaptive), and its day ----
   The page stands on it. Grounds, rules and inks are the app's; its sky
   is four layers ("The ground", below), and the first screen plays its
   day by fading them (roll.css; main.js, rolling()): no token changes. */
:root { --adaptive-ground: #F3F3F3; }
:root[data-theme="light"][data-paper="adaptive"] {
  --paper: var(--adaptive-ground);
  --sheet: #FFFFFF;
  --wash: #EAEAEA;
  --wash-2: #E2E2E2;
  --rail: #EFEFEF;
  --rail-on: #E0E0E0;
  --rule: #E1E1E1;
  --rule-2: #D2D2D2;
  --ink: #141414;
  --ink-2: #3D3D3D;
  --ink-3: #484848;
  --ink-4: #A0A0A0;
  --on-ink: var(--adaptive-ground);
  --rule-ink: #141414;
}

/* ---- Blossom: the app's Blossom (blossom) ----
   A pink bloom from the top right washing across the top, like sun
   through cherry blossom; its sheets carry a faint blush. Grounds, rules,
   --ink, --ink-3 and --ink-4 are the app's. Turned up for this page: the
   light is about one and a half times the app's (0.5 / 0.26 / 0.1 there),
   and it comes from nearer the corner and falls a quarter further down
   (125% by 95% at 82% -15% there), so the right of the page is lit and the
   left is left clean; --ink-2 is darkened along its own hue (the app's
   #57464E) to keep 7:1 at the light's brightest point. */
:root {
  --blossom-ground: #FCF7F9;
  --blossom-light: radial-gradient(ellipse 120% 122% at 93% -20%, rgba(255, 118, 172, 0.7) 0%, rgba(255, 150, 190, 0.38) 30%, rgba(255, 184, 212, 0.15) 60%, rgba(255, 190, 216, 0) 92%);
}
:root[data-theme="light"][data-paper="blossom"] {
  --paper: var(--blossom-ground);
  --sheet: #FFFBFC;
  --wash: #F6EDF1;
  --wash-2: #EFE3E9;
  --rail: #F9F2F5;
  --rail-on: #EEE1E7;
  --rule: #EEE3E8;
  --rule-2: #E2CFD8;
  --ink: #1E1418;
  --ink-2: #43343B;
  --ink-3: #5A4950;
  --ink-4: #AE9BA4;
  --on-ink: var(--blossom-ground);
  --rule-ink: #1E1418;
}

/* ---- First light: the app's First light (dawn) ----
   A peach sunrise rising from below. Grounds, rules, --ink and --ink-4
   are the app's. Turned up for this page, where the NoteFlow window
   stands in front of the sunrise: the light is about one and a third
   times the app's (0.44 / 0.18 there) and rises a third higher, and
   --ink-2 and --ink-3 are darkened along their own hue (the app's
   #4B505B and #4F545E) to keep 7:1 and 5:1 at its brightest point. */
:root {
  --dawn-ground: #F7F8FA;
  --dawn-light: radial-gradient(ellipse 150% 100% at 50% 118%, rgba(255, 160, 100, 0.6) 0%, rgba(255, 172, 124, 0.3) 42%, rgba(255, 190, 150, 0.1) 66%, rgba(255, 190, 150, 0) 88%);
}
/* ---- Desk lamp: the app's Desk lamp (lamp) ----
   A warm amber pool from the top left, like a study lamp at night. */
:root {
  --lamp-ground: #F3EDE3;
  --lamp-light: radial-gradient(ellipse 96% 82% at 18% -12%, rgba(255, 176, 82, 0.48) 0%, rgba(255, 190, 110, 0.2) 48%, rgba(255, 190, 110, 0) 78%);
}
:root[data-theme="light"][data-paper="lamp"] {
  --paper: var(--lamp-ground);
  --sheet: #FFFDF9;
  --wash: #F6F1E9;
  --wash-2: #EAE1D3;
  --rail: #F3EDE3;
  --rail-on: #E7DEC9;
  --rule: #E7DFD1;
  --rule-2: #D6C9B4;
  --ink: #1C150D;
  --ink-2: #504233;
  --ink-3: #5D4F3E;
  --ink-4: #A89A85;
  --on-ink: #FFFDF9;
  --rule-ink: #1C150D;
}

/* ---- Lagoon: the app's Lagoon ----
   Sun through shallow water: a cyan wash falling from the top centre. */
:root {
  --lagoon-ground: #F1F8FB;
  --lagoon-light: radial-gradient(ellipse 125% 62% at 50% -12%, rgba(40, 196, 228, 0.5) 0%, rgba(60, 205, 230, 0.22) 45%, rgba(60, 205, 230, 0) 76%);
}
:root[data-theme="light"][data-paper="lagoon"] {
  --paper: var(--lagoon-ground);
  --sheet: #FFFFFF;
  --wash: #E8F2F6;
  --wash-2: #DCEAEF;
  --rail: #EAF4F8;
  --rail-on: #D8E7ED;
  --rule: #D9E6EB;
  --rule-2: #C2D7DF;
  --ink: #0F181B;
  --ink-2: #3B4D54;
  --ink-3: #42545A;
  --ink-4: #92A5AC;
  --on-ink: #FFFFFF;
  --rule-ink: #0F181B;
}
:root[data-theme="light"][data-paper="dawn"] {
  --paper: var(--dawn-ground);
  --sheet: #FFFFFF;
  --wash: #EEF1F5;
  --wash-2: #E5E9EF;
  --rail: #F2F4F8;
  --rail-on: #E4E8EF;
  --rule: #E3E7ED;
  --rule-2: #D3DAE3;
  --ink: #15171C;
  --ink-2: #3C414B;
  --ink-3: #4F545E;
  --ink-4: #A2A8B2;
  --on-ink: var(--dawn-ground);
  --rule-ink: #15171C;
}

/* ---- Twilight: the app's Twilight (twilight) ----
   A dusk sky from the top: lilac, then rose, then peach at the horizon;
   its sheets carry a faint blush of the sky. Grounds, rules, --ink and
   --ink-4 are the app's. Turned up for this page: the sky is about a
   quarter stronger than the app's (0.36 / 0.22 / 0.16 there), and
   --ink-2 and --ink-3 are darkened along their own hue (the app's
   #564A63 and #5E5270) to keep 7:1 and 5:1 at its brightest point. */
:root {
  --twilight-ground: #FAF6FC;
  --twilight-light: linear-gradient(180deg, rgba(186, 150, 245, 0.45) 0%, rgba(245, 165, 205, 0.28) 34%, rgba(255, 205, 180, 0.2) 58%, rgba(255, 205, 180, 0) 88%);
}
:root[data-theme="light"][data-paper="twilight"] {
  --paper: var(--twilight-ground);
  --sheet: #FFFCFF;
  --wash: #F2ECF7;
  --wash-2: #E9E1F2;
  --rail: #F5EFFA;
  --rail-on: #E8DFF2;
  --rule: #E8DFF0;
  --rule-2: #DCCDE8;
  --ink: #1A1222;
  --ink-2: #42364E;
  --ink-3: #564A68;
  --ink-4: #ABA0BA;
  --on-ink: var(--twilight-ground);
  --rule-ink: #1A1222;
}

/* ---- Aurora: the app's Aurora (aurora) ----
   A green-to-blue band across the top, fading out by mid-page. Grounds,
   rules, --ink and --ink-4 are the app's. Turned up for this page: the
   band is about one and a half times the app's (0.24 / 0.14 / 0.06
   there) and runs a little further down, and --ink-2 is darkened along
   its own hue (the app's #45524F) to keep 7:1 at its brightest point. */
:root {
  --aurora-ground: #F6FAF9;
  --aurora-light: linear-gradient(165deg, rgba(70, 230, 170, 0.36) 0%, rgba(80, 170, 230, 0.22) 32%, rgba(140, 110, 230, 0.09) 54%, rgba(140, 110, 230, 0) 74%);
}
:root[data-theme="light"][data-paper="aurora"] {
  --paper: var(--aurora-ground);
  --sheet: #FFFFFF;
  --wash: #ECF3F1;
  --wash-2: #E2ECE9;
  --rail: #F0F6F4;
  --rail-on: #E0EAE7;
  --rule: #DFE8E5;
  --rule-2: #CDDBD7;
  --ink: #111917;
  --ink-2: #3A4744;
  --ink-3: #525F5A;
  --ink-4: #9DAAA6;
  --on-ink: var(--aurora-ground);
  --rule-ink: #111917;
}

/* ---- Solid paper stocks: Sage, Harbour, Manila (tokens.css) ---- */
:root {
  --sage-ground: #EDF2EA;
  --harbour-ground: #EDF1F6;
  --manila-ground: #F3EDE0;
  --peer-2: #2B64A8;
  --peer-3: #237247;
  --peer-on: #FFFFFF;
}
:root[data-theme="light"][data-paper="sage"] {
  --paper: #EDF2EA; --sheet: #FFFFFF; --wash: #F1F5EE; --wash-2: #E4EBE0;
  --rail: #EDF2EA; --rail-on: #E2E9DD; --rule: #E1E7DC; --rule-2: #CDD7C6;
  --ink: #141814; --ink-2: #464F45; --ink-3: #596358; --ink-4: #9EA79B;
  --on-ink: #FFFFFF; --rule-ink: #141814;
}
:root[data-theme="light"][data-paper="harbour"] {
  --paper: #EDF1F6; --sheet: #FFFFFF; --wash: #F1F4F8; --wash-2: #E3E9F0;
  --rail: #EDF1F6; --rail-on: #E0E7EF; --rule: #E0E6ED; --rule-2: #CBD5E0;
  --ink: #13171C; --ink-2: #454F5C; --ink-3: #56616F; --ink-4: #9CA6B1;
  --on-ink: #FFFFFF; --rule-ink: #13171C;
}
:root[data-theme="light"][data-paper="manila"] {
  --paper: #F3EDE0; --sheet: #FFFDF8; --wash: #F6F1E6; --wash-2: #EAE2D1;
  --rail: #F3EDE0; --rail-on: #E7DFCC; --rule: #E7DFCE; --rule-2: #D6CBB4;
  --ink: #1C1812; --ink-2: #504637; --ink-3: #625745; --ink-4: #A89D87;
  --on-ink: #FFFDF8; --rule-ink: #1C1812;
}

/* Signature 280ms slanted chisel View Transition when changing paper or pen by hand */
::view-transition-old(root) { animation: none; z-index: 1; }
::view-transition-new(root) { animation: theme-chisel 280ms cubic-bezier(0.22, 1, 0.36, 1) both; z-index: 2; }
@keyframes theme-chisel {
  from { clip-path: polygon(0 0, 0 0, -14% 100%, 0 100%); }
  to   { clip-path: polygon(0 0, 114% 0, 100% 100%, 0 100%); }
}

/* ---- Highlighters: six authentic pens, live on both paper and graphite ---- */
:root[data-hl="yellow"] { --hl: #FFE94A; }
:root[data-hl="pink"]   { --hl: #FFB8DC; }
:root[data-hl="green"]  { --hl: #B4EFA0; }
:root[data-hl="blue"]   { --hl: #A8D8FF; }
:root[data-hl="orange"] { --hl: #FFC685; }
:root[data-hl="yellow"] .invert { --hl: #5C5216; --hl-ink: #FBF6DC; }
:root[data-hl="pink"]   .invert { --hl: #66294D; --hl-ink: #FFF0F7; }
:root[data-hl="green"]  .invert { --hl: #2D5229; --hl-ink: #EEFBEA; }
:root[data-hl="blue"]   .invert { --hl: #1E4466; --hl-ink: #EAF5FF; }
:root[data-hl="orange"] .invert { --hl: #683F1A; --hl-ink: #FFF3E6; }

/* ---- The ground: each paper's ground and its light, a layer a paper.
   Fixed to the window, behind everything, and inside nothing that is
   ever transformed (it is the first thing in the body), because a
   browser stops honouring "fixed" inside a transformed element and would
   draw the light again in that element's own box, as a band. Nothing else
   on the page paints a light: the pinned stages, the apps and the windows
   are clear or flat, so the one light shows between them. The header has
   a copy of the same layers, cut to its own box, for when it takes a
   ground (it sits at the window's top left corner, so its copy lines up).
   The layer keeps to the tallest the window can be (100lvh), so the light
   does not stretch when a phone's toolbar folds away. ---- */
.grounds { position: fixed; z-index: -1; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; overflow: hidden; pointer-events: none; }
.grounds i { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: opacity var(--paper-ms) cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear var(--paper-ms); }
[data-ground="blossom"] { background: var(--blossom-light), var(--blossom-ground); }
[data-ground="dawn"] { background: var(--dawn-light), var(--dawn-ground); }
[data-ground="twilight"] { background: var(--twilight-light), var(--twilight-ground); }
[data-ground="aurora"] { background: var(--aurora-light), var(--aurora-ground); }
[data-ground="lamp"] { background: var(--lamp-light), var(--lamp-ground); }
[data-ground="lagoon"] { background: var(--lagoon-light), var(--lagoon-ground); }
:root[data-theme="light"][data-paper="blossom"] [data-ground="blossom"],
:root[data-theme="light"][data-paper="dawn"] [data-ground="dawn"],
:root[data-theme="light"][data-paper="twilight"] [data-ground="twilight"],
:root[data-theme="light"][data-paper="aurora"] [data-ground="aurora"],
:root[data-theme="light"][data-paper="lamp"] [data-ground="lamp"],
:root[data-theme="light"][data-paper="lagoon"] [data-ground="lagoon"] { opacity: 1; visibility: visible; transition-delay: 0s; }
/* Adaptive's skies, a layer each, as the app writes its one: its shape
   (adaptiveLight()) and two colours, ADAPTIVE_DAY as adaptiveSky() reads
   it at 06:45, 09:25, 15:55, 17:30, 19:00 and 20:30. The strengths are
   this page's (the app's: 0.28 / 0.18), turned up so each is seen at a
   glance and all are about equally present; not Sunset and Dusk, whose
   hues are the swipe's (captured, the swipe is 14 to 19 dE from the sky
   beside it there, 17 to 27 elsewhere). Each carries the ground, so one
   faded in over another is a straight mix. The sunrise is on from here;
   once the roll has taken over (.is-rolling), the ones it marks (.is-on). */
.grounds [data-sky], .grounds [data-day] { transition: none; background: radial-gradient(ellipse 148% 92% at 50% -12%, rgb(var(--adapt-top) / var(--adapt-strong)) 0%, rgb(var(--adapt-mid) / var(--adapt-soft)) 48%, rgb(var(--adapt-mid) / 0) 84%), var(--adaptive-ground); }
/* (Founder, 13 Nov: "I don't like the orange background initial colour".
   The first sky is first light: lilac above (the highlighter's family) and
   rose where the headline stands, so the swipe stays clear of its ground,
   in place of Adaptive's orange sunrise; it keeps the name "sunrise".) */
[data-sky="sunrise"] { --adapt-top: 174 144 248; --adapt-mid: 248 172 210; --adapt-strong: 0.48; --adapt-soft: 0.28; }
[data-sky="morning"] { --adapt-top: 132 184 242; --adapt-mid: 184 222 246; --adapt-strong: 0.64; --adapt-soft: 0.44; }
[data-sky="aurora"]  { --adapt-top: 112 214 186; --adapt-mid: 144 198 238; --adapt-strong: 0.42; --adapt-soft: 0.24; }
[data-sky="sunset"]  { --adapt-top: 242 126 164; --adapt-mid: 192 142 232; --adapt-strong: 0.36; --adapt-soft: 0.16; }
[data-sky="lagoon"]  { --adapt-top: 86 196 226;  --adapt-mid: 158 220 236; --adapt-strong: 0.46; --adapt-soft: 0.24; }
[data-sky="dusk"]    { --adapt-top: 128 102 228; --adapt-mid: 102 128 214; --adapt-strong: 0.34; --adapt-soft: 0.14; }
[data-day="morning"] { --adapt-top: 140 188 239; --adapt-mid: 189 225 245; --adapt-strong: 0.52; --adapt-soft: 0.34; }
[data-day="sunset"] { --adapt-top: 240 100 140; --adapt-mid: 180 110 225; --adapt-strong: 0.3; --adapt-soft: 0.1; }
[data-day="dusk"] { --adapt-top: 120 90 220; --adapt-mid: 70 100 200; --adapt-strong: 0.28; --adapt-soft: 0.1; }
.grounds [data-day] { transition: opacity 1400ms cubic-bezier(0.45, 0, 0.55, 1), visibility 0s linear 1400ms; }
:root[data-theme="light"][data-paper="adaptive"] .grounds [data-day].is-on { opacity: 1; visibility: visible; transition: opacity 1400ms cubic-bezier(0.45, 0, 0.55, 1), visibility 0s; }
:root[data-theme="light"][data-paper="adaptive"] .grounds:not(.is-rolling) [data-sky="sunrise"],
:root[data-theme="light"][data-paper="adaptive"] .grounds [data-sky].is-on { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { :root, .grounds i { transition: none; } }

/* ---- How the light arrives. ---- */
:root { --light-at: 340ms; --light-ms: 760ms; }
@keyframes light-on { from { opacity: 0; } }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .live[data-theme="light"][data-paper="adaptive"] .grounds:not(.is-rolling) [data-sky="sunrise"],
  .live[data-theme="light"][data-paper="adaptive"] .grounds [data-sky].is-on { will-change: opacity; }
  .live.opening[data-theme="light"][data-paper="blossom"] [data-ground="blossom"],
  .live.opening[data-theme="light"][data-paper="dawn"] [data-ground="dawn"],
  .live.opening[data-theme="light"][data-paper="twilight"] [data-ground="twilight"],
  .live.opening[data-theme="light"][data-paper="aurora"] [data-ground="aurora"],
  .live.opening[data-theme="light"][data-paper="lamp"] [data-ground="lamp"],
  .live.opening[data-theme="light"][data-paper="lagoon"] [data-ground="lagoon"],
  .live.opening[data-theme="light"][data-paper="adaptive"] [data-sky="sunrise"] {
    animation: light-on var(--light-ms) cubic-bezier(0.2, 0.7, 0.2, 1) var(--light-at) backwards;
  }
}

/* Until Instrument Serif arrives (display=swap), Georgia stands in at the
   width Instrument Serif sets (it is about 76% as wide, 78% in italic), so
   the headline keeps its lines and nothing moves when the face swaps. */
@font-face { font-family: "Instrument Serif Fallback"; src: local("Georgia"); font-style: normal; size-adjust: 75.6%; ascent-override: 131%; descent-override: 41%; line-gap-override: 0%; }
@font-face { font-family: "Instrument Serif Fallback"; src: local("Georgia Italic"); font-style: italic; size-adjust: 78%; ascent-override: 127%; descent-override: 39.7%; line-gap-override: 0%; }
/* The same for Instrument Sans where Segoe UI is the system face (it is about 2% narrower). */
@font-face { font-family: "Instrument Sans Fallback"; src: local("Segoe UI"); font-weight: 400; size-adjust: 101.9%; ascent-override: 95.2%; descent-override: 24.5%; line-gap-override: 0%; }
@font-face { font-family: "Instrument Sans Fallback"; src: local("Segoe UI Semibold"); font-weight: 600; size-adjust: 101.9%; ascent-override: 95.2%; descent-override: 24.5%; line-gap-override: 0%; }

:root {
  --sans: "Instrument Sans", "Instrument Sans Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Instrument Serif Fallback", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* Something arriving by itself (v2's glide: no overshoot, a long soft landing). */
  --glide: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1180px;
  --head-h: 64px;
  /* The column the way out's line and the sections after it share. */
  --col: min(1320px, 100% - var(--gutter) * 2);
  --hl-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath d='M6 7.5C40 4.6 82 6.8 121 5.2C151 4 176 5.8 196 4.4L199 11.5L196.8 19L199.6 27.5L195 35.6C160 37.2 121 34.6 81 36.6C51 38 25 35.8 3.2 37.6L0.6 27.4L3 17.6L1 9.2Z' fill-opacity='.84'/%3E%3Cpath d='M6 7.5C40 4.6 82 6.8 121 5.2C151 4 176 5.8 196 4.4L198 15.6C150 16.8 100 14.8 50 16.6C30 17.2 15 16.4 2 16.9L1 9.2Z' fill-opacity='.3'/%3E%3Cpath d='M1.5 26.2C40 25 90 27.4 140 25.6C165 24.8 185 26 198.6 25.4L195 35.6C160 37.2 121 34.6 81 36.6C51 38 25 35.8 3.2 37.6Z' fill-opacity='.32'/%3E%3Cpath d='M6 7.5L13 7.1L11.6 37.3L3.2 37.6L0.6 27.4L3 17.6L1 9.2Z' fill-opacity='.4'/%3E%3Cpath d='M189 4.7L196 4.4L199 11.5L196.8 19L199.6 27.5L195 35.6L188 35.8Z' fill-opacity='.3'/%3E%3C/svg%3E");
}

/* ---- base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.004em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
::selection { background: var(--hl); color: var(--hl-ink); }
img, svg { display: inline-block; vertical-align: middle; }
a { color: var(--ink); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
kbd { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--on-ink); font-weight: 600; }
.skip:focus { top: 12px; }
.ai { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nf-mark { display: block; flex: none; overflow: visible; color: var(--violet); stroke-width: 3.3; }
.app-at { color: var(--ink-3); }

/* ---- the pens --------------------------------------------------------------- */

.hl { position: relative; z-index: 0; color: var(--hl-ink); white-space: nowrap; }
.hl::before {
  content: ""; position: absolute; z-index: -1;
  left: -0.16em; right: -0.2em; top: 0.16em; bottom: -0.02em;
  background: var(--hl);
  -webkit-mask: var(--hl-mask) 0 0 / 100% 100% no-repeat;
  mask: var(--hl-mask) 0 0 / 100% 100% no-repeat;
  mix-blend-mode: var(--hl-blend);
  transform: rotate(-1.2deg) skewX(-10deg);
  transform-origin: 50% 60%;
  pointer-events: none;
}
.hl-display::before { top: 0.42em; bottom: 0.02em; left: -0.06em; right: -0.12em; transform: rotate(-1.6deg) skewX(-12deg); }
/* Drawn left to right, once, at pen speed, behind a leading edge slanted
   like the chisel (v2). --swipe-ms is its width over 1100px a second, held
   between 0.3s and 0.95s: set where the swipe is long. */
:root { --swipe-ms: 300ms; --pen-ease: cubic-bezier(0.5, 0, 0.2, 1); }
@media (min-width: 900px) { :root { --swipe-ms: 380ms; } }
@media (min-width: 1600px) { :root { --swipe-ms: 460ms; } }
@keyframes swipe { from { clip-path: polygon(0 -10%, 0 -10%, -14% 110%, 0 110%); } to { clip-path: polygon(0 -10%, 114% -10%, 100% 110%, 0 110%); } }
/* A swipe that hands over inside a scrubbed scene: it draws when it gets the
   class, and wipes away quickly when it loses it, so two never show at once. */
.live .hl[data-hand]::before { clip-path: inset(0 100% 0 0); transition: clip-path 110ms var(--ease); }
.live .hl[data-hand].is-drawn::before { clip-path: inset(0 0 0 0); transition: clip-path 280ms var(--ease-out) 150ms; }

/* The red pen: ticks, crosses and the ring. Results only. */
.pen, .ring, .mk { display: block; overflow: visible; fill: none; }
/* Drawn with a dash as long as the path and a gap twice that, so the dash
   never wraps back onto the line and an undrawn path shows no stray cap. */
.pen path, .ring path, .mk path { fill: none; stroke: var(--pen); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1 2; stroke-dashoffset: 0; }

/* Doodle line, the mark's weight. */
.dd { display: block; flex: none; overflow: visible; }
.dd, .dd * { fill: none; stroke: currentColor; stroke-width: 1.6px; stroke-linecap: round; stroke-linejoin: round; }
.dd path, .dd rect { vector-effect: non-scaling-stroke; }

/* The wave from the logo: the only progress line on the page. It is
   stretched wider than it is drawn, so the stroke scales with it
   (horizontally only, so it stays about 2px) and the dash, measured with
   pathLength, runs along the path exactly. The gap is twice the path, so
   the dash never wraps, and an offset just past the end draws nothing. */
.wave { display: block; width: 100%; height: 14px; overflow: visible; }
.wave path { fill: none; stroke-width: 2px; stroke-linecap: round; }
.wave .track { stroke: var(--rule-2); }
.wave .done { stroke: var(--ink); stroke-dasharray: 1 2; stroke-dashoffset: calc(1.02 - var(--done, 0) * 1.02); }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px;
  font-size: 13px; font-weight: 500; letter-spacing: -0.003em; white-space: nowrap;
  background: var(--tag-bg, var(--wash-2)); color: var(--tag-fg, var(--ink-2));
}
.tag.bio { --tag-bg: var(--tag-bio-bg); --tag-fg: var(--tag-bio-fg); }
.tag.chem { --tag-bg: var(--tag-chem-bg); --tag-fg: var(--tag-chem-fg); }
.tag.maths { --tag-bg: var(--tag-maths-bg); --tag-fg: var(--tag-maths-fg); }
.tag.eng { --tag-bg: var(--tag-eng-bg); --tag-fg: var(--tag-eng-fg); }
.tag.lang { --tag-bg: var(--tag-lang-bg); --tag-fg: var(--tag-lang-fg); }

/* Height (0 lying on the desk, 1 held in the hand) drives shadow geometry from one overhead light (DESIGN.md §2). */
@property --h { syntax: "<number>"; inherits: true; initial-value: 0; }
.liftable {
  box-shadow: 0 0 0 1px var(--rule),
    0 calc(1px + 18px * var(--h)) calc(2px + 40px * var(--h)) calc(-2px - 12px * var(--h)) rgb(var(--shade) / calc((0.07 + 0.12 * var(--h)) * var(--shade-k))),
    0 calc(1px + 3px * var(--h)) calc(2px + 6px * var(--h)) rgb(var(--shade) / calc((0.04 + 0.03 * var(--h)) * var(--shade-k)));
}

/* v2 Segmented control: --wash-2 track with draggable/throwable spring sheet thumb (--tx, --tw). */
.seg-scroll { overflow-x: auto; scrollbar-width: none; margin-inline: -4px; padding: 2px 4px 4px; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg {
  --tx: 0px; --tw: 0px;
  position: relative; display: inline-flex; padding: 3px; border-radius: 14px;
  background: var(--wash-2); box-shadow: inset 0 0 0 1px var(--rule-2); touch-action: pan-x;
}
.seg-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: var(--tw); transform: translateX(var(--tx));
  border-radius: 11px; background: var(--sheet); pointer-events: none;
  box-shadow: 0 0 0 1px var(--rule-2), 0 1px 2px rgb(var(--shade) / calc(0.08 * var(--shade-k))), 0 2px 6px -2px rgb(var(--shade) / calc(0.06 * var(--shade-k)));
}
.seg button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 38px; padding: 0 14px; border: 0; background: none; border-radius: 11px;
  font: 500 14px/1 var(--sans); letter-spacing: -0.01em; color: var(--ink-2); white-space: nowrap; cursor: pointer;
  transition: color 110ms var(--ease); -webkit-tap-highlight-color: transparent;
}
.seg button svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .seg button:hover { color: var(--ink); } }
.seg button[aria-checked="true"] { color: var(--ink); font-weight: 600; cursor: grab; }
.seg button:focus-visible { outline-offset: -2px; }
.seg-sm { border-radius: 11px; }
.seg-sm .seg-thumb { border-radius: 8px; }
.seg-sm button { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg, var(--ink-2)); flex: none; }
.t-bio { --fg: var(--tag-bio-fg); } .t-chem { --fg: var(--tag-chem-fg); } .t-maths { --fg: var(--tag-maths-fg); }
.t-eng { --fg: var(--tag-eng-fg); } .t-hist { --fg: #5E4330; }
.invert .t-hist { --fg: #D6B9A0; }

/* ---- buttons and the reserve form -------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 14px; border: 0; cursor: pointer;
  font: 600 16px/1 var(--sans); letter-spacing: -0.012em; white-space: nowrap;
  transition: background-color 110ms var(--ease), color 110ms var(--ease), transform 110ms var(--ease), filter 110ms var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn:disabled { cursor: default; color: var(--ink-4); opacity: 0.55; transform: none !important; }
/* v2: the primary button is an ink key. It stands 2px proud on its edge and
   a press takes it down that far. */
.btn-primary { background: var(--ink); color: var(--on-ink); box-shadow: 0 2px 0 var(--key-edge), 0 4px 8px -3px rgb(var(--shade) / calc(0.28 * var(--shade-k))); transition: background-color 110ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease); }
@media (hover: hover) { .btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); } }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:active:not(:disabled) { transform: translateY(2px) scale(0.988); box-shadow: 0 0 0 var(--key-edge), 0 1px 2px -1px rgb(var(--shade) / calc(0.2 * var(--shade-k))); }
.btn-quiet { height: 44px; padding: 0 16px; font-size: 15px; background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-2), var(--shadow-1); }
@media (hover: hover) { .btn-quiet:hover:not(:disabled) { background: var(--wash); } }
.btn-quiet:active:not(:disabled) { background: var(--wash-2); }
.btn-ghost { height: 44px; padding: 0 16px; font-size: 15px; background: transparent; color: var(--ink-2); }
@media (hover: hover) { .btn-ghost:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); } }
.btn-ghost:active:not(:disabled) { background: var(--wash-2); }

.reserve { display: flex; flex-wrap: wrap; gap: 8px; width: min(100%, 460px); }
.reserve input[type="email"] {
  flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--rule-2); background: var(--sheet); color: var(--ink);
  font: 400 16px var(--sans); letter-spacing: -0.006em;
  transition: border-color 110ms var(--ease), box-shadow 110ms var(--ease);
}
.reserve input[type="email"]::placeholder { color: var(--ink-3); }
.reserve input[type="email"]:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--rail-on); }

/* ==========================================================================
   Header. It switches to graphite in the same frame the graphite stage
   reaches it, with no transition, so no frame is half paper.
   ========================================================================== */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: transform 280ms var(--ease);
}
/* While a scene has the whole screen the header slides away, and comes
   back the moment the reader scrolls up (main.js, header.conceal). */
.site-header.is-away { transform: translate3d(0, -100%, 0); }
.site-header.is-scrolled { background: var(--paper); border-bottom-color: var(--rule); }
/* Without scripting nothing says the page has scrolled, so the header keeps
   its ground throughout. (Only without it: before the deferred script runs,
   the header already looks as it will.) */
@media (scripting: none) { html:not(.js) .site-header { background: var(--paper); border-bottom-color: var(--rule); } }
.site-header.invert { background: var(--paper); color: var(--ink); }
/* The header's ground is the page's: the paper and, on a lit paper, the
   same light, from its own copy of the ground's layers (see Papers), cut
   to its box. The header sits at the window's top left corner, so its
   copy lines up with the page's, and content passes under one unbroken
   ground. Not on graphite, which has no light. */
/* (Hidden by opacity, never taken out of the page: its layers then run the
   light's arrival and the roll's fades from the same moment as the page's own, so
   the two are in step whenever the header takes its ground.) */
.site-header .grounds { opacity: 0; position: absolute; inset: 0; width: auto; height: auto; overflow: hidden; }
.site-header .grounds i { height: 100vh; height: 100lvh; }
.site-header.is-scrolled .grounds { opacity: 1; }
@media (scripting: none) { html:not(.js) .site-header .grounds { opacity: 1; } }
.site-header.invert .grounds { opacity: 0; }
.nav { display: flex; align-items: center; gap: 24px; width: min(1320px, 100% - var(--gutter) * 2); margin-inline: auto; height: var(--head-h); }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-weight: 600; font-size: 18px; letter-spacing: -0.025em; color: var(--ink); }
.brand .nf-mark { width: 24px; height: 24px; }
.nav-links { display: flex; gap: 4px; margin: 0 auto; }
.nav-links a { display: flex; align-items: center; height: 44px; padding: 0 12px; color: var(--ink-2); font-size: 15px; font-weight: 500; transition: color 110ms var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-reserve {
  display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 10px;
  background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule-2), var(--shadow-1);
  font-weight: 600; font-size: 15px; letter-spacing: -0.012em;
  transition: background-color 110ms var(--ease);
}
.nav-reserve:hover { background: var(--wash); }
/* On a phone the first screen has its own form a thumb away: the header's
   button waits until the page has been scrolled. */
@media (max-width: 899px) { html.js .site-header:not(.is-scrolled) .nav-reserve { visibility: hidden; } }
@media (max-width: 760px) {
  :root { --head-h: 60px; }
  .nav-links { display: none; }
  .nav-reserve { margin-left: auto; height: 44px; }
}

/* ==========================================================================
   Opening Keynote Stage: Hero + Flagship NoteFlow Study Workspace Window
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--head-h) + clamp(24px, 4.2svh, 52px)) var(--gutter) clamp(64px, 9svh, 112px);
  text-align: center;
}
.hero-inner {
  width: min(1360px, 100%);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0;
  font-weight: 600;
}
.hero-stage {
  display: grid;
  place-items: center;
  width: 100%;
  overflow: hidden;
  padding: 0.06em 0.06em 0.13em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(42px, min(9.2vw, 15.2svh), 148px);
  line-height: 0.98;
  letter-spacing: -0.047em;
  color: var(--ink);
}
.hero-item {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.22em;
  white-space: nowrap;
  visibility: hidden;
  pointer-events: none;
}
.hero-item.is-current,
.hero-item.is-leaving,
.hero-item.is-arriving { visibility: visible; }
.hero-w { display: inline-block; }

.hero-anchor {
  display: block;
  margin-top: -0.05em;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(34px, min(6.1vw, 9.6svh), 96px);
  line-height: 1.03;
  letter-spacing: -0.024em;
  color: var(--ink);
}
.hero-anchor em { font-style: italic; }
.hero-anchor .hl-display::before {
  top: 0.36em;
  bottom: 0.04em;
  left: -0.1em;
  right: -0.16em;
}

.hero-captions {
  display: grid;
  place-items: center;
  width: min(720px, 100%);
  margin-top: clamp(12px, 1.8svh, 20px);
}
.hero-cap {
  grid-area: 1 / 1;
  margin: 0;
  color: var(--ink-2);
  font-size: clamp(16px, 1.3vw, 19.5px);
  line-height: 1.46;
  letter-spacing: -0.01em;
  text-wrap: balance;
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 150ms var(--ease), transform 200ms var(--ease-out), visibility 0s linear 150ms;
}
.hero-cap.is-current {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  visibility: visible;
  pointer-events: auto;
  transition: opacity 220ms var(--ease) 55ms, transform 280ms var(--ease-out) 55ms, visibility 0s;
}

.hero-index {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(680px, 100%);
  margin-top: clamp(14px, 2.2svh, 24px);
}
.hero-string-wrap {
  width: 100%;
  padding: 6px 0 2px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.hero-string-wrap.is-pulled { cursor: grabbing; }
html:not(.live) .hero-string-wrap { cursor: default; touch-action: auto; }
.hero-string { display: block; width: 100%; height: 24px; overflow: visible; }
.hero-string path {
  fill: none;
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.hero-string-track { stroke: var(--rule-2); }
.hero-string-done { stroke: var(--ink); }

.hero-index-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
}
.hero-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 clamp(14px, 2.2vw, 28px);
}
.hero-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: 500 14.5px/1 var(--sans);
  letter-spacing: -0.008em;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color 140ms var(--ease);
}
@media (hover: hover) { .hero-tab:hover { color: var(--ink); } }
.hero-tab.is-current { color: var(--ink); font-weight: 600; }
.hero-tab i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 1.5px;
  border-radius: 1px;
  overflow: hidden;
  pointer-events: none;
}
.hero-tab i b {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.hero-tab.is-current i b { transform: scaleX(1); }

.hero-index-sep { width: 1px; height: 14px; background: var(--rule-2); flex: none; }
.hero-pause {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  margin: 3px 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: color 110ms var(--ease), background-color 110ms var(--ease);
}
@media (hover: hover) {
  .hero-pause:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
}
@media (pointer: coarse) {
  .hero-pause::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; translate: -50% -50%; }
}
.hero-pause svg { grid-area: 1 / 1; width: 14px; height: 14px; }
.hero-pause path { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.hero-pause .i-play path { fill: currentColor; stroke-width: 1.2; }
.hero-pause .i-play,
.hero-index.is-paused .hero-pause .i-pause { display: none; }
.hero-index.is-paused .hero-pause .i-play { display: block; }
html:not(.live) .hero-index-sep,
html:not(.live) .hero-pause { display: none; }

.hero-form { margin-top: clamp(16px, 2.5svh, 26px); }
.hero .hero-note {
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.45;
}

/* ---- Flagship NoteFlow Study Desktop Workspace Window ---- */
.showcase-wrap {
  width: min(1260px, 100%);
  margin: clamp(34px, 5svh, 54px) auto 0;
  text-align: left;
  scroll-margin-top: calc(var(--head-h) + 16px);
}
/* The window is the app itself, photographed (scripts/app-shots): one
   picture per tool, the same size, so a turn of the headline changes the
   picture and nothing else moves. Its ground is the app's own Paper. */
.nfw {
  position: relative;
  aspect-ratio: 1440 / 900;
  border-radius: 20px;
  background: var(--paper-ground);
  box-shadow:
    0 0 0 1px var(--rule-2),
    0 28px 68px -20px rgb(var(--shade) / calc(0.22 * var(--shade-k))),
    0 6px 16px -4px rgb(var(--shade) / calc(0.08 * var(--shade-k)));
  overflow: hidden;
  transform: scale(var(--win-s, 1));
  transform-origin: 50% 0%;
  will-change: transform;
}
@supports (corner-shape: squircle) {
  .nfw { corner-shape: squircle; border-radius: 30px; }
}
.nfw-view { display: block; }
.nfw-view[hidden] { display: none; }
.nfw-view img { display: block; width: 100%; height: auto; }
.live .nfw-view.is-on img { animation: fade-in 180ms var(--ease) backwards; }
@media (max-width: 760px) { .nfw { aspect-ratio: 780 / 1280; } }

/* Keynote kinetic animations */
@keyframes hero-first-in {
  from { opacity: 0; transform: translate3d(0, 108%, 0) scale(1.02); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes hero-anchor-in {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes hero-word-out {
  0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(0, -64%, 0) scale(0.982); }
}
@keyframes hero-word-in {
  0% { opacity: 0; transform: translate3d(0, 64%, 0) scale(1.018); }
  38% { opacity: 1; }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes copy-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .live .hero-stage:not(.is-live) .hero-item.is-current .hero-w {
    animation: hero-first-in 480ms var(--ease-out) calc(20ms + var(--wi, 0) * 45ms) backwards;
  }
  .live .hero-anchor { animation: hero-anchor-in 420ms var(--ease-out) 90ms backwards; }
  .live .hero-anchor .hl::before { animation: swipe var(--swipe-ms) var(--pen-ease) var(--light-at) backwards; }
  .live .hero-captions { animation: copy-in 320ms var(--ease) 170ms backwards; }
  .live .hero-index { animation: copy-in 320ms var(--ease) 220ms backwards; }
  .live .hero-form { animation: copy-in 320ms var(--ease) 270ms backwards; }
  .live .hero .hero-note { animation: copy-in 320ms var(--ease) 310ms backwards; }
  .live .nfw { animation: copy-in 440ms var(--ease) 350ms backwards; }
  .live .loose { animation: copy-in 440ms var(--ease) 430ms backwards; }
  .live .hero-item.is-leaving .hero-w {
    will-change: transform, opacity;
    animation: hero-word-out 195ms cubic-bezier(0.4, 0, 1, 1) calc(var(--wi, 0) * 18ms) forwards;
  }
  .live .hero-item.is-arriving .hero-w {
    will-change: transform, opacity;
    animation: hero-word-in 360ms var(--ease-out) calc(130ms + var(--wi, 0) * 34ms) backwards;
  }
}

/* ==========================================================================
   Chapters: Monumental Editorial Headers & Recessed Desk Stages (.desk-well)
   ========================================================================== */

.chap {
  position: relative;
  padding: clamp(80px, 11.5svh, 140px) 0;
  scroll-margin-top: calc(var(--head-h) + 12px);
}
.chap .wrap { width: var(--col); }

.chap-head { max-width: 840px; }
.chap-head-c { margin-inline: auto; text-align: center; }
.chap-head-c .chap-lead { margin-inline: auto; }

.chap-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.044em;
  color: var(--ink);
  text-wrap: balance;
}
.chap-title span { display: block; }
.chap-title em {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1.08em;
  letter-spacing: -0.022em;
  line-height: 1.02;
}
.chap-lead {
  margin-top: clamp(16px, 2.2svh, 22px);
  max-width: 44em;
  color: var(--ink-2);
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.54;
  text-wrap: pretty;
}
.chap-lead b { color: var(--ink); font-weight: 600; }
.chap-more { margin-top: 18px; font-size: 15.5px; }
.chap-more a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--rule-2);
  text-underline-offset: 5px;
  transition: text-decoration-color 140ms var(--ease);
}
.chap-more a .ai { transition: transform 180ms var(--ease); }
@media (hover: hover) {
  .chap-more a:hover { text-decoration-color: currentColor; }
  .chap-more a:hover .ai { transform: translateX(3px); }
}

.desk-well {
  margin-top: clamp(36px, 5.5svh, 56px);
  padding: clamp(20px, 2.6vw, 32px);
  border-radius: 28px;
  background: var(--rail-on);
  box-shadow:
    inset 0 1px 2px rgb(var(--shade) / calc(0.06 * var(--shade-k))),
    0 0 0 1px var(--rule-2);
}
@supports (corner-shape: squircle) {
  .desk-well { corner-shape: squircle; border-radius: 40px; }
}

/* Chisel swipe draws once as a chapter enters view; entrance uses backwards so no resting transform remains. */
.live [data-rise]:not(.play) { opacity: 0; }
.live [data-rise].play { animation: sec-rise 360ms var(--ease-out) backwards; }
.live [data-rise] .chap-title .hl::before { clip-path: polygon(0 -10%, 0 -10%, -14% 110%, 0 110%); }
.live [data-rise].play .chap-title .hl::before { animation: swipe 380ms var(--pen-ease) 140ms forwards; }

/* ==========================================================================
   Chapter 1: Fling it. One note on the desk and three places it can land.
   No app chrome is drawn: the note is a sheet, a place is a dashed outline.
   ========================================================================== */

.fling {
  --slot-w: 168px;
  --slot-h: 112px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas: "desk targets" "foot foot";
  gap: clamp(18px, 2.4vw, 28px) clamp(20px, 3vw, 44px);
  padding: clamp(18px, 2.4vw, 28px);
  align-items: center;
}
.fl-desk { grid-area: desk; display: grid; place-items: center; min-height: 330px; padding: 18px 0; }
/* Where the note lies: its outline stays on the desk while it is away. */
.fl-home { position: relative; width: min(380px, 100%); }
.fl-home::before { content: ""; position: absolute; inset: 0; border: 1.5px dashed var(--ink-4); border-radius: 18px; opacity: 0; transition: opacity 110ms var(--ease); }
.fling.is-away .fl-home::before { opacity: 1; }
.fl-note {
  --h: 0.25;
  position: relative;
  z-index: 2;
  padding: 20px 22px 18px;
  border-radius: 18px;
  background: var(--sheet);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  transform: rotate(-1.5deg);
  will-change: transform;
}
@supports (corner-shape: squircle) { .fl-note { corner-shape: squircle; border-radius: 26px; } }
.fl-note.is-held { cursor: grabbing; }
.fl-note:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.fl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-3); }
.fl-title { margin-top: 12px; font-size: 22px; font-weight: 600; line-height: 1.15; letter-spacing: -0.026em; color: var(--ink); }
.fl-line { margin-top: 9px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.fl-line b { color: var(--ink); font-weight: 600; }
.fl-line + .fl-line { padding-top: 9px; border-top: 1px solid var(--rule); }
.fl-hint { margin-top: 14px; font-size: 13px; color: var(--ink-3); }
html:not(.live) .fl-hint { display: none; }

.fl-targets { grid-area: targets; display: grid; gap: clamp(12px, 1.8vw, 18px); margin: 0; padding: 0; list-style: none; }
.fl-target { display: grid; grid-template-columns: var(--slot-w) minmax(0, 1fr); align-items: center; gap: clamp(12px, 1.6vw, 18px); }
.fl-slot {
  display: grid;
  place-items: center;
  width: var(--slot-w);
  height: var(--slot-h);
  border: 1.5px dashed var(--ink-4);
  border-radius: 12px;
  color: var(--ink-4);
  transition: border-color 110ms var(--ease), background-color 110ms var(--ease);
}
.fl-target.is-aimed .fl-slot { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.fl-target.has-it .fl-slot { border-color: transparent; }
.fl-target.has-it .fl-slot .ai { visibility: hidden; }
.fl-who { display: grid; gap: 4px; min-width: 0; }
.fl-who b { font-size: 16.5px; font-weight: 600; letter-spacing: -0.016em; color: var(--ink); }
.fl-who > span { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.fl-target.has-it .fl-who > span { color: var(--ink); }

.fl-foot {
  grid-area: foot;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding-top: clamp(14px, 2vw, 20px);
  border-top: 1px solid var(--rule-2);
}
.fl-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.fl-state { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-3); }
.fl-state .fs-reset[hidden] { display: none; }
@media (max-width: 760px) {
  .fling { --slot-w: 104px; --slot-h: 74px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "desk" "targets" "foot"; }
  .fl-desk { min-height: 0; padding: 10px 0 6px; }
  .fl-acts, .fl-acts .btn { width: 100%; }
}

/* ==========================================================================
   Chapter 2: Full-Screen Focus Room & 3D Split-Flap Clock (Focus.tsx)
   ========================================================================== */

.focus-stage-card {
  margin-top: clamp(36px, 5.5svh, 56px);
  padding: clamp(20px, 2.8vw, 32px);
  border-radius: 28px;
  background: var(--sheet);
  box-shadow: 0 0 0 1px var(--rule-2), var(--shadow-2);
  display: flex;
  flex-direction: column;
  align-items: center;
}
@supports (corner-shape: squircle) {
  .focus-stage-card { corner-shape: squircle; border-radius: 40px; }
}

/* The focus room: the clock and its controls, and nothing drawn round them */
.fr-window {
  --paper: #F3EDE3;
  --sheet: #FFFDF9;
  --wash: #F6F1E9;
  --wash-2: #EAE1D3;
  --rail-on: #E7DEC9;
  --rule: #E7DFD1;
  --rule-2: #D6C9B4;
  --ink: #1C150D;
  --ink-2: #504233;
  --ink-3: #5D4F3E;
  --ink-4: #A89A85;
  --on-ink: #FFFDF9;
  --violet: #4F2A7F;
  --shade: 28 21 13;
  --shade-k: 1;
  --fr-light: radial-gradient(ellipse 80% 70% at 20% -10%, rgba(255, 180, 90, 0.36) 0%, rgba(255, 190, 110, 0.14) 45%, rgba(255, 190, 110, 0) 74%);
  width: 100%;
  min-height: 490px;
  border-radius: 20px;
  background: var(--fr-light), var(--paper);
  box-shadow: inset 0 0 0 1px var(--rule-2);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  transition: background-color 220ms var(--ease), box-shadow 220ms var(--ease);
}
@supports (corner-shape: squircle) {
  .fr-window { corner-shape: squircle; border-radius: 30px; }
}

.fr-window[data-fr-paper="twilight"] {
  --paper: #F1EAF6;
  --sheet: #FFFCFF;
  --wash: #F5F0F9;
  --wash-2: #E7DDF0;
  --rail-on: #E4D9EE;
  --rule: #E5DBEE;
  --rule-2: #D4C4E2;
  --ink: #1A1222;
  --ink-2: #4C4059;
  --ink-3: #534764;
  --ink-4: #A59AB4;
  --on-ink: #FFFCFF;
  --violet: #4F2A7F;
  --shade: 26 18 34;
  --shade-k: 1;
  --fr-light: linear-gradient(180deg, rgba(186, 150, 245, 0.36) 0%, rgba(245, 165, 205, 0.22) 34%, rgba(255, 205, 180, 0.16) 58%, rgba(255, 205, 180, 0) 85%);
}

.fr-window[data-fr-paper="night"] {
  --paper: #16100B;
  --sheet: #241B13;
  --wash: #291F16;
  --wash-2: #31261B;
  --rail-on: #2E241A;
  --rule: #2D2218;
  --rule-2: #453526;
  --ink: #F5E7CC;
  --ink-2: #CDB997;
  --ink-3: #AC9875;
  --ink-4: #6B5C47;
  --on-ink: #16100B;
  --violet: #C2A8F5;
  --shade: 0 0 0;
  --shade-k: 2.8;
  --fr-light: radial-gradient(ellipse 75% 65% at 20% -10%, rgba(255, 170, 80, 0.13), rgba(255, 170, 80, 0) 70%);
}

/* Focus Room main canvas */
.fr-room {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: clamp(20px, 2.6vw, 28px) clamp(18px, 3vw, 34px) clamp(28px, 3.6vw, 40px);
  min-width: 0;
}

.fr-chrome {
  transition: opacity 280ms var(--ease);
}
.fr-window.is-stream .fr-chrome {
  opacity: 0;
  pointer-events: none;
}

.fr-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.fr-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8.5px;
  user-select: none;
}
.fr-brand-domain {
  display: inline-flex;
  align-items: baseline;
  font-size: 15px;
  line-height: 1;
  letter-spacing: -0.022em;
}
.fr-brand-domain b {
  font-weight: 600;
  color: var(--ink);
}
.fr-brand-domain i {
  font-style: normal;
  font-weight: 500;
  color: var(--ink-3);
}

.fr-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.fr-tool {
  height: 30px;
  padding: 0 11.5px;
  border-radius: 9px;
  border: 1px solid var(--rule-2);
  background: var(--sheet);
  box-shadow: 0 1px 2px rgb(var(--shade) / calc(0.04 * var(--shade-k)));
  font: 500 12.5px/1 var(--sans);
  color: var(--ink-2);
  cursor: pointer;
  transition: background 110ms var(--ease), color 110ms var(--ease), border-color 110ms var(--ease);
}
@media (hover: hover) {
  .fr-tool:hover { background: var(--wash); color: var(--ink); }
}
.fr-tool[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

/* Centerpiece stage */
.fr-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 18px 0 6px;
  text-align: center;
}

.fr-status {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

.fr-clock-host {
  --wind-lift: 0;
  --fr-w: clamp(140px, 24vw, 256px);
  --fr-h: calc(var(--fr-w) * 1.12);
  --fr-r: clamp(16px, calc(var(--fr-w) * 0.08), 23px);
  --fr-fs: calc(var(--fr-h) * 0.72);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  transform: scale(calc(1 + 0.018 * var(--wind-lift)));
}
.fr-window.is-focusing .fr-clock-host {
  --fr-w: clamp(148px, 26vw, 278px);
}
.fr-clock-host.is-windable {
  cursor: ns-resize;
  touch-action: none;
}
.fr-clock-host:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 10px;
  border-radius: 28px;
}

.fr-flip-row {
  display: inline-flex;
  align-items: center;
  gap: clamp(15px, 2.5vw, 28px);
}
.fr-flip-row[hidden] { display: none; }

.fr-leaf {
  --dip: 0px;
  position: relative;
  width: var(--fr-w);
  height: var(--fr-h);
  border-radius: var(--fr-r);
  perspective: 1400px;
  transform: translateY(var(--dip));
  transition: width 380ms var(--glide), height 380ms var(--glide);
  box-shadow:
    0 0 0 1px var(--rule-2),
    0 3.5px 0 -1.5px var(--sheet),
    0 3.5px 0 -0.5px var(--rule-2),
    0 7px 0 -3.5px var(--wash),
    0 7px 0 -2.5px var(--rule-2),
    0 calc(9px + 16px * var(--wind-lift)) calc(24px + 24px * var(--wind-lift)) -10px
      rgb(var(--shade) / calc((0.09 + 0.11 * var(--wind-lift)) * var(--shade-k))),
    0 calc(2px + 3px * var(--wind-lift)) calc(5px + 5px * var(--wind-lift))
      rgb(var(--shade) / calc((0.04 + 0.03 * var(--wind-lift)) * var(--shade-k)));
}

.fr-half,
.fr-flap {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  overflow: hidden;
  background: var(--sheet);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.fr-half-top,
.fr-flap-top {
  top: 0;
  border-radius: var(--fr-r) var(--fr-r) 0 0;
}
.fr-half-bot,
.fr-flap-bot {
  bottom: 0;
  border-radius: 0 0 var(--fr-r) var(--fr-r);
  background: color-mix(in srgb, var(--sheet) 96.5%, var(--wash));
}

@supports (corner-shape: squircle) {
  .fr-leaf {
    corner-shape: squircle;
    border-radius: calc(var(--fr-r) * 1.6);
  }
  .fr-half-top,
  .fr-flap-top {
    corner-shape: squircle;
    border-radius: calc(var(--fr-r) * 1.6) calc(var(--fr-r) * 1.6) 0 0;
  }
  .fr-half-bot,
  .fr-flap-bot {
    corner-shape: squircle;
    border-radius: 0 0 calc(var(--fr-r) * 1.6) calc(var(--fr-r) * 1.6);
  }
}

.fr-flap { z-index: 3; will-change: transform; }
.fr-flap-top { transform-origin: 50% 100%; box-shadow: 0 1px 0 var(--rule-2); }
.fr-flap-bot { transform-origin: 50% 0%; box-shadow: 0 -1px 0 var(--rule-2); }

.fr-whole {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--fr-h);
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: height 380ms var(--glide);
}
.fr-whole-low { transform: translateY(-50%); }

.fr-num {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fr-fs);
  line-height: 1;
  letter-spacing: -0.028em;
  color: var(--ink);
  transform: translateY(0.042em);
  transition: font-size 380ms var(--glide), color 110ms var(--ease);
}

.fr-shade {
  position: absolute;
  inset: 0;
  background: rgb(var(--shade));
  opacity: 0;
  pointer-events: none;
}

.fr-seam {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1.5px;
  margin-top: -0.75px;
  background: var(--rule-2);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--sheet) 92%, var(--on-ink) 8%);
  z-index: 4;
  pointer-events: none;
}
.fr-seam::before,
.fr-seam::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 4px;
  height: 6px;
  background: var(--paper);
  border-top: 1px solid var(--rule-2);
  border-bottom: 1px solid var(--rule-2);
}
.fr-seam::before { left: 0; border-right: 1px solid var(--rule-2); border-radius: 0 3px 3px 0; }
.fr-seam::after { right: 0; border-left: 1px solid var(--rule-2); border-radius: 3px 0 0 3px; }

.fr-colon {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 4vw, 46px);
}
.fr-colon i {
  display: block;
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink-3) 68%, var(--ink-4));
}

.fr-serif {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(92px, 20vw, 224px);
  line-height: 0.92;
  letter-spacing: -0.032em;
  color: var(--ink);
  padding: 12px 0;
  transform: translateY(0.03em);
}
.fr-serif[hidden] { display: none; }
.fr-serif-colon {
  display: inline-block;
  margin: 0 0.045em;
  color: var(--ink-3);
  transform: translateY(-0.075em);
}

.fr-string {
  display: block;
  width: min(100%, 420px);
  height: 28px;
  overflow: visible;
  touch-action: pan-y;
  cursor: grab;
}
.fr-string path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fr-string .track { stroke: var(--rule-2); }
.fr-string .done { stroke: var(--ink); }

.focus-bar {
  margin-top: 20px;
  width: 100%;
  padding: 0 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.fd-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fd-right { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.fd-start { min-width: 148px; height: 48px; border-radius: 14px; }
.fd-step { height: 48px; padding: 0 15px; border-radius: 14px; }
.fs-reset {
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: 500 14px/1.4 var(--sans);
  text-decoration: underline;
  text-decoration-color: var(--rule-2);
  text-underline-offset: 4px;
  cursor: pointer;
}
.fs-reset:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ==========================================================================
   Chapter 3: The Graphite Stage (Guided Study / Practice Exams / AI Tutor)
   ========================================================================== */

.loop-band {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(88px, 13svh, 148px) 0;
  scroll-margin-top: var(--head-h);
}
.loop-band .wrap { width: var(--col); }

.loop-head {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.loop-head .chap-lead { margin-inline: auto; }
.loop-seg { margin-top: clamp(24px, 3.6svh, 34px); }
.loop-seg button { height: 42px; padding: 0 18px; font-size: 14.5px; }

.loop-stage {
  margin-top: clamp(32px, 4.8svh, 46px);
  padding: clamp(26px, 3.6vw, 46px);
  border-radius: 28px;
  background: var(--sheet);
  box-shadow: 0 0 0 1px var(--rule-2), var(--shadow-3);
}
@supports (corner-shape: squircle) {
  .loop-stage { corner-shape: squircle; border-radius: 40px; }
}

.loop-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(26px, 4vw, 52px);
  align-items: center;
  animation: fade-in 200ms var(--ease) both;
}
.loop-panel[hidden] { display: none; }

.lp-copy h3 {
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.032em;
  color: var(--ink);
}
.lp-copy > p:not(.chap-more) {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.54;
}
.lp-try { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }

.lp-sheet {
  border-radius: 20px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--rule-2);
  padding: clamp(22px, 3vw, 32px);
}

/* Panel 1: Guided Study / Exam Path */
.pd-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.pd-sub { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-3); }
.pd-days {
  margin-top: 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.2vw, 42px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.pd-meta { font-size: 13px; color: var(--ink-3); }
.pd-week {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.pd-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 11px 6px;
  border-radius: 12px;
  background: var(--sheet);
  box-shadow: inset 0 0 0 1px var(--rule);
  transition: background-color 220ms var(--ease), box-shadow 220ms var(--ease), opacity 220ms var(--ease);
}
.pd-day i { font-style: normal; font-size: 12px; color: var(--ink-3); }
.pd-day b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.pd-day.is-done { background: var(--wash); }
.pd-day.is-plan { box-shadow: inset 0 0 0 1px var(--rule-2); }
.pd-day.is-missed { opacity: 0.45; }
.pd-day.is-missed b { text-decoration: line-through; color: var(--ink-3); }
.pd-day.is-moved { box-shadow: inset 0 0 0 1.5px var(--ink); background: var(--wash); }
.pd-day.is-exam { background: var(--ink); box-shadow: none; }
.pd-day.is-exam i { color: var(--on-ink); opacity: 0.72; }
.pd-day.is-exam b { color: var(--on-ink); }
.pd-note { margin-top: 12px; font-size: 14px; color: var(--ink-2); }

.pd-fly-chip {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--rule-2), var(--shadow-2);
  font: 600 13px/1 var(--sans);
  white-space: nowrap;
}

.pd-road {
  position: relative;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 14px;
}
.pd-road::before {
  content: "";
  position: absolute;
  left: 6.5px;
  top: 28px;
  bottom: 14px;
  width: 1px;
  background: var(--rule-2);
}
.pd-road li {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}
.pd-road li div { display: grid; gap: 2px; }
.pd-road li span { font-size: 15px; color: var(--ink); font-weight: 600; }
.pd-road li small { font-size: 12.5px; color: var(--ink-3); }
.pd-road li em { font-style: normal; font-size: 13px; color: var(--ink-3); }
.pd-dot {
  position: relative;
  z-index: 1;
  display: block;
  width: 11px;
  height: 11px;
  margin-left: 1.5px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--ink-3);
}
.pd-road .is-held .pd-dot { background: var(--ink); box-shadow: none; }
.pd-road .is-now .pd-dot { background: var(--ink); box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--ink); }
.pd-road .is-now em { color: var(--ink); font-weight: 600; }
.pd-diamond {
  position: relative;
  z-index: 1;
  display: block;
  width: 11px;
  height: 11px;
  margin-left: 1.5px;
  background: var(--ink);
  transform: rotate(45deg);
}

/* Panel 2: Practice Exams */
.ed-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.ed-q {
  margin-top: 16px;
  font-size: clamp(18.5px, 1.7vw, 22px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.022em;
  color: var(--ink);
}
.ed-opts { margin-top: 18px; display: grid; gap: 9px; }
.ed-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 10px 52px 10px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--sheet);
  box-shadow: inset 0 0 0 1px var(--rule-2);
  color: var(--ink);
  font: 500 15px/1.35 var(--sans);
  text-align: left;
  cursor: pointer;
  transition: background-color 110ms var(--ease), box-shadow 110ms var(--ease), transform 110ms var(--ease);
}
.ed-opt b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: var(--wash);
  box-shadow: inset 0 0 0 1px var(--rule-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.ed-opt.is-picked { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ed-opt.is-picked b { background: var(--ink); color: var(--on-ink); box-shadow: none; }
@media (hover: hover) {
  .ed-opt:hover:not(:disabled) { background: var(--wash); box-shadow: inset 0 0 0 1px var(--ink-3); }
}
.ed-opt:active:not(:disabled) { transform: scale(0.99); }
.ed-mk-svg {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 32px;
  height: 28px;
  margin-top: -14px;
  pointer-events: none;
}
.live .ed-opt .ed-mk-svg path {
  stroke-dashoffset: 1.02;
  animation: pen 260ms var(--ease) forwards;
}

.ed-rview[hidden], .ed-qview[hidden] { display: none; }
.ed-score-row { display: flex; align-items: center; gap: 24px; }
.ed-ring-wrap { position: relative; flex: none; padding: 14px 30px 10px 20px; }
.ed-score {
  display: block;
  font-family: var(--serif);
  font-size: 68px;
  line-height: 0.94;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.ed-score i { font-style: normal; color: var(--ink-3); }
.ed-ring {
  position: absolute;
  left: -4px;
  top: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 10px);
  transform: rotate(-3deg);
  pointer-events: none;
}
.ed-ring path { stroke-dashoffset: 1.02; }
.ed-rview.is-ring .ed-ring path { animation: ink 520ms var(--pen-ease) 120ms both; }
.ed-say { min-width: 0; }
.ed-verdict { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.ed-explain { margin-top: 6px; font-size: 15px; line-height: 1.52; color: var(--ink-2); }
.ed-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }

/* Panel 3: AI Tutor */
.tdm-prompts { display: flex; flex-wrap: wrap; gap: 8px; }
.tdm-chip {
  height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: var(--sheet);
  box-shadow: inset 0 0 0 1px var(--rule-2);
  color: var(--ink-2);
  font: 500 13.5px/1 var(--sans);
  cursor: pointer;
  transition: background-color 120ms var(--ease), color 120ms var(--ease), box-shadow 120ms var(--ease);
}
@media (hover: hover) { .tdm-chip:hover { color: var(--ink); background: var(--wash); } }
.tdm-chip.is-on { background: var(--ink); color: var(--on-ink); box-shadow: none; font-weight: 600; }

.tdm-thread { margin-top: 18px; display: grid; gap: 14px; }
.tdm-user {
  justify-self: end;
  padding: 10px 15px;
  border-radius: 14px 14px 4px 14px;
  background: var(--wash-2);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
}
.tdm-ans {
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--sheet);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.tdm-text {
  min-height: 4.5em;
  font-size: 16px;
  line-height: 1.58;
  color: var(--ink);
}
.ink-w { color: var(--ink-4); transition: color 240ms var(--ease); }
.ink-w.s1 { color: var(--ink-3); }
.ink-w.s2 { color: var(--ink-2); }
.ink-w.is-dry { color: var(--ink); }

.tdm-excerpt {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 11px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--rule);
  display: grid;
  gap: 3px;
}
.tdm-excerpt span { font-size: 12px; color: var(--ink-3); }
.tdm-excerpt b { color: var(--ink); font-weight: 600; }
.tdm-excerpt p { font-size: 13.5px; color: var(--ink-2); }

.tdm-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tdm-src { font-size: 13px; color: var(--ink-3); }
.tdm-make { height: 40px; padding: 0 15px; font-size: 14px; border-radius: 11px; }

/* ==========================================================================
   Chapter 4: Study Together (Pass & Catch + Live Pen Carets + Challenge)
   ========================================================================== */

.sc-copy h3 {
  font-size: clamp(26px, 2.5vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.sc-copy p {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.55;
}

/* Part B: Playable 3-Question Challenge */
.social-chal {
  margin-top: clamp(44px, 6.5svh, 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}
.sc-meta { font-size: 14.5px !important; color: var(--ink-3) !important; }
.sc-meta b {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  background: var(--sheet);
  box-shadow: inset 0 0 0 1px var(--rule-2);
  font-size: 12.5px;
  color: var(--ink);
}

.ch { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 28px 26px; border-radius: 20px; background: var(--sheet); box-shadow: 0 0 0 1px var(--rule-2), var(--shadow-2); }
.social-chal .ch { max-width: none; margin: 0; }
.ch-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-2); }
.ch-from { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.ch-from b { color: var(--ink); font-weight: 600; }
.ch-by { color: var(--ink-3); white-space: nowrap; }
.ch-clock { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); }
.ch-views { display: grid; flex: 1; margin-top: 14px; }
.ch-view { grid-area: 1 / 1; min-width: 0; display: flex; flex-direction: column; }
.ch-view.is-off { visibility: hidden; opacity: 0; pointer-events: none; }
.ch-count { margin-top: 14px; font-size: 14px; color: var(--ink-3); }
.ch-count b { color: var(--ink); font-weight: 600; }
.ch-q { margin-top: 4px; min-height: 2.5em; font-size: clamp(20px, 1.7vw, 24px); font-weight: 600; line-height: 1.22; letter-spacing: -0.024em; text-wrap: balance; }
.ch-opts { display: grid; gap: 10px; margin-top: 14px; }
.ch-opt { position: relative; display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 60px 0 14px; border-radius: 12px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule-2); font-size: 17px; letter-spacing: -0.012em; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: box-shadow 110ms var(--ease), background-color 110ms var(--ease), color 180ms var(--ease), transform 110ms var(--ease); }
.ch-opt .k { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--rule-2); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.ch-opt::before { content: ""; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }
@media (hover: hover) { .ch-opts:not(.is-locked) .ch-opt:hover { background: var(--wash); box-shadow: inset 0 0 0 1px var(--ink-4); } }
.ch-opts:not(.is-locked) .ch-opt:active { transform: scale(0.99); }
.ch-opt:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 12px; }
.ch-opt.is-picked { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ch-opt.is-picked .k { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.ch-opts.is-locked .ch-opt { cursor: default; }
.ch-opts.is-locked .ch-opt:not(.is-picked):not(.is-answer) { color: var(--ink-3); }
.ch-opt .mk { position: absolute; right: 14px; top: 50%; width: 34px; height: 30px; margin-top: -15px; pointer-events: none; }
@keyframes pen { from { stroke-dashoffset: 1.02; } to { stroke-dashoffset: 0; } }
.live .ch .mk path { stroke-dashoffset: 1.02; animation: pen 280ms var(--ease) var(--pd, 0s) forwards; }
.ch .mk path + path { --pd: 0.18s; }
.ch-opt.is-answer:not(.is-picked) .mk path { --pd: 0.34s; }
.ch-wave { margin-top: 2px; }
.ch-wave .done { transition: stroke-dashoffset 280ms var(--ease); }
.ch-hint { margin-top: auto; padding-top: 14px; font-size: 14px; color: var(--ink-3); }
.ch-body.is-out { opacity: 0; transform: translate3d(0, -6px, 0); transition: opacity 180ms var(--ease), transform 180ms var(--ease); }
.ch-body.is-pre { opacity: 0; transform: translate3d(0, 10px, 0); transition: none; }
.ch-body.is-in { transition: opacity 280ms var(--ease), transform 280ms var(--ease-out); }
.ch-result[hidden] { display: none; }
html:not(.js) .ch [data-cq-quiz] { display: none; }
html:not(.js) .ch-result[hidden] { display: flex; }
html:not(.js) .ch-again { display: none; }
.ch-res-top { display: flex; align-items: center; gap: 20px; margin-top: 6px; }
.ch-score { position: relative; flex: none; padding: 10px 28px 6px 18px; }
.ch-big { display: block; font-family: var(--serif); font-size: 68px; line-height: 0.95; letter-spacing: -0.03em; }
.ch-big .of { color: var(--ink-3); }
.ch-score .ring { position: absolute; left: -4px; top: -6px; width: calc(100% + 10px); height: calc(100% + 12px); transform: rotate(-3deg); pointer-events: none; }
.ch-say { min-width: 0; }
.ch-verdict { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.ch-verdict:focus { outline: none; }
.ch-note { margin-top: 4px; color: var(--ink-2); font-size: 15px; }
.ch-board { margin-top: 14px; border-top: 1px solid var(--rule-ink); font-size: 15px; }
.ch-board li { position: relative; z-index: 0; display: grid; grid-template-columns: 26px minmax(0, 1fr) 48px 48px; align-items: center; height: 38px; border-bottom: 1px solid var(--rule); }
.ch-board .rk, .ch-board .tm { color: var(--ink-3); }
.ch-board .sc { text-align: right; font-weight: 600; }
.ch-board .tm { text-align: right; }
.ch-board .is-you { color: var(--hl-ink); }
.ch-board .is-you .rk, .ch-board .is-you .tm { color: var(--hl-ink); opacity: 0.78; }
.ch-board .is-you b { font-weight: 600; }
.ch-board .is-you::before {
  content: ""; position: absolute; z-index: -1; left: -10px; right: -8px; top: 5px; bottom: 4px;
  background: var(--hl);
  -webkit-mask: var(--hl-mask) 0 0 / 100% 100% no-repeat;
  mask: var(--hl-mask) 0 0 / 100% 100% no-repeat;
  mix-blend-mode: var(--hl-blend);
  transform: rotate(-0.6deg);
}
.ch-again { margin-top: 14px; }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ink { from { stroke-dashoffset: 1.02; } to { stroke-dashoffset: 0; } }
.ch-result.is-shown .ring path { animation: ink 280ms var(--ease) 360ms both; }
.ch-result.is-shown .ch-say, .ch-result.is-shown .ch-again { animation: rise-in 280ms var(--ease-out) 300ms both; }
.ch-result.is-shown .ch-board .is-you { animation: rise-in 280ms var(--ease-out) 520ms both; }
.ch-result.is-shown .ch-board .is-you::before { animation: swipe 280ms var(--ease-out) 1000ms both; }

/* ==========================================================================
   Chapter 5: Studio Desk Appearance Gallery + Ruled Directory
   ========================================================================== */

.studio-desk {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(22px, 3vw, 38px);
  align-items: center;
}
.sd-controls {
  display: grid;
  gap: 20px;
  padding: 8px;
}
.dp-group { display: grid; gap: 9px; }
.dp-label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.dp-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 10px;
  border: 0;
  border-radius: 12px;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--rule-2), var(--shadow-1);
  font: 500 14px/1 var(--sans);
  cursor: pointer;
  transition: background-color 120ms var(--ease), box-shadow 120ms var(--ease), transform 110ms var(--ease);
}
@media (hover: hover) { .dp-chip:hover { background: var(--wash); } }
.dp-chip:active { transform: translateY(1px); }
.dp-chip.is-on {
  font-weight: 600;
  box-shadow: inset 0 0 0 1.75px var(--ink), var(--shadow-1);
}
.dp-sw {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(22, 22, 21, 0.14);
}
.sw-adaptive { background: linear-gradient(135deg, #B8A0F5 0%, #9CCAF2 52%, #F5B2CC 100%); }
.sw-paper    { background: #F3F1EC; }
.sw-sage     { background: #DCE8D6; }
.sw-harbour  { background: #DAE4F0; }
.sw-manila   { background: #EDE2C8; }
.sw-lamp     { background: radial-gradient(circle at 25% 20%, #FFB963, #F3EDE3 75%); }
.sw-twilight { background: linear-gradient(180deg, #BEA0F5, #F5B4CE 60%, #FAF6FC); }
.sw-aurora   { background: linear-gradient(150deg, #5CE0AE, #6EB4E6 60%, #F6FAF9); }
.sw-blossom  { background: radial-gradient(circle at 80% 20%, #FF8CB8, #FCF7F9 75%); }
.sw-lagoon   { background: radial-gradient(circle at 50% 15%, #3CCAE6, #F1F8FB 78%); }

/* Ragged chisel pen swatches */
.dp-pen {
  display: block;
  width: 24px;
  height: 12px;
  flex: none;
  -webkit-mask: var(--hl-mask) 0 0 / 100% 100% no-repeat;
  mask: var(--hl-mask) 0 0 / 100% 100% no-repeat;
  transform: rotate(-3deg);
}
.pen-violet { background: #D6C2FF; }
.pen-yellow { background: #FFE94A; }
.pen-pink   { background: #FFB8DC; }
.pen-green  { background: #B4EFA0; }
.pen-blue   { background: #A8D8FF; }
.pen-orange { background: #FFC685; }

/* Live Specimen Card */
.sd-card {
  --h: 0.2;
  padding: 24px 26px;
  border-radius: 20px;
  background: var(--sheet);
  display: grid;
  gap: 14px;
}
.sd-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  font-size: 12.5px;
  color: var(--ink-3);
}
.sd-paper-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
}
.sd-paper-name::before {
  content: "";
  width: 20px;
  height: 10px;
  background: var(--hl);
  -webkit-mask: var(--hl-mask) 0 0 / 100% 100% no-repeat;
  mask: var(--hl-mask) 0 0 / 100% 100% no-repeat;
  transform: rotate(-3deg);
}
.sd-greet {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.sd-sub { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.sd-rows { border-top: 1px solid var(--rule-ink); }
.sd-rows > div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13.5px;
}
.sd-rows span { color: var(--ink-3); }
.sd-rows b { color: var(--ink); font-weight: 600; }
.sd-rows em { font-style: normal; color: var(--ink-2); font-size: 12.5px; }

/* Tactile 5-card live demo row */
.tour-row {
  margin-top: clamp(22px, 3.4svh, 34px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.tour-card {
  --h: 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--sheet);
  display: grid;
  gap: 4px;
  color: var(--ink);
  transition: --h 360ms var(--glide), transform 360ms var(--glide);
}
@media (hover: hover) {
  .tour-card:hover { --h: 0.45; transform: translateY(-2px); }
  .tour-card:hover b .ai { transform: translateX(3px); color: var(--ink); }
}
.tour-card b {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.tour-card b .ai { color: var(--ink-3); transition: transform 180ms var(--ease), color 140ms var(--ease); }
.tour-card span { font-size: 13.5px; color: var(--ink-3); line-height: 1.35; }

/* ==========================================================================
   Pricing, Privacy, Questions
   ========================================================================== */

.scr { position: relative; padding: clamp(80px, 11.5svh, 140px) 0; scroll-margin-top: calc(var(--head-h) + 12px); }
.scr .wrap { width: var(--col); }
@keyframes sec-rise { from { opacity: 0; transform: translate3d(0, 24px, 0); } to { opacity: 1; transform: none; } }

.price-head { display: grid; gap: clamp(16px, 2.6svh, 26px); }
.price-head h2 { font-size: clamp(36px, 5vw, 74px); line-height: 1.02; letter-spacing: -0.042em; }
.price-head p { max-width: 40em; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.52; color: var(--ink-2); }
.plans { margin-top: clamp(36px, 6svh, 68px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 18px); }
.plan { display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 2.2vw, 32px); border-radius: 20px; background: var(--sheet); box-shadow: 0 0 0 1px var(--rule), var(--shadow-1); }
.plan-pop { box-shadow: 0 0 0 1.75px var(--ink), var(--shadow-2); }
.pl-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.pl-name h3 { font: inherit; letter-spacing: inherit; }
.pl-pop { padding: 3px 8px; border-radius: 6px; background: var(--rail-on); font-size: 12.5px; font-weight: 600; color: var(--ink); }
.pl-price { display: flex; align-items: baseline; gap: 8px; margin-top: clamp(8px, 2svh, 22px); }
.pl-price b { font-size: clamp(36px, 3.4vw, 52px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; }
.pl-price span { font-size: 15px; color: var(--ink-3); }
.pl-price b.is-long { font-size: clamp(30px, 2.7vw, 42px); }
.pl-price b.is-longer { font-size: clamp(24px, 2.1vw, 32px); }
.pl-ai { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 16px; color: var(--ink-2); line-height: 1.45; }
.pl-ai b { color: var(--ink); font-weight: 600; }
.fine { margin-top: 22px; max-width: 62em; font-size: 15px; line-height: 1.52; color: var(--ink-3); }
.fine a { text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 4px; }
.fine a:hover { text-decoration-color: currentColor; }

.priv-title { font-size: clamp(36px, 5.4vw, 84px); line-height: 1.02; letter-spacing: -0.045em; }
.priv-list { margin-top: clamp(32px, 6svh, 64px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 44px); }
.priv-list li { padding-top: 16px; border-top: 1px solid var(--rule-ink); font-size: clamp(18px, 1.75vw, 26px); font-weight: 500; line-height: 1.3; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.priv-more { margin-top: clamp(28px, 5svh, 48px); font-size: 16px; }
.priv-more a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 5px; }
.priv-more a:hover { text-decoration-color: currentColor; }

.faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 88px); align-items: start; }
.faq h2 { font-size: clamp(34px, 4.6vw, 70px); letter-spacing: -0.04em; line-height: 1.02; }
.faq-list { border-top: 1px solid var(--rule-ink); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 14px 0; cursor: pointer; list-style: none; font-size: clamp(17px, 1.45vw, 21px); font-weight: 600; letter-spacing: -0.016em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary h3 { font: inherit; letter-spacing: inherit; }
.faq-list summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px; border-right: 1.6px solid var(--ink-2); border-bottom: 1.6px solid var(--ink-2); transform: translateY(-3px) rotate(45deg); transition: transform 180ms var(--ease); }
.faq-list details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq-list details p { padding: 0 0 22px; color: var(--ink-2); max-width: 40em; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.55; }

/* ==========================================================================
   Close: Keynote Finale
   ========================================================================== */

.close {
  position: relative; display: flex; flex-direction: column;
  min-height: calc(100svh - var(--foot-h, 0px));
  padding-top: calc(var(--head-h) + clamp(24px, 5svh, 64px));
}
.close-in { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 var(--gutter); }
.close-title { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, min(11vw, 15.5svh), 158px); line-height: 0.98; letter-spacing: -0.025em; }
.close-title .close-l1 {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.66em;
  line-height: 1.04;
  letter-spacing: -0.044em;
  margin-bottom: 0.08em;
}
.close-title em { font-style: italic; }
.close-sub { margin-top: clamp(20px, 3.4svh, 36px); max-width: 30em; color: var(--ink-2); font-size: clamp(17px, 1.5vw, 22px); line-height: 1.45; text-wrap: balance; }
.close .reserve { margin-top: clamp(22px, 3.6svh, 36px); }
.close-when { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: end; margin-top: clamp(36px, 7svh, 88px); padding: 0 var(--gutter) clamp(36px, 7svh, 80px); font-size: 14.5px; color: var(--ink-3); }
.close-when p { display: grid; line-height: 1.3; }
.close-when b { color: var(--ink); font-weight: 600; font-size: clamp(16px, 1.3vw, 19px); letter-spacing: -0.012em; }
.when-b { text-align: right; }
.when-wave { grid-column: 1 / -1; display: block; width: calc(100% + 2 * var(--gutter)); height: clamp(26px, 3.4vw, 46px); margin: 12px calc(-1 * var(--gutter)) 0; overflow: visible; }
.when-wave path { fill: none; stroke: var(--ink); stroke-width: 1.75px; stroke-linecap: round; vector-effect: non-scaling-stroke; }

@keyframes close-rise { from { opacity: 0; transform: translate3d(0, 24px, 0); } to { opacity: 1; transform: none; } }
@keyframes wave-draw { from { clip-path: inset(-24px 100% -24px 0); } to { clip-path: inset(-24px -2px -24px 0); } }
.live .close:not(.play) .close-in, .live .close:not(.play) .when-a, .live .close:not(.play) .when-b { opacity: 0; }
.live .close:not(.play) .when-wave { clip-path: inset(-24px 100% -24px 0); }
.live .close .hl::before { clip-path: inset(0 100% 0 0); }
.live .close.play .close-in { animation: close-rise 320ms var(--ease-out) backwards; }
.live .close.play .hl::before { animation: swipe 360ms var(--pen-ease) 380ms forwards; }
.live .close.play .when-a { animation: fade-in 280ms var(--ease) 560ms backwards; }
.live .close.play .when-wave { animation: wave-draw 1150ms var(--ease) 680ms both; }
.live .close.play .when-b { animation: rise 280ms var(--ease-out) 1720ms backwards; }

.site-footer { padding: 36px 0 44px; border-top: 1px solid var(--rule); }
.site-footer .wrap { width: var(--col); }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.foot .brand { font-size: 16px; }
.foot .brand .nf-mark { width: 22px; height: 22px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 4px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink-2); font-size: 14.5px; }
.foot-links a:hover { color: var(--ink); }
.foot-copy { margin-left: auto; font-size: 13.5px; color: var(--ink-3); }
@media (max-width: 480px) { .foot-links { display: grid; grid-template-columns: repeat(3, max-content); gap: 0 4px; } }

/* ==========================================================================
   Tablet & Mobile Responsive Design
   ========================================================================== */

@media (max-width: 1060px) {

  .loop-panel,
  .social-chal,
  .studio-desk { grid-template-columns: minmax(0, 1fr); }
  .tour-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .priv-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px clamp(20px, 3vw, 44px); }
  .faq-wrap { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .hero {
    padding-top: calc(var(--head-h) + 20px);
    padding-bottom: 56px;
  }
  .hero-stage { font-size: clamp(38px, 11.4vw, 62px); letter-spacing: -0.038em; }
  .hero-anchor { font-size: clamp(32px, 9vw, 50px); }
  .hero-index-row { width: 100%; flex-direction: column; gap: 4px; }
  .hero-tabs { width: 100%; gap: 0 18px; }
  .hero-tab { height: 36px; font-size: 13.5px; }
  .hero-index-sep { display: none; }
  .hero-pause { margin: 0; }
  .hero-form { width: min(100%, 420px); }


  .chap { padding: 60px 0; }
  .loop-band { padding: 68px 0; }
  .chap-title { font-size: clamp(30px, 8.6vw, 44px); }
  .desk-well { padding: 14px; border-radius: 22px; }
  .focus-stage-card { padding: 16px 12px; border-radius: 22px; }
  .fr-window { min-height: 390px; }
  .fr-top { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 10px; }
  .fr-top > span:first-child { display: none; }
  .fr-tools { justify-content: center; }
  .fr-clock-host,
  .fr-window.is-focusing .fr-clock-host { --fr-w: clamp(118px, 36vw, 164px); }
  .focus-bar, .fd-acts, .fd-right { justify-content: center; }
  .loop-stage { padding: 20px 16px; border-radius: 22px; }
  .loop-seg { max-width: 100%; overflow-x: auto; }
  .loop-seg button { height: 38px; padding: 0 12px; font-size: 13.5px; }
  .lp-sheet { padding: 18px 16px; }
  .ed-score-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ch { padding: 18px 16px 20px; }
  .ch-opt { height: 52px; font-size: 15.5px; }
  .ch-res-top { flex-direction: column; align-items: flex-start; gap: 12px; }
  .tour-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .scr { padding: 60px 0; }
  .plans { margin-top: 28px; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .plan { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 12px; padding: 16px 18px; }
  .pl-name { justify-content: flex-start; flex-wrap: wrap; gap: 0 10px; }
  .pl-price { margin-top: 0; }
  .pl-price b { font-size: 30px; }
  .pl-price b.is-long { font-size: 26px; }
  .pl-price b.is-longer { font-size: 22px; }
  .pl-ai { grid-column: 1 / -1; padding-top: 10px; font-size: 15px; }
  .fine { font-size: 14px; }
  .priv-list { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 28px; }
  .priv-list li { font-size: 18px; padding-top: 12px; }
  .faq-list summary { min-height: 60px; font-size: 17px; }
  .faq-list details p { font-size: 15.5px; }
  .foot-copy { margin-left: 0; }
  .close-when { font-size: 13px; }
}

@media (max-width: 520px) {
  .hero-form,
  .close .reserve {
    flex-direction: column;
    gap: 10px;
    width: min(100%, 400px);
  }
  .hero-form input[type="email"],
  .close .reserve input[type="email"] {
    flex: none;
    width: 100%;
    height: 48px;
  }
  .hero-form .btn,
  .close .reserve .btn { width: 100%; }
  .tour-row { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .nfw { transform: none !important; }
}

/* ==========================================================================
   The keynote: the scroll is the playhead
   Everything here is under .live (scripting, and no request for reduced
   motion): without it the page stands at rest, exactly as it is written.
   Nothing moves by itself: each scene is as far along as the scroll has
   brought it (main.js, "The keynote"), and goes back with it.
   ========================================================================== */

/* ---- The opening: the window lands, the copy falls behind ---- */
.showcase-wrap { position: relative; z-index: 2; }
.live .hero-inner { will-change: transform; }
.live .nfw {
  transform: translate3d(0, var(--win-y, 0px), 0) scale(var(--win-s, 1));
  box-shadow:
    0 0 0 1px var(--rule-2),
    0 calc(28px + 30px * var(--win-h, 0)) calc(68px + 52px * var(--win-h, 0)) calc(-20px - 8px * var(--win-h, 0)) rgb(var(--shade) / calc((0.22 + 0.05 * var(--win-h, 0)) * var(--shade-k))),
    0 6px 16px -4px rgb(var(--shade) / calc(0.08 * var(--shade-k)));
}
/* Opening at the top, the window is already where the scroll will find it,
   so nothing jumps when the film's script arrives. */
.live.opening .nfw { --win-y: 44px; --win-s: 0.95; --win-h: 1; }

/* ---- Loose sheets round the window ---- */
.loose { display: none; }
@media (min-width: 900px) {
  .live .loose { display: block; position: absolute; inset: 0; z-index: 3; pointer-events: none; }
  .ls {
    --h: 0.3;
    position: absolute;
    width: 176px;
    padding: 13px 15px 12px;
    border-radius: 16px;
    background: var(--sheet);
    color: var(--ink);
    text-align: left;
    pointer-events: auto;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    transform: rotate(var(--r0, 0deg));
    will-change: transform;
  }
  .ls.is-held { cursor: grabbing; }
  @supports (corner-shape: squircle) { .ls { corner-shape: squircle; border-radius: 24px; } }
  .ls-meta, .ls-foot { display: block; font-size: 12.5px; line-height: 1.3; color: var(--ink-3); }
  .ls-q, .ls-t { margin: 9px 0 12px; font-size: 16.5px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
  .ls-t { margin: 8px 0 4px; }
  .ls-quote { margin: 7px 0 9px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
  .ls-line { margin-top: 8px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
  .ls-ring { position: relative; display: inline-block; padding: 8px 22px 6px 14px; }
  .ls-ring > span { font-family: var(--serif); font-size: 44px; line-height: 0.95; }
  .ls-ring i { font-style: normal; color: var(--ink-3); }
  .ls-ring .ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-3deg); pointer-events: none; }

  /* Two sheets beside the sign-up line on a laptop... */
  .ls-card { --r0: -6deg; left: -4px; top: -150px; }
  .ls-score { --r0: 5deg; right: -2px; top: -164px; width: 168px; }
  .ls-plan, .ls-cite { display: none; }
}
/* ...and four on a desk wide enough to leave the copy clear. */
@media (min-width: 1360px) {
  .ls { width: 204px; padding: 15px 17px 14px; }
  .ls-card { --r0: -7deg; left: -6px; top: -268px; }
  .ls-score { --r0: 5deg; right: 2px; top: -292px; width: 190px; }
  .ls-plan { --r0: 4deg; display: block; left: 74px; top: -112px; width: 188px; }
  .ls-cite { --r0: -3.5deg; display: block; right: 60px; top: -138px; width: 226px; }
  .ls-ring > span { font-size: 52px; }
}

/* ---- A line to itself ---- */
.say { position: relative; padding: clamp(64px, 11svh, 132px) var(--gutter); }
.say-pin { display: grid; place-items: center; }
.say-line {
  max-width: 17em;
  margin: 0 auto;
  text-align: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(30px, 4.7vw, 66px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-wrap: balance;
}
.say-line em {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1.08em;
  line-height: 1.02;
  letter-spacing: -0.022em;
}
.live .say { height: 170svh; padding-block: 0; }
.live .say-pin { position: sticky; top: 0; height: 100svh; }
/* Ink drying: a word lands faint and steps into ink. Colour only. */
.live .say.is-split .say-w { color: var(--ink-4); transition: color 150ms var(--ease); }
.live .say.is-split .say-w[data-s="1"] { color: var(--ink-3); }
.live .say.is-split .say-w[data-s="2"] { color: var(--ink-2); }
.live .say.is-split .say-w[data-s="3"] { color: var(--ink); }
.live .say.is-split .hl .say-w[data-s="3"] { color: var(--hl-ink); }
@media (max-width: 760px) { .live .say { height: 150svh; } }

/* ---- A scene that holds the screen while the scroll plays it ---- */
.pin-mark, .pin-tail { display: block; height: 0; }
.live .is-pinned { position: sticky; top: var(--pin-top, 80px); }

/* Focus, scrubbed: the Start key goes down (--kp), the chrome clears (--fb)
   and the clock grows in its frame (--fc). */
@media (min-width: 761px) {
  /* The leaves keep one size while the scroll has them: the growing is the
     scene's, not the running clock's. */
  .fr-window.is-scrub .fr-clock-host,
  .fr-window.is-scrub.is-focusing .fr-clock-host { --fr-w: clamp(140px, 24vw, 256px); }
}
.fr-window.is-scrub .fr-chrome { transition: none; opacity: calc(1 - var(--fb, 0)); }
.fr-window.is-scrub .fr-clock-host { transition: none; transform: scale(calc(1 + 0.12 * var(--fc, 0))); }
.fd-start.is-scrub {
  transition: background-color 110ms var(--ease);
  transform: translateY(calc(2px * var(--kp, 0))) scale(calc(1 - 0.012 * var(--kp, 0)));
  box-shadow: 0 calc(2px * (1 - var(--kp, 0))) 0 var(--key-edge), 0 4px 8px -3px rgb(var(--shade) / calc(0.28 * (1 - 0.6 * var(--kp, 0)) * var(--shade-k)));
}

/* ---- The lights going down ---- */
.lights { position: fixed; z-index: 3; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; background: var(--paper); pointer-events: none; }
.lights[hidden] { display: none; }
.live .loop-band { z-index: 4; }
