:root {
  --paper: #f3eee2;
  --paper-deep: #e7decc;
  --paper-light: #fbf8f0;
  --surface: rgba(255, 253, 247, 0.92);
  --surface-solid: #fffdf7;
  --ink: #202923;
  --ink-soft: #536057;
  --ink-faint: #7f887f;
  --line: #d8cfbc;
  --line-dark: #bcb09a;
  --brass: #a7772c;
  --brass-dark: #78511d;
  --brass-pale: #efe0bd;
  --green: #466b57;
  --green-pale: #dce8df;
  --red: #963f35;
  --red-pale: #f2ded8;
  --blue: #486a78;
  --blue-pale: #dce8eb;
  --shadow: 0 20px 55px rgba(45, 39, 27, 0.11);
  --shadow-small: 0 8px 24px rgba(45, 39, 27, 0.08);
  --page-highlight: rgba(255,255,255,.72);
  --page-rule: rgba(126,103,64,.045);
  --auth-wash: rgba(255,253,247,.82);
  --header-glass: rgba(250,247,238,.94);
  --nav-glass: rgba(243,238,226,.95);
  --nav-hover: rgba(255,255,255,.5);
  --heading-start: rgba(255,255,255,.8);
  --heading-end: rgba(239,224,189,.28);
  --verse-line: rgba(216,207,188,.7);
  --verse-hover: rgba(239,224,189,.2);
  --verse-selected-start: rgba(239,224,189,.42);
  --verse-selected-end: rgba(255,255,255,.4);
  --scripture-ink: #29332c;
  --red-letter: #a43227;
  --neutral-pill: #ebe8df;
  --neutral-dot: #92978f;
  --disabled-surface: #ede9df;
  --empty-surface: rgba(255,255,255,.35);
  --skeleton-surface: #e3dccd;
  --skeleton-glint: rgba(255,255,255,.6);
  --status-track: #e5dfd2;
  --ribbon-year: #d9ba7b;
  --ribbon-meta: #aeb8b0;
  --inverse-surface: #202923;
  --inverse-ink: #fffdf7;
  --inverse-hover: #344139;
  --danger-surface: #963f35;
  --danger-ink: #fff;
  --warning-line: #d9bd80;
  --warning-surface: #f7eccf;
  --red-line: #d7a197;
  --blue-line: #abc4cb;
  --conflict-line: #c16a5c;
  --dispute-line: #d29b90;
  --primary-metric-copy: #bdc7bf;
  --progress-track: #4a554e;
  --sheet-shadow: rgba(32,41,35,.24);
  --facsimile-paper: #ead5a8;
  --facsimile-paper-deep: #dfc48e;
  --facsimile-ink: #49311f;
  --facsimile-rule: rgba(91, 57, 31, .64);
  --facsimile-muted: #76583c;
  --facsimile-selection: rgba(255, 251, 220, .58);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Gill Sans", "Trebuchet MS", sans-serif;
  --radius: 14px;
}

:root[data-theme="dark"] {
  --paper: #171a18;
  --paper-deep: #111411;
  --paper-light: #272b26;
  --surface: rgba(31, 35, 31, 0.94);
  --surface-solid: #232722;
  --ink: #f1eadc;
  --ink-soft: #c5bdad;
  --ink-faint: #999285;
  --line: #3e443d;
  --line-dark: #596057;
  --brass: #c99b50;
  --brass-dark: #e1bb73;
  --brass-pale: #403522;
  --green: #91bf9e;
  --green-pale: #263a2d;
  --red: #e58b80;
  --red-pale: #452a27;
  --blue: #91bccb;
  --blue-pale: #263b42;
  --shadow: 0 20px 58px rgba(0, 0, 0, 0.34);
  --shadow-small: 0 8px 26px rgba(0, 0, 0, 0.24);
  --page-highlight: rgba(231,218,190,.035);
  --page-rule: rgba(210,181,126,.025);
  --auth-wash: rgba(28,32,28,.84);
  --header-glass: rgba(25,29,25,.94);
  --nav-glass: rgba(20,23,20,.95);
  --nav-hover: rgba(255,255,255,.055);
  --heading-start: rgba(255,255,255,.035);
  --heading-end: rgba(201,155,80,.09);
  --verse-line: rgba(89,96,87,.58);
  --verse-hover: rgba(201,155,80,.08);
  --verse-selected-start: rgba(201,155,80,.16);
  --verse-selected-end: rgba(255,255,255,.025);
  --scripture-ink: #e8e1d4;
  --red-letter: #ef8d80;
  --neutral-pill: #30352f;
  --neutral-dot: #7f877d;
  --disabled-surface: #2c302b;
  --empty-surface: rgba(255,255,255,.025);
  --skeleton-surface: #343932;
  --skeleton-glint: rgba(255,255,255,.08);
  --status-track: #353a34;
  --ribbon-year: #e0b96f;
  --ribbon-meta: #aab4ac;
  --inverse-surface: #101310;
  --inverse-ink: #f1eadc;
  --inverse-hover: #303832;
  --danger-surface: #a64f45;
  --danger-ink: #fff8f4;
  --warning-line: #735d35;
  --warning-surface: #382f20;
  --red-line: #75443e;
  --blue-line: #3e6571;
  --conflict-line: #a95d52;
  --dispute-line: #75443e;
  --primary-metric-copy: #bbc5bd;
  --progress-track: #414941;
  --sheet-shadow: rgba(0,0,0,.52);
  --facsimile-paper: #342e23;
  --facsimile-paper-deep: #2a251d;
  --facsimile-ink: #eadbbe;
  --facsimile-rule: rgba(224, 195, 143, .44);
  --facsimile-muted: #bda780;
  --facsimile-selection: rgba(201, 155, 80, .18);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--paper); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 12% 0%, var(--page-highlight), transparent 30rem),
    linear-gradient(105deg, transparent 49.7%, var(--page-rule) 50%, transparent 50.3%) 0 0 / 52px 52px,
    var(--paper);
}

button, input, select, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(167,119,44,.3);
  outline-offset: 2px;
}

.app-root { min-height: 100vh; }

.eyebrow {
  display: block;
  color: var(--brass-dark);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-seal {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid var(--brass);
  border-radius: 50%;
  color: var(--brass-dark);
  font-family: var(--serif);
  font-size: 2.3rem;
  box-shadow: inset 0 0 0 5px var(--paper-light), inset 0 0 0 6px var(--brass-pale);
  background: var(--surface-solid);
}

.small-seal { width: 42px; height: 42px; font-size: 1.45rem; box-shadow: inset 0 0 0 3px var(--paper-light), inset 0 0 0 4px var(--brass-pale); }

.boot-screen, .auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
}

.boot-screen { align-content: center; text-align: center; }
.boot-screen .brand-seal { margin-bottom: 22px; }
.boot-screen h1 { margin: 7px 0 20px; font: 2.1rem/1.1 var(--serif); }
.loading-rule { width: 180px; height: 2px; overflow: hidden; background: var(--line); }
.loading-rule span { display: block; width: 42%; height: 100%; background: var(--brass); animation: loading-slide 1.25s infinite ease-in-out; }
@keyframes loading-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(350%); } }

.auth-screen {
  grid-template-columns: minmax(280px, 560px) minmax(220px, 380px);
  gap: min(8vw, 110px);
  background: linear-gradient(90deg, var(--auth-wash) 0 58%, transparent 58%);
}
.auth-paper { position: relative; padding: clamp(32px, 7vw, 78px); border: 1px solid var(--line); background: var(--surface-solid); box-shadow: var(--shadow); }
.auth-paper::before { position: absolute; inset: 10px; border: 1px solid var(--brass-pale); content: ""; pointer-events: none; }
.auth-paper .brand-seal { margin-bottom: 30px; }
.auth-paper h1 { max-width: 470px; margin: 12px 0 18px; font: 3rem/1.02 var(--serif); }
.auth-paper p { max-width: 470px; margin: 0 0 30px; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.7; }
.auth-paper .text-button { display: block; margin: 18px auto 0; }
.auth-screen blockquote { margin: 0; font: italic 1.7rem/1.45 var(--serif); }
.auth-screen cite { display: block; margin-top: 14px; color: var(--brass-dark); font: 700 .72rem var(--sans); letter-spacing: .13em; text-transform: uppercase; }
.auth-actions { display: grid; gap: 9px; }
.team-login-form { position: relative; display: grid; gap: 13px; margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-light); }
.team-login-form .button { width: 100%; }
.inline-error { margin: 0 !important; color: var(--red) !important; font-size: .75rem !important; line-height: 1.45 !important; }

.invite-screen { display: grid; min-height: 100vh; grid-template-columns: minmax(300px, 610px) minmax(220px, 370px); place-content: center; gap: min(8vw, 100px); padding: 32px; background: linear-gradient(90deg, var(--auth-wash) 0 60%, transparent 60%); }
.invite-screen blockquote { align-self: center; margin: 0; font: italic 1.7rem/1.45 var(--serif); }
.invite-screen cite { display: block; margin-top: 14px; color: var(--brass-dark); font: 700 .72rem var(--sans); letter-spacing: .13em; text-transform: uppercase; }
.invite-paper { position: relative; padding: clamp(32px, 6vw, 66px); border: 1px solid var(--line); background: var(--surface-solid); box-shadow: var(--shadow); }
.invite-paper::before { position: absolute; inset: 10px; border: 1px solid var(--brass-pale); content: ""; pointer-events: none; }
.invite-paper .brand-seal { margin-bottom: 26px; }
.invite-paper h1 { margin: 12px 0 18px; font: 2.75rem/1.04 var(--serif); }
.invite-paper > p { color: var(--ink-soft); line-height: 1.65; }
.invite-form { display: grid; gap: 14px; margin-top: 26px; }
.invite-form .button { width: 100%; margin-top: 4px; }
.invite-expiry { display: block; margin-top: 16px; color: var(--ink-faint); text-align: center; }

.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 520px) minmax(250px, 1fr);
  align-items: center;
  min-height: 78px;
  padding: 10px clamp(18px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
  background: var(--header-glass);
  backdrop-filter: blur(16px);
}

.brand-block, .header-status, .user-chip { display: flex; align-items: center; }
.brand-block { gap: 12px; }
.brand-block strong { display: block; margin-top: 3px; font: 1.15rem var(--serif); }
.header-status { justify-content: flex-end; gap: 24px; }
.user-chip { gap: 9px; }
.user-chip > span, .avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--inverse-ink); background: var(--inverse-surface); font-size: .68rem; font-weight: 800; letter-spacing: .05em; }
.user-chip strong, .user-chip small { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip strong { font-size: .8rem; }
.user-chip small { margin-top: 2px; color: var(--ink-faint); font-size: .67rem; }

.theme-toggle { display: inline-flex; min-height: 36px; align-items: center; gap: 8px; padding: 5px 10px 5px 7px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink-soft); background: var(--surface-solid); font-size: .65rem; font-weight: 800; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.theme-toggle:hover { border-color: var(--brass); color: var(--ink); }
.theme-icon { position: relative; display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--brass-pale); }
.theme-icon::before { position: absolute; top: 5px; left: 5px; width: 8px; height: 8px; border: 2px solid var(--brass-dark); border-radius: 50%; content: ""; }
.theme-icon i { display: none; }
[data-theme="dark"] .theme-icon::before { top: 4px; left: 7px; width: 9px; height: 9px; border: 0; border-radius: 50%; background: var(--brass-dark); box-shadow: -4px 2px 0 1px var(--brass-pale); }

