/* Hallmark · shape: Long Document · genre: editorial · theme: Almanac (deal 1/3, seed jee-neet-coaching-institute-5547·22046cda·2026-11-02·r0), paper and accent re-mixed to the brief's physics notebook · job: book · draw: e01f59
 * hero: Stage (draw dealt Counter; swapped because the brief puts a large free body diagram beside the text) · nav: search-led bar, the pill finds a booking by roll number · footer: statement · imagery: photographs, Unsplash 8 (via the user's Unsplash connector, muted), the free body diagram as an SVG figure · signature: the hero's free body diagram, every force labelled, beside "every fee, every rule"
 * axes: light/grotesk-sans/chromatic-cyan · posture: restrained · surface: tinted white paper with a 24px graph grid · contrast: pass · fold: pass · copy: verbatim (brief.md final copy) · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: H, the brief asks for ten home sections; heavy sections alternate with quiet ones and the photo sits alone */
/* Hallmark · waive 80 · the hero figure is a labelled free body diagram (class fbd, aria-label), a physics diagram of a real system · the brief makes the force diagram the institute's teaching method and its mark */
/* Hallmark · waive 47c · the graph grid sits under every table and figure as the notebook's paper · the brief specifies white paper with a faint graph grid */
/* Hallmark · waive 39b · the demo bar buttons stand 36px inside a 40px strip · the brief asks for a thin Mindloft Labs demo bar above the institute's own header */
/* Hallmark · dismissed 59 · twelve blocks counted, the brief lists ten home sections in order and each carries its own fact */
/* Hallmark · waive 77 · the results table holds four rows of dashes on purpose · the brief asks for an honest results template with no figures, since this institute is not real */
/* Hallmark · dismissed F4 · the ink fills are the selected state of segmented choices and tabs, not buttons; the cyan primary appears once per page */
/* Hallmark · waive 44c · inner pages (courses, fees, test, teachers, before you join, about, privacy) open with a short banner head so the page's working content starts at once · the home page carries the full Stage hero */
/* Hallmark · waive 78 · Before you join, Test and Privacy set their h2 as margin heads of a long document at 31px · the brief asks for short reference sections a careful parent scans */
/* Hallmark · dismissed 70 · "Sent. Check your phone." opens the visitor's phone drawer where the reply really arrives; the brief makes the drawer the delivery in this demo */
@import url("../tokens.css");
@import url("../base.css");

:root { --text-sm: 0.9375rem; --nav-h: 72px; --bar-h: 40px; }

body {
  background-color: var(--color-paper);
  background-image:
    linear-gradient(var(--color-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid) 1px, transparent 1px);
  background-size: var(--grid-step) var(--grid-step);
  color: var(--color-ink-2);
}
h1, h2, h3 { color: var(--color-ink); }
h1 { font-size: clamp(2.5rem, 4.2vw + 0.75rem, 4.5rem); line-height: 1.02; letter-spacing: -0.035em; max-width: 16ch; }
.display-s { font: 600 var(--text-display-s)/1.06 var(--font-display); letter-spacing: -0.03em; color: var(--color-ink); max-width: 24ch; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
.num, .fig { font-family: var(--font-outlier); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.hl { background: linear-gradient(transparent 52%, var(--color-accent) 52%, var(--color-accent) 94%, transparent 94%); padding-inline: 0.08em; color: var(--color-ink); }
.muted { color: var(--color-muted); }
.linkbtn { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-decoration-color: var(--color-accent-deep); text-underline-offset: 0.16em; cursor: pointer; }
.linkbtn:hover { text-decoration-thickness: 2px; }
.site-footer .linkbtn { text-decoration-color: color-mix(in oklab, var(--color-paper) 45%, transparent); }
.small { font-size: var(--text-sm); }
a { color: var(--color-ink); text-decoration-color: var(--color-accent-deep); }
a:hover { text-decoration-thickness: 2px; }
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: var(--space-md); }

/* Demo bar, Mindloft Labs' strip */
.demobar { background: var(--color-demo); color: var(--color-demo-ink); font-size: var(--text-sm); }
.demobar .container { display: flex; align-items: center; gap: var(--space-lg); min-height: var(--bar-h); }
.demobar a, .demobar button { white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; color: var(--color-demo-ink); background: none; border: 0; padding: var(--space-2xs) 0; cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--color-demo-ink) 40%, transparent); text-underline-offset: 0.2em; font-size: var(--text-sm); }
.demobar a:hover, .demobar button:hover { text-decoration-color: var(--color-demo-ink); }
.demobar :focus-visible { outline-color: var(--color-demo-ink); }
.demobar__by { margin-right: auto; }
.demobar details { position: relative; display: none; }
.demobar summary { cursor: pointer; list-style: none; padding: var(--space-2xs) 0; }
.demobar summary::-webkit-details-marker { display: none; }
.demobar__menu { position: absolute; right: 0; top: 100%; z-index: var(--z-dropdown); display: grid; gap: var(--space-xs); min-width: 15rem; padding: var(--space-md); background: var(--color-demo); }
.demobar__by, .demobar summary { white-space: nowrap; }
@media (max-width: 52rem) { .demobar .demobar__links { display: none; } .demobar details { display: block; } }

