@font-face {
  font-family: "Noto Naskh Arabic";
  src: url("/assets/naskh.woff2") format("woff2"), url("/assets/naskh.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Kufi Arabic";
  src: url("/assets/kufi.woff2") format("woff2"), url("/assets/kufi.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --paper: #f8f5ec;
  --paper-deep: #eee7d7;
  --white: #fffdf7;
  --ink: #1c3036;
  --muted: #616961;
  --green: #193d35;
  --green-soft: #e8eee4;
  --copper: #945b31;
  --copper-soft: #f3e6d9;
  --line: #d8d2c3;
  --gold: #c1a46f;
  --sidebar-width: 248px;
  --body-font: "Noto Naskh Arabic", "Traditional Arabic", Georgia, serif;
  --heading-font: "Noto Kufi Arabic", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body-font); font-size: 18px; line-height: 1.85; }
body.modal-open { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
img { height: auto; }
p, h1, h2, h3, figure { margin: 0; }
h1, h2, h3 { font-weight: 700; }
button:disabled { cursor: not-allowed; opacity: .45; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 5px; }
::selection { background: #d6e2ce; color: var(--green); }
.skip-link { position: fixed; top: 12px; right: 12px; z-index: 100; padding: 10px 22px; background: var(--white); color: var(--green); border: 2px solid var(--green); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar-width); background: var(--green); color: #fffdf1; z-index: 30; padding: 38px 25px 24px; overflow-y: auto; border-inline-end: 1px solid #2f5046; }
.brand { display: flex; align-items: center; gap: 12px; padding-bottom: 34px; border-bottom: 1px solid #456054; }
.brand-mark { width: 45px; flex: 0 0 45px; color: #d6bd87; fill: none; stroke: currentColor; stroke-width: 1; }
.brand-name { font-size: 32px; line-height: 1.2; }
.brand-name > span { display: block; font-family: var(--heading-font); font-size: 9px; font-weight: 400; padding-top: 10px; color: #d8ddcf; }
.nav-caption { margin: 30px 12px 14px 0; font: 10px var(--heading-font); color: #bfcbbd; }
.navigation { display: flex; flex-direction: column; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 13px; padding: 10px 12px; font-size: 17px; color: #e8ebdf; border-inline-start: 2px solid transparent; transition: background .2s, color .2s; }
.nav-link:hover, .nav-link.active { background: #294b40; color: #fffdf1; border-inline-start-color: #d6bd87; }
.nav-featured { color: #f4e0bd; border-inline-start-color: #c1a46f; background: #294b40; }
.nav-number { font: 10px var(--heading-font); color: #c1b895; }
.sidebar-note { padding: 35px 14px; margin-top: 28px; border-top: 1px solid #456054; }
.small-star { display: block; color: #d6bd87; font-size: 24px; margin-bottom: 8px; }
.sidebar-note p { font-size: 24px; line-height: 1.6; }
.sidebar-note > span:last-child { display: block; font: 9px var(--heading-font); color: #c0cbbf; margin-top: 16px; }
.sidebar-pdf { display: flex; align-items: center; gap: 10px; border: 1px solid #5c7360; padding: 10px 12px; font-size: 15px; }
.sidebar-pdf:hover:not(.unavailable) { background: #294b40; }
.file-tag { font: 10px var(--heading-font); letter-spacing: .03em; }
.sidebar-pdf .file-tag { margin-inline-start: auto; color: #d6bd87; }
.menu-toggle { display: none; }
.main { margin-inline-start: var(--sidebar-width); min-width: 0; }
.masthead { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 48px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.masthead-label { font: 10px var(--heading-font); display: flex; align-items: center; gap: 9px; color: var(--green); }
.status-dot, .badge-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.hero { position: relative; margin: 28px 32px 0; padding: 58px 46px 0; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, .8fr); column-gap: 36px; min-height: 556px; background-color: #f2eddf; background-image: radial-gradient(#a58c6620 .6px, transparent .6px); background-size: 5px 5px; isolation: isolate; }
.hero-frame { position: absolute; inset: 12px; border: 1px solid #c3b998; pointer-events: none; z-index: -1; }
.hero-frame::before, .hero-frame::after { content: ""; position: absolute; width: 27px; height: 27px; border: 3px double var(--copper); }
.hero-frame::before { inset-block-start: -5px; inset-inline-start: -5px; border-inline-end: 0; border-block-end: 0; }
.hero-frame::after { inset-block-end: -5px; inset-inline-end: -5px; border-inline-start: 0; border-block-start: 0; }
.eyebrow { font: 10px/1.9 var(--heading-font); color: var(--copper); }
.hero .eyebrow { display: flex; gap: 12px; align-items: center; }
.ornament { font-size: 17px; }
h1 { font-size: clamp(35px, 3.85vw, 65px); line-height: 1.38; color: var(--green); margin-top: 20px; letter-spacing: -.025em; text-wrap: balance; }
.hero-subtitle { font-size: 23px; margin-top: 20px; color: var(--copper); }
.project-credit { display: flex; flex-wrap: wrap; gap: 5px 14px; align-items: baseline; margin-top: 22px; padding: 8px 14px 9px; border-inline-start: 3px solid var(--copper); background: #e8dfcc; }
.project-credit span { color: #755a3c; font: 11px/1.9 var(--heading-font); }
.project-credit strong { color: var(--green); font: 700 19px/1.8 var(--heading-font); }
.hero-description { font-size: 18px; color: #535d55; max-width: 530px; margin-top: 14px; line-height: 1.95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { min-height: 48px; display: inline-flex; justify-content: center; align-items: center; gap: 20px; padding: 9px 24px; font-size: 17px; border: 1px solid transparent; transition: background .2s, border-color .2s, transform .2s; }
.button.primary { background: var(--green); color: #fffdf1; }
.button.primary:hover:not(.unavailable) { background: #2c5145; transform: translateY(-2px); }
.button.secondary { background: transparent; border-color: #a9b3a3; color: var(--green); }
.button.secondary:hover { background: #e6e8db; }
.button.research-button { border-color: #b38c67; color: #754721; background: #f3e8d9; }
.button.research-button:hover { background: #ebdac5; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 11px; align-items: center; margin: 25px 0 32px; font: 9px/1.9 var(--heading-font); color: var(--muted); }
.meta-divider { width: 3px; height: 3px; border-radius: 50%; background: #b5ad95; }
.hero-art { min-width: 0; display: flex; align-items: center; justify-content: center; padding-bottom: 20px; }
.compass-plate { width: 100%; color: #aa8b52; position: relative; text-align: center; }
.atlas-compass { width: 100%; max-width: 360px; opacity: .85; }
.compass-caption { font-size: 23px; color: #795a34; margin-top: -3px; }
.plate-label { display: block; font: 9px var(--heading-font); color: #82745a; margin-top: 8px; }
.book-cover-figure { width: min(100%, 250px); transform: rotate(-4deg); }
.book-cover-figure img { width: 100%; max-height: 360px; object-fit: contain; display: block; filter: drop-shadow(-12px 15px 13px #24382c26); }
.book-cover-figure figcaption { text-align: center; font-size: 14px; color: var(--copper); margin-top: 16px; }
.hero-bottom { grid-column: 1/-1; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #cec3a8; padding: 15px 0 19px; font-size: 13px; color: #707563; }
.hero-bottom a { color: var(--green); }
.hero-bottom a span { display: inline-block; margin-inline-start: 10px; }
.source-key { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; margin: 0 48px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.key-title { font: 9px var(--heading-font); margin-inline-end: 3px; }
.source-badge { display: inline-flex; align-items: center; gap: 7px; width: fit-content; padding: 3px 10px; font: 9px/1.9 var(--heading-font); white-space: nowrap; }
.source-badge.book { background: var(--green-soft); color: var(--green); }
.source-badge.research { background: var(--copper-soft); color: #855027; }
.source-badge.unknown { background: #e9e6df; color: #515950; }
.source-key > p { font-size: 13px; color: var(--muted); margin-inline-start: auto; }
.content-status { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 24px 48px 0; padding: 13px 18px; border: 1px solid #d6cfbd; background: #eee9da; color: #535d55; font-size: 16px; }
.content-status.error { border-color: #bd916a; background: #f4e7dc; color: #754721; }
.section { margin: 0 48px; padding: 58px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-kicker { font: 9px/1.9 var(--heading-font); color: var(--copper); margin-bottom: 10px; }
h2 { font-size: clamp(29px, 2.6vw, 40px); line-height: 1.5; color: var(--green); }
.section-heading p:not(.section-kicker) { font-size: 16px; color: var(--muted); margin-top: 8px; }
.heading-ornament { color: var(--copper); font-size: 29px; }
.text-button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; background: transparent; color: var(--green); padding: 8px 3px; font-size: 14px; border-bottom: 1px solid currentColor; }
.text-button:hover { color: var(--copper); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, .8fr); gap: 48px; }
.book-description h3 { font-size: 27px; color: var(--ink); margin-top: 12px; line-height: 1.65; }
.author { margin-top: 3px; font-size: 16px; color: var(--copper); }
.book-description > p:last-of-type { margin-top: 20px; color: #515f58; }
.inline-link { display: inline-flex; gap: 12px; align-items: center; color: var(--green); font-size: 16px; border-bottom: 1px solid #a9b3a3; padding-bottom: 3px; }
.inline-link:hover:not(.unavailable) { color: var(--copper); border-color: var(--copper); }
.book-description .inline-link { margin-top: 24px; }
.unavailable { opacity: .6; cursor: not-allowed; }
.reading-guide { background: #edeedf; border-inline-start: 2px solid #a5b194; padding: 26px 28px; }
.reading-guide h3 { font-size: 23px; color: var(--green); }
.reading-guide ol { margin: 21px 0 0; padding: 0; list-style: none; counter-reset: guide; }
.reading-guide li { position: relative; padding-inline-start: 36px; margin-top: 19px; counter-increment: guide; }
.reading-guide li::before { content: "0" counter(guide); position: absolute; inset-inline-start: 0; top: 5px; font: 10px var(--heading-font); color: var(--copper); }
.reading-guide li > span { font-size: 20px; color: var(--green); }
.reading-guide li p { font-size: 15px; line-height: 1.8; color: #5c6658; }
.empty-state { padding: 26px 22px; width: 100%; color: var(--muted); font-size: 16px; border: 1px dashed var(--line); background: #ffffff30; }
.research-lead { padding: 28px 30px; background: #f1e9dc; border: 1px solid #d8c5ad; border-inline-start: 3px solid var(--copper); }
.research-lead h3 { color: var(--green); font-size: 27px; line-height: 1.6; margin-top: 12px; overflow-wrap: anywhere; }
.research-lead p { max-width: 72ch; color: #5b6258; font-size: 17px; margin-top: 8px; }
.research-lead .inline-link { margin-top: 18px; }
.research-cards-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 24px 0 14px; }
.research-cards-heading h3 { font-size: 22px; color: var(--green); }
.research-cards-heading p { font-size: 14px; color: var(--muted); }
.research-cards .topic-card { min-height: 220px; }
.research-all-link { margin-top: 17px; }
.chapters-list { border-top: 1px solid var(--line); }
.chapter { border-bottom: 1px solid var(--line); }
.chapter summary { display: flex; align-items: start; gap: 24px; padding: 23px 0; list-style: none; }
.chapter summary::-webkit-details-marker { display: none; }
.chapter summary::marker { content: ""; }
.chapter-number { font: 18px/1.7 var(--heading-font); color: #a78c61; padding-top: 3px; }
.chapter-summary-copy { flex: 1; min-width: 0; }
.chapter-title-line { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.chapter h3 { font-size: 25px; color: var(--green); }
.chapter-intro { color: var(--muted); font-size: 16px; margin-top: 7px; }
.chapter-toggle { font-size: 25px; color: var(--copper); padding: 0 6px; margin-inline-start: auto; }
.chapter-read-label { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--copper); }
.chapter[open] { background: #f1eee2; padding: 0 20px; margin: 0 -20px; }
.chapter-content { padding: 0 46px 30px 20px; }
.prose { color: #435349; line-height: 2; font-size: 19px; }
.prose p + p { margin-top: 18px; }
.source-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 13px; margin-top: 22px; overflow-wrap: anywhere; }
.source-line a { color: var(--green); border-bottom: 1px dotted currentColor; }
.source-line a:hover { color: var(--copper); }
.search-label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.search-field { display: flex; align-items: center; gap: 15px; background: var(--white); border: 1px solid #babdaa; padding: 8px 20px; }
.search-field:focus-within { border-color: var(--green); outline: 1px solid var(--green); }
.search-field .icon { width: 22px; height: 22px; color: var(--copper); }
.search-field input { min-width: 0; width: 100%; background: transparent; border: none; height: 45px; font-size: 19px; outline: none; }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.clear-search { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 36px; background: transparent; font-size: 28px; color: var(--muted); }
.filters { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; padding: 20px 0; }
.kind-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-button { display: flex; align-items: center; justify-content: center; gap: 7px; background: transparent; border: 1px solid var(--line); font-size: 14px; padding: 7px 14px; min-height: 42px; }
.filter-button.active { background: var(--green); color: var(--white); border-color: var(--green); }
.filter-button:hover:not(.active) { border-color: var(--green); background: #ebede1; }
.book-dot { color: var(--green); }
.research-dot { color: var(--copper); }
.active .badge-dot { color: #e8d4ab; }
.category-label { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.category-label select { border: 1px solid var(--line); background: var(--white); min-height: 42px; padding: 5px 10px; max-width: 240px; min-width: 150px; }
.results-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); padding-bottom: 17px; }
.results-line > span { color: #767b6b; }
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cards-grid > .empty-state { grid-column: 1/-1; }
.topic-card { display: flex; flex-direction: column; text-align: start; min-width: 0; padding: 23px; background: var(--white); border: 1px solid var(--line); border-top: 2px solid #597662; min-height: 246px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.topic-card.research { border-top-color: var(--copper); }
.topic-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px #25372c0b; border-color: #abb49c; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.card-category { font: 8px/1.8 var(--heading-font); color: var(--muted); overflow-wrap: anywhere; }
.topic-card h3 { font-size: 25px; margin-top: 18px; line-height: 1.5; overflow-wrap: anywhere; }
.card-summary { font-size: 16px; color: var(--muted); line-height: 1.85; margin-top: 9px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-bottom { width: 100%; display: flex; align-items: center; justify-content: space-between; padding-top: 20px; margin-top: auto; color: var(--green); font-size: 13px; }
.card-bottom span:last-child { font-size: 23px; }
#reset-filters { margin-top: 18px; }
.timeline-list { list-style: none; padding: 0; margin: 0; }
.timeline-item { position: relative; display: grid; grid-template-columns: 135px minmax(0, 1fr); gap: 42px; padding: 0 0 34px; }
.timeline-item::before { content: ""; position: absolute; top: 13px; bottom: 0; right: 156px; border-inline-start: 1px solid #c0c9b4; }
.timeline-item::after { content: ""; position: absolute; top: 10px; right: 150px; width: 13px; height: 13px; border: 3px solid var(--paper); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px #a8b598; }
.timeline-item.research::after { background: var(--copper); box-shadow: 0 0 0 1px #c6a688; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:last-child::before { bottom: auto; height: 24px; }
.timeline-date { font: 12px/2 var(--heading-font); color: var(--copper); text-align: end; padding-top: 3px; overflow-wrap: anywhere; }
.timeline-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; }
.timeline-item h3 { font-size: 24px; color: var(--green); }
.timeline-item .timeline-text { font-size: 17px; color: var(--muted); margin-top: 9px; }
.timeline-item .source-line { margin-top: 11px; padding-top: 0; border: 0; }
.geography-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); border: 1px solid var(--line); background: #eeecdf; }
.map-column { min-width: 0; }
.map-viewport { width: 100%; height: 400px; overflow: auto; background: #e9e7d8; position: relative; direction: ltr; scrollbar-color: #8b977c #e9e7d8; }
.map-image { display: block; max-width: none; height: auto; margin: 0 auto; }
.visual-placeholder { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; text-align: center; padding: 30px; direction: rtl; color: #536354; font-size: 19px; }
.visual-placeholder > span:first-child { font-size: 62px; font-family: Georgia, serif; color: #9eaa8d; line-height: 1; margin-bottom: 10px; }
.placeholder-note { font-size: 14px; color: var(--muted); }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 14px; background: #f6f3e8; border-top: 1px solid var(--line); }
.map-toolbar > span { font: 11px var(--heading-font); color: var(--muted); }
.map-toolbar > div { display: flex; flex-wrap: wrap; gap: 7px; }
.map-toolbar button { display: flex; justify-content: center; align-items: center; background: transparent; border: 1px solid #c6cbb8; min-width: 36px; height: 36px; padding: 0 10px; font-size: 16px; }
.map-toolbar button:hover:not(:disabled) { background: var(--green-soft); }
.map-toolbar .text-button { font-size: 12px; }
.map-disclaimer { padding: 10px 15px; color: #5c6658; font-size: 12px; line-height: 1.9; }
.places-panel { min-width: 0; padding: 22px; border-inline-start: 1px solid var(--line); background: var(--white); }
.places-panel h3 { font-size: 23px; color: var(--green); }
.place-list { display: flex; flex-wrap: wrap; gap: 7px; max-height: 200px; overflow: auto; padding: 8px 4px 15px; margin: 12px -4px 0; }
.place-button { border: 1px solid var(--line); background: transparent; padding: 6px 12px; font-size: 15px; text-align: start; min-height: 38px; }
.place-button.active { background: var(--green); color: var(--white); border-color: var(--green); }
.place-button:hover:not(.active) { background: var(--green-soft); }
.place-detail { border-top: 1px solid var(--line); padding-top: 17px; font-size: 16px; color: var(--muted); }
.place-detail h4 { font-size: 23px; margin: 12px 0 6px; color: var(--green); }
.place-coordinates { direction: ltr; text-align: right; font: 11px/1.8 var(--heading-font); color: var(--copper); margin-top: 12px; }
.place-detail .source-line { margin-top: 16px; }
.concept-board { border: 1px solid #c6ceba; padding: 30px; background: #eef0e5; }
.concept-heading { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-bottom: 23px; border-bottom: 1px solid #d0d5c4; }
.concept-root { padding: 7px 20px; background: var(--green); color: #fffdf1; font-size: 22px; }
.concept-heading > span:last-child { color: var(--muted); font-size: 14px; }
.concept-tabs { display: flex; flex-wrap: wrap; gap: 10px; padding: 24px 0; }
.concept-tab { padding: 8px 17px; border: 1px solid #bbc6ad; background: #f9faef; color: var(--green); font-size: 17px; min-height: 42px; }
.concept-tab[aria-selected="true"] { border-color: var(--green); background: #dce5d2; box-shadow: inset 0 -2px var(--green); }
.concept-tab:hover { background: #e2e9d7; }
.concept-panel { padding: 22px 26px; background: var(--white); border-inline-start: 3px solid var(--copper); min-height: 120px; }
.concept-panel h3 { font-size: 27px; color: var(--green); margin-bottom: 10px; }
.concept-panel p { font-size: 18px; color: #535f55; }
.concept-panel .inline-link { margin-top: 18px; font-size: 14px; }
.mindmap-figure { margin-top: 22px; border-top: 1px solid #cdd4c0; padding-top: 15px; }
.mindmap-figure summary { display: flex; justify-content: space-between; align-items: center; list-style: none; color: var(--green); font-size: 16px; }
.mindmap-figure > div { margin-top: 18px; }
.mindmap-figure img { width: 100%; display: block; border: 1px solid var(--line); background: var(--white); }
.mindmap-figure .inline-link { margin-top: 16px; }
.references-list { list-style: none; padding: 0; margin: 0; }
.reference-item { display: flex; align-items: start; gap: 24px; border-top: 1px solid var(--line); padding: 22px 0; }
.reference-number { font: 11px/2 var(--heading-font); color: var(--copper); padding-top: 3px; }
.reference-item > div { min-width: 0; }
.reference-item a, .reference-item h3 { font-size: 23px; color: var(--green); line-height: 1.7; overflow-wrap: anywhere; }
.reference-item a { border-bottom: 1px solid #bac1ad; }
.reference-item a:hover { color: var(--copper); }
.reference-item p { color: var(--muted); font-size: 16px; margin-top: 7px; }
.reference-item .reference-url { direction: ltr; text-align: right; font-family: Tahoma, sans-serif; font-size: 10px; overflow-wrap: anywhere; color: #687165; }
.download-banner { display: flex; justify-content: space-between; align-items: center; gap: 24px; border: 1px solid #c9c4af; padding: 30px; margin-top: 28px; background: #eeebdf; }
.download-banner h3 { font-size: 29px; color: var(--green); }
.download-banner p:not(.section-kicker) { font-size: 16px; color: var(--muted); margin-top: 6px; }
.download-actions { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.footer { margin: 0 48px; padding: 30px 0; display: grid; grid-template-columns: 1fr 1.9fr auto; align-items: center; gap: 25px; font-size: 13px; color: var(--muted); }
.footer-brand { font-size: 31px; color: var(--green); }
.footer > div p { font-size: 12px; }
.back-top { display: flex; justify-content: center; align-items: center; width: 40px; height: 40px; border: 1px solid #c4cab6; color: var(--green); font-size: 23px; }
.back-top:hover { background: var(--green-soft); }
.card-dialog { width: min(660px, calc(100% - 32px)); max-height: calc(100dvh - 48px); border: 1px solid #c4b99c; padding: 30px 38px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 90px #102b2550; overflow-y: auto; }
.card-dialog::backdrop { background: #142e28a6; backdrop-filter: blur(4px); }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 20px; }
.icon-button { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #e9e5d8; border: 1px solid var(--line); color: var(--green); font-size: 29px; }
.icon-button:hover { background: #dfdfcf; }
.card-dialog h2 { font-size: 34px; }
.dialog-summary { margin: 15px 0 22px; color: var(--copper); font-size: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.card-dialog > .button { margin-top: 25px; }
@media (min-width: 1600px) {
  :root { --sidebar-width: 280px; }
  .main { max-width: 1540px; margin-inline-end: auto; border-inline-end: 1px solid var(--line); }
  .hero { padding-top: 70px; min-height: 620px; }
}
@media (max-width: 1200px) {
  :root { --sidebar-width: 216px; }
  .sidebar { padding: 30px 18px 20px; }
  .brand { gap: 9px; }
  .brand-name { font-size: 29px; }
  .brand-mark { width: 38px; flex-basis: 38px; }
  .masthead, .section, .source-key, .footer { margin-inline: 32px; }
  .hero { margin-inline: 20px; padding: 42px 32px 0; gap: 20px; }
  .hero-subtitle { font-size: 21px; }
  .hero-meta { font-size: 8px; }
  .overview-grid { gap: 28px; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-status { margin-inline: 32px; }
  .source-key > p { width: 100%; margin-inline-start: 0; }
  .geography-layout { grid-template-columns: minmax(0, 1.25fr) minmax(220px, 1fr); }
}
@media (max-width: 960px) {
  :root { --sidebar-width: 0px; }
  html { scroll-padding-top: 96px; }
  .sidebar { position: sticky; top: 0; width: 100%; padding: 14px 28px; display: flex; justify-content: space-between; gap: 20px; align-items: center; overflow: visible; }
  .brand { padding: 0; border: 0; }
  .brand-name { font-size: 26px; }
  .brand-name > span { font-size: 8px; padding-top: 6px; }
  .brand-mark { width: 36px; flex-basis: 36px; }
  .menu-toggle { display: flex; align-items: center; gap: 12px; background: transparent; color: #fffdf1; padding: 8px 0; font-size: 15px; min-height: 44px; }
  .menu-symbol { font-size: 21px; }
  .sidebar-body { display: none; position: absolute; top: 100%; inset-inline: 0; background: var(--green); padding: 14px 28px 24px; max-height: calc(100dvh - 78px); overflow-y: auto; border-bottom: 1px solid #5b7260; box-shadow: 0 14px 25px #1b322527; }
  .sidebar-body.open { display: block; }
  .nav-caption { margin-top: 6px; }
  .navigation { display: grid; grid-template-columns: 1fr 1fr; }
  .sidebar-note { display: none; }
  .sidebar-pdf { margin-top: 20px; width: fit-content; }
  .main { margin-inline-start: 0; }
  .hero { grid-template-columns: minmax(0, 1.4fr) minmax(180px, .8fr); }
  h1 { font-size: clamp(37px, 5.2vw, 54px); }
  .section { scroll-margin-top: 80px; }
  .masthead { min-height: 58px; }
}
@media (max-width: 680px) {
  body { font-size: 17px; }
  .sidebar { padding: 12px 20px; }
  .brand-name { font-size: 24px; }
  .brand-mark { width: 32px; flex-basis: 32px; }
  .menu-toggle { font-size: 13px; gap: 9px; }
  .sidebar-body { padding-inline: 20px; }
  .navigation { grid-template-columns: 1fr; }
  .nav-link { font-size: 17px; padding-block: 8px; }
  .masthead, .section, .source-key, .footer { margin-inline: 22px; }
  .masthead { font-size: 11px; }
  .masthead-label { font-size: 8px; gap: 6px; }
  .hero { margin: 16px 12px 0; padding: 40px 27px 0; display: block; min-height: 0; }
  .hero .eyebrow { font-size: 9px; gap: 8px; }
  h1 { font-size: clamp(34px, 8.1vw, 50px); margin-top: 16px; line-height: 1.42; }
  .hero-subtitle { font-size: 20px; margin-top: 17px; }
  .hero-description { font-size: 17px; margin-top: 12px; line-height: 1.9; }
  .hero-actions { gap: 9px; margin-top: 24px; }
  .button { padding: 8px 16px; font-size: 16px; gap: 13px; min-height: 46px; }
  .hero-meta { font-size: 8px; margin: 22px 0; gap: 8px; }
  .hero-art { width: 215px; margin: 0 auto 16px; padding-bottom: 0; }
  .compass-caption { font-size: 20px; }
  .atlas-compass { max-width: 190px; }
  .book-cover-figure { width: 160px; padding-top: 5px; }
  .book-cover-figure img { max-height: 220px; }
  .hero-bottom { font-size: 11px; padding-block: 14px 18px; }
  .source-key { gap: 10px; padding-block: 19px; }
  .key-title { width: 100%; font-size: 8px; }
  .source-key p { font-size: 12px; }
  .source-badge { font-size: 8px; }
  .content-status { margin-inline: 22px; padding: 12px 14px; align-items: start; flex-direction: column; font-size: 15px; }
  .section { padding-block: 39px; }
  .section-heading { align-items: start; gap: 14px; margin-bottom: 23px; }
  .section-heading:has(#expand-chapters) { flex-direction: column; }
  h2 { font-size: 31px; }
  .section-heading p:not(.section-kicker) { font-size: 15px; }
  .heading-ornament { font-size: 22px; }
  .section-kicker { font-size: 8px; margin-bottom: 7px; }
  .research-lead { padding: 22px; }
  .research-lead h3 { font-size: 23px; }
  .overview-grid { grid-template-columns: 1fr; gap: 28px; }
  .book-description h3 { font-size: 26px; }
  .reading-guide { padding: 22px; }
  .reading-guide li { margin-top: 15px; }
  .chapter summary { gap: 15px; padding-block: 20px; }
  .chapter-number { font-size: 14px; padding-top: 5px; }
  .chapter h3 { font-size: 23px; }
  .chapter-title-line { gap: 8px; }
  .chapter-intro { font-size: 15px; }
  .chapter-toggle { font-size: 21px; padding-inline: 0; }
  .chapter-content { padding: 0 0 25px; }
  .chapter[open] { padding-inline: 13px; margin-inline: -13px; }
  .prose { font-size: 18px; }
  .search-field { gap: 10px; padding-inline: 13px; }
  .search-field input { font-size: 17px; }
  .filters { gap: 15px; }
  .filter-button { font-size: 13px; padding-inline: 11px; }
  .category-label { width: 100%; }
  .category-label select { flex: 1; max-width: none; }
  .results-line > span { display: none; }
  .cards-grid { gap: 13px; }
  .topic-card { padding: 17px; min-height: 220px; }
  .topic-card h3 { font-size: 22px; margin-top: 14px; }
  .card-top { align-items: start; flex-direction: column; gap: 6px; }
  .card-summary { font-size: 15px; }
  .card-bottom { padding-top: 15px; font-size: 12px; }
  .timeline-item { grid-template-columns: 72px minmax(0, 1fr); gap: 29px; padding-bottom: 27px; }
  .timeline-item::before { right: 85px; }
  .timeline-item::after { right: 79px; }
  .timeline-date { font-size: 10px; padding-top: 5px; }
  .timeline-item h3 { font-size: 23px; }
  .timeline-title-line { gap: 5px; }
  .timeline-item .timeline-text { font-size: 16px; }
  .geography-layout { grid-template-columns: 1fr; }
  .map-viewport { height: 330px; }
  .places-panel { border-inline-start: 0; border-top: 1px solid var(--line); padding: 21px; }
  .place-list { max-height: 160px; }
  .concept-board { padding: 20px; }
  .concept-heading { gap: 10px; }
  .concept-root { font-size: 20px; }
  .concept-tabs { gap: 8px; padding-block: 20px; }
  .concept-tab { padding: 6px 12px; font-size: 15px; }
  .concept-panel { padding: 18px; }
  .concept-panel h3 { font-size: 24px; }
  .concept-panel p { font-size: 17px; }
  .reference-item { gap: 16px; padding-block: 19px; }
  .reference-item a, .reference-item h3 { font-size: 22px; }
  .download-banner { flex-direction: column; align-items: start; padding: 23px; gap: 20px; }
  .download-actions { width: 100%; }
  .download-banner .button { width: 100%; }
  .footer { grid-template-columns: 1fr auto; gap: 18px; padding-block: 28px; }
  .footer > p { grid-column: 1/-1; grid-row: 2; }
  .card-dialog { padding: 24px; max-height: calc(100dvh - 24px); }
  .card-dialog h2 { font-size: 30px; }
  .dialog-summary { font-size: 18px; }
}
@media (max-width: 390px) {
  .cards-grid { grid-template-columns: 1fr; }
  .topic-card { min-height: 210px; }
  .card-top { flex-direction: row; }
  .hero-actions .button { width: 100%; }
  .hero { padding-inline: 24px; }
  .hero-meta { gap: 6px; }
  .masthead-label { display: none; }
  .timeline-item { grid-template-columns: 60px minmax(0, 1fr); gap: 25px; }
  .timeline-item::before { right: 70px; }
  .timeline-item::after { right: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button.primary:hover:not(.unavailable), .topic-card:hover { transform: none; }
}
.migration-route { margin-top: 24px; padding: 20px 24px; background: #efe8d9; border-right: 3px solid var(--copper); }
.migration-route summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; color: var(--green); font-family: var(--heading-font); font-size: 15px; font-weight: 700; }
.migration-route summary::-webkit-details-marker { display: none; }
.migration-route p { color: var(--muted); margin-top: 12px; }
.route-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
.route-steps span { display: inline-flex; align-items: center; gap: 8px; color: var(--green); background: var(--white); border: 1px solid var(--line); padding: 6px 10px; font-weight: 700; }
.route-steps span:not(:last-child)::after { content: '←'; color: var(--copper); }