.edition-control { position: relative; display: block; width: 100%; }
.edition-control .eyebrow { position: absolute; z-index: 1; top: 8px; left: 14px; font-size: .57rem; }
.edition-control select {
  width: 100%; height: 56px; padding: 20px 94px 6px 14px; border: 1px solid var(--line-dark); border-radius: 7px; color: var(--ink); background: var(--surface-solid); font: 700 .85rem var(--sans); appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 20px) 25px, calc(100% - 15px) 25px; background-size: 5px 5px; background-repeat: no-repeat;
}
.edition-state { position: absolute; top: 20px; right: 34px; padding: 3px 7px; border-radius: 20px; color: var(--green); background: var(--green-pale); font-size: .57rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.edition-final { color: var(--brass-dark); background: var(--brass-pale); }
.edition-reopened { color: var(--red); background: var(--red-pale); }

.save-status { display: flex; align-items: center; gap: 7px; color: var(--ink-faint); font-size: .72rem; white-space: nowrap; }
.save-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.save-saving i { background: var(--brass); animation: pulse 1s infinite; }
.save-offline i, .save-conflict i { background: var(--red); }
.save-submitted i { background: var(--blue); }
@keyframes pulse { 50% { opacity: .3; transform: scale(.8); } }

.primary-nav {
  position: sticky;
  z-index: 25;
  top: 78px;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--nav-glass);
  backdrop-filter: blur(12px);
}
.primary-nav a { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 7px; color: var(--ink-soft); font-size: .78rem; font-weight: 700; text-decoration: none; }
.primary-nav a:hover { background: var(--nav-hover); }
.primary-nav a.router-link-active { color: var(--ink); background: var(--surface-solid); box-shadow: 0 1px 0 var(--line); }
.nav-symbol { display: grid; width: 20px; height: 20px; place-items: center; color: var(--brass-dark); font: 700 .85rem var(--serif); }

.edition-ribbon { display: flex; justify-content: center; align-items: baseline; gap: 9px; min-height: 32px; padding: 7px 20px; color: var(--inverse-ink); background: var(--inverse-surface); font-size: .72rem; }
.edition-ribbon > span { color: var(--ribbon-year); font: 700 .8rem var(--serif); }
.edition-ribbon small { color: var(--ribbon-meta); }

.workspace-page { width: min(1540px, calc(100% - 36px)); margin: 0 auto; padding: 28px 0 70px; }
.workspace-toolbar, .page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 24px; }
.workspace-toolbar h2 { margin: 5px 0 0; font: 1.8rem var(--serif); }
.editor-toolbar-controls { display: flex; align-items: end; gap: 10px; }
.review-mode-toggle { display: flex; height: 45px; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid var(--line-dark); border-radius: 24px; color: var(--ink-soft); background: var(--surface-solid); font-size: .7rem; font-weight: 800; cursor: pointer; }
.review-mode-toggle input { width: 15px; height: 15px; margin: 0; accent-color: var(--red); }
.review-mode-toggle.active { border-color: var(--red); color: var(--red); background: var(--red-pale); }
.review-mode-toggle strong { display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 50%; color: var(--danger-ink); background: var(--red); font-size: .61rem; }
.workflow-filter { display: grid; gap: 5px; color: var(--ink-faint); font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.workflow-filter select { min-width: 145px; height: 45px; padding: 0 10px; border: 1px solid var(--line-dark); border-radius: 7px; color: var(--ink); background: var(--surface-solid); }
.page-heading { padding: 15px 4px 8px; }
.page-heading h1 { margin: 6px 0 7px; font: clamp(2.2rem, 4vw, 3.6rem)/1 var(--serif); letter-spacing: -.035em; }
.page-heading p { max-width: 650px; margin: 0; color: var(--ink-soft); line-height: 1.55; }
.count-medallion { display: grid; width: 82px; height: 82px; place-items: center; align-content: center; border: 1px solid var(--brass); border-radius: 50%; color: var(--brass-dark); font: 2rem/1 var(--serif); background: var(--paper-light); }
.count-medallion small { margin-top: 4px; font: 700 .57rem var(--sans); letter-spacing: .13em; text-transform: uppercase; }

.chapter-loader { display: flex; gap: 9px; width: min(620px, 55vw); }
.chapter-search { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 220px; padding: 0 14px; border: 1px solid var(--line-dark); border-radius: 7px; background: var(--surface-solid); }
.chapter-search input { width: 100%; height: 45px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-icon { color: var(--brass-dark); font: 1.4rem var(--serif); }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 10px 18px; border: 1px solid transparent; border-radius: 6px; font-size: .76rem; font-weight: 800; letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-small); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { color: var(--inverse-ink); background: var(--inverse-surface); }
.button-primary:hover:not(:disabled) { background: var(--inverse-hover); }
.button-secondary { border-color: var(--line-dark); color: var(--ink); background: var(--surface-solid); }
.button-danger { color: var(--danger-ink); background: var(--danger-surface); }
.button-large { min-height: 50px; padding-inline: 26px; }
.text-button { padding: 4px 0; border: 0; color: var(--brass-dark); background: transparent; font-size: .73rem; font-weight: 800; cursor: pointer; }
.danger-text { color: var(--red); }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink-soft); background: transparent; font-size: 1.2rem; cursor: pointer; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.button-stack { display: grid; gap: 8px; }

.notice { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px 16px; border: 1px solid; border-radius: 8px; font-size: .8rem; }
.notice strong { white-space: nowrap; }
.notice span { color: var(--ink-soft); }
.notice .text-button { margin-left: auto; }
.notice-warning { border-color: var(--warning-line); background: var(--warning-surface); }
.notice-error { border-color: var(--red-line); background: var(--red-pale); }
.notice-info { border-color: var(--blue-line); background: var(--blue-pale); }

.editor-layout { display: grid; grid-template-columns: minmax(500px, 1fr) minmax(340px, 430px); gap: 18px; align-items: start; }
.scripture-card, .editor-inspector, .inspector-placeholder, .queue-panel, .comparison-panel, .heading-tree-panel, .heading-editor-panel, .book-preview-card, .book-form-card, .admin-card, .status-ledger, .workflow-ledger, .chapter-ledger {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-small);
}
.scripture-card { overflow: hidden; }
.scripture-heading { display: flex; justify-content: space-between; align-items: center; min-height: 112px; padding: 25px clamp(24px, 5vw, 62px); border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--heading-start), var(--heading-end)); }
.scripture-heading h1 { margin: 5px 0 0; font: clamp(2.1rem, 4vw, 3.4rem)/1 var(--serif); }
.scripture-heading h1 span { color: var(--brass-dark); }
.scripture-heading-status { display: flex; align-items: center; gap: 10px; }
.review-loading-label { color: var(--ink-faint); font-size: .62rem; }
.verse-count { color: var(--ink-faint); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.verse-scroll { max-height: calc(100vh - 304px); min-height: 420px; overflow-y: auto; overflow-anchor: none; }
.reader-block { display: flow-root; }
.reader-edge { min-height: 40px; padding: 12px; text-align: center; color: var(--ink-muted); }
.verse-row { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 21px clamp(22px, 4vw, 54px); border-bottom: 1px solid var(--verse-line); cursor: pointer; transition: background .15s; }
.verse-row:hover { background: var(--verse-hover); }
.verse-row.selected { background: linear-gradient(90deg, var(--verse-selected-start), var(--verse-selected-end)); box-shadow: inset 3px 0 var(--brass); }
.scripture-outline-headings { grid-column: 1 / -1; display: grid; gap: 4px; margin: -3px 0 3px 64px; }
.scripture-outline-headings .heading-button { color: var(--brass-dark); font: italic 1.08rem/1.35 var(--serif); }
.scripture-outline-headings .heading-button + .heading-button { padding-left: 20px; font-size: .96rem; }
.review-alert-button { display: inline-grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; padding: 0; border: 2px solid var(--surface-solid); border-radius: 50%; color: var(--danger-ink); background: var(--red); box-shadow: 0 2px 7px rgba(80, 25, 20, .24); font: 900 .72rem/1 var(--sans); cursor: pointer; }
.review-alert-button:hover, .review-alert-button:focus-visible { transform: scale(1.08); outline: 2px solid var(--red-line); outline-offset: 2px; }
.review-alert-button.inline-alert { width: 18px; height: 18px; margin-left: 7px; border-width: 1px; font-size: .58rem; vertical-align: middle; }
.heading-preview-pending { text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: var(--brass-dark); text-underline-offset: 3px; }
.verse-gutter { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.verse-number { width: 34px; height: 34px; border: 1px solid var(--line-dark); border-radius: 50%; color: var(--brass-dark); background: var(--paper-light); font: 700 .94rem var(--serif); cursor: pointer; }
.verse-text { margin: 0; color: var(--scripture-ink); font: 1.24rem/2 var(--serif); }
.word-button { margin: 0 5px 0 0; padding: 1px 0; border: 0; border-bottom: 1px solid transparent; color: inherit; background: transparent; font: inherit; cursor: text; }
.word-button:hover, .word-button:focus { border-bottom-color: var(--brass); color: var(--brass-dark); }
.word-button.italic { font-style: italic; }
.word-button.red-letter { color: var(--red-letter); }
.word-button sup { position: relative; top: -.45em; margin-left: 1px; color: var(--brass-dark); font: 700 .52em var(--sans); }
.word-button sup.word-margin-marker { margin-right: 1px; margin-left: 0; }
.verse-meta { grid-column: 2; display: flex; align-items: center; gap: 12px; margin-top: 7px; color: var(--ink-faint); font-size: .65rem; }
.workflow-state { padding: 3px 7px; border-radius: 20px; color: var(--ink-soft); background: var(--neutral-pill); font-weight: 800; text-transform: capitalize; }
.workflow-in_review { color: var(--blue); background: var(--blue-pale); }
.workflow-changes_requested { color: var(--red); background: var(--red-pale); }
.workflow-in_progress { color: var(--brass-dark); background: var(--brass-pale); }
.workflow-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.workflow-grid article { display: grid; gap: 10px; padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.workflow-grid article > div { display: flex; flex-wrap: wrap; gap: 5px; }
.workflow-grid article span { padding: 4px 7px; border-radius: 20px; color: var(--ink-soft); background: var(--neutral-pill); font-size: .6rem; font-weight: 800; }
.verse-footnote-preview { grid-column: 2; display: grid; gap: 4px; margin: 7px 0 1px; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--ink-soft); background: var(--paper-light); list-style: none; }
.verse-footnote-preview li { display: grid; grid-template-columns: 16px 1fr; gap: 5px; font: .78rem/1.45 var(--serif); }
.verse-footnote-preview sup { color: var(--brass-dark); font: 800 .58rem var(--sans); }

.facsimile-page-stack { display: grid; gap: 26px; padding: 18px; background: var(--paper-deep); }
.facsimile-mode-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 5px; color: var(--ink-faint); font-size: .63rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.facsimile-mode-label strong { color: var(--brass-dark); }
.facsimile-mode-actions, .facsimile-zoom-control { display: flex; align-items: center; }
.facsimile-mode-actions { gap: 14px; }
.facsimile-zoom-control { overflow: hidden; border: 1px solid var(--line-dark); border-radius: 999px; background: var(--surface-solid); }
.facsimile-zoom-control button { width: 29px; height: 27px; border: 0; color: var(--ink); background: transparent; font: 800 1rem/1 var(--sans); cursor: pointer; }
.facsimile-zoom-control button:hover:not(:disabled) { color: var(--brass-dark); background: var(--paper-deep); }
.facsimile-zoom-control button:disabled { opacity: .35; cursor: default; }
.facsimile-zoom-control output { min-width: 46px; color: var(--ink-soft); font: 800 .66rem/1 var(--sans); letter-spacing: .02em; text-align: center; }
.facsimile-page-viewport { overflow-x: auto; border-radius: 4px; box-shadow: 0 15px 38px rgba(50, 37, 20, .2); }
.scofield-facsimile-page {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 6.25in;
  min-width: 6.25in;
  height: 10in;
  min-height: 10in;
  aspect-ratio: 5 / 8;
  margin: 0 auto;
  padding: 25px 27px 16px;
  color: var(--facsimile-ink);
  background:
    radial-gradient(circle at 15% 9%, rgba(255,255,255,.1), transparent 22rem),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(92,56,28,.018) 3px 4px),
    var(--facsimile-paper);
  font-family: var(--serif);
  box-shadow: inset 0 0 48px rgba(91, 57, 31, .08);
}
.facsimile-running-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 18px; margin-bottom: 10px; padding: 0 4px 10px; border-bottom: 1px solid var(--facsimile-rule); font-size: .72rem; }
.facsimile-running-head span { font-size: .96rem; font-weight: 800; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.facsimile-running-head strong:last-child { text-align: right; }
.facsimile-opening { position: relative; padding: 5px 5px 14px; border-bottom: 1px solid var(--facsimile-rule); text-align: center; }
.facsimile-title-prefix { display: block; max-width: 440px; margin: 0 auto 5px; font-size: .72rem; font-weight: 700; letter-spacing: .09em; line-height: 1.2; text-transform: uppercase; }
.facsimile-opening-title { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 14px; margin-bottom: 6px; }
.facsimile-opening-title h2 { margin: 0; font: small-caps 1.9rem/1 var(--serif); letter-spacing: .045em; }
.facsimile-opening-title strong { font-size: .7rem; text-align: left; }
.facsimile-opening-title strong:last-child { text-align: right; }
.facsimile-side-heading { display: block; margin: 7px 0 8px; font-size: .82rem; font-weight: 700; }
.facsimile-introduction { font-size: .75rem; line-height: 1.13; text-align: justify; white-space: pre-wrap; }
.facsimile-introduction::first-letter { font-size: 1.15em; font-weight: 800; }
.facsimile-analysis { display: grid; gap: 1px; margin: 7px auto 0; padding: 0; font-size: .7rem; line-height: 1.12; list-style: none; }
.facsimile-analysis li { text-align: center; }
.facsimile-analysis strong { margin-right: 4px; }
.facsimile-scripture-grid { display: grid; flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) 94px minmax(0, 1fr); align-items: stretch; border-bottom: 1px solid var(--facsimile-rule); }
.facsimile-column { min-height: 250px; padding: 7px 5px 9px; }
.facsimile-left-column { border-right: 1px solid var(--facsimile-rule); }
.facsimile-right-column { border-left: 1px solid var(--facsimile-rule); }
.facsimile-verse { position: relative; margin: 0; padding: 0 2px 1px; font-size: .76rem; line-height: 1.08; text-align: justify; cursor: pointer; }
.facsimile-verse.selected { background: var(--facsimile-selection); box-shadow: 0 0 0 2px var(--facsimile-selection); }
.facsimile-verse.unplaced { border-left: 2px dashed var(--facsimile-rule); padding-left: 5px; }
.facsimile-placement-hint { display: block; margin: 3px 0 2px; color: var(--facsimile-muted); font: 700 .46rem var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.facsimile-headings { display: grid; margin: 4px 0 3px; text-align: center; }
.facsimile-headings .heading-button { font-size: .82rem; font-style: italic; font-weight: 700; line-height: 1.05; }
.facsimile-headings .heading-button:first-child { font-style: normal; }
.facsimile-headings .chapter-heading-text { font-family: "Times New Roman", Times, serif; font-variant-numeric: lining-nums; }
.facsimile-review-alert { width: 13px; height: 13px; margin: 0 2px; border: 1px solid var(--facsimile-paper); box-shadow: none; font-size: .43rem; vertical-align: middle; }
.book-review-alert { position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; }
.facsimile-verse-number, .facsimile-word { margin: 0; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; cursor: text; }
.facsimile-verse-number { margin-right: 4px; font-weight: 800; cursor: pointer; }
.facsimile-word { margin-right: .23em; }
.facsimile-word:hover, .facsimile-word:focus, .facsimile-verse-number:hover, .facsimile-verse-number:focus { color: var(--brass-dark); text-decoration: underline; text-underline-offset: 2px; }
.facsimile-word.italic { font-style: italic; }
.facsimile-word.red-letter { color: var(--red-letter); }
.facsimile-word sup { position: relative; top: -.35em; margin-left: 1px; font-size: .63em; font-weight: 800; }
.facsimile-word sup.word-margin-marker { margin-right: 1px; margin-left: 0; }
.facsimile-margin { min-height: 250px; padding: 6px 5px 9px; overflow-wrap: anywhere; }
.facsimile-page-date { display: block; margin: 0 -2px 7px; padding-bottom: 4px; border-bottom: 1px solid var(--facsimile-rule); font-size: .58rem; text-align: center; }
.facsimile-margin-row { display: grid; grid-template-columns: 10px 1fr; gap: 2px; margin-bottom: 5px; font-size: .52rem; line-height: 1.08; cursor: pointer; }
.facsimile-margin-row sup { font-weight: 800; }
.facsimile-margin-row span { overflow-wrap: anywhere; }
.facsimile-margin-row.margin-date { display: block; margin: 7px 0 5px; padding-top: 4px; border-top: 1px dotted var(--facsimile-rule); font-size: .55rem; text-align: center; }
.facsimile-footnotes { display: grid; gap: 2px; margin: 0; padding: 8px 7px 2px; list-style: none; }
.facsimile-footnotes li { display: grid; grid-template-columns: 14px 1fr; gap: 2px; font-size: .68rem; line-height: 1.08; text-align: justify; }
.facsimile-footnotes sup { font-weight: 800; }
.facsimile-page-number { padding-top: 7px; font-size: .72rem; font-weight: 800; text-align: center; }
.unplaced-scripture-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 22px clamp(22px, 4vw, 54px) 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-light); }
.unplaced-scripture-heading h2 { margin: 4px 0 0; font: 1.35rem var(--serif); }
.unplaced-scripture-heading p { max-width: 330px; margin: 0; color: var(--ink-faint); font-size: .68rem; line-height: 1.45; text-align: right; }