/* Header: search-led bar */
.site-header { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--color-paper); border-bottom: var(--rule-hair) solid var(--color-rule); }
.site-header .container { display: flex; align-items: center; gap: var(--space-lg); min-height: var(--nav-h); }
.wordmark { display: inline-flex; align-items: center; gap: var(--space-xs); font: 600 1.25rem/1 var(--font-display); letter-spacing: -0.02em; color: var(--color-ink); text-decoration: none; white-space: nowrap; }
.wordmark svg { width: 28px; height: 28px; flex-shrink: 0; }
.nav { display: flex; gap: var(--space-lg); margin-right: auto; }
.nav a { font-size: var(--text-sm); text-decoration: none; color: var(--color-ink-2); padding: var(--space-xs) 0; border-bottom: var(--rule-bar) solid transparent; }
.nav a:hover { color: var(--color-ink); border-bottom-color: var(--color-rule); }
.nav a[aria-current="page"] { color: var(--color-ink); border-bottom-color: var(--color-accent); }
.rollfind { display: flex; align-items: center; border: var(--rule-hair) solid var(--color-muted); border-radius: var(--radius-pill); background: var(--color-sheet); height: 40px; }
.rollfind label { padding-left: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; }
.rollfind input { width: 8.5rem; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 var(--space-xs); font-family: var(--font-outlier); font-size: var(--text-sm); color: var(--color-ink); outline: 2px solid transparent; outline-offset: -2px; }
.rollfind input:focus-visible { outline-color: var(--color-focus); }
.rollfind button { height: 100%; padding: 0 var(--space-sm); border: 0; border-left: var(--rule-hair) solid var(--color-rule); background: transparent; color: var(--color-ink); font-size: var(--text-sm); cursor: pointer; }
.rollfind button:hover { background: var(--color-paper-2); }
.menu-toggle { display: none; }
.menu-panel { display: none; }
@media (max-width: 72rem) { .rollfind--nav { display: none; } }
@media (max-width: 60rem) {
  .nav, .site-header .btn--nav { display: none; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .menu-panel[data-open] { display: grid; gap: var(--space-xs); padding: var(--space-md) var(--gutter) var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); }
  .menu-panel a { padding: var(--space-sm) 0; font-size: var(--text-lg); text-decoration: none; border-bottom: var(--rule-hair) solid var(--color-rule); }
  .menu-panel .rollfind { margin-top: var(--space-md); }
}

