/* Direction (taste-skill): "the page is the object": a school letter and other pieces of school paper. Inspired by wafer.ai: calm sage grounds, a photo that dissolves into pixels, a floating menu. Cobalt only on buttons and accents; highlighter yellow marks what matters. Square paper corners. Deliberately light-only. */
:root {
  --ground: #e6ece8;
  --surface: #d7e0db;
  --sage: #b9c8c1;
  --deep: #22302c;
  --card: #f3f6f4;
  --soft-ink: #3c4a45;
  --paper: #ffffff;
  --ink: #13201c;
  --muted: #56635e;
  --cobalt: #1f2de6;
  --cobalt-deep: #1a24b8;
  --marker: #e0e3fc;
  --on-cobalt: #ffffff;
  --on-cobalt-soft: rgba(255, 255, 255, 0.82);
  --tab-idle: rgba(255, 255, 255, 0.16);
  --error: #b3261e;
  --paper-back: #f1f4f2;
  --shadow: rgba(19, 32, 28, 0.22);
  --on-deep-soft: rgba(255, 255, 255, 0.82);
  --serif: "EB Garamond", "Noto Naskh Arabic", "Noto Serif Devanagari", "Noto Serif SC", Georgia, serif;
  --text: "Source Sans 3", "Noto Naskh Arabic", "Noto Serif Devanagari", "Noto Serif SC", system-ui, sans-serif;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--text); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.012em; line-height: 1.04; text-wrap: balance; margin: 0; }
