@font-face{font-family:"Poiret One";src:url("fonts/PoiretOne-Regular.ttf") format("truetype");font-style:normal;font-weight:400;font-display:swap}
.tagline-phrase{white-space:nowrap}
/* Definite logo sizing avoids cyclic percentage-height/grid sizing in Firefox. */
.wordmark {
  --brand-size: 2.2rem;
  --tagline-size: .8rem;
  --tagline-lines: 1;
  display: inline-flex;
  align-items: flex-start;
  gap: .85rem;
  max-width: 100%;
  font-family: "Poiret One", sans-serif;
  font-size: var(--brand-size);
  font-weight: 400;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.1;
}
.wordmark img {
  display: block;
  flex: none;
  width: auto;
  height: calc(var(--brand-size) * 1.1 + .5rem + var(--tagline-size) * 1.5 * var(--tagline-lines));
  aspect-ratio: 218.86321 / 216.41512;
}
.wordmark > span { min-width: 0; }
.wordmark small {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: var(--tagline-size);
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--muted);
  margin-top: .5rem;
  white-space: nowrap;
}
/* Semantic roles are shared by native controls, chrome and feedback. */
:root{--paper:#f3f6fb;--surface:#ffffff;--ink:#172b46;--muted:#52637a;--accent:#205a9e;--accent-hover:#164578;--on-accent:#ffffff;--hover:#e2ebf7;--selection:#ccdef7;--selection-ink:#172b46;--line:#c8d3e2;--control-border:#60748d;--focus:#165fad;--success:#17613f;--success-surface:#e5f3ec;--warning:#6b3d91;--warning-surface:#f2eafa;--error:#a32342;--error-surface:#fbe9ee;--info:#205a9e;--info-surface:#e5effb;--disabled-surface:#e1e7ef;--disabled-ink:#526074;--backdrop:rgb(9 20 38 / .65);--media-backdrop:#0c1420;color-scheme:light;--space:1.5rem}
:root[data-appearance=dark]{--paper:#0e1929;--surface:#16263b;--ink:#e6edf7;--muted:#b5c4d8;--accent:#9ec4ff;--accent-hover:#c4dcff;--on-accent:#102540;--hover:#273e5b;--selection:#355d8d;--selection-ink:#ffffff;--line:#3b506a;--control-border:#9bb2cc;--focus:#a9cfff;--success:#8fdbb2;--success-surface:#183c31;--warning:#dbb7ff;--warning-surface:#352342;--error:#ffadbb;--error-surface:#432331;--info:#9ec4ff;--info-surface:#203951;--disabled-surface:#23334a;--disabled-ink:#adbbcd;--backdrop:rgb(3 9 18 / .78);--media-backdrop:#080e16;color-scheme:dark}
@media(prefers-color-scheme:dark){:root:not([data-appearance]){--paper:#0e1929;--surface:#16263b;--ink:#e6edf7;--muted:#b5c4d8;--accent:#9ec4ff;--accent-hover:#c4dcff;--on-accent:#102540;--hover:#273e5b;--selection:#355d8d;--selection-ink:#ffffff;--line:#3b506a;--control-border:#9bb2cc;--focus:#a9cfff;--success:#8fdbb2;--success-surface:#183c31;--warning:#dbb7ff;--warning-surface:#352342;--error:#ffadbb;--error-surface:#432331;--info:#9ec4ff;--info-surface:#203951;--disabled-surface:#23334a;--disabled-ink:#adbbcd;--backdrop:rgb(3 9 18 / .78);--media-backdrop:#080e16;color-scheme:dark}}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:1rem;line-height:1.65}a{color:var(--accent);text-underline-offset:.24em}a:hover{color:var(--ink)}:focus-visible{outline:3px solid var(--focus);outline-offset:5px}::selection{background:var(--selection);color:var(--selection-ink)}input{accent-color:var(--accent);caret-color:var(--accent)}h1,h2,h3,p{margin-top:0}h1,h2,h3{line-height:1.2;text-wrap:balance}h1{font-family:Georgia,serif;font-size:clamp(2.15rem,4.5vw,3.8rem);font-weight:400;letter-spacing:-.025em;margin-bottom:1rem}h2{font-family:Georgia,serif;font-size:1.6rem;font-weight:400;margin-bottom:.75rem}h3{font-size:1.15rem;margin-bottom:.6rem}p{max-width:70ch}button,.button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;background:var(--accent);color:var(--on-accent);border:1px solid var(--accent);border-radius:4px;padding:.65rem 1.1rem;font:inherit;font-weight:600;text-decoration:none;cursor:pointer}button:hover,.button:hover{background:var(--accent-hover);color:var(--on-accent)}button:disabled{cursor:default}.secondary{background:transparent;color:var(--accent)}.secondary:hover{background:var(--hover);color:var(--ink)}.text-button{border:0;background:none;color:var(--accent);padding:.25rem .5rem;font-weight:400;text-decoration:underline;text-underline-offset:.24em}.text-button:hover{background:transparent;color:var(--ink)}.skip{position:absolute;left:1rem;top:-5rem;background:var(--surface);padding:.8rem;z-index:2}.skip:focus{top:1rem}main{max-width:1200px;margin:0 auto;padding:3.5rem 2rem 5rem;min-height:65vh}.page-heading{margin-bottom:2.5rem}.page-heading p{color:var(--muted)}.lead{font-size:1.15rem;line-height:1.7}.welcome{max-width:740px;padding:3rem 0}.welcome .button{margin:.7rem 0 1rem}.quiet{color:var(--muted);font-size:.9rem}.demo-note{margin-top:2rem;padding-top:2rem;border-top:1px solid var(--line)}.demo-note p{color:var(--muted)}.library-list{border-top:1px solid var(--line)}.title-row{padding:2rem 0;display:flex;align-items:center;justify-content:space-between;gap:2.5rem;border-bottom:1px solid var(--line)}.title-row h2 a{text-decoration:none;color:var(--ink)}.title-row h2 a:hover{text-decoration:underline}.title-row p{margin-bottom:0;color:var(--muted)}.open-title{flex-shrink:0;min-height:44px;display:flex;align-items:center;gap:1rem}.back{display:inline-block;margin-bottom:2rem}.title-layout{display:grid;grid-template-columns:minmax(0,1fr)}.material{padding:1.5rem 0;border-top:1px solid var(--line)}.material p{color:var(--muted)}audio{display:block;width:100%;margin:1.2rem 0}.download-original{display:inline-block;padding:.4rem 0}.files{margin-top:3.5rem}.section-heading{margin-bottom:1.5rem}.section-heading p{color:var(--muted)}.file-list{border-top:1px solid var(--line)}.file-row{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:1rem;align-items:center;padding:1.4rem .5rem;border-bottom:1px solid var(--line);cursor:pointer}.file-row:hover{background:var(--hover)}.file-row input{width:20px;height:20px;margin:0}.file-description{display:block;color:var(--muted);font-size:.9rem;margin-top:.3rem}.file-size{display:block;text-align:right}.filename{color:var(--muted);font-size:.85rem;overflow-wrap:anywhere}.files-action{display:flex;align-items:center;gap:1.5rem;margin-top:1.5rem}.account-row{display:flex;align-items:center;justify-content:space-between;gap:2rem;border-top:1px solid var(--line);padding:1.3rem 0}.account-row h2{font-family:inherit;font-size:1.1rem;font-weight:600;margin-bottom:.25rem}.account-row p{margin-bottom:0;color:var(--muted)}.review-summary{padding:1.5rem;background:var(--surface);border:1px solid var(--line);max-width:720px}.review-summary dl{display:grid;grid-template-columns:1fr 1fr;max-width:400px}.review-summary dd{margin:0}.review-action{display:flex;align-items:center;gap:1.5rem;margin-top:2rem}.empty{padding:2rem 0}
@media(max-width:700px){.wordmark{--brand-size:2rem;--tagline-size:.75rem;--tagline-lines:2;gap:.5rem}.wordmark small{white-space:normal}.tagline-phrase{display:block}main{padding:2rem 1.2rem 3rem}.welcome{padding:1.5rem 0}.title-row{align-items:flex-start;gap:1rem;flex-direction:column;padding:1.5rem 0}.file-row{grid-template-columns:24px minmax(0,1fr)}.filename{grid-column:2}.files-action{align-items:flex-start;flex-direction:column;gap:.7rem}.files-action button{width:100%}.account-row{gap:1rem;align-items:flex-start;flex-direction:column}.account-row form,.account-row button{width:100%}.review-action{align-items:flex-start;flex-direction:column}.review-action button{width:100%}}
@media(prefers-reduced-motion:no-preference){a,button{transition:background-color .16s ease-out,color .16s ease-out}}

@media(max-width:700px){.file-error{color:var(--error);font-weight:600}}

.title-editor{max-width:760px}.shared-notice{padding:1rem 0;border-block:1px solid var(--line);color:var(--muted);margin-bottom:2rem}.editor-field{margin:0 0 2rem;padding:0;border:0;min-width:0}.editor-field label,.editor-field legend{display:block;font-weight:600;margin-bottom:.6rem}.bookmark-form input,.bookmark-form textarea,.bookmark-form select,.editor-field input[type=email],.editor-field input[type=text],.editor-field textarea{display:block;width:100%;background:var(--surface);color:var(--ink);border:1px solid var(--control-border);border-radius:4px;padding:.65rem .8rem;font:inherit;line-height:1.5;scrollbar-color:var(--muted) var(--surface)}.editor-field textarea{resize:vertical}.editor-field .quiet{margin:.5rem 0}.editor-field input[aria-invalid],.editor-field textarea[aria-invalid]{border:2px solid var(--error)}.editor-field fieldset{min-width:0}.editor-field input[type=checkbox]{width:20px;height:20px;margin-right:.7rem;flex-shrink:0}.editor-field #id_licences label{display:flex;align-items:center;min-height:44px;font-weight:400}.editor-errors,.current-metadata{padding:1.3rem;background:var(--surface);border:1px solid var(--line);margin-bottom:2rem;overflow-wrap:anywhere}.editor-errors h2,.current-metadata h2{font-size:1.4rem}.errorlist{color:var(--error);padding-left:1.3rem}.current-metadata dd{margin:0 0 1rem;white-space:pre-wrap}.current-metadata dt{font-weight:600}.editor-actions{display:flex;align-items:center;gap:2rem}.editor-actions a{display:inline-flex;align-items:center;min-height:44px}.editor-limit{margin-top:2rem}.curation-summary{border-block:1px solid var(--line);padding:1.5rem 0;margin-bottom:2rem}.curation-summary p{margin-bottom:.6rem}.title-state{font-size:.9rem;font-weight:600}.title-tags,.title-editor,.title-row,.page-heading{overflow-wrap:anywhere}.lead{white-space:pre-wrap}#save-feedback{font-weight:600}#reauth-help[hidden]{display:none}
@media(max-width:700px){.editor-actions{align-items:stretch;flex-direction:column;gap:.5rem}.editor-actions a{justify-content:center}.editor-errors,.current-metadata{padding:1rem}}

.category-choice #id_category label{display:flex;align-items:center;gap:.7rem;min-height:44px;font-weight:600}.category-choice input{width:20px;height:20px;flex-shrink:0}.category-choice p{margin-top:.8rem}.editor-field input[type=file]{display:block;max-width:100%;font:inherit;min-height:46px}.editor-errors[hidden]{display:none}
.curation-summary .button{margin:.25rem .5rem .25rem 0}

.material-order{padding-left:1.5rem}.material-order>li{padding:1.5rem 0;border-top:1px solid var(--line)}.material-order h2{font-family:inherit;font-size:1.1rem;font-weight:600;overflow-wrap:anywhere}.order-controls{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.position-control{display:flex;align-items:center;flex:1 1 16rem;flex-wrap:wrap;gap:.5rem;min-width:0;max-width:100%}.position-control label{flex:1 1 10rem;min-width:0;overflow-wrap:anywhere}.order-controls>a{display:inline-flex;align-items:center;min-height:44px;max-width:100%;overflow-wrap:anywhere}.order-controls select{font:inherit;min-height:46px;padding:.5rem;background:var(--surface);color:var(--ink);border:1px solid var(--control-border);border-radius:4px}.order-controls [hidden]{display:none}.material-tools{display:flex;gap:1.5rem;flex-wrap:wrap;margin-top:.8rem}.material-tools a{display:inline-flex;align-items:center;min-height:44px;overflow-wrap:anywhere;max-width:100%}

.video-study{display:grid;grid-template-columns:minmax(0,2fr) minmax(220px,1fr);gap:2rem;margin:1.5rem 0}.player-region{min-width:0}.player-region video{display:block;width:100%;max-height:65vh;background:var(--media-backdrop)}.video-actions{display:flex;gap:.6rem;flex-wrap:wrap;margin:1rem 0}.video-study [hidden],.chapter-row [hidden],[data-add-chapter][hidden]{display:none}.chapter-selector h4{font-size:1.1rem;margin:0 0 1rem}.chapter-selector label{display:block;font-weight:600}.chapter-selector select{font:inherit;width:100%;min-height:46px;background:var(--surface);color:var(--ink);padding:.5rem;border:1px solid var(--control-border);border-radius:4px;margin:.5rem 0 1rem}.chapter-selector ol{padding-left:1.4rem}.chapter-selector li{margin:.8rem 0;overflow-wrap:anywhere}.chapter-selector li a{display:block;min-height:44px}.chapter-row{border:0;border-top:1px solid var(--line);padding:1.5rem 0;margin-top:2rem;min-width:0}.chapter-row legend{font-weight:600;padding-right:1rem}.chapter-row input[type=checkbox]{width:20px;height:20px}.chapter-row .editor-field:has(input[type=checkbox]){display:flex;gap:1rem;align-items:center}.chapter-row .editor-field:has(input[type=checkbox]) label{margin:0}.video-study p{font-variant-numeric:tabular-nums}
@media(max-width:700px){.video-study{grid-template-columns:minmax(0,1fr);gap:1.5rem}.video-actions button{flex:1 1 auto}.chapter-selector{border-top:1px solid var(--line);padding-top:1.5rem}}

.video-progress{margin-bottom:2.5rem}.video-progress p{font-variant-numeric:tabular-nums}

/* Playback scope and the actual playhead are separate, explicitly named states. */
.playback-mode{padding:1rem 0;border-block:1px solid var(--line);margin-bottom:1rem}
.playback-mode p{margin:0;font-weight:600;color:var(--ink)}
.playback-mode.is-bounded{padding:1rem;background:var(--selection);border:1px solid var(--control-border)}
.playback-mode.is-bounded .secondary:not(:hover):not(:disabled){color:var(--selection-ink)}
.playback-mode button{margin-top:.75rem}
.video-range{margin:.75rem 0}
.chapter-complete{font-weight:600;color:var(--ink)}
/* A compact index keeps chapter choice beside the teaching. */
.chapter-selector{min-width:0}
.chapter-selector .chapter-list{list-style:none;padding:0;margin:0 0 1rem;max-height:24rem;max-height:min(24rem,60dvh);overflow-y:auto;scrollbar-gutter:stable;scrollbar-color:var(--muted) var(--paper)}
.chapter-selector .chapter-list>li{display:grid;grid-template-columns:1.5rem minmax(0,1fr) 44px;align-items:center;padding:0;margin:0;border-bottom:1px solid var(--line)}
.chapter-selector .chapter-list>li.is-studying{background:var(--selection);outline:1px solid var(--muted);outline-offset:-1px}
.chapter-jump{grid-column:2;grid-row:1;min-width:0;min-height:44px;width:100%;justify-content:flex-start;text-align:left;background:transparent;color:var(--accent);border:0;padding:.25rem 0;border-radius:0;font-weight:400;text-decoration:underline;text-underline-offset:.24em}
.chapter-jump>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chapter-jump:hover{background:var(--hover);color:var(--ink)}
.is-studying .chapter-jump{font-weight:700;color:var(--ink)}
.chapter-current{grid-column:1;grid-row:1;display:flex;justify-content:center;color:var(--success)}
.chapter-current svg{flex:none}
.chapter-study{grid-column:3;grid-row:1;min-height:44px;width:44px;padding:0;border:0;border-radius:0;background:transparent;color:var(--muted)}
.chapter-study[aria-pressed=true]{color:var(--ink)}
.chapter-list button:focus-visible{outline-offset:-3px}
.chapter-list:focus-visible{outline-offset:2px}
.chapter-selector .chapter-list>.chapter-empty{display:block;padding:.5rem 0}
.chapter-calculated{font-variant-numeric:tabular-nums;margin:0;padding-block:.5rem}
[data-chapter-impact]{font-weight:600;overflow-wrap:anywhere;margin-top:1.5rem}
.chapter-row .editor-field:has(input[type=checkbox]){min-height:44px}
@media(max-width:700px){.playback-mode button{width:100%}}

/* The document remains the focal surface; native controls share library tokens. */
.pdf-reader { max-width: 1100px; margin-inline: auto; }
.reader-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; padding-block: 1rem; border-block: 1px solid var(--line); }
.reader-control-group { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; min-width: 0; max-width: 100%; }
.reader-controls label { display: flex; align-items: center; gap: .5rem; }
.reader-controls input { width: 5rem; min-height: 46px; padding: .5rem; font: inherit; }
.reader-controls select { min-height: 46px; font: inherit; padding: .5rem; }
.pdf-viewport { position: relative; overflow: auto; max-height: 80vh; min-height: 10rem; background: var(--line); padding: .5rem; overscroll-behavior: auto; }
.pdf-viewport canvas { display: block; background: white; margin-inline: auto; }
/* Only the turning leaf moves; the opposite page stays readable. */
.pdf-turn-layer { position: absolute; pointer-events: none; overflow: hidden; perspective: 1800px; z-index: 1; }
.pdf-turn-leaf { position: absolute; width: 0; height: 0; transform-style: preserve-3d; transform-origin: 0 0; }
.pdf-turn-face { position: absolute; top: 0; backface-visibility: hidden; }
.pdf-turn-back { transform: rotateY(180deg); }
.pdf-turn-face canvas { box-shadow: 3px 2px 12px rgb(0 0 0 / .18); }
.pdf-spread { display: flex; align-items: start; justify-content: safe center; gap: .5rem; width: max-content; min-width: 100%; }
.pdf-spread figure { margin: 0; flex: none; }
.pdf-spread figure:only-child { margin-inline: auto; }
.pdf-viewport[data-pinching] { user-select:none; }
.pdf-viewport[data-pinching] .pdf-spread { will-change:transform; }
.pdf-spread figcaption { block-size: 3.3em; padding-block: .25rem; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.reader-recovery { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-block: 1rem; }
.page-text { padding-block: 1rem; }
.page-text summary { cursor: pointer; min-height: 44px; padding-block: .65rem; }
.page-text [data-page-text] { white-space: pre-wrap; max-width: 75ch; overflow-wrap: anywhere; }
.pdf-reader [data-page-label] { font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .reader-controls { align-items: end; } .pdf-viewport { padding: .25rem; } }
.pdf-reader [hidden] { display: none; }
.pdf-viewport { scrollbar-color: var(--muted) var(--line); }
.reader-controls input, .reader-controls select { background: var(--surface); color: var(--ink); border: 1px solid var(--muted); border-radius: 4px; }




.effect-search { margin-block: 1.5rem 2rem; }
.effect-search label { display: block; font-weight: 600; margin-bottom: .5rem; }
.effect-search input { flex: 1 1 auto; min-height: 46px; width: 100%; min-width: 0; padding: .7rem; font: inherit; border: 1px solid var(--muted); background: var(--surface); color: var(--ink); }
.effect-search button, .effect-search .editor-actions a { flex-shrink: 0; white-space: nowrap; }
.reference-group { padding-block: 1rem; border-bottom: 1px solid var(--line); }
.reference-group li { margin-block: .75rem; overflow-wrap: anywhere; }

.editor-field select { display: block; width: 100%; min-height: 46px; padding: .65rem .8rem; font: inherit; border: 1px solid var(--muted); border-radius: 4px; color: var(--ink); background: var(--surface); }
.editor-field input[type=number] { width: 10rem; max-width: 100%; min-height: 46px; padding: .65rem .8rem; font: inherit; border: 1px solid var(--muted); border-radius: 4px; color: var(--ink); background: var(--surface); }

.credit-list { overflow-wrap: anywhere; }
.credit-list li { margin-block: .75rem; }
/* Each readable record owns an adjacent group with ordinary native Tab order. */
.context-record { display:flex; align-items:flex-start; flex-wrap:wrap; gap:.5rem 1rem; }
.context-content { flex:1 1 24rem; min-width:0; overflow-wrap:anywhere; }
.context-content>:last-child { margin-bottom:0; }
.context-actions { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem; max-width:100%; }
.context-actions a { display:inline-flex; align-items:center; min-height:44px; max-width:100%; overflow-wrap:anywhere; }

/* Discussion formatting and curated discovery. */
.comments-toolbar { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .7rem; }
.comments-toolbar button { background: var(--surface); color: var(--accent); padding: .5rem .7rem; }
.comments-toolbar button.trix-active { background: var(--accent); color: var(--surface); }
trix-editor { display: block; min-height: 22rem; padding: 1rem; border: 1px solid var(--muted); border-radius: 4px; background: var(--surface); overflow-wrap: anywhere; caret-color: var(--accent); }
trix-editor:focus { outline: 3px solid var(--focus); outline-offset: 3px; }
trix-editor h3 { margin-top: 1rem; }
trix-editor [data-trix-cursor-target] { display: inline-block; width: 0; overflow: hidden; }
.comments-link:not(.trix-active) { display: none; }
.comments-link { display: flex; flex-wrap: wrap; gap: .6rem; padding-block: .75rem; }
.comments-link label { width: 100%; }
.comments-link input { min-height: 46px; max-width: 100%; font: inherit; padding: .5rem; }
.search-result { padding-block: 1.5rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.search-result h3 { font-family: Georgia, serif; font-size: 1.6rem; font-weight: 400; }
.search-hits { list-style: none; padding: 0; max-width: 75ch; }
.search-hits li { margin-block: 1.25rem; }
.search-hits p { margin-block: .25rem; }
.search-hits a { display: inline-flex; min-height: 44px; align-items: center; }

/* Shared discussion follows the existing open study-list surface. */
.discussion-entry { border-top:1px solid var(--line); padding:1.5rem 0; max-width:75ch; overflow-wrap:anywhere; }
.discussion-entry h2 { margin:0; font-size:1.2rem; }
.discussion-entry header p { margin:.35rem 0 1rem; }
.discussion-reply { margin-left:1.5rem; }
.discussion-actions { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; margin-top:1rem; max-width:100%; }
.discussion-actions a { min-height:44px; display:inline-flex; align-items:center; max-width:100%; overflow-wrap:anywhere; }
.discussion-body img, trix-editor img { max-width:100%; height:auto; }
.discussion-body figure { margin:1rem 0; }
.discussion-body figcaption { color:var(--muted); font-size:.95rem; }
.discussion-body { max-width:75ch; }
[data-discussion-source][hidden], [data-discussion-fallback][hidden] { display:none; }
trix-editor .trix-autoresize-clone { position:absolute; left:-9999px; max-height:0; overflow:hidden; }
trix-editor .attachment__caption-editor { font:inherit; width:100%; min-height:46px; }
trix-editor figure { margin:1rem 0; }
.discussion-body pre { white-space:pre-wrap; }
[data-discussion-compose] fieldset { margin:1.5rem 0; padding:1rem; border:1px solid var(--line); }
[data-discussion-compose] fieldset label { display:flex; gap:.65rem; align-items:flex-start; padding:.6rem 0; min-height:46px; cursor:pointer; }
[data-discussion-compose] fieldset input[type=radio] { flex-shrink:0; margin-top:.45rem; }
@media (max-width:700px) { .discussion-reply { margin-left:.75rem; } }
.files-selection { border:0; padding:0; margin:0; min-width:0; }
.files-selection legend { font-weight:600; margin-bottom:.75rem; }
.file-row { overflow-wrap:anywhere; }
.file-row:has(input:checked) { background:var(--surface); }
.files [hidden] { display:none; }
.files [data-files-status] { margin-top:1rem; font-weight:600; }
.bundle-navigation a { display:inline-flex; min-height:44px; align-items:center; }
.external-address, .external-resource { overflow-wrap:anywhere; }
.editor-field input[type=url] { display:block; width:100%; min-height:46px; padding:.7rem .8rem; font:inherit; border:1px solid var(--control-border); border-radius:4px; background:var(--surface); color:var(--ink); }
.licence-editor fieldset label { display:flex; align-items:flex-start; gap:.7rem; min-height:44px; padding:.5rem 0; font-weight:400; overflow-wrap:anywhere; }
.licence-editor fieldset input { flex-shrink:0; width:20px; height:20px; margin:.25rem 0 0; }
.licence-editor details { margin:1.5rem 0; border-block-start:1px solid var(--line); padding-top:1rem; }
.licence-editor summary { cursor:pointer; font-weight:600; min-height:44px; overflow-wrap:anywhere; }
.licence-editor dl { margin:1rem 0; }
.licence-editor dt { font-weight:600; }
.licence-editor dd { margin:0 0 .65rem; overflow-wrap:anywhere; }
.policy-comparison section { padding:1rem 0; border-block-end:1px solid var(--line); }
.policy-comparison h3 { font-size:1rem; line-height:1.5; overflow-wrap:anywhere; }
.policy-comparison dl { display:grid; grid-template-columns:7ch minmax(0,1fr); gap:.5rem 1rem; }

.title-filter select { min-height:46px; max-width:100%; padding:.65rem .8rem; font:inherit; color:var(--ink); background:var(--surface); border:1px solid var(--control-border); border-radius:4px; }

.account-actions { display:flex; align-items:center; flex-wrap:wrap; gap:1rem 2rem; }
.account-actions>a { display:inline-flex; align-items:center; min-height:44px; }
.account-editor .editor-field label { display:flex; align-items:center; min-height:44px; font-weight:400; }
.account-editor .editor-field legend { font-weight:600; }
.account-editor .editor-field input[type=checkbox] { margin-block:0; }
.account-editor .policy-comparison dd { margin:0; overflow-wrap:anywhere; }
.account-editor details { margin-block:1.5rem; }
.account-editor summary { cursor:pointer; min-height:44px; padding-block:.5rem; font-weight:600; }
.account-editor h2 { margin-top:2rem; }
@media(max-width:700px) { .account-actions { width:100%; align-items:flex-start; flex-direction:column; } .account-editor .editor-actions { flex-wrap:wrap; gap:1rem; } }

.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }

/* Comparable operational records share one reading and focus order at every width.
   Explicit table roles/headers in the templates retain relationships when stacked. */
.record-table { width:100%; border-collapse:collapse; table-layout:fixed; text-align:left; }
.record-table th, .record-table td { padding:1rem .75rem; vertical-align:top; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.record-table thead th { padding-block:.65rem; border-top:1px solid var(--line); font-size:.9rem; font-weight:600; }
.record-table tbody th { font-weight:600; }
.record-table th:first-child, .record-table td:first-child { padding-left:0; }
.record-table th:last-child, .record-table td:last-child { padding-right:0; }
.record-label { display:none; }
.record-values { list-style:none; padding:0; margin:0; }
.record-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.25rem 1rem; }
.record-actions a { display:inline-flex; align-items:center; min-height:44px; max-width:100%; }
.record-actions form { margin:0; max-width:100%; }
.record-actions > form, .record-actions > .quiet { flex-basis:100%; }
.record-actions button { text-align:left; }
.account-records #account-name { width:25%; }
.account-records #account-state { width:18%; }
.account-records #account-roles { width:20%; }
.account-records #account-actions { width:37%; }
.application-records #application-name { width:27%; }
.application-records #application-email { width:31%; }
.application-records #application-state { width:16%; }
.application-records #application-actions { width:26%; }
.licence-records #licence-name { width:30%; }
.licence-records #licence-view { width:25%; }
.licence-records #licence-download { width:28%; }
.licence-records #licence-actions { width:17%; }
@media(max-width:700px) {
 .record-table, .record-table tbody, .record-table tbody tr, .record-table tbody th, .record-table tbody td { display:block; width:100%; }
 .record-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
 .record-table tbody tr { padding:1rem 0; border-top:1px solid var(--line); }
 .record-table tbody tr:last-child { border-bottom:1px solid var(--line); }
 .record-table tbody th, .record-table tbody td { border:0; padding:.5rem 0; }
 .record-label { display:block; font-size:.9rem; font-weight:600; color:var(--muted); }
 .record-actions { flex-direction:column; align-items:flex-start; }
 .record-actions, .record-actions form, .record-actions button { width:100%; }
}

.membership-public { max-width: 46rem; }
.membership-public input:not([type=hidden]), .membership-public textarea { width: 100%; }
.application-message { white-space: pre-wrap; overflow-wrap: anywhere; }

.membership-public input[type=email] { display:block; background:var(--surface); color:var(--ink); border:1px solid var(--control-border); border-radius:4px; padding:.65rem .8rem; font:inherit; line-height:1.5; }
.preparation-action { display: inline-block; margin: .5rem .5rem 0 0; }

/* Member navigation remains reachable at narrow widths and enlarged text. */
.back, .download-original, .search-result h3 a, .title-row h2 a {
  display: inline-flex; align-items: center; min-height: 44px; max-width: 100%;
}
.bundle-navigation a { min-width: 44px; justify-content: center; }
summary { min-height: 44px; padding-block: .5rem; cursor: pointer; }
.reader-controls > * { max-width: 100%; }
.reader-controls label { flex-wrap: wrap; }
/* The whole File label is the target; its native checkbox keeps visible focus. */
.file-row:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
/* Native media focus can return from Replay inside the browser's control tree. */
video:focus-within { outline: 3px solid var(--focus); outline-offset: 5px; }

/* Profile tasks retain the library hierarchy and readable permission records. */
.profile-page > h2{margin-top:2.5rem}
.profile-page > form + form{margin-top:1rem}
.profile-page .profile-coverage{width:100%;table-layout:auto}
@media(max-width:700px){
 .profile-coverage thead{display:none}
 .profile-coverage,.profile-coverage tbody,.profile-coverage tr,.profile-coverage td{display:block;width:100%}
 .profile-coverage tr{padding-block:1rem;border-top:1px solid var(--line)}
 .profile-coverage td{padding:.35rem 0;border:0;overflow-wrap:anywhere}
 .profile-coverage td::before{content:attr(data-label);display:block;font-weight:600}
}

/* Hidden transfer controls must stay hidden inside flex action groups. */
[hidden] { display: none !important; }
[data-uploads] progress { width: 100%; accent-color: var(--accent); }
[data-uploads] input[type=file] { width: 100%; max-width: 100%; }
[data-upload-list] article { overflow-wrap: anywhere; }
[data-upload-list] article > a, [data-upload-list] article > button { margin: .5rem .75rem .5rem 0; }

/* Background activity shares the library's flat, readable controls. */
.task-indicator { display:inline-block; width:1rem; height:1rem; border:2px solid currentColor; border-top-color:transparent; border-radius:50%; margin-inline-end:.4rem; vertical-align:-.1rem; }
.tasks-running .task-indicator { animation:task-spin 1s linear infinite; }
@keyframes task-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .tasks-running .task-indicator { animation:none; border-style:dotted; } }
.task-records .task-reason { margin:.5rem 0 0; }
.task-records [data-task-state="failed"] .task-status { color:var(--error); font-weight:700; }
[data-tasks-page] h2 { overflow-wrap:anywhere; }
.browser-work { padding:1rem; background:var(--surface); border:1px solid var(--line); }
.pending-addition input[type="file"] { max-width:100%; }
.pending-addition progress { width:100%; accent-color:var(--accent); }
.editor-field label:has(input[type="radio"]) { display:flex; align-items:center; gap:.5rem; min-height:44px; }
[data-completed-tasks] { margin-top:2rem; border-top:1px solid var(--line); padding-top:1rem; }
[data-completed-tasks] > summary { min-height:44px; cursor:pointer; color:var(--accent); }
[data-task-freshness], [data-material-freshness] { color:var(--warning); }
[data-task-attention]:not(:empty), [data-task-unavailable]:not([hidden]) { font-weight:600; }

.video-study.without-chapters{grid-template-columns:minmax(0,1fr)}

/* Title artwork extends the readable library; whole covers remain visible. */
.title-art { --art-width:216px; --art-height-limit:calc(var(--art-width) * 4 / 3); --title-art-halo:color-mix(in srgb,var(--accent) 24%,transparent); width:fit-content; max-width:min(100%,var(--art-width)); flex:none; }
.title-art img { display:block; width:auto; height:auto; max-width:100%; max-height:calc(var(--art-width) * 4 / 3); object-fit:contain; filter:drop-shadow(0 0 8px var(--title-art-halo)); }
@supports (width:attr(width px)) {
 .title-art img[width][height] {
  /* Both auto dimensions otherwise ignore the HTML hints before decode.
     Bound the actual intrinsic width by the existing width AND height limits. */
  width:min(attr(width px),var(--art-width),calc(var(--art-height-limit) * attr(width type(<number>)) / attr(height type(<number>))));
  aspect-ratio:attr(width type(<number>)) / attr(height type(<number>));
 }
}
.title-art-small { --art-width:108px; }
.collection-title { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1rem; }
.collection-title h3 { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.title-row-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.title-identity { display: grid; grid-template-columns: 216px minmax(0,1fr); align-items: center; gap: 2.5rem; margin-bottom: 2.5rem; }
.title-identity .page-heading { margin-bottom: 0; overflow-wrap: anywhere; }
.title-identity .lead { margin-bottom: 0; }

/* Description markup is scoped so the HTML discussion policy and
   existing page typography keep their independent presentation. */
.description { min-width: 0; max-width: 70ch; overflow-wrap: anywhere; }
.markdown-toolbar { display: flex; flex-wrap: wrap; gap: .35rem; margin-block: .5rem; }
.markdown-toolbar button { min-height: 44px; padding: .35rem .65rem; font-size: .9rem; }
.markdown-toolbar button:focus-visible { outline-offset: 1px; }
.editor-field .markdown-help, .editor-field .markdown-status { margin-block: .5rem; }
.markdown-status:empty { display: none; }
textarea[data-markdown] { caret-color: var(--accent); scrollbar-color: var(--muted) var(--surface); }
.description.lead, .current-metadata dd.description { white-space: normal; }
.description > :last-child { margin-bottom: 0; }
.description p { margin-bottom: .8em; }
.description h3 { margin-top: 1.4em; }
.description h3:first-child { margin-top: 0; }
.description blockquote { margin-inline: 0; padding-inline-start: 1rem; border-inline-start: 1px solid var(--muted); color: var(--muted); }
.description pre { max-width: 100%; overflow: auto; padding: .8rem; background: var(--surface); scrollbar-color: var(--muted) var(--surface); }
.description :not(pre) > code { overflow-wrap: anywhere; }
.description-table { max-width: 100%; overflow: auto; margin-block: 1rem; scrollbar-color: var(--muted) var(--surface); }
.description table { border-collapse: collapse; width: max-content; min-width: 100%; }
.description th, .description td { padding: .5rem .7rem; border: 1px solid var(--line); text-align: start; vertical-align: top; }
.description th { background: var(--surface); }
.file-row { cursor: auto; align-items: start; }
.file-row input { margin-top: 12px; }
.file-copy { min-width: 0; }
.file-copy > label { display: block; min-height: 44px; cursor: pointer; padding-block: .55rem; }
.file-description { margin-top: 0; }
.hero-editor-layout { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 3rem; }
.hero-editor-layout .title-art { margin-bottom:1rem; }
.hero-editor-layout form { min-width: 0; }
.person-biography + h2, .effect-description + h2 { margin-block-start: 2rem; }
.person-portrait { margin-block: 1rem 2rem; }
.person-portrait img { display: block; width: auto; height: auto; max-width: min(320px, 100%); max-height: 420px; object-fit: contain; }
.hero-remove { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.poster-editor-layout { display: grid; grid-template-columns: minmax(10rem,14rem) minmax(0,1fr); gap: 2rem; }
.poster-editor-layout > section { min-width: 0; }
.poster-editor-layout form { min-width: 0; }
.poster-preview { display: block; width: auto; height: auto; max-width: 100%; max-height: 24rem; object-fit: contain; object-position: left center; }
.poster-editor-layout > section:first-child .poster-preview { max-height: 12rem; }
.poster-preview[hidden] { display: none; }
.poster-source { margin: 0 0 1.5rem; padding: .75rem 1rem; border: 1px solid var(--line); }
.poster-source label { display: flex; gap: .6rem; align-items: center; min-height: 44px; min-width: 0; overflow-wrap: anywhere; }
.poster-source input { width: auto; flex-shrink: 0; }
.poster-editor-layout [hidden] { display: none; }
.poster-editor-layout h3 { margin-top: 1.5rem; }
.poster-editor-layout .editor-actions { flex-wrap: wrap; }
.frame-video-preview, .frame-review, .frame-preview-area { display: grid; gap: .75rem; min-width: 0; }
.frame-video-preview { margin-block: 1rem 1.5rem; }
.frame-video-preview video { width: 100%; background: var(--media-backdrop); }
.frame-video-preview > button { justify-self: start; max-width: 100%; }
.frame-review { margin-block: 1.5rem; }
.frame-video-preview > p, .frame-review > h3, .frame-preview-area > p { margin: 0; overflow-wrap: anywhere; }
.poster-editor-layout .frame-review .editor-actions { margin: 0; gap: .75rem; }
.poster-editor-layout [data-frame-playhead], .poster-editor-layout [data-frame-count] { font-variant-numeric: tabular-nums; }
@media (max-width:700px) {
  .title-row { display: grid; grid-template-columns: 84px minmax(0,1fr); align-items: start; column-gap: 1rem; row-gap: .8rem; }
  .title-art-small { --art-width:84px; }
  .title-row .open-title { grid-column: 2; }
  .title-identity { grid-template-columns: minmax(0,1fr); gap: 1.5rem; }
  .title-identity .title-art { --art-width:160px; }
  .hero-editor-layout { grid-template-columns: minmax(0,1fr); gap: 2rem; }
  .poster-editor-layout { grid-template-columns: minmax(0,1fr); gap: 2rem; }
}

/* Optional plain creator metadata stays with its title, ahead of other content. */
.title-name { min-width: 0; margin-bottom: .75rem; overflow-wrap: anywhere; }
.title-name > h1, .title-name > h2, .title-name > h3 { margin-bottom: 0; }
.title-byline { display: block; margin-top: .25rem; color: var(--muted); font-size: .9rem; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
.title-study-identity .title-byline { font-size:1.15rem; }
.collection-records > .title-row .title-byline { font-size:1rem; }
.title-tags { display:flex; flex-wrap:wrap; gap:.35rem .4rem; margin:.5rem 0 0; padding:0; list-style:none; min-width:0; }
.title-tags > li { min-width:0; max-width:100%; padding:.15rem .5rem; border:1px solid var(--line); border-radius:4px; background:var(--surface); color:var(--muted); font-size:.85rem; line-height:1.5; overflow-wrap:anywhere; }
.title-licences { margin-top:.5rem; min-width:0; font-size:.85rem; line-height:1.5; }
.title-licences > span { color:var(--muted); }
.title-licences > ul { display:flex; flex-wrap:wrap; gap:.35rem .4rem; margin:.25rem 0 0; padding:0; list-style:none; min-width:0; }
.title-licences li { min-width:0; max-width:100%; padding:.15rem .5rem; border:1px solid var(--line); border-radius:4px; background:var(--info-surface); color:var(--ink); overflow-wrap:anywhere; }
.material-kinds { display:flex; flex-wrap:wrap; gap:.5rem; margin:.5rem 0 0; padding:0; list-style:none; }
.material-kinds li { display:flex; align-items:center; margin:0; }
.material-kinds svg { width:1rem; height:1rem; flex:none; }
.collection-records > .title-row .material-kinds { color:var(--accent); }
.collection-records > .title-row .material-kinds svg { width:1.25rem; height:1.25rem; }
.title-row-metadata { display:flex; flex-wrap:wrap; align-items:flex-start; gap:.35rem .5rem; min-width:0; }
.title-row-metadata:has(> ul) { margin-top:.5rem; }
.title-row-metadata > ul { margin:0; min-width:0; max-width:100%; }
.title-row-metadata > .material-kinds { padding-block:.35rem; }
.title-row-metadata > .title-tags { flex:1 1 0; }
.collection-title .title-name { margin-bottom: 0; }
.title-identity .title-name { margin-bottom: 1rem; }
[data-impact-title] > summary .title-byline { margin-bottom: .5rem; }

/* Existing title tools keep one reading order, grouped by the staff task. */
#title-maintenance .title-tool-group { display:grid; grid-template-columns:13rem minmax(0,1fr); gap:.5rem 1.5rem; padding-block:1.25rem; border-top:1px solid var(--line); overflow-wrap:anywhere; }
#title-maintenance .title-tool-group:first-child { border-top:0; padding-top:0; }
#title-maintenance .title-tool-group h2 { font-family:inherit; font-size:1.1rem; font-weight:600; margin:0; padding-top:.6rem; }
#title-maintenance .title-tool-group p { margin-bottom:.5rem; }
#title-maintenance .title-tool-links { display:flex; flex-wrap:wrap; align-items:center; gap:.25rem 1.5rem; list-style:none; padding:0; margin:0; }
#title-maintenance .title-tool-links li { min-width:0; max-width:100%; }
#title-maintenance .title-tool-links a { display:inline-flex; align-items:center; min-height:44px; max-width:100%; padding-block:.5rem; }
#title-maintenance .title-publication-tools { margin-top:1rem; padding-top:.75rem; border-top:1px solid var(--line); }
#title-maintenance .title-permanent-deletion { margin-top:1rem; }
@media (max-width:700px) {
  #title-maintenance .title-tool-group { grid-template-columns:minmax(0,1fr); gap:.5rem; }
  #title-maintenance .title-tool-group h2 { padding-top:0; }
}

/* Shared shell stays in document flow; its opaque surfaces cover scrolling content. */
:root { --header-art:url("header-celestial-light.webp"); scroll-padding-top:var(--shell-offset, 14rem); }
:root[data-appearance=dark] { --header-art:url("header-celestial-dark.webp"); }
@media(prefers-color-scheme:dark) {
 :root:not([data-appearance]) { --header-art:url("header-celestial-dark.webp"); }
}
.site-header { position:sticky; top:0; z-index:10; background:var(--paper); border-bottom:1px solid var(--line); max-height:100vh; max-height:100dvh; overflow-y:auto; scrollbar-color:var(--muted) var(--paper); }
.skip { position:fixed; z-index:20; }
.shell-brand-surface { position:relative; background:var(--paper); }
.shell-brand-surface::before { content:""; position:absolute; right:0; bottom:0; height:100%; aspect-ratio:2048 / 683; max-width:100%; background-image:var(--header-art); background-size:contain; background-position:right bottom; background-repeat:no-repeat; mask-image:linear-gradient(90deg,transparent,#000 45%); pointer-events:none; }
.shell-brand-row { position:relative; max-width:1200px; margin-inline:auto; padding:1rem 2rem; }
@media (min-width:701px) {
 .shell-brand-row { padding-block:1.5rem; }
}
@media (min-width:701px) and (max-width:1024px) {
 .shell-brand-surface::before { display:none; }
}
@media (min-width:1025px) {
 .shell-brand-surface::before {
  height:80px; top:50%; bottom:auto; transform:translateY(-50%);
  right:max(6rem, calc((100% - 1200px) / 2 + 6rem));
 }
}
.shell-navigation { max-width:1200px; margin-inline:auto; padding:0 2rem; background:var(--paper); }
html:has(body.reader-focus) { scroll-padding-top:0; }
.shell-navigation > summary { min-height:46px; cursor:pointer; padding-block:.5rem; font-weight:600; }
.shell-location { margin-left:1rem; font-weight:400; color:var(--muted); }
.shell-menu { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.5rem 2rem; padding-bottom:.5rem; }
.primary-navigation, .session, .context-navigation { display:flex; flex-wrap:wrap; align-items:center; gap:.25rem 1.5rem; }
.primary-navigation a, .session a, .context-navigation a { display:inline-flex; align-items:center; min-height:46px; max-width:100%; overflow-wrap:anywhere; }
.session { font-size:.88rem; gap:.25rem 1rem; }
.session form { margin:0; }
.account-name { overflow-wrap:anywhere; }
.primary-navigation a[aria-current], .context-navigation a[aria-current], .session a[aria-current] { font-weight:700; color:var(--ink); text-decoration-thickness:2px; }
.context-navigation { padding-block:0 1rem; margin-bottom:2rem; border-bottom:1px solid var(--line); }
@media(min-width:701px) {
 .site-header { max-height:none; overflow:visible; }
 .shell-navigation > summary { display:none; }
 .shell-navigation:not([open]) > .shell-menu { display:flex; }
 .shell-navigation::details-content { content-visibility:visible; }
}
@media(max-width:700px) {
 :root { scroll-padding-top:var(--shell-offset, 20rem); }
 .shell-brand-row { padding:1rem 1.2rem; }
 .shell-brand-surface::before { height:90px; }
 .shell-navigation { padding-inline:1.2rem; }
 .shell-navigation[open] > .shell-menu { display:flex; flex-direction:column; align-items:stretch; gap:.75rem; padding-block:.5rem 1rem; }
 .primary-navigation, .session { gap:.25rem 1rem; }
 .session { border-top:1px solid var(--line); padding-top:.75rem; }
 .account-name { flex-basis:100%; }
 .context-navigation { gap:.25rem 1rem; margin-bottom:1.5rem; }
}

/* Operational pages opt in; study, title and reading typography retain their scale. */
.operational-page { padding-top:2rem; }
.operational-page h1 { font-size:2rem; }
.operational-page .page-heading { margin-bottom:1.5rem; }
.operational-page .page-heading h1 { margin-bottom:.75rem; }
.operational-page .page-heading p:last-child { margin-bottom:0; }
.operational-page .back { min-height:44px; margin-bottom:.75rem; }
.task-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem 2rem; }
.task-heading > div:first-child { min-width:0; }
.task-heading p { max-width:65ch; }
.task-actions { display:flex; flex-wrap:wrap; gap:.5rem; flex-shrink:0; }
.task-navigation { display:flex; flex-wrap:wrap; gap:.25rem 1.5rem; margin-bottom:1.5rem; }
.task-navigation a, .catalogue-effects { display:inline-flex; align-items:center; min-height:44px; }
.task-navigation [aria-current] { font-weight:700; color:var(--ink); }
.catalogue-tools { display:flex; align-items:flex-start; gap:1.5rem 2rem; margin-bottom:1.5rem; }
.catalogue-tools .effect-search { margin:0; }
.catalogue-tools .title-filter { flex:0 1 22rem; }
.catalogue-tools .title-filter .quiet { margin-block:.5rem 0; }
.catalogue-search { flex:1 1 24rem; min-width:0; }
.catalogue-tools .editor-actions { gap:.75rem; }
.context-panel { margin-bottom:1.5rem; border-bottom:1px solid var(--line); }
.context-panel > summary { min-height:46px; padding-block:.5rem; cursor:pointer; font-weight:600; }
.context-location { margin-left:1rem; font-weight:400; color:var(--muted); }
.context-panel .context-navigation { margin:0; border:0; padding-bottom:.75rem; }
.entrance-page { padding-top:2rem; }
.entrance-layout { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); align-items:center; gap:2rem; }
.entrance-copy { min-width:0; }
.entrance-art { display:block; width:100%; max-width:32rem; height:auto; justify-self:center; }
.entrance-page .welcome { padding-block:1rem 2rem; }
.entrance-page .welcome h1 { font-size:clamp(1.95rem,4vw,3.4rem); color:#0E1929; }
:root[data-appearance=dark] .entrance-page .welcome h1 { color:#5E6570; }
@media(prefers-color-scheme:dark) {
 :root:not([data-appearance]) .entrance-page .welcome h1 { color:#5E6570; }
}
.entrance-actions { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem 1.5rem; margin-block:1.5rem 1rem; }
.entrance-actions a { min-height:46px; display:inline-flex; align-items:center; }
.entrance-page .welcome .button { margin:0; }
@media(max-width:800px) {
 .entrance-layout { grid-template-columns:minmax(0,1fr); }
 .entrance-art { max-width:28rem; }
}
@media(min-width:701px) {
 .context-panel > summary { display:none; }
 .context-panel:not([open]) > .context-navigation { display:flex; }
 .context-panel::details-content { content-visibility:visible; }
}
@media(max-width:900px) {
 .task-heading, .catalogue-tools { flex-direction:column; }
 .catalogue-tools > .title-filter, .catalogue-search { flex:initial; width:100%; }
}
@media(max-width:700px) {
 .operational-page, .entrance-page { padding-top:1.5rem; }
 .context-panel { margin-bottom:1rem; }
 .context-panel[open] > .context-navigation { display:flex; }
 .task-actions { flex-shrink:1; }
 /* Text-only discovery and policy records have no artwork column. */
 .text-record-list .title-row { display:flex; flex-direction:column; }
 .catalogue-tools .editor-actions { flex-direction:row; flex-wrap:wrap; align-items:center; }
 .catalogue-tools .effect-search input { flex:1 1 10rem; }
 .entrance-page .welcome { padding-top:0; }
}

/* Title entry: identity and explicit per-material choices precede optional context. */
.title-study-back { min-height:44px; margin-bottom:1rem; }
.title-study-identity { grid-template-columns:240px minmax(0,1fr); gap:1.5rem; margin-bottom:1rem; }
.title-study-identity .title-art { --art-width:240px; }
.title-study-identity h1 { font-size:2rem; margin-bottom:.5rem; }
.title-study-identity .title-name { margin-bottom:0; }
.title-navigation { margin-bottom:1rem; }
.title-context { margin-bottom:1.5rem; }
.title-disclosure { border-block:1px solid var(--line); margin-bottom:.5rem; overflow-wrap:anywhere; }
.title-disclosure > summary { min-height:46px; padding:.5rem 0; cursor:pointer; font-weight:600; }
.title-disclosure-body { padding-block:1rem; }
.title-disclosure-body > section, .title-disclosure-body > .description { margin-bottom:1.5rem; }
.title-disclosure-body.curation-summary { border:0; margin:0; }
.title-disclosure-body.curation-summary section { margin-top:1.5rem; }
.title-study-details { margin-top:2rem; }
.title-study-details .video-progress { padding-block:1rem; margin-bottom:0; }
@media(max-width:700px) {
 .title-study-identity { grid-template-columns:128px minmax(0,1fr); gap:1rem; }
 .title-study-identity .title-art { --art-width:128px; }
 .title-study-identity h1 { font-size:1.6rem; }
}
@media(max-width:380px) {
 .title-study-identity { grid-template-columns:112px minmax(0,1fr); }
 .title-study-identity .title-art { --art-width:112px; }
}

/* Material background is optional; playback and reading controls stay in context. */
.material-description { margin-bottom:1rem; max-width:70ch; overflow-wrap:anywhere; }
.material-description > summary { min-height:46px; padding-block:.5rem; cursor:pointer; font-weight:600; }
.material-description > .description { padding-block:.75rem; }

/* Collection workspace: scoped to discovery, preserving other title rows. */
.collection-controls { border-block:1px solid var(--line); padding-block:1rem; margin-bottom:1.5rem; }
.collection-controls label { display:block; font-weight:600; margin-bottom:.35rem; }
.collection-controls input, .collection-controls select { font:inherit; color:var(--ink); background:var(--surface); border:1px solid var(--control-border); border-radius:4px; padding:.6rem; max-width:100%; min-width:0; }
.collection-query { max-width:46rem; }
.collection-filters { margin-block:1rem; }
.collection-filters summary { cursor:pointer; min-height:44px; padding-block:.5rem; font-weight:600; }
.collection-facet-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap:1rem; margin-bottom:1rem; }
.collection-facet-fields select { width:100%; }
.collection-results-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-block:1.5rem .5rem; }
.collection-results-heading h2 { font-size:1.4rem; margin-bottom:.25rem; }
.collection-results-heading p { margin-bottom:0; }
.collection-views, .collection-pages { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; }
.collection-views a, .collection-pages a, .collection-pages span[aria-current] { min-width:44px; min-height:44px; padding:.5rem .75rem; text-align:center; display:inline-flex; align-items:center; justify-content:center; }
.collection-views [aria-current], .collection-pages [aria-current] { font-weight:700; background:var(--surface); outline:1px solid var(--line); text-decoration:none; color:var(--ink); }
.collection-pages { margin-block:.75rem 1.5rem; font-variant-numeric:tabular-nums; }
.collection-records { border-top:1px solid var(--line); }
.collection-records .title-row { padding-block:1rem; gap:1.25rem; }
.collection-records .title-name h2 { font-size:1.35rem; margin-bottom:.3rem; }
.collection-records .title-byline { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.collection-records .description { font-size:.9rem; color:var(--muted); display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.collection-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr)); gap:1.5rem; padding-block:1rem; }
.collection-grid .title-row { display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:.75rem; padding:0 0 1rem; min-width:0; }
.collection-grid .title-art { --art-width:108px; }
.collection-grid .title-row-copy { flex:1; width:100%; }
.collection-grid .description { display:none; }
.collection-grid .open-title { margin-top:auto; }
.collection-grid .title-row h2 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.collection-grid .search-result { min-width:0; padding-block:1rem; border-bottom:1px solid var(--line); }
.collection-grid .collection-title { flex-direction:column; align-items:flex-start; }
.collection-grid .search-hits { padding-left:1.2rem; }
.collection-records .search-result { overflow-wrap:anywhere; }
@media(max-width:700px) {
 .collection-results-heading { align-items:flex-start; flex-wrap:wrap; }
 .collection-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
 .collection-grid .title-art { --art-width:84px; }
 .collection-records .title-row { gap:.75rem; }
 .collection-grid .title-name h2 { font-size:1.1rem; }
 .collection-pages { gap:.2rem; }
}

/* A protected decision uses the same paper, typography and controls as editors. */
.departure-dialog{max-width:min(38rem,calc(100% - 2rem));max-height:calc(100dvh - 2rem);overflow:auto;padding:clamp(1.2rem,4vw,2rem);border:1px solid var(--control-border);border-radius:4px;background:var(--surface);color:var(--ink);overflow-wrap:anywhere}
.departure-dialog::backdrop{background:var(--backdrop)}
.departure-dialog h2{font-size:1.6rem}.departure-actions{display:flex;flex-wrap:wrap;gap:1rem;margin-top:1.5rem}.departure-actions button{max-width:100%;white-space:normal;overflow-wrap:anywhere}

/* Appearance is available to visitors and signed-in readers; no layout or content mutation. */
.shell-brand-row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.75rem 1.5rem; }
.shell-appearance { display:flex; align-items:center; }
.shell-appearance[hidden] { display:none; }
.appearance-switch { position:relative; display:inline-grid; grid-template-columns:repeat(2,1fr); place-items:center; flex:none; width:88px; height:44px; min-height:44px; padding:3px; border:1px solid var(--control-border); border-radius:999px; background:var(--surface); color:var(--ink); }
.appearance-switch::before { content:""; position:absolute; top:3px; bottom:3px; left:3px; width:calc((100% - 6px) / 2); border-radius:999px; background:var(--accent); transition:transform 180ms ease-out; }
.appearance-switch[aria-checked="true"]::before { transform:translateX(100%); }
.appearance-switch svg { position:relative; }
.appearance-switch[aria-checked="false"] .appearance-sun, .appearance-switch[aria-checked="true"] .appearance-moon { color:var(--on-accent); }
.appearance-switch:hover { background:var(--hover); color:var(--ink); }
.appearance-switch:active::before { background:var(--accent-hover); }
@media(prefers-reduced-motion:reduce) { .appearance-switch::before { transition:none; } }
input::placeholder, textarea::placeholder { color:var(--muted); opacity:1; }
button:disabled, .secondary:disabled, [data-retry][aria-disabled="true"] { opacity:1; background:var(--disabled-surface); color:var(--disabled-ink); border-color:var(--control-border); cursor:default; }
.editor-errors { border-color:var(--error); background:var(--error-surface); }
.editor-errors h2 { color:var(--error); }
.comments-toolbar button:hover { background:var(--hover); color:var(--ink); }
.comments-toolbar button.trix-active { color:var(--on-accent); }
.chapter-study:hover { background:var(--hover); color:var(--ink); }
 .comments-toolbar button.trix-active:hover { background:var(--accent-hover); color:var(--on-accent); }

/* Compact task groups retain native controls, reading order and full content. */
.collection-controls { padding-block:.75rem; margin-bottom:.75rem; }
.collection-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:.5rem .75rem; }
.collection-query { flex:1 1 16rem; min-width:0; max-width:none; }
.collection-query input { width:100%; min-height:46px; }
.collection-page-size { flex:none; }
.collection-page-size select { display:block; min-height:46px; }
.collection-sort { min-width:0; max-width:100%; }
.collection-sort select { display:block; min-height:46px; max-width:100%; }
.collection-facet-fields fieldset { min-width:0; margin:0; padding:.5rem .75rem; }
.collection-date { min-width:0; margin-block:1rem; }
.collection-date input { width:100%; }
.collection-toolbar > button { max-width:100%; }
.collection-filters { margin:0; min-width:0; max-width:100%; }
.collection-filters[open] { flex-basis:100%; }
.collection-filters > summary { width:fit-content; max-width:100%; }
.collection-filter-help { margin-bottom:.5rem; }
.collection-facet-fields { margin-block:.5rem 0; }
.collection-reset { display:inline-flex; align-items:center; min-height:44px; }
.collection-results-heading { justify-content:flex-start; flex-wrap:wrap; gap:.25rem 1rem; margin-block:.75rem .25rem; }
.collection-results-heading h2 { margin:0; }
.collection-results-heading > p { margin:0 0 0 auto; }
.collection-results-heading + .collection-pages { margin-block:.25rem .75rem; }
.editor-field { margin-bottom:1rem; }
.editor-field input[type=url], .editor-field input[type=number] { display:block; width:100%; min-height:46px; padding:.65rem .8rem; border:1px solid var(--control-border); border-radius:4px; background:var(--surface); color:var(--ink); font:inherit; }
.editor-field input[aria-invalid] { border:2px solid var(--error); }
.editor-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:1.5rem; }
.editor-fields > .editor-field { grid-column:1 / -1; }
.editor-fields > .editor-field-short { grid-column:auto; }
.editor-actions { flex-direction:row; align-items:center; flex-wrap:wrap; gap:.5rem 1.25rem; }
.editor-actions button { max-width:100%; }
.editor-actions a { justify-content:flex-start; min-width:44px; }
.operational-page .shared-notice { padding-block:.5rem; margin-bottom:1rem; }
.operational-page .page-heading.editor-heading { display:flex; flex-wrap:wrap; align-items:baseline; gap:.25rem 1rem; margin-bottom:1rem; }
.operational-page .page-heading.editor-heading h1, .operational-page .page-heading.editor-heading p { margin:0; }
.hero-editor-layout { grid-template-columns:minmax(8rem,12rem) minmax(0,1fr); gap:1.5rem; }
.hero-editor-layout h2 { font-family:inherit; font-size:1.1rem; font-weight:600; margin-bottom:.5rem; }
.hero-editor-layout .title-art { --art-width:192px; --art-height-limit:12rem; margin-bottom:.5rem; }
.hero-editor-layout .title-art img, .hero-editor-layout .person-portrait img { width:auto; height:auto; max-width:100%; max-height:12rem; object-fit:contain; }
.hero-editor-layout .person-portrait { margin:.5rem 0 0; }
.hero-remove { margin-top:1.5rem; padding-top:1rem; }
.title-study-identity .title-state { margin-top:.5rem; }
.title-study-identity .title-state p { margin:0; color:var(--ink); }
.playback-mode { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; padding-block:.5rem; margin-bottom:.75rem; }
.playback-mode p { flex:1 1 16rem; min-width:0; overflow-wrap:anywhere; }
.playback-mode button { margin:0; max-width:100%; }
.playback-mode.is-bounded { padding:.75rem; }
.video-control-groups { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; margin-block:.75rem; }
.video-control-groups .video-actions { margin:0; min-width:0; }
.video-control-groups > [data-end-controls]:not([hidden]) { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; }
.video-control-groups .chapter-complete { margin:0; }
.video-control-groups button { max-width:100%; }
.video-control-groups > .video-actions:not([hidden]):not(:has(> button:not([hidden]))) { display:none; }
.player-region > p { margin-block:.5rem; }
.player-region > [data-progress-status]:empty, #save-feedback:empty { display:none; }
@media(max-width:700px) {
 .collection-query { flex-basis:100%; }
 .collection-results-heading > p { margin-left:0; flex-basis:100%; }
 .editor-fields { grid-template-columns:minmax(0,1fr); }
 .hero-editor-layout { grid-template-columns:minmax(0,1fr); gap:1rem; }
 .hero-editor-layout .title-art { --art-width:160px; --art-height-limit:10rem; }
 .hero-editor-layout .title-art img, .hero-editor-layout .person-portrait img { max-width:min(100%,160px); max-height:10rem; }
 .video-control-groups { align-items:flex-start; }
}

/* Only successfully enhanced actions become compact; native fallback keeps text. */
[data-glyph-ready] { display:inline-flex; align-items:center; justify-content:center; gap:.4rem; min-width:44px; min-height:44px; box-sizing:border-box; padding:.5rem .65rem; vertical-align:middle; }
[data-glyph-ready] svg { width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
[data-glyph-ready] .glyph-label { overflow-wrap:anywhere; }
[data-glyph-ready]:focus-visible { outline:3px solid var(--focus); outline-offset:2px; }
[data-glyph-toolbar] { display:flex; flex-wrap:wrap; gap:.25rem; }
[data-glyph-toolbar] [data-glyph-ready] { min-width:44px; min-height:44px; }
:root[data-glyph-compact] [data-glyph-ready] { padding:.5rem; }
:root[data-glyph-compact] [data-glyph-ready] .glyph-label { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.glyph-tooltip { position:fixed; z-index:1000; max-width:calc(100vw - 16px); box-sizing:border-box; padding:.4rem .65rem; border:1px solid var(--control-border); border-radius:4px; background:var(--surface); color:var(--ink); font: .875rem/1.4 system-ui,sans-serif; overflow-wrap:anywhere; }
.glyph-tooltip[hidden] { display:none; }

/* Books use the available viewport without changing the shared header geometry. */
main.reader-page { padding-block: 1rem 2rem; }
.book-reader { min-width: 0; min-height: 0; }
.book-reader .back { margin-bottom: .25rem; }
.book-reader .page-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; margin-bottom: .5rem; }
.book-reader .page-heading h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0; }
.book-reader .material-description { margin-block: 0; }
.book-reader > .quiet, .book-reader [data-reading-status], .book-reader [data-page-label], .book-reader [data-location] { margin-block: .35rem; }
.book-reader [data-page-label]:empty, .book-reader [data-location]:empty { display: none; }
.book-reader .reader-controls { padding-block: .5rem; }
.book-reader .reader-recovery { margin-block: .35rem; }
.book-reader .reader-recovery:not(:has(> :not([hidden]))) { display: none; }
.book-reader .pdf-viewport { height: max(16rem, calc(100vh - var(--reader-canvas-top, 24rem) - .75rem)); height: max(16rem, calc(100dvh - var(--reader-canvas-top, 24rem) - .75rem)); min-height: 16rem; max-height: none; margin-top: .5rem; }
body.reader-focus > .site-header, body.reader-focus > .skip,
body.reader-focus .book-reader .reader-context { display: none; }
body.reader-focus main.reader-page { max-width: none; padding: .5rem; margin: 0; min-height: 100vh; min-height: 100dvh; }
body.reader-focus .book-reader { max-width: none; margin: 0; }
.book-reader [data-reference-notice] { margin-block: 0 .5rem; padding-block: .5rem; }
.book-reader [data-reference-notice] p { margin-bottom: .35rem; }

/* PDF display choices are secondary; navigation, receipts and recovery stay in
   the reading path. */
main.reader-page:has(.pdf-reader) { max-width: none; padding-inline: clamp(.5rem, 2vw, 2rem); }
.book-reader.pdf-reader { max-width: none; }
.pdf-reader .pdf-breadcrumb { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem; min-width: 0; margin-bottom: .5rem; }
.pdf-reader .pdf-breadcrumb .back, .pdf-reader .pdf-breadcrumb h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pdf-reader .pdf-breadcrumb h1 { font: inherit; font-weight: 600; letter-spacing: normal; text-wrap: wrap; }
.pdf-reader .reader-controls { gap: .5rem 1.5rem; }
.pdf-reader .pdf-display { gap: .5rem 1rem; }
.pdf-reader .pdf-feedback { display: flex; flex-wrap: wrap; gap: 0 1.5rem; align-items: baseline; }
.pdf-reader .pdf-feedback > p { min-width: 0; }
.pdf-reader .pdf-turners { flex-wrap: nowrap; }
.pdf-reader .pdf-jump { margin-inline-start: auto; flex-wrap: nowrap; }
.pdf-reader .pdf-destination { flex-wrap: nowrap; font-variant-numeric: tabular-nums; }
.pdf-reader .pdf-viewport { min-height: 8rem; height: max(8rem, calc(100vh - var(--reader-canvas-top, 24rem) - .75rem)); height: max(8rem, calc(100dvh - var(--reader-canvas-top, 24rem) - .75rem)); }
.pdf-reader [data-layout-note] { margin-block: .25rem; }
.pdf-reader [data-page-label] { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  body:not(.reader-focus) .pdf-reader .pdf-viewport { min-height: min(36rem, 150vw); }
  .pdf-reader .reader-controls { gap: .5rem 1rem; }
  .pdf-reader .pdf-display { flex-basis: 100%; gap: .5rem 1rem; }
  .pdf-reader .pdf-display label { flex-wrap: nowrap; }
  .pdf-reader .pdf-jump { margin-inline-start: auto; }
  .pdf-reader .pdf-destination { display: grid; grid-template-columns: minmax(3rem, 4rem) auto; gap: 0 .25rem; align-items: center; justify-content: start; }
  .pdf-reader .pdf-destination > span:first-child { grid-column: 1 / -1; }
  .pdf-reader .pdf-destination input { width: 100%; min-width: 0; }
  .pdf-reader [data-go] { padding-inline: .65rem; }

}



/* Existing tags stay beside the editable comma-separated field. No overlay clipping. */
.tag-assist { min-width: 0; }
.tag-suggestions { list-style: none; margin: .35rem 0 0; padding: 0; border: 1px solid var(--control-border); max-height: 18rem; overflow-y: auto; background: var(--surface); }
.tag-suggestions [role="option"] { padding: .65rem .8rem; min-height: 44px; box-sizing: border-box; overflow-wrap: anywhere; cursor: pointer; }
.tag-suggestions [role="option"]:hover { background: var(--hover); }
.tag-suggestions [aria-selected="true"] { background: var(--selection); color: var(--selection-ink); outline: 2px solid var(--focus); outline-offset: -2px; }

/* Native category disclosures and labelled choices keep the palette compact. */
.collection-filter-modes { display:flex; flex-wrap:wrap; gap:.5rem; margin-block:.75rem; }
.collection-filter-modes[hidden], .collection-filter-category [hidden] { display:none; }
.collection-filter-modes button { min-height:44px; }
.collection-filter-modes button[aria-pressed=false] { background:var(--surface); color:var(--accent); border-color:var(--control-border); }
.collection-filter-category { border-top:1px solid var(--line); min-width:0; }
.collection-filter-category > summary { padding:.65rem 0; overflow-wrap:anywhere; }
.collection-filter-count { font-weight:400; }
.collection-filter-category fieldset { min-width:0; margin:0 0 .75rem; padding:.5rem .75rem; }
.collection-controls .collection-filter-choice { display:flex; align-items:center; gap:.75rem; min-height:44px; margin:0; padding:.4rem 0; font-weight:400; cursor:pointer; overflow-wrap:anywhere; }
.collection-filter-choice input[type=checkbox] { flex:none; width:1.25rem; height:1.25rem; margin:0; accent-color:var(--accent); }
.collection-filter-choice:focus-within { outline:2px solid var(--focus); outline-offset:2px; }

/* Filter drafts overlay the library; only the choices scroll. */
.collection-workspace [hidden] { display:none; }
.collection-keyword, .collection-preferences { display:flex; flex-wrap:wrap; align-items:end; gap:.5rem .75rem; min-width:0; max-width:100%; }
.collection-keyword { flex:1 1 26rem; }
.collection-filter-fallback { margin-top:1rem; }
.collection-filter-fallback > summary { cursor:pointer; min-height:44px; padding-block:.5rem; font-weight:600; }
.collection-filter-dialog { width:min(46rem,calc(100% - 2rem)); max-width:calc(100% - 2rem); max-height:calc(100dvh - 2rem); padding:0; border:1px solid var(--control-border); border-radius:4px; background:var(--surface); color:var(--ink); overflow:hidden; }
.collection-filter-dialog::backdrop { background:rgb(0 0 0 / .55); }
.collection-filter-dialog .collection-filters { display:flex; flex-direction:column; max-height:calc(100dvh - 2rem - 2px); }
.collection-filter-header, .collection-filter-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem .75rem; padding:1rem; flex:none; }
.collection-filter-header { justify-content:space-between; border-bottom:1px solid var(--line); }
.collection-filter-header h2 { margin:0; font-size:1.5rem; }
.collection-filter-actions { border-top:1px solid var(--line); }
.collection-filter-body { min-height:0; padding:1rem; overflow:auto; overscroll-behavior:contain; scrollbar-color:var(--muted) var(--surface); }
.collection-filter-body p:first-child { margin-top:0; }
.collection-filter-trigger { min-height:46px; }
@media(max-width:420px) {
 .collection-keyword .collection-query { flex-basis:100%; }
 .collection-filter-header, .collection-filter-actions, .collection-filter-body { padding:.75rem; }
}

/* Reviewed chapter text follows the existing flat curator form. */
[data-chapter-text-form] [hidden] { display:none; }
.chapter-text-review { padding-inline-start:1.5rem; }
.chapter-text-review li { padding-block:.8rem; border-bottom:1px solid var(--line); }
.chapter-text-review li p { margin-block:.3rem; }
[data-chapter-text-form] .editor-actions { flex-wrap:wrap; gap:1rem 2rem; }
#chapter-text { caret-color:var(--accent); }

/* Title background accompanies identity; teaching retains the main page flow. */
.title-intro { display:grid; grid-template-columns:minmax(0,1fr); gap:1.5rem; margin-bottom:1.5rem; }
.title-intro .title-study-identity { margin-bottom:0; align-self:start; }
.title-intro .page-heading { margin-bottom:0; }
.title-description { min-width:0; }
.description-preview { max-height:14rem; }
.description-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.5rem 1rem; margin-bottom:.75rem; }
.description-heading h2 { margin:0; }
.description-toggle { margin:0; padding-inline:0; min-width:88px; justify-content:start; }
.description-toggle[hidden], .title-description [hidden] { display:none; }
.title-associations > section { margin-top:2rem; padding-top:1.5rem; border-top:1px solid var(--line); }
/* Available content width governs columns, including CSS zoom. A viewport
   breakpoint can split an already narrow zoomed title beside fixed artwork. */
.title-intro:has(.title-description) { grid-template-columns:repeat(auto-fit,minmax(min(100%,28rem),1fr)); gap:2rem; }

/* Reviewed originals inherit the editor's native, flat form hierarchy. */
.upload-review-fields { border:0; padding:0; min-width:0; }
.upload-review-row { border-top:1px solid var(--line); padding-top:1.5rem; margin-top:2rem; }
.upload-review-row > legend { padding-right:1rem; overflow-wrap:anywhere; }
.upload-review-row > .editor-field { margin-block:1rem; }
.upload-queues { border-block:1px solid var(--line); padding-block:1.5rem; margin-block:2rem; }
.upload-queue { margin-block:1rem; overflow-wrap:anywhere; }
.upload-queue p { margin-block:.5rem; }
.upload-queues [hidden], [data-uploads] [hidden], .pending-addition [hidden] { display:none; }
.upload-queue button, .pending-addition button { margin:.25rem .5rem .25rem 0; }

/* Private bookmarks extend the existing flat material and editor surfaces. */
.bookmark-panel{margin-top:1.5rem;padding-top:1.25rem;border-top:1px solid var(--line)}
.bookmark-list{list-style:none;padding:0;margin:1rem 0}.bookmark-list>li{padding:1rem 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.bookmark-list p{margin:.35rem 0}.bookmark-name{font-weight:650}.bookmark-form{max-width:42rem;margin:1rem 0}.bookmark-form label{display:block;margin:1rem 0}.bookmark-form input,.bookmark-form textarea{display:block;width:100%;max-width:100%}.bookmark-form textarea{resize:vertical}.bookmark-form .video-actions{align-items:center}.bookmark-panel [role=status]:empty{display:none}

#classification-group label { display:flex; align-items:center; gap:.7rem; min-height:44px; font-weight:400; }
#classification-group input { width:20px; height:20px; flex:none; }

/* Deliberate collection actions share the existing display row. */
.collection-clear-form { margin: 0; }
.collection-reset, .collection-reset.secondary { color: var(--error); }
.collection-results-heading .collection-page-size { display: flex; align-items: center; gap: .5rem; }
.collection-results-heading .collection-page-size label { margin: 0; }
.collection-views { display: flex; gap: .4rem; margin: 0; }

/* Silicon: shared task spacing, with appearance beside the native phone Menu. */
.shell-appearance { position:absolute; top:1.5rem; right:max(2rem, calc((100% - 1136px) / 2)); z-index:1; }
.shell-brand-row { padding-right:9rem; }
main { padding-top:1.5rem; }
.page-heading, .operational-page .page-heading { margin-bottom:1rem; }
.back, .operational-page .back { margin-bottom:.5rem; }
.page-heading > :last-child { margin-bottom:0; }
main h1, main h2, main h3, main a { overflow-wrap:anywhere; }
@media(max-width:700px) {
 /* Reserve the switch's 44px height plus its existing bottom margin, even
    while hidden. An open native Menu may deliberately grow the second row. */
 .site-header { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:auto minmax(calc(44px + .5rem),auto); }
 .shell-brand-surface { grid-column:1 / -1; }
 .shell-brand-row { padding:1rem 1.2rem .25rem; }
 .shell-navigation { grid-column:1 / -1; grid-row:2; width:100%; }
 .shell-navigation > summary { padding-right:6.5rem; }
 .shell-appearance { position:relative; top:auto; right:auto; grid-column:2; grid-row:2; align-self:start; margin:0 1.2rem .5rem 0; }
 main, .operational-page { padding-top:1rem; }
}

/* Discovery keeps the query and two deliberate sets of choices together. */
.collection-results-heading { margin-block:.5rem; gap:.5rem; }
.collection-pages { margin-block:.5rem; }
.collection-records .title-row { padding-block:.5rem; }
.collection-records .title-byline, .collection-records .description, .collection-grid .title-row h2 { display:block; overflow:visible; -webkit-line-clamp:unset; }
.search-category { border-top:1px solid var(--control-border); padding-top:1rem; margin-top:1rem; }
.search-category-heading { display:flex; flex-wrap:wrap; align-items:baseline; gap:.25rem 1rem; margin-bottom:.25rem; }
.search-category h2 { font-family:inherit; font-weight:700; font-size:1.3rem; margin-bottom:.25rem; }
.search-category-heading p { margin:0; }
.search-category .search-result { padding-block:.6rem; }
.search-category .search-result h3 { font-family:Georgia,serif; font-size:1.15rem; font-weight:400; margin-bottom:.25rem; }
.search-category .search-result p:last-child { margin-bottom:0; }
@media(max-width:700px) {
 .collection-keyword .collection-query { flex-basis:auto; }
 .collection-keyword > button { flex:none; }
 .collection-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}


.report-page { overflow-wrap:anywhere; }
.report-page .title-editor > h1 { margin-bottom:.5rem; }
.report-page .title-editor > h2, .report-response h2 { font:600 1.15rem/1.4 system-ui,sans-serif; }
.report-page .editor-field small { display:block; margin-top:.35rem; color:var(--muted); }
.report-page textarea { resize:vertical; }
.report-page .description { overflow-wrap:anywhere; }
.report-filter { display:flex; flex-wrap:wrap; align-items:end; gap:.75rem; margin-bottom:1rem; }
.report-filter .editor-field { flex:0 1 20rem; margin:0; }
.report-response { border-top:1px solid var(--line); padding-top:1rem; margin-top:1rem; }
.report-response > p { color:var(--muted); margin-bottom:.5rem; }

/* Keep material actions near playback; save failures stay outside disclosures. */
.title-study-identity .title-name > p { margin-bottom:.25rem; }
.title-navigation { gap:.25rem 1rem; margin-bottom:1rem; }
.video-control-groups { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem .75rem; margin-top:.5rem; }
.video-control-groups .video-actions { margin:0; }
.video-control-groups [data-end-controls] { flex-basis:100%; }
.bookmark-panel { padding-block:.75rem; margin-block:.5rem; }
.bookmark-panel > p:empty { display:none; }
.material-bookmarks > summary, .optional-field > summary, .formatting-help > summary { cursor:pointer; min-height:44px; padding-block:.5rem; font-weight:600; }
.material-bookmarks { margin-top:.25rem; }

.title-editor .shared-notice { padding-block:.5rem; margin-bottom:.75rem; }
.title-editor .editor-field label, .title-editor .editor-field legend { margin-bottom:.35rem; }
.upload-review-row { padding-block:.75rem; }
.upload-review-row > .quiet { margin-bottom:.25rem; }
.formatting-help .markdown-help { margin-bottom:.5rem; }
.markdown-status:empty { display:none; }

/* Staff phone records align labels with values instead of stacking every pair. */
.record-values { margin:0; }
@media(max-width:700px) {
 .account-records tbody tr, .licence-records tbody tr { padding-block:.5rem; }
 .account-records tbody th, .account-records tbody td,
 .licence-records tbody th, .licence-records tbody td { display:grid; grid-template-columns:6.5rem minmax(0,1fr); column-gap:.5rem; padding-block:.25rem; }
 .account-records .record-actions, .licence-records .record-actions { flex-direction:row; align-items:center; gap:.25rem .75rem; }
 .account-records .record-actions form, .account-records .record-actions button { width:auto; max-width:100%; }
}

.collection-filter-fallback[open] { grid-column:1 / -1; grid-row:3; }
@media(max-width:700px) {
 .account-records tbody tr, .licence-records tbody tr { padding-block:.25rem; }
 .account-records tbody th, .account-records tbody td { grid-template-columns:5.5rem minmax(0,1fr); }
}

/* #413: native task controls, grouped in one desktop row and wrapped intact. */
.compact-toolbar, .pdf-reader .reader-controls.compact-toolbar {
 display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; min-width:0;
}
.compact-toolbar .toolbar-group, .compact-toolbar.toolbar-group {
 display:flex; align-items:center; flex-wrap:nowrap; gap:.25rem; min-width:0; margin:0;
}
.compact-toolbar :is(button, input:not([type=hidden]), select, [data-glyph-ready]) {
 box-sizing:border-box; min-height:44px; height:44px; font:inherit;
}
.compact-toolbar :is(input:not([type=hidden]), select) {
 padding:.4rem .5rem; border:1px solid var(--control-border); border-radius:4px;
 background:var(--surface); color:var(--ink); max-width:100%;
}
.compact-toolbar label { margin:0; font-weight:400; }
.compact-toolbar [data-glyph-ready] { padding:.5rem; flex:none; }
.compact-toolbar [data-glyph-ready] .glyph-label {
 position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
 clip-path:inset(50%); white-space:nowrap;
}
.compact-toolbar [hidden] { display:none; }
.collection-workspace { display:block; padding-block:.5rem; margin-bottom:.5rem; }
.collection-toolbar.compact-toolbar { gap:.5rem; }
.collection-toolbar .collection-keyword { width:auto; flex-wrap:nowrap; gap:.25rem; }
.collection-toolbar .collection-query { flex:0 1 16rem; width:16rem; max-width:16rem; }
.collection-toolbar .collection-query input { width:100%; }
.collection-query input::-webkit-search-cancel-button, .collection-query input::-webkit-search-decoration { -webkit-appearance:none; }
.collection-toolbar .collection-preferences { gap:.75rem; flex-wrap:wrap; }
.collection-toolbar .collection-page-size { gap:.35rem; }
.collection-toolbar .collection-page-size label { white-space:nowrap; }
.collection-toolbar .collection-sort select { width:auto; max-width:12rem; }
.collection-toolbar > .collection-preferences, .collection-toolbar > .collection-views {
 border-inline-start:1px solid var(--line); padding-inline-start:.5rem;
}
.collection-filter-trigger { position:relative; }
.collection-filter-trigger[data-filter-state=active]::after, .collection-filter-trigger[data-filter-state=error]::after {
 content:""; position:absolute; top:5px; right:5px; width:7px; height:7px; border-radius:50%; background:var(--error);
}
.collection-filter-trigger[data-filter-state=error]::after { background:var(--error); border:1px solid currentColor; }
.collection-filter-fallback { margin-block:.5rem 0; }
.collection-filter-fallback > summary { min-height:44px; padding:.5rem; cursor:pointer; }
.pdf-reader .reader-controls.compact-toolbar { gap:.5rem; }
.pdf-reader .compact-toolbar .pdf-display { gap:.75rem; flex-wrap:wrap; flex-basis:auto; }
.pdf-reader .compact-toolbar label { display:flex; align-items:center; flex-wrap:nowrap; gap:.35rem; }
.pdf-reader .compact-toolbar .pdf-jump { margin-inline-start:auto; }
.pdf-reader .compact-toolbar .pdf-destination { display:flex; gap:.35rem; }
.pdf-reader .compact-toolbar .pdf-destination input { width:4rem; }
.pdf-reader .compact-toolbar .pdf-destination > span { white-space:nowrap; }
.pdf-reader .compact-toolbar .pdf-destination > span:last-child { display:inline; }
.compact-toolbar.effect-search { margin-block:1rem; }
.compact-toolbar.effect-search > .toolbar-group { flex:0 1 24rem; }
.compact-toolbar.effect-search input { width:16rem; flex:1 1 10rem; }
.compact-toolbar.effect-search > label { flex:0 1 auto; min-width:0; overflow-wrap:anywhere; }
.compact-toolbar.report-filter .editor-field { flex:none; display:flex; align-items:center; gap:.5rem; }
.usage-filter { margin-block:1rem; }
.usage-report li { overflow-wrap:anywhere; }
.title-editor summary { overflow-wrap:anywhere; }
.compact-toolbar.video-control-groups .video-actions { flex-wrap:wrap; }
.compact-toolbar.video-control-groups [data-end-controls] { flex-basis:auto; }
.compact-toolbar.order-controls .position-control { flex:0 1 auto; }
@media(max-width:1100px) and (min-width:701px) {
 .collection-toolbar .collection-query { width:13rem; }
}
@media(max-width:700px) {
 .collection-toolbar .collection-search { max-width:calc(100% - 52px); flex:1 1 12rem; }
 .collection-toolbar .collection-keyword { flex:1; }
 .collection-toolbar .collection-query { width:auto; flex:1; }
 .collection-toolbar .collection-preferences { display:contents; border:0; padding-inline-start:0; gap:.5rem; }
 .collection-toolbar .collection-sort select { max-width:12rem; }
 .collection-toolbar .collection-page-size { gap:.25rem; }
 .collection-toolbar .collection-views { border:0; padding-inline-start:0; }
 .pdf-reader .compact-toolbar .pdf-jump { margin-inline-start:0; }
 .pdf-reader .compact-toolbar .pdf-display { gap:.5rem; }
 .pdf-reader .compact-toolbar .pdf-display label { gap:.25rem; }
 .pdf-reader .compact-toolbar .pdf-destination input { width:3.5rem; }
}
/* Failed glyph enhancement must leave readable, operable text commands. */
.compact-toolbar .toolbar-group:has(> [data-glyph]:not([data-glyph-ready])),
.pdf-reader .pdf-turners:has([data-glyph]:not([data-glyph-ready])) { flex-wrap:wrap; }
.collection-toolbar .collection-search:has([data-glyph]:not([data-glyph-ready])) {
 max-width:100%; flex-basis:100%; flex-wrap:wrap;
}
.collection-toolbar .collection-search:has([data-glyph]:not([data-glyph-ready])) .collection-keyword {
 flex:1 1 100%; flex-wrap:wrap;
}
.collection-toolbar .collection-search:has([data-glyph]:not([data-glyph-ready])) .collection-query {
 flex:1 1 16rem; min-width:44px;
}
.compact-toolbar a[data-glyph] {
 display:inline-flex; align-items:center; justify-content:center; min-width:44px;
 min-height:44px; padding:.5rem; box-sizing:border-box;
}

/* The keyword field owns its clear affordance; each action retains its own form. */
.collection-toolbar .collection-query { position:relative; --query-clear-width:44px; }
.collection-toolbar .collection-query input { padding-inline-end:calc(var(--query-clear-width) + .5rem); }
.collection-toolbar .collection-query .collection-clear-button {
 position:absolute; inset-block-start:0; inset-inline-end:0; width:var(--query-clear-width);
 min-width:44px; height:44px; margin:0; padding:.5rem; border:1px solid transparent;
 border-radius:0 4px 4px 0; background:transparent; background-clip:padding-box; color:var(--accent);
}
.collection-toolbar .collection-query .collection-clear-button:hover { background-color:var(--hover); }
.collection-toolbar .collection-query .collection-clear-button[data-query-active=true] { color:var(--error); }
.collection-toolbar .collection-query:has([data-glyph]:not([data-glyph-ready])) { --query-clear-width:9rem; }
.collection-toolbar .collection-search > .collection-keyword { flex:none; }

/* Sorting is a single labelled concept, bounded separately from page size. */
.collection-toolbar .collection-sort { border-inline:1px solid var(--line); padding-inline:.65rem; gap:.65rem; flex-wrap:wrap; }
.collection-toolbar .collection-sort label { display:flex; align-items:center; gap:.35rem; flex-wrap:wrap; }
.collection-toolbar > .collection-preferences { border-inline-start:0; padding-inline-start:0; }
@media(max-width:700px) { .collection-toolbar .collection-sort { flex-basis:100%; } }

/* Contributor text has the same bounded reading surface in discussions and Suggestions. */
.contributor-entry { max-width:75ch; margin-block:1.5rem; overflow-wrap:anywhere; }
.contributor-entry > header { margin-bottom:.6rem; }
.contributor-entry > header p { margin-bottom:.5rem; color:var(--muted); }
.contributor-entry > header strong { color:var(--ink); }
.contributor-content { border:1px solid var(--control-border); background:var(--surface); padding:1rem 1.25rem; max-width:75ch; }
.contributor-content > :last-child { margin-bottom:0; }
.contributor-content:empty::before { content:"No note provided."; color:var(--muted); }
@media(max-width:700px) { .contributor-content { padding:.85rem; } }

/* Sulphur: destination headings share Library's compact scale. */
.page-heading.destination-heading { margin-bottom:1rem; }
.page-heading.destination-heading h1 {
 font-family:Georgia,serif; font-size:2rem; font-weight:400; line-height:1.2;
 letter-spacing:-.025em; margin-block:0 .75rem;
}
.destination-heading h2 { margin-bottom:.75rem; }
.destination-heading p:last-child { margin-bottom:0; }
.application-view-heading { font-family:Georgia,serif; font-size:1.6rem; font-weight:400; }

/* Leave room for the longest Display choice and the native dropdown arrow. */
.pdf-reader .compact-toolbar [data-zoom] { inline-size:9rem; flex:none; }

/* Chlorine: shared contextual display/help and compact member records. */
.display-disclosure > summary, .context-help > summary { min-height:44px; padding:.5rem; cursor:pointer; color:var(--accent); }
.display-disclosure { max-width:100%; }
.display-disclosure[open] { flex-basis:100%; }
[data-drawer-content] { display:flex; flex-direction:column; gap:1rem; min-width:0; }
[data-drawer-content] h2 { margin:0; font-size:1.35rem; }
.display-drawer { position:fixed; inset:0 0 0 auto; margin:0; width:min(28rem,100%); max-width:100%; height:100%; max-height:100dvh; overflow:auto; padding:1.25rem; border:0; border-inline-start:1px solid var(--control-border); background:var(--surface); color:var(--ink); scrollbar-color:var(--muted) var(--surface); }
.display-drawer::backdrop { background:var(--backdrop); }
.display-drawer [data-drawer-close] { align-self:flex-end; }
.display-drawer :is(form,.toolbar-group) { display:flex; flex-wrap:wrap; align-items:center; gap:.75rem; }
.display-drawer :is(label,select) { max-width:100%; }
.display-drawer :is(input,select) { font:inherit; min-height:44px; padding:.5rem; background:var(--surface); color:var(--ink); border:1px solid var(--control-border); border-radius:4px; }
.display-drawer .collection-preferences { flex-direction:column; align-items:stretch; }
.display-drawer .collection-sort { flex-wrap:wrap; }
.display-drawer .collection-sort label { display:flex; align-items:center; gap:.5rem; }
.display-drawer .collection-views { border-block-start:1px solid var(--line); padding-top:1rem; }
.context-help { max-width:75ch; margin-block:.25rem; }
.context-help p { margin-block:.5rem; }
.compact-toolbar .drawer-trigger { min-width:44px; padding:.5rem .75rem; }
.collection-toolbar .collection-search { flex:1 1 12rem; }
.collection-toolbar .collection-query { flex:1 1 8rem; width:auto; max-width:none; }
.collection-toolbar .collection-query input { min-width:4rem; }
.collection-filter-trigger[data-filter-state=active]::after { background:var(--success); border:1px solid currentColor; }
.collection-filter-trigger[data-filter-state=error]::after { border-radius:0; }
::selection { background:var(--selection); color:var(--selection-ink); }

:root .compact-toolbar [data-keep-label] .glyph-label { position:static; width:auto; height:auto; margin:0; overflow:visible; clip-path:none; white-space:normal; }
.applied-filters { margin-block:0 .5rem; }
.applied-filters summary { padding-inline:0; font-size:.9rem; }
.applied-filters ul { margin-block:0 .5rem; }
.collection-records .title-row { padding-block:.5rem; gap:1rem; }
.collection-records .title-name { margin-bottom:.35rem; }
.collection-records .title-byline { margin-block:.2rem; }
.collection-records .title-row-metadata { margin-top:.25rem; }
.collection-records .title-tags { gap:.25rem; font-size:.8rem; }
.text-record-list .title-row { display:flex; flex-direction:row; align-items:center; gap:.5rem 1rem; padding-block:.75rem; }
.text-record-list .title-row > div:first-child { flex:1; min-width:0; }
.text-record-list h2 { font-size:1.3rem; margin:0; }
.text-record-list h2 a { display:inline-flex; align-items:center; min-height:44px; }
.text-record-list .title-row p { margin:0; }
.reference-group { padding-block:.75rem; }
.reference-group :is(ul,p) { margin-block:.5rem; }
.reference-group li { margin-block:.35rem; }
@media(max-width:700px) {
 .collection-list .title-row { flex-direction:row; align-items:flex-start; gap:.75rem; padding-block:.5rem; }
 .collection-list .title-art { --art-width:64px; flex:none; }
 .collection-list .description { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin:0; font-size:.9rem; }
 .collection-list .title-row-metadata { gap:.2rem .4rem; }
 .text-record-list .title-row { flex-wrap:wrap; }
 .text-record-list .title-row > div:first-child { flex-basis:100%; }
}

.chapter-scroll { position:relative; }
.chapter-scroll[data-scrollbar] { padding-inline-end:24px; }
.chapter-scroll[data-scrollbar] .chapter-list { scrollbar-width:none; scrollbar-gutter:auto; }
.chapter-scroll[data-scrollbar] .chapter-list::-webkit-scrollbar { display:none; }
.chapter-scroll-rail { position:absolute; inset:0 0 auto auto; width:24px; touch-action:none; user-select:none; }
.chapter-scroll-rail::before { content:''; position:absolute; inset:0 8px; border-radius:4px; background:var(--line); }
.chapter-scroll-rail > span { position:absolute; left:8px; right:8px; border-radius:4px; background:var(--control-border); }
.chapter-scroll-rail:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.chapter-selector .chapter-list>li { grid-template-columns:1rem minmax(0,1fr) 44px 44px 44px; gap:0; }
.chapter-details { grid-column:5; grid-row:1; min-width:0; }
.chapter-details summary { display:flex; align-items:center; justify-content:center; width:44px; min-height:44px; cursor:pointer; color:var(--accent); list-style:none; }
.chapter-details summary::-webkit-details-marker { display:none; }
.chapter-details summary svg, .location-kind svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
.chapter-details[open] { grid-column:1/-1; grid-row:auto; }
.chapter-details p { margin:.25rem .5rem .75rem; overflow-wrap:anywhere; }
.material { padding-block:1rem; margin-block:0; }
.material > h3 { margin-bottom:.5rem; }
.material > p { margin-block:.5rem; }
.material .video-study { margin-block:1rem; gap:1.25rem; }
.material-tools { gap:.5rem 1rem; margin-top:.35rem; }
.file-row { padding-block:.75rem; }
.files { margin-top:2rem; }
.title-associations > section { margin-top:1.5rem; padding-top:1rem; }
.bookmark-list > li { padding-block:.65rem; }
.bookmark-record { display:flex; align-items:flex-start; gap:.5rem; min-width:0; }
.bookmark-record > div { min-width:0; }
.bookmark-name { display:inline-flex; align-items:center; min-height:44px; }
.location-kind { display:inline-flex; align-items:center; min-height:44px; color:var(--accent); flex:none; }
.bookmark-list .quiet { font-size:.9rem; margin-top:0; }
.bookmark-list > li > a { display:inline-flex; align-items:center; min-height:44px; }
.profile-page > h2 { margin-top:1.5rem; margin-bottom:.5rem; font-size:1.35rem; }
.profile-page .editor-field { margin-bottom:1rem; }
.profile-page .profile-coverage :is(th,td) { padding:.5rem; }
.profile-page .profile-coverage td:first-child { font-weight:600; }
.member-compose .editor-field { margin-bottom:1rem; }
.member-compose .editor-limit { margin-top:1rem; }
.discussion-entry { padding-block:1rem; }
.discussion-entry header p { margin-bottom:.5rem; }
.discussion-actions { gap:.5rem 1rem; }
@media(max-width:700px) {
 .profile-coverage tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); padding-block:.5rem; }
 .profile-coverage td:first-child { grid-column:1/-1; }
 .profile-coverage td:first-child::before { display:none; }
 .profile-page .editor-actions { flex-direction:row; flex-wrap:wrap; align-items:center; }
}

/* Reader navigation remains in reach; document space includes its phone dock. */
.pdf-page-surface { position:relative; min-width:0; }
.pdf-edge { position:absolute; top:50%; transform:translateY(-50%); display:flex; align-items:center; justify-content:center; width:44px; height:44px; padding:8px; border:.5px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius:4px; background:color-mix(in srgb, var(--surface) 5%, transparent); color:color-mix(in srgb, var(--accent) 42%, transparent); }
.pdf-edge svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1; stroke-linecap:round; stroke-linejoin:round; }
.pdf-edge-previous { left:.25rem; }
.pdf-edge-next { right:.25rem; }
.pdf-edge:enabled:is(:hover,:focus-visible) { background:color-mix(in srgb, var(--surface) 12%, transparent); color:color-mix(in srgb, var(--accent) 75%, transparent); border-color:color-mix(in srgb, var(--accent) 45%, transparent); }
.pdf-edge:disabled { background:transparent; color:color-mix(in srgb, var(--accent) 18%, transparent); border-color:color-mix(in srgb, var(--accent) 10%, transparent); }
.pdf-turn-single canvas { box-shadow:3px 2px 12px rgb(0 0 0 / .18); backface-visibility:hidden; }
@media(max-width:700px) {
 .book-reader { display:flex; flex-direction:column; }
 .book-reader .pdf-page-surface { order:1; }
 .book-reader .reader-controls { position:sticky; order:2; bottom:var(--reader-dock-bottom, 0px); z-index:12; margin:0 calc((100% - 100vw) / 2); width:100vw; max-width:none; padding:.5rem max(.5rem, env(safe-area-inset-right, 0px)) calc(.5rem + env(safe-area-inset-bottom, 0px)) max(.5rem, env(safe-area-inset-left, 0px)); background:var(--paper); border-block-start:1px solid var(--control-border); border-block-end:0; justify-content:center; }
 .book-reader .reader-controls.compact-toolbar { gap:.25rem; }
 .book-reader .pdf-turners { display:contents; }
 .book-reader [data-previous] { order:1; }
 .book-reader .pdf-jump { order:2; }
 .book-reader [data-next] { order:3; }
 .book-reader [data-reader-focus] { order:4; }
 .book-reader .drawer-trigger, .book-reader .display-disclosure { order:5; }
 .book-reader .pdf-destination > span:first-child { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .book-reader .pdf-destination > span:last-child { display:none; }
 .book-reader .reader-controls .pdf-destination input { width:3rem; }
 .book-reader .pdf-viewport, body:not(.reader-focus) .book-reader .pdf-viewport { min-height:8rem; height:max(8rem, calc(var(--reader-visible-height, 100dvh) - var(--reader-canvas-top, 24rem) - var(--reader-dock-height, 7rem) - 1rem)); }
 body.reader-focus .book-reader .pdf-viewport { height:max(8rem, calc(var(--reader-visible-height, 100dvh) - var(--reader-canvas-top, 3rem) - var(--reader-dock-height, 7rem) - 1rem)); }
}
@media(max-width:700px) {
 /* Preserve narrow identity and typography without artwork crossing the words. */
 .shell-brand-surface::before { display:none; }
}

[data-bookmark-status].save-confirmed { color:var(--success); }
@media(prefers-reduced-motion:no-preference) {
 [data-bookmark-status].save-confirmed { animation:bookmark-confirm .65s cubic-bezier(.16,1,.3,1); }
 @keyframes bookmark-confirm { from { background:var(--success-surface); } to { background:transparent; } }
}
@media(max-width:700px) { main.reader-page { padding-bottom:calc(var(--reader-dock-height, 7rem) + env(safe-area-inset-bottom, 0px) + 2rem); } }

@media(max-width:700px) {
 .collection-toolbar .collection-search { max-width:100%; flex:1 1 100%; }
}

.profile-coverage th { text-align: left; }

.account-menu { position: relative; max-width: 100%; min-width: 0; }
.account-menu > summary { display: flex; align-items: center; gap: .55rem; cursor: pointer; min-height: 46px; overflow-wrap: anywhere; }
.account-menu > summary::after { content: ''; width: .45rem; height: .45rem; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); margin: 0 .3rem .3rem; flex: none; }
.account-menu > summary svg { flex: none; }
.account-menu > summary span { min-width: 0; }
.account-menu-items { padding: .35rem .9rem; background: var(--paper); box-shadow: 0 6px 20px #0002; min-width: 11rem; }
.account-menu-items > a, .account-menu-items > form > .text-button { display: flex; align-items: center; justify-content: flex-start; gap: .6rem; width: 100%; min-height: 46px; padding: .25rem 0; text-align: left; }
.account-menu-items svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.account-menu-label { min-width: 0; overflow-wrap: anywhere; }
.account-menu-items > form { border-top: 1px solid var(--line); padding-block: .35rem; }
@media (min-width: 701px) {
 .account-menu { max-width: 24rem; }
 .account-menu-items { position: absolute; right: 0; top: 100%; z-index: 20; width: max-content; max-width: min(24rem, 85vw); }
}
@media (max-width: 700px) {
 .account-menu { flex-basis: 100%; }
 .account-menu-items { box-shadow: none; padding-inline: 1rem; }
}

.about-version { font-size: 1.4rem; font-weight: 600; margin-block: 0 1.5rem; }
.about-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .65rem 1.5rem; margin-block: 1.5rem 2rem; }
.about-details dt { font-weight: 600; }
.about-details dd { margin: 0; overflow-wrap: anywhere; }
#version-details { display: block; width: 100%; margin-block: .75rem; }

