/* The landing as a book (redesign/DESIGN.md): paper, ink, the editor's tomato pen. Zero radius; strokes draw, words ink in. */
html.book {
  --paper: oklch(98.4% 0.024 85);      /* #fff8e9 */
  --ink: oklch(23.5% 0 0);             /* #212121 */
  --pencil: oklch(49% 0.015 75);       /* #6b645a */
  --tomato: oklch(68.6% 0.165 35);     /* #f36c50: strokes, never text on paper */
  --pen: oklch(51% 0.16 33);           /* #b23a22: the co-founder's notes as text */
  --cobalt: oklch(51.5% 0.23 265);     /* #2752ed */
  --rule: color-mix(in oklch, var(--ink) 18%, var(--paper));
  --ease: cubic-bezier(.2, .7, .1, 1);
  --measure: 1360px;
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
@media (prefers-reduced-motion: reduce) { html.book { scroll-behavior: auto; } }
html.book body {
  background-color: var(--paper);
  /* the paper's grain: inline SVG noise, 4% ink */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .13 0 0 0 0 .12 0 0 0 0 .1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font: 400 1.125rem/1.55 var(--sans);
  font-variant-numeric: oldstyle-nums;
}
.book h1, .book h2, .book h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); text-wrap: balance; letter-spacing: -0.012em; }
.book p, .book li, .book dd { text-wrap: pretty; hanging-punctuation: first; }
.book a { color: var(--cobalt); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.book :focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.book .skip:focus { background: var(--ink); color: var(--paper); border-radius: 0; }

/* ---------- the running head: brand · chapter · folio links; a ribbon that grows with the read ---------- */
.running-head {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in oklch, var(--paper) 94%, transparent);
  border-bottom: 1px solid var(--ink);
  font: 500 0.8rem/1 var(--sans); font-stretch: 82%; text-transform: uppercase; letter-spacing: 0.14em;
}
@supports (backdrop-filter: blur(1px)) { .running-head { backdrop-filter: saturate(1.1) blur(6px); } }
.rh-brand { display: inline-flex; line-height: 0; }
.rh-brand img { width: 148px; height: auto; }
.rh-chapter { margin: 0; font: italic 400 1.15rem/1 var(--serif); text-transform: none; letter-spacing: 0; color: var(--pencil); }
.rh-nav { justify-self: end; display: flex; align-items: center; gap: 22px; }
.rh-link { color: var(--ink); text-decoration: none; background: none; border: 0; padding: 6px 0; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.book .rh-link { color: var(--ink); }
.rh-link:hover { text-decoration: underline; text-decoration-color: var(--tomato); text-decoration-thickness: 2px; }
.book .rh-start { background: var(--ink); color: var(--paper); text-decoration: none; padding: 9px 14px; }
.book .rh-start:hover { color: var(--tomato); }
.ribbon {
  position: absolute; right: clamp(16px, 4vw, 48px); top: 100%; width: 14px; height: 0;
  background: var(--tomato);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 7px), 0 100%);
}
@supports (animation-timeline: scroll()) {
  .ribbon { animation: ribbon linear both; animation-timeline: scroll(root); }
  @keyframes ribbon { from { height: 10px; } to { height: 120px; } }
}
@media (prefers-reduced-motion: reduce) { .ribbon { animation: none !important; height: 40px; } }

/* ---------- contents: a popover, like a book's table of contents ---------- */
.contents {
  margin: 64px clamp(16px, 4vw, 48px) auto auto; inset: 0 0 auto auto;
  width: min(420px, calc(100vw - 32px)); padding: 28px 32px 24px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 0;
  box-shadow: 8px 8px 0 color-mix(in oklch, var(--ink) 10%, transparent);
}
.contents::backdrop { background: color-mix(in oklch, var(--ink) 18%, transparent); }
.contents-title { margin: 0 0 14px; font: italic 400 2rem/1 var(--serif); }
.contents ol { list-style: none; margin: 0; padding: 0; }
.contents a { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; color: var(--ink); text-decoration: none; font: 400 1.25rem/1.2 var(--serif); }
.contents a::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted var(--pencil); transform: translateY(-4px); }
.contents a i { order: 2; font: 500 0.85rem var(--sans); font-style: normal; font-variant-numeric: lining-nums; color: var(--pencil); }
.contents a:hover span { text-decoration: underline; text-decoration-color: var(--tomato); }
@starting-style { .contents:popover-open { opacity: 0; translate: 0 -8px; } }
.contents { transition: opacity 0.3s var(--ease), translate 0.3s var(--ease), display 0.3s allow-discrete, overlay 0.3s allow-discrete; }

