@font-face {
  font-family: 'Playpen Sans Thai';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/playpen-sans-thai-400-800-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Playpen Sans Thai';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/playpen-sans-thai-400-800-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'K2D';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/k2d-400-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'K2D';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/k2d-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'K2D';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/k2d-600-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'K2D';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/k2d-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'K2D';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/k2d-700-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'K2D';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/k2d-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Anubarn Wattanasatit: the communication notebook.
   Materials and their only jobs:
     cover pink    the school uniform, as the notebook's cover board (hero, back cover)
     paper         cool white, pale blue rules that ARE the text baseline grid, one red margin line
     print navy    everything printed (K2D)
     ballpoint     the teacher's and the parent's handwriting (Playpen Sans Thai)
     red pen       ticks and marks only
     stamp purple  praise stamps only
     LINE green    the LINE button only
   Shape rule: anything cut from card (buttons, labels, tabs, inputs) has 8px corners; photo prints have 2px. */

:root {
  --cover: #c93a73;
  --cover-deep: #a92a5d;
  --cover-ink: #fff7fa;
  --paper: #fdfdfb;
  --paper-2: #f3f5f8;
  --rule-c: #cfdcef;
  --margin-c: #e88a8a;
  --ink: #1b2140;
  --ink-2: #474e6b;
  --pen: #2341a6;
  --red: #d12f2f;
  --stamp: #6c3aa8;
  --line: #06c755;
  --line-ink: #04913e;
  --plaque: #e8b000;
  --plaque-ink: #17504a;
  --shadow: 74 18 44;
  --paper-shadow: 27 33 64;
  --focus: #2341a6;
  --field: #eef2f8;

  --hand: "Playpen Sans Thai", "K2D", system-ui, sans-serif;
  --print: "K2D", system-ui, -apple-system, "Sukhumvit Set", "Thonburi", sans-serif;

  --rule: 32px;
  --fs: 1.125rem;
  --r-card: 8px;
  --r-print: 2px;
  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 40px);
  --nav-h: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cover: #6e1f43;
    --cover-deep: #561634;
    --cover-ink: #ffeef5;
    --paper: #141a2c;
    --paper-2: #1a2136;
    --rule-c: #263252;
    --margin-c: #7c3846;
    --ink: #eef0f8;
    --ink-2: #b8bed3;
    --pen: #9fb8ff;
    --red: #ff7a72;
    --stamp: #c7a6ff;
    --line-ink: #2fe07e;
    --shadow: 0 0 0;
    --paper-shadow: 0 0 0;
    --focus: #9fb8ff;
    --field: #1d2540;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--fs)/var(--rule) var(--print);
  font-synthesis: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; overflow-x: clip;
}
html[data-lang="th"] [lang="en"]:not(.keep), html[data-lang="en"] [lang="th"]:not(.keep) { display: none !important; }
.ph { display: inline-block; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1.5px; }
::selection { background: color-mix(in srgb, var(--cover) 30%, transparent); color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
.i { width: 1.25em; height: 1.25em; flex: none; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-card); text-decoration: none; }
.skip:focus { top: 12px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }

/* Scrollbar and caret carry the notebook too */
html { scrollbar-color: color-mix(in srgb, var(--cover) 70%, var(--ink)) var(--paper-2); }
input, textarea, select { caret-color: var(--pen); }

/* ---------- Type ---------- */
.hand { font-family: var(--hand); color: var(--pen); font-weight: 450; }
.write { display: inline-block; max-width: 100%; }
.h-cover { font-family: var(--hand); font-weight: 800; font-size: clamp(2.35rem, 1.2rem + 3.9vw, 4.6rem); line-height: 1.3; letter-spacing: -0.01em; }
.h-page { font-family: var(--hand); font-weight: 750; font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.6rem); line-height: 1.3; }
.h-sec { font-family: var(--hand); font-weight: 700; font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.6rem); line-height: 1.35; }
.h-sub { font-family: var(--print); font-weight: 700; font-size: 1.375rem; line-height: var(--rule); }
.lede { font-size: clamp(1.125rem, 1rem + 0.35vw, 1.3rem); line-height: 1.75; color: var(--ink-2); max-width: 36em; }
.prose { max-width: 38em; }
.prose p + p { margin-top: var(--rule); }
.small { font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2); }
html[data-lang="en"] .h-cover { letter-spacing: -0.02em; font-size: clamp(2rem, 1.1rem + 3.3vw, 4.2rem); line-height: 1.2; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--ink); --bt: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px; border-radius: var(--r-card);
  background: var(--b); color: var(--bt); border: 2px solid var(--b);
  font: 700 1.0625rem/1.2 var(--print); text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 2px 0 rgb(var(--paper-shadow) / 0.25), 0 10px 22px -12px rgb(var(--paper-shadow) / 0.45);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 rgb(var(--paper-shadow) / 0.2), 0 16px 26px -14px rgb(var(--paper-shadow) / 0.5); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgb(var(--paper-shadow) / 0.3); }
.btn-ghost { --b: transparent; --bt: var(--ink); border-color: currentColor; box-shadow: none; }
.btn-ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); box-shadow: none; }
.on-cover .btn { --b: var(--paper); --bt: var(--ink); border-color: var(--paper); }
.on-cover .btn-ghost { --b: transparent; --bt: var(--cover-ink); border-color: color-mix(in srgb, var(--cover-ink) 70%, transparent); }
.on-cover .btn-ghost:hover { background: rgb(255 255 255 / 0.1); }
.btn-line { --b: var(--line); --bt: #fff; border-color: var(--line); }
.btn-line .i { width: 1.4em; height: 1.4em; }
.btn .i { width: 1.2em; height: 1.2em; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--ink); border-bottom: 2px solid color-mix(in srgb, var(--cover) 55%, transparent); padding-bottom: 2px; }
.link-arrow:hover { border-color: var(--cover); }
.link-arrow .i { transition: transform 0.25s var(--ease); }
.link-arrow:hover .i { transform: translateX(4px); }