.status-badge { display: inline-flex; align-items: center; gap: 6px; width: max-content; padding: 4px 8px; border-radius: 20px; color: var(--ink-soft); background: var(--neutral-pill); font-size: .59rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.status-badge.compact { width: 10px; height: 10px; padding: 0; background: transparent; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--neutral-dot); }
.status-draft { color: var(--brass-dark); background: var(--brass-pale); }.status-draft .status-dot { background: var(--brass); }
.status-in_review { color: var(--blue); background: var(--blue-pale); }.status-in_review .status-dot { background: var(--blue); }
.status-approved { color: var(--green); background: var(--green-pale); }.status-approved .status-dot { background: var(--green); }
.status-changes_requested, .status-disputed { color: var(--red); background: var(--red-pale); }.status-changes_requested .status-dot, .status-disputed .status-dot { background: var(--red); }

.editor-inspector { position: sticky; top: 174px; display: flex; max-height: calc(100vh - 194px); overflow: hidden; flex-direction: column; }
.inspector-placeholder { position: sticky; top: 174px; min-height: 330px; padding: 55px 38px; color: var(--ink-soft); text-align: center; }
.placeholder-mark, .empty-mark { display: block; color: var(--brass); font: 3.4rem var(--serif); }
.inspector-placeholder h3 { margin: 13px 0 8px; color: var(--ink); font: 1.45rem var(--serif); }
.inspector-placeholder p { margin: 0 auto 20px; line-height: 1.55; }
.inspector-placeholder small { color: var(--ink-faint); }
kbd { padding: 2px 5px; border: 1px solid var(--line-dark); border-radius: 4px; background: var(--paper-light); box-shadow: 0 1px 0 var(--line-dark); font-size: .63rem; }
.inspector-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 20px 14px; }
.inspector-header h2 { margin: 4px 0 0; font: 1.55rem var(--serif); }
.inspector-status { display: flex; align-items: center; justify-content: space-between; padding: 0 20px 14px; }
.workflow-scope-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 0 14px 12px; }
.workflow-scope-strip > span { min-width: 0; padding: 6px 4px; border-radius: 5px; color: var(--ink-soft); background: var(--neutral-pill); text-align: center; }
.workflow-scope-strip strong, .workflow-scope-strip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-scope-strip strong { font-size: .56rem; text-transform: uppercase; }.workflow-scope-strip small { margin-top: 2px; font-size: .5rem; text-transform: capitalize; }
.read-only-label { color: var(--ink-faint); font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.inspector-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 14px; border-bottom: 1px solid var(--line); }
.inspector-tabs.has-review { grid-template-columns: repeat(4, 1fr); }
.inspector-tabs button { padding: 11px 4px 9px; border: 0; border-bottom: 2px solid transparent; color: var(--ink-faint); background: transparent; font-size: .7rem; font-weight: 800; cursor: pointer; }
.inspector-tabs button.active { border-bottom-color: var(--brass); color: var(--ink); }
.inspector-tabs button:disabled { opacity: .35; }
.inspector-body { flex: 1 1 auto; min-height: 0; padding: 19px 20px 28px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
.standalone-review-inspector { overflow-y: auto; }
.inline-review-panel { display: grid; gap: 14px; padding: 18px; }
.inline-review-panel.embedded { margin: 0; padding: 14px; overflow: visible; border: 1px solid var(--blue-line); border-radius: 10px; background: linear-gradient(145deg, var(--blue-pale), var(--surface-solid)); }
.inline-review-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inline-review-header h3 { margin: 3px 0 0; font: 1.2rem var(--serif); }
.review-card-heading { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; }
.review-card-heading h3 { margin: 2px 0 0; font: 1.25rem/1.1 var(--serif); }
.review-card-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--inverse-ink); background: var(--blue); font-size: .95rem; font-weight: 900; }
.review-step-count { align-self: start; padding: 5px 8px; border-radius: 20px; color: var(--blue); background: var(--surface-solid); font-size: .6rem; font-weight: 800; white-space: nowrap; }
.review-scope-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.review-scope-nav button { display: grid; min-width: 0; gap: 2px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-soft); background: var(--surface-solid); cursor: pointer; }
.review-scope-nav button span { overflow: hidden; font-size: .57rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }.review-scope-nav button small { color: var(--ink-faint); font-size: .5rem; font-weight: 750; }
.review-scope-nav button.active { border-color: var(--blue); color: var(--blue); background: var(--blue-pale); box-shadow: inset 0 0 0 1px var(--blue-line); }
.review-submitter-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid); }
.review-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--brass-dark); background: var(--brass-pale); font-size: .78rem; font-weight: 900; }
.review-submitter { min-width: 0; }.review-submitter small, .review-submitter strong { display: block; }.review-submitter small { color: var(--ink-faint); font-size: .54rem; font-weight: 800; text-transform: uppercase; }.review-submitter strong { margin-top: 2px; overflow: hidden; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }.review-submitter em { margin-left: 3px; color: var(--red); font-size: .55rem; font-style: normal; text-transform: uppercase; }
.review-approval-count { min-width: 54px; padding-left: 10px; border-left: 1px solid var(--line); text-align: center; }.review-approval-count strong, .review-approval-count small { display: block; }.review-approval-count strong { color: var(--blue); font-size: .82rem; }.review-approval-count small { margin-top: 1px; color: var(--ink-faint); font-size: .48rem; text-transform: uppercase; }.review-approval-count.complete strong { color: var(--green); }
.review-eligibility { display: grid; grid-template-columns: 25px 1fr; align-items: start; gap: 8px; padding: 10px 11px; border: 1px solid var(--warning-line); border-radius: 8px; color: var(--ink-soft); background: var(--warning-surface); }
.review-eligibility > span { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: var(--brass-dark); background: var(--brass-pale); font-size: .7rem; font-weight: 900; }.review-eligibility strong, .review-eligibility small { display: block; }.review-eligibility strong { color: var(--ink); font-size: .68rem; }.review-eligibility small { margin-top: 2px; font-size: .6rem; line-height: 1.4; }
.review-eligibility.reviewed { border-color: var(--green); background: var(--green-pale); }.review-eligibility.reviewed > span { color: var(--green); background: var(--surface-solid); }.review-eligibility.own-work { border-color: var(--red-line); background: var(--red-pale); }.review-eligibility.own-work > span { color: var(--danger-ink); background: var(--red); }
.review-readable-form { display: grid; gap: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-solid); }
.review-readable-form label { display: grid; gap: 3px; }.review-readable-form label > span { color: var(--ink-faint); font-size: .56rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.review-readable-form strong { font: .95rem var(--serif); }.review-readable-form p { margin: 0; color: var(--ink-soft); font-size: .7rem; line-height: 1.5; white-space: pre-wrap; }
.review-readable-form.compact { grid-template-columns: 26px 1fr; align-items: start; gap: 9px; padding: 9px 10px; }.review-readable-form.compact strong { font: 700 .68rem var(--sans); }.review-readable-form.compact p { margin-top: 2px; font-size: .6rem; line-height: 1.4; }
.review-open-fields { margin-top: 5px; font-size: .62rem; }
.review-instruction-number { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--blue); background: var(--blue-pale); font-size: .65rem; font-weight: 900; }
.review-comment { margin-top: 1px; }
.friendly-review-actions { display: grid; gap: 8px; }
.friendly-review-actions > .button { width: 100%; }.friendly-review-actions .button span { margin-right: 4px; font-size: .9rem; }
.review-approve-button { background: var(--green); }.review-approve-button:hover:not(:disabled) { filter: brightness(.92); }
.review-minor-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 2px; }.review-minor-actions .text-button { font-size: .62rem; }
.review-waiting-copy { margin: 0; padding: 8px 10px; border-radius: 6px; color: var(--ink-soft); background: var(--neutral-pill); font-size: .62rem; line-height: 1.45; text-align: center; }
.review-override-link { justify-self: center; padding: 4px; border: 0; color: var(--red); background: transparent; font-size: .59rem; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.review-confirm-card { display: grid; gap: 9px; padding: 11px; border: 1px solid var(--warning-line); border-radius: 8px; background: var(--warning-surface); }.review-confirm-card.danger { border-color: var(--red-line); background: var(--red-pale); }.review-confirm-card strong, .review-confirm-card small { display: block; }.review-confirm-card strong { font-size: .72rem; }.review-confirm-card small { margin-top: 2px; color: var(--ink-soft); font-size: .6rem; line-height: 1.4; }.review-confirm-card textarea { width: 100%; padding: 9px; border: 1px solid var(--line-dark); border-radius: 6px; color: var(--ink); background: var(--surface-solid); resize: vertical; }.review-confirm-card .button { flex: 1; }
.review-correction-active { display: grid; gap: 3px; padding: 10px 11px; border: 1px solid var(--brass); border-radius: 7px; background: var(--paper-light); }
.review-correction-active strong { color: var(--brass-dark); font-size: .72rem; }.review-correction-active span { color: var(--ink-soft); font-size: .65rem; line-height: 1.45; }
.review-correction-form { padding: 12px; border: 1px solid var(--brass); border-radius: 8px; background: var(--paper-light); }
.review-correction-actions .button { flex: 1; }
.decision-reject { color: var(--red); }
.inspector-footer { position: relative; z-index: 2; display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--paper-light); box-shadow: 0 -8px 18px rgba(45, 35, 23, .06); }
.inspector-footer .button { flex: 1; }
.inspector-action-help { flex-basis: 100%; margin: 0 0 3px; color: var(--ink-faint); font-size: .63rem; line-height: 1.4; }
.dispute-form { display: grid; width: 100%; gap: 8px; margin-top: 6px; }