/* ---------- buttons: the pen, the ink block, the double rule ---------- */
.ink-btn, .pen-btn, .rule-btn {
  position: relative; display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px;
  font: 600 0.82rem/1 var(--sans); font-stretch: 80%; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border-radius: 0;
}
.book .ink-btn { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.ink-btn::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 9px; height: 2px; background: var(--tomato);
  transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease);
}
.ink-btn:hover::after, .ink-btn:focus-visible::after { transform: scaleX(1); }
.book .pen-btn { background: transparent; color: var(--pen); border: 0; padding: 0 2px; border-bottom: 2px solid var(--tomato); min-height: 40px; }
.book .pen-btn:hover { color: var(--ink); }
.book .rule-btn { background: none; border: 0; padding: 0 2px; color: var(--ink); border-bottom: 3px double var(--ink); min-height: 40px; }
.book .rule-btn:hover { border-bottom-color: var(--tomato); }
.book button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- the spread ---------- */
main { display: block; }
.spread {
  max-width: var(--measure); margin: 0 auto; padding: clamp(28px, 5vw, 72px) clamp(16px, 4vw, 48px) clamp(48px, 7vw, 96px);
  display: grid; grid-template-columns: minmax(0, 5fr) 1px minmax(0, 5fr) minmax(0, 2fr); column-gap: clamp(24px, 3.4vw, 56px);
}
.folio { margin: 0 0 22px; font: 500 0.74rem/1.3 var(--sans); font-stretch: 80%; letter-spacing: 0.18em; text-transform: uppercase; color: var(--pencil); font-variant-numeric: lining-nums; }
.gutter { background: var(--ink); opacity: 0.85; box-shadow: 10px 0 24px color-mix(in oklch, var(--ink) 7%, transparent), -10px 0 24px color-mix(in oklch, var(--ink) 4%, transparent); }
.cover h1 { margin: 0 0 22px; font-size: clamp(2.7rem, 5.6vw, 5.6rem); line-height: 0.96; letter-spacing: -0.025em; }
.cover h1 em { font-style: italic; color: var(--ink); background: linear-gradient(transparent 62%, color-mix(in oklch, var(--tomato) 42%, transparent) 62% 90%, transparent 90%); padding: 0 0.04em; }
.lede { margin: 0 0 30px; font-size: clamp(1.1rem, 1.35vw, 1.3rem); max-width: 31em; }

.notebook {
  margin: 0; padding: 16px 0 0; border-top: 1px solid var(--ink);
}
.nb-label { display: block; font: italic 400 1.1rem/1 var(--serif); color: var(--pencil); margin-bottom: 4px; }
.notebook textarea {
  display: block; width: 100%; resize: none; border: 0; padding: 0; margin: 0 0 20px;
  /* the notebook's ruling sits under each written line */
  background: repeating-linear-gradient(transparent 0 36px, color-mix(in oklch, var(--cobalt) 26%, transparent) 36px 37px, transparent 37px 38px) local;
  font: 400 clamp(1.45rem, 2.1vw, 1.9rem)/38px var(--serif); color: var(--ink); caret-color: var(--tomato);
}
.notebook textarea:focus-visible { outline: 0; box-shadow: inset 3px 0 0 var(--cobalt); padding-left: 10px; }
.nb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }

.page.right { display: flex; flex-direction: column; }
.facing { flex: 1; position: relative; }
.f-name { margin: 0; font-size: clamp(2.6rem, 4.4vw, 4.4rem); line-height: 1; font-style: italic; }
.f-tag { margin: 8px 0 26px; font-size: 1.1rem; color: var(--pencil); }
.f-store { display: grid; grid-template-columns: 56px 1fr; gap: 6px 16px; align-items: center; padding: 18px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.f-mark { width: 56px; height: 56px; grid-row: span 2; }
.f-mark path { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: miter; stroke-dasharray: 1; stroke-dashoffset: 0; }
.f-mark path + path { stroke: var(--tomato); }
.f-store b { display: block; font: 400 1.5rem/1.1 var(--serif); }
.f-store span { font-size: 0.92rem; color: var(--pencil); }
.f-buy { grid-column: 2; justify-self: start; margin-top: 4px; padding: 7px 12px; background: var(--ink); font: 600 0.72rem/1 var(--sans) !important; font-stretch: 80% !important; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper) !important; }
.f-tasks { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: t; }
.f-tasks li { position: relative; padding: 9px 0 9px 34px; border-bottom: 1px solid var(--rule); font-size: 1.02rem; }
.f-tasks li::before { content: ""; position: absolute; left: 0; top: 13px; width: 16px; height: 16px; border: 1.5px solid var(--ink); }
.f-tasks li::after { content: ""; position: absolute; left: 3px; top: 9px; width: 9px; height: 15px; border: solid var(--tomato); border-width: 0 3px 3px 0; transform: rotate(40deg) scale(var(--tick, 1)); transform-origin: bottom right; transition: transform 0.5s var(--ease); }
.f-tasks li:nth-child(n+3) { --tick: 0; }
.f-note { margin: 18px 0 0; font-size: 0.84rem; color: var(--pencil); max-width: 34em; }

