/* Kaviyam · the galley proof
   ---------------------------------------------------------------------------
   The page is the paper. Tiro Tamil sets every word of English and Tamil.
   The red pen (Nanum Pen Script, crimson) only ever corrects or annotates.
   Anything that depicts the product (the approval card) uses the product's own
   faces (Inter Tight, JetBrains Mono) and its dark tokens, in both themes.
   Flat: no shadows, no rotation. Print furniture is hairlines and crop marks.
   This is the only stylesheet. Every page loads it and nothing else.

   Sections of this file
     1  tokens            7  routing slip       13 kinds, name, dictionary, imprint
     2  base              8  contents list      14 page head, sequence, lapse, answers,
     3  masthead, footer  9  marking, five, pair    form, contact, 404
     4  grid              10 tester, samples    15 motion
     5  pen and marks     11 the card           16 narrower screens
     6  hero              12 limits, slip
   Version two (shared, reusable on every page):
     17 the colour system applied: --label, .swipe, .colourbar (+ .colourbar-sm for the slug)
     18 big section numbers (.sec-no.is-big), routing slip boxes as links, .is-you in blue pencil
     19 the contact sheet: .lighttable > .frames > .frame (.frame-head/-n/-what/-tag), .galley,
        .social, .reel (scroll-snap strip + [data-reel] script), .brands/.swatch/.chip, .vid
     20 §2 compact mark sheet with the gold swipe, .banned-strip, the decision log's pencil marks
     21 §4 .docket (who = blue pencil) and the .dryrun specimen
     22 the name in gold/crimson; .band, the crimson closing ask (place it after .sheet, inside main)
     23 motion and narrower screens for 17 to 22
     24 home: the logo drawn once (.logo-draw, keyframes kd-*); the static logo is in 3 (.brand-logo) */

/* ===== 1. tokens ========================================================= */
:root {
  /* faces */
  --f-text: "Tiro Tamil", "Iowan Old Style", "Palatino Linotype", Palatino, "Tamil Sangam MN", "Nirmala UI", Latha, Georgia, serif;
  --f-pen: "Nanum Pen Script", "Bradley Hand", "Segoe Print", "Chalkboard SE", cursive;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --f-ui: "Inter Tight", "Helvetica Neue", Arial, sans-serif;

  /* type scale, ratio about 1.333; fluid only for display sizes */
  --t-mono: 0.8125rem;                                   /* slugs, labels, line numbers */
  --t-sm: 1rem;                                          /* captions, small print */
  --t-base: 1.1875rem;                                   /* reading text */
  --t-lg: clamp(1.35rem, 1.2rem + 0.45vw, 1.6rem);       /* ledes, decks */
  --t-xl: clamp(1.9rem, 1.4rem + 1.6vw, 2.75rem);        /* h2 */
  --t-2xl: clamp(2.15rem, 1.3rem + 2.6vw, 3.5rem);       /* h1 */
  --t-tamil: clamp(3.5rem, 0.5rem + 16vw, 15rem);       /* the name, very large */
  --t-pen: 1.625rem;                                     /* handwriting; never below 1.5rem */
  --t-pen-lg: 2.125rem;                                  /* hand-given marks */

  /* space, 4pt steps with semantic names */
  --s-3xs: 0.25rem; --s-2xs: 0.5rem; --s-xs: 0.75rem; --s-sm: 1rem; --s-md: 1.5rem;
  --s-lg: 2rem; --s-xl: 3rem; --s-2xl: 4rem; --s-3xl: 6rem;
  --s-section: clamp(4.5rem, 3rem + 5vw, 8.5rem);        /* between sections */
  --gutter: clamp(1rem, 3.4vw, 3rem);                    /* page side gutter; 16px on a phone */

  /* grid: line-number gutter, text column, proof margin */
  --c-num: 2.75rem;
  --c-text: 44rem;
  --c-gap: clamp(1.25rem, 2.6vw, 2.75rem);
  --c-term: 13rem;                                       /* the term column of every term-and-definition list */
  --page-max: 80rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* light: the proof, read at midday */
  --paper: oklch(97.4% 0.01 80);
  --paper-2: oklch(95.1% 0.013 80);
  --paper-3: oklch(92.4% 0.015 78);
  --ink: oklch(21% 0.022 265);
  --ink-2: oklch(39% 0.02 265);
  --ink-3: oklch(49% 0.016 265);
  --rule: oklch(86% 0.012 75);
  --rule-2: oklch(75% 0.014 72);
  --rule-strong: oklch(21% 0.022 265);
  /* Colour has jobs. Each pen does one thing, and the colour bar (.colourbar) says so on the page.
     red pen      the gate's marks: strikes, queries, del., the unsourced ring; also the main button
     the logo     ink and its own red (#D4475A, every ground), from brand/kaviyam/logo; never the crimson
     blue pencil  the reader's own marks: the tick, the skip stroke, initials, stet. Never a link, never a fill
     gold         passed: the pass ring, the highlighter swipe, frame and section numbers; in dark, the small labels too
     crimson band the one closing ask on each page, cream type on crimson
     the pieces   slides, video and email keep their own colours inside their frames */
  --pen: #9C2B3A;                 /* red pen: drawn marks, and handwriting at 24px or more */
  --pen-ink: #9C2B3A;             /* red at text size (small labels such as "held"); always 4.5:1 */
  --pencil: #2B4C9B;              /* blue pencil: the reader's marks; holds 4.5:1, so small labels may use it */
  --gold: #A8842B;                /* the pass ring, as a drawn stroke; deeper on paper so it holds 3:1 */
  --gold-ink: #7E6019;            /* gold at text size: frame numbers, section numbers, kickers */
  --swipe: rgb(214 170 66 / 0.34);/* the gold highlighter behind a line that passed */
  --pen-sm: var(--gold-ink);      /* small accents (section and step numbers): gold, not red */
  --label: var(--ink-3);          /* small mono labels: grey on paper, gold at night */
  --tamil: #9C2B3A;               /* the very large name: crimson on paper, gold on night */
  --band: #9C2B3A;                /* the crimson band, same in both themes */
  --band-ink: #FBF4EA;
  --band-hover: #FFFAF2;
  --table: oklch(94.4% 0.016 80); /* the light table under the contact sheet */
  --frame-line: var(--rule-2);
  --page-paper: #FFFDF8;          /* a typeset page laid on the table (long post, social post) */
  --page-ink: #1B1E27;
  --page-mid: #5D6271;
  --focus: #9C2B3A;
  --btn: #9C2B3A;
  --btn-hover: oklch(40% 0.13 18);
  --btn-ink: oklch(98.5% 0.006 80);
  --field: oklch(98.8% 0.006 80);
  --logo-ink: #161A26;            /* the logo's ink on paper, exactly as the kit draws it */

  /* the product: always night, in both themes */
  --k-night: #0A0D14;
  --k-raise: #12151C;
  --k-raise-2: #171B24;
  --k-line: #1C2029;
  --k-line-2: #262B36;
  --k-text: #ECEEF3;
  --k-mid: #8A93A6;
  --k-crimson: #9C2B3A;
  --k-gold: #C9A14A;

  color-scheme: light;
}

/* dark: the product's own night */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0A0D14;
    --paper-2: #12151C;
    --paper-3: #171B24;
    --ink: #ECEEF3;
    --ink-2: oklch(81% 0.012 265);
    --ink-3: #8A93A6;
    --rule: #262B36;            /* one step up from the product line, so separators hold on night */
    --rule-2: #3D4452;
    --rule-strong: oklch(52% 0.015 265);
    --pen: #D4475A;             /* stays red, not pink */
    --pen-ink: #EC6A64;         /* red at text size on night: 5:1 or better */
    --pencil: #7EA2F5;          /* blue pencil, not cyan */
    --gold: #C9A14A;
    --gold-ink: #C9A14A;
    --swipe: rgb(201 161 74 / 0.26);
    --pen-sm: #C9A14A;
    --label: #C9A14A;           /* in dark the gold carries the small mono labels */
    --tamil: #C9A14A;
    --table: #11141B;           /* the light table at night: one step up from the page */
    --frame-line: #2E3442;
    --page-paper: #F3EEE3;
    --page-ink: #1B1E27;
    --page-mid: #5D6271;
    --focus: #D4475A;
    --btn: #B23445;             /* lifted, so the button outranks the handwriting on night */
    --btn-hover: #C23C4E;
    --btn-ink: #F3F0F1;
    --field: #171B24;           /* one step above the slip and tester surface, so fields show on both */
    --logo-ink: #ECEEF3;        /* the logo's ink on night */
    color-scheme: dark;
  }
}
/* ===== 2. base =========================================================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: var(--t-base);
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
p, h1, h2, h3, h4, ol, ul, dl, dd, figure, fieldset, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-weight: 400; }
b, strong { font-weight: 400; }  /* Tiro Tamil has no bold; emphasis comes from size, italic and space */
a { color: inherit; }
p { text-wrap: pretty; }
img, svg { display: block; }
::selection { background: color-mix(in oklch, var(--pen) 22%, var(--paper)); color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[lang="ta"] { font-family: var(--f-text); font-style: normal; }
/* a struck word inside a specimen of bad copy: the twenty, the will-not list, inline examples */
[data-specimen] s { text-decoration: line-through; text-decoration-color: var(--pen); text-decoration-thickness: 0.085em; color: var(--ink-2); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -5rem; z-index: 20;
  background: var(--ink); color: var(--paper); padding: var(--s-2xs) var(--s-sm);
  font-family: var(--f-mono); font-size: var(--t-mono); text-decoration: none;
}
.skip:focus { top: var(--s-xs); }
main:focus { outline: none; }

/* buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.55rem 1.35rem 0.5rem;
  font-family: var(--f-text); font-size: 1.125rem; line-height: 1.1;
  color: var(--btn-ink); background: var(--btn);
  border: 1px solid var(--btn); border-radius: 3px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms var(--ease);
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline-color: var(--focus); outline-offset: 3px; }
.btn-sm { min-height: 2.5rem; padding: 0.4rem 0.95rem 0.35rem; font-size: 1rem; }
.link {
  font-style: italic; text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: var(--ink-3); text-underline-offset: 0.22em;
  transition: text-decoration-color 160ms var(--ease);
}
.link:hover { text-decoration-color: var(--pen); }
.addr { font-family: var(--f-mono); font-size: 0.86em; letter-spacing: 0; user-select: all; -webkit-user-select: all; }
kbd {
  font-family: var(--f-mono); font-size: 0.75rem; font-weight: 500;
  display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.3rem;
  border: 1px solid var(--rule-2); border-bottom-width: 2px; border-radius: 4px;
  color: var(--ink); background: var(--paper); line-height: 1;
}

/* ===== 3. masthead and footer ============================================ */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead-in {
  max-width: var(--page-max); margin: 0 auto; padding: var(--s-sm) var(--gutter);
  display: flex; align-items: center; gap: var(--s-sm) var(--s-lg); flex-wrap: wrap;
}
/* the logo: the kit's pixel-snapped header lockup, pasted inline (ink is currentColor, the red is fixed).
   Shown at exactly 35px tall, its own size; the link is 45px tall so it sits on whole pixels, centred. */
.brand { display: inline-flex; align-items: center; min-height: 45px; color: var(--logo-ink); text-decoration: none; }
.brand-logo { width: 140px; height: 35px; flex: none; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-md); margin-left: auto; }
.nav a {
  font-family: var(--f-text); font-size: 1.0625rem; text-decoration: none; color: var(--ink-2);
  padding: var(--s-2xs) 0; min-height: 2.75rem; display: inline-flex; align-items: center;
  text-decoration-line: underline; text-decoration-color: transparent; text-underline-offset: 0.3em;
}
.nav a:hover { color: var(--ink); text-decoration-color: var(--rule-2); }
.nav a[aria-current="page"] { color: var(--ink); text-decoration-color: var(--pen); }

.site-foot { border-top: 1px solid var(--rule-strong); margin-top: var(--s-section); }
.foot-in {
  max-width: var(--page-max); margin: 0 auto; padding: var(--s-xl) var(--gutter) var(--s-2xl);
  display: grid; grid-template-columns: 1.1fr 0.8fr 1.1fr 1.2fr; gap: var(--s-xl) var(--s-lg);
  font-size: var(--t-sm); color: var(--ink-2);
}
.foot-brand { display: grid; gap: var(--s-2xs); align-content: start; }
.foot-brand .brand { margin-bottom: var(--s-2xs); justify-self: start; }
.foot-tag { font-style: italic; color: var(--ink); font-size: 1.125rem; }
.foot-h {
  font-family: var(--f-mono); font-size: var(--t-mono); font-weight: 400; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s-xs);
}
.foot-nav { display: grid; align-content: start; }
.foot-nav a { text-decoration: none; padding: 0.3rem 0; color: var(--ink-2); }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--pen); text-underline-offset: 0.25em; }
.key { display: grid; gap: 0.15rem; }
.key > div { display: grid; grid-template-columns: 3.25rem 1fr; align-items: center; min-height: 2.1rem; }
.key dt { color: var(--ink); display: flex; align-items: center; }
.key-strike { text-decoration: line-through; text-decoration-color: var(--pen); text-decoration-thickness: 2px; color: var(--ink-2); }
.key .mk-caret { width: 1.15rem; height: 1.15rem; }
.key-pen { font-family: var(--f-pen); color: var(--pen) !important; font-size: 1.5rem; line-height: 1; }
.key-pen .q { width: 1.75rem; height: 1.75rem; font-size: 1.5rem; }
.key-ring { width: 2rem; height: 1.3rem; border: 2px solid var(--gold); border-radius: 50% 46% 52% 44%; }
.foot-colophon p { max-width: 30ch; }

/* ===== 4. the sheet and its grid ========================================= */
/* .sheet is <main>. Every section is built from .row: a line-number gutter (.num),
   the text column (any child), and the proof margin (.note or .margin).
   .span runs a child across text and margin; .full runs it across all three. */