/* ---------- Nav: the notebook's divider tabs ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: var(--cover); color: var(--cover-ink); }
.nav-in { height: var(--nav-h); display: flex; align-items: flex-end; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; align-self: center; margin-right: auto; min-width: 0; min-height: 48px; }
.brand svg { width: 74px; height: auto; flex: none; filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.18)); }
.brand-name { font: 700 1rem/1.25 var(--print); }
.brand-name small { display: block; font-weight: 400; font-size: 0.8125rem; }
.tabs { display: flex; align-items: flex-end; gap: 4px; list-style: none; height: 100%; }
.tabs a {
  position: relative; display: flex; align-items: center; height: 46px; padding: 0 16px; margin-top: auto;
  border-radius: var(--r-card) var(--r-card) 0 0; text-decoration: none; font: 600 0.98rem/1 var(--print); white-space: nowrap;
  background: var(--tab); color: #1b2140; opacity: 0.92;
  transform: translateY(6px); transition: transform 0.25s var(--ease), background-color 0.2s;
}
.tabs a:hover { transform: translateY(2px); }
.tabs a[aria-current="page"] { transform: translateY(0); height: 52px; opacity: 1; font-weight: 800; }
body[data-page="home"] .tabs a[aria-current="page"] { background: var(--paper); }
.tabs li:nth-child(1) a { --tab: #fff6c7; }
.tabs li:nth-child(2) a { --tab: #d8f1df; }
.tabs li:nth-child(3) a { --tab: #d9e8ff; }
.tabs li:nth-child(4) a { --tab: #ffe1cc; }
.tabs li:nth-child(5) a { --tab: #eadcff; }
.tabs li:nth-child(6) a { --tab: #d6f3f4; }
@media (prefers-color-scheme: dark) { body[data-page="home"] .tabs a[aria-current="page"] { color: var(--ink); } }
.nav-tools { display: flex; align-items: center; gap: 10px; align-self: center; }
.lang { display: inline-flex; border: 2px solid color-mix(in srgb, var(--cover-ink) 55%, transparent); border-radius: var(--r-card); overflow: hidden; }
.lang button { min-width: 44px; min-height: 40px; padding: 0 10px; background: none; border: 0; color: var(--cover-ink); font: 700 0.875rem/1 var(--print); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--cover-ink); color: var(--cover-deep); }
.nav .btn-line { min-height: 44px; padding: 8px 14px; font-size: 0.95rem; box-shadow: none; }
.menu-btn { display: none; min-width: 48px; min-height: 48px; border-radius: var(--r-card); border: 2px solid color-mix(in srgb, var(--cover-ink) 55%, transparent); background: none; color: var(--cover-ink); align-items: center; justify-content: center; cursor: pointer; }
.menu-btn .i { width: 26px; height: 26px; }
.menu { display: none; }

@media (max-width: 1180px) {
  .tabs a { padding: 0 12px; font-size: 0.93rem; }
  .brand-name small { display: none; }
}
@media (max-width: 1040px) {
  :root { --nav-h: 64px; }
  .tabs, .nav-tools .lang, .nav-tools .line-label { display: none; }
  .nav-in { align-items: center; }
  .menu-btn { display: inline-flex; }
  .nav .btn-line { padding: 8px 12px; }
  .menu {
    position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 39; display: block; background: var(--cover); color: var(--cover-ink);
    padding: 8px var(--gut) 24px; box-shadow: 0 18px 30px -18px rgb(0 0 0 / 0.45);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0s 0.25s;
    max-height: calc(100dvh - var(--nav-h)); overflow-y: auto;
  }
  .menu.open { visibility: visible; opacity: 1; transform: none; transition: opacity 0.2s, transform 0.25s var(--ease); }
  .menu ul { list-style: none; display: grid; gap: 8px; }
  .menu a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 18px; border-radius: var(--r-card); background: var(--tab); color: #1b2140; text-decoration: none; font: 700 1.125rem/1 var(--print); }
  .menu a[aria-current="page"] { outline: 3px solid var(--cover-ink); outline-offset: 2px; }
  .menu li:nth-child(1) a { --tab: #fff6c7; } .menu li:nth-child(2) a { --tab: #d8f1df; } .menu li:nth-child(3) a { --tab: #d9e8ff; }
  .menu li:nth-child(4) a { --tab: #ffe1cc; } .menu li:nth-child(5) a { --tab: #eadcff; } .menu li:nth-child(6) a { --tab: #d6f3f4; }
  .menu .lang { margin-top: 16px; }
  .menu .lang button { min-height: 48px; min-width: 64px; font-size: 1rem; }
  .menu-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
  .menu-foot a.tel { background: none; color: var(--cover-ink); min-height: 48px; padding: 0; gap: 8px; justify-content: flex-start; font-size: 1.05rem; }
}
@media (max-width: 420px) {
  .brand svg { width: 60px; }
  .brand-name { font-size: 0.92rem; }
  .nav .btn-line { min-width: 48px; padding: 8px 10px; }
}

/* ---------- Materials ---------- */
.cover { background: var(--cover); color: var(--cover-ink); position: relative; isolation: isolate; }
/* Cover board grain: a fixed, non-scrolling layer is cheaper, so the grain is a static tiled gradient instead */
.cover::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(rgb(255 255 255 / 0.07) 1px, transparent 1.2px), radial-gradient(rgb(0 0 0 / 0.05) 1px, transparent 1.2px);
  background-size: 7px 7px, 11px 11px; background-position: 0 0, 3px 5px;
}
.paper {
  background-color: var(--paper);
  background-image: linear-gradient(to bottom, transparent calc(var(--rule) - 1.5px), var(--rule-c) calc(var(--rule) - 1.5px), var(--rule-c) var(--rule));
  background-size: 100% var(--rule);
  background-position: 0 var(--rule-off, 0px);
}
.margin { position: relative; }
.margin::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--margin-x, 72px); width: 2px; background: var(--margin-c); opacity: 0.75; pointer-events: none; }
@media (max-width: 760px) { .diary.margin::before { left: 12px; width: 1.5px; } }