/* The classy display face (EB Garamond) for names, big quotes and statements; Source Sans 3 for reading. */
.wordmark, .giant, .ghost, .month-name, blockquote, .q, .cycler-line, .lang-list li, .slip p.big, .reply-title, .done .title, .msg-title, .stamp { font-family: var(--serif); }
.giant, .ghost { letter-spacing: -0.03em; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
input, select { font-size: max(16px, 1rem); }
a, button, summary, [role="tab"] { touch-action: manipulation; }
button, summary, [role="tab"] { user-select: none; -webkit-user-select: none; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.on-cobalt :focus-visible { outline-color: var(--marker); }
[id] { scroll-margin-top: 1.5rem; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
svg.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 80rem; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }
@media (min-width: 1024px) { .wrap { padding-inline: 40px; } }

/* A Dutch school word: marked like with a highlighter pen. */
mark, .mark { background: var(--marker); color: var(--ink); padding: 0 0.15em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.btn { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 0; padding-inline: 24px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform 150ms var(--ease), background-color 150ms var(--ease); }
.btn:active { transform: scale(0.97); }
.btn-cobalt { background: var(--cobalt); color: var(--on-cobalt); }
.btn-white { background: var(--paper); color: var(--cobalt); }
.btn-grey { background: var(--surface); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn-cobalt:hover { background: var(--cobalt-deep); }
  .btn-white:hover { background: var(--marker); color: var(--ink); }
  .btn-grey:hover { background: var(--marker); }
}

/* Notice + header */
.notice { background: var(--surface); font-size: 0.9375rem; }
.notice p { padding-block: 10px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.wordmark { display: flex; align-items: center; gap: 8px; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.wordmark svg { width: 28px; height: 28px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-links { display: none; gap: 4px; }
.nav-links a, .lang summary { display: flex; min-height: 44px; align-items: center; gap: 8px; padding-inline: 12px; text-decoration: none; transition: background-color 150ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover, .lang summary:hover { background: var(--surface); } }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.lang { position: relative; }
.lang[open] summary { background: var(--surface); }
.lang summary { font-weight: 500; }
.lang summary .globe { color: var(--cobalt); }
.lang .chev { transition: transform 200ms var(--ease); }
.lang[open] .chev { transform: rotate(180deg); }
.lang-menu { position: absolute; inset-inline-end: 0; z-index: 50; margin-top: 8px; width: 16rem; max-width: calc(100vw - 32px); background: var(--paper); padding: 8px; box-shadow: 0 12px 32px var(--shadow); }
.lang-menu p { padding: 8px 12px 4px; font-size: 0.9375rem; color: var(--muted); }
.lang-menu li { display: flex; min-height: 40px; align-items: center; padding-inline: 12px; }
.lang-menu li[aria-current] { background: var(--marker); font-weight: 600; }
.header-cta { display: none; }
@media (min-width: 640px) { .header-cta { display: inline-flex; margin-inline-start: 4px; } }

/* Hero: the family's kitchen table, with a cobalt card lying on it */
.hero { position: relative; background: var(--cobalt); }
.hero-img { display: block; width: 100%; height: 56svh; min-height: 300px; max-height: 860px; object-fit: cover; object-position: 26% 50%; }
@media (min-width: 1024px) { .hero-img { height: min(86svh, 56vw); object-position: 50% 50%; } }
.hero-card-wrap { position: relative; margin-top: -64px; }
@media (min-width: 1024px) {
  .hero-card-wrap { position: absolute; inset: 0; margin-top: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding-bottom: 56px; pointer-events: none; }
}
.hero-card { background: var(--cobalt); color: var(--on-cobalt); padding: 28px 24px 32px; pointer-events: auto; }
@media (min-width: 640px) { .hero-card { padding: 40px; } }
@media (min-width: 1024px) { .hero-card { width: min(600px, 46%); padding: 44px 44px 48px; } }
.hero h1 { font-size: clamp(1.9rem, 1rem + 2.6vw, 3.25rem); }
.hero-card > p { margin-top: 18px; font-size: 1.125rem; color: var(--on-cobalt-soft); }
@media (min-width: 640px) { .hero-card > p { font-size: 1.25rem; } }
.hero-card .btn { margin-top: 28px; width: 100%; }
@media (min-width: 640px) { .hero-card .btn { width: auto; } }

/* Demo: the school letter on cobalt */
.demo-section { background: var(--cobalt); color: var(--on-cobalt); padding-block: 72px 96px; }
@media (min-width: 1024px) { .demo-section { padding-block: 112px 144px; } }
.demo-grid { display: grid; gap: 40px; }
@media (min-width: 1024px) {
  .demo-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
  .demo-intro { position: sticky; top: 32px; align-self: start; }
}
.demo-intro > p { margin-top: 20px; max-width: 32rem; font-size: 1.25rem; color: var(--on-cobalt-soft); }
.demo-intro .plate { margin-top: 32px; aspect-ratio: 16 / 10; object-fit: cover; }
@media (min-width: 1024px) { .demo-intro .plate { aspect-ratio: 1 / 1; max-width: 440px; } }

/* Photos: square corners, real proportions */
.plate { display: block; width: 100%; max-width: 100%; height: auto; }
.wide-photo { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; margin-top: 64px; }
@media (min-width: 768px) { .wide-photo { aspect-ratio: 21 / 9; margin-top: 96px; } }
.photo-caption { margin-top: 12px; font-size: 0.9375rem; color: var(--muted); }
.sheet-photo { display: block; width: calc(100% + 40px); max-width: none; height: auto; aspect-ratio: 16 / 10; object-fit: cover; margin: -28px -20px 32px; }
@media (min-width: 640px) { .sheet-photo { width: calc(100% + 88px); margin: -48px -44px 48px; aspect-ratio: 21 / 9; } }
@media (min-width: 1024px) { .sheet-photo { width: calc(100% + 128px); margin: -64px -64px 56px; } }
.how-head { display: grid; gap: 32px; }
@media (min-width: 1024px) { .how-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 56px; } }
.how-head .plate { aspect-ratio: 16 / 10; object-fit: cover; }
.signup-photo { margin-top: 40px; aspect-ratio: 3 / 2; object-fit: cover; }

.letter-wrap { min-width: 0; }
.letter-wrap h2 { font-size: 1.125rem; font-weight: 600; letter-spacing: 0; margin-bottom: 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tab { min-height: 44px; border: 0; padding-inline: 16px; background: var(--tab-idle); color: var(--on-cobalt); font-weight: 500; border-radius: 6px 6px 0 0; cursor: pointer; transition: background-color 150ms var(--ease); }
.tab[aria-selected="true"] { background: var(--paper); color: var(--cobalt); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .tab[aria-selected="false"]:hover { background: rgba(255, 255, 255, 0.28); } }
.paper { background: var(--paper); color: var(--ink); }
.letter { padding: 24px 20px 0; }
@media (min-width: 640px) { .letter { padding: 36px 40px 0; } }
.letter-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.9375rem; color: var(--muted); }
.letter-head b { color: var(--ink); font-weight: 600; }
.label { font-size: 0.9375rem; font-weight: 600; color: var(--cobalt); }
.letter h3 { margin-top: 20px; font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem); }
.letter .meaning-text { margin-top: 14px; font-size: 1.1875rem; line-height: 1.65; }
.original { margin-top: 24px; background: var(--ground); }
.original summary { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; font-weight: 600; }
.original summary .chev { transition: transform 200ms var(--ease); }
.original[open] summary .chev { transform: rotate(180deg); }
.original-text { padding: 0 18px 18px; white-space: pre-line; color: var(--muted); }
.tip { display: flex; gap: 12px; margin-top: 20px; }
.tip svg { margin-top: 4px; color: var(--cobalt); }
.tip b { font-weight: 600; }
.perforation { margin-top: 32px; border-top: 4px dotted var(--surface); position: relative; }
.perforation svg { position: absolute; top: -13px; inset-inline-start: 12px; width: 20px; height: 20px; background: var(--paper); color: var(--muted); padding-inline: 2px; }
.stub { padding: 24px 20px 28px; }
@media (min-width: 640px) { .stub { padding: 28px 40px 36px; } }
.stub .what { margin-top: 4px; font-size: 1.25rem; font-weight: 600; line-height: 1.35; }
.deadline { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; color: var(--cobalt); }
.stub .btn { margin-top: 18px; }
.cal-note { margin-top: 10px; font-size: 0.9375rem; color: var(--muted); }
.disclaimer { margin-top: 20px; font-size: 0.9375rem; color: var(--muted); }

/* Signature move: the folded school letter opens in 3D, then the highlighter marks what matters. */
#panels { position: relative; }
#panels > .paper { transition: opacity 220ms var(--ease), transform 220ms var(--ease); }
#panels > .paper.entering { opacity: 0; transform: translateY(8px); }
.fold-stage { position: absolute; top: 0; left: 0; right: 0; perspective: 1600px; pointer-events: none; }
.fold { position: relative; height: 100%; transform-style: preserve-3d; transform: translateY(28px) rotateX(18deg); transition: transform 900ms var(--ease); }
.fold-stage.open .fold { transform: none; }
.flap { position: absolute; left: 0; right: 0; transform-style: preserve-3d; transition: transform 720ms var(--ease-in-out); }
.flap-0 { transform-origin: 50% 100%; transform: translateZ(1px) rotateX(-180deg); transition-delay: 320ms; }
.flap-2 { transform-origin: 50% 0; transform: translateZ(2px) rotateX(180deg); }
.fold-stage.open .flap-0, .fold-stage.open .flap-2 { transform: translateZ(0) rotateX(0deg); }
.face { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.back { background: var(--paper-back); transform: rotateX(180deg); }
.face > .paper { position: absolute; top: 0; left: 0; }
.sweep .meaning-text mark { background: none; background-image: linear-gradient(var(--marker), var(--marker)); background-repeat: no-repeat; background-position: 0 0; background-size: 0% 100%; }
[dir="rtl"] .sweep .meaning-text mark { background-position: 100% 0; }
.sweep.swept .meaning-text mark { background-size: 100% 100%; transition: background-size 520ms var(--ease) calc(var(--i, 0) * 140ms + 120ms); }

/* Sections */
.section { padding-block: 88px; }
@media (min-width: 640px) { .section { padding-block: 120px; } }
@media (min-width: 1024px) { .section { padding-block: 152px; } }
h2.big { font-size: clamp(2rem, 1rem + 4vw, 4.25rem); }
.split { display: grid; gap: 20px; }
@media (min-width: 1024px) { .split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: 48px; } }
.split p { max-width: 34rem; font-size: 1.25rem; }

/* Problem: two slips */
.slips { display: grid; gap: 16px; margin-top: 48px; }
@media (min-width: 768px) { .slips { grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 64px; } }
.slip { padding: 24px; }
@media (min-width: 640px) { .slip { padding: 36px; } }
.slip.app { background: var(--surface); }
.slip.app .label { color: var(--muted); }
.slip.real { background: var(--paper); }
.slip blockquote, .slip p.big { margin-top: 12px; font-size: 1.5rem; line-height: 1.3; }
@media (min-width: 640px) { .slip blockquote, .slip p.big { font-size: 1.875rem; } }
.points { display: grid; gap: 28px; margin-top: 56px; font-size: 1.125rem; line-height: 1.65; }
@media (min-width: 768px) { .points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 80px; } }

/* Tools: the contents page of a school guide */
.sheet { background: var(--paper); padding: 28px 20px; }
@media (min-width: 640px) { .sheet { padding: 48px 44px; } }
@media (min-width: 1024px) { .sheet { padding: 64px; } }
.tool-list { display: grid; margin-top: 40px; }
@media (min-width: 640px) { .tool-list { margin-top: 56px; } }
.tool { display: grid; gap: 8px; padding-block: 22px; }
.tool + .tool { border-top: 4px dotted var(--surface); }
@media (min-width: 768px) { .tool { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); align-items: baseline; gap: 32px; padding-block: 28px; } }
.tool h3 { font-size: 1.5rem; }
@media (min-width: 640px) { .tool h3 { font-size: 1.75rem; } }
.tool .text { font-size: 1.125rem; }
.soon { margin-inline-start: 8px; font-weight: 600; color: var(--cobalt); }
.tool .sample { font-size: 0.9375rem; color: var(--muted); }

/* How it works */
.how .lead { margin-top: 20px; max-width: 40rem; font-size: 1.25rem; }
.steps { display: grid; gap: 48px; margin-top: 48px; padding-inline-start: 32px; list-style: decimal; }
@media (min-width: 640px) { .steps { margin-top: 64px; } }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.steps li { padding-inline-start: 8px; }
.steps li::marker { font-size: 1.875rem; font-weight: 500; color: var(--cobalt); }
.steps .step { font-size: 1.25rem; line-height: 1.35; font-weight: 500; }
.frag { margin-top: 20px; background: var(--paper); padding: 16px; font-size: 0.9375rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 12px; font-weight: 600; }
.chip svg { width: 16px; height: 16px; }
.chip.grey { background: var(--surface); }
.chip.cobalt { background: var(--cobalt); color: var(--on-cobalt); padding-inline: 16px; }
.frag .field { border-bottom: 2px solid var(--ink); padding: 4px 0 6px; color: var(--muted); }
.frag .deadline { margin-top: 4px; gap: 6px; }
.frag .deadline svg { width: 16px; height: 16px; }

/* Languages */
.languages { background: var(--cobalt); color: var(--on-cobalt); }
.languages .split p { color: var(--on-cobalt-soft); }
.lang-list { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 48px; }
@media (min-width: 640px) { .lang-list { margin-top: 64px; column-gap: 40px; } }
.lang-list li { padding-block: 2px; font-size: clamp(1.5rem, 1rem + 2vw, 2.75rem); line-height: 1.25; }
.lang-list li[aria-current] span { background: var(--marker); color: var(--ink); padding-inline: 0.15em; }
.sample-grid { display: grid; gap: 12px; margin-top: 56px; }
@media (min-width: 640px) { .sample-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 80px; } }
@media (min-width: 1024px) { .sample-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sample-grid > div { background: var(--paper); color: var(--ink); padding: 16px 18px; }
.sample-grid dd { margin-top: 4px; }

/* Sign-up: the reply slip */
.signup-grid { display: grid; gap: 48px; }
@media (min-width: 1024px) { .signup-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 1fr) minmax(0, 6fr); } .reply { grid-column: 3; align-self: start; } }
.signup-grid .intro { margin-top: 24px; font-size: 1.25rem; }
.signup-grid h3 { margin-top: 40px; font-size: 1.5rem; }
.promises { display: grid; gap: 12px; margin-top: 16px; font-size: 1.125rem; }
.promises li { display: flex; gap: 12px; }
.promises svg { margin-top: 5px; color: var(--cobalt); }
.reply { min-width: 0; background: var(--paper); }
.reply .cut { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 4px dotted var(--surface); font-size: 0.9375rem; color: var(--muted); }
@media (min-width: 640px) { .reply .cut { padding-inline: 40px; } }
.reply .cut svg { width: 18px; height: 18px; }
.reply-body { padding: 28px 20px 32px; }
@media (min-width: 640px) { .reply-body { padding: 40px; } }
.reply-title { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.01em; }
form { display: grid; gap: 28px; margin-top: 28px; }
form label.field-label { font-weight: 600; }
.input { display: block; width: 100%; min-height: 48px; margin-top: 4px; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; background: transparent; padding: 10px 2px; outline: none; transition: border-color 150ms var(--ease); }
.input:focus { border-bottom-color: var(--cobalt); box-shadow: 0 2px 0 var(--cobalt); }
.input[aria-invalid="true"] { border-bottom-color: var(--error); }
select.input { appearance: auto; }
.error { margin-top: 8px; font-weight: 600; color: var(--error); }
.check { display: flex; gap: 12px; }
.check input { width: 24px; height: 24px; flex-shrink: 0; margin: 2px 0 0; accent-color: var(--cobalt); }
/* "Who are you?": three choices as pills (real radio buttons underneath, so keyboards and screen readers work as usual) */
.choice { min-width: 0; margin: 0; border: 0; padding: 0; }
.choice legend { padding: 0; font-weight: 600; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.choice-pill { position: relative; display: inline-flex; }
.choice-pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice-pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 600; transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease); }
.choice-pill input:checked + span { border-color: var(--deep, var(--cobalt)); background: var(--deep, var(--cobalt)); color: #fff; }
.choice-pill input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .choice-pill input:not(:checked):hover + span { background: rgba(30, 42, 43, 0.06); } }
.choice.invalid .choice-pill span { border-color: var(--error); }
/* the field bots fill in and people never see */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
form .btn:disabled { opacity: 0.7; cursor: progress; }
form .btn { width: 100%; }
@media (min-width: 640px) { form .btn { width: auto; justify-self: start; } }
/* privacy: "Remove my email" */
.remove-form { gap: 10px; margin-top: 20px; }
.remove-form .field-label { font-weight: 600; }
.remove-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.remove-row .input { flex: 1 1 14rem; margin-top: 0; }
.remove-msg { font-weight: 600; color: var(--error); }
.remove-msg.ok { color: inherit; }
.done { display: flex; gap: 16px; outline: none; }
.done .tick { display: flex; width: 48px; height: 48px; flex-shrink: 0; align-items: center; justify-content: center; background: var(--cobalt); color: var(--on-cobalt); }
.done .tick svg { width: 24px; height: 24px; }
.done .title { font-size: 1.5rem; }
.done .text { margin-top: 8px; font-size: 1.125rem; }
.preview-note { margin-top: 14px; background: var(--marker); padding: 12px 16px; font-weight: 600; }