.sheet {
  position: relative;
  max-width: var(--page-max); margin: 0 auto;
  padding: var(--s-md) var(--gutter) 0;
}
/* crop marks at the head of the sheet */
.sheet::before, .sheet::after {
  content: ""; position: absolute; top: 0.6rem; width: 1.1rem; height: 1.1rem; pointer-events: none;
  border: 0 solid var(--rule-2);
}
.sheet::before { left: calc(var(--gutter) - 1.5rem); border-width: 1px 0 0 1px; }
.sheet::after { right: calc(var(--gutter) - 1.5rem); border-width: 1px 1px 0 0; }

.slug {
  display: flex; flex-wrap: wrap; gap: var(--s-3xs) var(--s-md);
  font-family: var(--f-mono); font-size: var(--t-mono); color: var(--ink-3); letter-spacing: 0.02em;
  padding-bottom: var(--s-xs); border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(var(--s-lg), 4vw, var(--s-2xl));
}
.slug-end { margin-left: auto; }

.row {
  display: grid;
  grid-template-columns: var(--c-num) minmax(0, var(--c-text)) minmax(0, 1fr);
  column-gap: var(--c-gap);
  align-items: start;
}
.row > * { grid-column: 2; min-width: 0; }
.row > .num { grid-column: 1; }
.row > .note, .row > .margin, .row > .aside-mono { grid-column: 3; }
.row > .span { grid-column: 2 / 4; }
.row + .row { margin-top: var(--s-lg); }

.num {
  font-family: var(--f-mono); font-size: var(--t-mono); color: var(--ink-3);
  text-align: right; padding-top: 0.55em; font-variant-numeric: tabular-nums;
}
.sec { margin-top: var(--s-section); }
/* rhythm: a section that carries on a thought sits closer; the name and the close get more air */
.sec.sec-tight { margin-top: clamp(var(--s-xl), 2rem + 3vw, 4.5rem); }
.sec.sec-loose { margin-top: clamp(6rem, 4rem + 6vw, 10rem); }
.sec-head { align-items: baseline; }
.sec-head h2 {
  font-size: var(--t-xl); line-height: 1.08; letter-spacing: -0.012em; text-wrap: balance;
  padding-top: var(--s-sm); border-top: 1px solid var(--rule-strong);
}
/* the section rule runs the full width of the sheet, text column and proof margin both,
   so it meets the right edge of anything below it that is set .span */
.sec-head > h2 { grid-column: 2 / 4; }
.sec-no { color: var(--pen-sm); font-size: var(--t-sm); padding-top: 0; }
.row:not(.sec-head) > .sec-no { padding-top: var(--s-sm); }  /* a numbered row with no heading row (contact) */
.sec .sec-head + .row { margin-top: var(--s-md); }
/* sec-near: a section that carries straight on from the page head (the tester, the return slip) */
.sec-near { margin-top: clamp(var(--s-lg), 4vw, var(--s-2xl)); }

.lede { font-size: var(--t-lg); line-height: 1.4; max-width: 34ch; text-wrap: pretty; }
.sub { font-size: var(--t-lg); font-style: italic; line-height: 1.2; }
h3.sub { padding-top: var(--s-sm); border-top: 1px solid var(--rule); }
.row:has(> * > h3.sub) { margin-top: var(--s-xl); }
.sub-text { max-width: 44rem; color: var(--ink-2); margin-top: var(--s-2xs); }
.stack { display: grid; gap: var(--s-sm); align-content: start; }
.stack > p:not([class]) { max-width: 40rem; }
.runin { font-style: italic; color: var(--ink); }
.aside-mono { font-style: italic; font-size: var(--t-sm); color: var(--ink-2); line-height: 1.45; max-width: 17rem; }

/* ===== 5. the pen, and the proof-reader's marks ========================== */
/* .note: a handwritten margin note. It sits in the proof margin on wide screens
   and directly under its line, on a drawn leader, on narrow ones. Keep each note
   to something worth saying. Never below 1.5rem: the dark pen is only legible large. */
.note {
  position: relative; display: block;  /* block even on a span, so it can sit under its line */
  font-family: var(--f-pen); color: var(--pen); font-size: var(--t-pen); line-height: 1.02;
  max-width: 16rem; padding-top: 0.15em; font-weight: 400;
}
.note b { font-weight: 400; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.12em; }
.note p { margin: 0; }
.note > .mk { margin-bottom: var(--s-3xs); }

/* attached note: a .note placed inside a text-column element marked .has-note,
   right after the words it marks. Wide screens hang it in the proof margin level
   with that element; narrow screens leave it in place, under the line. */
@media (min-width: 72.01rem) {
  .has-note { position: relative; }
  .has-note > .note { position: absolute; top: 0; left: calc(100% + var(--c-gap)); width: 15.5rem; margin: 0; }
}

/* inline svg marks; strokes take the pen colour */
.mk { overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; color: var(--pen); }
.mk path { vector-effect: non-scaling-stroke; }
.mk-caret { width: 1.5rem; height: 1.5rem; }
.mk-dele { width: 2.75rem; height: 1.5rem; }
/* ins: words the pen inserts at a caret, written in the running line */
.mk-inline { display: inline-block; width: 1.1rem; height: 1.1rem; margin: 0 0.1rem 0 0.25rem; vertical-align: -0.05em; }
.ins { font-family: var(--f-pen); font-style: normal; color: var(--pen); font-size: var(--t-pen-lg); line-height: 1; }
.ins-at { white-space: nowrap; }

/* ring: a drawn loop round a mark. Gold = passed; default pen = query or fail */
.ring { position: relative; display: inline-grid; place-items: center; width: 6.25rem; height: 3.4rem; color: var(--pen); }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ring svg path { vector-effect: non-scaling-stroke; }
.ring-gold { color: var(--gold); }
.ring-text { font-family: var(--f-pen); font-size: var(--t-pen-lg); color: var(--pen); line-height: 1; padding-top: 0.12em; }
.by-hand {
  display: block; font-family: var(--f-mono); font-size: 0.6875rem; font-weight: 400;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); font-style: normal;
}

/* q: the circled query mark */
.q {
  display: inline-grid; place-items: center; width: 1.85rem; height: 1.85rem; vertical-align: -0.16em;
  border: 2px solid currentColor; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: var(--pen);
}

/* strike: a struck specimen of bad copy. Always inside data-specimen. */
.strike {
  background-image: linear-gradient(var(--pen), var(--pen));
  background-repeat: no-repeat; background-position: 0 60%; background-size: 100% 0.08em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  color: var(--ink-2);
}

/* query: a ring round an unsourced figure */
.query, mark.query {
  position: relative; display: inline-block; padding: 0 0.32em; margin: 0 0.06em;
  background: none; color: var(--ink); font-style: normal;
}
.query::after {
  content: ""; position: absolute; inset: -0.16em -0.04em -0.06em;
  border: 2px solid var(--pen); border-radius: 48% 52% 45% 55% / 55% 48% 52% 45%;
  pointer-events: none;
}

/* ===== 6. hero =========================================================== */
.hero .row + .row { margin-top: var(--s-sm); }
.specimen-line {
  font-size: clamp(1.15rem, 0.95rem + 0.7vw, 1.5rem); line-height: 1.35; font-style: italic; text-wrap: balance;
}
.note-del { display: flex; gap: var(--s-2xs); align-items: flex-start; max-width: 17rem; }
.note-del .mk-dele { flex: none; margin-top: 0.1em; }
.hero-h1 { margin-top: var(--s-md) !important; }
.num-caret { padding-top: 0.35em; display: flex; justify-content: flex-end; }
.num-caret .mk-caret { width: 1.75rem; height: 1.75rem; }
h1 {
  font-size: var(--t-2xl); line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance;
}
/* the home h1 sits on the standard text column and must set in three lines at most */
.hero h1 { font-size: clamp(2.15rem, 1.3rem + 2.4vw, 3.15rem); }
.note-mark { display: grid; justify-items: start; gap: var(--s-2xs); padding-top: 0; }
.note-mark .ring + .by-hand { margin-top: -0.25rem; padding-left: 0.4rem; }
.note-mark p { margin-top: var(--s-2xs); color: var(--pencil); }  /* stet is the reader's mark: blue pencil */
.deck { font-size: var(--t-lg); line-height: 1.42; max-width: 40ch; }
.hero .deck { max-width: 48ch; }
.hero-deck { margin-top: var(--s-md) !important; }
.hero-cta { align-items: center; margin-top: var(--s-lg) !important; }
/* wide screens: the two hero notes hang into the margin below their rows instead of
   stretching them, so the struck line and the h1 set tight and the button stays on the first screen */
@media (min-width: 72.01rem) {
  .hero-specimen > .note, .hero-h1 > .note { margin-bottom: -14rem; }
  .hero-specimen > .note-del { max-width: 22rem; }
  .hero-h1 > .note-mark { margin-top: 0.75rem; }
}
/* a narrower margin sets the del. note in three lines: drop the ring clear of it */
@media (min-width: 72.01rem) and (max-width: 84rem) { .hero-h1 > .note-mark { margin-top: 2.25rem; } }
.cta-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-sm) var(--s-lg); }
.cta-line .link { padding: var(--s-2xs) 0; }
.or { color: var(--ink-2); }

/* ===== 7. routing slip =================================================== */
.routing-row { margin-top: clamp(var(--s-xl), 6vw, var(--s-3xl)); }
.routing { border: 1px solid var(--rule-strong); }
.routing-head {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: var(--s-3xs) var(--s-md);
  padding: var(--s-xs) var(--s-sm); border-bottom: 1px solid var(--rule-strong);
  font-family: var(--f-mono); font-size: var(--t-mono); color: var(--ink-3); letter-spacing: 0.02em;
}
.routing-title { font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.routing-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: route; }
.routing-steps li {
  counter-increment: route; position: relative;
  display: grid; align-content: start; gap: 0.15rem;
  padding: var(--s-sm) var(--s-sm) var(--s-md);
}
.routing-steps li + li { border-left: 1px solid var(--rule-2); }
.routing-label { font-family: var(--f-mono); font-size: var(--t-mono); color: var(--ink-3); letter-spacing: 0.02em; }
.routing-label::before { content: counter(route) "  "; white-space: pre; color: var(--pen-sm); }
.routing-who { font-size: 1.5rem; line-height: 1.15; }
.routing-what { font-style: italic; color: var(--ink-2); font-size: var(--t-sm); }
.initials {
  display: block; width: 5.5rem; height: 2.1rem; margin-top: var(--s-2xs);
  border: 1px dashed var(--rule-2); position: relative;
}
.initials::after {
  content: "initials"; position: absolute; left: 0.35rem; bottom: 0.2rem;
  font-family: var(--f-mono); font-size: 0.625rem; color: var(--ink-3); letter-spacing: 0.04em;
}
.routing-foot {
  padding: var(--s-xs) var(--s-sm); border-top: 1px solid var(--rule-2);
  font-style: italic; color: var(--ink);
}

/* ===== 8. contents list (what lands each week) =========================== */
.contents { border-top: 1px solid var(--rule-strong); }
.contents li {
  position: relative; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) 4.5rem; column-gap: var(--s-sm);
  align-items: baseline; padding: var(--s-xs) 0 var(--s-sm); border-bottom: 1px solid var(--rule);
}
.contents-n { font-family: var(--f-mono); font-size: var(--t-mono); color: var(--ink-3); grid-row: 1 / span 2; }
.contents-what { font-size: 1.375rem; line-height: 1.25; grid-column: 2; }
.contents-how { grid-column: 2; color: var(--ink-2); font-style: italic; line-height: 1.4; }
.contents-kind {
  grid-column: 3; grid-row: 1; justify-self: end;
  font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.04em; color: var(--ink-2);
  border: 1px solid var(--rule-2); padding: 0.05rem 0.45rem; border-radius: 2px;
}
.is-file .contents-kind, .contents-kind.is-file { color: var(--ink); border-color: var(--ink-2); }
.contents-kind.is-inline { display: inline-block; margin-right: 0.4rem; padding: 0 0.4rem; line-height: 1.5; vertical-align: 0.1em; }
.contents li > .note { grid-column: 2 / -1; }
.contents-key {
  display: flex; flex-wrap: wrap; gap: var(--s-3xs) var(--s-md); margin-top: var(--s-xs);
  font-family: var(--f-mono); font-size: var(--t-mono); color: var(--ink-3); line-height: 1.6;
}
.contents-key b { font-weight: 500; color: var(--ink-2); margin-right: 0.35rem; }
.before { max-width: 40rem; color: var(--ink-2); }

/* ===== 9. the marking ==================================================== */
.marksheet-wrap { min-width: 0; }
.marksheet { width: 100%; border-collapse: collapse; }
.marksheet th, .marksheet td {
  text-align: left; vertical-align: middle; padding: var(--s-xs) var(--s-xs) var(--s-xs) 0;
  border-bottom: 1px solid var(--rule);
}
.marksheet thead th {
  font-family: var(--f-mono); font-size: var(--t-mono); font-weight: 400; color: var(--ink-3);
  letter-spacing: 0.02em; vertical-align: bottom; border-bottom-color: var(--rule-strong);
}
.marksheet thead th .by-hand { margin-top: 0.15rem; color: var(--pen-sm); }
.marksheet tbody th { font-weight: 400; width: 54%; line-height: 1.3; }
.marksheet .dim { display: block; font-style: italic; color: var(--ink-2); font-size: var(--t-sm); }
.marksheet td { width: 23%; }
.hand { font-family: var(--f-pen); color: var(--pen); font-size: var(--t-pen-lg); line-height: 1; display: inline-block; }
.marksheet tfoot th { font-weight: 400; }
.marksheet .total th, .marksheet .total td { border-top: 1px solid var(--rule-strong); border-bottom: 0; padding-top: var(--s-sm); }
.hand-ring { position: relative; padding: 0.05em 0.45em 0; font-size: 2.5rem; }
.hand-ring::after {
  content: ""; position: absolute; inset: -0.08em -0.08em 0.02em;
  border: 2px solid var(--pen); border-radius: 50% 46% 52% 44% / 52% 50% 46% 48%;
}
.hand-pass::after { border-color: var(--gold); }
.marksheet .verdict th, .marksheet .verdict td { font-style: italic; color: var(--ink-2); border-bottom: 0; padding-top: var(--s-2xs); }
@media (min-width: 47.51rem) { .marksheet .verdict td { white-space: nowrap; } }
.sheet-caption { margin-top: var(--s-sm); font-style: italic; color: var(--ink-2); font-size: var(--t-sm); }