.field-stack { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; color: var(--ink-soft); font-size: .68rem; font-weight: 800; letter-spacing: .03em; }
.field > span { text-transform: uppercase; }
.field input, .field select, .field textarea, .review-actions textarea, .dispute-form textarea, .compact-search {
  width: 100%; border: 1px solid var(--line-dark); border-radius: 6px; color: var(--ink); background: var(--surface-solid); font-weight: 500; letter-spacing: normal; text-transform: none;
}
.field input, .field select { height: 40px; padding: 0 11px; }
.field textarea, .review-actions textarea, .dispute-form textarea { padding: 10px 11px; line-height: 1.45; resize: vertical; }
.field input:disabled, .field select:disabled, .field textarea:disabled { color: var(--ink-soft); background: var(--disabled-surface); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-top: 8px; }
.section-heading h3 { margin: 3px 0 0; font: 1.2rem var(--serif); }
.note-row { display: grid; grid-template-columns: 28px 1fr 24px; gap: 7px; align-items: start; }
.note-row textarea { min-height: 55px; padding: 8px; border: 1px solid var(--line-dark); border-radius: 5px; color: var(--ink); background: var(--surface-solid); resize: vertical; }
.editable-marker-row > input { width: 28px; height: 34px; padding: 0; border: 1px solid var(--line-dark); border-radius: 5px; color: var(--brass-dark); background: var(--surface-solid); font-weight: 800; text-align: center; }
.note-number { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: var(--brass-dark); background: var(--brass-pale); font-size: .66rem; font-weight: 800; }
.remove-button { border: 0; color: var(--red); background: transparent; font-size: 1.1rem; cursor: pointer; }
.quiet-empty { padding: 14px; border: 1px dashed var(--line-dark); border-radius: 6px; color: var(--ink-faint); font-size: .73rem; text-align: center; }
.word-context { padding: 13px 15px; border-left: 3px solid var(--brass); background: var(--paper); }
.word-context strong { display: block; margin-top: 5px; font: 1.35rem var(--serif); }
.format-toolbar { display: flex; gap: 7px; }
.format-toolbar button { min-width: 38px; height: 36px; border: 1px solid var(--line-dark); border-radius: 5px; background: var(--surface-solid); cursor: pointer; }
.format-toolbar button.active { border-color: var(--brass); color: var(--brass-dark); background: var(--brass-pale); }
.format-toolbar .red-control { width: auto; padding: 0 10px; color: var(--red); font-size: .7rem; font-weight: 700; }
.reference-card { display: grid; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper-light); }
.reference-grid, .form-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 12px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.reference-tag { padding: 5px 8px; border: 0; border-radius: 20px; color: var(--blue); background: var(--blue-pale); font-size: .65rem; cursor: pointer; }
.print-layout-grid { grid-template-columns: .72fr 1.28fr; }
.chronology-grid { grid-template-columns: 1fr 1fr; }
.column-break-card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--warning-line); border-radius: 7px; background: var(--warning-surface); }
.page-break-card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--blue-line); border-radius: 7px; background: var(--blue-pale); }
.page-break-card .split-preview { border-top-color: var(--blue-line); }
.check-field { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: .72rem; font-weight: 700; }
.check-field input { accent-color: var(--brass); }
.split-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--warning-line); }
.split-preview span { color: var(--ink-faint); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.split-preview strong { font: 1rem var(--serif); }
.field-help { margin: -7px 0 0; color: var(--ink-faint); font-size: .68rem; line-height: 1.45; }
.outline-context { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper-light); }
.outline-context p { margin: 0; color: var(--ink-faint); font-size: .72rem; }
.outline-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.outline-path span { color: var(--brass-dark); font: italic .95rem var(--serif); }
.outline-path span:not(:last-child)::after { margin-left: 6px; color: var(--ink-faint); content: "›"; font-style: normal; }
.activity-list { display: grid; gap: 0; }
.activity-item { display: grid; grid-template-columns: 16px 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.activity-mark { width: 8px; height: 8px; margin-top: 4px; border: 2px solid var(--brass); border-radius: 50%; }
.activity-item strong, .activity-item p, .activity-item small { display: block; margin: 0; }
.activity-item strong { font-size: .72rem; }.activity-item p { margin-top: 3px; color: var(--ink-soft); font-size: .72rem; text-transform: capitalize; }.activity-item small { margin-top: 4px; color: var(--ink-faint); font-size: .61rem; }

.empty-state { display: grid; justify-items: center; color: var(--ink-soft); text-align: center; }
.compact-empty { padding: 48px 24px; }
.large-empty { min-height: 420px; align-content: center; margin-top: 20px; border: 1px dashed var(--line-dark); border-radius: var(--radius); background: var(--empty-surface); }
.large-empty h2 { margin: 5px 0 8px; color: var(--ink); font: 2rem var(--serif); }
.large-empty p { margin: 0; }

.skeleton { position: relative; overflow: hidden; border-radius: 5px; background: var(--skeleton-surface); }
.skeleton::after { position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--skeleton-glint), transparent); animation: shimmer 1.4s infinite; content: ""; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skeleton.title { width: 45%; height: 32px; margin: 28px; }.skeleton.line { width: calc(100% - 100px); height: 18px; margin: 27px 50px; }.skeleton.field-line { height: 46px; margin: 22px; }
.skeleton-inspector { min-height: 500px; }

.conflict-bar, .merge-bar { position: fixed; z-index: 40; bottom: 22px; left: 50%; display: flex; min-width: min(620px, calc(100vw - 30px)); align-items: center; justify-content: space-between; gap: 20px; padding: 13px 15px 13px 20px; border: 1px solid var(--conflict-line); border-radius: 9px; background: var(--surface-solid); box-shadow: var(--shadow); transform: translateX(-50%); }
.conflict-bar strong, .conflict-bar span { display: block; }.conflict-bar span { margin-top: 2px; color: var(--ink-soft); font-size: .7rem; }