.margin { padding-top: 120px; display: flex; flex-direction: column; gap: 34px; }
.note { margin: 0; font: italic 400 1.18rem/1.28 var(--serif); color: var(--pen); position: relative; padding-left: 16px; }
.note::before { content: ""; position: absolute; left: 0; top: 0.2em; bottom: 0.2em; width: 2px; background: var(--tomato); }

/* sketching: the facing page writes itself, line by line */
.facing.writing [data-f], .margin.writing .note { animation: ink-in 0.9s var(--ease) both; }
.facing.writing [data-f="tag"] { animation-delay: 0.25s; }
.facing.writing [data-f="product"] { animation-delay: 0.5s; }
.facing.writing [data-f^="t"] { animation-delay: calc(0.7s + var(--i, 0) * 0.15s); }
.margin.writing .note:nth-child(1) { animation-delay: 1.2s; }
.margin.writing .note:nth-child(2) { animation-delay: 1.6s; }
.margin.writing .note:nth-child(3) { animation-delay: 2s; }
.facing.writing .f-mark path { animation: draw 1.1s var(--ease) both 0.3s; }
@keyframes ink-in { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* ---------- films: a whole viewport of moving image, the chapter set over it ---------- */
.film { position: relative; margin: 0; height: 100svh; min-height: 520px; overflow: hidden; background: var(--ink); color: var(--paper); }
.film video, .film-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-still { display: none; }
.film::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, color-mix(in oklch, var(--ink) 72%, transparent)); pointer-events: none; }
.film figcaption {
  position: absolute; left: clamp(16px, 4vw, 48px); right: clamp(16px, 4vw, 48px); bottom: clamp(20px, 5vw, 56px); z-index: 1;
  display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: clamp(14px, 2.5vw, 32px);
}
.film-num { grid-row: span 2; font: italic 400 clamp(6rem, 18vw, 17rem)/0.78 var(--serif); color: var(--tomato); }
.film-title { font: 400 clamp(2rem, 5.2vw, 5rem)/1 var(--serif); text-wrap: balance; }
.film small { margin-top: 10px; font: 500 0.72rem/1.3 var(--sans); font-stretch: 80%; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.86; }
@supports (animation-timeline: view()) {
  .film video { animation: film-drift linear both; animation-timeline: view(); }
  @keyframes film-drift { from { transform: scale(1.12) translateY(-3%); } to { transform: scale(1) translateY(3%); } }
  .film figcaption { animation: ink-in linear both; animation-timeline: view(); animation-range: entry 40% cover 45%; }
}
@media (prefers-reduced-motion: reduce) {
  .film video { display: none; }
  .film-still { display: block; }
  .film figcaption { animation: none !important; }
}

/* ---------- chapters ---------- */
.week, .index, .errata, .editions, .bookplate-wrap { max-width: var(--measure); margin: 0 auto; padding: clamp(56px, 9vw, 140px) clamp(16px, 4vw, 48px); }
.chapter { margin: 0 0 clamp(28px, 4vw, 56px); font-size: clamp(2.8rem, 7.4vw, 7.5rem); line-height: 0.92; letter-spacing: -0.03em; }
.chapter span { font-style: italic; color: var(--pen); margin-right: 0.12em; }
.small-chapter { font-size: clamp(2rem, 4.6vw, 4.2rem); }
.sub { margin: 0 0 40px; max-width: 34em; font-size: 1.2rem; }

