/* Atlantic Archive palette pass
   Calais/Maine coast · old chart paper · oxidized copper · orange peel · pine · score violet
   This file is intentionally loaded after page-local CSS so it governs color without rewriting structure.
*/
:root {
  color-scheme: light;

  /* Ground */
  --parchment: #F3E7D3;
  --parchment-light: #FFF9ED;
  --parchment-dark: #E5D2B5;
  --parchment-deep: #D4BC98;

  /* Ink */
  --ink: #172126;
  --ink-light: #3D4A50;
  --ink-faded: #3F4A56;
  --ink-ghost: #9A8F7C;

  /* Sea / atlas authority */
  --sea: #174C55;
  --sea-light: #486F7A;
  --sea-dark: #0E2F36;
  --sea-faded: rgba(23, 76, 85, 0.12);

  /* Copper / mapwork */
  --copper: #9A5A2E;
  --copper-light: #B8733A;
  --copper-dim: #70401F;

  /* Human residue */
  --orange-peel: #C86A2E;
  --cardamom: #315C45;
  --warm: #9A5A2E;
  --warm-soft: #F5E4CF;

  /* Volume / operation accents */
  --auth-slate: #59626C;
  --price-copper: #9A5A2E;
  --ledger-green: #5F7D5A;
  --score-violet: #67507A;
  --interface-blue: #486F7A;
  --merge-plum: #4B334B;
  --danger-red: #8D3A32;

  /* Rules and surfaces */
  --ruled: #B99F78;
  --ruled-light: #D8C5A5;
  --ruled-dark: #8F7655;
  --plate-border: #8F7655;

  /* Functional aliases used by manuscript shells */
  --paper: var(--parchment);
  --paper-deep: var(--parchment-dark);
  --surface: var(--parchment-light);
  --surface-alt: #F8EAD8;
  --accent: var(--sea);
  --accent-dark: var(--sea-dark);
  --accent-soft: rgba(23, 76, 85, 0.10);
  --accent-dim: var(--copper-dim);
  --ink-soft: var(--ink-light);
  --ink-2: var(--ink-faded);
  --muted: var(--ink-faded);
  --rule: var(--ruled-light);

  /* Tiers / workbook shells */
  --tier1: var(--cardamom);
  --tier1-soft: rgba(49, 92, 69, 0.12);
  --tier2: #8A6420;
  --tier2-soft: rgba(154, 90, 46, 0.14);
  --tier3: var(--score-violet);
  --tier3-soft: rgba(103, 80, 122, 0.14);
  --tier4: var(--danger-red);
  --tier4-soft: rgba(141, 58, 50, 0.14);

  /* Typography */
  --serif: 'Cormorant Garamond', 'Georgia', serif;
  --body: 'Libre Baskerville', 'Georgia', serif;
  --fell: 'IM Fell English', 'Georgia', serif;
  --fell-pica: 'IM Fell DW Pica', 'Georgia', serif;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Effects */
  --shadow: 0 24px 70px rgba(23, 33, 38, 0.13);
  --shadow-soft: 0 10px 35px rgba(23, 33, 38, 0.08);
  --wang-color: rgba(23, 33, 38, 0.055);
}