/* Controls, all states */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-lg); border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); font: 600 var(--text-md)/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--color-paper-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--color-accent-2); }
.btn--nav { min-height: 40px; padding: 0 var(--space-md); font-size: var(--text-sm); }
.btn--small { min-height: 44px; padding: 0 var(--space-md); font-size: var(--text-sm); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.status { display: inline-flex; align-items: baseline; gap: var(--space-xs); font-size: var(--text-sm); color: var(--color-ink-2); }

/* Sections */
.section { padding-block: var(--section-gap); }
.section--s { padding-block: var(--section-gap-s); }
.section--l { padding-block: var(--section-gap-l); }
.section--rule { border-top: var(--rule-bar) solid var(--color-rule-2); }
.section--well { background: var(--color-paper-2); }
.section--ink { background: var(--color-ink); color: var(--color-paper); }
.section--ink h2, .section--ink h3 { color: var(--color-paper); }
.section--ink a { color: var(--color-paper); }
.section--ink .muted { color: var(--color-rule); }
.section--ink .lead, .section--ink p { color: var(--color-paper); }
.head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-md); margin-bottom: var(--space-2xl); align-items: end; }
.head > h2 { grid-column: 1 / span 6; }
.head > .lead { grid-column: 8 / span 5; }
.head--stack > h2, .head--stack > .lead { grid-column: 1 / span 8; }
.lead { color: var(--color-ink-2); }
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-xl); }
@media (max-width: 60rem) {
  .head > h2, .head > .lead, .head--stack > h2, .head--stack > .lead { grid-column: 1 / -1; }
  .head { margin-bottom: var(--space-xl); }
}

/* Hero */
.hero { padding-block: var(--space-xl) var(--space-2xl); min-height: calc(100dvh - var(--nav-h) - var(--bar-h)); display: grid; align-items: center; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3xl); align-items: center; }
.hero__text { display: grid; gap: var(--space-lg); justify-items: start; }
.hero .lead { max-width: 44ch; }
.hero__note { font-size: var(--text-sm); color: var(--color-muted); }
@media (max-width: 60rem) { .hero { min-height: 0; padding-block: var(--space-xl) var(--space-2xl); } .hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); } }

/* The sheet: a printed figure or table laid on the grid paper */
.sheet { margin: 0; background: var(--color-sheet); border-top: var(--rule-bar) solid var(--color-ink); outline: var(--rule-hair) solid var(--color-rule); outline-offset: -1px; }
.sheet__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); padding: var(--space-md) var(--space-lg); border-bottom: var(--rule-hair) solid var(--color-rule); }
.sheet__head h3, .sheet__head p, .sheet__title { font-size: var(--text-md); }
.sheet__title { font-weight: 600; color: var(--color-ink); }
.sheet figcaption, .sheet__foot { padding: var(--space-sm) var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); color: var(--color-muted); }
.fbd { width: 100%; height: auto; color: var(--color-ink); }
.fbd .slope { fill: var(--color-paper-2); stroke: var(--color-ink); stroke-width: 1.5; }
.fbd .block { fill: var(--color-accent); stroke: var(--color-ink); stroke-width: 1.5; }
.fbd .force { stroke: var(--color-ink); stroke-width: 2.25; fill: none; }
.fbd .comp { stroke: var(--color-muted); stroke-width: 1.25; stroke-dasharray: 5 4; fill: none; }
.fbd .dim { stroke: var(--color-muted); stroke-width: 1; fill: none; }
.fbd text { font-family: var(--font-outlier); font-size: 17px; fill: var(--color-ink); }
.fbd text.sub { font-size: 14px; fill: var(--color-muted); }
.fbd .head-fill { fill: var(--color-ink); }
.fbd .head-muted { fill: var(--color-muted); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
.table th { font: 400 var(--text-sm)/1.3 var(--font-body); color: var(--color-muted); text-align: left; padding: var(--space-sm) var(--space-md); border-bottom: var(--rule-bar) solid var(--color-rule-2); white-space: nowrap; }
.table td { padding: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); vertical-align: baseline; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table .r { text-align: right; }
.table td.num { font-size: var(--text-md); color: var(--color-ink); }
.table td strong { color: var(--color-ink); font-weight: 600; }
.sheet .table th:first-child, .sheet .table td:first-child { padding-left: var(--space-lg); }
.sheet .table th:last-child, .sheet .table td:last-child { padding-right: var(--space-lg); }
.section--ink .table th { color: var(--color-rule); border-bottom-color: var(--color-paper); }
.section--ink .table td { border-top-color: color-mix(in oklab, var(--color-paper) 25%, transparent); color: var(--color-paper); }
@media (max-width: 40rem) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table--stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-md); padding: var(--space-md) 0; border-top: var(--rule-hair) solid var(--color-rule); }
  .table--stack td { border: 0; padding: var(--space-2xs) 0 !important; text-align: left; }
  .table--stack td[data-label]::before { content: attr(data-label); display: block; font: 400 var(--text-sm)/1.3 var(--font-body); color: var(--color-muted); }
  .table--stack td:first-child { grid-column: 1 / -1; }
  .sheet .table--stack tr { padding-inline: var(--space-md); }
}