.review-layout { display: grid; grid-template-columns: 290px 1fr; gap: 18px; align-items: start; }
.queue-panel { position: sticky; top: 174px; overflow: hidden; }
.panel-title { display: flex; justify-content: space-between; align-items: end; gap: 15px; padding: 20px; border-bottom: 1px solid var(--line); }
.panel-title h2 { margin: 4px 0 0; font: 1.45rem var(--serif); }.panel-title > span { color: var(--ink-faint); font-size: .68rem; }
.queue-item { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 17px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.queue-item:hover, .queue-item.active { background: var(--brass-pale); }.queue-item.active { box-shadow: inset 3px 0 var(--brass); }
.queue-item strong, .queue-item small { display: block; }.queue-item strong { font: 1rem var(--serif); }.queue-item small { margin-top: 4px; color: var(--ink-faint); font-size: .61rem; }
.comparison-panel { min-width: 0; padding-bottom: 24px; }
.comparison-heading { display: flex; justify-content: space-between; align-items: center; padding: 22px 25px; border-bottom: 1px solid var(--line); }
.comparison-heading h2 { margin: 4px 0 0; font: 1.75rem var(--serif); }
.proposal-grid { display: grid; grid-template-columns: repeat(2, minmax(300px, 1fr)); gap: 14px; padding: 18px; overflow-x: auto; }
.proposal-grid.single { grid-template-columns: minmax(300px, 620px); }
.proposal-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper-light); }
.proposal-card.selected { border-color: var(--brass); box-shadow: inset 0 0 0 2px var(--brass-pale); }
.proposal-card > header { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.proposal-card h3 { margin: 3px 0 0; font: 1.2rem var(--serif); }.revision-label { color: var(--ink-faint); font-size: .65rem; font-weight: 800; }
.proposal-select { display: grid; justify-items: center; gap: 2px; color: var(--ink-faint); font-size: .52rem; text-transform: uppercase; }.proposal-select input { accent-color: var(--brass); }
.proposal-summary { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 12px 0; font-size: .7rem; }.proposal-summary dt, .proposal-summary dd { margin: 0; padding: 7px 5px; border-bottom: 1px solid var(--line); }.proposal-summary dt { color: var(--ink-faint); }.proposal-summary dd { overflow: hidden; font-weight: 700; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.change-callout { margin-top: 12px; padding: 8px 10px; border-left: 3px solid var(--blue); color: var(--blue); background: var(--blue-pale); font-size: .65rem; }
.proposal-card details { margin: 12px 0; }.proposal-card summary { color: var(--brass-dark); font-size: .68rem; font-weight: 800; cursor: pointer; }.proposal-card pre { max-height: 260px; overflow: auto; padding: 10px; border-radius: 5px; color: #dde4df; background: #28322c; font-size: .61rem; white-space: pre-wrap; }
.review-history { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }.review-history span { padding: 4px 7px; border-radius: 20px; color: var(--green); background: var(--green-pale); font-size: .58rem; }.review-history .decision-request_changes { color: var(--red); background: var(--red-pale); }
.review-actions { display: grid; gap: 8px; padding-top: 13px; border-top: 1px solid var(--line); }.review-actions textarea { padding: 8px; resize: vertical; }.review-actions .button { flex: 1; }
.merge-bar { border-color: var(--brass); }
.dispute-review { margin: 18px; padding: 15px; border: 1px solid var(--dispute-line); border-radius: 8px; background: var(--red-pale); }.dispute-review p { font: 1.05rem/1.5 var(--serif); }

.heading-layout { display: grid; grid-template-columns: minmax(420px, 1.15fr) minmax(320px, .75fr); gap: 18px; align-items: start; }
.heading-tree-panel, .heading-editor-panel { overflow: hidden; }
.heading-editor-panel { position: sticky; top: 174px; padding-bottom: 20px; }
.heading-panel-title { align-items: center; }
.compact-search { display: flex; width: 210px; align-items: center; gap: 5px; padding: 0 9px; }.compact-search input { width: 100%; height: 34px; border: 0; outline: 0; background: transparent; font-size: .72rem; }
.heading-tree { margin: 0; padding: 12px 0 25px; list-style: none; }.heading-tree ul { margin: 0 0 0 32px; padding: 0; border-left: 1px solid var(--line); list-style: none; }
.heading-tree button { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 11px 20px; border: 0; background: transparent; text-align: left; cursor: pointer; }.heading-tree button:hover, .heading-tree button.active { color: var(--brass-dark); background: var(--brass-pale); }.heading-tree button span { font: 1rem var(--serif); }.heading-tree button small { color: var(--ink-faint); }
.heading-tree button span { display: grid; gap: 3px; }
.heading-tree button small { font: 600 .6rem var(--sans); }
.heading-editor-panel > .field-stack { padding: 20px; }.pending-headings { margin: 10px 20px 0; padding-top: 5px; border-top: 1px solid var(--line); }.pending-headings .section-heading { margin-bottom: 10px; }
.pending-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }.pending-item strong, .pending-item small { display: block; }.pending-item strong { font: .95rem var(--serif); }.pending-item small { margin-top: 2px; color: var(--ink-faint); font-size: .6rem; text-transform: capitalize; }
.legacy-notice { justify-content: space-between; }.legacy-notice > div:first-child { display: grid; gap: 3px; }
.tree-line { height: 19px; margin: 20px; }.tree-line:nth-child(even) { width: 65%; margin-left: 55px; }
.anchor-grid { grid-template-columns: 1fr 1fr; }
.parent-picker { position: relative; display: grid; gap: 7px; }
.field-label { color: var(--ink-soft); font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.selected-parent { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-left: 3px solid var(--brass); border-radius: 4px; background: var(--brass-pale); font: .86rem var(--serif); }
.selected-parent button { border: 0; color: var(--red); background: transparent; cursor: pointer; }
.parent-search { width: 100%; }
.parent-results { position: absolute; z-index: 5; top: 100%; right: 0; left: 0; overflow: hidden; margin-top: 4px; border: 1px solid var(--line-dark); border-radius: 7px; background: var(--surface-solid); box-shadow: var(--shadow-small); }
.parent-results button { display: grid; width: 100%; gap: 3px; padding: 9px 11px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.parent-results button:hover { background: var(--brass-pale); }
.parent-results strong { font: .88rem var(--serif); }
.parent-results small, .parent-results p { margin: 0; color: var(--ink-faint); font-size: .59rem; }
.parent-results p { padding: 12px; text-align: center; }

.book-selector { display: grid; min-width: min(320px, 100%); gap: 6px; color: var(--ink-soft); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.book-selector select { height: 44px; padding: 0 12px; border: 1px solid var(--line-dark); border-radius: 7px; color: var(--ink); background: var(--surface-solid); font-weight: 700; text-transform: none; }
.book-layout { display: grid; grid-template-columns: minmax(380px, .82fr) minmax(520px, 1.18fr); gap: 18px; align-items: start; }
.book-preview-card { position: sticky; top: 174px; overflow: hidden; }
.book-preview-card > header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.book-title-preview { padding: 36px 34px 30px; border-bottom: 3px double var(--line-dark); background: linear-gradient(135deg, var(--heading-start), var(--heading-end)); text-align: center; }
.book-title-preview > small { display: block; margin-bottom: 20px; color: var(--ink-faint); font-size: .62rem; }
.book-title-preview > span { display: block; margin-bottom: 5px; color: var(--ink-soft); font: .72rem var(--serif); letter-spacing: .08em; text-transform: uppercase; }
.book-title-preview > div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 15px; }
.book-title-preview h2 { grid-column: 2; margin: 0; font: small-caps 2.7rem/1 var(--serif); letter-spacing: .05em; }
.book-title-preview em { grid-column: 3; justify-self: start; color: var(--brass-dark); font: italic .8rem/1.3 var(--serif); text-align: left; }
.book-copy-preview { padding: 22px 28px; border-bottom: 1px solid var(--line); }
.book-copy-preview h3 { margin: 0 0 9px; font: small-caps 1.18rem var(--serif); letter-spacing: .05em; }
.book-copy-preview p { margin: 0; font: .96rem/1.65 var(--serif); white-space: pre-wrap; }
.book-copy-preview ol { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.book-copy-preview li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; font: .88rem/1.45 var(--serif); }
.preview-empty { color: var(--ink-faint); font-style: italic !important; }
.book-form-card { overflow: hidden; }
.book-form-card > .field-stack { padding: 22px; }
.book-title-fields { grid-template-columns: .68fr 1.32fr; }
.analysis-row { display: grid; grid-template-columns: 54px 1fr 24px; gap: 8px; align-items: start; }
.analysis-row input, .analysis-row textarea { width: 100%; border: 1px solid var(--line-dark); border-radius: 6px; color: var(--ink); background: var(--surface-solid); }
.analysis-row input { height: 40px; padding: 0 8px; text-align: center; }
.analysis-row textarea { min-height: 58px; padding: 9px; resize: vertical; }
.book-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.book-form-actions > span { color: var(--ink-faint); font-size: .66rem; font-weight: 700; }

.metric-grid { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 15px; margin-bottom: 18px; }
.metric-card { min-height: 178px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-small); }
.metric-card strong { display: block; margin: 13px 0 4px; font: 3.1rem/1 var(--serif); }.metric-card p { margin: 0; color: var(--ink-soft); font-size: .72rem; }.primary-metric { color: var(--inverse-ink); background: var(--inverse-surface); }.primary-metric .eyebrow { color: var(--ribbon-year); }.primary-metric p { color: var(--primary-metric-copy); }.alert-metric strong { color: var(--red); }
.progress-track { height: 5px; margin-top: 23px; overflow: hidden; border-radius: 5px; background: var(--progress-track); }.progress-track span { display: block; height: 100%; background: var(--ribbon-year); }
.status-ledger, .chapter-ledger { margin-bottom: 18px; overflow: hidden; }.status-bars { display: grid; gap: 13px; padding: 22px; }.status-bar-row { display: grid; grid-template-columns: 140px 1fr 34px; gap: 12px; align-items: center; font-size: .7rem; }.status-bar-row > div { height: 8px; overflow: hidden; border-radius: 8px; background: var(--status-track); }.status-bar-row i { display: block; height: 100%; border-radius: inherit; background: var(--brass); }.status-bar-row .bar-approved { background: var(--green); }.status-bar-row .bar-in_review { background: var(--blue); }.status-bar-row .bar-changes_requested, .status-bar-row .bar-disputed { background: var(--red); }
.chapter-table { display: grid; grid-template-columns: repeat(3, 1fr); }.chapter-table article { display: flex; justify-content: space-between; align-items: center; padding: 15px 19px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }.chapter-table strong, .chapter-table small { display: block; }.chapter-table strong { font: 1rem var(--serif); }.chapter-table small { margin-top: 3px; color: var(--ink-faint); font-size: .6rem; }.mini-statuses { display: flex; gap: 3px; }.mini-statuses span { display: grid; min-width: 22px; height: 22px; place-items: center; border-radius: 50%; color: var(--ink-soft); background: var(--status-track); font-size: .56rem; font-weight: 800; }.mini-statuses .mini-approved { color: var(--green); background: var(--green-pale); }.mini-statuses .mini-in_review { color: var(--blue); background: var(--blue-pale); }.mini-statuses .mini-disputed, .mini-statuses .mini-changes_requested { color: var(--red); background: var(--red-pale); }

.admin-grid { display: grid; grid-template-columns: minmax(400px, .9fr) minmax(430px, 1.1fr); gap: 18px; align-items: start; }.admin-card { overflow: hidden; padding-bottom: 20px; }.admin-card > .field-stack, .admin-card > .form-grid, .admin-card > .button-row { margin: 20px; }.admin-card .wide { grid-column: 1 / -1; }.create-edition-card { margin-bottom: 18px; }.create-edition-card > .form-grid { grid-template-columns: repeat(4, 1fr); }.rights-pill { padding: 5px 8px; border-radius: 20px; color: var(--green); background: var(--green-pale); font-size: .59rem; font-weight: 800; text-transform: uppercase; }.rights-needs_review, .rights-restricted { color: var(--red); background: var(--red-pale); }
.team-list { padding: 6px 20px; }.team-list article { display: grid; grid-template-columns: 34px 1fr 140px; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }.team-list strong, .team-list small { display: block; }.team-list strong { font-size: .78rem; }.team-list small { margin-top: 3px; color: var(--ink-faint); font-size: .62rem; }.team-list select { height: 34px; padding: 0 8px; border: 1px solid var(--line-dark); border-radius: 5px; background: var(--surface-solid); font-size: .68rem; }.team-line { height: 45px; margin: 12px 0; }
.invite-card { margin-bottom: 18px; }
.invite-admin-layout { display: grid; grid-template-columns: minmax(360px, .95fr) minmax(400px, 1.05fr); }
.invite-create-form { display: grid; align-content: start; gap: 16px; padding: 22px; border-right: 1px solid var(--line); }
.invite-create-form > p { margin: 0; color: var(--ink-soft); font-size: .78rem; line-height: 1.6; }
.invite-form-row { display: grid; grid-template-columns: 1.4fr .7fr auto; gap: 10px; align-items: end; }
.field span small { color: var(--ink-faint); font-size: .56rem; font-weight: 600; text-transform: none; }
.created-invite { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--blue-line); border-radius: 8px; background: var(--blue-pale); }
.created-invite strong, .created-invite small { display: block; }.created-invite small { margin-top: 3px; color: var(--ink-soft); font-size: .65rem; }
.invite-link-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }.invite-link-row input { min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line-dark); border-radius: 5px; background: var(--surface-solid); font-size: .66rem; }
.invitation-ledger { max-height: 360px; overflow-y: auto; }
.invitation-item { display: grid; grid-template-columns: minmax(180px, 1fr) auto 54px; gap: 12px; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.invitation-item strong, .invitation-item small { display: block; }.invitation-item strong { font-size: .76rem; }.invitation-item small { margin-top: 4px; color: var(--ink-faint); font-size: .6rem; }
.invite-status { padding: 4px 7px; border-radius: 20px; color: var(--ink-soft); background: var(--neutral-pill); font-size: .56rem; font-weight: 800; text-transform: uppercase; }
.invite-active { color: var(--green); background: var(--green-pale); }.invite-accepted { color: var(--blue); background: var(--blue-pale); }.invite-revoked, .invite-expired { color: var(--red); background: var(--red-pale); }

.token-count { padding: 7px 11px; border-radius: 20px; color: var(--green); background: var(--green-pale); font-size: .64rem; font-weight: 800; white-space: nowrap; text-transform: uppercase; }
.token-security-note { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--blue-line); border-radius: 9px; background: var(--blue-pale); }
.security-mark { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--inverse-ink); background: var(--blue); font: 1.05rem var(--serif); }
.token-security-note strong, .token-security-note p { display: block; }.token-security-note strong { font-size: .78rem; }.token-security-note p { margin: 3px 0 0; color: var(--ink-soft); font-size: .69rem; line-height: 1.5; }
.token-access-grid { display: grid; grid-template-columns: minmax(380px, .85fr) minmax(480px, 1.15fr); gap: 18px; align-items: start; }
.token-create-form { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 14px; padding: 20px; }
.token-create-form .button { grid-column: 1 / -1; justify-self: start; }
.created-token { display: grid; gap: 14px; margin: 0 20px; padding: 17px; border: 1px solid var(--warning-line); border-radius: 9px; background: var(--warning-surface); }
.created-token strong { display: block; margin-top: 4px; font: 1.05rem var(--serif); }.created-token p { margin: 5px 0 0; color: var(--ink-soft); font-size: .69rem; line-height: 1.55; }
.token-secret-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: stretch; }.token-secret-row textarea { min-width: 0; padding: 9px 10px; border: 1px solid var(--line-dark); border-radius: 6px; color: var(--ink); background: var(--surface-solid); font: .62rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; resize: none; }
.created-token > code { overflow-x: auto; padding: 9px 10px; border-radius: 5px; color: var(--ink-soft); background: var(--surface-solid); font-size: .63rem; white-space: nowrap; }
.token-list { max-height: 590px; overflow-y: auto; }.token-list-loading { display: grid; gap: 12px; padding: 20px; }.token-line { height: 98px; }
.token-item { display: grid; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }.token-item:last-child { border-bottom: 0; }.token-item-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }.token-item-heading strong, .token-item-heading code { display: block; }.token-item-heading strong { font-size: .82rem; }.token-item-heading code { margin-top: 5px; color: var(--ink-faint); font-size: .64rem; letter-spacing: .08em; }
.token-status { padding: 4px 7px; border-radius: 20px; color: var(--ink-soft); background: var(--neutral-pill); font-size: .56rem; font-weight: 800; text-transform: uppercase; }.token-active { color: var(--green); background: var(--green-pale); }.token-revoked, .token-expired { color: var(--red); background: var(--red-pale); }
.token-item dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }.token-item dl div { min-width: 0; }.token-item dt { color: var(--ink-faint); font-size: .55rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }.token-item dd { margin: 4px 0 0; overflow: hidden; color: var(--ink-soft); font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }.token-item > .text-button { justify-self: start; }