/* track: a short horizontal sequence (the rewrite path) */
.track {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: var(--s-sm);
  border-top: 1px solid var(--rule-strong);
}
.track li { padding: var(--s-xs) var(--s-sm) var(--s-sm) 0; display: grid; gap: var(--s-3xs); align-content: start; }
.track li + li { padding-left: var(--s-sm); border-left: 1px solid var(--rule); }
.track-n { font-style: italic; color: var(--pen-sm); font-size: 1.125rem; }
.track p { line-height: 1.35; }
.track-stop p { font-size: 1.3rem; line-height: 1.25; }
.track-foot { margin-top: var(--s-xs); font-style: italic; color: var(--ink-2); }

/* banned: the twenty, numbered 01 to 20. Always inside data-specimen. */
.banned {
  columns: 4 12rem; column-gap: var(--s-lg); counter-reset: ban;
  margin-top: var(--s-md); padding: var(--s-sm) 0; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong);
}
.banned li {
  counter-increment: ban; break-inside: avoid;
  display: grid; grid-template-columns: 1.75rem 1fr; column-gap: var(--s-2xs); align-items: baseline;
  padding: 0.28rem 0; font-size: 1.1875rem; line-height: 1.3;
}
.banned li::before { content: counter(ban, decimal-leading-zero); font-family: var(--f-mono); font-size: var(--t-mono); color: var(--ink-3); }
.banned i { grid-column: 2; font-size: var(--t-sm); color: var(--ink-3); }
.banned li:target { background: var(--paper-3); }

.stat-specimen { font-size: 1.3rem; font-style: italic; color: var(--ink-2); margin-block: var(--s-2xs) var(--s-3xs); }
.note-query .q { margin-right: 0.15rem; }

/* five: the five marks, each with what it is worth under its name (the gate) */
.five { border-top: 1px solid var(--rule-strong); }
.five li {
  display: grid; grid-template-columns: 2.25rem minmax(0, 14rem) minmax(0, 1fr); column-gap: var(--s-md);
  align-items: baseline; padding: var(--s-sm) 0; border-bottom: 1px solid var(--rule);
}
.five-n { font-style: italic; color: var(--pen-sm); font-size: 1.125rem; grid-row: 1 / span 2; }
.five-what { font-size: 1.5rem; line-height: 1.2; grid-column: 2; }
.five-pts { font-family: var(--f-mono); font-size: var(--t-mono); color: var(--ink-3); white-space: nowrap; grid-column: 2; grid-row: 2; margin-top: var(--s-3xs); }
.five-how { color: var(--ink-2); line-height: 1.45; max-width: 34rem; grid-column: 3; grid-row: 1 / span 2; }
.five-foot { color: var(--ink-2); max-width: 44rem; }
.five-foot .link { color: var(--ink); margin-left: 0.25rem; }

/* pair: two short specimens side by side, ringed against let stand (the gate) */
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--rule-strong); }
.pair > div { display: grid; gap: var(--s-2xs); align-content: start; padding: var(--s-sm) var(--s-lg) var(--s-md) 0; }
.pair > div + div { padding-left: var(--s-lg); border-left: 1px solid var(--rule); }
.pair dt { font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.pair dd { font-size: 1.3rem; line-height: 1.5; font-style: italic; }
.pair-cap { padding: var(--s-xs) 0 0; border-top: 1px solid var(--rule); font-style: italic; color: var(--ink-2); font-size: var(--t-sm); }

/* ===== 10. the tester ==================================================== */
/* One component, two shapes.
   .tester-line  : a single line in, the proof under it (home page teaser)
   .tester-panes : your copy on the left, the marked proof on the right (/gate)
   Without JavaScript the field stays hidden and the pre-written proof shows. */
.tester {
  background: var(--paper-2); border: 1px solid var(--rule);
  padding: var(--s-md) clamp(var(--s-sm), 3vw, var(--s-xl)) var(--s-md);
  display: grid; gap: var(--s-xs);
}
.tester-label { font-family: var(--f-mono); font-size: var(--t-mono); color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.tester-input, .tester-text {
  width: 100%; font: inherit; font-size: var(--t-lg); line-height: 1.4; color: var(--ink);
  background: var(--field); border: 0; border-bottom: 1px solid var(--ink-2); border-radius: 0;
  padding: var(--s-2xs) var(--s-2xs) var(--s-2xs) 0; min-height: 3rem;
}
/* the line tester's field is a two-row textarea that grows, so a long line wraps instead of scrolling out of sight */
textarea.tester-input { display: block; resize: none; field-sizing: content; min-height: 3rem; overflow-wrap: anywhere; }
.tester-text { border: 1px solid var(--rule-2); padding: var(--s-sm); resize: vertical; min-height: 9rem; field-sizing: content; overflow-wrap: anywhere; }
.tester-input:focus, .tester-text:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.tester-out { font-size: var(--t-lg); line-height: 1.65; min-height: 1.65em; overflow-wrap: anywhere; }
.tester-out del { text-decoration: line-through; text-decoration-color: var(--pen); text-decoration-thickness: 0.09em; color: var(--ink-2); }
/* the key number sits just after the struck phrase, outside the <del>, so the strike stops
   at the phrase and the number stays inline (no break opportunity before a following stop) */
.tester-out sup {
  font-family: var(--f-mono); font-size: 0.75rem; color: var(--pen-ink); vertical-align: super;
  margin-left: 0.12em; line-height: 0; display: inline;
}
.tester-out sup a { text-decoration: none; color: inherit; padding: 0.35rem 0.2rem; margin: -0.35rem -0.2rem; }
.tester-out sup a:hover { text-decoration: underline; }
/* the hidden words and the key numbers stay out of a copied proof */
.tester-out .visually-hidden, .tester-out sup { -webkit-user-select: none; user-select: none; }
/* the two-pane proof keeps the paragraph breaks of what was pasted */
.tester-panes .tester-out { white-space: pre-wrap; }
.tester-verdict { font-family: var(--f-pen); color: var(--pen); font-size: var(--t-pen); line-height: 1.05; }
.tester-verdict.is-clean { color: var(--ink-2); }
.tester-foot { font-size: var(--t-sm); color: var(--ink-2); max-width: 52rem; }
.tester-nojs { font-style: italic; color: var(--ink-2); font-size: var(--t-sm); }
.tester-pane-h { font-family: var(--f-mono); font-size: var(--t-mono); color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: var(--s-2xs); }

.tester-panes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; padding: 0; }
.tester-panes > * { padding: var(--s-md) clamp(var(--s-sm), 2.5vw, var(--s-lg)); }
.tester-panes .tester-copy { border-right: 1px solid var(--rule-2); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-sm); align-content: start; }
.tester-panes .tester-proof { display: grid; gap: var(--s-sm); align-content: start; background: var(--paper); }
.tester-panes > .tester-foot { grid-column: 1 / -1; max-width: none; border-top: 1px solid var(--rule-2); padding-block: var(--s-sm); }

/* samples: sentences a reader can load into the two-pane tester (shown by the script).
   A full-width row under both panes, so the proof follows the copy on a phone. */
.tester-panes > .tester-samples { grid-column: 1 / -1; border-top: 1px solid var(--rule-2); padding-block: var(--s-sm) var(--s-md); }
.tester-samples { display: grid; gap: var(--s-2xs); }
.tester-samples .tester-pane-h { margin-bottom: 0; }
.samples { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); column-gap: var(--s-lg); border-top: 1px solid var(--rule-2); }
.sample {
  display: block; width: 100%; text-align: left; cursor: pointer; position: relative; min-height: 2.75rem;
  font-family: var(--f-text); font-style: italic; font-size: var(--t-sm); line-height: 1.4; color: var(--ink-2);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule-2); border-radius: 0;
  padding: var(--s-xs) var(--s-2xs) var(--s-xs) 1.6rem;
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.sample::before {
  content: "\2192" / ""; position: absolute; left: 0.2rem; top: var(--s-xs);
  font-family: var(--f-mono); font-style: normal; font-size: var(--t-mono); color: var(--ink-3); line-height: 1.75;
}
.sample:hover { color: var(--ink); background: var(--paper-3); }
.sample:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.sample[aria-pressed="true"] { color: var(--ink); }
.sample:hover::before, .sample[aria-pressed="true"]::before { color: var(--pen-sm); }

/* ===== 11. the card: desk, plate, product card, log ===================== */
.desk-row > .desk { grid-column: 2 / 4; }
.desk {
  display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 32rem) minmax(0, 1fr);
  gap: var(--s-lg) clamp(var(--s-md), 3vw, var(--s-xl)); align-items: start;
}
/* until the margin is wide enough to hold it, the log sits under the card */
@media (min-width: 72.01rem) and (max-width: 84rem) {
  .desk { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); }
  .desk .log { grid-column: 2; }
}
.desk-copy { display: grid; gap: var(--s-md); align-content: start; }
.desk-copy .lede { max-width: 18ch; }
.keylegend { border-top: 1px solid var(--rule-strong); }
.keylegend > div { padding: var(--s-xs) 0; border-bottom: 1px solid var(--rule); display: grid; gap: 0.2rem; }
.keylegend dt { display: flex; align-items: center; gap: var(--s-2xs); font-size: 1.25rem; }
.keylegend dd { color: var(--ink-2); font-size: var(--t-sm); line-height: 1.45; }
.desk-rule { font-style: italic; color: var(--ink-2); font-size: var(--t-sm); }

/* plate: a straight, unshadowed frame round a depiction of the product, with a caption */
.plate { border: 1px solid var(--rule-2); padding: clamp(0.75rem, 2vw, 1.5rem); background: var(--paper-2); }
.plate-cap { margin-top: var(--s-sm); font-style: italic; color: var(--ink-2); font-size: var(--t-sm); line-height: 1.45; }
/* the how-to line the script adds is its own small mono line, so no italic runs long */
.plate-how { display: block; margin-top: var(--s-3xs); font-style: normal; font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.02em; color: var(--ink-2); }

/* kcard: the product's approval card. Product faces and night tokens only. Identical in both themes. */
.kcard {
  background: var(--k-night); color: var(--k-text);
  border: 1px solid var(--k-line-2); border-radius: 12px;
  font-family: var(--f-ui); font-size: 0.9375rem; line-height: 1.5; font-weight: 400;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
.kcard:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.kcard.is-focused { outline: 2px solid var(--focus); outline-offset: 4px; }
/* when a key inside the card has the focus, the key carries the ring; the card's goes quiet */
.kcard.is-focused:not(:focus) { outline-color: var(--rule-2); }
.kc-top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-sm);
  padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--k-line);
}
.kc-brand { display: inline-flex; align-items: center; }
/* the kit's header lockup (night: the card is always the product's night), at its own 140x35, as in the film */
.kc-logo { display: block; width: 140px; height: 35px; flex: none; }
.kc-pos { font-family: var(--f-mono); font-size: 0.75rem; color: var(--k-mid); }
.kc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.95rem 1.1rem 0; }
.kc-chip {
  font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--k-line-2); border-radius: 4px; padding: 0.15rem 0.45rem; color: var(--k-text);
}
.kc-for { font-size: 0.8125rem; color: var(--k-mid); }
.kc-body { padding: 0.8rem 1.1rem 1.1rem; display: grid; gap: 0.65rem; min-height: 11.5rem; align-content: start; overflow-wrap: anywhere; }
.kc-body[contenteditable] { display: block; white-space: pre-wrap; background: var(--k-raise); outline: 1px solid var(--k-line-2); outline-offset: -1px; cursor: text; }
.kc-body:focus { outline: 2px solid var(--k-text); outline-offset: -2px; }
.kc-body p { margin: 0; }
.kc-done { display: grid; gap: 0.6rem; }
.kc-done strong { font-weight: 600; font-size: 1.0625rem; }
.kc-again {
  justify-self: start; margin-top: 0.4rem; min-height: 2.5rem;
  background: transparent; color: var(--k-text); border: 1px solid var(--k-line-2); border-radius: 6px;
  font: 500 0.8125rem/1 var(--f-ui); padding: 0.5rem 0.8rem; cursor: pointer;
}
.kc-again:hover { background: var(--k-raise-2); }
.kc-again:focus-visible { outline: 2px solid var(--k-text); outline-offset: 2px; }
.kc-mark {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem;
  margin: 0 1.1rem; padding: 0.8rem 0; border-top: 1px solid var(--k-line);
}
.kc-score { font-family: var(--f-mono); display: inline-flex; align-items: baseline; gap: 0.15rem; color: var(--k-mid); font-size: 0.8125rem; }
.kc-score b { font-weight: 500; font-size: 1.6rem; line-height: 1; color: var(--k-text); }
.kc-seal { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--k-gold); display: inline-flex; align-items: center; gap: 0.35rem; }
.kc-seal::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.kc-seal.is-void { color: var(--k-mid); }
.kc-dims { display: flex; flex-wrap: wrap; gap: 0.15rem 0.75rem; width: 100%; font-family: var(--f-mono); font-size: 0.6875rem; color: var(--k-mid); }
.kc-dims b { color: var(--k-text); font-weight: 500; margin-left: 0.2rem; }
.kc-dims.is-void b { color: var(--k-mid); }
.kc-status { padding: 0 1.1rem 0.8rem; font-size: 0.8125rem; color: var(--k-mid); min-height: 2.1rem; }
.kc-status b { color: var(--k-text); font-weight: 600; }
.kc-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; padding: 0 1.1rem 1.1rem; }
.kc-key {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 2.75rem; padding: 0.5rem; border-radius: 7px;
  background: var(--k-raise); border: 1px solid var(--k-line-2); color: var(--k-text);
  font: 500 0.875rem/1 var(--f-ui); cursor: pointer; transition: background-color 120ms var(--ease);
}
.kc-key kbd { background: transparent; color: var(--k-mid); border-color: var(--k-line-2); min-width: 1.3rem; height: 1.3rem; font-size: 0.6875rem; }
.kc-key:hover:not(:disabled) { background: var(--k-raise-2); }
.kc-key:focus-visible { outline: 2px solid var(--k-text); outline-offset: 2px; }
.kc-approve { background: var(--k-crimson); border-color: var(--k-crimson); }
.kc-approve kbd { color: var(--k-text); border-color: color-mix(in srgb, var(--k-text) 35%, transparent); }
.kc-approve:hover:not(:disabled) { background: color-mix(in oklch, var(--k-crimson), white 12%); }
.kc-key:disabled { cursor: not-allowed; opacity: 0.55; }
.kc-key.is-hit { background: var(--k-line-2); }
.kc-approve.is-hit { background: color-mix(in oklch, var(--k-crimson), black 18%); }