/* Footer: the back of the letter */
footer { overflow: hidden; background: var(--cobalt); color: var(--on-cobalt); }
footer .top { padding-block: 72px 24px; }
footer .top > p:first-child { max-width: 36rem; font-size: 1.125rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 32px; font-weight: 500; }
footer .credit { margin-top: 24px; color: var(--on-cobalt-soft); }
.giant { margin-bottom: -0.16em; font-size: clamp(5rem, 25vw, 23rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1; user-select: none; }

/* ---------- Motion: self-playing demo, language changer, paper plane ---------- */
mark.ink { background: none; background-image: linear-gradient(var(--marker), var(--marker)); background-repeat: no-repeat; background-position: 0 0; background-size: 0% 100%; }
[dir="rtl"] mark.ink { background-position: 100% 0; }
mark.ink.on { background-size: 100% 100%; transition: background-size 600ms var(--ease); }
.plane { position: fixed; z-index: 60; width: 72px; height: 54px; pointer-events: none; }
.cycler { margin-top: 56px; }
@media (min-width: 640px) { .cycler { margin-top: 80px; } }
.cycler-lang { display: inline-block; background: var(--marker); color: var(--ink); padding: 2px 10px; font-weight: 600; font-size: 0.9375rem; }
.cycler-line { margin-top: 14px; min-height: 2.6em; font-size: clamp(1.75rem, 1rem + 3vw, 3.25rem); line-height: 1.2; letter-spacing: -0.015em; }
.frag .field.typing { color: var(--ink); }
.frag .field.typing::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-inline-start: 2px; vertical-align: -0.15em; background: var(--cobalt); }

