/* Editorial identity: typography, rules, open space. Shared across both pages. */
:root{--brand:#2449eb;--brand-deep:#1834b2;--brand-soft:#eef1ff;--brand-line:#acbaff;--brand-hit:#cad3ff;--bg:#fafafa;--ink:#191919;--muted:#6e6e73;--line:#dedee2;--ui-ink:#191919;--ui-muted:#6e6e73;--ui-border:#d4d4da;--ui-radius:2px;--error:#d33343}
body{background:var(--bg);color:var(--ink)}
:root{--page-width:1160px}
.wrap{max-width:var(--page-width);width:calc(100% - 96px)}
.site-header-bar{border-top:0;border-bottom:1px solid #191919;background:#fafafaf5;box-shadow:none;backdrop-filter:blur(10px)}
body .site-header{height:88px;min-height:88px;padding-block:16px}
.site-header .brand{gap:10px}
:root body .ui-button.ui-button{--button-face:transparent;--button-hover:#eeeef1;--button-ink:#191919;--button-border:#c6c6cd;display:inline-flex;min-height:46px;padding:12px 20px;border-radius:2px;background:var(--button-face);color:var(--button-ink);border:1px solid var(--button-border);box-shadow:none;font-size:14px;font-weight:550;gap:14px;transition:background .18s,color .18s,border-color .18s,transform .18s}
:root body .ui-button.ui-button--primary{--button-face:var(--brand);--button-hover:var(--brand-deep);--button-ink:white;--button-border:var(--brand);padding:15px 24px}
:root body .site-header .ui-button{min-height:40px;padding:9px 13px;border-color:transparent;border-radius:2px;font-size:13px}
:root body .site-header .ui-button--primary{border-color:var(--brand)}
:root body .ui-button.ui-button:hover{background:var(--button-hover);color:var(--button-ink);transform:none;box-shadow:none}
:root body .ui-button.ui-button:active{transform:translateY(1px);box-shadow:none}
:root body .ui-button[aria-pressed=true],:root body details[open]>.ui-button{background:var(--brand-soft);color:var(--brand);box-shadow:none;border-color:transparent}
.editorial-overline{display:flex;justify-content:space-between;gap:20px;font-size:11px;font-weight:550;letter-spacing:1.1px;color:#66666e}
body .footer{border-top:0;color:#88888e;font-size:11px;margin-top:24px}
/* Practice: the sentence itself is the main surface. */
body:not(.home-page) .practice{padding-top:28px}
.rhythm-panel .rhythm{height:64px;margin-bottom:24px}
.rhythm-panel .rhythm i{background:var(--brand);border-radius:0}
#cpm{color:var(--brand)}
.writing-area{background:#fff;background-image:none;border:0;border-block:1px solid #191919;border-radius:0;box-shadow:none;padding:25px 0 20px;min-height:310px}
.writing-area:before,.writing-area:after,.current:before{display:none}
.typing-surface .passage{font-size:clamp(28px,3.3vw,44px);padding:38px 0 32px;gap:24px;letter-spacing:-1.2px}
.writing-area .current{background:none;padding:0;color:#94949e;line-height:1.65}
.current .char.correct{color:#191919}.current .char.composing{background:var(--brand-soft);color:var(--brand);border-color:var(--brand)}
.current .char.cursor:before,.current.at-end:after{background:var(--brand)}
/* Shared panels retain the same typographic hierarchy. */
dialog{background:#fafafa;border-radius:2px;border:1px solid #191919;box-shadow:0 24px 80px #0002}
dialog::backdrop{background:#12122266;backdrop-filter:blur(3px)}
@media(max-width:900px){.wrap{width:calc(100% - 48px)}}
@media(max-width:600px){.wrap{width:calc(100% - 36px)}body .site-header{height:auto;min-height:76px;gap:12px}.site-header nav{gap:3px;flex-wrap:wrap}.editorial-overline{font-size:9px;letter-spacing:.6px}.writing-area{padding:20px 0;min-height:290px}.typing-surface .passage{font-size:28px;letter-spacing:-.8px;padding:30px 0}}
@media(prefers-reduced-motion:reduce){:root body .ui-button.ui-button{transition:none;transform:none}}

.writing-area:focus-within{border-color:#191919;box-shadow:none}
@media(min-width:761px) and (max-height:800px){body .site-header{height:72px;min-height:72px}body:not(.home-page) .practice{padding-top:20px}.rhythm-panel .rhythm{height:52px;margin-bottom:14px}.writing-area{min-height:260px;padding-block:20px 16px}.typing-surface .passage{padding:26px 0 24px;font-size:36px}}

/* One type family, with distinct display, reading and UI roles. */
:root{--type-reading-weight:450;--type-ui-weight:500}
body{font-family:var(--font);font-weight:400;font-synthesis:none}
.typing-surface .passage{font-family:var(--font);font-weight:var(--type-reading-weight);letter-spacing:-.025em}
.writing-area .current{line-height:1.65}
:root body .ui-button.ui-button{font-family:var(--font);font-weight:var(--type-ui-weight);letter-spacing:-.015em}

/* Keep the text comfortably inset while preserving the outer page grid. */
.writing-area{--writing-inset:32px;padding-inline:var(--writing-inset)}
@media(max-width:600px){.writing-area{--writing-inset:20px}}

.footer-links{display:flex;align-items:center;flex-wrap:wrap;gap:24px}
.footer-links a{color:var(--ink);text-decoration:none;border-bottom:1px solid transparent;padding-block:4px}
.footer-links a:hover{color:var(--brand);border-bottom-color:var(--brand)}
@media(max-width:600px){.footer-links{gap:12px}}

/* Identity audit: secondary states must use the same palette and rules. */
:root body .ui-button.ui-button[aria-pressed=true],
:root body details[open]>.ui-button.ui-button{background:var(--brand-soft);border-color:var(--brand-line);color:var(--brand);box-shadow:none}
:root body .ui-button.ui-button:disabled{opacity:.45;transform:none;box-shadow:none;cursor:not-allowed}
.design-book-page .site-header nav{width:auto}
@media(prefers-reduced-motion:reduce){
  :root body .ui-button.ui-button:hover,:root body .ui-button.ui-button:active{transform:none}
}

/* The brand signature is drawn artwork, independent of installed fonts. */
.brand-lockup{display:block;width:170px;height:36px;max-width:100%;object-fit:contain}
.site-header .brand{min-height:44px;gap:0}

/* Home is a short invitation; the design book carries the longer explanation. */

/* A typographic rhythm instrument: live waveform above a short keystroke trace. */
.rhythm-panel{border-top:0;border-bottom:1px solid var(--ui-border);padding:14px 0 12px;margin:0 0 18px}
.rhythm-panel[hidden],.practice:has(.writing-area.is-complete) .rhythm-panel{display:none}
.rhythm-plot{position:relative;margin:14px 0 12px;background:linear-gradient(#dfe3f1,#dfe3f1) center / 100% 1px no-repeat,repeating-linear-gradient(90deg,transparent 0,transparent calc(12.5% - 1px),#e8e9ef calc(12.5% - 1px),#e8e9ef 12.5%);border-inline:1px solid #e8e9ef}
.rhythm-panel .rhythm{width:100%;height:88px;padding:0 5px;gap:clamp(4px,.8vw,11px);margin:0;display:flex;align-items:center}
.rhythm-panel .rhythm i{--rhythm-height:76px;flex:1;max-width:none;height:3px;background:var(--brand);opacity:.4;border-radius:0}
.rhythm-playhead{position:absolute;top:0;bottom:0;width:1px;background:var(--brand);opacity:.35;pointer-events:none}
.rhythm-playhead:before{content:'';position:absolute;top:-3px;left:-2px;width:5px;height:3px;background:var(--brand)}
@media(max-width:600px){.rhythm-panel{padding:12px 0 10px;margin-bottom:10px}.rhythm-panel .rhythm{height:72px;gap:4px}.rhythm-panel .rhythm i{--rhythm-height:60px}}
@media(min-width:761px) and (max-height:800px){.rhythm-panel .rhythm{height:64px}.rhythm-panel .rhythm i{--rhythm-height:56px}.rhythm-panel{margin-bottom:8px}.rhythm-plot{margin-block:10px}}

/* Compact demonstration of the same rhythm instrument on the home page. */
.rhythm-preview{min-width:0;margin:0;border-top:0;border-bottom:0;padding:0}
.rhythm-preview .rhythm{height:64px;gap:3px;padding-inline:2px}
.rhythm-preview .rhythm i{--rhythm-height:34px;height:3px;opacity:.4;animation:none}
@media(max-width:900px){.rhythm-preview{grid-column:1 / -1;border-top:1px solid var(--line);padding-top:18px}.rhythm-preview .rhythm{gap:5px}}
@media(prefers-reduced-motion:reduce){.rhythm-preview .rhythm i{animation:none}}

/* A single, centered entry point: no navigation bar or competing start actions. */

/* Inline home selector reuses the dialog's list without adding an extra step. */

/* Home and practice share an outer grid; the entry controls stay readable. */

/* Spread the introduction and the action across the shared editorial grid. */

/* Letter specimen links the introduction to the start controls. */

/* Dropdown options overlay the settings content without resizing its panel. */

/* Every select uses the same trigger and floating option list. */
/* Keep the floating list within the compact dialog viewport. */

/* A fixed icon box avoids the baseline offset of a text arrow. */

/* Story selection uses the same anchored layer pattern as settings. */
/* Let the story dropdown extend beyond its containing header layer. */

/* Home rhythm is a compact supporting preview beside the introduction. */

/* Reading and starting share the left column; the right is a visual preview. */
/* Balance the two columns around a shared visual center. */

/* Display lettering shares the logo’s geometric, even-weight strokes. */

/* The rhythm label uses the same drawn letterforms as the brand headline. */

/* The public address balances the logo across the shared page width. */

/* Editorial progress markers and restrained tactile accents. */
.writing-stage{display:grid;grid-template-columns:110px minmax(0,1fr);gap:28px;align-items:start}
@media(max-width:700px){.writing-stage{grid-template-columns:1fr;gap:0}.typing-surface .passage{padding-top:20px}}

/* History is a full page using the same outer grid and replay component. */

/* Navigation variant: typographic emphasis, never a filled tab or raised pill. */
:root body .ui-button.ui-button:disabled{pointer-events:none;opacity:.4;box-shadow:none;transform:none}
:root body .ui-button.ui-button:focus-visible{outline:2px solid var(--brand);outline-offset:4px}

/* Pagination follows the shared, underlined navigation treatment. */

/* Entry motion: home on each load, practice once per tab; always interactive. */
@keyframes entry-fade{from{opacity:.25}to{opacity:1}}
[data-entrance=practice] .writing-stage{animation:entry-fade 180ms ease-out both}
@media(prefers-reduced-motion:reduce){[data-entrance] *,[data-entrance] *::before,[data-entrance] *::after{animation:none!important;transition:none!important}}

/* Shared editorial reading card, also used by the design book. */

/* Home: a compact practice preview leads into the start flow on the right. */

/* Keep choosing a text and starting together, before its reading preview. */

/* The sample types in lockstep with the waveform, directly beneath it. */

/* A real sentence keeps the preview close to the practice reading surface. */

/* Shared destructive action: quiet trigger, explicit inline confirmation. */

/* Record actions share one baseline; confirmation stays within the same area. */

/* Board detail: header, metadata, content, then actions. */

/* The preview rises into the active reading position without delaying input. */

/* Three reading rows advance together; only the active sentence is prominent. */
.writing-stage .typing-surface{margin-block:0}
.typing-surface .passage{overflow:hidden;gap:6px;padding:0 4px 24px;margin-inline:-4px}

/* Match the caret to the glyph, not the full line box. */
.writing-area .current .char.cursor:before{top:.325em;height:1em;width:2px}
.writing-area .current.at-end:after{height:1em;vertical-align:-.12em}

/* Keep the finished text until the user requests the inline result. */
.writing-area.is-finishing .current .char{color:var(--ink)}
.writing-area.is-finishing .current .char.cursor:before,.writing-area.is-finishing .current.at-end:after{display:none}

/* A quiet keyboard drawing in the unused editorial margin. */

/* Sentence-by-sentence progress, preserving a visible break between lines. */
/* Keep the keyboard quiet until a key is actually pressed. */

/* Compact only the practice rhythm; keep the established page layout. */
.practice>.rhythm-panel{padding:12px 0 10px;margin-bottom:14px}
.practice>.rhythm-panel .rhythm-plot{margin:10px 0}
.practice>.rhythm-panel .rhythm{height:72px}
.practice>.rhythm-panel .rhythm i{--rhythm-height:62px}
@media(max-width:600px){.practice>.rhythm-panel{padding:10px 0 8px;margin-bottom:10px}.practice>.rhythm-panel .rhythm{height:64px}.practice>.rhythm-panel .rhythm i{--rhythm-height:54px}}
@media(min-width:761px) and (max-height:800px){.practice>.rhythm-panel{margin-bottom:8px}.practice>.rhythm-panel .rhythm{height:56px}.practice>.rhythm-panel .rhythm i{--rhythm-height:48px}}

/* Shared compact GNB: retain one row and hide only menu labels. */
@media(max-width:600px){
  body .site-header{position:relative;flex-direction:row;flex-wrap:nowrap;align-items:center;height:72px;min-height:72px;padding-block:12px;gap:12px}
  .site-header .brand{min-width:0;min-height:36px;padding-right:0;flex-shrink:1}
  .site-header .brand-lockup{width:140px;height:auto}
  body:not(.home-page) .site-header nav,.design-book-page .site-header nav{width:auto;flex-shrink:0;gap:0;flex-wrap:nowrap;align-items:center}
  .site-header nav .nav-label{display:none}
  :root body .site-header nav>a.ui-button{width:44px;height:44px;min-height:44px;padding:0;gap:0;justify-content:center}
  .site-header nav>a .ui-icon{width:20px;height:20px}

  html{scroll-padding-top:96px}
}

/* Sticky header retains its layout space while moving out of the viewport. */
.site-header-bar{transition:transform 180ms ease-out}
.site-header-bar.is-scroll-hidden{transform:translateY(-100%);pointer-events:none}
@media(prefers-reduced-motion:reduce){.site-header-bar{transition:none}}

/* Whole-text practice: shared type, spacing and progress-rule system. */
.whole-text-practice,.whole-text-sample{--reading-size:40px;--reading-leading:1.4;--sentence-gap:0px;--section-gap:32px;}
body.whole-text-practice .practice{display:flex;flex-direction:column;gap:0;padding:48px 0 0}
.whole-text-practice .site-header,.whole-text-practice .site-header-bar{border:0;box-shadow:none}
.rhythm-panel .rhythm{gap:clamp(1px,.3vw,4px);padding-inline:0}
.whole-text-practice .rhythm-panel,.whole-text-sample .rhythm-panel{order:0;height:1px;min-height:0;margin:0 0 var(--section-gap);padding:0;border:0;overflow:visible}
body.whole-text-practice .practice>.rhythm-panel .rhythm-plot,.whole-text-sample .rhythm-plot{height:1px;margin:0;border:0;background:var(--line);overflow:visible}
.whole-text-practice .rhythm-panel .rhythm,.whole-text-sample .rhythm-panel .rhythm{position:absolute;inset:-32px 0 auto;height:64px;align-items:center;margin:0;overflow:visible}
.whole-text-practice .rhythm-panel .rhythm i,.whole-text-sample .rhythm-panel .rhythm i{--rhythm-height:48px;--rhythm-rest-height:0px;--rhythm-rest-opacity:0;height:0;opacity:0}
.whole-text-practice .rhythm-playhead:not([hidden]),.whole-text-sample .rhythm-playhead:not([hidden]){display:block;top:-24px;bottom:auto;height:48px;width:1px;background:var(--brand);opacity:.5;transform:translateX(-.5px);z-index:2}
.whole-text-practice .rhythm-playhead::before,.whole-text-sample .rhythm-playhead::before{content:"";position:absolute;top:-3px;left:-2px;width:5px;height:3px;background:var(--brand)}
.whole-text-practice .writing-area{order:1;border:0;background:transparent;padding:0;margin:0;min-height:0}
.whole-text-practice .writing-stage{display:block}
.whole-text-practice .typing-surface{border:0;padding:0}
.whole-text-practice .passage,.whole-text-sample .passage{display:flex;flex-direction:column;gap:var(--sentence-gap);padding:0;margin:0;font-size:var(--reading-size);overflow:visible}
.whole-text-practice .manuscript-line,.whole-text-sample .manuscript-line{font-size:inherit;line-height:var(--reading-leading);margin:0;font-weight:400;letter-spacing:0;opacity:1;white-space:normal}
.manuscript-line .char{display:inline-block;min-width:.3em;letter-spacing:0;white-space:pre}
.manuscript-line.pending-line,.whole-text-practice .manuscript-line.current,.whole-text-sample .manuscript-line.current{color:#a0a0a8}
.manuscript-line.completed-line{color:#666}
.whole-text-practice .manuscript-line.current .char.correct{color:var(--ink)}
.whole-text-practice .manuscript-line.current .char.composing{color:var(--brand)}
.whole-text-practice .manuscript-line.current .char.wrong{color:var(--error)}
.whole-text-practice .current .char.cursor:before{top:.175em;height:1em}
.whole-text-practice .writing-area.is-finishing .manuscript-line{font-size:inherit;margin:0}
.whole-text-practice .stats{display:flex;width:100%;margin:0;padding:0;justify-content:flex-start;align-items:baseline;gap:12px 24px;flex-wrap:wrap}
.whole-text-practice #cpm{color:inherit}
.whole-text-practice .footer{margin-top:16px;padding-block:8px 20px}
.whole-text-sample{padding-top:40px}
@media(max-width:600px){
 .whole-text-practice,.whole-text-sample{--reading-size:28px;--section-gap:24px;}
 body.whole-text-practice .practice{padding-top:32px}
 .whole-text-practice .stats{gap:8px 24px}

 .whole-text-practice .footer{margin-top:12px}
}
/* Shared home-preview waveform, without labels or the lower trace. */
.whole-text-practice .rhythm-panel,.whole-text-sample .rhythm-panel{height:auto;margin-bottom:var(--section-gap)}
body.whole-text-practice .practice>.rhythm-panel .rhythm-plot,.whole-text-sample .rhythm-plot{height:64px;margin:0;border-inline:1px solid #e8e9ef;background:linear-gradient(#dfe3f1,#dfe3f1) center / 100% 1px no-repeat,repeating-linear-gradient(90deg,transparent 0,transparent calc(12.5% - 1px),#e8e9ef calc(12.5% - 1px),#e8e9ef 12.5%);overflow:hidden}
.whole-text-practice .rhythm-panel .rhythm,.whole-text-sample .rhythm-panel .rhythm{position:relative;inset:auto;height:64px;padding:0 2px;gap:3px;justify-content:normal;overflow:hidden}
.whole-text-practice .rhythm-panel .rhythm i,.whole-text-sample .rhythm-panel .rhythm i{--rhythm-height:34px;--rhythm-rest-height:3px;--rhythm-rest-opacity:.4;flex:1;width:auto;max-width:none;height:3px;opacity:.4}
.whole-text-practice .rhythm-playhead:not([hidden]),.whole-text-sample .rhythm-playhead:not([hidden]){top:0;bottom:0;height:auto;opacity:.35;transform:none}
/* Separate the shared rhythm from the reading area without boxing it in. */
.rhythm-panel.rhythm-preview,.whole-text-practice .practice>.rhythm-panel,.whole-text-sample .rhythm-panel{border-bottom:1px solid var(--line);padding-bottom:16px}

/* Completion is the final paragraph of the page; results are a quiet report. */

/* The title is the first editable line in the same manuscript. */
.whole-text-practice .manuscript-line.manuscript-title,.whole-text-sample .manuscript-line.manuscript-title{font-size:48px;line-height:1.25;font-weight:600;letter-spacing:-.025em;margin:0 0 24px}
.whole-text-practice .manuscript-title.completed-line,.whole-text-sample .manuscript-title.completed-line{color:var(--ink)}
.whole-text-practice .manuscript-title .char.cursor:before{top:.125em}
@media(max-width:600px){.whole-text-practice .manuscript-line.manuscript-title,.whole-text-sample .manuscript-line.manuscript-title{font-size:34px;margin-bottom:16px}}
.whole-text-sample .stats{display:flex;justify-content:flex-start;margin:0;padding:0}

/* White notebook paper: shared by the live manuscript and design book. */
.whole-text-practice .writing-area.notebook-sheet,.whole-text-sample .notebook-sheet{
 --paper-inset:48px;--paper-rail:24px;
 padding:32px var(--paper-inset) 40px;
 background:linear-gradient(to right,transparent var(--paper-rail),#e0e5f5 var(--paper-rail),#e0e5f5 calc(var(--paper-rail) + 1px),transparent calc(var(--paper-rail) + 1px)),#fff;
 border:1px solid #e7e8ec;border-radius:0;box-shadow:none;
}

.whole-text-practice .notebook-sheet .manuscript-title,.whole-text-sample .notebook-sheet .manuscript-title{
 padding-bottom:20px;margin-bottom:16px;border-bottom:1px solid #dfe3ec;
}
@media(max-width:600px){
 .whole-text-practice .writing-area.notebook-sheet,.whole-text-sample .notebook-sheet{
  --paper-inset:20px;--paper-rail:9px;padding:24px var(--paper-inset) 28px;
 }
 .whole-text-practice .notebook-sheet .manuscript-title,.whole-text-sample .notebook-sheet .manuscript-title{padding-bottom:16px;margin-bottom:12px}
}

/* Quiet address signature, aligned with the brand and page edges. */
.site-header .site-address{margin-left:auto;flex-shrink:0;white-space:nowrap;font-size:14px;line-height:1.5;font-weight:500;letter-spacing:.015em;color:var(--muted);text-decoration:none}
.site-header .site-address span{font-weight:400}
.site-header .site-address:hover{color:var(--brand)}
.site-header .site-address:focus-visible{outline:2px solid var(--brand);outline-offset:5px}
@media(max-width:600px){.site-header .site-address{font-size:12px;letter-spacing:0}}

/* Compact session totals sit above the wave, on the same left edge. */

.reading-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;order:3;margin-top:20px;width:100%}
.reading-navigation .ui-button{font-size:13px;white-space:nowrap}
.whole-text-practice .reading-passage[hidden],.whole-text-practice #input-shell[hidden]{display:none!important}
.whole-text-practice .reading-passage .manuscript-line{color:var(--ink)}
@media(max-width:600px){.reading-navigation{gap:8px}.reading-navigation .ui-button{font-size:12px}}

/* An inert paper leaf turns over the live page without moving its input. */
.notebook-sheet{position:relative;isolation:isolate}
.whole-text-practice .writing-area.notebook-sheet.page-turn-leaf,
.whole-text-sample .notebook-sheet.page-turn-leaf{position:absolute;inset:0;z-index:5;box-sizing:border-box;width:100%;margin:0;pointer-events:none;backface-visibility:hidden;overflow:hidden;border:0;box-shadow:none}
.page-turn-leaf::after{display:none}
@media(prefers-reduced-motion:reduce){.page-turn-leaf{display:none!important}}

.save-notice{order:4;margin-top:12px;font-size:12px;color:var(--muted)}
.reading-passage h2{font-size:28px;line-height:1.4;color:var(--ink);margin:0 0 16px}.reading-passage p{font-size:16px;line-height:1.7;color:var(--muted);margin:0}

/* The cover is the first sheet, not a separate landing page. */
.whole-text-practice.is-cover .practice>.writing-area{display:none}
.whole-text-practice .practice>.notebook-shelf{order:1}
.whole-text-practice.is-cover .rhythm-playhead,.whole-text-practice .writing-area:has(.reading-passage:not([hidden])) .rhythm-playhead{visibility:hidden}
.notebook-cover[hidden]{display:none!important}
.notebook-cover{box-sizing:border-box;position:relative;margin:40px 0 0;padding:36px 48px 32px 64px;min-height:480px;display:flex;flex-direction:column;background:#f2f4fa;border:1px solid #dce1ef;border-radius:2px;color:var(--ink);isolation:isolate}
.notebook-cover:before{content:"";position:absolute;inset:0 auto 0 24px;width:1px;background:#d4daeb}
.cover-edition{display:flex;justify-content:space-between;gap:16px;font-size:11px;font-weight:500;letter-spacing:.12em;color:var(--muted)}
.cover-title-block{padding:42px 0 44px}
.cover-title-block h2{font-size:clamp(38px,4.5vw,60px);line-height:1.2;font-weight:600;letter-spacing:-.045em;margin:0 0 20px;color:var(--ink)}
.cover-title-block p{font-size:16px;line-height:1.7;letter-spacing:-.015em;margin:0;color:var(--muted)}
.cover-bottom{margin-top:auto;padding-top:24px;border-top:1px solid #d4daeb;display:flex;justify-content:space-between;align-items:center;gap:24px}
.cover-bottom .ui-button{gap:24px}
@media(max-width:600px){.notebook-cover{margin-top:24px;padding:24px 24px 24px 36px;min-height:480px}.notebook-cover:before{left:14px}.cover-edition{font-size:9px;letter-spacing:.06em}.cover-title-block{padding-block:36px}.cover-bottom{align-items:flex-start;flex-direction:column;gap:18px}.cover-bottom .ui-button{width:100%;justify-content:space-between}}

/* Branding belongs on the notebook cover; the writing page has no header. */
.cover-brand{margin-bottom:32px}
.cover-brand .brand{display:inline-flex}
.cover-brand .brand-lockup{width:204px;height:auto;max-width:100%}
.cover-edition .site-address{font-size:12px;font-weight:400;letter-spacing:0;color:var(--muted);text-decoration:none;white-space:nowrap}
.cover-edition .site-address:hover{color:var(--brand)}
.cover-edition .site-address:focus-visible{outline:2px solid var(--brand);outline-offset:4px}
@media(max-width:600px){.cover-brand .brand-lockup{width:170px}.cover-edition .site-address{font-size:11px}.cover-edition{flex-wrap:wrap;gap:8px}}

/* A quiet paper edge: three thin sheets, with no curled corners. */
.notebook-cover,
.whole-text-practice .writing-area.notebook-sheet,
.whole-text-sample .notebook-sheet{
 box-shadow:0 3px 0 -1px #fff,0 4px 0 -1px #686868,
  0 7px 0 -2px #fff,0 8px 0 -2px #686868,
  0 11px 0 -3px #f4f4f4,0 12px 0 -3px #393939,
  0 15px 5px -13px #19191930;
}
.whole-text-practice .writing-area.notebook-sheet.page-turn-leaf,
.whole-text-sample .notebook-sheet.page-turn-leaf{box-shadow:none}
.reading-navigation{margin-top:28px}
@media(max-width:600px){
 .notebook-cover,.whole-text-practice .writing-area.notebook-sheet,.whole-text-sample .notebook-sheet{
  box-shadow:0 3px 0 -1px #fff,0 4px 0 -1px #686868,
   0 7px 0 -2px #f4f4f4,0 8px 0 -2px #393939,
   0 11px 4px -10px #19191926;
 }
 .whole-text-practice .writing-area.notebook-sheet.page-turn-leaf,.whole-text-sample .notebook-sheet.page-turn-leaf{box-shadow:none}
}

/* Paired arrows at the notebook's bottom right. */
.notebook-sheet>.reading-navigation{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:32px;padding-top:20px;border-top:1px solid var(--line)}
.reading-navigation-buttons{display:flex;align-items:center;gap:8px;margin-left:auto}
.notebook-sheet>.reading-navigation .ui-button{width:44px;min-height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center}
.notebook-sheet>.reading-navigation .ui-icon{width:20px;height:20px}
@media(max-width:600px){.notebook-sheet>.reading-navigation{margin-top:24px;padding-top:16px}}

/* Quiet printer's marks on the inner pages, separate from the typed text. */
.notebook-imprint{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:28px}
.notebook-signature>img{width:136px;height:auto;opacity:.24;filter:grayscale(1)}
.notebook-address{margin-left:auto;font-size:11px;letter-spacing:.04em;color:#9a9da6;user-select:none}
.reading-navigation-buttons{margin-left:auto}
@media(max-width:600px){.notebook-imprint{margin-bottom:24px;gap:12px}.notebook-signature>img{width:106px}.notebook-sheet>.reading-navigation{gap:10px}.notebook-address{font-size:10px;letter-spacing:0}}

/* Inner-page imprint: speed at left, publisher mark at upper right. */
.notebook-signature>img{order:1;margin-left:auto}

.notebook-signature{order:1;margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.notebook-signature .notebook-address{font-size:10px;line-height:1.4;letter-spacing:.045em;color:#9a9da6}

.whole-text-sample>.notebook-shelf{margin:0 0 32px}

/* A shared six-sentence notebook format; wrapping may grow the page. */
.whole-text-practice,.whole-text-sample{--notebook-height:780px}
.whole-text-practice .notebook-shelf .notebook-cover,
.whole-text-practice .writing-area.notebook-sheet,
.whole-text-sample .notebook-shelf .notebook-cover,
.whole-text-sample>.notebook-sheet{min-height:var(--notebook-height);box-sizing:border-box}
.whole-text-practice .writing-area.notebook-sheet,
.whole-text-sample>.notebook-sheet{display:flex;flex-direction:column}
.notebook-sheet>.notebook-imprint{flex-shrink:0}
.whole-text-practice .notebook-sheet>.writing-stage,
.whole-text-sample>.notebook-sheet>.passage{flex:1}
.notebook-sheet>.reading-navigation{flex-shrink:0}
.whole-text-practice .writing-area.notebook-sheet.page-turn-leaf{min-height:0}
@media(max-width:600px){.whole-text-practice,.whole-text-sample{--notebook-height:640px}}

/* A contemporary postage mark: fine perforations and restrained ink variation. */
.completion-stamp[hidden]{display:none!important}
.completion-stamp{position:absolute;z-index:4;display:flex;flex-direction:column;align-items:flex-start;gap:9px;box-sizing:border-box;width:132px;padding:20px;color:#3456ad;background:#f2f4fa;transform:rotate(-3deg);pointer-events:none;font-variant-numeric:tabular-nums;isolation:isolate;
mask:radial-gradient(circle at 5px 0,transparent 2px,#000 2.6px) 0 0/10px 100%,radial-gradient(circle at 5px 100%,transparent 2px,#000 2.6px) 0 0/10px 100%,radial-gradient(circle at 0 5px,transparent 2px,#000 2.6px) 0 0/100% 10px,radial-gradient(circle at 100% 5px,transparent 2px,#000 2.6px) 0 0/100% 10px;mask-composite:intersect}
.completion-stamp::before{content:"";position:absolute;inset:10px;border:1px solid #3456ad;opacity:.55;pointer-events:none;mask:linear-gradient(110deg,#000 0 18%,#0008 18.3% 19%,#000 19.4% 63%,transparent 63.2% 63.8%,#000 64%)}
.completion-stamp::after{content:"";position:absolute;inset:12px;pointer-events:none;background:radial-gradient(ellipse at 21% 33%,#f2f4fa99 0 .7px,transparent 1px),radial-gradient(ellipse at 74% 61%,#f2f4fa88 0 .6px,transparent 1px);background-size:13px 17px,19px 11px;opacity:.65}
.stamp-label{font-size:10px;font-weight:600;letter-spacing:.16em;opacity:.8}
.stamp-speed{display:flex;align-items:baseline;gap:5px}
.stamp-speed strong{font-size:36px;line-height:1;font-weight:650;letter-spacing:-.055em}
.stamp-speed small{font-size:9px;font-weight:500;opacity:.8}
.completion-stamp time{width:100%;border-top:1px solid #3456ad40;padding-top:9px;font-size:10px;line-height:1;letter-spacing:.065em;font-weight:500}
.notebook-imprint{min-height:46px;align-items:flex-start}
@media(max-width:600px){.completion-stamp{width:120px;padding:18px;gap:8px}.stamp-speed strong{font-size:31px}.completion-stamp time{font-size:9px}}

/* Rhythm and publisher mark share the notebook's upper margin. */
.notebook-imprint,.cover-edition:has(>.rhythm-panel){display:grid;grid-template-columns:minmax(0,1fr) 136px;align-items:center;column-gap:32px}
.notebook-imprint>.rhythm-panel,.cover-edition>.rhythm-panel{min-width:0;width:100%;margin:0!important;padding:0!important;border:0!important;height:64px;align-self:center}
.notebook-imprint .rhythm-plot,.cover-edition .rhythm-plot{height:64px!important;margin:0;border:0!important;background:none!important;overflow:hidden}
.notebook-imprint>.notebook-signature{grid-column:2;grid-row:1}
.notebook-imprint>.rhythm-panel{grid-column:1;grid-row:1}
.cover-edition:has(>.rhythm-panel)>span{display:none}
.cover-edition>.site-address{grid-column:2}
@media(max-width:600px){.notebook-imprint,.cover-edition:has(>.rhythm-panel){grid-template-columns:minmax(0,1fr) 106px;column-gap:16px}.notebook-imprint .rhythm,.cover-edition .rhythm{gap:1px!important}}

/* Crisp notebook outline, shared by cover and inner sheets. */
.notebook-cover,.whole-text-practice .writing-area.notebook-sheet,.whole-text-sample .notebook-sheet{border:1px solid #191919}

/* Ruled paper continues through the blank body space, independent of text length. */
.whole-text-practice .notebook-sheet>.writing-stage,
.whole-text-sample>.notebook-sheet>.passage{position:relative;overflow:hidden;isolation:isolate}
.notebook-sheet .manuscript-title{position:relative;--rule-offset:16px}
.notebook-sheet .manuscript-title::after{content:"";position:absolute;top:calc(100% + var(--rule-offset));left:0;right:0;height:10000px;z-index:-1;pointer-events:none;background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--reading-size) * var(--reading-leading) - 1px),#eceef2 calc(var(--reading-size) * var(--reading-leading) - 1px),#eceef2 calc(var(--reading-size) * var(--reading-leading)))}
@media(max-width:600px){.notebook-sheet .manuscript-title{--rule-offset:12px}}

/* Opening and closing share the same notebook action. */
.cover-bottom .notebook-action,.notebook-sheet>.reading-navigation .notebook-action{display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:44px;gap:7px;padding:0 12px;font-size:12px;line-height:1;font-weight:500;white-space:nowrap}
.notebook-action .ui-icon,.notebook-sheet>.reading-navigation .notebook-action .ui-icon{width:18px;height:18px;flex-shrink:0}
.reading-navigation-buttons .notebook-close{margin-left:8px;margin-right:0}
@media(max-width:600px){.cover-bottom .notebook-action{align-self:flex-end}.reading-navigation-buttons .notebook-close{margin-left:0;margin-right:0}}

/* Neutral paper grain: tactile cover, quieter writing stock. */
.notebook-cover::after,.whole-text-practice .writing-area.notebook-sheet::after,.whole-text-sample .notebook-sheet::after{content:"";display:block;position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22180%22%20height%3D%22180%22%20viewBox%3D%220%200%20180%20180%22%3E%3Cfilter%20id%3D%22paper%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%22.72%20.48%22%20numOctaves%3D%223%22%20stitchTiles%3D%22stitch%22%20seed%3D%2217%22/%3E%3CfeColorMatrix%20type%3D%22matrix%22%20values%3D%220%200%200%200%200.16%200%200%200%200%200.18%200%200%200%200%200.22%200%200%200%20.22%200%22/%3E%3C/filter%3E%3Cpath%20fill%3D%22white%22%20filter%3D%22url%28%23paper%29%22%20d%3D%22M0%200h180v180H0z%22/%3E%3C/svg%3E");background-repeat:repeat;background-size:180px 180px;opacity:.58;mix-blend-mode:multiply}
.whole-text-practice .writing-area.notebook-sheet::after,.whole-text-sample .notebook-sheet::after{opacity:.26}

/* Passport-like fore edge; keep the spine straight. */
.notebook-cover,.whole-text-practice .writing-area.notebook-sheet,.whole-text-sample .notebook-sheet{border-radius:0 18px 18px 0}
@media(max-width:600px){.notebook-cover,.whole-text-practice .writing-area.notebook-sheet,.whole-text-sample .notebook-sheet{border-radius:0 14px 14px 0}}