/* Compact admission and independent licence permissions. */
.grant-choices { width: 100%; table-layout: fixed; margin: 1rem 0; border-collapse: collapse; }
.grant-choices caption { text-align: left; font-weight: 600; margin-bottom: .5rem; }
.grant-choices th, .grant-choices td { padding: .35rem .5rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.grant-choices th:first-child { text-align: left; width: 44%; }
.grant-choices td, .grant-choices thead th:not(:first-child) { text-align: center; }
.grant-choices label { display: inline-flex; min-height: 44px; min-width: 44px; align-items: center; justify-content: center; margin: 0; }
.grant-choices input { margin: 0; }
.automatic-permission { font-size: .875rem; color: var(--muted); }
.application-heading { margin-bottom: 1rem; }
.application-heading h1 { font-size: 1.75rem; }
.application-heading p { margin: .25rem 0; overflow-wrap: anywhere; }
.applicant-summary { margin: 1rem 0; }
.applicant-summary dd { margin: .25rem 0 .75rem; max-width: 72ch; overflow-wrap: anywhere; }
.application-roles { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; padding: .5rem 0; }
.application-roles label { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; margin: 0; }
.application-history { margin-top: 1.5rem; }
.application-history dd { overflow-wrap: anywhere; }

.attention-dot { display: inline-block; vertical-align: super; width: .45rem; height: .45rem; margin-inline-start: .2rem; border-radius: 50%; background: var(--error); flex: 0 0 auto; }
.attention-dot[hidden] { display: none; }
.attention-freshness { color: var(--muted); max-width: 26ch; }

/* Bulk metadata follows the chapter textarea and ordinary administration forms. */
.bulk-example { white-space:pre-wrap; overflow-wrap:anywhere; max-width:100%; padding:1rem; background:var(--surface); color:var(--ink); border:1px solid var(--line); }
.chapter-text { caret-color:var(--accent); }

/* Link actions occupy a single toolbar cell; feedback never changes reader layout. */
.share-control { display:inline-flex; flex:none; flex-wrap:wrap; max-width:100%; align-items:center; margin:0; }
.share-control noscript { flex-basis:100%; white-space:normal; overflow-wrap:anywhere; }
.share-control [data-copy-link][data-glyph-ready] { width:44px; height:44px; padding:.5rem; }
.share-control [data-copy-link][data-glyph-ready] .glyph-label,
.share-toast [data-share-close][data-glyph-ready] .glyph-label { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.share-heading { display:flex; align-items:center; gap:.75rem; min-width:0; }
.share-heading h1 { min-width:0; margin-block:0; overflow-wrap:anywhere; }
.share-heading .share-control { align-self:flex-start; }
.reader-controls > .share-control, .video-control-groups > .share-control { border-inline:1px solid var(--line); padding-inline:.5rem; }
.book-reader .reader-controls > .share-control { order:0; }
.share-toast { position:fixed; inset:auto 1rem 1rem auto; margin:0; box-sizing:border-box; width:max-content; max-width:min(28rem, calc(100vw - 2rem)); max-height:calc(100dvh - 2rem); padding:.65rem .75rem; overflow:auto; color:var(--ink); background:var(--surface); border:1px solid var(--control-border); border-radius:4px; z-index:1100; }
.share-toast[hidden] { display:none; }
.share-toast-heading { display:flex; align-items:center; gap:.5rem; }
.share-toast-heading p { margin:0; flex:1; }
.share-toast [data-share-close] { flex:none; width:44px; min-height:44px; padding:.5rem; }
.share-toast [data-share-fallback] { margin-top:.5rem; }
.share-toast [data-share-fallback] label { display:grid; gap:.3rem; }
.share-toast [data-share-url] { width:100%; min-width:0; box-sizing:border-box; font:inherit; padding:.6rem; color:var(--ink); background:var(--paper); border:1px solid var(--control-border); border-radius:4px; }
.share-toast [data-share-fallback] p { margin:.4rem 0 0; font-size:.875rem; }
@media (max-width:700px) {
 .share-toast { inset:1rem .5rem auto; max-width:calc(100vw - 1rem); width:auto; }
 .book-reader .reader-controls > .share-control { order:5; padding-inline:.25rem; }
}

#review-notifications { margin-top:2rem; }

/* Passive freshness feedback never inserts a new line above the active task. */
.task-freshness-slot { min-block-size:3.2em; min-block-size:2lh; margin-block:1rem; }
.task-freshness-slot p { margin:0; }
html:has(body.tasks-page) { scrollbar-gutter:stable; }

/* Reserve the existing task link's footprint through idle/error transitions. */
.background-task-slot { display:inline-flex; align-items:center; flex:0 0 11rem; inline-size:11rem; max-inline-size:100%; min-block-size:46px; min-block-size:max(46px, 2lh); }
.background-task-slot > a { position:relative; display:inline-flex; align-items:center; inline-size:100%; min-block-size:46px; }
.task-attention-marker { position:absolute; inset-block-start:.25em; inset-inline-end:.15em; inline-size:.45rem; block-size:.45rem; border-radius:50%; background:var(--error); }
[data-background-control][data-attention="0"]:has([data-task-unavailable][hidden]) .task-attention-marker { display:none; }

/* Extreme metadata must not vertically detach its cover from the Title. */
.title-study-identity .title-art { align-self:start; }
/* Trix/transfer feedback has a stable place above the explicit Post action. */
.member-compose #save-feedback { min-block-size:10em; }
@media(min-width:700px) { .member-compose #save-feedback { min-block-size:4.95em; } }

/* Static outline rows share list scrolling, never chapter controls. */
.chapter-selector .chapter-list>.chapter-heading { display:block; padding:.65rem 0 .25rem; font-weight:650; color:var(--ink); }
.chapter-selector .chapter-list>.chapter-heading[data-level="2"] { padding-inline-start:.5rem; }
.chapter-selector .chapter-list>.chapter-heading[data-level="3"] { padding-inline-start:1rem; }
.chapter-selector .chapter-list>.chapter-heading[data-level="4"] { padding-inline-start:1.5rem; }
.chapter-selector .chapter-list>.chapter-heading[data-level="5"] { padding-inline-start:2rem; }
.chapter-selector .chapter-list>.chapter-heading[data-level="6"] { padding-inline-start:2.5rem; }
.chapter-heading>span { display:block; overflow-wrap:anywhere; }

.chapter-saved-outline { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; }

.quality-filter .editor-field label:has(input[type=checkbox]) { display:flex; align-items:center; min-height:44px; font-weight:400; }
.quality-title { padding-block:1rem; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }

.title-subtitle { font-size:1.1rem; line-height:1.4; margin-bottom:.5rem; color:var(--muted); overflow-wrap:anywhere; }
.title-study-identity .title-subtitle { font-size:1.35rem; }
.collection-records .title-name > :is(h2,h3):has(+ :is(.title-subtitle,.title-byline)) { margin-bottom:0; }
/* Keep the caption at text height; extend the native link's hit area over
   the following plain subtitle/byline instead of reserving an empty row. */
.collection-records .title-name > :is(h2,h3):has(+ :is(.title-subtitle,.title-byline)) > a { display:block; position:relative; min-height:0; }
.collection-records .title-name > :is(h2,h3):has(+ :is(.title-subtitle,.title-byline)) > a::after { content:""; position:absolute; inset:0; min-width:44px; min-height:44px; }
.collection-records .title-name > :is(h2,h3):has(+ :is(.title-subtitle,.title-byline)) > a:focus-visible { outline-offset:0; }
.collection-records .title-subtitle { margin-block:0 .5rem; }
.collection-records .title-subtitle + .title-byline { margin-top:0; }
.collection-records .title-name > :is(h2,h3) + .title-byline { margin-top:.5rem; }
.title-art-with-back-cover { position:relative; width:fit-content; max-width:100%; align-self:start; }
.back-cover-open { position:absolute; right:-8px; bottom:-8px; display:grid; place-items:center; width:44px; height:44px; color:var(--ink); }
.back-cover-open svg { width:28px; height:28px; padding:4px; border:1px solid var(--control-border); border-radius:4px; background:var(--surface); }
.back-cover-open:hover svg { background:var(--hover); }
[data-back-cover-dialog] { width:min(94vw,1100px); max-height:94dvh; overflow:auto; background:var(--surface); color:var(--ink); border:1px solid var(--line); padding:1rem; }
[data-back-cover-dialog]::backdrop { background:rgb(0 0 0 / 65%); }
.back-cover-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.75rem; }
.back-cover-heading h2 { margin:0; }
.back-cover-controls { display:flex; gap:.5rem; flex-wrap:wrap; align-items:center; margin-bottom:.75rem; }
.back-cover-viewport { height:min(60dvh,800px); overflow:auto; overscroll-behavior:contain; scrollbar-color:var(--muted) var(--surface); }
.back-cover-viewport img { display:block; max-width:none; height:auto; margin-inline:auto; }
[data-back-cover-dialog] > .quiet { margin-block:.75rem 0; }


/* Owner feedback: keep optional material actions with their subject. */
.video-control-groups .video-download {
 border-inline:1px solid var(--line); padding-inline:.5rem;
}
/* Preview follows the filename at the row edge; preparation guidance spans below. */
.file-row { grid-template-columns:24px minmax(0,1fr) fit-content(18rem); }
.file-row > .file-copy { grid-column:2; grid-row:1; }
.file-row > .filename { grid-column:3; grid-row:1; min-width:0; align-self:center; text-align:right; }
.file-row > [data-file-preview-status] { grid-column:2 / -1; grid-row:2; min-width:0; }
.file-row > [data-file-preview-status] > p { margin:0; }
.file-row:has(> [data-file-preview-status] [data-files-preview]) {
 grid-template-columns:24px minmax(0,1fr) fit-content(18rem) auto;
}
.file-row > [data-file-preview-status]:has([data-files-preview]) {
 grid-column:4; grid-row:1; align-self:center; justify-self:end;
}
.file-row [data-files-preview][data-glyph-ready] { width:44px; height:44px; padding:.5rem; }
.file-row [data-files-preview][data-glyph-ready] .glyph-label {
 position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
@media(max-width:700px) {
 .file-row { grid-template-columns:24px minmax(0,1fr); }
 .file-row:has(> [data-file-preview-status] [data-files-preview]) { grid-template-columns:24px minmax(0,1fr) auto; }
 .file-row > .file-copy { grid-column:2 / -1; }
 .file-row > .filename { grid-column:2; grid-row:2; }
 .file-row > [data-file-preview-status] { grid-row:3; }
 .file-row > [data-file-preview-status]:has([data-files-preview]) { grid-column:3; grid-row:2; }
}

/* Keep incomplete destinations unmistakable inside the reading region. */
.pdf-render-error { position:sticky; top:0; z-index:3; padding:1rem; color:var(--ink); background:var(--surface); border:1px solid var(--ink); max-width:65ch; margin:0 auto 1rem; }
.pdf-render-error p { margin-top:0; }
.pdf-spread[data-retained] { opacity:.55; }

.file-row > [data-retired-intent] { grid-column:2 / -1; min-width:0; }

.chapter-watched { grid-column:4; grid-row:1; width:44px; min-height:44px; padding:0; border:0; border-radius:0; background:transparent; color:var(--muted); }
.chapter-watched svg path { visibility:hidden; }
.chapter-watched[aria-pressed=true] { color:var(--success); }
.chapter-watched[aria-pressed=true] svg path { visibility:visible; }
.chapter-watched:hover { background:var(--hover); }
.chapter-watched[aria-disabled=true] { opacity:.6; cursor:wait; }