.steps-book { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 0; }
.steps-book li {
  counter-increment: s; display: grid; grid-template-columns: minmax(80px, 1.2fr) minmax(0, 6fr) minmax(0, 3fr); gap: 0 clamp(16px, 3vw, 48px); align-items: baseline;
  padding: 26px 0; border-top: 1px solid var(--ink); font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.35;
}
.steps-book li::before { content: counter(s, upper-roman) "."; font: italic 400 clamp(2.4rem, 4vw, 3.6rem)/1 var(--serif); color: var(--pen); }
.steps-book b { display: block; margin-bottom: 6px; font: 400 1.5em/1 var(--serif); }
.steps-book .note { font-size: 1.08rem; grid-column: 3; }
.steps-book li > p { grid-column: 2; margin: 0; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 32px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.days > div { padding: 14px 12px 18px; border-left: 1px solid var(--rule); font-size: 0.98rem; line-height: 1.25; }
.days > div:first-child { border-left: 0; }
.days i { display: block; font: italic 400 3rem/1 var(--serif); color: var(--ink); margin-bottom: 8px; font-variant-numeric: lining-nums; }
.days > div:nth-child(5) i { color: var(--pen); }
@supports (animation-timeline: view()) {
  .steps-book li, .days > div, .index-list > div, .errata li, .ed-list article { animation: ink-in linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
}
@media (prefers-reduced-motion: reduce) {
  .steps-book li, .days > div, .index-list > div, .errata li, .ed-list article, .facing.writing [data-f], .margin.writing .note, .facing.writing .f-mark path { animation: none !important; }
}

/* the index: term, leaders, where it stops */
.index-list { margin: 0; columns: 2 420px; column-gap: clamp(32px, 5vw, 80px); column-rule: 1px solid var(--rule); }
.index-list > div { break-inside: avoid; padding: 18px 0 20px; border-bottom: 1px solid var(--rule); }
.index-list dt { display: flex; align-items: baseline; gap: 10px; font: 400 clamp(1.7rem, 2.6vw, 2.4rem)/1.1 var(--serif); }
.index-list dt::after { content: ""; flex: 1; border-bottom: 2px dotted var(--pencil); transform: translateY(-6px); }
.index-list dd { margin: 6px 0 0; color: var(--pencil); font-size: 1.05rem; }

/* errata: a corrected proof */
.errata { padding-top: 0; }
.errata-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(28px, 5vw, 80px); border-top: 2px solid var(--ink); padding-top: 28px; }
.errata h3 { margin: 0 0 14px; font-size: 1.9rem; font-style: italic; }
.errata ul { margin: 0; padding: 0; list-style: none; }
.errata li { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 1.1rem; }
.struck s { text-decoration: line-through; text-decoration-color: var(--tomato); text-decoration-thickness: 3px; color: var(--ink); }
.struck em { display: block; margin-top: 2px; font: italic 400 1.22rem/1.3 var(--serif); color: var(--pen); }

/* editions: a book's edition page, not price cards */
.ed-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.ed-list article { padding: 26px clamp(16px, 2.4vw, 36px) 30px; border-left: 1px solid var(--ink); }
.ed-list article:first-child { border-left: 0; padding-left: 0; }
.ed-list h3 { margin: 0; font-size: clamp(2.6rem, 4.4vw, 4.2rem); line-height: 1; }
.ed-list article:nth-child(2) h3 { font-style: italic; }
.ed-price { margin: 10px 0 14px; font: italic 400 1.2rem var(--serif); color: var(--pen); }
.ed-list p:last-child { margin: 0; color: var(--ink); font-size: 1.02rem; }

/* the bookplate: sign the first page */
.bookplate-wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.bookplate { position: relative; padding: clamp(32px, 4vw, 60px); background: var(--paper);
  /* a bookplate's double frame, drawn inside so the dog-ear's clip keeps both rules */
  box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 7px var(--paper), inset 0 0 0 8px var(--ink);
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%); }
.bookplate::after { content: ""; position: absolute; top: 0; right: 0; width: 34px; height: 34px; background: linear-gradient(225deg, transparent 50%, color-mix(in oklch, var(--ink) 14%, var(--paper)) 50%); }
.ex-libris { margin: 0; font: italic 400 1.3rem var(--serif); color: var(--pen); }
.bookplate h2 { margin: 2px 0 6px; font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 1; }
.plate-sub { margin: 0 0 22px; color: var(--pencil); font-size: 0.98rem; }
.line { display: block; margin: 0 0 18px; font: 500 0.74rem/1.2 var(--sans); font-stretch: 80%; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pencil); }
.line small { text-transform: none; letter-spacing: 0; font: italic 400 0.95rem var(--serif); margin-left: 6px; }
.line input, .line textarea {
  display: block; width: 100%; margin-top: 4px; padding: 6px 0 7px; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent;
  font: 400 1.4rem/1.3 var(--serif); color: var(--ink); text-transform: none; letter-spacing: 0; resize: vertical;
}
.line input::placeholder, .line textarea::placeholder { color: var(--pencil); font-style: italic; }
.line input:focus-visible, .line textarea:focus-visible { outline: 0; border-bottom: 2px solid var(--cobalt); padding-bottom: 6px; }
.book .error { color: var(--pen); font: italic 400 1.1rem var(--serif); }
.signin { padding-top: 24px; border-top: 2px solid var(--ink); }
.signin h3 { margin: 0 0 18px; font-size: 1.9rem; font-style: italic; }