/* Switcher */
.seg { display: inline-flex; flex-wrap: wrap; border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill); margin: 0; padding: 0; }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.seg button, .seg label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-md); border: 0; background: transparent; color: var(--color-ink); font: 500 var(--text-sm)/1 var(--font-body); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.seg > * + button, .seg input + label { border-left: var(--rule-hair) solid var(--color-ink); }
.seg input:first-of-type + label { border-left: 0; }
.seg button:hover, .seg label:hover { background: var(--color-paper-2); }
.seg button[aria-selected="true"], .seg input:checked + label { background: var(--color-ink); color: var(--color-paper); }
.seg button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg input:focus-visible + label { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.switch__bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.switch [role="tabpanel"] + [role="tabpanel"] { margin-top: var(--space-xl); }
.js .switch [role="tabpanel"] + [role="tabpanel"] { margin-top: 0; }
.courses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-columns); }
.course { display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--space-md); padding: var(--space-xl); background: var(--color-sheet); border-top: var(--rule-bar) solid var(--color-ink); outline: var(--rule-hair) solid var(--color-rule); outline-offset: -1px; }
.course__fee { font: 500 var(--text-display-s)/1 var(--font-outlier); letter-spacing: -0.04em; color: var(--color-ink); }
.course dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-xs) var(--space-lg); margin: 0; font-size: var(--text-sm); }
.course dt { color: var(--color-muted); }
.course dd { margin: 0; color: var(--color-ink); }
@media (max-width: 60rem) { .courses { grid-template-columns: minmax(0, 1fr); } .course { padding: var(--space-lg); } }

/* Steps beside the reply, as the parent sees it */
.how { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-3xl); align-items: center; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: var(--space-md); padding: var(--space-lg) 0; border-top: var(--rule-hair) solid var(--color-rule); }
.steps li:last-child { border-bottom: var(--rule-hair) solid var(--color-rule); }
.steps li::before { content: counter(step); font: 500 var(--text-2xl)/1 var(--font-outlier); color: var(--color-ink); }
.steps h3 { margin-bottom: var(--space-xs); }
@media (max-width: 60rem) { .how { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); } }

/* Chat: the phone screen, built */
.chat { display: grid; gap: var(--space-sm); padding: var(--space-lg); background: var(--color-phone); border-top: var(--rule-bar) solid var(--color-ink); outline: var(--rule-hair) solid var(--color-rule); outline-offset: -1px; }
.chat__from { font-size: var(--text-sm); color: var(--color-ink); font-weight: 600; }
.bubble { max-width: 34rem; padding: var(--space-sm) var(--space-md); background: var(--color-bubble-in); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-pill); font-size: var(--text-sm); line-height: 1.5; color: var(--color-ink); white-space: pre-line; }
.bubble--out { justify-self: end; background: var(--color-bubble-out); }
.bubble time { display: block; margin-top: var(--space-2xs); font-size: var(--text-xs); color: var(--color-muted); text-align: right; }
.bubble__btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xs); max-width: 34rem; }
.bubble__btns button { min-height: 44px; border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-bubble-in); color: var(--color-accent-deep); font: 600 var(--text-sm)/1.2 var(--font-body); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.bubble__btns button:hover { background: var(--color-paper-2); }
.bubble__btns button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.bubble__btns button:disabled { opacity: 0.55; cursor: not-allowed; }

/* House rules as rows */
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-3xl); }
.rules > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--space-lg); padding: var(--space-lg) 0; border-top: var(--rule-hair) solid var(--color-rule); }
.rules h3 { font-size: var(--text-xl); }
@media (max-width: 60rem) { .rules { grid-template-columns: minmax(0, 1fr); } .rules > div { grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); } }