html { background: var(--parchment); }
body {
  color: var(--ink);
  background-color: var(--parchment);
  background-image:
    radial-gradient(ellipse at 16% 18%, rgba(23,76,85,0.095) 0%, transparent 36rem),
    radial-gradient(ellipse at 85% 15%, rgba(200,106,46,0.075) 0%, transparent 28rem),
    radial-gradient(ellipse at 72% 76%, rgba(103,80,122,0.055) 0%, transparent 30rem),
    linear-gradient(180deg, #FFF9ED 0%, #F3E7D3 48%, #E5D2B5 100%);
}
body::before { color: var(--wang-color); }
::selection { background: var(--sea); color: var(--parchment-light); }

a { color: var(--sea); }
a:hover { color: var(--copper); }
a:focus-visible, button:focus-visible { outline-color: var(--orange-peel); }

/* Site chrome */
body > nav:not(.toc), body > nav:not([aria-label="Table of contents"]) {
  background: rgba(243, 231, 211, 0.96);
  border-bottom-color: var(--ruled);
}
.nav-title span,
.nav-links a:hover,
.nav-agent,
.mini-link { color: var(--copper); }
.nav-links a { color: var(--ink-light); }
.lang-toggle.active,
.btn-accent {
  background: var(--sea);
  border-color: var(--sea-dark);
  color: var(--parchment-light);
}
.lang-toggle:hover,
.btn:hover { border-color: var(--orange-peel); color: var(--orange-peel); }

.system-bar {
  background: rgba(14, 47, 54, 0.96);
  color: var(--parchment-light);
  border-top-color: rgba(184, 115, 58, 0.55);
}
.system-bar .witness-count { color: var(--orange-peel); }
.lang-shift-overlay { background: rgba(14, 47, 54, 0.96); }

/* Atlas frontispiece */
.frontispiece {
  background:
    radial-gradient(circle at 50% 20%, rgba(200, 106, 46, .14), transparent 24rem),
    radial-gradient(circle at 88% 70%, rgba(23, 76, 85, .10), transparent 28rem),
    linear-gradient(180deg, rgba(243,231,211,.86), rgba(229,210,181,.98));
  border-bottom-color: var(--ruled);
}
.cartouche,
.plate-framed,
.letter,
.article-card,
.volume-card,
.jurisdiction-panel,
.workbook-section-card,
.tier-card,
.sequence-card,
.spoiler-card,
.path-card,
.cover,
.title-page,
.intro-section,
.major-section,
.reader-dashboard,
.workbook-map,
.tier-structure,
.contents,
.chapter-card,
.term-card,
.table-scroll,
.error-docket,
.countermeasure-card,
.frontmatter-panel,
.reading-sequences,
.workbook-section-map,
.spoiler-tier-panel {
  background: linear-gradient(180deg, var(--parchment-light), #F8EAD8);
  border-color: rgba(143, 118, 85, .58);
  box-shadow: var(--shadow-soft);
}
.cartouche { box-shadow: 0 28px 80px rgba(23,33,38,.16), inset 0 0 0 1px rgba(255,255,255,.48); }
.cartouche::after { color: var(--copper); }
.frontispiece-glyph { color: var(--copper-dim); }
.frontispiece-atlas,
.frontispiece-long,
.section-rule-text,
.section-label,
.vol-number,
.vol-meta,
.plate-caption,
.plate-legend,
.system-bar span { color: #3F3326; }
.frontispiece-pitch-teaser { color: var(--orange-peel); }

/* The wound arrives warmer than the machine. */
.before-nations {
  background:
    radial-gradient(circle at 80% 20%, rgba(200,106,46,.12), transparent 18rem),
    linear-gradient(135deg, rgba(200,106,46,.12), transparent 42%),
    linear-gradient(180deg, #FFF9ED, #F8EAD8);
  border-color: rgba(200,106,46,.38);
}
.before-nations h2,
.before-nations .section-label,
.before-nations .wound-kicker { color: var(--orange-peel); }
.before-nations strong { color: var(--cardamom); }
.object-plate,
.plate-wrap { border-color: rgba(154,90,46,.42); background: rgba(255,249,237,.66); }

/* Cards and operation accents */
.volume-card { border-color: color-mix(in srgb, var(--vol-accent, var(--ruled)) 55%, var(--ruled)); }
.volume-card:hover { border-color: var(--vol-accent, var(--copper)); }
.volumes-grid .volume-card:nth-child(1) { --vol-accent: var(--auth-slate); }
.volumes-grid .volume-card:nth-child(2) { --vol-accent: var(--price-copper); }
.volumes-grid .volume-card:nth-child(3) { --vol-accent: var(--ledger-green); }
.volumes-grid .volume-card:nth-child(4) { --vol-accent: var(--score-violet); }
.volumes-grid .volume-card:nth-child(5) { --vol-accent: var(--interface-blue); }
.volumes-grid .volume-card:nth-child(6) { --vol-accent: var(--merge-plum); }
.vol-status.done { color: var(--vol-accent, var(--sea)); border-color: var(--vol-accent, var(--sea)); }
.article-card:nth-child(4n+1) { border-color: rgba(154,90,46,.70); }
.article-card:nth-child(4n+2) { border-color: rgba(23,76,85,.70); }
.article-card:nth-child(4n+3) { border-color: rgba(103,80,122,.70); }
.article-card:nth-child(4n+4) { border-color: rgba(49,92,69,.70); }
.article-card:hover,
.path-card:hover,
.volume-card:hover { box-shadow: 0 18px 42px rgba(23,33,38,.13); }

/* Manuscript / apparatus shells */
.sidebar {
  background: rgba(255, 249, 237, .94);
  border-right-color: rgba(23,76,85,.18);
}
.sidebar-brand a,
h1, h2, h3, h4,
.cover h1,
.cover .subtitle,
.title-page h1,
.title-page .book-title,
.title-page .volume-title,
.chapter-title,
.chapter-number,
.part-number,
.chapter-label,
.chapter-summary-title,
.chapter-summary-meta,
strong { color: var(--sea-dark); }
.cover .series,
.title-page .series-title,
.memory-label,
.term-card .term-name { color: var(--copper); }
.toc a.active,
.chapter-summary,
.chapter-card.full-guide .chapter-summary { background: linear-gradient(90deg, var(--sea-dark), var(--sea)); color: #fff; }
.toc a:hover,
.toc a.active:hover { background: var(--accent-soft); color: var(--sea-dark); }
.chapter-card[open] > .chapter-summary { box-shadow: inset 0 -1px 0 rgba(255,255,255,.15); }

.system-prompt,
pre.text,
.chapter pre {
  background: var(--sea-dark);
  color: var(--parchment-light);
  border-color: rgba(23,76,85,.45);
}
.notification,
.track-designation,
.workbook-prompts,
.passage,
.translation-status { background: rgba(23,76,85,.085); border-left-color: var(--sea); color: var(--sea-dark); }
.memory,
.unfiled-interval,
.callout,
.carry-forward,
.reader-note,
.method-note,
.sequence-callout,
.pass12-note { background: var(--warm-soft); border-left-color: var(--orange-peel); }
.kapitel-section,
.functional-translation,
.german-term-index,
.scholar-annex-boundary,
.scholar-annex-item { border-top-color: var(--score-violet); border-left-color: var(--score-violet); }
.functional-translation > summary,
.german-term-index > summary,
.toc-kapitel > a { background: rgba(103,80,122,.12); color: var(--merge-plum); }
.thread-block.procedure { border-left-color: var(--ledger-green); background: rgba(95,125,90,.09); }
.thread-block.phenomen { border-left-color: var(--cardamom); background: rgba(49,92,69,.08); }
.yahoo,
.yahoo-block { border-color: rgba(72,111,122,.28); background: rgba(72,111,122,.06); }

/* Special operation colors */
.major-section[data-tier="tier-1"], .tier-card.tier-1 { border-top-color: var(--cardamom); }
.major-section[data-tier="tier-2"], .tier-card.tier-2 { border-top-color: var(--ledger-green); }
.major-section[data-tier="tier-3"], .tier-card.tier-3 { border-top-color: var(--score-violet); }
.major-section[data-tier="tier-4"], .tier-card.tier-4, .tier-4-section { border-top-color: var(--danger-red); }
.countermeasure-card,
.error-docket,
.scholar-annex-callout,
.scholarly-warning,
.withheld-card { border-left-color: var(--danger-red); }
.chapter-card.withheld-guide .chapter-summary { background: linear-gradient(90deg, #5C2521, var(--danger-red)); }
.chapter-card.residue-guide .chapter-summary { background: linear-gradient(90deg, #6E4B1D, var(--ledger-green)); }
.chapter-card.orientation-guide .chapter-summary { background: linear-gradient(90deg, #3D4A50, #59626C); }

/* Tables */
th { background: var(--sea-dark); color: var(--parchment-light); }
td, tr:nth-child(even) td { background: rgba(255,249,237,.84); }
.map-table th { color: var(--copper-dim); border-bottom-color: var(--ruled); }
.map-table td { border-bottom-color: var(--ruled-light); }

/* Footer / colophon */
.claim { background: linear-gradient(180deg, var(--parchment-dark), #D4BC98); }
.claim-text { color: var(--ink-light); }
.colophon { border-top-color: var(--sea); border-bottom-color: var(--sea); }

@media print {
  body { background: #fff !important; color: #000 !important; }
  .frontispiece,
  .cartouche,
  .plate-framed,
  .article-card,
  .volume-card,
  .chapter-card,
  .cover,
  .title-page,
  .major-section,
  .intro-section { box-shadow: none !important; }
}


/* Apparatus explanation plate */
.apparatus-purpose {
  position: relative;
  overflow: hidden;
  border-top: 6px double var(--score-violet, #67507A);
}
.apparatus-purpose::after {
  content: "VII";
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  top: clamp(1rem, 4vw, 2.5rem);
  font-family: var(--mono);
  font-size: clamp(3rem, 10vw, 7rem);
  color: rgba(103, 80, 122, .06);
  pointer-events: none;
}
.apparatus-lead {
  max-width: 60rem;
  color: var(--sea-dark, #0E2F36);
}
.apparatus-principle {
  margin: 1.25rem 0 1.6rem;
  padding: 1.1rem 1.25rem;
  border-left: 5px solid var(--score-violet, #67507A);
  background: linear-gradient(180deg, rgba(255,249,237,.85), rgba(103,80,122,.09));
  border-radius: 16px;
}
.apparatus-principle p:last-child { margin-bottom: 0; }
.apparatus-tier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
  margin: 1.25rem 0;
}
.apparatus-tier-card {
  padding: 1rem;
  border: 1px solid var(--ruled-light, #D8C5A5);
  background: rgba(255,249,237,.62);
  border-radius: 16px;
  box-shadow: var(--shadow-soft, 0 10px 35px rgba(23,33,38,.08));
}
.apparatus-tier-card h4 {
  margin-top: 0;
  color: var(--score-violet, #67507A);
}
.apparatus-tier-card p:last-child { margin-bottom: 0; }
.apparatus-caution {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border-left: 5px solid var(--danger-red, #8D3A32);
  background: rgba(141,58,50,.08);
  border-radius: 16px;
}
.apparatus-caution p:last-child { margin-bottom: 0; }
.apparatus-route-line {
  font-family: var(--fell, Georgia, serif);
  font-style: italic;
  color: var(--ink-light, #3D4A50);
}
.wang-inline {
  font-family: serif;
  font-size: 1.2em;
  color: var(--merge-plum, #4B334B);
}
@media (max-width: 1100px) {
  .apparatus-tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .apparatus-tier-grid { grid-template-columns: 1fr; }
}


/* Final contrast/accessibility correction:
   table and disclosure "green bars" must remain readable after the Atlantic palette override. */
.map-table thead th,
table.map-table th {
  background: linear-gradient(180deg, #0E2F36 0%, #174C55 100%) !important;
  color: #FFF9ED !important;
  border-color: rgba(255, 249, 237, 0.42) !important;
  text-shadow: 0 1px 1px rgba(0,0,0,0.42);
  font-weight: 800;
}
.map-table thead th *,
table.map-table th * {
  color: inherit !important;
}
.chapter-summary,
.reader-guide-card summary,
details.reader-guide-card > summary,
.chapter-card.full-guide .chapter-summary,
.chapter-card.residue-guide .chapter-summary,
.chapter-card.orientation-guide .chapter-summary,
.chapter-card.withheld-guide .chapter-summary {
  color: #FFF9ED !important;
  text-shadow: 0 1px 1px rgba(0,0,0,0.38);
}
.chapter-summary *,
.reader-guide-card summary *,
.chapter-card.full-guide .chapter-summary *,
.chapter-card.residue-guide .chapter-summary *,
.chapter-card.orientation-guide .chapter-summary *,
.chapter-card.withheld-guide .chapter-summary * {
  color: inherit !important;
}
.chapter-chip,
.chapter-summary-meta {
  color: #EAF6F2 !important;
}

/* Restore the atlas lock page as a real first visual state. */
body.auth-active { overflow: hidden; }
#atlasContent.auth-locked {
  filter: blur(1.5px) saturate(0.85);
  pointer-events: none;
  user-select: none;
}
.auth-gate {
  display: flex !important;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(200,106,46,0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 72% 82%, rgba(23,76,85,0.13) 0%, transparent 55%),
    linear-gradient(180deg, #FFF9ED 0%, #F3E7D3 58%, #E5D2B5 100%) !important;
}
.auth-gate[hidden] { display: none !important; }
.auth-lang-toggle { display: block !important; }
.auth-title { color: var(--sea-dark, #0E2F36) !important; }
.auth-subtitle, .auth-footer { color: var(--ink-light, #3D4A50) !important; }
.auth-input {
  color: var(--sea-dark, #0E2F36) !important;
  border-bottom-color: var(--copper, #9A5A2E) !important;
}
.auth-btn {
  color: var(--sea-dark, #0E2F36) !important;
  border-color: var(--copper, #9A5A2E) !important;
  background: rgba(255,249,237,.48) !important;
}
.auth-btn:hover { background: var(--sea, #174C55) !important; color: #FFF9ED !important; }
.auth-error { color: var(--danger-red, #8D3A32) !important; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* === Copyright-page and cover-art integration pass — 2026-06-16 === */
.volume-cover-art {
  width: min(46vw, 260px);
  max-width: 80%;
  height: auto;
  display: block;
  margin: 0 auto 1.7rem;
  border: 1px solid rgba(35, 74, 115, 0.22);
  box-shadow: 0 18px 45px rgba(23, 33, 38, 0.13);
  border-radius: 4px;
  background: #0E2F36;
}
.copyright-page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
  page-break-before: always;
  page-break-after: always;
  break-before: page;
  break-after: page;
  color: var(--ink, #1a1a1a);
  background: transparent;
  font-family: var(--body, var(--serif, Georgia, serif));
  line-height: 1.72;
}
.copyright-page .copyright-kicker {
  font-family: var(--sans, system-ui, sans-serif);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted, var(--ink-faded, #3F3326));
  margin-bottom: 1.1rem;
}
.copyright-page h2 {
  font-family: var(--serif, Georgia, serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.12;
  font-weight: 500;
  color: var(--accent-dark, var(--ink, #1a1a1a));
  margin: 0 0 1.4rem;
  border: 0;
  padding: 0;
}
.copyright-page p { text-indent: 0 !important; text-align: left; margin: 0 0 .8rem; }
.copyright-page .copyright-rule { border: 0; border-top: 1px solid var(--rule, rgba(0,0,0,.18)); margin: 1.5rem 0; }
.copyright-page .rights-note { font-size: .92rem; color: var(--ink-soft, #3D4A50); }
.copyright-page .intertextual-notice {
  margin-top: 1.4rem;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--accent, #174C55);
  background: rgba(255,255,255,.38);
}
.copyright-page h3 {
  font-family: var(--sans, system-ui, sans-serif);
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-dark, #174C55);
  margin: 0 0 .65rem;
}
.site-copyright-footer {
  margin: 3rem auto 0;
  padding: 1.25rem 1rem 2.4rem;
  max-width: 900px;
  text-align: center;
  border-top: 1px solid var(--ruled-light, var(--rule, rgba(0,0,0,.16)));
  color: var(--ink-faded, var(--muted, #3F3326));
  font-family: var(--sans, system-ui, sans-serif);
  font-size: .72rem;
  line-height: 1.55;
  letter-spacing: .04em;
}
.site-copyright-footer p { margin: .15rem 0; text-indent: 0 !important; text-align: center !important; }
.volume-cover-thumb {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto 1.25rem;
  border: 1px solid var(--ruled, var(--rule, rgba(0,0,0,.18)));
  box-shadow: 0 16px 42px rgba(23, 33, 38, .12);
  background: var(--sea-dark, #0E2F36);
  border-radius: 3px;
}
@media (max-width: 640px) {
  .volume-cover-art { width: min(72vw, 230px); }
  .copyright-page { padding: 3rem 1.2rem 4rem; }
}


/* === CRISP GREEN-BAR LEGIBILITY PATCH — 2026-06-16 ===
   Removes faux-bold italic + text-shadow blur on dark green/teal bars.
*/
.map-table thead th,
table.map-table th {
  background: linear-gradient(180deg, #0E2F36 0%, #174C55 100%) !important;
  color: #FFF9ED !important;
  font-family: var(--sans) !important;
  font-style: normal !important;
  font-weight: 600 !important;
  font-size: 0.70rem !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
  border-color: rgba(255, 249, 237, 0.42) !important;
}
.map-table thead th *,
table.map-table th * { color: inherit !important; font-family: inherit !important; font-style: inherit !important; font-weight: inherit !important; text-shadow: none !important; }
.chapter-summary,
.reader-guide-card summary,
details.reader-guide-card > summary,
.chapter-card.full-guide .chapter-summary,
.chapter-card.residue-guide .chapter-summary,
.chapter-card.orientation-guide .chapter-summary,
.chapter-card.withheld-guide .chapter-summary { color: #FFF9ED !important; text-shadow: none !important; -webkit-font-smoothing: antialiased !important; -moz-osx-font-smoothing: grayscale !important; }
.chapter-summary *,
.reader-guide-card summary *,
.chapter-card.full-guide .chapter-summary *,
.chapter-card.residue-guide .chapter-summary *,
.chapter-card.orientation-guide .chapter-summary *,
.chapter-card.withheld-guide .chapter-summary * { color: inherit !important; text-shadow: none !important; }
.chapter-chip,
.chapter-summary-meta { color: #F3E7D3 !important; text-shadow: none !important; }


/* Crisp green-bar legibility override */
.map-table thead th, table.map-table th{background:#174C55!important;color:#FFF9ED!important;text-shadow:none!important;font-family:var(--sans)!important;font-style:normal!important;font-weight:600!important;letter-spacing:.04em!important;-webkit-font-smoothing:antialiased!important;text-rendering:geometricPrecision!important;}
.map-table thead th *, table.map-table th *{color:inherit!important;text-shadow:none!important;}
.chapter-summary,.reader-guide-card summary,details.reader-guide-card>summary,.chapter-card.full-guide .chapter-summary,.chapter-card.residue-guide .chapter-summary,.chapter-card.orientation-guide .chapter-summary,.chapter-card.withheld-guide .chapter-summary{color:#FFF9ED!important;text-shadow:none!important;font-weight:600!important;-webkit-font-smoothing:antialiased!important;text-rendering:geometricPrecision!important;}
.chapter-summary *,.reader-guide-card summary *,.chapter-card.full-guide .chapter-summary *,.chapter-card.residue-guide .chapter-summary *,.chapter-card.orientation-guide .chapter-summary *,.chapter-card.withheld-guide .chapter-summary *{color:inherit!important;text-shadow:none!important;}
.chapter-chip,.chapter-summary-meta{color:#EAF6F2!important;text-shadow:none!important;}
#atlasContent.auth-locked{filter:none!important;}

/* === FOOTER + FIXED SYSTEM BAR READABILITY PATCH — 2026-06-16 === */
.site-copyright-footer {
  color: #4B3D2F !important;
  font-family: var(--sans, 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif) !important;
  font-size: 0.74rem !important;
  line-height: 1.55 !important;
  letter-spacing: 0.025em !important;
  font-style: normal !important;
  font-weight: 500 !important;
  opacity: 1 !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: geometricPrecision !important;
}
.site-copyright-footer p {
  color: #4B3D2F !important;
  font-style: normal !important;
  font-weight: 500 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
.system-bar {
  background: #174C55 !important;
  color: #FFF9ED !important;
  font-family: var(--sans, 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif) !important;
  font-size: 0.70rem !important;
  line-height: 1.45 !important;
  letter-spacing: 0.04em !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-top: 1px solid rgba(255, 249, 237, 0.45) !important;
  text-shadow: none !important;
}
.system-bar span,
.system-bar-left span,
.system-bar-right span,
.system-bar .witness-count {
  color: #FFF9ED !important;
  opacity: 1 !important;
  font-family: inherit !important;
  font-style: normal !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: geometricPrecision !important;
}
.system-bar .witness-count {
  color: #F3E7D3 !important;
  animation: none !important;
}
.system-bar .glyph {
  color: #F3E7D3 !important;
  opacity: 0.95 !important;
  font-family: serif !important;
  font-weight: 400 !important;
  font-size: 0.95rem !important;
}
@media (max-width: 768px) {
  .system-bar {
    font-size: 0.62rem !important;
    line-height: 1.35 !important;
    padding: 0.38rem 0.75rem !important;
  }
}


/* FINAL READABILITY PASS
   No faint UI fonts. No ghosted footer. No translucent system-bar text.
   Green/teal bars use the same readable sans treatment everywhere. */
:root{
  --ink:#21180F!important;
  --ink-light:#2B2117!important;
  --ink-soft:#2F261C!important;
  --ink-faded:#3F3326!important;
  --ink-ghost:#3F3326!important;
  --muted:#3F4A56!important;
  --sea:#174C55!important;
  --sea-dark:#0E2F36!important;
  --accent-dark:#0E2F36!important;
}
html,body{color:#21180F!important;}
p,li,td,dd,dt,blockquote{color:#21180F;}
/* General formerly-faint interface text. */
.section-label,.section-rule-text,.frontispiece-atlas,.frontispiece-long,.frontispiece-warning,
.vol-number,.vol-meta,.vol-status,.vol-subtitle,.article-num,.article-sub,.fa-num,.fa-sub,
.plate-caption,.plate-legend,.plate-legend-grid,.legend-name,.timeline-date,.timeline-text p,
.credential-block p,.contact-note,.note,.meta,.kicker,.small-note,.article-kicker,.article-byline,
.article-subtitle,.article-abstract,.article-footer-line,.endnote,.bib-entry,.copyright-page,
.copyright-page p,.rights-notice,.rights-notice p,.chapter-number,.chapter-subtitle,.scene-break,
.title-page .series-title,.title-page .author,.title-page .subtitle,.form-label,.toc-num,
.block-meta,.thread-label,.toc a,.toc-scenes a,.sidebar-brand span,.search-status,
.cover .subtitle,.cover .designation,.path-desc,.use-line,.pi-filing,.pi-filing::before,
.chapter-chip,.chapter-summary-meta,.ch-num,.ch-arrow,.chapter-list-header,.mobile-title,
.auth-title,.auth-subtitle,.auth-footer,.auth-error,.lang-toggle,.auth-lang-toggle,
.reader-breadcrumb,.reader-chapter-sub,.map-group p,.workbook-section-card p,.tier-card p,
.sequence-card p,.spoiler-card p,.reader-card p,.formation-card p,.guide-card p,.withheld-card p{
  color:#2F261C!important;
  opacity:1!important;
  text-shadow:none!important;
  -webkit-font-smoothing:antialiased!important;
  -moz-osx-font-smoothing:grayscale!important;
  text-rendering:optimizeLegibility!important;
}
.section-label,.article-num,.fa-num,.vol-number,.vol-meta,.chapter-number,.toc-num,
.block-meta,.thread-label,.chapter-list-header,.form-label,.pi-filing::before{
  font-family:var(--sans,"DM Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif)!important;
  font-style:normal!important;
  font-weight:700!important;
  letter-spacing:.07em!important;
}
/* Inline old gray text cannot override this pass. */
[style*="color: #666"],[style*="color:#666"],[style*="color: #777"],[style*="color:#777"],
[style*="color: #3F3326"],[style*="color:#3F3326"],
[style*="color: #4A3B2B"],[style*="color:#4A3B2B"],
[style*="color: var(--muted)"],[style*="color:var(--muted)"]{
  color:#2F261C!important;
  opacity:1!important;
  text-shadow:none!important;
}
/* Bottom system bar and copyright footer: readable green-bar treatment. */
.system-bar,.system-bar-left,.system-bar-right,.site-copyright-footer{
  background:#174C55!important;
  color:#FFF9ED!important;
  opacity:1!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  text-shadow:none!important;
  border-color:#0E2F36!important;
}
.system-bar,.system-bar *,.site-copyright-footer,.site-copyright-footer *{
  color:#FFF9ED!important;
  opacity:1!important;
  font-family:var(--sans,"DM Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif)!important;
  font-style:normal!important;
  font-weight:600!important;
  letter-spacing:.06em!important;
  line-height:1.55!important;
  text-shadow:none!important;
  filter:none!important;
  -webkit-font-smoothing:antialiased!important;
  -moz-osx-font-smoothing:grayscale!important;
  text-rendering:geometricPrecision!important;
}
.site-copyright-footer{
  max-width:none!important;
  width:100%!important;
  margin:0!important;
  padding:1rem 1.25rem 2.25rem!important;
  border-top:2px solid #0E2F36!important;
  text-align:center!important;
}
.site-copyright-footer p{margin:.1rem 0!important;text-indent:0!important;text-align:center!important;}
.system-bar .glyph{color:#FFF9ED!important;opacity:1!important;font-weight:500!important;}
.system-bar .witness-count{color:#FFE8B8!important;opacity:1!important;font-weight:800!important;}
/* All dark table / accordion / guide bars. */
.map-table thead th,table.map-table th,th,
.chapter-summary,.reader-guide-card summary,details.reader-guide-card>summary,
.functional-translation>summary,.german-term-index>summary,.toc a.active,
.chapter-card.full-guide .chapter-summary,.chapter-card.residue-guide .chapter-summary,
.chapter-card.orientation-guide .chapter-summary,.chapter-card.withheld-guide .chapter-summary{
  background:#174C55!important;
  color:#FFF9ED!important;
  opacity:1!important;
  text-shadow:none!important;
  font-family:var(--sans,"DM Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif)!important;
  font-style:normal!important;
  font-weight:700!important;
  letter-spacing:.035em!important;
  -webkit-font-smoothing:antialiased!important;
  -moz-osx-font-smoothing:grayscale!important;
  text-rendering:geometricPrecision!important;
}
.map-table thead th *,table.map-table th *,th *,
.chapter-summary *,.reader-guide-card summary *,details.reader-guide-card>summary *,
.functional-translation>summary *,.german-term-index>summary *,.toc a.active *{
  color:inherit!important;
  opacity:1!important;
  text-shadow:none!important;
  font-family:inherit!important;
  font-style:inherit!important;
  font-weight:inherit!important;
}
.chapter-chip,.chapter-summary-meta{color:#F3E7D3!important;opacity:1!important;text-shadow:none!important;font-weight:700!important;}
/* Colophons stay literary, but they are no longer ghost text. */
footer:not(.site-copyright-footer),.colophon,.colophon *{
  color:#2B2117!important;
  opacity:1!important;
  text-shadow:none!important;
}
.colophon-title,.colophon-legal{
  font-family:var(--sans,"DM Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif)!important;
  font-style:normal!important;
  font-weight:600!important;
  letter-spacing:.045em!important;
}
.colophon-text{
  color:#2B2117!important;
  font-weight:400!important;
  line-height:1.75!important;
}
/* Search/sidebar/link microtext. */
.sidebar,.sidebar *:not(.toc a.active),.mobile-topbar,.mobile-topbar *{
  opacity:1!important;
  text-shadow:none!important;
}
.sidebar .toc a,.sidebar-brand span,.search-status,.search-results a,.search-result-snippet{
  color:#2F261C!important;
  font-weight:500!important;
}
/* Covers: never render title art under/over the readable title plaque. */
.volume-cover-thumb,.volume-cover-art{
  background:#0E2F36!important;
}
#atlasContent.auth-locked{filter:none!important;}



/* DEFINITIVE NOVEL MENU BAR FIX
   All top-level sidebar / TOC menu bars have cream text on dark teal.
   This overrides earlier passes, visited states, active states, and browser text-fill quirks. */

/* Top-level menu bars: Title Page, Author’s Preface, Chapters, Kapitel, etc. */
html body aside.sidebar nav.toc ol.toc-list > li > a,
html body aside.sidebar nav.toc ol.toc-list > li > a:link,
html body aside.sidebar nav.toc ol.toc-list > li > a:visited,
html body aside.sidebar nav.toc ol.toc-list > li > a:hover,
html body aside.sidebar nav.toc ol.toc-list > li > a:focus,
html body aside.sidebar nav.toc ol.toc-list > li > a:active,
html body nav.toc ol.toc-list > li > a,
html body nav.toc ol.toc-list > li > a:link,
html body nav.toc ol.toc-list > li > a:visited,
html body nav.toc ol.toc-list > li > a:hover,
html body nav.toc ol.toc-list > li > a:focus,
html body nav.toc ol.toc-list > li > a:active,
html body .toc-list > li > a,
html body .toc-list > li > a:link,
html body .toc-list > li > a:visited,
html body .toc-list > li > a:hover,
html body .toc-list > li > a:focus,
html body .toc-list > li > a:active {
  display: block !important;
  margin: 0 0 7px 0 !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
  background: #174C55 !important;
  background-image: none !important;
  color: #FFF9ED !important;
  -webkit-text-fill-color: #FFF9ED !important;
  caret-color: #FFF9ED !important;
  opacity: 1 !important;
  font-family: var(--sans, "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif) !important;
  font-style: normal !important;
  font-size: .84rem !important;
  font-weight: 800 !important;
  letter-spacing: .015em !important;
  line-height: 1.28 !important;
  text-transform: none !important;
  text-decoration: none !important;
  text-decoration-color: #FFF9ED !important;
  text-shadow: none !important;
  filter: none !important;
  border: 1px solid #0E2F36 !important;
  box-shadow: none !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: geometricPrecision !important;
}

/* Active top-level menu item: darker border/selection but still readable. */
html body aside.sidebar nav.toc ol.toc-list > li > a.active,
html body nav.toc ol.toc-list > li > a.active,
html body .toc-list > li > a.active {
  background: #0E2F36 !important;
  background-image: none !important;
  color: #FFF9ED !important;
  -webkit-text-fill-color: #FFF9ED !important;
  border-color: #D8C5A5 !important;
  box-shadow: inset 0 0 0 2px rgba(255,249,237,.18) !important;
}

/* Any nested content inside top-level bars. */
html body aside.sidebar nav.toc ol.toc-list > li > a *,
html body nav.toc ol.toc-list > li > a *,
html body .toc-list > li > a * {
  color: #FFF9ED !important;
  -webkit-text-fill-color: #FFF9ED !important;
  opacity: 1 !important;
  font-family: inherit !important;
  font-style: normal !important;
  font-weight: inherit !important;
  text-shadow: none !important;
}

/* Beat/scene links: plain subordinate text, except active scene. */
html body aside.sidebar nav.toc ol.toc-list > li > ol.toc-scenes,
html body nav.toc ol.toc-list > li > ol.toc-scenes,
html body .toc-scenes,
html body .chapter-toc {
  margin: 2px 0 10px 14px !important;
  padding-left: 9px !important;
  border-left: 1px dashed rgba(23,76,85,.42) !important;
}

html body aside.sidebar nav.toc ol.toc-list > li > ol.toc-scenes a,
html body nav.toc ol.toc-list > li > ol.toc-scenes a,
html body .toc-scenes a,
html body .chapter-toc a {
  display: block !important;
  margin: 0 0 2px 0 !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  background: transparent !important;
  background-image: none !important;
  color: #21180F !important;
  -webkit-text-fill-color: #21180F !important;
  opacity: 1 !important;
  font-family: var(--sans, "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif) !important;
  font-style: normal !important;
  font-size: .78rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  line-height: 1.25 !important;
  text-transform: none !important;
  text-decoration: none !important;
  text-shadow: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body aside.sidebar nav.toc ol.toc-list > li > ol.toc-scenes a.active,
html body nav.toc ol.toc-list > li > ol.toc-scenes a.active,
html body .toc-scenes a.active,
html body .chapter-toc a.active {
  background: #174C55 !important;
  background-image: none !important;
  color: #FFF9ED !important;
  -webkit-text-fill-color: #FFF9ED !important;
  border: 1px solid #0E2F36 !important;
  font-weight: 750 !important;
}

/* Volume II internal labeled bars. */
html body .thread-label,
html body .thread-block .thread-label {
  background: #174C55 !important;
  background-image: none !important;
  color: #FFF9ED !important;
  -webkit-text-fill-color: #FFF9ED !important;
  opacity: 1 !important;
  display: inline-block !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  border: 1px solid #0E2F36 !important;
  font-family: var(--sans, "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif) !important;
  font-style: normal !important;
  font-size: .72rem !important;
  font-weight: 800 !important;
  letter-spacing: .075em !important;
  line-height: 1.35 !important;
  text-transform: uppercase !important;
  text-shadow: none !important;
}
html body .thread-label *,
html body .thread-block .thread-label * {
  color: #FFF9ED !important;
  -webkit-text-fill-color: #FFF9ED !important;
  opacity: 1 !important;
}

/* Final bottom green-bar readability pass.
   This specifically fixes the copyright/footer band above the fixed system bar. */
html body .site-copyright-footer,
html body footer.site-copyright-footer,
html body .site-copyright-footer * {
  background: #174C55 !important;
  background-image: none !important;
  color: #FFF9ED !important;
  -webkit-text-fill-color: #FFF9ED !important;
  opacity: 1 !important;
  text-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  font-family: var(--sans, "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif) !important;
  font-style: normal !important;
  font-weight: 700 !important;
  letter-spacing: .045em !important;
  line-height: 1.55 !important;
  text-align: center !important;
  text-decoration: none !important;
}
html body .site-copyright-footer {
  display: block !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 1rem 1.25rem 2.35rem !important;
  border-top: 2px solid #0E2F36 !important;
  border-bottom: 1px solid #0E2F36 !important;
  box-shadow: none !important;
}
html body .site-copyright-footer p,
html body .site-copyright-footer div,
html body .site-copyright-footer span {
  margin: .1rem 0 !important;
  padding: 0 !important;
  color: #FFF9ED !important;
  -webkit-text-fill-color: #FFF9ED !important;
  opacity: 1 !important;
  text-indent: 0 !important;
}
/* Fixed bottom system bar stays readable too. */
html body .system-bar,
html body .system-bar * {
  background-color: #174C55 !important;
  color: #FFF9ED !important;
  -webkit-text-fill-color: #FFF9ED !important;
  opacity: 1 !important;
  text-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  font-family: var(--sans, "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif) !important;
  font-style: normal !important;
  font-weight: 700 !important;
  letter-spacing: .055em !important;
}
html body .system-bar {
  border-top: 2px solid #0E2F36 !important;
}
html body .system-bar .witness-count {
  color: #FFE8B8 !important;
  -webkit-text-fill-color: #FFE8B8 !important;
  font-weight: 900 !important;
}