/* log: the decision log beside the card */
.log { border-top: 1px solid var(--rule-strong); padding-top: var(--s-xs); }
.log-title { font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.log-rows { margin-top: var(--s-xs); font-family: var(--f-mono); font-size: var(--t-mono); line-height: 1.5; }
.log-rows li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: 0 var(--s-2xs); padding: 0.4rem 0; border-bottom: 1px dotted var(--rule-2); }
.log-n { color: var(--ink-3); }
.log-what { color: var(--ink); }
.log-what span { display: block; color: var(--ink-3); }
/* a card still waiting: its row is set but unanswered, a blank to be initialled */
.log-rows li.is-waiting .log-what { color: var(--ink-3); }
.log-rows li.is-waiting .log-what span { font-family: var(--f-text); font-style: italic; font-size: var(--t-sm); }
.log-rows li.is-now .log-n { color: var(--pen-sm); }
.log-rows li.is-now .log-what { color: var(--ink); }
.log-foot { margin-top: var(--s-sm); font-size: 1.25rem; }
.log-foot b { font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin-right: 0.35rem; }
/* the pen note on the Edit row stays on that row at every width, on its leader */
.keylegend .note { margin: var(--s-2xs) 0 0 1.6rem; font-size: var(--t-pen); color: var(--pen); line-height: 1.02; }
.keylegend .note::before {
  content: ""; position: absolute; left: -1.25rem; top: -0.55rem; width: 0.95rem; height: 1.05rem;
  border: solid var(--pen); border-width: 0 0 1.5px 1.5px; border-bottom-left-radius: 0.8rem;
}
.wont-more { margin-top: var(--s-sm); font-size: var(--t-sm); font-style: italic; color: var(--ink-2); max-width: 34rem; }
.mid-ask { margin-top: var(--s-xl); }
.note a { color: inherit; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.12em; }

/* ===== 12. limits: will not, and the not-built slip ===================== */
.limits { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-xl) clamp(var(--s-lg), 4vw, var(--s-2xl)); align-items: start; }
.wont-intro { font-style: italic; color: var(--ink-2); margin-bottom: var(--s-sm); }
.wont { border-top: 1px solid var(--rule-strong); }
.wont li { padding: var(--s-xs) 0 var(--s-sm); border-bottom: 1px solid var(--rule); color: var(--ink-2); line-height: 1.45; }
.wont b { display: block; color: var(--ink); font-size: 1.3rem; line-height: 1.25; margin-bottom: 0.1rem; }
.wont-last b { display: inline; }

/* slip: a smaller sheet laid on the page. Flat, straight, hairline edge, cut-line head */
.slip { background: var(--paper-2); border: 1px solid var(--rule-2); padding: var(--s-sm) var(--s-md) var(--s-md); }
.slip-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-2xs) var(--s-sm);
  padding-bottom: var(--s-xs); margin-bottom: var(--s-2xs); border-bottom: 1px dashed var(--rule-2);
}
.slip-title { font-size: 1.5rem; line-height: 1.2; }
.slip-foot { margin-top: var(--s-sm); font-style: italic; color: var(--ink); }
.limits .slip-head { display: grid; justify-items: start; gap: var(--s-2xs); }
.limits .slip-head .tk-gloss { margin-left: 0; }
.slip-head .tk-gloss { margin-left: auto; font-family: var(--f-pen); color: var(--pen); font-size: 1.5rem; line-height: 1; }
.tk { font-family: var(--f-pen); color: var(--pen); font-size: 1.75rem; line-height: 1; border: 2px solid var(--pen); border-radius: 5px; padding: 0.05em 0.25em 0; }
.tk-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem var(--s-sm); align-items: baseline; padding: var(--s-xs) 0; border-bottom: 1px dotted var(--rule-2); }
.tk-what { font-size: 1.25rem; }
.tk-status { font-family: var(--f-pen); color: var(--pen); font-size: 1.5rem; line-height: 1; text-align: right; }
.tk-note { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--t-sm); line-height: 1.4; }

/* ===== 13. kinds, the name, the dictionary ============================== */

/* kind: the three kinds at length (pricing). Three shapes on purpose, not three matching cards:
   the small team gets a full block, solo a short entry, the larger organisation one paragraph. */
.kind { border-top: 1px solid var(--rule-2); padding-top: var(--s-xs); }
.kind-name { font-size: var(--t-lg); font-style: italic; line-height: 1.2; }
.kind-team { display: grid; gap: var(--s-sm); }
.kind-lede { font-size: var(--t-lg); line-height: 1.4; max-width: 36ch; }
.kind-terms { margin-top: var(--s-xs); border-top: 1px solid var(--rule-2); }
.kind-terms > div {
  display: grid; grid-template-columns: minmax(0, var(--c-term)) minmax(0, 1fr); gap: var(--s-3xs) var(--s-lg);
  padding: var(--s-xs) 0; border-bottom: 1px solid var(--rule); align-items: baseline;
}
.kind-terms dt { font-style: italic; color: var(--ink); }
.kind-terms dd { color: var(--ink-2); line-height: 1.45; }
/* source order is Small team, Solo, Larger organisation (as on home and the form);
   above 72rem the larger organisation goes up into the margin beside Small team */
.kind-team-row > .kind-solo { margin-top: var(--s-2xl); }
@media (min-width: 72.01rem) {
  .kind-team-row > .kind-team { grid-row: 1; }
  .kind-team-row > .kind-solo { grid-row: 2; }
  .kind-team-row > .kind-org { grid-row: 1; }
}
.kind-solo { display: grid; grid-template-columns: minmax(0, var(--c-term)) minmax(0, 1fr); gap: var(--s-2xs) var(--s-lg); align-items: baseline; }
.kind-solo p { color: var(--ink-2); max-width: 34rem; }
.kind-org { display: grid; gap: var(--s-2xs); align-content: start; max-width: 18rem; }
.kind-org p { color: var(--ink-2); line-height: 1.45; }
@media (max-width: 72rem) {
  .kind-org { max-width: 36rem; margin-top: var(--s-xl); }
  .kind-team-row > .kind-solo { margin-top: var(--s-xl); }
}

.sec-head.is-quiet h2 {
  font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); line-height: 1.4; padding-top: var(--s-xs); border-top-color: var(--rule-2);
}
.sec-head.is-quiet .sec-no { font-size: var(--t-mono); }

/* tamil-xl: the name set very large. Use once per page at most. */
.tamil-xl {
  font-size: min(var(--t-tamil), 19vw); line-height: 1.12; letter-spacing: 0; color: var(--ink);
  margin: var(--s-md) 0 var(--s-sm) calc(var(--c-num) + var(--c-gap) - 0.06em);
  white-space: nowrap; overflow: visible;
}

/* dict: dictionary entries. Headword, transliteration, part of speech, numbered senses. */
.dict { display: grid; gap: var(--s-xl); }
.dict-list { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0; border-top: 1px solid var(--rule-strong); }
.dict-list .dict-entry { padding: var(--s-md) var(--s-md) var(--s-md) 0; }
.dict-list .dict-entry + .dict-entry { padding-left: var(--s-md); border-left: 1px solid var(--rule); }
.dict-entry { display: grid; gap: var(--s-2xs); align-content: start; }  /* senses stay together when a neighbour is taller */
/* dict-ghost: under a very large word, the entry's own headword is hidden. Inside a .dict-list
   it keeps its space invisibly (aria-hidden; a visually-hidden copy carries it for screen readers)
   so every transliteration in the row shares one baseline. Outside a list it takes no space. */
.dict-ghost { display: none; }
.dict-list .dict-ghost { display: block; flex: none; width: 0; white-space: nowrap; visibility: hidden; margin-right: calc(var(--s-sm) * -1); }
.dict-entry dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-sm); margin-bottom: var(--s-2xs); }
.dict-head { font-size: 2.6rem; line-height: 1.2; }
.dict-translit { font-style: italic; font-size: 1.375rem; }
.dict-pos { font-style: italic; color: var(--ink-3); }
/* the transliteration and its "n." never part */
.dict-tp { display: inline-flex; align-items: baseline; gap: var(--s-sm); white-space: nowrap; }
/* where the three columns are too narrow for headword and transliteration on one line,
   every entry sets the transliteration on its own line, so the senses start level */
@media (min-width: 47.51rem) and (max-width: 80rem) {
  .dict-list .dict-entry dt { flex-direction: column; align-items: flex-start; }
}
.dict-entry dd { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: var(--s-2xs); max-width: 36rem; }
.dict-sense { font-family: var(--f-mono); font-size: var(--t-mono); color: var(--pen-sm); padding-top: 0.35em; }
.dict-entry dd.dict-usage { display: block; padding-left: calc(1.5rem + var(--s-2xs)); font-style: italic; color: var(--ink-2); margin-top: var(--s-2xs); }
.dict-usage::before { content: "\201C"; }
.dict-usage::after { content: "\201D"; }
.name-foot { margin-top: var(--s-xs); }

.imprint-foot { color: var(--ink-2); max-width: 40rem; }
/* rules (about): running prose, set in two columns across text and margin */
.rules { columns: 2 22rem; column-gap: var(--s-2xl); }
.rules p { break-inside: avoid; margin-bottom: var(--s-md); color: var(--ink-2); max-width: 36rem; }
.rules .runin { display: block; font-size: 1.25rem; margin-bottom: var(--s-3xs); }

/* closing call: the full block ends the home page only; other pages end on one line */
.closing .lede { max-width: 30ch; }
.end-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-sm) var(--s-lg); padding-top: var(--s-md); border-top: 1px solid var(--rule-strong); }
.end-line p { font-style: italic; color: var(--ink-2); max-width: 34ch; }

/* ===== 14. page head, sequence, lapse, answers, form, contact, 404 ======= */
/* page-head: the top of an interior page (not the home page) */
.page-head .row + .row { margin-top: var(--s-md); }
.page-head h1 { max-width: 20ch; }
/* a page head may open on a struck specimen, corrected by the h1 under it (pricing, 404) */
.page-head .head-specimen + .row { margin-top: var(--s-xs); }
/* or on the name set very large, as the h1 itself (about) */
.page-head h1.tamil-xl { max-width: none; letter-spacing: 0; margin-block: var(--s-xs) var(--s-md); }
.kicker { font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }

/* sequence: a numbered order a reader can follow (how it works). Each step is a .row,
   its heading an h2 (the steps are the page) or an h3 (a sequence inside a section).
   Numbers are drawn by CSS: grey for the software's steps, pen-small for the reader's. */
.sequence { counter-reset: step; }
.seq-step { counter-increment: step; padding-block: var(--s-lg) var(--s-xl); border-top: 1px solid var(--rule); }
.seq-step:first-child { border-top-color: var(--rule-strong); }
.row.seq-step + .row.seq-step { margin-top: 0; }
.seq-step > .num { padding-top: 0; }
.seq-step > .num::before {
  content: counter(step); display: block;
  font-family: var(--f-text); font-style: italic; font-size: 3.25rem; line-height: 0.9; color: var(--ink-3);
}
.seq-step.is-you > .num::before { color: var(--pencil); }  /* the reader's steps take the blue pencil */
.seq-body { display: grid; gap: var(--s-sm); align-content: start; }
.seq-step h2 { font-size: var(--t-xl); line-height: 1.08; letter-spacing: -0.012em; text-wrap: balance; margin-bottom: var(--s-3xs); }
.seq-step h3 { font-size: var(--t-lg); line-height: 1.2; }
.seq-body > p:not([class]) { max-width: 38rem; line-height: 1.6; }
/* "your part": a real word after the heading, so a screen reader hears it with a pause */
.seq-yours { font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.04em; color: var(--pencil); vertical-align: 0.6em; margin-left: 0.6rem; white-space: nowrap; }
/* an aside in the margin of a step (how it works: whose steps these are) */
.seq-aside { font-style: italic; color: var(--ink-2); font-size: var(--t-sm); line-height: 1.45; max-width: 17rem; padding-top: var(--s-xs); border-top: 1px solid var(--rule); }
/* what reaches you, what you do: in the proof margin beside the step, level with its first
   paragraph; under the text on narrower screens */