/* Statement */
.statement { display: grid; gap: var(--space-xl); justify-items: start; }
.statement .display-s { max-width: 30ch; }

/* Photographs */
.photo { position: relative; margin: 0; aspect-ratio: 21 / 9; min-height: 440px; border-radius: var(--radius-card); }
.photo--portrait { aspect-ratio: 4 / 5; min-height: 0; }
.photo--land { aspect-ratio: 3 / 2; min-height: 0; }
.photo > img { outline: var(--rule-hair) solid var(--color-rule-2); outline-offset: -1px; }
.caption { margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
@media (max-width: 60rem) { .photo { min-height: 0; aspect-ratio: 4 / 3; } }

/* Schedule: the week */
.week { display: grid; grid-template-columns: minmax(10rem, 2fr) repeat(7, minmax(0, 1fr)); border-top: var(--rule-bar) solid var(--color-rule-2); }
.week > * { padding: var(--space-md) var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); min-width: 0; }
.week .wk-h { font-size: var(--text-sm); color: var(--color-muted); }
.week .wk-name { color: var(--color-ink); font-weight: 600; padding-left: 0; }
.week .wk-name small { display: block; font-weight: 400; color: var(--color-muted); font-size: var(--text-sm); }
.week .on { background: var(--color-sheet); border-left: var(--rule-hair) solid var(--color-rule); font-family: var(--font-outlier); font-size: var(--text-sm); color: var(--color-ink); }
.week .off { color: var(--color-muted); font-size: var(--text-sm); border-left: var(--rule-hair) solid var(--color-rule); }
.week .sun { background: var(--color-paper-2); }
@media (max-width: 60rem) {
  .week { grid-template-columns: minmax(0, 1fr); }
  .week .wk-h, .week .off { display: none; }
  .week .on { border-left: 0; }
  .week .on::before { content: attr(data-day) " "; font-family: var(--font-body); color: var(--color-muted); }
}

/* Teachers */
.people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-columns); }
.people--all { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0; column-gap: var(--space-3xl); }
.person { display: grid; gap: var(--space-sm); align-content: start; padding-top: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); }
.people--all .person { grid-template-columns: 4rem minmax(0, 1fr); column-gap: var(--space-lg); padding-block: var(--space-lg); }
.people--all .person > :not(.initials) { grid-column: 2; }
.people--all .person .initials { grid-row: 1 / span 4; }
.initials { display: grid; place-items: center; width: 4rem; height: 4rem; background: var(--color-sheet); border: var(--rule-hair) solid var(--color-ink); font: 500 var(--text-lg)/1 var(--font-outlier); color: var(--color-ink); }
.person h3 { font-size: var(--text-xl); }
.person .q { font-size: var(--text-sm); color: var(--color-muted); }
@media (max-width: 60rem) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } .people--all { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 40rem) { .people { grid-template-columns: minmax(0, 1fr); } }

/* Split for text and a table or figure */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3xl); align-items: start; }
.split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split--rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split > div { display: grid; gap: var(--space-lg); align-content: start; min-width: 0; }
@media (max-width: 60rem) { .split, .split--even, .split--rev { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); } }

/* FAQ */
.faq { border-top: var(--rule-bar) solid var(--color-rule-2); }
.faq details { border-bottom: var(--rule-hair) solid var(--color-rule); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); min-height: 64px; padding: var(--space-md) 0; cursor: pointer; list-style: none; font: 600 var(--text-lg)/1.3 var(--font-display); color: var(--color-ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 var(--text-xl)/1 var(--font-outlier); color: var(--color-muted); }
.faq details[open] summary::after { content: "−"; }
.faq summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.faq details > p { padding-bottom: var(--space-lg); max-width: 60ch; }

/* The close: next Sundays beside a photograph */
.close { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--space-3xl); align-items: center; }
.close__text { display: grid; gap: var(--space-lg); justify-items: start; }
.sundays { list-style: none; margin: 0; padding: 0; display: grid; width: 100%; border-top: var(--rule-bar) solid var(--color-ink); }
.sundays li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding: var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.sundays .fig { font-size: var(--text-xl); color: var(--color-ink); }
@media (max-width: 60rem) { .close { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); } }