/* A taped photo print */
.print {
  position: relative; margin: 0; background: #fff; padding: 10px 10px 12px; border-radius: var(--r-print);
  box-shadow: 0 1px 1px rgb(var(--paper-shadow) / 0.12), 0 14px 30px -14px rgb(var(--shadow) / 0.5);
  transform: rotate(var(--r, 0deg));
}
@media (prefers-color-scheme: dark) { .print { background: #f3f1ea; } }
.print img { width: 100%; aspect-ratio: var(--ar, 4 / 3); object-fit: cover; border-radius: 1px; background: #e9e6df; }
.print figcaption { font: 500 1.05rem/1.4 var(--hand); color: #2341a6; padding: 10px 4px 0; }
.tape { position: absolute; width: 120px; height: 33px; background: url(img/tape-1.png) center / 100% 100% no-repeat; pointer-events: none; z-index: 2; }
.tape.t2 { background-image: url(img/tape-2.png); }
.tape.t3 { background-image: url(img/tape-3.png); }
.tape.tl { top: -14px; left: -26px; transform: rotate(-32deg); }
.tape.tr { top: -14px; right: -26px; transform: rotate(31deg); }
.tape.tc { top: -16px; left: calc(50% - 60px); transform: rotate(-3deg); }
.tape.bl { bottom: -12px; left: -24px; transform: rotate(28deg); }
.tape.br { bottom: -12px; right: -24px; transform: rotate(-30deg); }

/* The praise stamp: rubber-stamp ink, one moment per view */
.stamp { position: absolute; width: var(--s, 132px); aspect-ratio: 1; color: var(--stamp); transform: rotate(var(--r, -14deg)); pointer-events: none; z-index: 3; mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { .stamp { mix-blend-mode: screen; } }
.stamp svg { width: 100%; height: 100%; overflow: visible; }
.stamp text { font-family: var(--print); font-weight: 700; fill: currentColor; }
.stamp .big { font-family: var(--hand); font-weight: 800; }

/* The name label sticker (ชื่อ / ชั้น / โรงเรียน) */
.label {
  position: relative; background: var(--paper); color: var(--ink); border-radius: 12px; padding: 20px 26px 22px;
  box-shadow: 0 1px 0 rgb(var(--shadow) / 0.25), 0 18px 34px -18px rgb(var(--shadow) / 0.65);
  transform: rotate(var(--r, -1.2deg));
}
.label::before { content: ""; position: absolute; inset: 7px; border: 2px solid color-mix(in srgb, var(--cover) 70%, var(--paper)); border-radius: 8px; pointer-events: none; }
.label::after { content: ""; position: absolute; inset: 11px; border: 1px solid color-mix(in srgb, var(--cover) 40%, var(--paper)); border-radius: 6px; pointer-events: none; }
.label dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; column-gap: 12px; row-gap: 2px; position: relative; z-index: 1; }
.label dt { font: 600 0.95rem/44px var(--print); color: var(--ink-2); white-space: nowrap; }
.label dd { margin: 0; font: 500 clamp(1.08rem, 1rem + 0.35vw, 1.3rem)/44px var(--hand); color: var(--pen); border-bottom: 2px dotted color-mix(in srgb, var(--ink) 35%, transparent); min-width: 0; overflow-wrap: anywhere; }

/* Red-pen tick */
.tick { width: 30px; height: 26px; color: var(--red); flex: none; overflow: visible; }
.tick path { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Hero: the cover ---------- */
.hero { padding: clamp(28px, 4.5vw, 64px) 0 clamp(48px, 6vw, 88px); overflow: hidden; overflow: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero h1 { color: var(--cover-ink); max-width: 11.5em; }
.hero h1 .ph { display: inline-block; }
.hero .label { margin-top: clamp(22px, 2.6vw, 34px); max-width: 520px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: clamp(24px, 3vw, 36px); }
.hero-media { position: relative; min-height: 520px; }
.hero-media .print.main { position: absolute; right: 0; bottom: 0; width: min(64%, 360px); --r: 3.5deg; --ar: 3 / 4; z-index: 2; }
.hero-media .print.behind { position: absolute; left: 0; top: 0; width: min(60%, 330px); --r: -5deg; --ar: 4 / 5; z-index: 1; }
.hero-media .stamp { left: 42%; top: 58%; --s: 150px; --r: -16deg; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { min-height: 0; height: clamp(360px, 92vw, 520px); margin-top: 8px; }
  .hero-media .print.main { right: 2%; width: 56%; bottom: 0; }
  .hero-media .print.behind { width: 54%; left: 2%; top: 0; }
  .hero-media .stamp { --s: 116px; left: 40%; top: 62%; }
}
@media (max-width: 560px) {
  .hero { padding-top: 22px; }
  .hero .label { padding: 14px 18px 16px; }
  .hero .label dt { line-height: 40px; font-size: 0.9rem; }
  .hero .label dd { line-height: 40px; }
  .hero-cta .btn { flex: 1 1 auto; }
}

/* ---------- Sections on paper ---------- */
.sec { padding: calc(var(--rule) * 3) 0; }
.sec-head { max-width: 46rem; margin-bottom: calc(var(--rule) * 1.5); }
.sec-head .lede { margin-top: 12px; }
.sec-tight { padding: calc(var(--rule) * 2) 0; }
@media (max-width: 760px) { .sec { padding: calc(var(--rule) * 2) 0; } }

/* The open notebook spread: two pages, a stapled fold */
.spread {
  display: grid; grid-template-columns: 1fr 1fr; position: relative; border-radius: 6px;
  box-shadow: 0 2px 0 rgb(var(--paper-shadow) / 0.06), 0 30px 60px -36px rgb(var(--paper-shadow) / 0.55);
  background: var(--paper);
}
.spread > .pg { padding: clamp(28px, 4vw, 56px); position: relative; min-width: 0; }
.spread > .pg:first-child { border-radius: 6px 0 0 6px; background-image: linear-gradient(to left, rgb(var(--paper-shadow) / 0.10), transparent 64px), linear-gradient(to bottom, transparent calc(var(--rule) - 1.5px), var(--rule-c) calc(var(--rule) - 1.5px), var(--rule-c) var(--rule)); background-size: 100% 100%, 100% var(--rule); }
.spread > .pg:last-child { border-radius: 0 6px 6px 0; background-image: linear-gradient(to right, rgb(var(--paper-shadow) / 0.12), transparent 64px), linear-gradient(to bottom, transparent calc(var(--rule) - 1.5px), var(--rule-c) calc(var(--rule) - 1.5px), var(--rule-c) var(--rule)); background-size: 100% 100%, 100% var(--rule); }
.spread::before, .spread::after { content: ""; position: absolute; left: calc(50% - 1px); width: 3px; height: 34px; background: linear-gradient(#c5c9d4, #8d93a3); border-radius: 1px; z-index: 2; }
.spread::before { top: 22%; } .spread::after { bottom: 22%; }
.pg-title { font: 700 clamp(1.6rem, 1.1rem + 1.7vw, 2.4rem)/1.35 var(--hand); }
.pg-title.th-warm { color: var(--cover); }
.pg-title.intl { color: var(--pen); }
.pg .lede { margin-top: 8px; }
.pg-prints { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 22px; margin-top: calc(var(--rule) * 1.25); }
.pg-prints .print:nth-child(1) { --r: -2.5deg; }
.pg-prints .print:nth-child(2) { --r: 2deg; margin-top: 18px; }
.pg-prints .print:nth-child(3) { --r: 1.5deg; grid-column: 1 / -1; width: 78%; justify-self: center; }
.notes { list-style: none; margin-top: calc(var(--rule) * 1); display: grid; gap: 0; }
.notes li { display: flex; gap: 10px; align-items: flex-start; font: 450 1.12rem/var(--rule) var(--hand); color: var(--pen); }
.notes .tick { margin-top: 2px; }
.spread .stamp { right: 6%; top: -26px; --s: 128px; --r: 12deg; }
@media (max-width: 860px) {
  .spread { grid-template-columns: 1fr; }
  .spread::before, .spread::after { display: none; }
  .spread > .pg:first-child { border-radius: 6px 6px 0 0; background-image: linear-gradient(to top, rgb(var(--paper-shadow) / 0.10), transparent 40px), linear-gradient(to bottom, transparent calc(var(--rule) - 1.5px), var(--rule-c) calc(var(--rule) - 1.5px), var(--rule-c) var(--rule)); }
  .spread > .pg:last-child { border-radius: 0 0 6px 6px; background-image: linear-gradient(to bottom, rgb(var(--paper-shadow) / 0.12), transparent 40px), linear-gradient(to bottom, transparent calc(var(--rule) - 1.5px), var(--rule-c) calc(var(--rule) - 1.5px), var(--rule-c) var(--rule)); }
  .spread .stamp { top: auto; bottom: -30px; right: 4%; --s: 112px; }
}

/* ---------- The day: a page of the communication notebook ---------- */
.daybook { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.sheet {
  position: relative; background-color: var(--paper); border-radius: 4px; padding: calc(var(--rule) * 1) clamp(18px, 3vw, 40px) calc(var(--rule) * 1.5) 0;
  --margin-x: clamp(58px, 6.4vw, 92px);
  background-image: linear-gradient(to bottom, transparent calc(var(--rule) - 1.5px), var(--rule-c) calc(var(--rule) - 1.5px), var(--rule-c) var(--rule));
  background-size: 100% var(--rule);
  box-shadow: 0 1px 0 rgb(var(--paper-shadow) / 0.08), 0 28px 56px -32px rgb(var(--paper-shadow) / 0.55);
  overflow: hidden; overflow: clip;
}
.sheet > :not(.day-rows):not(.stamp) { margin-left: calc(var(--margin-x) + 22px); }
.sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; align-items: baseline; border-bottom: 2px solid var(--ink); padding-bottom: 4px; margin-bottom: 0; }
.sheet-head .t { font: 700 1.25rem/var(--rule) var(--print); }
.sheet-head .d { font: 500 1.15rem/var(--rule) var(--hand); color: var(--pen); }
.sheet-sample { font: 600 0.82rem/1.3 var(--print); color: var(--ink-2); margin-top: 6px; }
.day-rows { list-style: none; }
.day-row { display: grid; grid-template-columns: var(--margin-x) minmax(0, 1fr) 34px; gap: 0 22px; align-items: start; padding: calc(var(--rule) * 0.5) 0; min-height: calc(var(--rule) * 2); }
.day-row .tm { font: 500 1.05rem/var(--rule) var(--hand); font-variant-numeric: tabular-nums; color: var(--pen); text-align: right; padding-right: 12px; }
.day-row .what { font: 700 1.06rem/var(--rule) var(--print); }
.day-row .note { font: 450 1.12rem/var(--rule) var(--hand); color: var(--pen); }
.day-row .tick { margin-top: 3px; }
.day-row button.flip { all: unset; cursor: pointer; display: block; border-radius: 6px; min-height: 44px; }
.day-row button.flip:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.day-row .learn { display: none; font: 400 0.98rem/1.6 var(--print); color: var(--ink-2); padding: 6px 0 4px; }
.day-row.open .learn { display: block; }
.day-row .more { font: 600 0.85rem/1 var(--print); color: var(--ink-2); display: inline-flex; gap: 4px; align-items: center; margin-left: 6px; vertical-align: 2px; }
.day-row .more .i { width: 14px; height: 14px; transition: transform 0.2s; }
.day-row.open .more .i { transform: rotate(180deg); }
.comment { margin-top: calc(var(--rule) * 0.5); border-top: 2px solid var(--ink); padding-top: 6px; }
.comment .k { font: 700 0.95rem/var(--rule) var(--print); color: var(--ink-2); }
.comment .v { font: 450 1.2rem/var(--rule) var(--hand); color: var(--pen); }
.sign { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: calc(var(--rule) * 0.5); }
.sign .k { font: 700 0.95rem/var(--rule) var(--print); color: var(--ink-2); }
.sign a { font: 600 1.05rem/var(--rule) var(--print); color: var(--ink); flex: 1; min-width: 12em; border-bottom: 2px dotted color-mix(in srgb, var(--ink) 40%, transparent); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.sign a:hover { color: var(--cover); }
.sheet .stamp { right: clamp(10px, 4vw, 40px); bottom: 54px; --s: 128px; --r: -12deg; }
.day-side { display: grid; gap: 22px; padding-top: 12px; position: sticky; top: calc(var(--nav-h) + 24px); }
#day { background: var(--paper-2); }
.day-side .print:nth-child(1) { --r: 2.5deg; --ar: 4 / 3; }
.day-side .print:nth-child(2) { --r: -2deg; --ar: 4 / 3; width: 86%; justify-self: end; }
@media (max-width: 900px) {
  .daybook { grid-template-columns: 1fr; }
  .day-side { position: static; grid-template-columns: 1fr 1fr; gap: 18px; order: -1; }
  .day-side .print:nth-child(2) { width: 100%; }
}
@media (max-width: 560px) {
  .sheet { padding-right: 12px; --margin-x: 50px; }
  .sheet > :not(.day-rows):not(.stamp) { margin-left: calc(var(--margin-x) + 12px); }
  .day-row { gap: 0 12px; grid-template-columns: var(--margin-x) minmax(0, 1fr) 28px; }
  .day-row .tm { font-size: 0.95rem; padding-right: 6px; }
  .day-side { grid-template-columns: 1fr; }
  .day-side .print:nth-child(2) { display: none; }
}

/* Handwriting being written: each line is revealed left to right, as a pen moves */
.js [data-write] .write { clip-path: inset(-6px 100% -6px -2px); }
.js [data-write].written .write { clip-path: inset(-8px -4px -8px -2px); transition: clip-path var(--d, 0.7s) steps(var(--steps, 18), end) var(--w, 0s); }
.js [data-write] .tick path { stroke-dasharray: 60; stroke-dashoffset: 60; }
.js [data-write].written .tick path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.32s ease-out var(--w, 0s); }
.js .stamp[data-stamp] { opacity: 0; transform: rotate(var(--r)) scale(1.5); }
.js .stamped .stamp[data-stamp], .js .stamp[data-stamp].down { opacity: 0.95; transform: rotate(var(--r)) scale(1); transition: opacity 0.12s linear var(--w, 0s), transform 0.22s cubic-bezier(0.3, 1.6, 0.5, 1) var(--w, 0s); }
html.rm .write, html.rm .written .write { clip-path: none !important; transition: none !important; }
html.rm .tick path { stroke-dashoffset: 0 !important; transition: none !important; }
html.rm .stamp[data-stamp] { opacity: 0.92 !important; transform: rotate(var(--r)) !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .js [data-write] .write { clip-path: none; } .js [data-write] .tick path { stroke-dashoffset: 0; } .js .stamp[data-stamp] { opacity: 0.92; transform: rotate(var(--r)); } }

/* ---------- Classes: divider tabs on the page edge ---------- */
.classes { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 0; align-items: stretch; }
.class-tabs { list-style: none; display: flex; flex-direction: column; gap: 6px; padding-top: 28px; }
.class-tabs button {
  width: 100%; min-height: 64px; text-align: left; padding: 10px 18px 10px 22px; border: 0; cursor: pointer;
  border-radius: 0 var(--r-card) var(--r-card) 0; background: color-mix(in srgb, var(--tab) 88%, var(--paper));
  font: 700 1.06rem/1.3 var(--print); color: #1b2140; transform: translateX(-10px); transition: transform 0.25s var(--ease);
  display: grid; gap: 2px;
}
.class-tabs button small { font-weight: 600; font-size: 0.86rem; opacity: 0.8; }
.class-tabs button:hover { transform: translateX(-4px); }
.class-tabs button { position: relative; }
.class-tabs button[aria-selected="true"] { transform: translateX(-16px); background: var(--tab); z-index: 2; font-weight: 800; }
.class-tabs button, .class-page { --tab: var(--c, #fff0a8); }
.class-page .age { color: #2341a6 !important; } .class-page .facts, .class-page .prose { color: #1b2140; } .class-page .tick { color: #c42a2a; }
.class-page .link-arrow { color: #1b2140; }
.class-page {
  position: relative; z-index: 1; border-radius: 6px; padding: clamp(28px, 4vw, 52px); background-color: var(--tab) !important; color: #1b2140;
  box-shadow: 0 1px 0 rgb(var(--paper-shadow) / 0.08), 0 30px 60px -36px rgb(var(--paper-shadow) / 0.5);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(20px, 3vw, 44px); align-items: start;
}
.class-page[hidden] { display: none; }
.class-page .age { font: 500 1.25rem/var(--rule) var(--hand); color: var(--pen); }
.class-page h3 { font: 700 clamp(1.7rem, 1.2rem + 1.4vw, 2.3rem)/1.35 var(--hand); }
.class-page .facts { list-style: none; margin-top: calc(var(--rule) * 0.5); }
.class-page .facts li { display: flex; gap: 10px; }
.class-page .print { --r: 2deg; }
@media (max-width: 860px) {
  .classes { grid-template-columns: 1fr; }
  .class-tabs { flex-direction: row; overflow-x: auto; padding: 0 0 0 2px; order: -1; gap: 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .class-tabs li { flex: none; scroll-snap-align: start; }
  .class-tabs button { border-radius: var(--r-card) var(--r-card) 0 0; transform: translateY(8px); min-height: 60px; padding: 10px 16px; }
  .class-tabs button:hover { transform: translateY(4px); }
  .class-tabs button[aria-selected="true"] { transform: none; }
  .class-page { grid-template-columns: 1fr; }
}

/* ---------- Campus: one annotated photograph ---------- */
.annot { position: relative; }
.annot .print { --r: 0deg; padding: 12px 12px 14px; }
.annot .print img { aspect-ratio: 16 / 9; }
.annot .callout { position: absolute; font: 700 clamp(1.05rem, 0.9rem + 0.6vw, 1.45rem)/1.25 var(--hand); color: #d12f2f; transform: rotate(var(--r, -3deg)); paint-order: stroke fill; -webkit-text-stroke: 5px rgb(255 255 255 / 0.92); text-shadow: 0 1px 6px rgb(255 255 255 / 0.6); white-space: nowrap; }
.annot .ring { position: absolute; pointer-events: none; color: #d12f2f; }
.annot .ring path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.campus-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin-top: calc(var(--rule) * 1.5); }
.campus-list > div { border-top: 2px solid var(--ink); padding-top: 10px; }
.campus-list h3 { font: 700 1.15rem/var(--rule) var(--print); }
.campus-list p { color: var(--ink-2); }
@media (max-width: 760px) { .campus-list { grid-template-columns: 1fr; gap: 20px; } .annot .callout { font-size: 0.95rem; } }

/* ---------- News: dated diary entries ---------- */
.diary { list-style: none; --margin-x: 132px; padding: 0; }
.entry { display: grid; grid-template-columns: 132px minmax(0, 1fr) minmax(0, 220px); gap: 0 28px; padding: calc(var(--rule) * 0.75) 0; align-items: start; }
.entry + .entry { border-top: 1px dashed color-mix(in srgb, var(--ink) 25%, transparent); }
.entry time { font: 500 1.1rem/var(--rule) var(--hand); color: var(--pen); text-align: right; padding-right: 22px; }
.entry h3 { font: 700 1.3rem/var(--rule) var(--print); }
.entry h3 a { text-decoration: none; }
.entry h3 a:hover { text-decoration: underline; text-decoration-color: var(--cover); }
.entry p { color: var(--ink-2); margin-top: 4px; }
.entry .print { --r: 2deg; padding: 6px 6px 8px; }
.entry:nth-child(even) .print { --r: -2deg; }
.entry .print img { aspect-ratio: 4 / 3; }
.entry .tag { font: 600 0.82rem/1 var(--print); color: var(--ink-2); display: inline-block; margin-top: 10px; padding: 6px 10px; border: 1.5px solid currentColor; border-radius: var(--r-card); }
@media (max-width: 760px) {
  .diary { --margin-x: 12px; }
  .entry { grid-template-columns: minmax(0, 1fr) 112px; gap: 4px 16px; padding-left: 28px; }
  .entry time { grid-column: 1 / -1; text-align: left; padding: 0; }
  .entry .print { grid-row: 2 / span 2; grid-column: 2; }
}

/* ---------- Parent's reply: the visit request ---------- */
.reply { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.reply-form { position: relative; background-color: var(--paper); border-radius: 6px; padding: calc(var(--rule) * 1) clamp(20px, 3vw, 40px) calc(var(--rule) * 1.25); color: var(--ink);
  box-shadow: 0 2px 0 rgb(var(--shadow) / 0.2), 0 30px 60px -30px rgb(var(--shadow) / 0.7); }
.reply-form .form-title { font: 700 1.3rem/var(--rule) var(--print); border-bottom: 2px solid var(--ink); padding-bottom: 4px; margin-bottom: 8px; }
.field { display: grid; gap: 2px; padding: 8px 0 6px; }
.field label { font: 700 0.95rem/1.4 var(--print); color: var(--ink); }
.field .help { font: 400 0.88rem/1.4 var(--print); color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 8px 10px; border: 0; border-bottom: 2px dotted color-mix(in srgb, var(--ink) 55%, transparent);
  border-radius: var(--r-card) var(--r-card) 0 0; background-color: var(--field);
  font: 500 1.15rem/1.4 var(--hand); color: var(--pen); appearance: none;
}
.field textarea { min-height: 96px; resize: vertical; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--ink-2) 85%, var(--paper)); font-family: var(--print); font-size: 1rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-bottom-style: solid; }
.field .err { display: none; font: 600 0.9rem/1.4 var(--print); color: var(--red); }
.field.bad .err { display: block; }
.field.bad input, .field.bad select { border-bottom: 2px solid var(--red); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; align-items: center; }
.form-note { font: 400 0.9rem/1.5 var(--print); color: var(--ink-2); margin-top: 12px; }
.sent { display: none; margin-top: 16px; padding: 14px 16px; border-radius: var(--r-card); background: color-mix(in srgb, var(--line) 12%, var(--paper)); border: 2px solid color-mix(in srgb, var(--line) 50%, transparent); }
.sent.show { display: block; }
.sent pre { white-space: pre-wrap; font: 400 0.95rem/1.5 var(--print); margin: 8px 0 0; }
.reply-side h2 { color: var(--cover-ink); }
.reply-side .lede { color: color-mix(in srgb, var(--cover-ink) 90%, transparent); margin-top: 12px; }
.ways { list-style: none; display: grid; gap: 10px; margin-top: 28px; }
.ways a { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 16px; border-radius: var(--r-card); text-decoration: none; background: rgb(255 255 255 / 0.12); border: 2px solid rgb(255 255 255 / 0.28); color: var(--cover-ink); font: 700 1.06rem/1.3 var(--print); }
.ways a:hover { background: rgb(255 255 255 / 0.2); }
.ways a small { display: block; font-weight: 400; font-size: 0.88rem; opacity: 0.9; }
.ways .i { width: 26px; height: 26px; }
@media (max-width: 900px) { .reply { grid-template-columns: 1fr; } }

/* ---------- Page header for inner pages: a divider page ---------- */
.divider { padding: clamp(28px, 5vw, 64px) 0 clamp(32px, 5vw, 64px); background: var(--tab, #fff6c7); color: #1b2140; position: relative; }
.divider .crumb { font: 600 0.95rem/1 var(--print); display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding-right: 8px; color: #3d4466; text-decoration: none; }
.divider .crumb:hover { text-decoration: underline; }
.divider h1 { margin-top: 14px; max-width: 16em; }
.divider .lede { color: #3d4466; margin-top: 12px; }
.divider .hand-note { position: absolute; right: var(--gut); bottom: 18px; font: 500 1.2rem/1.3 var(--hand); color: #2341a6; transform: rotate(-3deg); max-width: 15em; text-align: right; }
@media (max-width: 760px) { .divider .hand-note { position: static; transform: rotate(-1.5deg); margin-top: 16px; text-align: left; } }
@media (prefers-color-scheme: dark) { .divider { background: color-mix(in srgb, var(--tab) 22%, var(--paper)); color: var(--ink); } .divider .lede, .divider .crumb { color: var(--ink-2); } .divider .hand-note { color: var(--pen); } }
body[data-page="about"] { --tab: #d8f1df; }
body[data-page="learning"] { --tab: #d9e8ff; }
body[data-page="admissions"] { --tab: #ffe1cc; }
body[data-page="news"] { --tab: #eadcff; }
body[data-page="contact"] { --tab: #d6f3f4; }

/* Approaches: four ideas, explained the way a teacher would to a parent */
.approach { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--rule) * 1) clamp(24px, 4vw, 56px); }
.approach > div { padding-top: 10px; border-top: 2px solid var(--ink); }
.approach h3 { font: 700 1.25rem/var(--rule) var(--print); }
.approach .k { font: 500 1.06rem/var(--rule) var(--hand); color: var(--pen); }
.approach p { color: var(--ink-2); margin-top: 4px; }
@media (max-width: 760px) { .approach { grid-template-columns: 1fr; } }

/* Steps: a checklist ticked in red pen */
.steps { list-style: none; counter-reset: s; display: grid; gap: 0; max-width: 46rem; }
.steps li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; padding: 14px 0; border-bottom: 1px dashed color-mix(in srgb, var(--ink) 25%, transparent); }
.steps .box { width: 40px; height: 40px; border: 2.5px solid var(--ink); border-radius: 6px; display: grid; place-items: center; margin-top: 2px; }
.steps .box .tick { width: 34px; height: 30px; margin: -6px -4px 0 0; }
.steps h3 { font: 700 1.2rem/var(--rule) var(--print); }
.steps p { color: var(--ink-2); }

/* Documents and FAQ */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
.docs { list-style: none; }
.docs li { display: flex; gap: 12px; align-items: flex-start; padding: 0; line-height: var(--rule); }
.docs li .tick { margin-top: 3px; }
.faq details { border-top: 2px solid var(--ink); }
.faq details:last-child { border-bottom: 2px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 0; font: 700 1.1rem/1.5 var(--print); min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { transition: transform 0.25s var(--ease); }
.faq details[open] summary .i { transform: rotate(45deg); }
.faq .a { padding: 0 0 18px; color: var(--ink-2); max-width: 40em; }
.faq .a .hand { display: block; margin-top: 8px; }

/* Year of events: a calendar page */
.year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--paper); }
.year > div { padding: 14px 16px 18px; border-right: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); min-height: 132px; }
.year .m { font: 700 0.95rem/1.4 var(--print); color: var(--ink); }
.year .e { font: 500 1.08rem/1.45 var(--hand); color: var(--pen); margin-top: 6px; }
.year .e small { display: block; font: 400 0.9rem/1.5 var(--print); color: var(--ink-2); margin-top: 2px; }
@media (max-width: 900px) { .year { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .year { grid-template-columns: 1fr; } .year > div { min-height: 0; } }

/* Stats as stamps (each one a real, sourced fact) */
.stamps-row { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; margin-top: calc(var(--rule) * 1); }
.stamp-fact { display: flex; align-items: center; gap: 14px; max-width: 22rem; }
.stamp-fact .stamp { position: relative; --s: 96px; flex: none; }
.stamp-fact p { font-weight: 600; }

/* Article */
.article { max-width: 44rem; }
.article .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 500 1.1rem/var(--rule) var(--hand); color: var(--pen); }
.article .print { margin: calc(var(--rule) * 1) 0; --r: -1deg; }
.article .print img { aspect-ratio: auto; }
.article-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: calc(var(--rule) * 1) 0; }
.article-gallery .print:nth-child(odd) { --r: 1.5deg; } .article-gallery .print:nth-child(even) { --r: -1.5deg; }
.cms-note { margin-top: calc(var(--rule) * 1.5); padding: 14px 18px; border: 2px dashed color-mix(in srgb, var(--ink) 35%, transparent); border-radius: var(--r-card); font: 400 0.95rem/1.6 var(--print); color: var(--ink-2); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.contact-list { list-style: none; display: grid; gap: 4px; }
.contact-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px dashed color-mix(in srgb, var(--ink) 25%, transparent); }
.contact-list .i { width: 26px; height: 26px; color: var(--cover); margin-top: 3px; }
.contact-list strong { display: block; font-weight: 700; }
.contact-list a { font-weight: 600; }
.map-card { display: block; text-decoration: none; color: inherit; }
.map-card .print { --r: 1.5deg; }
.directions { list-style: none; counter-reset: d; margin-top: calc(var(--rule) * 0.5); }
.directions li { counter-increment: d; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; line-height: var(--rule); }
.directions li::before { content: counter(d); font: 700 1.1rem/var(--rule) var(--hand); color: var(--pen); text-align: center; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Back cover ---------- */
.back { padding: calc(var(--rule) * 2.5) 0 calc(var(--rule) * 1.5); }
.back-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.back h2 { font: 800 clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem)/1.35 var(--hand); }
.back h3 { font: 700 1rem/1.4 var(--print); margin-bottom: 8px; opacity: 0.9; }
.back ul { list-style: none; display: grid; gap: 4px; }
.back a { text-decoration: none; font-weight: 600; }
.back a:hover { text-decoration: underline; }
.back p, .back li { font-size: 1rem; line-height: 1.6; }
.back .owner { margin-top: 18px; display: inline-block; background: var(--paper); color: var(--ink); border-radius: 10px; padding: 10px 16px; transform: rotate(-1deg); }
.back .owner .k { font: 600 0.9rem/1.4 var(--print); color: var(--ink-2); }
.back .owner .v { font: 500 1.15rem/1.4 var(--hand); color: var(--pen); }
.back-foot { margin-top: calc(var(--rule) * 1.5); padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 0.3); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 0.9rem; opacity: 0.92; }
@media (max-width: 900px) { .back-grid { grid-template-columns: 1fr 1fr; } .back-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .back-grid { grid-template-columns: 1fr; } }

/* ---------- Phone dock: LINE and call, always in reach ---------- */
.dock { display: none; }
@media (max-width: 760px) {
  .dock { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 14px; background: color-mix(in srgb, var(--paper) 92%, transparent); box-shadow: 0 10px 30px -10px rgb(var(--paper-shadow) / 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform 0.3s var(--ease); }
  .dock .btn { min-height: 50px; padding: 8px 10px; font-size: 1rem; box-shadow: none; }
  .dock.away { transform: translateY(140%); }
  body { padding-bottom: 84px; }
}

/* ---------- Reveal: content is visible by default; motion only adds ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.7s var(--ease); }
  .js .rise.in { opacity: 1; transform: none; }
  .js .hero .print.main { animation: settle 0.9s var(--ease) 0.15s both; }
  .js .hero .print.behind { animation: settle-b 0.9s var(--ease) 0.3s both; }
  @keyframes settle { from { opacity: 0; transform: translateY(26px) rotate(9deg); } to { opacity: 1; transform: rotate(var(--r)); } }
  @keyframes settle-b { from { opacity: 0; transform: translateY(26px) rotate(-12deg); } to { opacity: 1; transform: rotate(var(--r)); } }
}

/* Page turns between pages (cross-document view transitions, where supported) */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: 0.32s cubic-bezier(0.4, 0, 1, 1) both page-out; transform-origin: left center; }
  ::view-transition-new(root) { animation: 0.42s var(--ease) both page-in; transform-origin: left center; }
  @keyframes page-out { to { opacity: 0; transform: translateX(-6%) scaleX(0.96); } }
  @keyframes page-in { from { opacity: 0; transform: translateX(5%); } }
}
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
.nav { view-transition-name: nav; }

/* ---------- Additions: components used by the inner pages ---------- */
.parent-note { margin-top: calc(var(--rule) * 1.5); border-top: 2px solid var(--ink); padding-top: 6px; }
.parent-note .k { font: 700 0.95rem/var(--rule) var(--print); color: var(--ink-2); }
.parent-note blockquote { margin: 0; font-size: 1.3rem; line-height: var(--rule); }
.parent-note .who { font: 400 0.9rem/1.5 var(--print); color: var(--ink-2); margin-top: 6px; }

.day-photo { transition: opacity 0.18s ease, transform 0.3s var(--ease); }
.day-photo.swap { opacity: 0; transform: rotate(var(--r)) translateY(6px); }
.day-hint { font-size: 1.05rem; line-height: 1.4; transform: rotate(-1.5deg); }
@media (max-width: 900px) { .day-hint { display: none; } }
.diary-note { font-size: 1.15rem; transform: rotate(-3deg); text-align: center; padding-top: 18px; }

/* Open House card (admissions) */
.adm-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.oh { position: relative; border-radius: 6px; padding: calc(var(--rule) * 1) clamp(20px, 3vw, 36px) calc(var(--rule) * 1); box-shadow: 0 1px 0 rgb(var(--paper-shadow) / 0.08), 0 28px 56px -32px rgb(var(--paper-shadow) / 0.55); }
.oh .h-sub { padding-right: 120px; }
.oh-when { font-size: 1.3rem; line-height: var(--rule); margin: 4px 0 8px; padding-right: 110px; }
.oh .oh-stamp { right: 14px; top: -22px; --s: 124px; --r: 10deg; }
.oh-note { margin-top: 24px; font: 500 1.1rem/1.5 var(--hand); color: var(--cover-ink); }
@media (max-width: 900px) { .adm-top { grid-template-columns: 1fr; } }

/* Timetable */
.tt { width: 100%; border-collapse: collapse; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.tt th, .tt td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); line-height: 1.55; }
.tt thead th { font: 700 0.92rem/1.4 var(--print); background: var(--paper-2); }
.tt tbody th { font: 500 1.05rem/1.55 var(--hand); color: var(--pen); font-variant-numeric: tabular-nums; width: 5.5em; }
.tt td.hand { font-size: 1.05rem; }
@media (max-width: 640px) {
  .tt thead { display: none; }
  .tt tr { display: grid; grid-template-columns: 4.5em 1fr; padding: 10px 12px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); }
  .tt th, .tt td { border: 0; padding: 2px 0; }
  .tt td.hand { grid-column: 2; }
}

/* About */
.about-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.flower { margin: calc(var(--rule) * 1.25) 0 0; font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem); line-height: 1.5; transform: rotate(-1deg); max-width: 22em; }
.history { --margin-x: 110px; }
.history .entry { grid-template-columns: 110px minmax(0, 1fr); padding: calc(var(--rule) * 0.5) 0; }
.history .entry time { font-size: 1.3rem; }
.h-tl { font: 600 1.06rem/1.6 var(--print); padding-top: 2px; }
@media (max-width: 760px) { .history .entry { grid-template-columns: 1fr; padding-left: 28px; } .about-story { grid-template-columns: 1fr; } }
.motto-big { font-size: clamp(1.7rem, 1.1rem + 2.4vw, 3rem); line-height: 1.45; font-weight: 600; max-width: 18em; }
.leaders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px); }
.leaders > div { border-top: 2px solid var(--ink); padding-top: 10px; }
.leaders .k { font: 500 1.1rem/var(--rule) var(--hand); color: var(--pen); }
.leaders h3 { font: 700 1.15rem/1.5 var(--print); }
.leaders p:last-child { color: var(--ink-2); margin-top: 6px; line-height: 1.6; }
@media (max-width: 860px) { .leaders { grid-template-columns: 1fr; gap: 24px; } }
.place-prints { display: grid; padding-top: 12px; }

/* Learning */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(var(--rule) * 1) clamp(20px, 3vw, 40px); }
.skills > div { border-top: 2px solid var(--ink); padding-top: 10px; }
.skills h3 { font: 700 1.25rem/var(--rule) var(--hand); color: var(--pen); }
.skills p { color: var(--ink-2); }
@media (max-width: 860px) { .skills { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .skills { grid-template-columns: 1fr; } }
.alumni { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 12px; }
.alumni li { font: 500 1.1rem/1.3 var(--hand); color: var(--pen); padding: 10px 14px; border: 2px solid color-mix(in srgb, var(--pen) 35%, transparent); border-radius: var(--r-card); background: var(--paper); transform: rotate(var(--r, 0deg)); }
.alumni li:nth-child(3n+1) { --r: -1deg; } .alumni li:nth-child(3n+2) { --r: 0.8deg; } .alumni li:nth-child(3n) { --r: -0.4deg; }

/* Contact map */
.map-print { padding: 10px; }
.map-print img { aspect-ratio: 3 / 2; filter: contrast(1.05); }
.map-ring { position: absolute; left: 50%; top: 48%; width: 92px; height: 70px; border: 3px solid var(--red); border-radius: 50%; transform: translate(-50%, -50%) rotate(-10deg); pointer-events: none; }
.map-pin { position: absolute; left: calc(50% + 46px); top: calc(48% - 62px); color: var(--red); font-size: 1.15rem; transform: rotate(-4deg); background: rgb(255 255 255 / 0.85); padding: 2px 8px; border-radius: 6px; }
.map-card:hover .print { --r: 0.5deg; }
.map-print figcaption { padding-top: 6px; }

/* Stamps placed in context */
.label .hero-stamp { right: -44px; top: -18px; --s: 128px; --r: 12deg; }
@media (max-width: 560px) { .label .hero-stamp { --s: 84px; right: 4px; top: 6px; } }
.sheet .sheet-stamp { right: clamp(10px, 4vw, 40px); bottom: 70px; --s: 124px; --r: -12deg; }
@media (max-width: 560px) { .sheet .sheet-stamp { --s: 88px; bottom: 92px; right: 22px; } }

@media (prefers-color-scheme: dark) {
  .class-tabs button, .class-page { --tab: color-mix(in srgb, var(--c, #fff0a8) 26%, #141a2c); }
  .class-tabs button { color: var(--ink); }
  .class-page, .class-page .facts, .class-page .prose, .class-page .link-arrow { color: var(--ink) !important; }
  .class-page .age { color: var(--pen) !important; } .class-page .tick { color: var(--red); }
}

/* The parent's reply sits on the desk, not on the cover, so the back cover stays the only pink at the foot of the page */
#visit { background: var(--paper-2); color: var(--ink); }
#visit::before { display: none; }
#visit .reply-side h2 { color: var(--ink); }
#visit .reply-side .lede { color: var(--ink-2); }
#visit .ways a { background: var(--paper); border-color: color-mix(in srgb, var(--ink) 18%, transparent); color: var(--ink); }
#visit .ways a:hover { border-color: var(--cover); background: var(--paper); }
#visit .ways .i { color: var(--cover); }
#visit .oh-note { color: var(--pen); }
#visit .reply-form { box-shadow: 0 1px 0 rgb(var(--paper-shadow) / 0.08), 0 30px 60px -34px rgb(var(--paper-shadow) / 0.55); }

/* Rules belong to the notebook's own pages (sheets, spreads, divider pages, the reply slip); whole sections sit on the desk */
.sec.paper { background-image: none; background-color: var(--paper-2); }
.approach h3 .gloss { font: 500 1rem/1 var(--hand); color: var(--pen); margin-left: 8px; white-space: nowrap; }
.leaders .role { font: 500 1.08rem/1.4 var(--hand); color: var(--pen); margin-top: 2px; }
.place-prints { grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.place-prints .print:nth-child(2) { width: 100%; margin-top: 56px; }
@media (max-width: 520px) { .place-prints { grid-template-columns: 1fr; } .place-prints .print:nth-child(2) { margin-top: 0; } }

/* Review fixes */
.print .small, .map-print figcaption .small { color: #555b74; }
@media (max-width: 560px) { .tape.tl { left: -6px; } .tape.tr { right: -6px; } .tape.bl { left: -6px; } .tape.br { right: -6px; } }
.class-page .age-row { display: flex; gap: 10px; align-items: baseline; margin-top: 2px; }
.class-page .age-row .k { font: 600 0.95rem/var(--rule) var(--print); color: #3d4466; }
.parent-note .who { margin-top: 2px; }
.parent-note blockquote { margin-top: 4px; }
.entry.no-photo { grid-template-columns: 132px minmax(0, 1fr); }
@media (max-width: 760px) { .entry.no-photo { grid-template-columns: minmax(0, 1fr); } }
/* Divider pages: a pastel card with ruled lines, the section name on a white label, the margin note pinned beside it */
.divider { background-color: var(--tab, #fff6c7); background-image: linear-gradient(to bottom, transparent calc(var(--rule) - 1.5px), rgb(27 33 64 / 0.08) calc(var(--rule) - 1.5px), rgb(27 33 64 / 0.08) var(--rule)); background-size: 100% var(--rule); }
.divider .wrap { position: relative; }
.divider .sticker { position: relative; display: block; width: fit-content; margin-top: 14px; background: #fdfdfb; color: #1b2140; border-radius: 12px; padding: 18px 28px 20px; max-width: min(100%, 46rem); transform: rotate(-0.8deg); box-shadow: 0 1px 0 rgb(27 33 64 / 0.12), 0 18px 34px -20px rgb(27 33 64 / 0.5); }
.divider .sticker::before { content: ""; position: absolute; inset: 7px; border: 2px solid color-mix(in srgb, #c93a73 55%, #fdfdfb); border-radius: 8px; pointer-events: none; }
.divider .sticker h1 { margin-top: 0; }
.divider .sticker .lede { color: #3d4466; margin-top: 6px; }
.divider .hand-note { position: absolute; right: 0; top: 64px; bottom: auto; }
@media (max-width: 960px) { .divider .hand-note { position: static; margin-top: 18px; transform: rotate(-1.5deg); text-align: left; } }
@media (prefers-color-scheme: dark) { .divider { background-image: none; background-color: color-mix(in srgb, var(--tab) 22%, var(--paper)); } .divider .sticker { background: var(--paper); color: var(--ink); } .divider .sticker .lede { color: var(--ink-2); } }
/* Timetable as a ruled notebook page */
.tt-sheet { position: relative; background-color: var(--paper); border-radius: 4px; --margin-x: 96px; padding: calc(var(--rule) * 0.5) clamp(14px, 3vw, 32px) calc(var(--rule) * 1);
  background-image: linear-gradient(to bottom, transparent calc(var(--rule) - 1.5px), var(--rule-c) calc(var(--rule) - 1.5px), var(--rule-c) var(--rule)); background-size: 100% var(--rule);
  box-shadow: 0 1px 0 rgb(var(--paper-shadow) / 0.08), 0 28px 56px -32px rgb(var(--paper-shadow) / 0.5); }
.tt-sheet .tt { border: 0; background: transparent; }
.tt-sheet .tt thead th { background: transparent; border-bottom: 2px solid var(--ink); }
.tt-sheet .tt th, .tt-sheet .tt td { border-bottom: 0; padding-top: 6px; padding-bottom: 10px; }
.tt-sheet .tt tbody th { width: calc(var(--margin-x) - 16px); text-align: right; padding-right: 22px; }
@media (max-width: 640px) { .tt-sheet { --margin-x: 64px; } .tt-sheet .tt tr { grid-template-columns: calc(var(--margin-x) - 8px) 1fr; padding: 4px 0; border-bottom: 0; } .tt-sheet .tt tbody th { width: auto; padding-right: 14px; } }
/* Margin line on the spread pages and the class divider pages too */
.spread > .pg.margin { --margin-x: 34px; }
.class-page.margin { --margin-x: 26px; }
@media (max-width: 760px) { .spread > .pg.margin::before, .class-page.margin::before { left: 14px; } }
.oh-when .circled { position: relative; display: inline-block; padding: 4px 10px; }
.oh-when .circled::after { content: ""; position: absolute; inset: -4px -8px; border: 2.5px solid var(--red); border-radius: 48% 52% 46% 54% / 56% 44% 58% 42%; transform: rotate(-2deg); pointer-events: none; }
.oh .h-sub, .oh-when { padding-right: 0; }

/* Review round 2: the margin note is tucked against the label's corner; the phone stamp sits beside the signature, clear of the comment */
.divider .sticker-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 0; }
.divider .sticker-row .hand-note { position: relative; inset: auto; margin: 0 0 -6px -18px; transform: rotate(-5deg); text-align: left; max-width: 12em; z-index: 1;
  background: color-mix(in srgb, var(--tab, #fff6c7) 70%, #ffffff); padding: 4px 12px; border-radius: 4px; box-shadow: 0 6px 14px -8px rgb(27 33 64 / 0.35); }
@media (max-width: 960px) { .divider .sticker-row .hand-note { margin: 10px 0 0 12px; } }
@media (prefers-color-scheme: dark) { .divider .sticker-row .hand-note { background: color-mix(in srgb, var(--tab) 30%, var(--paper)); } }
@media (max-width: 560px) {
  .sheet .sheet-stamp { --s: 70px; bottom: 6px; right: 8px; top: auto; }
  .sheet .sign { padding-right: 72px; }
  .sheet { padding-bottom: calc(var(--rule) * 2); }
}