/* ---------- colophon ---------- */
.colophon { max-width: var(--measure); margin: 0 auto; padding: 40px clamp(16px, 4vw, 48px) 56px; border-top: 1px solid var(--ink); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px 40px; align-items: baseline; font-size: 0.92rem; color: var(--pencil); }
.colophon p { margin: 0; }
.colo-mark img { width: 148px; height: auto; }
.book .langbtn { margin-left: 10px; padding: 6px 10px; font: 600 0.85rem var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 0; cursor: pointer; }
.book dialog#lang-dialog { border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); padding: 28px 32px; }
.book dialog#lang-dialog h2 { margin: 0 0 12px; font-style: italic; }
.book .langlist a { border-radius: 0; color: var(--ink); font: 400 1.3rem var(--serif); }
.book .langlist a[aria-current="true"] { background: none; color: var(--pen); text-decoration: underline; text-decoration-color: var(--tomato); }

/* ---------- 1100 and below: the margin moves under the spread ---------- */
@media (max-width: 1100px) {
  .spread { grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); }
  .margin { grid-column: 1 / -1; padding-top: 36px; flex-direction: row; gap: 28px; }
  .margin .note { flex: 1; }
}
/* ---------- 768 ---------- */
@media (max-width: 860px) {
  .rh-chapter { display: none; }
  .running-head { grid-template-columns: 1fr auto; }
  .spread { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .gutter { height: 1px; }
  .margin { flex-direction: column; gap: 18px; padding-top: 0; }
  .steps-book li { grid-template-columns: 64px minmax(0, 1fr); }
  .steps-book .note { grid-column: 2; margin-top: 10px; }
  .days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .days > div:nth-child(5) { border-left: 0; }
  .days > div:nth-child(n+5) { border-top: 1px solid var(--rule); }
  .errata-cols, .bookplate-wrap { grid-template-columns: minmax(0, 1fr); }
  .ed-list { grid-template-columns: minmax(0, 1fr); }
  .ed-list article { border-left: 0; padding-left: 0; border-bottom: 1px solid var(--ink); }
  .colophon { grid-template-columns: minmax(0, 1fr); }
  .film { height: 88svh; }
}
/* ---------- 390 and 320 ---------- */
@media (max-width: 480px) {
  html.book body { font-size: 1.0625rem; }
  .running-head { padding: 10px 14px; gap: 10px; }
  .rh-brand img { width: 118px; }
  .rh-nav { gap: 14px; }
  .rh-nav #signin-link { display: none; }
  .book .rh-start { padding: 8px 10px; }
  .ribbon { right: 14px; }
  .cover h1 { font-size: clamp(2.35rem, 11.5vw, 3.2rem); }
  .notebook textarea { font-size: 1.3rem; }
  .nb-actions .ink-btn { order: -1; width: 100%; justify-content: center; }
  .film { height: 78svh; min-height: 440px; }
  .film video, .film-still { object-position: 50% 50%; }
  .film-num { font-size: 6.4rem; }
  .film-title { font-size: 2rem; }
  .chapter { font-size: clamp(2.5rem, 13vw, 3.4rem); }
  .days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .days > div:nth-child(odd) { border-left: 0; }
  .days > div:nth-child(5) { border-left: 1px solid var(--rule); }
  .days > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .days > div:nth-child(7) { border-left: 0; }
  .index-list dt { font-size: 1.6rem; }
  .bookplate { padding: 24px 18px; }
  .line input, .line textarea { font-size: 1.2rem; }
  .contents { margin-top: 56px; padding: 22px 20px; }
}
@media (max-width: 340px) {
  .rh-nav button.rh-link { font-size: 0.72rem; }
  .cover h1 { font-size: 2.15rem; }
  .film-num { font-size: 5rem; }
}

/* ---------- Simplified Chinese: the house faces for Latin, a Song serif and a Hei sans for Han; no fake italics ---------- */
html.book:lang(zh-Hans) { --serif: "Instrument Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif; --sans: "Instrument Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
html.book:lang(zh-Hans) :is(.note, .f-name, .rh-chapter, .chapter span, .struck em, .ed-price, .ex-libris, .contents-title, .errata h3, .signin h3, .nb-label, .cover h1 em) { font-style: normal; }
html.book:lang(zh-Hans) .cover h1 { letter-spacing: 0; line-height: 1.12; }
html.book:lang(zh-Hans) .small-chapter { font-size: clamp(1.8rem, 4vw, 3.4rem); line-height: 1.2; }