/* Forms */
.form { display: grid; gap: var(--space-lg); }
.field { display: grid; gap: var(--space-xs); }
.field > label, .field > .label, fieldset.field > legend { font: 600 var(--text-sm)/1.3 var(--font-body); color: var(--color-ink); padding: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.input { width: 100%; min-height: 52px; padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-muted); border-radius: var(--radius-input); background: var(--color-sheet); color: var(--color-ink); font-size: var(--text-md); outline: 2px solid transparent; outline-offset: -3px; }
.input:hover { border-color: var(--color-ink-2); }
.input:focus-visible { outline-color: var(--color-focus); }
.input[aria-invalid="true"] { border-color: var(--color-error); }
.input:disabled { opacity: 0.55; cursor: not-allowed; }
.input--num { font-family: var(--font-outlier); }
.help { min-height: 1lh; font-size: var(--text-sm); color: var(--color-muted); }
.help.err { color: var(--color-error); }
.choices { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.choice { position: relative; display: inline-flex; border-radius: var(--radius-pill); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-muted); border-radius: var(--radius-pill); background: var(--color-sheet); color: var(--color-ink); font-size: var(--text-sm); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.choice span:hover { background: var(--color-paper-2); }
.choice input:checked + span { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper); }
.choice:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-sm); align-items: start; font-size: var(--text-md); color: var(--color-ink); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: var(--space-3xs) 0 0; accent-color: var(--color-ink); }
.toggle { display: inline-flex; align-items: center; gap: var(--space-sm); min-height: 44px; cursor: pointer; color: var(--color-ink); }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle__track { position: relative; width: 48px; height: 28px; flex-shrink: 0; border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill); background: var(--color-sheet); transition: background-color var(--dur-short) var(--ease-out); }
.toggle__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--color-ink); transition: transform var(--dur-short) var(--ease-out); }
.toggle input:checked + .toggle__track { background: var(--color-accent-2); }
.toggle input:checked + .toggle__track::after { transform: translateX(20px); }
.toggle input:focus-visible + .toggle__track { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: stretch; border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill); }
.stepper button { width: 48px; min-height: 48px; border: 0; background: transparent; color: var(--color-ink); font: 500 var(--text-xl)/1 var(--font-outlier); cursor: pointer; }
.stepper button:hover { background: var(--color-paper-2); }
.stepper button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.stepper button:disabled { opacity: 0.55; cursor: not-allowed; }
.stepper output { display: grid; place-items: center; min-width: 3.5rem; border-inline: var(--rule-hair) solid var(--color-ink); font: 500 var(--text-lg)/1 var(--font-outlier); color: var(--color-ink); }

/* Calculator */
.calc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3xl); align-items: start; }
.calc__out { position: sticky; top: calc(var(--nav-h) + var(--space-lg)); }
.total { display: grid; gap: var(--space-2xs); padding: var(--space-lg); border-bottom: var(--rule-hair) solid var(--color-rule); }
.total .fig { font-size: var(--text-display-s); line-height: 1; letter-spacing: -0.04em; color: var(--color-ink); }
.ledger { width: 100%; border-collapse: collapse; }
.ledger td { padding: var(--space-sm) var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); }
.ledger tr:first-child td { border-top: 0; }
.ledger td.num { text-align: right; color: var(--color-ink); }
.ledger tr.sum td { border-top: var(--rule-bar) solid var(--color-rule-2); font-weight: 600; color: var(--color-ink); }
@media (max-width: 60rem) { .calc { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); } .calc__out { position: static; } }