.seq-terms {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-sm);
  max-width: 17rem; border-top: 1px solid var(--rule); padding-top: var(--s-xs);
}
.seq-terms > div { display: grid; gap: var(--s-3xs); align-content: start; }
.seq-terms dt { font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.seq-terms dd { color: var(--ink-2); line-height: 1.5; }
/* a tagged line: the tag hangs, the words wrap under the words */
.tagged { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; }
.tagged + .tagged { margin-top: var(--s-3xs); }
.tagged .contents-kind { grid-column: auto; grid-row: auto; justify-self: start; }
@media (min-width: 72.01rem) { .seq-proof-wrap { min-height: 5.5rem; } }
.is-you .seq-terms > div:last-child dd { color: var(--ink); font-style: italic; }
@media (min-width: 72.01rem) {
  .seq-step > .seq-terms, .seq-step > .seq-aside { margin-top: calc(var(--t-xl) * 1.08 + var(--s-sm) + 0.15rem); }
}
/* a line inside a step, corrected by the pen */
.seq-proof { font-size: 1.3rem; line-height: 1.35; font-style: italic; color: var(--ink-2); }
.seq-proof .ins { margin-right: 0.35rem; }

/* lapse: a mark, then the same mark void after one edit (how it works) */
.lapse { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); }
.lapse-pane { display: grid; gap: var(--s-xs); align-content: start; padding: var(--s-md) var(--s-lg) var(--s-lg) 0; }
.lapse-pane + .lapse-pane { padding-left: var(--s-lg); border-left: 1px solid var(--rule); }
.lapse-h { font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.lapse-line { font-size: var(--t-lg); line-height: 1.5; }
.lapse-mark { display: flex; align-items: center; gap: var(--s-sm); min-height: 3.5rem; padding-left: 0.2rem; }
.lapse-mark .by-hand { margin-top: 0.2rem; }
.lapse-void { position: relative; display: inline-block; }
.lapse-void .hand { color: var(--ink-3); }
.lapse-void .hand-pass::after { border-color: var(--rule-2); }
.lapse-x { position: absolute; inset: -0.2rem -0.3rem; width: calc(100% + 0.6rem); height: calc(100% + 0.4rem); stroke-width: 2.4; }
.lapse-says { font-family: var(--f-pen); color: var(--pen); font-size: var(--t-pen); line-height: 1; }
.lapse > .sheet-caption { grid-column: 1 / -1; margin: 0; padding: var(--s-xs) 0; border-top: 1px solid var(--rule); }

/* send-on: a closing line set apart under a hairline (the gate) */
.send-on { font-size: var(--t-lg); line-height: 1.4; font-style: italic; max-width: 34ch; }

/* answers: plain questions and plain answers (pricing, contact) */
.answers { border-top: 1px solid var(--rule-strong); }
.answers > div { display: grid; grid-template-columns: minmax(0, var(--c-term)) minmax(0, 1fr); gap: var(--s-2xs) var(--s-lg); padding: var(--s-sm) 0; border-bottom: 1px solid var(--rule); }
.answers dt { font-style: italic; font-size: 1.25rem; line-height: 1.3; }
.answers dd { color: var(--ink-2); max-width: 40rem; }

/* form: the return slip. Use inside .slip. */
.form { display: grid; gap: var(--s-md); }
.field { display: grid; gap: var(--s-2xs); border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend {
  font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.04em; color: var(--ink-2); padding: 0;
}
.field .opt { color: var(--ink-3); font-style: italic; font-family: var(--f-text); font-size: var(--t-sm); letter-spacing: 0; margin-left: 0.35rem; }
.field input[type="text"], .field input[type="email"], .field input[type="url"], .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--field);
  border: 0; border-bottom: 1px solid var(--ink-2); border-radius: 0;
  padding: var(--s-2xs) var(--s-2xs); min-height: 2.9rem;
}
.field textarea { border: 1px solid var(--rule-2); border-bottom-color: var(--ink-2); resize: vertical; min-height: 7rem; line-height: 1.45; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); opacity: 1; }
.field input:user-invalid, .field textarea:user-invalid { border-bottom-color: var(--pen); }
.choices { display: flex; flex-wrap: wrap; gap: 0 var(--s-md); }
.choices legend { margin-bottom: var(--s-3xs); width: 100%; }
.field > .choice { font-family: var(--f-text); font-size: 1.125rem; letter-spacing: 0; color: var(--ink); }
.choice { display: inline-flex; align-items: center; gap: var(--s-2xs); min-height: 2.75rem; cursor: pointer; font-size: 1.125rem; }
.choice input {
  appearance: none; -webkit-appearance: none; flex: none; display: inline-grid; place-items: center;
  width: 1.15rem; height: 1.15rem; margin: 0; border: 1.5px solid var(--ink-3); border-radius: 50%; background: transparent; cursor: pointer;
}
.choice input::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--btn); transform: scale(0); transition: transform 120ms var(--ease); }
.choice input:checked { border-color: var(--btn); }
.choice input:checked::before { transform: scale(1); }
.choice input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.choice input[type="checkbox"], .choice input[type="checkbox"]::before { border-radius: 2px; }
.field > .consent { align-items: flex-start; font-size: var(--t-sm); line-height: 1.5; }
.field > .consent input { margin-top: 0.2rem; }
.form-send { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-sm) var(--s-md); }
.form-msg { color: var(--ink); font-size: var(--t-sm); line-height: 1.45; }
/* after a submit: the note as written, selectable, with a copy button, for when no mail app opens */
.form-composed { display: grid; gap: var(--s-xs); padding: var(--s-sm); background: var(--field); border: 1px solid var(--rule-2); }
.form-composed pre { margin: 0; font-family: var(--f-mono); font-size: var(--t-mono); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); user-select: all; -webkit-user-select: all; }
.form-composed .copy { justify-self: start; }
.form-foot { display: grid; gap: var(--s-sm); padding-top: var(--s-sm); border-top: 1px dashed var(--rule-2); }
.form-how { line-height: 1.5; color: var(--ink-2); max-width: 34rem; font-size: var(--t-sm); }
.field-note { font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.04em; color: var(--ink-3); }
.form-msg:empty { margin-top: calc(var(--s-sm) * -1); }

/* address line with a copy button, and the Bangalore clock (contact page) */
.addr-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2xs) var(--s-sm); }
.addr-line .addr { font-size: 1.25rem; color: var(--ink); }
.copy {
  min-height: 2.5rem; padding: 0.3rem 0.8rem; border: 1px solid var(--rule-2); border-radius: 3px;
  background: transparent; color: var(--ink); font-family: var(--f-mono); font-size: var(--t-mono); cursor: pointer;
}
.copy:hover { border-color: var(--ink-2); }
.clock { font-style: italic; color: var(--ink-2); }
/* the proof margin beside the return slip: the address, the clock, one plain line */
.contact-margin { display: grid; gap: var(--s-xs); align-content: start; padding-top: var(--s-xs); }
.contact-label {
  font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); padding-bottom: var(--s-2xs); border-bottom: 1px solid var(--rule-strong);
}
.contact-aside { font-size: var(--t-sm); line-height: 1.5; color: var(--ink-2); max-width: 18rem; }