.agent-safety-note { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--warning-line); border-radius: 9px; background: var(--warning-surface); }
.agent-safety-note .security-mark { font: 700 .68rem var(--sans); letter-spacing: .04em; background: var(--brass-dark); }
.agent-safety-note strong, .agent-safety-note p { display: block; }.agent-safety-note strong { font-size: .78rem; }.agent-safety-note p { margin: 3px 0 0; color: var(--ink-soft); font-size: .69rem; line-height: 1.5; }
.agent-guide-grid { display: grid; grid-template-columns: minmax(270px, .62fr) minmax(560px, 1.38fr); gap: 18px; align-items: start; }
.agent-steps-card { position: sticky; top: 174px; }
.agent-steps { display: grid; gap: 0; margin: 0; padding: 4px 20px 8px; list-style: none; }
.agent-steps li { display: grid; grid-template-columns: 31px 1fr; gap: 11px; padding: 16px 0; border-bottom: 1px solid var(--line); }.agent-steps li:last-child { border-bottom: 0; }
.agent-steps li > span { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid var(--line-dark); border-radius: 50%; color: var(--brass-dark); background: var(--paper-light); font: 700 .8rem var(--serif); }
.agent-steps strong { display: block; font-size: .75rem; }.agent-steps p { margin: 4px 0 0; color: var(--ink-soft); font-size: .66rem; line-height: 1.5; }
.agent-facts { display: grid; gap: 10px; margin: 5px 20px 0; padding: 15px; border-radius: 8px; background: var(--blue-pale); }.agent-facts div { min-width: 0; }.agent-facts dt { color: var(--blue); font-size: .55rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.agent-facts dd { margin: 3px 0 0; overflow-wrap: anywhere; color: var(--ink-soft); font-size: .64rem; line-height: 1.45; }
.agent-prompt-card { padding-bottom: 0; }
.agent-prompt-title { align-items: center; }.agent-prompt-title .button { flex: 0 0 auto; }
.agent-prompt-intro { margin: 18px 20px 13px; color: var(--ink-soft); font-size: .72rem; line-height: 1.6; }
.agent-prompt-text { display: block; width: calc(100% - 40px); min-height: 540px; margin: 0 20px 20px; padding: 18px; border: 1px solid var(--line-dark); border-radius: 8px; color: var(--ink); background: var(--surface-solid); font: .67rem/1.62 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; resize: vertical; tab-size: 2; }
.agent-prompt-footer { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--empty-surface); }.agent-prompt-footer span { padding: 5px 8px; border-radius: 20px; color: var(--green); background: var(--green-pale); font-size: .55rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

.footnote-continuations { grid-column: 1 / -1; display: grid; gap: 12px; min-width: 0; }
.footnote-continuation { display: grid; gap: 10px; padding: 12px; border-left: 2px solid var(--brass); background: var(--paper-light); }
.footnote-continuation .field input, .footnote-continuation .field textarea { width: 100%; }
.footnote-continued-label { font-size: .85em; }
.toast-stack { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; width: min(390px, calc(100vw - 40px)); gap: 8px; }
.toast-message { display: flex; justify-content: space-between; gap: 12px; padding: 13px 15px; border: 1px solid var(--line-dark); border-left: 4px solid var(--blue); border-radius: 7px; color: var(--ink); background: var(--surface-solid); box-shadow: var(--shadow); text-align: left; cursor: pointer; }.toast-success { border-left-color: var(--green); }.toast-error { border-left-color: var(--red); }.toast-warning { border-left-color: var(--brass); }.toast-close { color: var(--ink-faint); }

@media (max-width: 1100px) {
  .app-header { grid-template-columns: auto 1fr auto; gap: 18px; }.brand-block > div:last-child, .save-status, .user-chip > div { display: none; }.header-status { gap: 10px; }.edition-control { max-width: 500px; justify-self: center; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }.chapter-table { grid-template-columns: repeat(2, 1fr); }
  .admin-grid, .token-access-grid, .agent-guide-grid { grid-template-columns: 1fr; }.agent-steps-card { position: static; }.create-edition-card > .form-grid { grid-template-columns: repeat(2, 1fr); }.invite-admin-layout { grid-template-columns: 1fr; }.invite-create-form { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 820px) {
  .app-header { min-height: 68px; padding: 8px 13px; }.primary-nav { top: 68px; justify-content: flex-start; overflow-x: auto; }.primary-nav a { flex: 0 0 auto; padding: 8px 11px; }.edition-ribbon small { display: none; }
  .workspace-page { width: min(100% - 20px, 720px); padding-top: 18px; }.workspace-toolbar, .page-heading { align-items: stretch; flex-direction: column; }.editor-toolbar-controls { align-items: stretch; flex-direction: column; }.chapter-loader { width: 100%; }.page-heading h1 { font-size: 2.5rem; }
  .editor-layout { display: block; }.inspector-placeholder { display: none; }.verse-scroll { max-height: none; min-height: 50vh; overflow: visible; }.scripture-heading { padding-inline: 24px; }.verse-row { grid-template-columns: 40px 1fr; padding-inline: 18px; }.verse-text { font-size: 1.12rem; }
  .facsimile-page-stack { padding: 12px; }.facsimile-page-viewport { border-radius: 3px; }.unplaced-scripture-heading { align-items: flex-start; flex-direction: column; gap: 6px; }.unplaced-scripture-heading p { text-align: left; }
  .editor-inspector { position: fixed; z-index: 60; right: 0; bottom: 0; left: 0; top: auto; height: 86vh; height: 86dvh; max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px); border-radius: 18px 18px 0 0; box-shadow: 0 -20px 60px var(--sheet-shadow); }.editor-inspector::before { display: block; flex: 0 0 auto; width: 42px; height: 4px; margin: 8px auto -2px; border-radius: 4px; background: var(--line-dark); content: ""; }
  .review-layout, .heading-layout { grid-template-columns: 1fr; }.queue-panel, .heading-editor-panel { position: static; }.queue-panel { max-height: 280px; overflow-y: auto; }.proposal-grid { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
  .book-layout { grid-template-columns: 1fr; }.book-preview-card { position: static; }
  .metric-grid { grid-template-columns: 1fr 1fr; }.chapter-table { grid-template-columns: 1fr; }
  .auth-screen, .invite-screen { grid-template-columns: 1fr; background: transparent; }.auth-screen blockquote, .invite-screen blockquote { display: none; }.auth-paper h1, .invite-paper h1 { font-size: 2.3rem; }
}

@media (max-width: 560px) {
  .app-header { grid-template-columns: auto 1fr auto; gap: 8px; }.small-seal { width: 36px; height: 36px; }.edition-control .eyebrow, .edition-state { display: none; }.edition-control select { height: 42px; padding: 6px 28px 6px 9px; font-size: .7rem; background-position: calc(100% - 15px) 19px, calc(100% - 10px) 19px; }.user-chip > span { width: 32px; height: 32px; }.theme-toggle { width: 34px; height: 34px; min-height: 34px; padding: 5px; justify-content: center; }.theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .primary-nav { padding: 6px 8px; }.primary-nav a { gap: 4px; font-size: .67rem; }.nav-symbol { width: 16px; }.edition-ribbon { justify-content: flex-start; overflow: hidden; white-space: nowrap; }.edition-ribbon strong { overflow: hidden; text-overflow: ellipsis; }
  .chapter-loader { display: grid; }.chapter-search { min-width: 0; }.workspace-toolbar h2 { font-size: 1.5rem; }.page-heading { margin-bottom: 15px; }.page-heading p { font-size: .82rem; }.page-heading .button { width: 100%; }
  .review-mode-toggle { justify-content: center; }.inline-review-panel.embedded { padding: 12px; }.review-scope-nav button { padding-inline: 2px; }.review-minor-actions { align-items: flex-start; flex-direction: column; }
  .scripture-heading { min-height: 92px; padding: 20px; }.scripture-heading h1 { font-size: 2rem; }.verse-count { display: none; }.verse-row { grid-template-columns: 32px 1fr; gap: 8px; padding: 17px 13px; }.verse-number { width: 29px; height: 29px; }.verse-text { font-size: 1.04rem; line-height: 1.9; }.verse-meta .status-badge { display: none; }
  .facsimile-page-stack { gap: 18px; padding: 9px; }.facsimile-mode-label { padding: 2px; }
  .inspector-header { padding-top: 13px; }.inspector-footer { padding-bottom: max(14px, env(safe-area-inset-bottom)); }.reference-grid, .form-grid { grid-template-columns: 1fr; }.scripture-outline-headings { margin-left: 40px; }.verse-footnote-preview { grid-column: 1 / -1; }.book-title-preview { padding-inline: 18px; }.book-title-preview > div { grid-template-columns: 1fr; }.book-title-preview h2, .book-title-preview em { grid-column: 1; justify-self: center; text-align: center; }.book-form-actions { align-items: stretch; flex-direction: column; }.book-form-actions .button-row, .book-form-actions .button { width: 100%; }
  .proposal-grid { grid-template-columns: 1fr; }.proposal-card { min-width: 260px; }.comparison-heading { align-items: flex-start; flex-direction: column; }.merge-bar, .conflict-bar { align-items: stretch; flex-direction: column; bottom: 10px; }.merge-bar .button, .conflict-bar .button { width: 100%; }
  .metric-grid { grid-template-columns: 1fr; }.metric-card { min-height: 140px; }.status-bar-row { grid-template-columns: 100px 1fr 24px; }.admin-grid { display: block; }.admin-card { margin-bottom: 15px; }.create-edition-card > .form-grid { grid-template-columns: 1fr; }.team-list article { grid-template-columns: 32px 1fr; }.team-list select { grid-column: 1 / -1; }.invite-form-row { grid-template-columns: 1fr; }.invite-link-row { grid-template-columns: 1fr; }.invite-link-row .button { width: 100%; }.invitation-item { grid-template-columns: 1fr auto; }.invitation-item .text-button { grid-column: 1 / -1; justify-self: start; }
  .token-security-note, .agent-safety-note { align-items: flex-start; }.token-create-form { grid-template-columns: 1fr; }.token-create-form .button { width: 100%; }.token-secret-row { grid-template-columns: 1fr; }.token-item dl { grid-template-columns: 1fr 1fr; }.agent-prompt-title { align-items: stretch; flex-direction: column; }.agent-prompt-title .button { width: 100%; }.agent-prompt-text { min-height: 480px; margin-inline: 12px; width: calc(100% - 24px); padding: 13px; }.legacy-notice { align-items: stretch; flex-direction: column; }.heading-panel-title { align-items: stretch; flex-direction: column; }.compact-search { width: 100%; }.toast-stack { right: 10px; bottom: 10px; width: calc(100vw - 20px); }
}

/* The scripture desk keeps the full reading width; tools dock below on selection. */
.editor-page { --dock-height: clamp(280px, 38dvh, 460px); --dock-space: 0px; width: calc(100% - 32px); padding-top: 12px; padding-bottom: 20px; }
.editor-page.has-inspector { --dock-space: var(--dock-height); padding-bottom: calc(var(--dock-space) + 20px); }
.editor-page.inspector-expanded { --dock-height: 65dvh; }
.editor-page .workspace-toolbar { align-items: center; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 12px; }
.editor-page .workspace-toolbar h2 { margin: 0; font-size: 1.25rem; }
.editor-page .editor-toolbar-controls { flex: 1; flex-wrap: wrap; justify-content: flex-end; align-items: center; min-width: 0; }
.editor-page .chapter-loader { flex: 1 1 280px; max-width: 540px; min-width: 0; }
.editor-page .chapter-search { min-width: 0; }
.editor-page .chapter-search input { min-width: 0; height: 36px; }
.editor-page .chapter-loader .button { min-height: 36px; padding: 7px 13px; white-space: nowrap; }
.editor-page .review-mode-toggle { height: 38px; }
.editor-page .workflow-filter { display: flex; align-items: center; gap: 8px; }
.editor-page .workflow-filter select { height: 38px; }
.editor-page .editor-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.editor-page .scripture-card { min-width: 0; }
.editor-page .scripture-heading { min-height: 56px; padding: 10px 18px; gap: 12px; flex-wrap: wrap; }
.editor-page .scripture-heading h1 { margin: 0; font-size: 1.65rem; }
.editor-page .scripture-heading-status { min-width: 0; flex-wrap: wrap; gap: 10px 18px; }
.editor-page .verse-count { font-size: .6rem; letter-spacing: .04em; }
.reader-hint { color: var(--ink-faint); font-size: .68rem; }
.editor-page .verse-scroll { max-height: max(160px, calc(100dvh - var(--reader-top, 284px) - var(--dock-space) - 12px)); min-height: 160px; scrollbar-gutter: stable; }
.editor-page .reader-edge:empty { min-height: 0; padding: 0; }
.editor-page .facsimile-page-stack { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 18px; }
.editor-page .reader-block, .editor-page .facsimile-page-viewport { min-width: 0; max-width: 100%; }
.editor-page .facsimile-page-viewport { overscroll-behavior-x: contain; }
.facsimile-zoom-control button.fit-page-button { width: auto; padding: 0 10px; border-left: 1px solid var(--line); font: 800 .65rem var(--sans); }
.editor-page .editor-inspector { position: fixed; z-index: 60; inset: auto 0 0; height: var(--dock-height); max-height: 85dvh; display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); grid-template-rows: auto minmax(0, 1fr) auto; border-radius: 14px 14px 0 0; background: var(--surface-solid); box-shadow: 0 -8px 32px var(--sheet-shadow); }
.editor-page .editor-inspector::before { display: none; }
.editor-page .inspector-header { grid-column: 1; grid-row: 1; min-width: 0; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.inspector-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; }
.editor-page .inspector-header h2 { margin: 0; font-size: 1.25rem; }
.inspector-window-actions { display: flex; flex-shrink: 0; gap: 6px; }
.editor-page .inspector-tabs { grid-column: 2; grid-row: 1; align-items: stretch; padding: 0 18px; }
.editor-page .inspector-body { grid-column: 1 / -1; grid-row: 2; padding: 16px 24px; border-top: 0; }
.editor-page .inspector-body .field-stack { max-width: 1200px; margin-inline: auto; }
.editor-page .workflow-scope-strip { max-width: 1200px; margin: 0 auto 14px; padding: 0; }
.editor-page .inspector-footer { grid-column: 1 / -1; grid-row: 3; align-items: center; padding: 10px 84px max(10px, env(safe-area-inset-bottom)) 24px; max-height: 35dvh; overflow-y: auto; }
.editor-page .inspector-action-help { flex: 1 1 220px; margin: 0; }
.editor-page .inspector-footer .button { flex: 0 1 auto; }
.editor-page .standalone-review-inspector { display: block; }
.editor-page .field, .editor-page .field input, .editor-page .field select, .editor-page .field textarea { min-width: 0; }
.editor-page .verse-text { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .editor-page .workspace-toolbar > div:first-child { display: none; }
  .editor-page .chapter-loader { max-width: none; }
  .editor-page .workflow-filter > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .editor-page .reader-hint { display: none; }
}
@media (max-width: 820px) {
  .editor-page { width: calc(100% - 20px); --dock-height: 46dvh; }
  .editor-page.inspector-expanded { --dock-height: 78dvh; }
  .editor-page .workspace-toolbar { flex-direction: row; }
  .editor-page .editor-toolbar-controls { flex-direction: row; gap: 8px; }
  .editor-page .chapter-loader { display: flex; flex-basis: 100%; order: -1; }
  .editor-page .review-mode-toggle { margin-right: auto; }
  .editor-page .verse-scroll { max-height: none; min-height: 50vh; overflow: visible; }
  .editor-page .scripture-heading { padding: 10px 12px; }
  .editor-page .scripture-heading h1 { font-size: 1.4rem; }
  .editor-page .editor-inspector { display: flex; }
  .editor-page .inspector-header { flex-shrink: 0; padding: 8px 12px; }
  .editor-page .inspector-tabs { flex-shrink: 0; padding: 0 12px; }
  .editor-page .inspector-tabs button { padding-block: 8px; }
  .editor-page .inspector-body { padding: 12px; }
  .editor-page .inspector-footer { padding: 8px 76px max(8px, env(safe-area-inset-bottom)) 12px; }
  .editor-page .inspector-footer .button { min-height: 36px; padding: 7px 10px; }
  .editor-page .inspector-action-help { flex-basis: 100%; }
  .editor-page .standalone-review-inspector { display: block; }
}

/* Placement is a saved preference; small screens retain the bottom sheet. */
.inspector-placement-control { display: flex; align-items: center; gap: 8px; color: var(--ink-faint); font-size: .65rem; font-weight: 800; }
.inspector-placement-control select { height: 38px; padding: 0 10px; border: 1px solid var(--line-dark); border-radius: 7px; color: var(--ink); background: var(--surface-solid); font: inherit; }
@media (min-width: 821px) {
  .editor-page.inspector-right.has-inspector { --dock-space: 0px; padding-bottom: 20px; }
  .editor-page.inspector-right .editor-layout.inspector-open { grid-template-columns: minmax(0, 1fr) clamp(340px, 32vw, 460px); gap: 16px; }
  .editor-page.inspector-right.inspector-expanded .editor-layout.inspector-open { grid-template-columns: minmax(0, 1fr) minmax(340px, 48%); }
  .editor-page.inspector-right .editor-inspector { position: sticky; inset: var(--inspector-top, 174px) auto auto; z-index: 20; display: flex; min-width: 0; height: max(240px, calc(100dvh - var(--inspector-top, 240px) - 12px)); max-height: none; border-radius: var(--radius); box-shadow: var(--shadow-small); }
  .editor-page.inspector-right .inspector-header, .editor-page.inspector-right .inspector-tabs { flex-shrink: 0; padding-inline: 12px; }
  .editor-page.inspector-right .inspector-body { padding: 14px; }
  .editor-page.inspector-right .inspector-footer { padding: 12px 76px 12px 12px; }
  .editor-page.inspector-right .inspector-action-help { flex-basis: 100%; }
  .editor-page.inspector-right .inspector-footer .button { flex: 1 1 110px; }
  .editor-page.inspector-right .standalone-review-inspector { display: block; }
  .editor-page.inspector-right .reader-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.annotation-move-bar { position: fixed; z-index: 90; left: 50%; top: 8px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 24px); padding: 10px 14px; border: 1px solid var(--brass); border-radius: 10px; color: var(--ink); background: var(--surface-solid); box-shadow: var(--shadow); font-size: .85rem; }
.annotation-move-bar .button, .annotation-move-bar .icon-button { flex-shrink: 0; }
.move-note-button { grid-column: 1 / -1; justify-self: start; }
.annotation-moving .annotation-target { cursor: pointer; outline: 1px dashed var(--brass); outline-offset: 1px; }
.annotation-moving .annotation-target:hover, .annotation-moving .annotation-target:focus-visible { background: var(--brass-pale); color: var(--ink); outline: 2px solid var(--brass-dark); }
.annotation-moving button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
@media (max-width: 560px) { .annotation-move-bar { gap: 8px; padding: 8px; font-size: .75rem; } .annotation-move-bar .button { padding: 8px; } }

.editor-page.annotation-picking:not(.inspector-right) { --dock-space: 0px; padding-bottom: 20px; }
.editor-page.annotation-picking:not(.inspector-right) .editor-inspector { display: none; }
@media (max-width: 820px) {
  .editor-page.annotation-picking { --dock-space: 0px; padding-bottom: 20px; }
  .editor-page.annotation-picking .editor-inspector { display: none; }
}

.special-pages-page > .field { max-width: 48rem; margin-bottom: 1.5rem; }
.special-page-fields { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 1rem; }
.special-page-preview > h2 { text-align: center; font-family: Georgia, serif; margin: 2rem 0; }
.special-page-body { font-family: Georgia, serif; line-height: 1.65; overflow-wrap: anywhere; }
.special-page-body h2, .special-page-body h3, .special-page-body h4 { text-align: center; line-height: 1.3; }
.special-page-body p { margin: 1em 0; }
.special-page-body blockquote { border-inline-start: 2px solid currentColor; margin: 1.5rem 2rem; padding-inline-start: 1rem; }
.special-page-body pre { white-space: pre-wrap; tab-size: 4; font-size: .9em; }
.special-page-body ul, .special-page-body ol { padding-inline-start: 1.8rem; }
.special-page-help { font-size: .85rem; line-height: 1.5; opacity: .8; }
.special-pages-page .inline-review-panel { margin-top: 2rem; }
.special-page-preview > small { display: block; margin: 1.25rem 1.5rem 0; }
.special-page-preview > h2 { padding: 0 1.5rem; overflow-wrap: anywhere; }
.special-page-preview > .special-page-body { padding: 0 1.5rem 1.5rem; }

.special-page-html { contain: content; }
.special-page-html * { max-width: 100%; box-sizing: border-box; }
.special-page-html table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.special-page-html th, .special-page-html td { padding: .3em .5em; vertical-align: top; }
.review-readable-form .special-page-body { font-size: 1rem; }
.review-readable-form .special-page-body p { margin: 1em 0; color: inherit; font-size: inherit; line-height: inherit; white-space: normal; }
.review-readable-form .special-page-body strong { font: inherit; font-weight: bold; }

/* Use the same paper frame and zoom as adjacent scripture pages. */
.scofield-facsimile-page.reader-special-page { height: auto; aspect-ratio: auto; white-space: normal; }
.reader-special-page-content { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 3em 0; }
.reader-special-page-content > h2 { text-align: center; font: 800 1rem/1.25 var(--serif); margin: 0 0 1em; overflow-wrap: anywhere; }
.reader-special-page .special-page-body { font-family: inherit; font-size: .76rem; line-height: 1.25; white-space: normal; }
.reader-special-page > footer { border-top: 1px solid var(--facsimile-rule); }
.reader-special-page-tools { display: flex; justify-content: space-between; gap: 1em; flex-wrap: wrap; color: var(--facsimile-muted); font: .6rem var(--sans); }
.reader-special-page-tools a { margin-left: auto; color: inherit; }

/* Portable special-page content classes. Other apps can provide their own rules. */
.special-page-body .sp-paragraph { text-align: justify; }
.special-page-body .sp-small-caps { font-variant: small-caps; }
.special-page-body .sp-illustration { text-align: center; margin: 1em 0; }
.special-page-body .sp-illustration-title { margin: 0; }
.special-page-body .sp-illustration-caption { text-align: center; margin: .2em 0; }
.special-page-body .sp-reference-example { display: inline-block; text-align: left; border-left: 1px solid currentColor; border-right: 1px solid currentColor; padding: 0 .25em; font-size: .75em; line-height: 1; }
.special-page-body .sp-reference-lines { display: block; padding-left: .8em; }

/* Printed headings remain part of the page while exposing keyboard editing. */
.heading-button { display: block; width: 100%; padding: 0; border: 0; border-radius: 2px; background: none; color: inherit; font: inherit; text-align: inherit; cursor: pointer; white-space: pre-wrap; }
.heading-button:hover { background: var(--verse-hover); }
.heading-button:focus-visible { outline: 2px solid var(--brass-dark); outline-offset: 2px; }
.editor-page .heading-inspector .inspector-header { grid-column: 1 / -1; }

.heading-annotations { margin-block: 1rem; }
.heading-annotation { padding: .8rem; border: 1px solid var(--line); border-radius: .5rem; }
.annotated-heading { white-space: pre-wrap; }

.special-section { min-width: 0; white-space: normal; }
.special-section table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.special-section th, .special-section td { border: 1px solid currentColor; padding: .35em; overflow-wrap: anywhere; vertical-align: top; }
.special-section-fields { border: 1px solid var(--line); padding: 1em; border-radius: 6px; }
.facsimile-special-section { border-top: 1px solid var(--facsimile-rule); border-bottom: 1px solid var(--facsimile-rule); padding: .6em 0; cursor: pointer; }
/* The page header already supplies the rule above an opening section. */
:is(.facsimile-running-head, .facsimile-opening) + .facsimile-special-section { border-top: 0; }
.facsimile-special-section .special-section { font: .72rem/1.2 var(--serif); color: inherit; }
.facsimile-special-section h3 { font-size: 1.1em; }
.scofield-facsimile-page.has-special-sections { height: auto; aspect-ratio: auto; }
.has-special-sections .facsimile-column { min-height: 0; }
.verse-special-section { grid-column: 1 / -1; }

.review-special-section { grid-column: 1 / -1; }

/* Public volunteering and private administrator follow-up. */
.volunteer-callout { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); text-align: center; }
.auth-paper .volunteer-callout p { margin: 0 0 12px; font-size: .9rem; }
.volunteer-callout .button { width: 100%; }
.volunteer-screen { min-height: 100vh; padding: clamp(24px, 5vw, 72px); background: linear-gradient(120deg, var(--auth-wash), var(--paper-light)); }
.volunteer-back { display: block; width: fit-content; margin: 0 auto 32px 0; color: var(--ink-soft); font-size: .85rem; }
.volunteer-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: clamp(30px, 6vw, 90px); max-width: 1160px; margin: 0 auto; }
.volunteer-intro .brand-seal { margin-bottom: 26px; }
.volunteer-intro h1 { margin: 16px 0 20px; max-width: 560px; font: clamp(2.6rem, 4.5vw, 4rem)/1.06 var(--serif); }
.volunteer-intro > p, .volunteer-paper p { color: var(--ink-soft); line-height: 1.7; }
.volunteer-tasks { display: grid; gap: 22px; margin-top: 32px; }
.volunteer-tasks article { padding-top: 20px; border-top: 1px solid var(--line); }
.volunteer-tasks h2 { margin: 7px 0; font: 1.4rem var(--serif); }
.volunteer-tasks p { margin: 0; color: var(--ink-soft); line-height: 1.6; }
.volunteer-paper { padding: clamp(28px, 4vw, 50px); }
.volunteer-paper h2 { margin: 14px 0; font: 2.25rem/1.12 var(--serif); }
.volunteer-paper small, .volunteer-paper .volunteer-next-step { color: var(--ink-soft); font-size: .8rem; line-height: 1.6; }
.volunteer-next-step { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.volunteer-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.volunteer-requests-card { margin-bottom: 24px; }
.volunteer-requests-card > p { margin: 18px 22px; color: var(--ink-soft); line-height: 1.6; }
.volunteer-request-list { padding: 0 22px; }
.volunteer-request { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.volunteer-contact { display: grid; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.volunteer-contact small { color: var(--ink-soft); }
.volunteer-invite-recipient { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .volunteer-layout { grid-template-columns: minmax(0, 1fr); }
  .volunteer-request { align-items: stretch; flex-direction: column; }
  .volunteer-requests-card .panel-title { align-items: start; gap: 14px; flex-wrap: wrap; }
}

/* Format gallery: real workspace screenshots framed as a closer look at the work. */
.volunteer-screen { background: radial-gradient(ellipse at 88% 5%, rgba(198,157,77,.16), transparent 42%), linear-gradient(120deg, var(--auth-wash), var(--paper-light)); }
.volunteer-back { max-width: 1160px; width: auto; margin-inline: auto; }
.volunteer-hero { max-width: 1160px; margin: 0 auto 48px; display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; gap: 70px; }
.volunteer-identity { display: flex; align-items: center; gap: 18px; margin-bottom: 25px; }
.volunteer-identity .brand-seal { flex-shrink: 0; width: 52px; height: 52px; font-size: 1.8rem; }
.volunteer-identity .eyebrow { max-width: 250px; line-height: 1.7; }
.volunteer-hero h1 { margin: 0; font: clamp(2.8rem, 4.7vw, 4.6rem)/1.03 var(--serif); letter-spacing: -.035em; }
.volunteer-hero-copy p { margin: 15px 0 23px; color: var(--ink-soft); font-size: 1rem; line-height: 1.8; }
.volunteer-kicker { display: flex; align-items: center; gap: 9px; color: var(--brass-dark); font-size: .76rem; font-weight: 700; }
.volunteer-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-pale); flex-shrink: 0; }
.volunteer-hero-copy .button { gap: 24px; }
.volunteer-gallery { max-width: 1160px; margin: 0 auto 68px; }
.volunteer-gallery-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 23px; }
.volunteer-gallery-heading h2 { margin: 8px 0 0; font: 1.8rem/1.2 var(--serif); }
.volunteer-gallery-hint { color: var(--ink-soft); font-size: .75rem; }
.volunteer-format-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.volunteer-format-card { min-width: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface-solid); box-shadow: 0 14px 34px rgba(42,49,35,.07); transition: transform .25s ease, box-shadow .25s ease; }
.volunteer-format-card:hover { transform: translateY(-5px); box-shadow: 0 22px 45px rgba(42,49,35,.14); }
.volunteer-format-image { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; width: 100%; height: 280px; padding: 48px 22px 28px; border: 0; overflow: hidden; cursor: zoom-in; background: #d9c69d; }
.volunteer-format-image::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.5), transparent 65%); }
.volunteer-format-image img { display: block; width: 100%; height: auto; flex-shrink: 0; box-shadow: 0 18px 30px rgba(0,0,0,.22); transition: transform .4s ease; }
.format-page .volunteer-format-image { background: #263e32; }
.format-page .volunteer-format-image::before { background: radial-gradient(ellipse at 70% 20%, #5c7c58, transparent 80%); }
.format-page .volunteer-format-image img { width: 113%; transform: translate(10px, 35px) rotate(-7deg); }
.format-page .volunteer-format-image:hover img { transform: translate(5px, 25px) rotate(-3deg) scale(1.04); }
.format-margins .volunteer-format-image { background: #d8bb7e; }
.format-margins .volunteer-format-image img { width: 90%; transform: translateY(23px) rotate(5deg); border-radius: 7px; }
.format-margins .volunteer-format-image:hover img { transform: translateY(13px) rotate(1deg) scale(1.04); }
.format-footnotes .volunteer-format-image { background: #c4d5ca; }
.format-footnotes .volunteer-format-image::after { content: '1'; position: absolute; right: 15px; bottom: -24px; color: rgba(49,83,62,.10); font: 13rem var(--serif); z-index: -1; }
.format-footnotes .volunteer-format-image img { width: 109%; transform: rotate(-5deg); border: 12px solid #fffdf7; border-radius: 7px; }
.format-footnotes .volunteer-format-image:hover img { transform: rotate(-1deg) scale(1.06); }
.format-badge { position: absolute; z-index: 2; left: 18px; top: 18px; border: 1px solid rgba(255,255,255,.5); padding: 7px 11px; border-radius: 30px; background: #fffdf7; color: #293b2d; font: 700 .69rem var(--sans); letter-spacing: .025em; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.format-expand { position: absolute; display: grid; place-items: center; right: 16px; bottom: 16px; width: 33px; height: 33px; border-radius: 50%; color: #fffdf7; background: #263e32; font-size: 1.3rem; box-shadow: 0 3px 14px rgba(0,0,0,.16); }
.volunteer-format-copy { padding: 24px; }
.volunteer-format-copy .eyebrow { font-size: .6rem; }
.volunteer-format-copy h3 { margin: 11px 0; font: 1.5rem/1.14 var(--serif); }
.volunteer-format-copy p { margin: 0; color: var(--ink-soft); font-size: .85rem; line-height: 1.7; }
.volunteer-example-note { margin: 14px 0 0; color: var(--ink-soft); font-size: .72rem; text-align: right; }
.volunteer-join { padding-top: 48px; border-top: 1px solid var(--line); }
.volunteer-join .volunteer-intro h2 { margin: 14px 0 22px; font: 2.3rem/1.13 var(--serif); }
.volunteer-join .volunteer-tasks h2 { margin: 7px 0; font-size: 1.4rem; }
#volunteer-form-title { scroll-margin-top: 35px; }
.volunteer-preview { width: min(92vw, 950px); max-height: 90vh; padding: 24px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--surface-solid); box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.volunteer-preview::backdrop { background: rgba(15,28,21,.8); backdrop-filter: blur(6px); }
.volunteer-preview header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.volunteer-preview h2 { margin: 6px 0 0; font: 2rem var(--serif); }
.volunteer-preview img { display: block; max-width: 100%; max-height: 65vh; width: auto; margin: 0 auto; object-fit: contain; border-radius: 6px; }
.volunteer-preview p { margin-bottom: 0; color: var(--ink-soft); font-size: .9rem; line-height: 1.6; }
@media (max-width: 1000px) {
 .volunteer-hero { gap: 35px; }
 .volunteer-format-grid { gap: 14px; }
 .volunteer-format-image { height: 220px; padding-inline: 14px; }
 .volunteer-format-copy { padding: 18px; }
 .volunteer-gallery-hint { display: none; }
}
@media (max-width: 760px) {
 .volunteer-hero { grid-template-columns: minmax(0, 1fr); gap: 26px; margin-bottom: 40px; }
 .volunteer-hero h1 { max-width: 540px; }
 .volunteer-format-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
 .volunteer-format-image { height: 270px; }
 .volunteer-format-copy { padding: 24px; }
 .volunteer-example-note { text-align: left; line-height: 1.6; }
 .volunteer-gallery { margin-bottom: 40px; }
 .volunteer-join { padding-top: 34px; }
 .volunteer-preview { padding: 18px; }
 .volunteer-preview h2 { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
 .volunteer-format-card, .volunteer-format-image img { transition: none; }
 .volunteer-format-card:hover { transform: none; }
}

/* Preserve typed paragraphs and outline indentation in footnotes. */
.verse-footnote-preview li > span, .facsimile-footnotes li > span { white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.footnote-text-editor { min-width: 0; width: 100%; }
.footnote-text-editor textarea { width: 100%; min-height: 8rem; tab-size: 4; }
.footnote-text-editor .button-row { flex-wrap: wrap; margin-bottom: 5px; }

/* Printed annotations also support keyboard selection. */
.facsimile-footnotes li[role="button"], .verse-footnote-preview li[role="button"] { cursor: pointer; }
.facsimile-footnotes li[role="button"]:focus-visible, .verse-footnote-preview li[role="button"]:focus-visible, .facsimile-margin-row:focus-visible { outline: 2px solid var(--brass-dark); outline-offset: 2px; }