/* Prose pages */
.prose { display: grid; gap: var(--space-md); max-width: 68ch; }
.prose p, .prose li { line-height: 1.7; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: var(--space-xs); }
.prose h2 { font-size: var(--text-2xl); margin-top: var(--space-xl); }
.doc { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--gap-columns); }
.doc > section { display: contents; }
.doc h2 { grid-column: 1; font-size: var(--text-2xl); padding: var(--space-xl) 0; border-top: var(--rule-hair) solid var(--color-rule); }
.doc .doc__body { grid-column: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); align-content: start; padding: var(--space-xl) 0; border-top: var(--rule-hair) solid var(--color-rule); max-width: 68ch; }
.doc .doc__body ul { margin: 0; padding-left: 1.2em; display: grid; gap: var(--space-xs); }
@media (max-width: 60rem) { .doc { grid-template-columns: minmax(0, 1fr); } .doc h2 { grid-column: 1; padding-bottom: 0; } .doc .doc__body { grid-column: 1; border-top: 0; padding-top: var(--space-md); } }
.note { padding: var(--space-md) var(--space-lg); background: var(--color-paper-2); border-left: var(--rule-bar) solid var(--color-ink); font-size: var(--text-sm); color: var(--color-ink); max-width: 68ch; }
.page-head { padding-block: var(--space-3xl) var(--space-2xl); display: grid; gap: var(--space-lg); }
.page-head h1 { max-width: 18ch; }

/* Footer: statement */
.site-footer { background: var(--color-ink); color: var(--color-paper); padding-block: var(--space-3xl) var(--space-xl); }
.site-footer a { color: var(--color-paper); text-decoration-color: color-mix(in oklab, var(--color-paper) 45%, transparent); }
.site-footer :focus-visible { outline-color: var(--color-accent); }
.footer__statement { font: 600 var(--text-display-s)/1.08 var(--font-display); letter-spacing: -0.03em; max-width: 22ch; color: var(--color-paper); }
.footer__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-columns); margin-top: var(--space-2xl); padding-top: var(--space-xl); border-top: var(--rule-hair) solid color-mix(in oklab, var(--color-paper) 30%, transparent); font-size: var(--text-sm); }
.footer__grid > div { display: grid; gap: var(--space-xs); align-content: start; }
.footer__grid .h { color: var(--color-rule); }
.footer__grid .fig { color: var(--color-paper); }
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--space-lg); margin-top: var(--space-2xl); font-size: var(--text-sm); color: var(--color-rule); }
@media (max-width: 60rem) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .footer__grid { grid-template-columns: minmax(0, 1fr); } }

/* Sticky bar on phones */
.stickybar { display: none; }
@media (max-width: 60rem) {
  .stickybar { position: fixed; inset: auto 0 0 0; z-index: var(--z-sticky); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xs); padding: var(--space-xs) var(--space-md) calc(var(--space-xs) + env(safe-area-inset-bottom)); background: var(--color-paper); border-top: var(--rule-hair) solid var(--color-ink); }
  body { padding-bottom: 72px; }
}

/* Dialogs: the visitor's phone, the demo note, the owner guide */
dialog { border: 0; padding: 0; color: var(--color-ink); background: var(--color-paper); }
dialog::backdrop { background: color-mix(in oklab, var(--color-ink) 45%, transparent); }
.phone { width: min(420px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-left: var(--rule-hair) solid var(--color-ink); }
.phone[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: slide-in var(--dur-long) var(--ease-out); }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.phone__top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding: var(--space-md) var(--space-lg); border-bottom: var(--rule-hair) solid var(--color-rule); }
.phone__top h2 { font-size: var(--text-lg); }
.phone__screen { overflow-y: auto; display: grid; align-content: start; gap: var(--space-sm); padding: var(--space-lg); background: var(--color-phone); }
.phone__empty { font-size: var(--text-sm); color: var(--color-muted); }
.phone__demo { display: grid; gap: var(--space-sm); padding: var(--space-md) var(--space-lg) var(--space-lg); border-top: var(--rule-bar) solid var(--color-ink); font-size: var(--text-sm); }
.phone__demo .row { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; }
.phone__demo .input { min-height: 44px; width: 6rem; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); cursor: pointer; }
.iconbtn:hover { background: var(--color-paper-2); }
.iconbtn svg { width: 20px; height: 20px; }
.modal { width: min(32rem, calc(100% - 2 * var(--space-md))); padding: var(--space-xl); border-top: var(--rule-bar) solid var(--color-ink); }
.modal[open] { display: grid; gap: var(--space-md); justify-items: start; }
.modal h2 { font-size: var(--text-2xl); }
.modal ol { margin: 0; padding-left: 1.3em; display: grid; gap: var(--space-xs); }
@media (prefers-reduced-motion: reduce) { .phone[open] { animation: none; } }
.iconbtn.menu-toggle { display: none; }
@media (max-width: 60rem) { .iconbtn.menu-toggle { display: inline-grid; margin-left: auto; } }