/* 404: the address that was asked for, struck (written in by the script; absent without it) */
.lost-path { font-family: var(--f-mono); font-size: 1.25rem; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
.lost-path s { text-decoration-color: var(--pen); text-decoration-thickness: 2px; }
.lost-links { display: flex; flex-wrap: wrap; gap: var(--s-2xs) var(--s-lg); }

/* ledger: the pricing page opens on the line a price would sit on, left blank with TK */
.ledger { display: flex; align-items: baseline; gap: var(--s-sm); max-width: 34rem; font-size: var(--t-lg); color: var(--ink-2); }
.ledger-what { font-style: italic; }
.ledger-dots { flex: 1; min-width: 3rem; border-bottom: 2px dotted var(--rule-2); transform: translateY(-0.3em); }
.ledger .tk { font-size: 1.9rem; }
.lost-links .link { padding: var(--s-2xs) 0; font-size: var(--t-lg); }

/* ===== 15. motion: the page corrects its first sentence, once =========== */
@media (prefers-reduced-motion: no-preference) {
  .hero .strike { animation: k-strike 650ms 450ms var(--ease) both; }
  .hero .note-del { animation: k-write 700ms 1050ms var(--ease) both; }
  .hero .num-caret .mk { animation: k-fade 260ms 1500ms var(--ease) both; }
  .hero .ring path { stroke-dasharray: 1; animation: k-draw 700ms 1750ms var(--ease) both; }
  .hero .ring-text, .hero .note-mark .by-hand { animation: k-fade 300ms 2250ms var(--ease) both; }
  .hero .note-mark p { animation: k-write 800ms 2400ms var(--ease) both; }
  /* the drawn leader that ties a note to its line on narrow screens arrives with the note */
  .hero .note-mark::before { animation: k-fade 260ms 1750ms var(--ease) both; }
  .is-proofed .hero *, .is-proofed .hero .note-mark::before { animation: none !important; }
}
@keyframes k-strike { from { background-size: 0% 0.08em; } to { background-size: 100% 0.08em; } }
/* the left inset is negative so the leader hook (left: -1.25rem) is never clipped */
@keyframes k-write { from { clip-path: inset(-0.3em calc(100% + 1.6rem) -0.3em -1.6rem); } to { clip-path: inset(-0.3em -0.3em -0.3em -1.6rem); } }
@keyframes k-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes k-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* ===== 16. narrower screens ============================================== */
/* Under 72rem the proof margin folds away: each note drops directly under the line
   it marks, on a short drawn leader, indented from the text. */
@media (max-width: 72rem) {
  .row { grid-template-columns: var(--c-num) minmax(0, 1fr); }
  .row > .note, .row > .margin, .row > .span, .sec-head > h2, .desk-row > .desk { grid-column: 2; }
  .row > .aside-mono { grid-column: 2; margin-top: var(--s-sm); }
  .contact-margin { margin-top: var(--s-lg); max-width: 26rem; }
  .note, .row > .note { margin-top: var(--s-xs); margin-left: 1.6rem; max-width: 22rem; }
  .note::before {
    content: ""; position: absolute; left: -1.25rem; top: -0.55rem; width: 0.95rem; height: 1.05rem;
    border: solid var(--pen); border-width: 0 0 1.5px 1.5px; border-bottom-left-radius: 0.8rem;
  }
  .desk { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .desk .log { grid-column: 1 / -1; }
  .tamil-xl { margin-left: calc(var(--c-num) + var(--c-gap)); }
  .note-del .mk-dele { display: none; }
  .note-mark { grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: var(--s-sm); row-gap: 0.15rem; max-width: 26rem; }
  .note-mark .ring { grid-column: 1; grid-row: 1; width: 5rem; height: 2.8rem; }
  .note-mark .ring-text { font-size: 1.75rem; }
  .note-mark .ring + .by-hand { grid-column: 1; grid-row: 2; margin: 0; padding: 0 0 0 0.3rem; }
  .note-mark p { grid-column: 2; grid-row: 1 / span 2; margin: 0; align-self: center; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .limits { grid-template-columns: minmax(0, 1fr); }
  /* the margin has folded: what sat beside a step now sits under it, with room to breathe */
  .seq-step > .seq-terms, .seq-step > .seq-aside { margin-top: var(--s-md); }
}

@media (max-width: 47.5rem) {
  :root { --c-num: 0rem; --c-gap: 0rem; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row > *, .row > .note, .row > .margin, .row > .aside-mono, .row > .span, .row > .full, .desk-row > .desk { grid-column: 1; }
  .row > .num { display: none; }
  .row > .sec-no { display: block; }
  .sec-head { display: block; }
  .sec-head .sec-no { text-align: left; padding: 0 0 var(--s-3xs); }
  .sec-head h2 { padding-top: var(--s-xs); }
  .sec-head:has(.sec-no) .sec-no { float: right; padding-top: var(--s-sm); }

  /* 6px between rows: with the 5px inside the 45px logo link, a row that wraps under the logo keeps
     one dot spacing (11px in the 35px header lockup) clear of it, as the kit asks */
  .masthead-in { padding-block: var(--s-xs); gap: 6px var(--s-sm); }
  .masthead-cta { margin-left: auto; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 0 clamp(var(--s-xs), 4.5vw, var(--s-md)); border-top: 1px solid var(--rule); }
  .nav a { min-height: 2.5rem; font-size: 1rem; }
  .slug { margin-bottom: var(--s-md); }
  .slug span:not(.slug-page):not(:first-child) { display: none; }
  .sheet::before, .sheet::after { display: none; }

  .hero .row + .row { margin-top: var(--s-xs); }
  .hero-h1 { margin-top: var(--s-sm) !important; }
  .hero-deck { margin-top: var(--s-sm) !important; }
  .hero-cta { margin-top: var(--s-md) !important; }
  .hero .deck { font-size: 1.1875rem; line-height: 1.45; }
  .hero .note-mark p { font-size: 1.5rem; }
  /* phones: the short forms. The buttons and the rows carry the rest */
  .nm-more, .kl-more, .marksheet .dim, .contents-key { display: none; }
  .slug:has(+ .hero) { display: none; }  /* the home page opens on its struck line */
  .num-caret { display: none !important; }
  .row:not(.sec-head) > .sec-no { display: none; }

  .routing-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .routing-steps li:nth-child(3) { border-left: 0; }
  .routing-steps li:nth-child(n + 3) { border-top: 1px solid var(--rule-2); }
  .routing-who { font-size: 1.3rem; }

  .contents li { grid-template-columns: 1.9rem minmax(0, 1fr) auto; column-gap: var(--s-xs); }
  .contents-what { font-size: 1.25rem; }
  .marksheet tbody th { width: 50%; }
  .marksheet td { width: 25%; }
  .marksheet thead th { font-size: 0.75rem; }
  .marksheet .dim { font-size: 0.9375rem; }
  .marksheet .verdict td { font-size: 0.9375rem; line-height: 1.3; }
  .track { grid-template-columns: minmax(0, 1fr); }
  .track li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .track li { grid-template-columns: 2rem minmax(0, 1fr); padding-top: var(--s-xs); }
  .banned { columns: 2 9rem; column-gap: var(--s-sm); }
  .banned li { font-size: 1.0625rem; grid-template-columns: 1.5rem 1fr; }
  .tester-panes { grid-template-columns: minmax(0, 1fr); }
  .tester-panes .tester-copy { border-right: 0; border-bottom: 1px solid var(--rule-2); }
  .five li { grid-template-columns: 1.75rem minmax(0, 1fr); column-gap: var(--s-xs); }
  .five-what { font-size: 1.3rem; }
  .five-pts { grid-row: 2; }
  .five-how { grid-column: 2; grid-row: 3; margin-top: var(--s-2xs); }
  .five-n { grid-row: 1; }
  .pair, .lapse { grid-template-columns: minmax(0, 1fr); }
  .pair > div, .lapse-pane { padding-right: 0; }
  .pair > div + div, .lapse-pane + .lapse-pane { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }

  /* the sequence keeps its numbers on a phone, in a narrow column of their own */
  /* on a phone the numeral hangs beside the heading only; the body returns to the page edge */
  .sequence > .seq-step { position: relative; padding-block: var(--s-md) var(--s-lg); }
  .sequence > .seq-step > .num { display: block; position: absolute; left: 0; top: var(--s-md); width: 2.75rem; text-align: left; }
  .seq-step > .num::before { font-size: 2.1rem; line-height: 1; }
  .seq-step h2 { padding-left: 2.9rem; min-height: 2.4rem; }

  .desk { grid-template-columns: minmax(0, 1fr); }
  .desk-copy .lede { max-width: none; }
  .slip { padding-inline: var(--s-sm); }
  .plate { padding: var(--s-xs); }
  .tester-text { min-height: 7.5rem; }
  .kc-body { min-height: 0; }
  .answers > div, .kind-terms > div, .kind-solo { grid-template-columns: minmax(0, 1fr); }
  .dict-list .dict-ghost { display: none; }
  .dict-list .dict-entry, .dict-list .dict-entry + .dict-entry { padding: var(--s-md) 0; border-left: 0; }
  .dict-list .dict-entry + .dict-entry { border-top: 1px solid var(--rule); }
  .tamil-xl { margin-left: -0.04em; }
  .foot-in { grid-template-columns: minmax(0, 1fr); gap: var(--s-lg); }
}

/* the narrowest phones */
@media (max-width: 22.5rem) {
  .nav { gap: 0 var(--s-xs); justify-content: space-between; }
  .nav a { font-size: 0.875rem; }
  .kc-keys { gap: 0.35rem; }
  .kc-key { gap: 0.3rem; padding-inline: 0.25rem; font-size: 0.8125rem; }
  .kc-key kbd { display: none; }
  .tk-list li { grid-template-columns: minmax(0, 1fr); }
  .tk-status { text-align: left; }
}

/* Windows contrast themes drop backgrounds: keep the strike and the crimson square */
@media (forced-colors: active) {
  .strike { background: none; text-decoration: line-through; }
  /* the logo's ink follows the system text colour; its red is a fixed fill and stays */
  .brand, .logo-draw { color: CanvasText; }
}
@media print {
  .strike { background: none; text-decoration: line-through; text-decoration-color: var(--pen); }
  .logo-draw [class^="kd-"] { animation: none !important; }
  .masthead .nav, .masthead-cta, .skip { display: none; }
}

/* ===== 17. the colour system, applied ==================================== */
/* light type on night reads lighter: give it more leading */
@media (prefers-color-scheme: dark) { body { line-height: 1.65; } }
/* small mono labels: grey on paper, gold at night (--label) */
.slug, .foot-h, .routing-label, .tester-label, .tester-pane-h, .log-title, .kicker, .lapse-h,
.contact-label, .seq-terms dt, .pair dt, .by-hand, .marksheet thead th, .contents-n, .five-pts,
.field-note, .banned li::before { color: var(--label); }
.marksheet thead th .by-hand { color: var(--label); }

/* swipe: the gold highlighter behind a line that passed. Inline; wraps line by line */
.swipe {
  background-image: linear-gradient(var(--swipe), var(--swipe));
  background-repeat: no-repeat; background-size: 100% 0.4em; background-position: 0 88%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* colourbar: the printer's colour bar. A flat swatch and a label for each job.
   .colourbar-sm is the one-word version that sits in the slug under the masthead. */
.colourbar { display: grid; gap: 0.5rem; }
.colourbar li { display: flex; align-items: center; gap: 0.7rem; line-height: 1.3; }
.colourbar b { font-weight: 400; color: var(--ink); margin-right: 0.3rem; }
.cb { flex: none; display: inline-flex; width: 2.1rem; height: 1rem; }
.cb-pen { background: var(--pen); }
.cb-pencil { background: var(--pencil); }
.cb-gold { background: var(--gold); }
.cb-band { background: var(--band); outline: 1px solid var(--band-ink); outline-offset: -3px; }
.cb-pieces i { flex: 1; }
.cb-pieces i:nth-child(1) { background: #1E2433; }
.cb-pieces i:nth-child(2) { background: #C55124; }
.cb-pieces i:nth-child(3) { background: #19714D; }
.colourbar-sm { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin-left: auto; font-size: 0.75rem; letter-spacing: 0.04em; }
.colourbar-sm li { gap: 0.4rem; }
.colourbar-sm .cb { width: 1rem; height: 0.6rem; }
.colourbar-sm .cb-band { outline: 0; }
.slug { align-items: center; }

/* ===== 18. home: section heads, routing slip ============================= */
.anchor { display: block; height: 0; }
/* the big section number in the line-number gutter, gold; the kicker names the routing box */
.sec-head .sec-no.is-big {
  font-family: var(--f-text); font-style: italic; font-size: clamp(2.4rem, 1.8rem + 1.6vw, 3.4rem);
  line-height: 1; color: var(--gold-ink); padding-top: 0.75rem; letter-spacing: 0;
}
.sec-head:has(.is-big) { align-items: start; }
.sec-kicker {
  display: block; margin-bottom: 0.5rem;
  font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-ink); line-height: 1.3;
}

.routing-steps li { padding: 0; }
.routing-steps a {
  display: grid; align-content: start; gap: 0.2rem; height: 100%;
  padding: var(--s-sm) var(--s-sm) var(--s-md); color: inherit; text-decoration: none;
  transition: background-color 160ms var(--ease);
}
.routing-steps a:hover { background: var(--paper-2); }
.routing-steps a:hover .routing-who { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--rule-2); text-underline-offset: 0.2em; }
.routing-steps a:focus-visible { outline-offset: -4px; }
.routing-label::before { color: var(--gold-ink); }
/* the two human boxes take the blue pencil: the label and the initials box, left empty */
.routing-steps .is-you .routing-label, .routing-steps .is-you .routing-label::before { color: var(--pencil); }
.is-you .initials { border-color: var(--pencil); border-style: dashed; }
.is-you .initials::after { color: var(--pencil); }

/* ===== 19. home: the contact sheet (§1 Made) ============================= */
/* lighttable: the week's pieces laid out as numbered frames on one surface.
   The frames carry their own colours; the table stays flat and quiet. */
.lighttable {
  position: relative; background: var(--table); border: 1px solid var(--rule);
  padding: clamp(1rem, 2.4vw, 2.25rem); color: var(--ink);
}
/* At night the table is lit: a dimmed cream panel in a dark room, with the work laid on it.
   Inside it the paper tokens apply again, so every part on the table reads as it does by day. */
@media (prefers-color-scheme: dark) {
  .lighttable {
    --table: #D9D2C3; --paper-2: #E4DED1; --ink: #1B1E27; --ink-2: #454A57; --ink-3: #5B606D;
    --rule: #C3BBA9; --rule-2: #ABA28E; --rule-strong: #1B1E27; --frame-line: #A69D89;
    --label: #6B5112; --gold-ink: #6B5112; --gold: #A8842B; --pen: #9C2B3A; --pen-ink: #9C2B3A;
    --pencil: #2B4C9B; --focus: #9C2B3A; --page-paper: #FBF8F1;
    border-color: #2E3442;
  }
}
/* registration ticks at two corners of the table */
.lighttable::before, .lighttable::after {
  content: ""; position: absolute; width: 1rem; height: 1rem; border: 0 solid var(--gold); pointer-events: none;
}
.lighttable::before { top: -0.55rem; left: -0.55rem; border-width: 1px 0 0 1px; }
.lighttable::after { bottom: -0.55rem; right: -0.55rem; border-width: 0 1px 1px 0; }

.frames {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.75rem, 3vw, 2.75rem) clamp(1rem, 2vw, 1.75rem); align-items: start;
  grid-template-areas:
    "post post post post post li   li   li   li   li   li   li"
    "car  car  car  car  car  car  car  car  vid  vid  vid  vid"
    "news news news news news side side side side side side side";
}
.frame-post { grid-area: post; }
.frame-li { grid-area: li; }
.frame-car { grid-area: car; }
.frame-vid { grid-area: vid; }
.frame-news { grid-area: news; }
.frame-side { grid-area: side; }
/* the first row's two typeset pages stand the same height */
.frame-post, .frame-li { align-self: stretch; grid-template-rows: auto minmax(0, 1fr); }

.frame { display: grid; gap: 0.7rem; align-content: start; min-width: 0; }
/* the frame's edge print: number, name, what kind of thing it is */
.frame-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.7rem; line-height: 1.3; }
.frame-n { font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.04em; color: var(--gold-ink); }
.frame-n::before { content: "\25B8" / ""; margin-right: 0.3rem; }
.frame-what { font-size: 1.25rem; font-style: italic; color: var(--ink); }
.frame-tag {
  margin-left: auto; font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.02em; color: var(--ink-2);
  border: 1px solid var(--rule-2); padding: 0.05rem 0.45rem; border-radius: 2px; line-height: 1.5;
}
.frame-cap { font-style: italic; font-size: var(--t-sm); color: var(--ink-2); }
.frame img, .vid { display: block; width: 100%; height: auto; border: 1px solid var(--frame-line); background: #12151B; }

/* 01: the long post, typeset as a page with its first lines; the rest are rules */
.galley {
  background: var(--page-paper); color: var(--page-ink); border: 1px solid var(--frame-line);
  padding: 1.35rem 1.35rem 1.6rem; display: grid; gap: 0.95rem; align-content: start; height: 100%;
}
.galley-h { font-size: clamp(1.5rem, 1.2rem + 0.8vw, 1.85rem); line-height: 1.1; letter-spacing: -0.012em; text-wrap: balance; }
/* the post's first lines, set in the reading face and cut off by the frame edge, as a page
   on a light table is: a fixed height and a clip, no fade */
.galley-text { display: grid; gap: 0.6rem; max-height: 7.6rem; overflow: hidden; font-size: 1.0625rem; line-height: 1.55; color: var(--page-ink); }

/* 02: the social post, typeset in the product's face, with its image attached */
.social {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 15rem); align-items: start; height: 100%;
  background: var(--page-paper); color: var(--page-ink); border: 1px solid var(--frame-line);
}
.social-text { display: grid; gap: 0.8rem; align-content: start; padding: 1.15rem 1.25rem 1.3rem; font-family: var(--f-ui); font-size: 1.0625rem; line-height: 1.5; }
.social-who { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; }
.social-body { display: grid; gap: 0.5rem; }
/* the account's avatar: the tile icon, the kit's 32px symbol at its own size on a square night tile */
.social-mark { display: grid; place-items: center; width: 48px; height: 48px; background: var(--k-night); flex: none; }
.frame .social-mark img { width: 32px; height: 32px; border: 0; background: none; }  /* not a framed piece; the 32px drawing at 1x, the fine symbol from 2x (64 device px) up */
.frame .social-img { border: 0; border-left: 1px solid var(--frame-line); border-bottom: 1px solid var(--frame-line); aspect-ratio: 1; }

/* 03: the carousel. The strip scrolls and snaps by itself; the script adds the buttons */
.reel {
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 0;
  scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent;
  position: relative; padding-bottom: 0.6rem;
}
.reel:focus-visible { outline-offset: 4px; }
.reel-slides { display: flex; gap: 0.75rem; }
/* a slide and a clean half of the next: the peek reads as a peek, not a cut-off word */
.reel-slides li { flex: 0 0 62%; scroll-snap-align: start; }
.reel-slides img { aspect-ratio: 1; }
.reel-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.reel-ctl { display: inline-flex; align-items: center; gap: 0.4rem; }
.reel-btn {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
  border: 1px solid var(--rule-2); border-radius: 3px; background: transparent; color: var(--ink); cursor: pointer;
  transition: border-color 160ms var(--ease);
}
.reel-btn svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reel-btn:hover:not(:disabled) { border-color: var(--ink-2); }
.reel-btn:disabled { opacity: 0.35; cursor: default; }
.reel-count { min-width: 6ch; text-align: center; font-family: var(--f-mono); font-size: var(--t-mono); color: var(--gold-ink); font-variant-numeric: tabular-nums; }

/* change the brand: three swatches; the chosen one carries the reader's blue pencil tick */
.brands { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.5rem; }
.brands-h { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); margin-right: 0.3rem; }
.swatch {
  position: relative; display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem;
  padding: 0.3rem 0.85rem 0.3rem 0.45rem; border: 1px solid var(--rule-2); border-radius: 3px;
  background: transparent; color: var(--ink-2); font-family: var(--f-text); font-size: 1.0625rem; line-height: 1; cursor: pointer;
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}
.swatch:hover { color: var(--ink); border-color: var(--ink-2); }
.swatch[aria-pressed="true"] { color: var(--ink); border-color: var(--pencil); padding-right: 1.9rem; }
.swatch[aria-pressed="true"]::after {
  content: ""; position: absolute; right: 0.55rem; top: 50%; width: 0.75rem; height: 0.42rem; margin-top: -0.35rem;
  border: solid var(--pencil); border-width: 0 0 2px 2px; transform: rotate(-48deg);
}
/* each swatch is a small print of that brand's cover, so the colours show before the click */
.brands-set { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.swatch { flex-direction: column; align-items: flex-start; gap: 0.35rem; padding: 0.35rem 0.45rem 0.5rem; min-height: 0; }
.swatch-img { display: block; width: 4rem; height: 4rem; border: 1px solid var(--frame-line); }
.frame .swatch-img { width: 4rem; height: 4rem; }
.swatch[aria-pressed="true"] { padding-right: 1.7rem; }
.swatch[aria-pressed="true"]::after { top: auto; bottom: 0.85rem; right: 0.45rem; margin-top: 0; }
.brands-line { flex-basis: 100%; font-style: italic; font-size: var(--t-sm); color: var(--ink-2); }

/* 04: the video, vertical, with its own controls. Never autoplays. */
.vid { aspect-ratio: 9 / 16; background: #0B0F1A; }

/* the side of the sheet: the honest caption, the facts, one pen note */
.frame-side { display: grid; gap: var(--s-md); align-content: start; padding-top: 2.4rem; max-width: 36rem; }
.sheet-honest { color: var(--ink-2); line-height: 1.55; padding-top: var(--s-xs); border-top: 1px solid var(--rule-2); }
.sheet-fact { color: var(--ink); line-height: 1.5; }
.frame-side .note { max-width: 22rem; margin: 0; }

/* ===== 20. home: §2 Marked, §3 Approved ================================= */
.marked-row { align-items: start; }
.marksheet-compact { width: auto; min-width: min(100%, 25rem); }
.marksheet-compact tbody th { width: auto; padding-right: var(--s-xl); font-size: var(--t-base); }
.marksheet-compact td, .marksheet-compact thead th { width: 7rem; text-align: center; padding-right: 0; }
.marksheet-compact thead td { border-bottom-color: var(--rule-strong); }
/* the passing column, swept with the gold highlighter from top to bottom. Each cell's piece
   of the stroke sits a little off true, so the column reads as one hand-drawn swipe */
.marksheet-compact .is-pass {
  background-image: linear-gradient(var(--swipe), var(--swipe));
  background-repeat: no-repeat; background-size: 2.6rem 100%; background-position: 50% 0;
}
.marksheet-compact thead .is-pass { background-size: 2.6rem 55%; background-position: 50% 100%; }
.marksheet-compact tbody tr:nth-child(2) .is-pass { background-size: 2.75rem 100%; background-position: 46% 0; }
.marksheet-compact tbody tr:nth-child(3) .is-pass { background-size: 2.5rem 100%; background-position: 53% 0; }
.marksheet-compact tbody tr:nth-child(4) .is-pass { background-size: 2.7rem 100%; background-position: 48% 0; }
.marksheet-compact tbody tr:nth-child(5) .is-pass { background-size: 2.55rem 100%; background-position: 51% 0; }
.marksheet-compact .total .is-pass { background-size: 2.45rem 40%; background-position: 50% 0; }
.marksheet-compact .hand-ring { font-size: 2.25rem; }
.marked-row > .note { padding-top: var(--s-xl); }

/* the twenty, as one flowing strip of struck words (inside data-specimen) */
.strip-h { font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); }
.banned-strip {
  columns: auto; display: flex; flex-wrap: wrap; gap: 0.25rem 1.05rem;
  margin-top: var(--s-xs); padding: var(--s-sm) 0;
}
.banned-strip li { display: inline-flex; align-items: baseline; gap: 0.3rem; padding: 0; font-size: 1.1875rem; line-height: 1.5; }
.banned-strip li::before { font-size: 0.6875rem; color: var(--gold-ink); position: relative; top: -0.45em; }
.banned-strip i { font-size: 0.9375rem; color: var(--ink-3); }
.banned-strip li:target { background: var(--swipe); }
.eye { display: grid; gap: var(--s-sm); }
.eye-line { font-size: var(--t-lg); line-height: 1.4; max-width: 34ch; }
.links-line { display: flex; flex-wrap: wrap; gap: var(--s-2xs) var(--s-lg); }
.links-line .link { padding: var(--s-3xs) 0; }

/* the decision log: the reader's marks in blue pencil. The log needs room for them, so the
   key legend gives up a little width on the home page */
#approved .desk { grid-template-columns: minmax(0, 16rem) minmax(0, 31rem) minmax(0, 1fr); }
@media (min-width: 72.01rem) and (max-width: 84rem) { #approved .desk { grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); } }
@media (max-width: 72rem) { #approved .desk { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
@media (max-width: 47.5rem) { #approved .desk { grid-template-columns: minmax(0, 1fr); } }
.log-rows li { position: relative; grid-template-columns: 1.75rem minmax(0, 1fr) auto; align-items: start; }
.log-mark {
  display: inline-flex; align-items: center; gap: 0.15rem; margin-top: -0.3rem;
  font-family: var(--f-pen); font-size: 1.7rem; line-height: 1; color: var(--pencil);
}
.log-mark svg { width: 1.5rem; height: 1.15rem; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.log-stroke {
  position: absolute; left: 2rem; top: 0.7rem; width: calc(100% - 2.25rem); height: 0.75rem;
  overflow: visible; fill: none; stroke: var(--pencil); stroke-width: 2.2; stroke-linecap: round; pointer-events: none;
}
.log-mark path, .log-stroke path { vector-effect: non-scaling-stroke; }
.log-rows li.is-skipped .log-what { color: var(--ink-2); }

/* ===== 21. home: §4 Posted, the docket and the dry run ==================== */
.docket { width: 100%; border-collapse: collapse; }
.docket-cap {
  caption-side: top; text-align: left; padding-bottom: var(--s-xs);
  font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--label);
}
.docket thead th {
  text-align: left; font-weight: 400; padding: var(--s-xs) var(--s-md) var(--s-2xs) 0;
  font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--label);
  border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong);
}
.docket tbody th, .docket td { text-align: left; vertical-align: baseline; padding: var(--s-sm) var(--s-md) var(--s-sm) 0; border-bottom: 1px solid var(--rule); }
.docket tbody th { font-weight: 400; font-size: 1.375rem; line-height: 1.25; width: 28%; }
.docket tbody th span { display: block; margin-top: 0.2rem; font-size: var(--t-sm); font-style: italic; color: var(--ink-2); line-height: 1.4; }
.docket td { color: var(--ink-2); line-height: 1.5; max-width: 30rem; text-wrap: pretty; }
/* who: written in the blue pencil, because it is always a person */
.docket .who { width: 24%; padding-right: 0; font-family: var(--f-pen); font-size: 1.75rem; line-height: 1; color: var(--pencil); }

.posting { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-xl) clamp(var(--s-lg), 4vw, var(--s-2xl)); align-items: start; }
.dryrun { background: var(--paper-2); border: 1px solid var(--rule-2); padding: var(--s-sm) var(--s-md) var(--s-md); font-family: var(--f-mono); font-size: var(--t-mono); line-height: 1.5; }
.dryrun-h {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-sm);
  padding-bottom: var(--s-xs); border-bottom: 1px dashed var(--rule-2);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--label);
}
.dryrun-sample { border: 1px solid currentColor; border-radius: 2px; padding: 0.05rem 0.45rem; letter-spacing: 0.06em; }
.dryrun-rows { width: 100%; border-collapse: collapse; margin-top: var(--s-2xs); }
.dryrun-rows th, .dryrun-rows td { text-align: left; vertical-align: baseline; font-weight: 400; padding: 0.55rem var(--s-sm) 0.55rem 0; border-bottom: 1px dotted var(--rule-2); color: var(--ink); }
.dryrun-rows td:last-child { padding-right: 0; color: var(--ink-2); }
.dryrun-rows th { white-space: nowrap; }
.dryrun-rows .is-go th { color: var(--gold-ink); }
.dryrun-rows .is-held th, .dryrun-rows .is-held td:last-child { color: var(--pen-ink); }
.rules-list { border-top: 1px solid var(--rule-strong); }
.rules-list li { padding: var(--s-xs) 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); line-height: 1.55; max-width: 34rem; }
.rules-list li:first-child { color: var(--ink); font-size: var(--t-lg); line-height: 1.35; }

/* ===== 22. home: the name; the crimson band (every page closes on one) ===== */
.name .tamil-xl { color: var(--tamil); }
.name .dict { margin-top: 0; }
.name .dict-entry dd { display: block; }
.name .dict-sense { display: none; }
.name .dict-entry dd.dict-usage { padding-left: 0; }
/* the three things Kavi will not do, set large: they are vows, not a feature list */
.limits .wont b { font-size: clamp(1.5rem, 1.25rem + 0.7vw, 1.9rem); line-height: 1.2; margin: 0; }
.limits .wont li { padding: var(--s-sm) 0 var(--s-md); }

/* band: one solid full-width block per page, the closing ask. It sits after the .sheet,
   inside <main>, so it can run edge to edge. Cream type; the button is cream with crimson type. */
.band { background: var(--band); color: var(--band-ink); margin-top: var(--s-section); }
.band-in {
  max-width: var(--page-max); margin: 0 auto; padding: clamp(3.5rem, 2rem + 5vw, 6.5rem) var(--gutter);
  display: grid; grid-template-columns: var(--c-num) minmax(0, var(--c-text)) minmax(0, 1fr); column-gap: var(--c-gap); row-gap: var(--s-sm);
}
.band-in > * { grid-column: 2 / 4; }
.band h2 { font-size: clamp(2.5rem, 1.5rem + 3.6vw, 5rem); line-height: 1; letter-spacing: -0.022em; text-wrap: balance; }
.band-line { font-size: var(--t-lg); line-height: 1.45; max-width: 38ch; }
.band-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-sm) var(--s-lg); margin-top: var(--s-sm); }
.btn-band { background: var(--band-ink); border-color: var(--band-ink); color: var(--band); }
.btn-band:hover { background: var(--band-hover); border-color: var(--band-hover); }
.band :focus-visible { outline-color: var(--band-ink); }
.band-or { font-style: italic; }
.band .addr { font-style: normal; }
main:has(> .band:last-child) + .site-foot { margin-top: 0; border-top: 0; }

