@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/InterTight.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Kalam;
  src: url("/fonts/Kalam.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #102f4b;
  --muted: #52616a;
  --line: #d7d5c9;
  --paper: #fffdf6;
  --ground: #f0ede5;
  --tint: #e8edf0;
  --blue: #a9c8e6;
  --focus: #0663a7;
  --error: #933e31;
  --accent: #705739;
  --serif: "Inter Tight", -apple-system, system-ui, sans-serif;
  --hand: Kalam, "Segoe Print", "Bradley Hand", cursive;
  --sans: "Inter Tight", -apple-system, system-ui, sans-serif;
  font: 100%/1.5 var(--sans);
  background: var(--ground);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box }
body { min-width: 0; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button { border: 0; background: none; padding: 0; }
button:disabled { cursor: default; opacity: .56; }
button, input, select, textarea, summary { touch-action: manipulation; }
a { color: var(--ink); text-underline-offset: .22em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.14; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: break-word; }
p { overflow-wrap: anywhere; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 5; left: 1rem; top: .5rem; padding: .75rem; background: var(--paper); }
.mast { border-bottom: 1px solid #d5d2c7; background: #faf8f1; }
.mast-inner {
  max-width: 84rem; min-height: 4.6rem; margin: 0 auto; padding: .65rem clamp(1.25rem,5vw,4.5rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wordmark { display: block; width: clamp(8rem,14vw,11.2rem); height: auto; }
#account { min-width: 0; display: flex; align-items: center; gap: .8rem; }
.account-name { font-size: .92rem; font-weight: 570; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.primary, .secondary, .simple, .link, .back {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 44px; font-weight: 610; line-height: 1.3; text-decoration: none;
}
.primary, .secondary, .simple {
  padding: .74rem 1.12rem; border-radius: 5px; border: 1px solid var(--ink);
  transition: background-color .16s, border-color .16s;
}
.primary { background: var(--ink); color: #fffdf7; }
.primary:hover:not(:disabled) { background: #244d69; border-color: #244d69; }
.secondary, .simple { border-color: #aeb7b6; background-color: transparent; }
.secondary:hover:not(:disabled), .simple:hover:not(:disabled) { background: var(--tint); border-color: #8599a2; }
.simple, .back, .link { font-size: .89rem; }
.link, .back { text-decoration: underline; text-underline-offset: .25em; }
.link:hover, .back:hover { color: #386487; }
.loading { margin: 4rem auto; padding: 0 1.25rem; max-width: 73rem; }
input, select, textarea { min-width: 0; border-radius: 4px; border: 1px solid #9babae; background-color: var(--paper); }
input, select { width: 100%; padding: .72rem .85rem; min-height: 46px; }
input[readonly] { background: #efeee8; }
input::placeholder, textarea::placeholder { color: #626e75; opacity: 1; }
textarea { display: block; resize: vertical; width: 100%; min-height: 7.5rem; padding: .8rem; line-height: 1.5; }
label { font-weight: 600; }
.error:not(:empty), .alert { color: var(--error); font-weight: 550; }
.error:empty, .result:empty { display: none; }
.eyebrow, .chapter-count, .page-meta {
  font: 650 .7rem/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase;
}
.auth {
  width: min(65rem, calc(100% - 5rem)); margin: clamp(2.5rem,7.5vh,6rem) auto 3.5rem;
  display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,1fr);
  gap: clamp(2.5rem,7vw,7.5rem); align-items: center;
}
.cover {
  position: relative; isolation: isolate;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  min-height: clamp(27.5rem,39vw,35rem); padding: 3.5rem 2.5rem 3.35rem 3.75rem;
  border-radius: 4px 9px 9px 4px; border: 1px solid #1e3c52;
  text-align: center; color: #fbf5dc;
  background-color: #183e58;
  background-image:
    linear-gradient(90deg,#0d273c 0%,#3a586b 1.2%,#19394f 2%,#2c4b61 5.6%,#112e44 6.2%,#3c5869 6.7%,transparent 8.3%),
    radial-gradient(ellipse at 23% 0%, #7893a538, transparent 64%),
    repeating-linear-gradient(6deg,#ffffff05 0px,#ffffff05 1px,transparent 1px,transparent 3px),
    repeating-linear-gradient(97deg,#00000009 0px,#00000009 1px,transparent 1px,transparent 3px);
  box-shadow: 1px 2px 0 #b4a894,3px 4px 0 #f6f0df,4px 5px 0 #b5a997,6px 6px 0 #ebe3d1,7px 8px 0 #334b56,8px 11px 8px #182e3a1a,10px 24px 35px -9px #182e3a48;
}
.cover::before {
  position: absolute; content: ""; z-index: -1; pointer-events: none;
  inset: 1.15rem 1.08rem 1.15rem max(2rem,9%);
  border: 1px solid #c0ad827d;
  box-shadow: inset 0 0 0 4px #224359, inset 0 0 0 5px #cab88e45;
  background:
    radial-gradient(ellipse 72% 48% at 50% 117%,transparent 0 85%,#b29e763f 85.3% 85.6%,transparent 86% 90%,#b29e763f 90.3% 90.6%,transparent 91% 95%,#b29e763f 95.3% 95.6%,transparent 96%),
    radial-gradient(ellipse 76% 42% at 50% -24%,transparent 0 86%,#b29e7638 86.3% 86.6%,transparent 87% 92%,#b29e7638 92.3% 92.6%,transparent 93%);
}
.cover::after {
  position: absolute; content: ""; left: 7%; bottom: -1.08rem; width: 1.12rem; height: 1.08rem;
  background: linear-gradient(90deg,#8b5746,#ad7760 65%,#8c5b48); clip-path: polygon(0 0,100% 0,100% 100%,50% 69%,0 100%); z-index: -2;
}
.cover-seal {
  order: 0; display: block; width: clamp(4.6rem,7.4vw,6.2rem); aspect-ratio: 1; margin: 0 0 1.5rem;
  background: linear-gradient(135deg,#e6c3a4,#cf9c7c 55%,#e2bb9b);
  -webkit-mask: url("/logos/sceau-bleu.png") center / contain no-repeat;
  mask: url("/logos/sceau-bleu.png") center / contain no-repeat;
}
.cover-title {
  order: 2; margin: 0 0 1rem; font: 600 clamp(2rem,3.5vw,3.1rem)/1.08 var(--serif);
  letter-spacing: -.025em; text-shadow: 0 1px 1px #102538; text-wrap: balance;
}
.cover-title span { display: block; }
.cover-owner {
  order: 3; font: 500 clamp(1rem,1.5vw,1.3rem)/1.25 var(--serif); letter-spacing: .01em; color: #e6c3a4;
  max-width: 90%; margin-top: .75rem;
}
.cover-owner:not(:empty)::before { content: ""; display: block; border-top: 1px solid #cbb58d91; width: 2.5rem; margin: 0 auto .95rem; }
.form-sheet { min-width: 0; max-width: 28.4rem; }
.form-sheet h1 { font-size: clamp(2rem,3.1vw,2.8rem); line-height: 1.1; letter-spacing: -.025em; margin: .5rem 0 .85rem; }
.form-sheet > p:not(.eyebrow) { color: var(--muted); font-size: 1.04rem; max-width: 39ch; }
.form-sheet .eyebrow, .chapter-count { color: var(--accent); }
.form-sheet form, .auth-actions, .reauth-form, .form-sheet .result:not(:empty) { display: grid; gap: .7rem; min-width: 0; }
.form-sheet > form, .form-sheet .auth-actions, .form-sheet p + button, .form-sheet p + .primary { margin-top: 1.6rem; }
.form-sheet > button + button { margin: .6rem 0 0 .4rem; }
.form-sheet .primary { justify-self: start; }
.form-sheet form .primary { justify-self: stretch; }
.access-details { margin-top: 1.3rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.access-details summary, .conflict summary { min-height: 44px; align-content: center; color: var(--muted); font-weight: 570; }
.access-details form { margin-top: .75rem; }
.form-sheet .result:not(:empty) { margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.link-reference { display: inline-block; margin-inline-start: .35rem; color: var(--muted); font-size: .8rem; font-weight: 500; }
#access .auth-actions .link { justify-self: start; }
.reauth-form .access-details { margin: 0; padding: 0; border: 0; }
.reauth-form .access-details input { margin-top: .5rem; }
dialog {
  width: min(32rem,calc(100vw - 1.5rem)); max-width: none; max-height: 86vh; max-height: 86dvh;
  padding: clamp(1.2rem,3.5vw,2rem); margin: auto; overflow: auto; overscroll-behavior: contain;
  background: var(--paper); color: var(--ink); border: 1px solid #b6b5a9; border-radius: 8px;
  box-shadow: 0 12px 55px #0b23332e;
}
dialog::backdrop { background: #182a3d7a; }
.dialog-head, .conflict .actions, .editor-nav { display: flex; align-items: center; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.dialog-head { margin-bottom: 1rem; }
.dialog-head h2 { font-size: clamp(1.45rem,2.4vw,1.8rem); }
.dialog-hint { color: var(--muted); margin-bottom: 1rem; }
.conflict, .problem { padding: 1rem; background: #fff1d9; border: 1px solid #dbcba8; border-radius: 4px; margin: .5rem 0; }
.conflict pre { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 11rem; overflow: auto; background: var(--paper); padding: .6rem; }
progress { display: block; width: 100%; height: 4px; overflow: hidden; accent-color: #526d76; appearance: none; border: 0; border-radius: 3px; background: #d8dbd3; }
progress::-webkit-progress-bar { background: #d8dbd3; }
progress::-webkit-progress-value { background: #526d76; }
progress::-moz-progress-bar { background: #526d76; }

/* A narrow first leaf holds the chapter. The facing leaf is reserved for writing. */
.book-tools, .book-layout { width: min(73rem,calc(100% - 5rem)); margin-inline: auto; }
.book-tools { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 0 .8rem; }
.book-tools .back { text-decoration: none; }
.book-tools .simple { background: #fbf9f1; }
.book-layout {
  display: grid; grid-template-columns: minmax(0,.76fr) minmax(0,1.34fr);
  min-height: 34rem; margin-bottom: 3.5rem;
  background: var(--paper); border: 1px solid #c6c6b9; border-radius: 5px 8px 6px 3px;
  box-shadow: 0 2px 0 #e3ded0,0 3px 0 #bfbbad,0 5px 0 #f3efdf,0 6px 0 #bdb9aa,0 8px 0 #284659,0 16px 27px -12px #27394a42;
}
.sidebar { position: relative; min-width: 0; padding: clamp(1.8rem,4vw,3.8rem) clamp(1.45rem,3.55vw,3.5rem);
  background: linear-gradient(90deg,#f6f4e9, #f8f6eb 94%, #e9e5d6 99%,#d2cec1); border-radius: 5px 0 0 3px; }
.sidebar::after {
  content: ""; position: absolute; top: -1px; right: max(1.3rem,9%); width: 1rem; height: 2rem;
  background: linear-gradient(90deg,#85533f,#ac775e 62%,#96634b);
  clip-path: polygon(0 0,100% 0,100% 100%,50% 75%,0 100%);
}
.sidebar h1 { font-size: clamp(1.45rem,2.15vw,2rem); line-height: 1.16; letter-spacing: -.02em; margin: .7rem 0 1.35rem; }
.chapter-count { font-size: .73rem; }
.chapter-progress { font-size: .83rem; color: var(--muted); }
.chapter-progress progress { margin-top: .57rem; }
.chapter-links { display: grid; margin: 1.4rem 0 .85rem; border-top: 1px solid var(--line); }
.chapter-links > :is(button,a), .ask-action {
  width: 100%; min-height: 48px; padding: .58rem .32rem; text-align: start; display: flex; align-items: center; gap: .65rem;
  font-size: .97rem; font-weight: 550; line-height: 1.3; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line);
}
.chapter-links > :is(button,a):hover, .chapter-links > [aria-current]:not([aria-current=false]), .chapter-links > [aria-pressed=true] {
  background-color: #e1e8e5;
}
.chapter-links svg, .ask-action svg, .source-link svg, .book-tools svg { width: 1rem; height: 1rem; flex: 0 0 auto; }
.ask-action { color: #35596e; border-bottom: none; text-decoration: underline; text-underline-offset: .22em; }
.ask-action:hover { color: var(--ink); }
.reader {
  display: flex; min-width: 0; border-radius: 0 8px 6px 0;
  background: linear-gradient(90deg,#e8e5da 0px,#f9f6ed 10px,var(--paper) 30px);
}
.sheet {
  width: 100%; min-width: 0; display: flex; flex-direction: column;
  padding: clamp(1.8rem,4vw,3.8rem) clamp(1.55rem,4.7vw,4.65rem) 1.9rem;
}
.page-meta {
  color: var(--accent); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding-bottom: .8rem; border-bottom: 1px solid var(--line); margin-bottom: 1.38rem;
}
.page-meta > :last-child:not(:first-child) { flex-shrink: 0; color: var(--muted); }
.editor-title { font: 600 clamp(1.5rem,2.25vw,2.1rem)/1.18 var(--serif); letter-spacing: -.02em; margin-bottom: 1.1rem; }
.source-link { display: inline-flex; align-items: center; align-self: flex-start; gap: .45rem; min-height: 44px; color: #345a70; font-size: .93rem; font-weight: 570; text-align: start; text-decoration: underline; text-underline-offset: .23em; }
.source-link:hover { color: #112e48; }
.entry-label { align-self: flex-start; display: block; margin: .65rem 0 .45rem; font-size: .88rem; font-weight: 610; }
#entry {
  --ruling: 2.08rem;
  width: 100%; min-height: 12.7rem; display: block; padding: .08rem .42rem .3rem;
  border: 0; border-radius: 0; color: #173f61; caret-color: #244e74;
  font: 400 1.35rem/var(--ruling) var(--hand);
  background-color: transparent;
  background-image: repeating-linear-gradient(to bottom,transparent 0 calc(var(--ruling) - 1px), #cbd4ce calc(var(--ruling) - 1px) var(--ruling));
  background-size: 100% var(--ruling); background-position: 0 -.12rem; background-attachment: local;
}
#entry:focus { outline: 2px solid #69879b; outline-offset: 4px; border-radius: 1px; }
#entry::placeholder { color: #657481; }
.status-line { display: flex; align-items: center; flex-wrap: wrap; min-height: 2.7rem; gap: .55rem; font-size: .84rem; color: var(--muted); }
.status-line button { min-height: 44px; font-weight: 600; text-decoration: underline; }
.editor-nav { margin-top: auto; padding-top: .85rem; border-top: 1px solid var(--line); }
.editor-nav > :last-child { margin-left: auto; }
.lesson-list { display: grid; margin: .7rem 0; }
.lesson { padding: 1rem 0; border-top: 1px solid var(--line); }
.lesson h3 { font-size: clamp(1.08rem,1.4vw,1.3rem); }
.lesson small, .lesson p { color: var(--muted); }
.lesson :is(a,button) { min-height: 44px; display: inline-flex; align-items: center; margin-right: .65rem; font-size: .9rem; }
.lesson button:not(.primary):not(.secondary) { color: #35596e; text-align: start; text-decoration: underline; text-underline-offset: .22em; }
#menu { width: min(43rem,calc(100vw - 1.5rem)); }
#book-search { margin: .5rem 0 1rem; background-color: #fdfcf6; border-color: #b5bfbe; }
.module-group { border-top: 1px solid var(--line); }
.module-group:last-child { border-bottom: 1px solid var(--line); }
.module-group > summary { min-height: 48px; padding: .75rem .3rem; line-height: 1.4; font-weight: 620; }
.module-group > summary:hover, .jump:hover { background-color: #eaf0eb; }
.module-group[open] > summary { color: #315974; }
.jump-list, .search-results { display: grid; }
.jump {
  display: block; width: 100%; min-height: 44px; padding: .62rem .75rem;
  font-size: .95rem; text-align: left; line-height: 1.4; border-bottom: 1px solid #e5e4d9;
}
.jump small { display: block; color: var(--muted); font-size: .79rem; }
.jump-list .jump { padding-left: 1.2rem; }
.jump-list .jump:last-child { border-bottom: none; }
.search-results > p { color: var(--muted); }
@media (min-width: 60rem) {
  .sheet { min-height: min(36rem,77vh); }
}
@media (prefers-reduced-motion: no-preference) {
  .book-layout { animation: open-leaf .26s ease-out both; transform-origin: left center; }
  @keyframes open-leaf {
    from { opacity: .4; transform: perspective(1800px) rotateY(-2deg); }
    to { opacity: 1; transform: none; }
  }
}
@media (max-width: 62rem) {
  .auth { gap: 2.7rem; width: calc(100% - 4rem); }
  .book-layout, .book-tools { width: calc(100% - 3rem); }
  .sheet { padding-inline: 1.85rem; }
  .sidebar { padding-inline: 1.55rem; }
}
@media (max-width: 46rem) {
  .mast-inner { min-height: 3.85rem; padding-inline: 1.1rem; }
  #account { gap: .5rem; }
  .account-name { max-width: 8rem; font-size: .85rem; }
  .simple { padding: .55rem .72rem; }
  .auth { width: min(32rem,calc(100% - 2.8rem)); margin: 1.6rem auto 2.5rem; grid-template-columns: minmax(0,1fr); gap: 2rem; }
  .cover {
    width: min(100%,23rem); justify-self: center; min-height: clamp(13rem,42vw,19rem); padding: 1.25rem 1.7rem 1.2rem 2.4rem;
  }
  .cover-seal { width: 3.6rem; margin-bottom: .7rem; }
  .cover-title { font-size: clamp(2.48rem,8vw,3.35rem); margin: .5rem 0 .15rem; }
  .cover-owner { font-size: 1rem; margin-top: .33rem; }
  .cover-owner:not(:empty)::before { width: 1.75rem; margin: 0 auto .35rem; }
  .cover::before { inset-block: .64rem; right: .67rem; }
  .form-sheet { width: 100%; max-width: none; }
  .form-sheet h1 { font-size: clamp(1.75rem,6.4vw,2.25rem); margin: .2rem 0 .7rem; }
  .form-sheet > p:not(.eyebrow) { font-size: 1rem; }
  .form-sheet > form, .form-sheet .auth-actions, .form-sheet p + button, .form-sheet p + .primary { margin-top: 1.1rem; }
  .book-tools, .book-layout { width: calc(100% - 1.6rem); }
  .book-tools { padding: .48rem 0; }
  .book-layout { display: block; min-height: 0; margin-bottom: 2rem; }
  .sidebar { padding: 1.1rem 1.2rem .45rem; border-bottom: 1px solid #d9d7c8; border-radius: 5px 7px 0 0; background: #f7f5eb; }
  .sidebar::after { right: 1rem; height: 1.2rem; width: .75rem; }
  .sidebar h1 { font-size: clamp(1.25rem,4.4vw,1.55rem); line-height: 1.18; margin: .22rem 0 .6rem; }
  .chapter-count { font-size: .67rem; }
  .chapter-progress { font-size: .76rem; }
  .chapter-progress progress { max-width: 12rem; margin-top: .3rem; }
  .chapter-links { display: flex; align-items: stretch; flex-wrap: wrap; column-gap: .55rem; margin: .5rem 0 0; }
  .chapter-links > :is(button,a), .ask-action { width: auto; min-height: 44px; font-size: .84rem; gap: .32rem; padding: .38rem .36rem; border-bottom: 0; }
  .ask-action { display: inline-flex; }
  .reader { background: var(--paper); border-radius: 0 0 6px 4px; }
  .sheet { padding: 1.3rem 1.2rem 1.15rem; }
  .page-meta { font-size: .64rem; padding-bottom: .6rem; margin-bottom: .82rem; }
  .editor-title { font-size: clamp(1.3rem,4.9vw,1.65rem); margin-bottom: .3rem; }
  .entry-label { margin-top: .4rem; }
  #entry { font-size: 1.25rem; min-height: 9.8rem; --ruling: 1.94rem; }
  .editor-nav .primary, .editor-nav .secondary { padding-inline: .75rem; font-size: .88rem; }
}
@media (max-width: 25rem) {
  .account-name { max-width: 20vw; }
  .book-layout, .book-tools { width: calc(100% - 1.12rem); }
  .ask-action { font-size: .82rem; }
  .form-sheet > button + button { margin-left: 0; }
}
@media (forced-colors: active) {
  .cover { border: 2px solid CanvasText; background: Canvas; color: CanvasText; }
  .cover-owner { color: CanvasText; }
  .cover-seal { background: CanvasText; }
  #entry { border: 1px solid FieldText; }
}

.book-cover .auth-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem 1rem; }
.book-cover .auth-actions .secondary { border-color: transparent; padding-inline: .15rem; color: #35596e; text-decoration: underline; text-underline-offset: .24em; }
.book-cover .auth-actions .secondary:hover { background: transparent; color: var(--ink); }
.chapter-links small { margin-inline-start: auto; color: #4d6370; font-variant-numeric: tabular-nums; font-size: .77rem; font-weight: 550; }
.chapter-links > [aria-current=page] { box-shadow: inset 2px 0 #486677; padding-left: .67rem; }
.sheet .section { margin-bottom: .42rem; color: var(--muted); font-size: .89rem; }
.page-meta:has(button) { align-items: center; padding-bottom: .24rem; }
.page-meta .source-link, .page-meta .link { font: 600 .86rem/1.35 var(--sans); letter-spacing: normal; text-transform: none; }
a.primary.source-link { align-self: flex-start; color: #fffdf7; text-decoration: none; }
.related-title { margin: 1.5rem 0 .6rem; font-size: 1.25rem; }
.lesson-player { display: block; width: 100%; max-height: 55dvh; aspect-ratio: 16 / 9; object-fit: contain; background: #142a3a; border-radius: 4px; }
.lesson-list .lesson { padding: 0; }
.lesson-list .jump { display: block; margin: 0; padding: .8rem .4rem; width: 100%; text-decoration: none; font: 500 1.05rem/1.3 var(--serif); color: var(--ink); }
.lesson-list .jump small { margin-bottom: .22rem; font: 570 .7rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .09em; }
.lesson-list .jump:last-child { border-bottom: none; }
.admin-tools { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.admin-tools a.secondary { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
#menu[open]:has(#book-search) { display: flex; flex-direction: column; overflow: hidden; }
#menu .search-results { overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.module-group > summary {
  position: relative; display: block; list-style: none; padding: .75rem 1.65rem .75rem .35rem; color: var(--ink);
}
.module-group > summary::-webkit-details-marker { display: none; }
.module-group > summary::after {
  content: ""; position: absolute; width: .45rem; height: .45rem; right: .55rem; top: 50%;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-65%) rotate(45deg);
}
.module-group[open] > summary::after { transform: translateY(-35%) rotate(225deg); }
.module-group > summary small {
  display: block; margin-bottom: .14rem; font: 650 .65rem/1.35 var(--sans);
  color: var(--accent); text-transform: uppercase; letter-spacing: .1em;
}
.module-group > summary span { display: block; font: 550 1.08rem/1.28 var(--serif); letter-spacing: -.01em; }
.jump[aria-current=page] { background: #e7ece6; border-left: 2px solid #526d76; }
@media (max-width: 46rem) {
  .cover { width: min(100%,19.8rem); min-height: 15.15rem; }
  .chapter-links small { margin-inline-start: 0; font-size: .72rem; }
  .chapter-links > [aria-current=page] { box-shadow: inset 0 -2px #486677; padding-left: .36rem; }
  .book-cover .auth-actions { gap: .15rem .9rem; }
  .sheet .section { font-size: .83rem; }
}
#account .simple { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 22rem) {
  #account { gap: .3rem; }
  .account-name { max-width: 15vw; }
  .mast-inner { padding-inline: .8rem; gap: .4rem; }
}

button.cover { cursor: pointer; text-align: center; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  button.cover { transition: transform .22s ease-out; transform-origin: left center; }
  button.cover:hover { transform: perspective(1100px) rotateY(-3deg); }
}

.form-sheet > p.paper-note {
  margin-top: 1.7rem; padding: .15rem 0 .15rem .95rem; border-left: 2px solid #ad7760;
  font-size: .93rem; line-height: 1.5; color: var(--muted); max-width: 42ch;
}
.paper-note strong { display: block; color: var(--ink); font-weight: 620; margin-bottom: .15rem; }

/* Outils d'écriture de Jade : roue de la vie, ligne de vie, journal sur sept jours. */
.tool { display: grid; gap: .9rem; margin: .4rem 0 .6rem; min-width: 0; }
.tool fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.tool legend, .tool label:not(.score):not(.chip) { padding: 0; font-size: .88rem; font-weight: 610; color: var(--ink); }
.tool-hint { color: var(--muted); font-size: .92rem; max-width: 60ch; }
.tool-quote { font-weight: 600; color: var(--ink); padding-left: .85rem; border-left: 2px solid #ad7760; }
.tool-limit:empty { display: none; }
.tool-limit { color: var(--error); font-weight: 550; }
.hand-line, .hand-lines {
  width: 100%; border: 0; border-bottom: 1px solid #b9c6bf; border-radius: 0; background: transparent;
  color: #173f61; caret-color: #244e74; font: 400 1.18rem/1.75 var(--hand); padding: .1rem .3rem;
}
.hand-line { min-height: 44px; }
.hand-lines {
  --ruling: 1.95rem; min-height: calc(var(--ruling) * 2 + .4rem); border-bottom: 0; line-height: var(--ruling);
  background-image: repeating-linear-gradient(to bottom,transparent 0 calc(var(--ruling) - 1px), #cbd4ce calc(var(--ruling) - 1px) var(--ruling));
  background-attachment: local; field-sizing: content;
}
.hand-line::placeholder, .hand-lines::placeholder { color: #657481; font-family: var(--sans); font-size: .92rem; }
.hand-line:focus, .hand-lines:focus { outline: 2px solid #69879b; outline-offset: 3px; }
.tool select { min-height: 44px; padding: .5rem .6rem; }

.score-scale { display: grid; grid-template-columns: repeat(11,minmax(0,1fr)); gap: .35rem; margin-top: .55rem; max-width: 36rem; }
.score { position: relative; display: block; }
.score input, .chip input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; inset: 0; cursor: pointer; }
.score span, .chip span {
  display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid #aeb7b6; border-radius: 5px;
  background: var(--paper); font-weight: 620; font-variant-numeric: tabular-nums; transition: background-color .16s, border-color .16s;
}
.score input:hover + span, .chip input:hover + span { background: var(--tint); border-color: #8599a2; }
.score input:checked + span, .chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fffdf7; }
.score input:focus-visible + span, .chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chips.scale5 { display: grid; grid-template-columns: repeat(5,minmax(0,3.2rem)); gap: .3rem; }
.chips.scale5 legend { grid-column: 1 / -1; }
.chips legend { margin-bottom: .4rem; }
.chip { position: relative; }
.chip span { padding: .4rem .85rem; min-width: 44px; font-weight: 560; font-size: .92rem; }

.tool-visual { min-width: 0; }
.wheel-figure { margin: .3rem 0 0; display: grid; grid-template-columns: minmax(9rem,15rem) minmax(0,1fr); gap: 1.2rem; align-items: center; }
.wheel { width: 100%; height: auto; overflow: visible; }
.wheel .ring { fill: none; stroke: #dcdcd0; stroke-width: 1; }
.wheel .ring.outer { stroke: #9fb0b4; }
.wheel .spoke { stroke: #c9cdc3; stroke-width: 1; }
.wheel .wedge { fill: #a9c8e6; stroke: #35596e; stroke-width: 1.2; }
.wheel .wedge.current { fill: #e2bb9b; stroke: #8b5746; }
.wheel-number { font: 650 12px var(--sans); fill: #52616a; text-anchor: middle; dominant-baseline: central; }
.wheel-number.current { fill: #8b5746; }
.wheel-count { display: block; font-size: .82rem; color: var(--muted); margin-bottom: .3rem; }
.wheel-legend { list-style: none; margin: 0; padding: 0; display: grid; }
.wheel-legend button {
  width: 100%; min-height: 44px; display: grid; grid-template-columns: 1.4rem minmax(0,1fr) auto; gap: .5rem; align-items: center;
  padding: .3rem .35rem; text-align: start; font-size: .9rem; border-bottom: 1px solid #e5e4d9;
}
.wheel-legend li:last-child button { border-bottom: 0; }
.wheel-legend button:hover { background: #eaf0eb; }
.wheel-legend [aria-current] { background: #f6ebe0; box-shadow: inset 2px 0 #ad7760; }
.wheel-index { color: var(--accent); font-weight: 650; font-variant-numeric: tabular-nums; }
.wheel-score { font-weight: 650; font-variant-numeric: tabular-nums; }
.wheel-score small { color: var(--muted); font-weight: 500; }
.wheel-peek { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wheel-peek > summary { min-height: 44px; align-content: center; font-weight: 600; color: #315974; }
.wheel-peek .wheel-figure { padding-bottom: .8rem; }

.frise-figure { margin: 0; }
.frise { display: block; width: 100%; height: auto; overflow: visible; }
.frise-v { display: none; max-width: 22rem; margin-inline: auto; }
.frise .axis { stroke: #102f4b; stroke-width: 2; stroke-linecap: round; }
.frise .tick { stroke: #102f4b; stroke-width: 1.2; }
.frise .stem { stroke: #9fb0b4; stroke-width: 1; stroke-dasharray: 2 3; }
.frise .margin-zone { fill: #f3f0e6; stroke: #d7d5c9; stroke-dasharray: 3 3; }
.frise .axis-label { font: 560 11px var(--sans); fill: #52616a; text-anchor: middle; }
.frise .axis-label.start { text-anchor: start; }
.frise .side-label { font: 650 10.5px var(--sans); fill: #705739; letter-spacing: .06em; text-transform: uppercase; }
.frise .side-label.end { text-anchor: end; }
.frise .mark { stroke-width: 1.5; }
.frise .mark.heureux { fill: #a9c8e6; stroke: #35596e; }
.frise .mark.difficile { fill: #e2bb9b; stroke: #8b5746; }
.frise .mark.neutre { fill: #fffdf6; stroke: #52616a; }
.frise .mark-number { font: 700 11px var(--sans); fill: #102f4b; text-anchor: middle; dominant-baseline: central; }
.frise-figure figcaption { margin-top: .35rem; font-size: .82rem; color: var(--muted); }
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.event-card { display: grid; gap: .7rem; padding: .95rem 1rem 1.05rem; border: 1px solid #d7d5c9; border-radius: 5px; background: #fffef9; }
.event-head { display: flex; align-items: center; gap: .6rem; }
.event-head h3 { font-size: 1rem; margin-right: auto; }
.event-head .link { min-height: 44px; padding-inline: .3rem; }
.event-number { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1.5px solid #35596e; font: 700 .78rem var(--sans); }
.event-grid { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.4fr); gap: .7rem 1rem; }
.event-grid > div { display: grid; gap: .2rem; min-width: 0; }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }

.journal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.journal th { font-size: .78rem; font-weight: 650; text-align: start; vertical-align: bottom; padding: .4rem .35rem; color: var(--ink); line-height: 1.25; }
.journal thead th { border-bottom: 1.5px solid #102f4b; }
.journal thead th:nth-child(1) { width: 4.2rem; }
.journal thead th:nth-child(2) { width: 6rem; }
.journal thead th:nth-child(5) { width: 7.2rem; }
.journal tbody th { vertical-align: top; padding-top: .7rem; color: var(--accent); }
.journal td { vertical-align: top; padding: .2rem .3rem; border-bottom: 1px solid var(--line); }
.journal .hand-line, .journal .hand-lines { font-size: 1.02rem; padding-inline: .15rem; }
.journal .hand-lines { --ruling: 1.7rem; }
.journal select { width: 100%; font-size: .88rem; }
.cell-label { display: none; }
@media (min-width: 75rem) {
  .book-layout.is-wide { grid-template-columns: minmax(0,.62fr) minmax(0,1.5fr); }
  .book-layout.is-wide .sidebar h1 { font-size: clamp(1.35rem,1.75vw,1.7rem); overflow-wrap: normal; }
}
@media (max-width: 74.99rem) {
  .journal, .journal tbody, .journal tr, .journal td, .journal tbody th { display: block; width: auto; }
  .journal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .journal tbody { display: grid; gap: .8rem; }
  .journal tr { padding: .75rem 1rem .9rem; border: 1px solid #d7d5c9; border-radius: 5px; background: #fffef9; }
  .journal tbody th { padding: 0 0 .3rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
  .journal td { padding: .35rem 0; border: 0; }
  .journal .cell-label { display: block; font-size: .84rem; font-weight: 610; margin-bottom: .1rem; }
  .journal .hand-line, .journal .hand-lines { font-size: 1.15rem; }
  .journal .hand-lines { --ruling: 1.9rem; }
  .journal td[data-key="date"], .journal td[data-key="reperage"] { display: inline-block; width: calc(50% - .4rem); vertical-align: top; }
  .journal td[data-key="date"] { margin-right: .7rem; }
}
@media (max-width: 46rem) {
  .score-scale { grid-template-columns: repeat(6,minmax(0,1fr)); gap: .3rem; }
  .wheel-figure { grid-template-columns: minmax(0,1fr); justify-items: center; gap: .6rem; }
  .wheel { max-width: 15rem; }
  .wheel-figure figcaption { width: 100%; }
  .frise-h { display: none; }
  .frise-v { display: block; }
  .event-grid { grid-template-columns: minmax(0,1fr); }
  .event-card, .journal tr { padding: .75rem .8rem .85rem; }
}
@media (max-width: 22rem) {
  .journal td[data-key="date"], .journal td[data-key="reperage"] { display: block; width: auto; margin-right: 0; }
}
@media (forced-colors: active) {
  .score input:checked + span, .chip input:checked + span { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}

/* ----- 26/11 : une seule navigation, la liste des exercices du module ----- */
body { padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.book-layout { grid-template-columns: minmax(0,.94fr) minmax(0,1.16fr); }
.sidebar { padding-inline: clamp(1.3rem,2.5vw,2.5rem) clamp(1.5rem,2.9vw,2.9rem); }
.sidebar-in { position: sticky; top: 0; display: flex; flex-direction: column; max-height: max(27rem,calc(100vh - 9.4rem)); max-height: max(27rem,calc(100dvh - 9.4rem)); margin-block: calc(-1 * clamp(1.8rem,4vw,3.8rem)); padding-block: clamp(1.8rem,4vw,3.8rem) 1.2rem; }
.sidebar h1 { margin-bottom: .8rem; }
.sidebar h1:focus-visible { outline-offset: 5px; }
.chapter-progress { flex: none; }
.toc {
  flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
  margin: 1.1rem -.6rem 0; padding: 0 .6rem .5rem; border-top: 1px solid var(--line);
  /* Ombres de défilement : on voit qu'il reste des questions plus bas. */
  background:
    linear-gradient(#f7f5ea 35%,#f7f5ea00) center top / 100% 1.6rem no-repeat local,
    linear-gradient(#f7f5ea00,#f7f5ea 65%) center bottom / 100% 1.6rem no-repeat local,
    linear-gradient(#27394a26,#27394a00) center top / 100% .55rem no-repeat scroll,
    linear-gradient(#27394a00,#27394a26) center bottom / 100% .55rem no-repeat scroll;
}
.toc-part { padding: 1.05rem 0 .5rem; }
.toc-part + .toc-part { border-top: 1px solid var(--line); }
.toc-part header { display: grid; justify-items: start; }
.toc-kicker { font: 650 .68rem/1.45 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.toc-part h2 { margin-top: .12rem; font-size: 1.04rem; line-height: 1.28; font-weight: 620; letter-spacing: -.01em; }
.toc-review {
  min-height: 44px; margin-block: -.3rem -.45rem; font-size: .82rem; font-weight: 570; white-space: nowrap;
  color: #35596e; text-decoration: underline; text-underline-offset: .22em;
}
.toc-review:hover, .toc-review[aria-current] { color: var(--ink); }
.toc-review[aria-current] { text-decoration-thickness: 2px; }
.toc-list { list-style: none; margin: .45rem 0 0; padding: 0; }
.toc-sub { margin: .8rem 0 .15rem 2.45rem; font-size: .78rem; font-weight: 620; color: var(--muted); }
.toc-sub:first-child { margin-top: .35rem; }
.toc-item {
  width: 100%; min-height: 44px; display: grid; grid-template-columns: 1.2rem minmax(0,1fr); gap: .75rem; align-items: start;
  padding: .62rem .5rem; text-align: start; font-size: .93rem; line-height: 1.38; border-radius: 4px;
}
@media (hover: hover) { .toc-item:hover, .module-row:hover { background-color: #eaf0eb; } }
.toc-item[aria-current] { background-color: #e1e8e5; box-shadow: inset 2px 0 #486677; font-weight: 600; }
.toc-mark { width: 1.15rem; height: 1.15rem; margin-top: .09rem; border: 1.5px solid #8a989e; border-radius: 50%; background: var(--paper); }
.toc-mark.is-done {
  border-color: #35596e;
  background: #35596e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.6 8.4l2.9 2.9 6-6.3' fill='none' stroke='%23fffdf6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 82% no-repeat;
}
.toc-text { display: block; min-width: 0; }
.toc-q { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.toc-num { color: #6b5a40; font-weight: 650; font-variant-numeric: tabular-nums; }
.toc-text small { display: block; margin-top: .12rem; color: var(--muted); font-size: .79rem; font-weight: 500; }
.toc-plain { grid-template-columns: minmax(0,1fr); padding-left: 2.45rem; }
.toc-end { margin-top: .3rem; padding-top: .3rem; border-top: 1px solid var(--line); }
.toc-end .toc-plain { padding-left: .5rem; }
.toc-empty { padding: 1.1rem .1rem .4rem; color: var(--muted); font-size: .95rem; }
.toc-others { border-top: 1px solid var(--line); margin-top: .3rem; }
.toc-others summary { min-height: 44px; padding: .2rem .5rem; align-content: center; font-size: .86rem; font-weight: 570; color: var(--muted); cursor: pointer; }
.toc-others .toc-list { margin-top: 0; }
.sidebar .ask-action { flex: none; width: auto; align-self: flex-start; min-height: 44px; margin-top: .5rem; padding-inline: .1rem; font-size: .9rem; }

.crumbs { justify-content: flex-start; flex-wrap: wrap; align-items: center; gap: 0 .55rem; padding-bottom: .5rem; font: 600 .84rem/1.4 var(--sans); letter-spacing: normal; text-transform: none; }
.crumbs > * { display: inline-flex; align-items: center; min-height: 2rem; }
.crumbs .sep { color: #a3977f; font-weight: 700; }
.crumbs .link { min-height: 44px; color: #35596e; text-decoration: none; }
.crumbs .link:hover { color: var(--ink); }
.crumbs .crumb-last { color: var(--muted); gap: .55rem; }
.page-meta.crumbs > :last-child:not(:first-child) { flex-shrink: 1; }
@media (min-width: 46.01rem) { .editor-nav { margin-top: 1.5rem; } }
.page-meta.crumbs:has(button) { padding-bottom: .2rem; }
.sheet .jump-list .jump { padding-left: .5rem; }

.book-tools .back-list { display: none; }
#menu .module-rows { display: grid; border-top: 1px solid var(--line); }
.module-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .05rem 1.2rem; align-items: baseline;
  width: 100%; min-height: 56px; padding: .72rem .6rem; text-align: start; border-bottom: 1px solid #e5e4d9;
}
.module-row[aria-current] { background-color: #e7ece6; box-shadow: inset 2px 0 #526d76; }
.module-row small, .module-group > h3 small {
  grid-column: 1 / -1; display: block; font: 650 .65rem/1.4 var(--sans); color: var(--accent); text-transform: uppercase; letter-spacing: .1em;
}
.module-row-title { font: 560 1.04rem/1.3 var(--serif); letter-spacing: -.01em; }
.module-row-state { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.module-group > h3 { padding: .85rem .35rem .25rem; }
.module-group > h3 span { display: block; font: 560 1.04rem/1.3 var(--serif); letter-spacing: -.01em; }

.cover-go { margin-top: 1.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1.1rem; }
.form-sheet > .cover-intro { margin-top: 0; }
.resume-where { color: var(--muted); font-size: .95rem; }
.cover-links { display: flex; flex-wrap: wrap; gap: .1rem 1.5rem; margin-top: .9rem; }
.cover-links .secondary { border-color: transparent; padding-inline: .15rem; color: #35596e; text-decoration: underline; text-underline-offset: .24em; }
.cover-links .secondary:hover { background: transparent; color: var(--ink); }

/* Téléphone : une vraie couverture de cahier, puis une page à la fois. */
@media (max-width: 46rem), (max-height: 30rem) {
  .cover {
    --h: clamp(15.5rem,47vh,22rem);
    --h: clamp(15.5rem,47svh,22rem);
    width: auto; height: var(--h); min-height: 0; aspect-ratio: 3 / 4; justify-self: center;
    padding: calc(var(--h) * .085) calc(var(--h) * .065) calc(var(--h) * .09) calc(var(--h) * .12);
    border-radius: 3px 8px 8px 3px;
    box-shadow: 1px 2px 0 #b4a894,2px 3px 0 #f6f0df,3px 4px 0 #b5a997,5px 5px 0 #ebe3d1,6px 7px 0 #334b56,8px 20px 26px -10px #182e3a5c;
  }
  .cover::before { inset: calc(var(--h) * .04) calc(var(--h) * .04) calc(var(--h) * .04) calc(var(--h) * .085); }
  .cover::after { left: 12%; bottom: calc(var(--h) * -.05); width: calc(var(--h) * .048); height: calc(var(--h) * .06); }
  .cover-seal { width: calc(var(--h) * .2); margin: 0 0 calc(var(--h) * .075); }
  .cover-title { font-size: calc(var(--h) * .087); line-height: 1.12; margin: 0 0 calc(var(--h) * .02); }
  .cover-owner { font-size: calc(var(--h) * .048); margin-top: calc(var(--h) * .03); max-width: 100%; }
  .cover-owner:not(:empty)::before { width: calc(var(--h) * .1); margin: 0 auto calc(var(--h) * .04); }
}
@media (max-width: 46rem) {
  .mast-inner { min-height: 3.25rem; padding-block: max(.35rem,env(safe-area-inset-top)) .35rem; }
  .wordmark { width: 6.9rem; }
  #account .simple { min-height: 40px; padding: .4rem .7rem; font-size: .86rem; }
  .auth { margin: 1.15rem auto 2rem; gap: 1.55rem; }
  .auth:not(.book-cover) .cover { --h: clamp(11rem,30svh,15rem); }
  .book-cover .form-sheet { text-align: center; }
  .book-cover .form-sheet .eyebrow, .book-cover .form-sheet h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .book-cover .form-sheet > .cover-intro { margin: 0 auto; font-size: .95rem; max-width: 30ch; }
  .book-cover .cover-go { display: grid; gap: .5rem; margin-top: 0; }
  .book-cover .cover-intro + .cover-go { margin-top: .9rem; }
  .book-cover .cover-go .primary { width: 100%; min-height: 50px; font-size: 1.02rem; }
  .resume-where { font-size: .86rem; }
  .cover-links { display: grid; gap: 0; margin-top: 1.25rem; border-top: 1px solid var(--line); text-align: start; }
  .cover-links .secondary {
    width: 100%; min-height: 50px; justify-content: space-between; padding: .6rem .25rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    color: var(--ink); font-weight: 570; text-decoration: none;
  }
  .cover-links .secondary::after { content: "→"; color: #7b898e; }
  .form-sheet > p.paper-note { margin-top: 1.35rem; max-width: none; text-align: start; font-size: .86rem; line-height: 1.45; }

  .book-tools { min-height: 44px; }
  .book-tools[data-view=page] .back-cover { display: none; }
  .book-tools[data-view=page] .back-list { display: inline-flex; }
  .book-layout[data-view=list] .reader, .book-layout[data-view=page] .sidebar { display: none; }
  .book-layout {
    border-radius: 3px 10px 10px 3px;
    background: linear-gradient(90deg,#cbc6b6 0,#e6e2d4 4px,#f3f0e4 11px,var(--paper) 26px);
    box-shadow: 1px 2px 0 #e3ded0,2px 3px 0 #bfbbad,3px 5px 0 #f3efdf,4px 6px 0 #bdb9aa,5px 8px 0 #284659,0 16px 24px -12px #27394a42;
  }
  .sidebar, .reader { background: transparent; border: 0; border-radius: 0; }
  .sidebar { padding: 1.3rem 1.05rem 1rem 1.7rem; }
  .sidebar::after { right: 1.2rem; height: 1.7rem; width: .85rem; }
  .sidebar-in { position: static; max-height: none; margin: 0; padding: 0; }
  .sidebar h1 { font-size: clamp(1.35rem,5.4vw,1.7rem); margin: .25rem 2rem .7rem 0; }
  .chapter-progress progress { max-width: none; }
  .toc { overflow: visible; margin: .9rem 0 0; padding: 0; background: none; }
  .toc-item { padding-inline: .3rem; font-size: .96rem; }
  .toc-sub { margin-left: 2.25rem; }
  .toc-plain { padding-left: 2.25rem; }
  .sheet { padding: 1.15rem 1.05rem 0 1.7rem; }
  .crumbs { font-size: .8rem; margin-bottom: .7rem; padding-bottom: .15rem; }
  .crumbs .link { order: 3; flex: 1 0 100%; justify-content: flex-start; margin-top: -.35rem; text-decoration: underline; text-underline-offset: .22em; }
  .crumbs .sep-part { display: none; }
  .toc-end .toc-plain { padding-left: .3rem; }
  #entry { min-height: 11.7rem; }
  .editor-nav {
    position: sticky; bottom: 0; z-index: 2; margin-top: .2rem; padding: 1.1rem 0 calc(.75rem + env(safe-area-inset-bottom)); border-top: 0;
    background: linear-gradient(to bottom,#fffdf600,var(--paper) .9rem);
  }
  .editor-nav .primary, .editor-nav .secondary { min-height: 48px; }
  #menu { width: calc(100vw - 1rem); max-height: 92dvh; border-radius: 10px; padding: 1.1rem 1rem; }
  .module-row { grid-template-columns: minmax(0,1fr); padding-inline: .35rem; }
  .module-row-state { order: 3; }
}
@media (max-height: 30rem) and (min-width: 46.01rem) {
  .auth { margin-block: .9rem 1.5rem; gap: clamp(1.5rem,5vw,4rem); grid-template-columns: auto minmax(0,1fr); }
  .cover { --h: clamp(12rem,72svh,20rem); }
  .form-sheet h1 { font-size: 1.6rem; margin: .2rem 0 .5rem; }
  .cover-go { margin-top: .9rem; }
  .form-sheet > p.paper-note { margin-top: .9rem; font-size: .84rem; }
  .mast-inner { min-height: 3rem; }
  .sidebar-in { position: static; max-height: none; }
  .toc { overflow: visible; background: none; }
}
@media (max-width: 25rem) {
  .book-tools { gap: .4rem; }
  .book-tools .back, .book-tools .simple { white-space: nowrap; font-size: .84rem; }
  .book-tools .simple { padding-inline: .6rem; }
}