/* ---------- Wafer-inspired layer: sage grounds, cobalt only for actions ---------- */
.hero { background: var(--deep); }
.hero-card { background: var(--card); color: var(--ink); }
.hero-card > p { color: var(--soft-ink); }
.pixel-fade { position: absolute; left: 0; width: 100%; pointer-events: none; display: block; }
.demo-section { background: var(--sage); color: var(--ink); }
.demo-intro > p { color: var(--soft-ink); }
.tab { background: rgba(255, 255, 255, 0.5); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .tab[aria-selected="false"]:hover { background: rgba(255, 255, 255, 0.75); } }
.languages { background: var(--deep); color: #fff; }
.languages .split p { color: var(--on-deep-soft); }
footer { background: var(--deep); color: #fff; }
footer .credit { color: var(--on-deep-soft); }
.on-deep :focus-visible { outline-color: var(--marker); }

/* Floating menu (appears after the first screen) */
.pill { position: fixed; z-index: 55; top: calc(env(safe-area-inset-top, 0px) + 12px); left: 50%; width: min(760px, calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 6px 6px 18px; background: var(--deep); color: #fff; border-radius: 999px; box-shadow: 0 12px 32px var(--shadow); transform: translate(-50%, -150%); opacity: 0; transition: transform 300ms var(--ease), opacity 200ms var(--ease); }
[dir="rtl"] .pill { padding: 6px 18px 6px 6px; }
.pill.show { transform: translate(-50%, 0); opacity: 1; }
.pill .wordmark { color: #fff; font-size: 1.25rem; }
.pill .wordmark svg { width: 24px; height: 24px; }
.pill-links { display: none; gap: 2px; }
@media (min-width: 768px) { .pill-links { display: flex; } }
.pill-links a { display: flex; min-height: 40px; align-items: center; padding-inline: 12px; border-radius: 999px; text-decoration: none; color: var(--on-deep-soft); transition: background-color 150ms var(--ease), color 150ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .pill-links a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; } }
.pill .btn { min-height: 44px; border-radius: 999px; padding-inline: 18px; }

/* A week of school messages, arriving one after another */
.week { padding-top: 0; }
.week-grid { display: grid; gap: 40px; }
@media (min-width: 1024px) { .week-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; } }
.week-lead { margin-top: 20px; max-width: 32rem; font-size: 1.25rem; color: var(--soft-ink); }
.feed { position: relative; height: 480px; overflow: hidden; background: var(--sage); padding-inline: 16px; -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
@media (min-width: 640px) { .feed { padding-inline: 32px; } }
.feed-track { display: grid; gap: 12px; padding-block: 12px; }
.feed.loop .feed-track { animation: feed 30s linear infinite; }
.feed.loop.paused .feed-track { animation-play-state: paused; }
@media (hover: hover) and (pointer: fine) { .feed.loop:hover .feed-track { animation-play-state: paused; } }
@keyframes feed { to { transform: translateY(calc(-50% + 6px)); } }
.msg { background: var(--paper); padding: 16px 18px; display: grid; gap: 6px; }
.msg-head { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9375rem; color: var(--muted); }
.msg-head b { color: var(--cobalt); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.msg-head b svg { width: 16px; height: 16px; }
.msg-title { font-size: 1.25rem; font-weight: 500; line-height: 1.3; }
.msg-todo { color: var(--soft-ink); }
.msg-date { display: inline-flex; align-items: center; gap: 6px; justify-self: start; background: var(--marker); padding: 2px 10px; font-weight: 600; font-size: 0.9375rem; }
.msg-date svg { width: 16px; height: 16px; }

/* Questions parents ask */
.questions .lead { margin-top: 20px; max-width: 40rem; font-size: 1.25rem; color: var(--soft-ink); }
.q-list { display: grid; gap: 16px; margin-top: 48px; }
@media (min-width: 768px) { .q-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 64px; } .q-list li:nth-child(even) { margin-top: 56px; } }
.q-list li { background: var(--paper); padding: 28px 24px; }
@media (min-width: 640px) { .q-list li { padding: 40px; } }
.q-list blockquote { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); line-height: 1.25; letter-spacing: -0.015em; }
.q-list figcaption { margin-top: 16px; color: var(--muted); }
.q-list .answer { margin-top: 20px; color: var(--soft-ink); }
.q-list .answer b { color: var(--cobalt); font-weight: 600; }

/* ---------- Subtle 3D: flipping tool cards, message wheel, language ring ---------- */
.tool-list { display: grid; gap: 16px; }
@media (min-width: 768px) { .tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .tool-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tool-list .tool { display: block; padding: 0; perspective: 1200px; }
.tool-list .tool + .tool { border-top: 0; }
.flip { position: relative; display: grid; min-height: 248px; transform-style: preserve-3d; transition: transform 640ms var(--ease-in-out); }
.flip.flipped { transform: rotateY(180deg); }
[dir="rtl"] .flip.flipped { transform: rotateY(-180deg); }
.flip .side { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--ground); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.flip .back { transform: rotateY(180deg); background: var(--deep); color: #fff; }
.flip .q { font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; }
.flip .a { color: var(--on-deep-soft); }
.flip .a b { color: #fff; font-weight: 600; }
.flip-btn { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; background: var(--paper); color: var(--cobalt); font-weight: 600; cursor: pointer; transition: background-color 150ms var(--ease), transform 150ms var(--ease); }
.flip-btn:active { transform: scale(0.97); }
.tool-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.tool-actions .flip-btn { margin-top: 0; }
.tool-actions .btn { min-height: 44px; padding-inline: 18px; }
.flip-btn svg { width: 18px; height: 18px; }
.back .flip-btn { background: rgba(255, 255, 255, 0.14); color: #fff; }
@media (hover: hover) and (pointer: fine) { .flip-btn:hover { background: var(--marker); color: var(--ink); } }
.feed.wheel .msg { will-change: transform; }
.languages { overflow: hidden; }
.lang-list.ring { position: relative; display: block; height: 200px; margin-top: 72px; transform-style: preserve-3d; animation: ring-spin 70s linear infinite; }
.lang-list.ring li { position: absolute; left: 50%; top: 50%; padding: 0; white-space: nowrap; font-size: 1.625rem; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.lang-list.ring.paused { animation-play-state: paused; }
@media (hover: hover) and (pointer: fine) { .lang-list.ring:hover { animation-play-state: paused; } }
@keyframes ring-spin { from { transform: perspective(1600px) translateZ(-560px) rotateX(-6deg) rotateY(0deg); } to { transform: perspective(1600px) translateZ(-560px) rotateX(-6deg) rotateY(-360deg); } }

/* ---------- Region chooser (above the wheel, same dark ground so the page flows into it) ---------- */
.region { background: var(--deep); color: #fff; padding-block: 72px 24px; }
@media (min-width: 1024px) { .region { padding-block: 112px 32px; } }
.region-grid { display: grid; gap: 32px; }
@media (min-width: 1024px) { .region-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 3.4fr) minmax(0, 3.6fr); gap: 40px; align-items: center; } .region-options { grid-template-columns: 1fr !important; } }
.region-map { display: grid; justify-items: center; gap: 10px; }
.region-map svg { width: 100%; max-width: 300px; height: auto; overflow: visible; }
@media (max-width: 1023px) { .region-map svg { max-width: 240px; } }
.region-map p { color: var(--on-deep-soft); font-size: 0.9375rem; }
.map-region { cursor: pointer; }
.map-region use { stroke: var(--deep); stroke-width: 3; stroke-linejoin: round; transition: fill 200ms var(--ease); }
.map-region[data-region="north"] use { fill: #dce3df; }
.map-region[data-region="middle"] use { fill: #c3cfc9; }
.map-region[data-region="south"] use { fill: #a9b9b2; }
.map-region text { font-family: var(--serif); font-size: 21px; font-weight: 600; fill: var(--ink); text-anchor: middle; pointer-events: none; transition: fill 200ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .map-region:hover use { fill: var(--marker); } }
.map-region.selected use { fill: var(--cobalt); }
.map-region.selected text { fill: #fff; }
.region h2 { font-size: clamp(2.25rem, 1rem + 4.4vw, 4.5rem); }
.region .lead { margin-top: 18px; max-width: 34rem; font-size: 1.25rem; color: var(--on-deep-soft); }
.region-help { margin-top: 16px; max-width: 34rem; color: var(--on-deep-soft); }
.region-help a { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.region-options { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
@media (min-width: 640px) { .region-options { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.region-card { position: relative; display: grid; gap: 8px; align-content: start; min-height: 100%; padding: 22px 20px 24px; background: var(--card); color: var(--ink); cursor: pointer; transition: background-color 200ms var(--ease), color 200ms var(--ease), transform 150ms var(--ease); }
.region-card:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .region-card:hover { background: var(--marker); } }
.region-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.region-card:has(input:focus-visible) { outline: 3px solid #fff; outline-offset: 3px; }
.region-card:has(input:checked) { background: var(--cobalt); color: #fff; }
.region-name { font-family: var(--serif); font-size: 2rem; line-height: 1; }
.region-places { color: var(--muted); font-size: 0.9375rem; }
.region-card:has(input:checked) .region-places { color: rgba(255, 255, 255, 0.85); }
.region-fact { margin-top: 6px; font-weight: 600; font-size: 0.9375rem; }
.region-status { color: var(--on-deep-soft); font-size: 0.9375rem; }
@media (min-width: 1024px) { .region-status { grid-column: 2 / 4; } }

/* What's happening: every event with its date in a small rounded label */
.events { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 7px; }
.events li { line-height: 1.4; }
.when { display: inline-block; margin-inline-end: 8px; padding: 1px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.8); color: #13201c; font-weight: 600; font-size: 0.8125rem; white-space: nowrap; vertical-align: 1px; }
@media (min-width: 768px) { .year.wheel-on .month dl { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) !important; } }

/* Holiday badge on month cards */
.holiday-badge { display: inline-flex; align-items: center; gap: 6px; margin-inline-end: 8px; padding: 2px 10px 2px 8px; background: color-mix(in srgb, currentColor 14%, transparent); font-weight: 600; font-size: 0.875rem; vertical-align: 1px; }
.holiday-badge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Good to know (closes the wheel) */
.good-to-know { padding-block: 24px 112px; }
.good-to-know h3 { font-size: clamp(1.75rem, 1rem + 2.4vw, 3rem); }
/* A school notice board: four notes pinned up, a little crooked */
.know-list { display: grid; gap: 22px; margin-top: 28px; padding: 32px 22px; background: #2c3b36; }
@media (min-width: 768px) { .know-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 28px; padding: 44px 40px; } }
@media (min-width: 1100px) { .know-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.know-list li { position: relative; padding: 30px 22px 24px; line-height: 1.55; color: var(--ink); transform: rotate(var(--tilt, 0deg)); transition: transform 300ms var(--ease); }
.know-list li:nth-child(1) { background: var(--card); --tilt: -1.6deg; }
.know-list li:nth-child(2) { background: var(--marker); --tilt: 1.2deg; }
.know-list li:nth-child(3) { background: #dbe6e0; --tilt: -0.8deg; }
.know-list li:nth-child(4) { background: #f6d8cf; --tilt: 1.8deg; }
.know-list li::before { content: ""; position: absolute; top: 10px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--cobalt); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
@media (hover: hover) and (pointer: fine) { .know-list li:hover { transform: rotate(0deg) translateY(-3px); } }
.know-list b { display: block; margin-bottom: 6px; font-family: var(--serif); font-size: 1.375rem; font-weight: 500; }
.know-source { margin-top: 24px; color: var(--on-deep-soft); font-size: 0.9375rem; }
.know-source a { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- The school-year wheel (signature, "full wow") ---------- */
@property --month { syntax: "<color>"; inherits: true; initial-value: #c9b79c; }
.year { position: relative; background: var(--deep); color: #fff; }
.year-head { padding-block: 88px 40px; }
.year-head h2 { font-size: clamp(2.25rem, 1rem + 5vw, 5.5rem); }
.year-head p { margin-top: 16px; max-width: 36rem; font-size: 1.25rem; color: var(--on-deep-soft); }
.stage { position: relative; }
.ghost, .dial { display: none; }
.months { display: grid; gap: 12px; margin: 0 auto; padding: 0 16px 40px; max-width: 80rem; list-style: none; }
@media (min-width: 640px) { .months { padding-inline: 24px; } }
@media (min-width: 768px) { .months { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .months { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-inline: 40px; } }
.month { background: var(--c); color: var(--t); padding: 26px 24px; display: grid; gap: 16px; align-content: start; }
.month-name { font-size: clamp(2.25rem, 1.5rem + 3vw, 4.25rem); letter-spacing: -0.035em; line-height: 0.95; }
.month dl { display: grid; gap: 12px; margin: 0; }
.month dt { font-weight: 600; font-size: 0.9375rem; }
.month dd { margin: 2px 0 0; line-height: 1.45; }
.year-note { padding-block: 8px 72px; color: var(--on-deep-soft); font-size: 0.9375rem; }

.year.wheel-on .year-scroll { height: calc(100svh + 11 * 60svh); }
.year.wheel-on .year-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--deep); transition: --month 700ms ease; }
.year.wheel-on .stage::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(92vw, 920px); aspect-ratio: 1; border-radius: 50%; background: var(--month); opacity: 0.24; transform: translate(-50%, -50%); pointer-events: none; }
.year.wheel-on .year-head { padding-block: 28px 8px; }
.year.wheel-on .year-head h2 { font-size: clamp(1.75rem, 1rem + 3vw, 3.75rem); }
.year.wheel-on .year-head p { font-size: 1.0625rem; margin-top: 8px; }
.year.wheel-on .stage { display: grid; place-items: center; perspective: 1800px; min-height: 0; }
.year.wheel-on .months { position: relative; display: block; width: min(880px, calc(100vw - 32px)); padding: 0; transform-style: preserve-3d; will-change: transform; }
.year.wheel-on .month { position: absolute; inset: 0; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; transition: opacity 400ms ease; padding: 24px 22px; }
.year.wheel-on .month:not(.current) { opacity: 0.6; }
.year.wheel-on .month { gap: 12px; }
.year.wheel-on .month dl { gap: 10px; }
.year.wheel-on .month dd { font-size: 0.9375rem; }
@media (min-width: 768px) {
  .year.wheel-on .month { padding: 36px 40px; gap: 24px; }
  .year.wheel-on .month dl { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .year.wheel-on .month dd { font-size: 1.125rem; }
}
.year.wheel-on .ghost { display: block; position: absolute; left: 0; right: 0; bottom: -0.14em; margin: 0; text-align: center; white-space: nowrap; font-size: clamp(5rem, 21vw, 19rem); font-weight: 500; letter-spacing: -0.05em; line-height: 1; color: rgba(255, 255, 255, 0.07); pointer-events: none; }
.year.wheel-on .dial { display: block; position: absolute; top: 8px; inset-inline-end: 16px; width: 64px; height: 64px; }
@media (min-width: 1024px) { .year.wheel-on .dial { top: 50%; inset-inline-end: 32px; width: 140px; height: 140px; transform: translateY(-50%); } }
.dial-needle { transform-box: view-box; transform-origin: 70px 70px; }
.month { position: relative; }
.month-icon { position: absolute; top: 22px; inset-inline-end: 22px; width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 768px) { .month-icon { top: 32px; inset-inline-end: 36px; width: 64px; height: 64px; } }
.weather { display: none; }
.year.wheel-on .weather { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@keyframes icon-pop { 0% { transform: scale(0.82) rotate(-10deg); } 55% { transform: scale(1.1) rotate(4deg); } 100% { transform: scale(1) rotate(0deg); } }
@media (prefers-reduced-motion: no-preference) { .year.wheel-on .month.current .month-icon { animation: icon-pop 560ms var(--ease); } }
.year.wheel-on .year-note { padding-block: 8px 20px; }

@media (prefers-reduced-motion: reduce) {
  .flip, .flip.flipped { transform: none; }
  .flip .back { transform: none; visibility: hidden; }
  .flip.flipped .back { visibility: visible; }
  .flip.flipped .front { visibility: hidden; }
  .feed { height: auto; -webkit-mask-image: none; mask-image: none; }
  .feed .feed-track > [aria-hidden="true"] { display: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