/* the footer's fourth column: the colour bar replaces the old key to marks */
.foot-bar .colourbar span:last-child { color: var(--ink-2); }

/* ===== 23. home: motion and narrower screens ============================= */
@media (prefers-reduced-motion: no-preference) {
  .hero .swipe { animation: k-swipe 900ms 2500ms var(--ease) both; }
  .log-mark path { stroke-dasharray: 1; animation: k-draw 450ms var(--ease) both; }
  /* the skip stroke is stretched to its row, so it is revealed with a clip, not a dash */
  .log-stroke { animation: k-wipe 420ms var(--ease) both; }
  .log-mark span { animation: k-fade 220ms 320ms var(--ease) both; }
  .reel { scroll-behavior: smooth; }
}
@keyframes k-wipe { from { clip-path: inset(-50% 100% -50% 0); } to { clip-path: inset(-50% 0 -50% 0); } }
@keyframes k-swipe { from { background-size: 0% 0.4em; } to { background-size: 100% 0.4em; } }

@media (max-width: 72rem) {
  .frames {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "post li" "car car" "vid news" "vid side";
  }
  .social { grid-template-columns: minmax(0, 1fr); }
  .frame .social-img { border-left: 0; border-top: 1px solid var(--frame-line); height: auto; }
  .reel-slides li { flex-basis: 62%; }
  .frame-side { padding-top: 0; }
  .frame-side .note { margin-left: 1.6rem; }
  .band-in { grid-template-columns: var(--c-num) minmax(0, 1fr); }
  .band-in > * { grid-column: 2; }
  .posting { grid-template-columns: minmax(0, 1fr); }
  .marked-row > .note { padding-top: 0; }
}
@media (max-width: 47.5rem) {
  .colourbar-sm { display: none; }
  .sec-head .sec-no.is-big { float: right; font-size: 2.2rem; padding-top: 0.6rem; }
  .frames { grid-template-columns: minmax(0, 1fr); grid-template-areas: "post" "li" "car" "vid" "news" "side"; }
  .frame-tag { margin-left: 0; }
  .reel-slides li { flex-basis: 86%; }
  .frame-vid .vid { max-width: 16rem; }
  .lighttable { padding: var(--s-sm) var(--s-xs); margin-inline: calc(var(--s-xs) * -1); border-inline: 0; }
  .lighttable::before, .lighttable::after { display: none; }
  .marksheet-compact { width: 100%; min-width: 0; }
  .marksheet-compact td, .marksheet-compact thead th { width: 5.5rem; }
  .marksheet-compact tbody th { padding-right: var(--s-sm); }
  .banned-strip { gap: 0.15rem 1rem; }
  .banned-strip li { font-size: 1.0625rem; }
  .docket thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .docket, .docket tbody { display: block; }
  .docket tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2xs) var(--s-sm); padding: var(--s-sm) 0; border-bottom: 1px solid var(--rule); }
  .docket tr:first-child { border-top: 1px solid var(--rule-strong); }
  .docket tbody th, .docket td, .docket .who { display: block; width: auto; padding: 0; border: 0; }
  .docket .who { grid-column: 1 / -1; font-size: 1.5rem; }
  .docket td:not(.who) { grid-column: 1 / -1; }
  .docket tbody th { font-size: 1.25rem; }
  .dryrun { padding-inline: var(--s-sm); }
  .dryrun-rows th { white-space: normal; }
}

/* ===== 24. the other pages: how it works, the gate, pricing, about ======== */
/* how it works: Kavi's step numbers in gold, yours in the blue pencil (section 14) */
.seq-step > .num::before { color: var(--gold-ink); }
.seq-step.is-you > .num::before { color: var(--pencil); }
/* a step may carry a wide child under its text: the thumbnails, the docket */
.seq-step > .span { margin-top: var(--s-lg); }
.seq-wide { display: grid; gap: var(--s-xl); }
/* the pieces of the week, as a short ruled list with their kind */
.pieces { margin-top: var(--s-2xs); }
.pieces li { grid-template-columns: minmax(0, 1fr) auto; padding: var(--s-xs) 0; }
.pieces .contents-what { grid-column: 1; font-size: var(--t-base); line-height: 1.4; }
.pieces .contents-kind { grid-column: 2; }
/* thumbnails: the real renders, small, on the same light table as the home page */
/* each thumbnail grows by its own width-to-height ratio, so all four stand one height and fill the row */
.thumbs-row { display: flex; align-items: flex-end; gap: clamp(var(--s-sm), 2vw, var(--s-md)); }
.thumb { display: grid; gap: 0.45rem; min-width: 0; flex: 1 1 0; }
.thumb-tall { flex-grow: 0.562; }
.thumb-wide { flex-grow: 1.244; }
.thumb .frame-head { gap: 0.1rem 0.45rem; }
.thumb .frame-what { font-size: 1.0625rem; }
.thumb img { width: 100%; height: auto; border: 1px solid var(--frame-line); background: #12151B; }
@media (max-width: 47.5rem) {
  .thumbs-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: var(--s-md) var(--s-sm); }
  .thumb-tall img { width: 62%; }
}
.thumbs-foot { margin-top: var(--s-md); }
/* the honest step: what is not built carries the TK mark, not a promise */
.tk-line { display: flex; align-items: center; gap: var(--s-xs); color: var(--ink-2); max-width: 38rem; }
.tk-line .tk { flex: none; font-size: 1.5rem; }