.credit a { white-space: nowrap; }
.hero--plain { min-height: calc(100dvh - var(--nav-h) - var(--bar-h)); display: grid; align-items: center; }

/* Counsellor desk: 1024 first, usable at 360 */
.desk-page .stickybar { display: none; }
.desk-page { padding-bottom: 0; }
.desk { padding-block: var(--space-xl) var(--space-3xl); display: grid; gap: var(--space-lg); }
.desk-head { display: flex; justify-content: space-between; align-items: end; gap: var(--space-lg); flex-wrap: wrap; }
.desk-head h1 { font-size: var(--text-display-s); }
.desk-of { font-size: var(--text-sm); color: var(--color-muted); }
.desk-head .note { max-width: 24rem; }
.desk-tabs { display: flex; gap: var(--space-lg); border-bottom: var(--rule-hair) solid var(--color-rule); overflow-x: auto; }
.desk-tabs a { padding: var(--space-sm) 0; text-decoration: none; color: var(--color-ink-2); border-bottom: var(--rule-bar) solid transparent; white-space: nowrap; }
.desk-tabs a:hover { color: var(--color-ink); border-bottom-color: var(--color-rule); }
.desk-tabs a[aria-current="page"] { color: var(--color-ink); font-weight: 600; border-bottom-color: var(--color-ink); }
.tally { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; background: var(--color-sheet); border-top: var(--rule-bar) solid var(--color-ink); outline: var(--rule-hair) solid var(--color-rule); outline-offset: -1px; }
.tally--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tally > div { display: grid; gap: var(--space-xs); align-content: start; padding: var(--space-lg); border-left: var(--rule-hair) solid var(--color-rule); }
.tally > div:first-child { border-left: 0; }
.tally dt { font-size: var(--text-sm); color: var(--color-muted); }
.tally dd { margin: 0; font-size: var(--text-2xl); font-weight: 500; color: var(--color-ink); }
.tally__pair { display: grid; gap: var(--space-2xs); font-size: var(--text-md) !important; }
.desk-block { display: grid; gap: var(--space-sm); }
.desk-block h2 { font-size: var(--text-2xl); }
.desk-table { font-size: var(--text-sm); }
.desk-table td { padding-block: var(--space-sm); vertical-align: middle; }
.desk-table td.num, .desk-table td[data-label="Sent at"] { white-space: nowrap; }
.desk-table th, .desk-table td { padding-inline: var(--space-sm); }
.desk-table tr.mine td { background: var(--color-sheet); }
.tag { display: inline-block; margin-left: var(--space-2xs); padding: 0 var(--space-xs); border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill); font-size: var(--text-xs); color: var(--color-ink); font-weight: 400; }
.pair { display: flex; gap: var(--space-2xs); }
.pair .btn[aria-pressed="true"] { background: var(--color-ink); color: var(--color-paper); }
.marks { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.marks .input { width: 5rem; min-height: 44px; }
.marks .help { min-height: 0; }
.desk-pick { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-lg); }
.desk-pick select.input { width: auto; min-width: 12rem; }
.seats { margin-left: auto; font-size: var(--text-md); color: var(--color-ink); }
.seats .fig { font-size: var(--text-xl); }
.preview-row td { padding: var(--space-md) 0 var(--space-lg) !important; }
.preview-row .chat { max-width: 40rem; }
@media (max-width: 60rem) { .tally { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tally > div:nth-child(3) { border-left: 0; } .tally > div:nth-child(n+3) { border-top: var(--rule-hair) solid var(--color-rule); } }
@media (max-width: 40rem) {
  .tally, .tally--3 { grid-template-columns: minmax(0, 1fr); }
  .tally > div { border-left: 0; border-top: var(--rule-hair) solid var(--color-rule); }
  .tally > div:first-child { border-top: 0; }
  .seats { margin-left: 0; }
  .desk-table tr { padding-inline: 0; }
  .preview-row { display: block !important; }
}
