@font-face {
  font-family: Lora;
  src: url("assets/fonts/lora-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Lora;
  src: url("assets/fonts/lora-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Lexend;
  src: url("assets/fonts/lexend-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Lexend;
  src: url("assets/fonts/lexend-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #19372f;
  --muted: #52655b;
  --green: #285c4d;
  --accent: #b45139;
  --surface: #fffefa;
  --background: #f6f6f1;
  --light: #edf3ee;
  --pale: #e2eee5;
  --line: #d4ded3;
  --control-line: #9aafa1;
  --scroll-thumb: #80958a;
  --tray: #e3ece4;
  --button: #225545;
  --button-hover: #173d32;
  --on-button: #fff;
  --shadow: #173b3312;
  --page-gutter: clamp(16px, 1.35vw, 24px);
  --motion-duration: 220ms;
  --sans: "Inter", "Aptos", "Segoe UI", system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  font: 94%/1.55 var(--sans);
  color: var(--ink);
  background: var(--background);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ecf3ed;
  --muted: #b5c8bc;
  --green: #aad9c4;
  --accent: #f3a489;
  --surface: #1d2b25;
  --background: #14201b;
  --light: #25372e;
  --pale: #30473b;
  --line: #3b5245;
  --control-line: #607a6b;
  --scroll-thumb: #658273;
  --tray: #101913;
  --button: #a6d0bc;
  --button-hover: #c0e3d2;
  --on-button: #12251e;
  --shadow: #0004;
}
* { box-sizing: border-box; }
html { overflow: hidden; overscroll-behavior: none; }
body {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  margin: 0;
  overflow: hidden;
  overflow: clip;
}
main {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overflow: clip;
}
main > section { grid-area: 1 / 1; min-height: 0; }
.scroll-pane { min-width: 0; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; }
.scroll-pane:focus-visible { outline-offset: -3px; }
:is(.scroll-pane, .project-dialog) { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
a { color: var(--green); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button, select, input { color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: fixed; z-index: 10; top: .5rem; left: .5rem; padding: .4rem .8rem; background: var(--surface); transform: translateY(-200%); }
.skip:focus { transform: none; }
.container { width: 100%; min-width: 0; padding-inline: var(--page-gutter); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 4.35rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(.45rem, 1.5vw, 1rem); }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font: 700 1.8rem/1 var(--serif); letter-spacing: -.04em; text-decoration: none; }
.brand img { display: block; flex: none; border-radius: 8px; }
.brand-name { white-space: nowrap; }
.brand-period { color: var(--accent); }
.header-actions { grid-column: 3; display: flex; align-items: center; gap: .35rem; }
.icon-button { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; padding: 0; color: var(--ink); border: 1px solid transparent; border-radius: .5rem; background: transparent; }
.icon-button:is(:hover, [aria-expanded="true"]) { border-color: var(--line); background: var(--light); }
.icon-button svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sun-icon, [data-theme="dark"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }
.language-menu { position: fixed; top: 3.7rem; right: var(--page-gutter); bottom: auto; left: auto; margin: 0; min-width: 9rem; padding: .38rem; border: 1px solid var(--line); border-radius: .58rem; background: var(--surface); color: var(--ink); box-shadow: 0 8px 20px var(--shadow); }
.language-menu button { width: 100%; display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .6rem; border: 0; border-radius: .3rem; background: var(--light); text-align: left; }
.header-topic { margin: .32rem 0; text-align: center; font: 700 clamp(1.1rem, 2.35vw, 1.85rem)/1.13 var(--serif); letter-spacing: -.025em; overflow-wrap: anywhere; }
.eyebrow { margin: 0 0 .55rem; color: var(--green); text-transform: uppercase; letter-spacing: .075em; font-size: .83rem; font-weight: 750; }
.catalog-body { display: grid; grid-template-columns: 16rem minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: clamp(14px, 1.7vw, 23px); padding-block: .85rem; }
.catalog-results { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; }
.catalog-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.catalog-heading h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; font: 700 1.95rem/1.18 var(--serif); letter-spacing: -.035em; }
.catalog-tools { display: flex; gap: .45rem .65rem; flex-wrap: wrap; align-items: center; }
.catalog-tools label { display: flex; align-items: center; gap: .45rem; min-width: 0; font-size: .9rem; }
.catalog-tools select { min-width: 0; max-width: min(15rem, 56vw); padding-block: .32rem; }
.catalog-tools .secondary { padding-block: .34rem; }
.catalog-heading output { color: var(--muted); font-size: .9rem; }
.catalog-scroll { margin-top: .75rem; margin-inline: -.25rem; padding: .25rem .25rem .8rem; }
.filters { display: grid; grid-auto-rows: max-content; gap: .7rem; }
.filters label { display: grid; min-width: 0; gap: .2rem; font-size: .92rem; font-weight: 650; }
select { padding: .45rem .6rem; border: 1px solid var(--control-line); background: var(--surface); border-radius: .35rem; max-width: 100%; font-weight: 400; }
.filter-reset, .footer-links button { padding: 0; border: 0; background: transparent; color: var(--green); }
.filter-reset { justify-self: start; font-size: .9rem; text-decoration: underline; text-underline-offset: .2em; }
.topic-groups { display: grid; gap: 1.6rem; }
.topic-group-title { margin: 0 0 .7rem; font: 700 1.27rem/1.25 var(--serif); }
.topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); align-items: stretch; gap: .85rem; }
.topics > :only-child { max-width: 28rem; }
.topic-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: .78rem; color: var(--ink); box-shadow: 0 6px 18px var(--shadow); text-decoration: none; }
.topic-card:hover { border-color: var(--green); }
.topic-cover { aspect-ratio: 2; max-height: 12rem; overflow: hidden; background: var(--light); }
.topic-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.image-placeholder {
  --placeholder-line: #9b9b9b;
  border: 1px solid var(--placeholder-line);
  background:
    linear-gradient(to top right, transparent calc(50% - .6px), var(--placeholder-line) calc(50% - .6px) calc(50% + .6px), transparent calc(50% + .6px)),
    linear-gradient(to bottom right, transparent calc(50% - .6px), var(--placeholder-line) calc(50% - .6px) calc(50% + .6px), transparent calc(50% + .6px)),
    white;
}
.topic-cover.image-placeholder { border-width: 0 0 1px; }
.topic-details { flex: 1; display: flex; flex-direction: column; padding: 1rem 1.15rem 1.1rem; }
.topic-card-title { margin: 0; font: 700 1.5rem/1.15 var(--serif); letter-spacing: -.03em; }
.topic-card:hover .topic-card-title { text-decoration: underline; text-underline-offset: .16em; }
.topic-description { margin: .55rem 0 1rem; color: var(--muted); }
.topic-extent { margin: auto 0 0; padding-top: .72rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .87rem; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.footer-inner { min-height: 3.35rem; padding-block: .65rem; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(.45rem, 1.25vw, 1rem); align-items: center; }
.footer-motto { margin: 0; font: italic 1rem/1.3 var(--serif); }
.footer-family { display: flex; align-items: center; gap: .3rem; font-size: .86rem; white-space: nowrap; }
.footer-family a { display: flex; align-items: center; gap: .16rem; color: var(--green); font: 700 1.15rem/1 var(--serif); text-decoration: none; }
.footer-family a:hover { text-decoration: underline; }
.footer-links { justify-self: end; display: flex; align-items: center; flex-wrap: wrap; justify-content: end; gap: clamp(.45rem, 1.25vw, 1.05rem); font-size: .85rem; font-weight: 350; }
.footer-links :is(a, button) { color: var(--muted); }
.footer-links a { text-decoration: none; }
.footer-links :is(a, button):hover { text-decoration: underline; }
.workspace { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); padding-block: .85rem; }
.views { display: flex; gap: .22rem; padding: .22rem; border: 1px solid var(--line); background: var(--light); border-radius: .5rem; }
.views button { border: 0; padding: .35rem .65rem; border-radius: .3rem; background: transparent; font-weight: 650; }
.views button[aria-pressed="true"] { background: var(--button); color: var(--on-button); }
.workspace-grid { --sidebar-width: 20rem; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--sidebar-width); grid-template-rows: minmax(0, 1fr); min-height: 0; gap: clamp(12px, 1.35vw, 24px); }
.sidebar-column { display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: .5rem; }
.sidebar {
  display: flex;
  flex-direction: column;
  flex: none;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .7rem;
}
.sidebar-primary[open] { flex: 1 1 auto; }
.sidebar > summary {
  flex: none;
  padding: .64rem 1rem;
  color: var(--ink);
  font-weight: 750;
  font-size: 1.02rem;
}
.sidebar[open] > summary { border-bottom: 1px solid var(--line); }
.sidebar summary:focus-visible { outline-offset: -3px; }
.sidebar-stack { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sidebar-menu { display: flex; flex-direction: column; flex: none; min-height: 0; border-bottom: 1px solid var(--line); }
.sidebar-menu:last-of-type { border-bottom: 0; }
.sidebar-menu[open] { flex: 1 1 auto; }
.sidebar-menu > summary {
  flex: none;
  padding: .51rem 1rem;
  color: var(--ink);
  font-size: .94rem;
  line-height: 1.35;
}
.sidebar-menu > summary:hover, .sidebar-menu[open] > summary { background: var(--light); }
.sidebar-footer { flex-direction: column-reverse; margin-block-start: auto; max-block-size: min(10rem, 36%); }
.sidebar-footer[open] > summary { border-bottom: 0; border-top: 1px solid var(--line); }
.sidebar-footer > summary:hover, .sidebar-footer[open] > summary { background: var(--light); }
.sidebar-menu summary::marker { color: var(--green); }
:is(.sidebar, .sidebar-menu)::details-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.sidebar-pane { flex: 1 1 auto; padding: .65rem .85rem .72rem 1rem; scrollbar-gutter: stable; }
.sidebar-pane > :first-child { margin-top: 0; }
.sidebar-pane > :last-child { margin-bottom: 0; }
:is(.outline, .related-nav) nav a { display: block; padding: .38rem .48rem; border-radius: .28rem; font-size: .92rem; text-decoration: none; }
.outline nav > a { font-weight: 650; }
.removed-sections { margin-top: .55rem; padding-top: .55rem; border-top: 1px solid var(--line); }
.removed-sections h3 { margin: 0 0 .28rem; font: 650 .82rem/1.25 var(--sans); color: var(--muted); }
.removed-sections ul { padding: 0; margin: 0; list-style: none; }
.restore-section { display: flex; width: 100%; align-items: baseline; gap: .45rem; padding: .32rem .38rem; border: 0; border-radius: .3rem; background: transparent; text-align: start; color: var(--green); }
.restore-section:hover { background: var(--light); }
.restore-section-icon { font-weight: 750; }
.restore-section small { display: block; color: var(--muted); }
#reset-section-order { margin-top: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:is(.outline, .related-nav) nav a:hover, .outline nav a[aria-current] { background: var(--pale); color: var(--ink); }

.section-links { padding-inline-start: .5rem; border-inline-start: 1px solid var(--line); margin: .25rem 0 .6rem .52rem; }
.section-links a { color: var(--muted); }
summary { color: var(--green); font-weight: 650; }
.resources p, .resources li { font-size: .89rem; }
.resources ul { margin: .45rem 0 0; padding-inline-start: 1.05rem; }
.resources li { margin-bottom: .3rem; }
.related-nav nav .all-related { margin-top: .32rem; text-decoration: underline; }


.ink { --block-spacing: 1; --paper-ink: #182b28; --paper-accent: #195747; --paper-line: #9fb6aa; --paper-tint: #eff5f0; color: var(--paper-ink); }


.ink h2 { margin: 0 0 calc(var(--block-spacing) * .52em); font: 700 2em/1.12 var(--serif); letter-spacing: -.025em; overflow-wrap: anywhere; }
.chapter-intro { color: #334f45; }
.ink .section-title { clear: both; margin: calc(var(--block-spacing) * .95em) 0 calc(var(--block-spacing) * .45em); font: 700 1.35em/1.18 var(--serif); color: var(--paper-accent); }
.ink p, .ink ol { margin: 0 0 calc(var(--block-spacing) * .82em); }
.ink ol { padding-inline-start: 1.45em; }
.ink li + li { margin-top: .27em; }

.ink table { clear: both; border: 1px solid var(--paper-line); border-collapse: collapse; width: 100%; margin: calc(var(--block-spacing) * .6em) 0 calc(var(--block-spacing) * .85em); text-align: start; font-size: .94em; }
.ink :is(th, td) { border: 1px solid var(--paper-line); padding: .43em .58em; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.ink thead th { background: var(--paper-tint); font-family: var(--sans); }
.ink tbody th { width: var(--row-heading-width, auto); font-weight: 700; }
.note { clear: both; margin: calc(var(--block-spacing) * .6em) 0 calc(var(--block-spacing) * .85em); border-left: .23em solid var(--paper-accent); background: var(--paper-tint); padding: .58em .8em; }
.note strong { color: var(--paper-accent); }
.note > strong { display: block; font-family: var(--sans); font-size: .91em; margin-bottom: .2em; }
.note p:last-child { margin-bottom: 0; }
.illustration {
  --max-image-height: 125mm;
  width: min(var(--image-width), calc(var(--max-image-height) * var(--figure-ratio, 2)));
  max-width: 100%;
  margin: calc(var(--block-spacing) * .3em) 0 calc(var(--block-spacing) * 1.05em);
  text-align: start;
}
.illustration img { display: block; width: 100%; height: auto; max-height: var(--max-image-height); object-fit: contain; }
.illustration:not(.is-borderless) img { border: 1px solid var(--paper-line); }
.illustration .image-placeholder { aspect-ratio: var(--figure-ratio, 2); }
.illustration.is-borderless .image-placeholder { border-color: transparent; }
.illustration figcaption { font: .82em/1.38 var(--sans); color: #394d47; padding-block: .38em 0; overflow-wrap: anywhere; }
.figure-caption, .figure-credit { display: block; }
.figure-credit { font-size: .89em; }
.illustration[data-position="center"] { margin-inline: auto; }
.illustration[data-position="right"] { margin-inline-start: auto; }
.illustration.is-wrap[data-position="right"] { float: right; margin-inline: .9em 0; }
.illustration.is-wrap[data-position="left"] { float: left; margin-inline: 0 .9em; }
.paper-unit { display: flow-root; }
.paper-unit:has(.section-preview-tools) { position: relative; }
.section-preview-tools {
  position: absolute;
  z-index: 2;
  inset-block-start: 0;
  inset-inline-end: 0;
  display: flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--control-line);
  border-radius: .42rem;
  background: var(--surface);
  color: var(--green);
  box-shadow: 0 3px 12px var(--shadow);
  transform: scale(calc(1 / var(--zoom, 1)));
  transform-origin: top right;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-duration) ease;
}
.paper-unit:hover > .section-preview-tools, .section-preview-tools:focus-within { opacity: 1; pointer-events: auto; }
.section-preview-actions { display: flex; align-items: center; gap: 2px; }
.section-preview-tools button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 27px;
  border: 0;
  padding: 0;
  border-radius: .28rem;
  background: transparent;
  font: 650 16px/1 var(--sans);
}
.section-preview-tools button:hover:not(:disabled) { background: var(--light); }
.section-preview-tools button:focus-visible { outline-offset: -2px; }
.section-preview-tools button:disabled { opacity: .35; cursor: default; }
.section-preview-tools button[data-action="remove"] { color: var(--accent); }
.section-preview-tools .section-preview-toggle { display: none; }
@media (hover: none), (pointer: coarse) {
  .section-preview-tools { opacity: 1; pointer-events: auto; }
  .section-preview-tools button { width: 32px; height: 32px; }
  .section-preview-tools .section-preview-toggle { display: grid; }
  .section-preview-actions { transition: opacity var(--motion-duration) ease, display var(--motion-duration) allow-discrete; }
  .section-preview-toggle[aria-expanded="false"] + .section-preview-actions { display: none; opacity: 0; }
  @starting-style { .section-preview-toggle[aria-expanded="true"] + .section-preview-actions { opacity: 0; } }
}
.project-dialog.curriculum-dialog {
  width: min(76rem, calc(100% - 1.4rem));
  height: min(44rem, calc(100dvh - 1.4rem));
  overflow: hidden;
}
.curriculum-shell { display: grid; height: 100%; grid-template-rows: auto auto minmax(0, 1fr); }
.curriculum-dialog .dialog-header { padding: .65rem 1rem .45rem; align-items: center; }
.curriculum-dialog .dialog-header h2 { margin: 0; }
.curriculum-bar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .4rem .75rem; padding: 0 1rem .65rem; }
.curriculum-tabs button[aria-selected="true"] { background: var(--button); color: var(--on-button); }
.curriculum-filters { display: flex; flex-wrap: wrap; align-items: end; gap: .35rem .7rem; font-size: .88rem; min-width: 0; }
.curriculum-filters label:not(.check) { display: grid; gap: .14rem; min-width: 0; max-width: 100%; }
.curriculum-filters select { padding: .26rem .44rem; }
.curriculum-filters .check { min-height: 2rem; align-items: center; }
.curriculum-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 30%); gap: .7rem; min-height: 0; padding: 0 1rem 1rem; }
.curriculum-layout:has(.curriculum-detail[hidden]) { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.curriculum-grid, .curriculum-detail {
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--surface);
}
.curriculum-grid { overflow: auto; }
.curriculum-table { width: 100%; border-spacing: 0; font-size: .9rem; }
.curriculum-table :is(th, td) { border-block-end: 1px solid var(--line); }
.curriculum-table thead th { position: sticky; top: 0; z-index: 2; background: var(--light); padding: .42rem .5rem; color: var(--ink); }
.curriculum-table thead th:first-child { inset-inline-start: 0; z-index: 3; text-align: start; min-width: 10rem; }
.curriculum-table thead small { display: block; font-weight: 400; color: var(--muted); }
.curriculum-table tbody th { text-align: start; }
.curriculum-table tbody th[scope="row"] { position: sticky; inset-inline-start: 0; z-index: 1; padding: 0; background: var(--surface); }
.curriculum-group th { padding: .42rem .5rem; color: var(--green); background: var(--light); font-weight: 750; }
.curriculum-table td { position: relative; text-align: center; min-width: 4.8rem; padding: .13rem .2rem; }
.curriculum-na { background: var(--background); }
.curriculum-row-action, .curriculum-cell-action { border: 0; background: transparent; color: inherit; }
.curriculum-row-action { width: 100%; min-height: 2rem; padding: .38rem .5rem; text-align: start; font-weight: 650; }
.curriculum-cell-action { position: absolute; inset: 0; width: 100%; padding: 0; }
.curriculum-cell:has(.curriculum-cell-action[aria-pressed="true"]) { background: var(--light); box-shadow: inset 0 0 0 1px var(--green); }
.curriculum-row-action[aria-pressed="true"], .curriculum-row-action:hover, .curriculum-cell:hover { background: var(--light); }
.curriculum-table :is(button, a):focus-visible { outline-offset: -2px; }
.curriculum-cell-empty, .curriculum-squares { position: relative; pointer-events: none; }
.curriculum-cell-empty { font-size: .85rem; color: var(--muted); }
.curriculum-squares { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.curriculum-square { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: .3rem; pointer-events: auto; }
.curriculum-square::before { content: ""; width: .75rem; height: .75rem; border-radius: 2px; background: var(--green); }
.curriculum-square:is(:hover, :focus-visible)::before { background: var(--accent); box-shadow: 0 0 0 3px var(--pale); }
.curriculum-detail { padding: .72rem .85rem; }
.curriculum-detail :is(h3, h4, p) { margin: 0 0 .52rem; }
.curriculum-detail h3 { font: 700 1.35rem/1.2 var(--serif); }
.curriculum-detail h4 { font-size: .94rem; }
.curriculum-context { font-size: .81rem; color: var(--muted); }
.curriculum-materials { list-style: none; padding: 0; margin: 0 0 .65rem; }
.curriculum-materials li { border-top: 1px solid var(--line); padding-top: .48rem; }
.curriculum-materials a { font-weight: 650; }
.curriculum-materials p, .curriculum-source { font-size: .88rem; }
#curriculum-empty { padding-inline: .8rem; }
.curriculum-help {
  position: absolute;
  z-index: 5;
  width: max-content;
  max-width: min(23rem, calc(100% - 14px));
  max-height: calc(100% - 14px);
  overflow: auto;
  padding: .65rem .75rem;
  border: 1px solid var(--control-line);
  border-radius: .55rem;
  background: var(--surface);
  box-shadow: 0 8px 30px #102c2140;
  font-size: .87rem;
  opacity: 1;
  transform: none;
  transition: opacity var(--motion-duration) ease, transform var(--motion-duration) ease, display var(--motion-duration) allow-discrete;
}
.curriculum-help[hidden] { opacity: 0; transform: translateY(.2rem); pointer-events: none; }
@starting-style { .curriculum-help:not([hidden]) { opacity: 0; transform: translateY(.2rem); } }
.curriculum-help-heading { display: grid; line-height: 1.3; gap: .22rem; }
.curriculum-help-heading span { color: var(--muted); font-size: .79rem; }
.curriculum-help :is(p, ul, dl) { margin: .4rem 0 0; }
.curriculum-help-list { padding-inline-start: 1.05rem; }
.curriculum-help-sabers dt { color: var(--green); font-size: .79rem; font-weight: 700; }
.curriculum-help-sabers dd { margin: 0 0 .32rem; }
.curriculum-help-sabers dd:last-child { margin-bottom: 0; }
.curriculum-help-material { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .65rem; }
.curriculum-thumbnail {
  position: relative;
  overflow: hidden;
  width: calc(210mm * .115);
  height: calc(297mm * .115);
  border: 1px solid var(--control-line);
  background: white;
}
.curriculum-thumbnail .sheet { position: absolute; inset: 0 auto auto 0; transform: scale(.115); transform-origin: top left; }
@media (max-width: 800px) {
  .curriculum-layout { grid-template: minmax(4rem, 1.2fr) minmax(0, 1fr) / minmax(0, 1fr); gap: .45rem; padding: 0 .6rem .6rem; }
  .curriculum-dialog .dialog-header { padding: .5rem .6rem .4rem; }
  .curriculum-bar { padding: 0 .6rem .5rem; }
  .curriculum-filters { gap: .27rem .5rem; }
  .curriculum-filters select { max-width: min(42vw, 11rem); }
  .curriculum-detail { padding: .5rem .65rem; }
}
@media (max-width: 520px) {
  .curriculum-table { font-size: .8rem; }
  .curriculum-table thead th:first-child { min-width: 6.5rem; }
  .curriculum-table td { min-width: 3.8rem; }
  .curriculum-square { width: 1.6rem; height: 1.6rem; }
}
.studio { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; background: var(--tray); border: 1px solid var(--line); border-radius: .65rem; overflow: hidden; }
.studio-pickers { grid-area: 1 / 1; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .3rem; padding: .35rem .6rem; }
.studio-pickers:not(:has(> :not([hidden]))) { display: none; }
.studio-pickers .document-picker { margin-inline-start: auto; }
.studio-pickers button { padding: .28rem .5rem; font-size: .83rem; }
.primary, .secondary { border: 1px solid var(--green); border-radius: .4rem; padding: .53rem .72rem; font-size: .91rem; font-weight: 650; }
.primary { background: var(--button); color: var(--on-button); }
.primary:hover { background: var(--button-hover); }
.secondary { background: var(--surface); color: var(--green); }
.secondary:hover { background: var(--light); }
.secondary[data-confirming-reset] { background: var(--button); color: var(--on-button); }
.zoom-controls {
  position: absolute;
  inset-inline-end: 1rem;
  inset-block-end: 1rem;
  z-index: 4;
  background: var(--surface);
  box-shadow: 0 3px 12px var(--shadow);
}
.zoom-controls button { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; }
.zoom-controls button:hover:not(:disabled) { background: var(--light); color: var(--green); }
.zoom-controls button:disabled { cursor: default; opacity: .42; }
.zoom-controls svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.paper-stack { overflow: auto; overflow-anchor: none; padding: .85rem .6rem 3.75rem; scrollbar-gutter: stable both-edges; }
#paper-stack, .paper-motion { grid-area: 2 / 1; }
.paper-motion { position: relative; min-width: 0; min-height: 0; overflow: clip; pointer-events: none; z-index: 3; }
@media screen {
  .illustration:has(.figure-style-trigger) { position: relative; }
  .figure-style-trigger {
    position: absolute;
    inset: .3rem .3rem auto auto;
    border: 1px solid #bcc9c1;
    border-radius: .34rem;
    padding: .16rem .42rem;
    background: #fffffff5;
    color: #254d40;
    font: 700 .83rem/1.35 var(--sans);
    opacity: .83;
  }
  .figure-style-trigger:is(:hover, :focus-visible) { opacity: 1; background: #e8f2ec; }
  .paper-stack:not(.is-repaginating) > .sheet-frame { overflow: clip; overflow-clip-margin: 4px; }
  .paper-stack.is-repaginating .sheet-body { overflow: visible; }
  .sheet-frame:has([data-paper-in-motion]) { z-index: 1; }
  .paper-unit[data-paper-in-motion="move"] { position: relative; z-index: 2; background: var(--preview-paper, white); }
}
.paper-ghost.sheet {
  position: absolute;
  height: auto;
  padding: 0;
  transform: scale(var(--ghost-zoom));
  transform-origin: top left;
  background: var(--preview-paper, white);
}
.sheet-frame { position: relative; margin: 0 auto .85rem; }
.sheet-frame:last-child { margin-bottom: 0; }
.sheet { width: 210mm; height: 297mm; padding: var(--margin); background: white; position: relative; font: var(--font-size)/var(--leading) var(--serif); }
@media screen {
  [data-theme="dark"] { --preview-paper: #f5efe3; }
  :is(.sheet-frame, .curriculum-thumbnail) > .sheet { background: var(--preview-paper, white); }
  :is(.sheet-frame, .curriculum-thumbnail, .paper-ghost) .image-placeholder { background-color: var(--preview-paper, white); }
}
.sheet-frame > .sheet { position: absolute; inset: 0 auto auto 0; transform: scale(var(--zoom, 1)); transform-origin: top left; box-shadow: 0 1px 6px #18392f30; }
.sheet-inner { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.sheet-header, .sheet-footer { flex: none; font: 600 9pt/1.25 var(--sans); }
.sheet-header { border-bottom: 1px solid var(--paper-line); padding-bottom: 2.2mm; margin-bottom: 4mm; color: var(--paper-accent); }
.sheet-header-fields { display: flex; align-items: center; gap: 3.5mm; color: var(--paper-ink); }
.sheet-header-brand { display: grid; justify-items: center; flex: none; gap: .7mm; font-size: 7.5pt; }
.sheet-header-logo { display: block; width: 13mm; height: 13mm; object-fit: contain; object-position: center; }
.sheet-header-logo.is-custom { width: 35mm; }
.sheet-student-fields { display: flex; flex: 1; gap: 3.5mm; min-width: 0; }
.sheet-student-field { display: flex; align-items: baseline; gap: 1.5mm; flex: 1; min-width: 0; }
.sheet-student-field::after { content: ""; flex: 1; border-bottom: 1px solid var(--paper-line); }
.sheet-student-name { flex: 2; }
.sheet-classroom-code {
  flex: none;
  max-inline-size: 46mm;
  margin-inline-start: auto;
  padding: 1.1mm 2.2mm;
  border: 1px solid #161616;
  border-radius: 1mm;
  background: #161616;
  color: white;
  font: 600 20pt/1.05 var(--sans);
  text-align: center;
  overflow-wrap: anywhere;
}
.sheet-classroom-code.is-outline { background: white; color: #161616; }
.sheet-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1em;
  border-top: 1px solid var(--paper-line);
  padding-top: 2mm;
  margin-top: 4mm;
  color: #394d47;
}
.sheet-material-code { grid-column: 2; letter-spacing: .07em; }
.sheet-page-number { grid-column: 3; justify-self: end; }
.sheet-footer-title { grid-column: 1; overflow-wrap: anywhere; }
.sheet-body { min-height: 0; flex: 1; overflow: hidden; }
.sheet[data-alignment="center"] .sheet-body :is(h2, h3, p) { text-align: center; }
.sheet[data-alignment="right"] .sheet-body :is(h2, h3, p) { text-align: right; }
.sheet[data-alignment="justify"] .sheet-body p { text-align: justify; }
#layout-probe { position: fixed; inset: 0 auto auto 0; width: 0; height: 0; overflow: hidden; contain: strict; visibility: hidden; pointer-events: none; }
.settings, #figure-settings {
  --field-row-gap: .56rem;
  --field-column-gap: .65rem;
  font-size: .9rem;
}
.option-group, .figure-options { display: grid; gap: var(--field-row-gap) var(--field-column-gap); }
.option-group { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.option-group > .full-width { grid-column: 1 / -1; }
:is(.settings, #figure-settings) label:not(.check, .figure-width) { display: block; min-width: 0; }
:is(.settings, #figure-settings) select, :is(.settings, #figure-settings) input[type="text"], :is(.settings, #figure-settings) input[type="range"] { display: block; min-width: 0; width: 100%; margin: .14rem 0 0; }
:is(.settings, #figure-settings) select { padding: .32rem .38rem; }
:is(.settings, #figure-settings) input[type="text"] { padding: .36rem .38rem; border: 1px solid var(--control-line); border-radius: .35rem; background: var(--surface); }
:is(.settings, #figure-settings) :is(.primary, .secondary) { padding-block: .36rem; }
.print-controls { flex: none; min-width: 0; }
.print-actions { display: flex; }
.print-actions > button { display: flex; align-items: center; justify-content: center; gap: .45rem; padding-block: .43rem; }
#print { flex: 1; border-start-end-radius: 0; border-end-end-radius: 0; }
#print-options { flex: none; border-inline-start-color: color-mix(in srgb, var(--on-button) 30%, transparent); border-start-start-radius: 0; border-end-start-radius: 0; }
.print-actions svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.print-actions button:focus-visible { z-index: 1; outline-offset: 2px; }
.print-menu { width: min(15rem, calc(100vw - 2 * var(--page-gutter))); padding: .45rem; border: 1px solid var(--line); border-radius: .5rem; color: var(--ink); background: var(--surface); box-shadow: 0 8px 20px var(--shadow); }
.print-menu button { width: 100%; text-align: start; }
.print-menu .hint { margin: .36rem .25rem .1rem; }
.print-status { margin: .4rem 0 0; max-block-size: 4rem; overflow: auto; }
@supports (top: anchor(bottom)) {
  .print-menu { inset: auto; top: calc(anchor(bottom) + .28rem); right: anchor(right); margin: 0; }
}
.template-tools { min-width: 0; }
.template-actions, .inline-template-form, .material-code-form { display: flex; align-items: center; gap: .36rem; }
.template-actions { flex-wrap: wrap; }
.template-actions button { flex: 1 1 auto; padding-inline: .48rem; }
.inline-template-form input[type="text"] { flex: 1; margin: 0; }
.inline-template-form button { flex: none; padding-inline: .46rem; }
#quick-template-status:not(:empty) { margin-top: .25rem; }
.material-code-form input {
  width: 10rem;
  min-width: 0;
  padding: .36rem .55rem;
  border: 1px solid var(--control-line);
  border-radius: .35rem;
  background: var(--surface);
}
.material-code-form button { padding-block: .36rem; }
.text-alignment { min-width: 0; border: 0; padding: 0; margin: 0; }
.text-alignment legend { padding: 0; margin-bottom: .2rem; }
.alignment-options { display: flex; }
.alignment-options label > span {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2rem;
  color: var(--green);
  border: 1px solid var(--control-line);
  cursor: pointer;
}
.alignment-options label + label > span { border-inline-start: 0; }
.alignment-options label:first-child > span { border-radius: .35rem 0 0 .35rem; }
.alignment-options label:last-child > span { border-radius: 0 .35rem .35rem 0; }
.alignment-options input:checked + span { background: var(--button); color: var(--on-button); }
.alignment-options input:focus-visible + span { outline: 2px solid var(--green); outline-offset: -2px; }
.alignment-options svg { width: .95rem; height: .95rem; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; }
.slider output { float: right; color: var(--muted); }
:is(.settings, #figure-settings) input[type="range"], :is(.settings, #figure-settings) input[type="checkbox"] { accent-color: var(--green); }
.check { display: flex; align-items: baseline; gap: .4rem; }
.check input { flex: none; }
.figure-control {
  min-width: 0;
  margin: 0 0 var(--field-row-gap);
  padding: .65rem var(--field-column-gap) .72rem;
  border: 1px solid var(--line);
  border-radius: .4rem;
}
.figure-control:last-child { margin-bottom: 0; }
.figure-heading { display: flex; align-items: center; gap: .4rem; min-height: 1.25rem; line-height: 1.25; }
.figure-name { flex: 1; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.figure-heading input { flex: none; margin: 0; }
.figure-remove {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  border: 0;
  border-radius: .25rem;
  background: transparent;
  color: var(--accent);
  font-size: 1.05rem;
  line-height: 1;
}
.figure-remove:hover { background: var(--light); }
.figure-options { padding-top: var(--field-row-gap); }
.figure-size-alignment, .figure-placement {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--field-row-gap) var(--field-column-gap);
}
.figure-size-alignment { justify-content: space-between; }
#figure-settings .figure-width {
  display: grid;
  flex: 1 1 6rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: .1rem .4rem;
  min-width: 0;
}
.figure-width-value { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
#figure-settings .figure-width input { grid-column: 1 / -1; margin: 0; }
.figure-width input:focus-visible { outline-offset: 1px; }
#figure-settings .figure-options :is(select, input[type="text"]) { margin: 0; }
.figure-placement select { flex: 1 1 5.5rem; text-overflow: ellipsis; }
.figure-placement .check { align-items: center; white-space: nowrap; }
.figure-placement .check input { margin: 0; }
.figure-notes > summary { font-size: .84rem; }
.figure-notes-fields { display: grid; gap: .45rem; margin-top: .4rem; font-size: .81rem; }
.figure-notes-fields label { color: var(--muted); }
#figure-settings .figure-notes-fields input { margin-top: .14rem; }
.figure-style-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.5rem, 2vw, 1rem); }
.figure-style-choice {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: .3rem;
  min-width: 0;
  padding: .55rem;
  border: 2px solid var(--line);
  border-radius: .6rem;
  background: var(--surface);
  text-align: start;
}
.figure-style-choice:is(:hover, [aria-pressed="true"]) { border-color: var(--green); background: var(--light); }
.figure-style-choice img, .figure-style-pending {
  width: 100%;
  aspect-ratio: 23 / 14;
  border-radius: .3rem;
  background: #fff;
}
.figure-style-choice img { object-fit: contain; }
.figure-style-pending { font-size: .8rem; overflow-wrap: anywhere; }
.figure-style-pending { display: grid; place-items: center; background: var(--light); }
.figure-helper {
  position: fixed;
  z-index: 12;
  max-height: calc(100dvh - 16px);
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 .35rem 1.25rem #17362b34;
}
.figure-helper-heading { display: flex; align-items: center; justify-content: space-between; gap: .35rem; margin-bottom: .45rem; }
.figure-helper-heading h2 { margin: 0; font-size: .85rem; line-height: 1.2; overflow-wrap: anywhere; }
.figure-helper-heading button { flex: none; width: 1.55rem; height: 1.55rem; }
.figure-helper .figure-style-choices { gap: .3rem; }
.figure-helper[data-orientation="landscape"] .figure-style-choices { grid-template-columns: minmax(0, 1fr); }
.figure-helper[data-orientation="portrait"] .figure-style-choice img { aspect-ratio: 4 / 5; }
.figure-helper .figure-upload-button { font-size: .78rem; padding: .32rem .45rem; }
.figure-helper {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity var(--motion-duration) ease, transform var(--motion-duration) ease,
    display var(--motion-duration) allow-discrete;
}
.figure-helper[hidden] { opacity: 0; transform: translateY(4px) scale(.98); pointer-events: none; }
@starting-style {
  .figure-helper:not([hidden]) { opacity: 0; transform: translateY(4px) scale(.98); }
}
.figure-style-choice { transition: border-color var(--motion-duration) ease, background-color var(--motion-duration) ease; }
.figure-fade-out { position: absolute; object-fit: contain; }
#figure-helper-status:not(:empty) { margin-top: .45rem; }
.figure-upload-button { grid-column: 1 / -1; }
.figure-style-choice:disabled { cursor: default; }
.figure-wrap:has(:disabled) { color: var(--muted); }
.upload { padding: .4rem; border: 1px solid var(--line); border-radius: .35rem; }
.upload input { width: 100%; display: block; margin-top: .3rem; font-size: .85rem; }
.hint { color: var(--muted); margin: 0; font-size: .82rem; }
#save-status { margin: .35rem 1rem .6rem; }
.project-dialog { width: min(46rem, 100% - 1.4rem); max-height: calc(100% - 1.4rem); padding: 0; border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); color: var(--ink); box-shadow: 0 18px 65px #061c1550; }
.release-dialog, .management-dialog { max-width: 34rem; }
.material-intro-dialog { width: min(52rem, 100% - 1.4rem); }
.material-intro-compare { margin-block: .9rem; }
.material-intro-picture {
  --split: 50%;
  position: relative;
  isolation: isolate;
  width: min(100%, 34rem, 70dvh);
  margin-inline: auto;
  aspect-ratio: 23 / 14;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: #fff;
}
.material-intro-picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.material-intro-picture img:nth-child(2) { clip-path: inset(0 0 0 var(--split)); }
.intro-divider {
  position: absolute;
  inset-block: 0;
  left: var(--split);
  width: 2px;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 0 1px #17362b77;
}
.material-intro-slider { display: block; width: min(100%, 34rem, 70dvh); margin: .35rem auto; accent-color: var(--green); }
.material-intro-style-options { width: fit-content; max-width: 100%; flex-wrap: wrap; margin-inline: auto; }
.management-form { display: grid; gap: .65rem; margin-top: .8rem; }
.management-dialog label:not(.check) { display: grid; gap: .2rem; min-width: 0; }
.management-dialog :is(select, input[type="text"]) { width: 100%; min-width: 0; padding: .42rem .55rem; }
.management-dialog input[type="text"] { border: 1px solid var(--control-line); border-radius: .35rem; background: var(--surface); }
.management-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.collection-fields { margin: 0; padding: .45rem .6rem; min-width: 0; border: 1px solid var(--line); border-radius: .4rem; }
.collection-topics { display: grid; gap: .3rem; }
.dialog-header { position: sticky; z-index: 1; top: 0; display: flex; align-items: start; justify-content: space-between; gap: .8rem; padding: 1.12rem 1.35rem .65rem; background: var(--surface); }
.dialog-header h2 { margin: .22rem 0 0; font: 700 clamp(1.4rem, 3.2vw, 1.9rem)/1.15 var(--serif); letter-spacing: -.025em; }
.dialog-header .icon-button { width: 2.15rem; height: 2.15rem; }
.dialog-content { padding: .15rem 1.35rem 1.35rem; font-size: .94rem; }
.dialog-content h3 { font-size: 1rem; margin: 0 0 .45rem; }
.dialog-content p { margin: 0 0 .7rem; color: var(--muted); }
.dialog-content ul { margin: .45rem 0 .85rem; padding-inline-start: 1.15rem; }
.dialog-content li + li { margin-top: .26rem; }
.v4v-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.v4v-intro small { color: var(--muted); }
.lightning-qr { padding: .35rem; border: 1px solid var(--line); border-radius: .45rem; background: #fff; }
.lightning-qr img { display: block; width: clamp(5rem, 15vw, 8rem); height: auto; }
.lightning-address { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem; }
.lightning-address code { font: inherit; overflow-wrap: anywhere; }
.lightning-address button { width: 1.9rem; height: 1.9rem; }
.lightning-address svg { width: 1rem; height: 1rem; }
.v4v-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; padding-top: 1.05rem; }
.v4v-resources { border-inline-start: 1px solid var(--line); padding-inline-start: 1.15rem; }
.v4v-resources ul { margin-bottom: 0; color: var(--muted); }
.author-card { display: flex; align-items: flex-start; gap: .74rem; }
.author-card img { width: clamp(3.8rem, 9vw, 7.5rem); height: auto; border-radius: .45rem; }
.author-card p { margin: 0 0 .35rem; }
.v4v-privacy { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .74rem; }
.v4v-privacy p { margin-top: .5rem; }
@media (max-width: 1050px) {
  .workspace-grid { --sidebar-width: 17rem; gap: .75rem; }
}
@media (max-width: 800px) {
  :root { --page-gutter: clamp(12px, 3vw, 16px); }
  .header-inner { min-height: 3.8rem; }
  .header-inner:has(.header-topic:not([hidden])) .brand-name { display: none; }
  .header-topic { font-size: clamp(1.1rem, 3.7vw, 1.5rem); }
  .header-inner .icon-button { width: 2.35rem; height: 2.35rem; }
  .language-menu { top: 3.45rem; }
  .catalog-heading { gap: .4rem .7rem; }
  .catalog-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: .65rem; padding-block: .75rem; }
  .catalog-filters { max-height: clamp(3.25rem, 30dvh, 13rem); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .filters select { min-width: 0; width: 100%; }
  .footer-inner { grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .6rem; min-height: 0; padding-block: .55rem; }
  .footer-motto { grid-column: 1 / -1; text-align: center; font-size: .88rem; }
  .footer-family { flex-wrap: wrap; font-size: .75rem; white-space: normal; }
  .footer-family a { font-size: 1.02rem; }
  .footer-links { gap: .6rem; font-size: .82rem; }
  .workspace { padding-block: .55rem .65rem; }
  .workspace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto minmax(0, 1fr); gap: .4rem; }
  .workspace-grid > .sidebar-column { grid-row: 1; }
  .workspace-grid > .studio { grid-area: 2 / 1 / 3 / 3; }
  .workspace-grid:has(> .sidebar-column > .sidebar[open]) > .sidebar-column {
    block-size: clamp(12.5rem, 38dvh, 19rem);
  }
  .workspace-grid:has(#settings[open]) > .sidebar-column { block-size: clamp(14rem, 42dvh, 21rem); }
  .workspace-grid .sidebar > summary { padding: .42rem .65rem; font-size: .96rem; }
  .workspace-grid .sidebar-menu > summary { padding-block: .41rem; }


  .v4v-grid { grid-template-columns: 1fr; }
  .v4v-resources { border-inline-start: 0; border-top: 1px solid var(--line); padding: 1rem 0 0; }
}
@media (max-width: 520px) {
  :is(.settings, #figure-settings) .option-group { grid-template-columns: minmax(0, 1fr); }
  .print-actions > button { padding-inline: .55rem; }
  .alignment-options label > span { width: 1.95rem; }
}
@media screen and (max-height: 520px) {
  .header-inner { min-height: 3.25rem; }
  .brand img { width: 2rem; height: 2rem; }
  .language-menu { top: 2.9rem; }
  .footer-inner { min-height: 2.7rem; padding-block: .35rem; }
  .catalog-body, .workspace { padding-block: .45rem; }
}
@media screen and (max-width: 800px) and (max-height: 520px) {
  .print-actions > button { padding-block: .3rem; }
  .workspace-grid .sidebar-menu > summary { padding-block: .24rem; }
  .workspace-grid .sidebar-footer { max-block-size: 29%; }
  .settings .sidebar-pane { padding-block: .36rem; }
}
/* Keep native focus, keyboard and accordion behavior during transitions. */
details { interpolate-size: allow-keywords; }

details::details-content {
  block-size: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    block-size var(--motion-duration) ease,
    opacity var(--motion-duration) ease,
    content-visibility var(--motion-duration) allow-discrete;
}

details[open]::details-content {
  block-size: auto;
  opacity: 1;
}

:is(#header-logo-options, #classroom-code-options, #page-footer-options, #figure-options, .figure-control > .figure-options) {
  interpolate-size: allow-keywords;
  block-size: auto;
  opacity: 1;
  overflow: clip;
  overflow-clip-margin: 3px;
  transition:
    block-size var(--motion-duration) ease,
    opacity var(--motion-duration) ease,
    display var(--motion-duration) allow-discrete;
}

:is(#header-logo-options, #classroom-code-options, #page-footer-options, #figure-options, .figure-control > .figure-options)[hidden] {
  block-size: 0;
  opacity: 0;
}

.project-dialog,
:is(.language-menu, .print-menu) {
  opacity: 0;
  transform: translateY(.35rem) scale(.985);
  transition:
    opacity var(--motion-duration) ease,
    transform var(--motion-duration) ease,
    display var(--motion-duration) allow-discrete,
    overlay var(--motion-duration) allow-discrete;
}
.project-dialog[open],
:is(.language-menu, .print-menu):popover-open {
  opacity: 1;
  transform: none;
}
.project-dialog::backdrop {
  background-color: transparent;
  transition:
    background-color var(--motion-duration) ease,
    display var(--motion-duration) allow-discrete,
    overlay var(--motion-duration) allow-discrete;
}
.project-dialog[open]::backdrop { background-color: #14261cc0; }

@starting-style {
  .project-dialog[open],
  :is(.language-menu, .print-menu):popover-open {
    opacity: 0;
    transform: translateY(.35rem) scale(.985);
  }
  .project-dialog[open]::backdrop { background-color: transparent; }
  :is(#header-logo-options, #classroom-code-options, #page-footer-options, #figure-options, .figure-control > .figure-options):not([hidden]) {
    block-size: 0;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --motion-duration: 0ms; }
}

@page { size: A4; margin: 0; }
.studio { container-type: inline-size; grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
.studio-pickers { grid-area: 1 / 1 / 2 / -1; justify-content: center; }
#paper-stack, .paper-motion { grid-area: 2 / 3; }
.zoom-controls { grid-area: 2 / 3; }
.variant-side {
  grid-row: 2;
  align-self: center;
  display: grid;
  gap: .55rem;
  width: clamp(4.75rem, 20cqi, 12rem);
  padding: .45rem;
  border: 0;
  border-radius: .5rem;
  background: transparent;
  min-width: 0;
  font-size: .78rem;
  font-weight: 650;
}
.variant-side-left { grid-column: 1; --variant-tilt: -6deg; }
.variant-side-right { grid-column: 5; --variant-tilt: 6deg; }
.variant-thumb {
  display: block;
  width: 100%;
  min-height: 2.5rem;
  pointer-events: none;
  transform: rotate(var(--variant-tilt));
  transition: transform var(--motion-duration) ease;
}
.variant-side:is(:hover, :focus-visible) .variant-thumb { transform: rotate(0); }
.variant-thumb .sheet-frame { overflow: hidden; display: block; box-shadow: 0 4px 12px var(--shadow); border-radius: 2px; }
.variant-side-name { overflow-wrap: anywhere; }
.variant-compare {
  grid-row: 2;
  align-self: center;
  z-index: 4;
  padding: .32rem .38rem;
  font-size: .72rem;
  white-space: nowrap;
}
.variant-compare-left { grid-column: 2; }
.variant-compare-right { grid-column: 4; }
.variant-compare svg { display: none; width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@container (max-width: 620px) {
  .variant-side { width: clamp(2.85rem, 20cqi, 8rem); padding: .32rem; font-size: .65rem; }
  .variant-compare { padding: .25rem; }
  .variant-compare svg { display: block; }
  .variant-compare span { display: none; }
}
.project-dialog.variant-comparison {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(94rem, calc(100% - clamp(1.25rem, 8vw, 7.5rem)));
  height: calc(100dvh - clamp(2rem, 12dvh, 6rem));
  overflow: hidden;
}
.project-dialog.variant-comparison:not([open]) { display: none; }
.variant-comparison[open]::backdrop { background-color: #14261c73; }
@starting-style {
  .variant-comparison[open]::backdrop { background-color: transparent; }
}
.variant-comparison .dialog-header { padding: .55rem .85rem .4rem; }
.comparison-sections {
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  padding: .15rem .65rem .48rem;
}
.comparison-sections button { flex: none; padding: .28rem .48rem; font-size: .75rem; white-space: nowrap; transition: background-color var(--motion-duration) ease, border-color var(--motion-duration) ease; }
.comparison-sections [aria-current] { background: var(--light); border-color: var(--green); }
.comparison-stage { position: relative; display: grid; grid-template-rows: minmax(0, 1fr); min-height: 0; }
.comparison-grid { display: grid; grid-template: minmax(0, 1fr) / repeat(2, minmax(0, 1fr)); gap: .4rem; min-height: 0; padding: 0 .35rem .35rem; }
.comparison-column { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: .22rem; min-width: 0; min-height: 0; }
.comparison-heading { margin: 0; text-align: center; font-size: .83rem; }
.comparison-paper { padding: .28rem; background: var(--tray); overflow-anchor: none; scrollbar-gutter: stable; }
.comparison-paper .sheet-frame { overflow: hidden; }
.comparison-paper::after { content: ""; display: block; height: var(--comparison-tail, 0px); }
.comparison-arrow {
  position: absolute;
  z-index: 2;
  inset-block-start: 50%;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 2px 12px var(--shadow);
}
.comparison-arrow-previous { inset-inline-start: .65rem; }
.comparison-arrow-next { inset-inline-end: .65rem; }
.comparison-arrow svg { width: 1.25rem; height: 1.25rem; }
.sheet[data-mark-core] .paper-core {
  border-inline-start: 2px solid var(--paper-accent);
  padding-inline-start: .55em;
  font-weight: 600;
}
@media (max-width: 620px) {
  .studio-pickers { padding: .25rem .15rem; gap: .2rem; }
  .studio-pickers button { padding: .22rem .3rem; font-size: .71rem; }
}

@media print {
  html, body { background: white; overflow: visible; }
  body { position: static; display: block; height: auto; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .skip, .site-header, #catalog, .site-footer, #layout-probe,
  .sidebar-column, .studio-pickers, .variant-side, .variant-compare, .zoom-controls, .print-menu, .section-preview-tools, .figure-style-trigger, .figure-helper, .paper-motion, dialog, noscript { display: none !important; }
  main, .workspace, .workspace-grid, .studio, .paper-stack { display: block; height: auto; width: auto; margin: 0; padding: 0; border: 0; background: white; overflow: visible; }
  .paper-stack { scrollbar-gutter: auto; }
  .sheet-frame { position: static; width: auto !important; height: auto !important; margin: 0 !important; break-after: page; }
  .sheet-frame:last-child { break-after: auto; }
  .sheet-frame > .sheet { position: static; transform: none; box-shadow: none; }
  .paper-unit[data-paper-in-motion] { transform: none !important; opacity: 1 !important; }
}