/* the gate: each of the twenty carries a correction, written above the struck phrase in the
   red pen on hover, focus or tap. It sits over the line before, so nothing reflows, and it is
   never wider than its own column. Always in the page, so a screen reader hears it. */
.banned-fixes li { position: relative; border-radius: 2px; cursor: default; }
.banned-fixes li:focus-visible { outline-offset: 2px; }
.fix {
  position: absolute; z-index: 2; left: 2.25rem; bottom: calc(100% - 0.5rem);
  width: max-content; max-width: calc(100% - 2.25rem);
  font-family: var(--f-pen); font-size: 1.5rem; line-height: 0.95; color: var(--pen);
  background: var(--paper); padding: 0.05rem 0.3rem 0.1rem; margin-left: -0.3rem;
  opacity: 0; pointer-events: none;
}
.banned-fixes li:hover .fix, .banned-fixes li:focus .fix { opacity: 1; }
.banned-fixes li:hover s, .banned-fixes li:focus s { color: var(--ink-3); }
@media (prefers-reduced-motion: no-preference) {
  .fix { transition: opacity 140ms var(--ease); }
}
@media (max-width: 47.5rem) { .fix { left: 2rem; max-width: calc(100% - 2rem); } }

/* pricing: the three kinds of customer, one ruled row of unequal columns (not three cards) */
.kinds { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--rule-strong); }
.kinds > div { display: grid; gap: var(--s-2xs); align-content: start; padding: var(--s-sm) var(--s-lg) var(--s-md) 0; }
.kinds > div + div { padding-left: var(--s-lg); border-left: 1px solid var(--rule); }
.kinds dt { font-size: var(--t-lg); font-style: italic; line-height: 1.2; }
.kinds dd { color: var(--ink-2); line-height: 1.5; max-width: 30rem; }
.kinds .kinds-main dd { color: var(--ink); font-size: var(--t-lg); line-height: 1.4; }
/* the full not-built list: two columns of the same slip on wide screens */
.tk-full { columns: 2 22rem; column-gap: var(--s-xl); }
.tk-full li { break-inside: avoid; }
.slip-full { padding-inline: clamp(var(--s-sm), 2.4vw, var(--s-lg)); }
@media (max-width: 47.5rem) {
  .kinds { grid-template-columns: minmax(0, 1fr); }
  .kinds > div, .kinds > div + div { padding: var(--s-sm) 0; border-left: 0; }
  .kinds > div + div { border-top: 1px solid var(--rule); }
}

/* about: the name as the h1, crimson on paper and gold on night, as on the home page */
.page-head h1.tamil-xl { color: var(--tamil); }
/* short answers and definitions never end on one stranded word */
.answers dd, .kinds dd, .tk-note, .seq-terms dd { text-wrap: pretty; }
/* on a phone the long status ("written, not handed in") goes under its item, not beside it */
@media (max-width: 47.5rem) {
  .tk-full li.is-written { grid-template-columns: minmax(0, 1fr); }
  .tk-full li.is-written .tk-status { text-align: left; }
}

/* ===== 25. second-round fixes ============================================ */
/* hero: two of the week's pieces, small and flat on the light-table colour, in the margin
   beside the deck. They link down to the sheet. On a phone they follow the button. */
.hero-strip {
  display: inline-flex; align-items: flex-end; gap: 0.6rem; justify-self: start;
  padding: 0.6rem 0.7rem 0.7rem; background: var(--table); border: 1px solid var(--rule-2);
  text-decoration: none; color: inherit;
}
.hero-strip:hover { border-color: var(--gold); }
.hs-frame { display: grid; gap: 0.3rem; }
.hs-frame .frame-n { font-size: 0.75rem; line-height: 1; }
.hs-frame img { display: block; width: 11rem; height: 11rem; object-fit: cover; border: 1px solid var(--frame-line); background: #12151B; }
.hs-tall img { width: 6.19rem; }
.row > .hero-strip { grid-column: 3; }
@media (min-width: 72.01rem) {
  /* rise beside the deck, so the button row keeps its height */
  .row > .hero-strip { align-self: end; margin-top: -11.5rem; }
}
@media (max-width: 72rem) {
  .row > .hero-strip { grid-column: 2; margin-top: var(--s-md); }
}
@media (max-width: 47.5rem) {
  .row > .hero-strip { grid-column: 1; }
  .hs-frame img { width: 9rem; height: 9rem; }
  .hs-tall img { width: 5.06rem; }
}

/* the mark sheet: the gold swipe runs down the five body rows only, clear of the header
   rule and of the total; the passing total is written in gold inside its gold ring */
.marksheet-compact thead .is-pass, .marksheet-compact .total .is-pass { background-image: none; }
.marksheet-compact td.is-pass .hand { color: var(--gold-ink); }

/* not-built statuses: neutral handwriting, the red pen kept for the TK box itself */
.tk-status { color: var(--ink-2); }

/* the docket's "we" row is not the reader's pencil */
.docket .who.is-us { color: var(--ink-2); }

/* frame 01's tag sits on the title's line, right-aligned like the rest */
.frame-post .frame-head { flex-wrap: nowrap; }
.frame-post .frame-tag { white-space: nowrap; }

/* the gate's specimens are set upright: they are examples, not asides */
.stat-specimen, .sample { font-style: normal; }

/* narrow screens */
@media (max-width: 37.5rem) {
  /* the dry run: state and piece on one line, the reason under them */
  .dryrun-rows, .dryrun-rows tbody { display: block; }
  .dryrun-rows tr { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-sm); padding: 0.5rem 0; border-bottom: 1px dotted var(--rule-2); }
  .dryrun-rows th, .dryrun-rows td { border: 0; padding: 0; }
  .dryrun-rows td:last-child { grid-column: 1 / -1; padding-left: 1.25rem; }
  /* the not-built slip: the status under its item, not squeezing it */
  .tk-list li { grid-template-columns: minmax(0, 1fr); }
  .tk-status { text-align: left; }
}

/* how it works: step headings never strand a word; "your part" goes on its own line on a phone */
.seq-step h2 { text-wrap: balance; }
@media (max-width: 47.5rem) {
  .seq-yours { display: block; margin: 0.35rem 0 0; vertical-align: 0; }
}
/* the four thumbnails' labels share one baseline */
.thumbs-row { align-items: stretch; }
.thumb { grid-template-rows: auto 1fr; align-items: end; }
.thumb .frame-head { align-self: start; min-height: 1.6rem; }

/* the gate's corrections: on a phone they sit under their own phrase, never over a neighbour */
@media (max-width: 47.5rem) {
  .fix { position: static; display: block; width: auto; max-width: none; margin: 0.1rem 0 0; padding: 0; background: none; opacity: 1; visibility: hidden; height: 0; overflow: hidden; }
  .banned-fixes li:hover .fix, .banned-fixes li:focus .fix { visibility: visible; height: auto; }
}
/* at night the hero's strip is a corner of the same lit table */
@media (prefers-color-scheme: dark) {
  .hero-strip { --table: #D9D2C3; --gold-ink: #6B5112; --rule-2: #ABA28E; --frame-line: #A69D89; --gold: #A8842B; border-color: #2E3442; }
}
@media (max-width: 47.5rem) { .frame-post .frame-head { flex-wrap: wrap; } .frame-post .frame-tag { white-space: normal; } }
/* a note in the reader's own hand: the blue pencil, leader included */
.note.is-you, .note.is-you::before { color: var(--pencil); border-color: var(--pencil); }
/* the routing slip on a phone: the initials boxes sit on one line, whatever wraps above them */
@media (max-width: 47.5rem) { .routing-steps > li { align-content: stretch; } .routing-steps a { grid-template-rows: auto auto 1fr; } .routing-steps .initials { align-self: end; } }

/* ===== 24. home: the name, drawn ======================================== */
/* The kit's play-once lockup (brand/kaviyam/logo/motion/kaviyam-wordmark-once-*.svg), inline so its
   ink follows the theme. Timings and keyframes are the kit's, unchanged. The red centre dot comes
   first, then the four dots clockwise from the top, then the one line from beside the red dot,
   then the word, then the length mark. Static by default: the drawing copies (.kd-d, .kd-mac) are
   hidden and everything else is the finished logo. js/site.js arms it (paused on its first, blank
   frame) and starts it when it scrolls into view; with no script, or reduced motion, it holds still. */
.name-mark { display: grid; gap: var(--s-sm); justify-items: start; margin: 0; }
/* 4.5rem tall at most (19.08rem wide: the lockup is 491.7 x 116), and never wider than its column, so a
   larger default text size scales it down instead of pushing the page sideways. */
.logo-draw { width: min(100%, 19.08rem); height: auto; max-height: 4.5rem; color: var(--logo-ink); margin-block: var(--s-sm); }
.name-mark figcaption { font-style: italic; color: var(--ink-2); font-size: var(--t-sm); line-height: 1.45; max-width: 34rem; }
.logo-draw .kd-d, .logo-draw .kd-mac { opacity: 0; }
.logo-draw [class*="kd-dot"] { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .logo-draw.is-armed .kd-d { animation: kd-draw 6.55s linear 1 both, kd-drawvis 6.55s linear 1 both; }
  .logo-draw.is-armed .kd-line { animation: kd-linevis 6.55s linear 1 both; }
  .logo-draw.is-armed .kd-dot0 { animation: kd-dot0 6.55s linear 1 both; }
  .logo-draw.is-armed .kd-dot1 { animation: kd-dot1 6.55s linear 1 both; }
  .logo-draw.is-armed .kd-dot2 { animation: kd-dot2 6.55s linear 1 both; }
  .logo-draw.is-armed .kd-dot3 { animation: kd-dot3 6.55s linear 1 both; }
  .logo-draw.is-armed .kd-dot4 { animation: kd-dot4 6.55s linear 1 both; }
  .logo-draw.is-armed .kd-word { animation: kd-word 6.55s linear 1 both; }
  .logo-draw.is-armed .kd-mac { animation: kd-mac 6.55s linear 1 both, kd-macvis 6.55s linear 1 both; }
  .logo-draw.is-armed .kd-macf { animation: kd-macf 6.55s linear 1 both; }
  .logo-draw.is-armed:not(.is-drawing) [class^="kd-"] { animation-play-state: paused; }
}
@keyframes kd-draw{0%{stroke-dashoffset:1000}19.8473%{stroke-dashoffset:1000;animation-timing-function:cubic-bezier(0.35, 0.1, 0.75, 0.85)}54.1985%{stroke-dashoffset:0}100%{stroke-dashoffset:0}}
@keyframes kd-drawvis{0%{opacity:1;animation-timing-function:step-end}53.9695%{opacity:0}100%{opacity:0}}
@keyframes kd-linevis{0%{opacity:0;animation-timing-function:step-end}53.9695%{opacity:1}100%{opacity:1}}
@keyframes kd-dot0{0%{opacity:0;transform:scale(0.4)}1.5267%{opacity:0;transform:scale(0.4);animation-timing-function:cubic-bezier(0.25, 0, 0.30, 1)}6.1069%{opacity:1;transform:scale(1)}100%{opacity:1;transform:scale(1)}}
@keyframes kd-dot1{0%{opacity:0;transform:scale(0.4)}7.6336%{opacity:0;transform:scale(0.4);animation-timing-function:cubic-bezier(0.25, 0, 0.30, 1)}11.9084%{opacity:1;transform:scale(1)}100%{opacity:1;transform:scale(1)}}
@keyframes kd-dot2{0%{opacity:0;transform:scale(0.4)}9.4656%{opacity:0;transform:scale(0.4);animation-timing-function:cubic-bezier(0.25, 0, 0.30, 1)}13.7405%{opacity:1;transform:scale(1)}100%{opacity:1;transform:scale(1)}}
@keyframes kd-dot3{0%{opacity:0;transform:scale(0.4)}11.2977%{opacity:0;transform:scale(0.4);animation-timing-function:cubic-bezier(0.25, 0, 0.30, 1)}15.5725%{opacity:1;transform:scale(1)}100%{opacity:1;transform:scale(1)}}
@keyframes kd-dot4{0%{opacity:0;transform:scale(0.4)}13.1298%{opacity:0;transform:scale(0.4);animation-timing-function:cubic-bezier(0.25, 0, 0.30, 1)}17.4046%{opacity:1;transform:scale(1)}100%{opacity:1;transform:scale(1)}}
@keyframes kd-word{0%{opacity:0;transform:translate(0px,4px)}55.7252%{opacity:0;transform:translate(0px,4px);animation-timing-function:cubic-bezier(0.20, 0, 0.30, 1)}63.3588%{opacity:1;transform:none}100%{opacity:1;transform:none}}
@keyframes kd-mac{0%{stroke-dashoffset:64.51}64.1221%{stroke-dashoffset:64.51;animation-timing-function:cubic-bezier(0.25, 0.3, 0.45, 1)}69.4656%{stroke-dashoffset:0}100%{stroke-dashoffset:0}}
@keyframes kd-macvis{0%{opacity:0;animation-timing-function:step-end}64.1221%{opacity:1;animation-timing-function:step-end}69.4656%{opacity:0}100%{opacity:0}}
@keyframes kd-macf{0%{opacity:0;animation-timing-function:step-end}69.4656%{opacity:1}100%{opacity:1}}
