/* IBM Plex Sans Arabic and Noto Naskh Arabic are self-hosted under the SIL Open Font License. */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/plex-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/plex-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/plex-arabic-500.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/plex-arabic-600.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/plex-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Noto Naskh Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/naskh-400.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Naskh Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/naskh-600.woff2") format("woff2");
}

:root {
  --ivory: #fbfaf5;
  --paper: #f4f2e9;
  --sheet: #fbfaf5;
  --ink: #192d34;
  --ink-soft: #65716e;
  --stone: #787c82;
  --line: #d6d4c9;
  --line-strong: #bdbdae;
  --clay: #35655f;
  --clay-deep: #2c514b;
  --slate: #192d34;
  --slate-soft: #35655f;
  --navy: #192d34;
  --mist: #eae8de;
  --confirmed: #1d5c40;
  --probable: #192d34;
  --possible: #9a6700;
  --unproven: #787c82;
  --support: #1d5c40;
  --oppose: #8a2424;
  --context: #35655f;
  --ok: #edfaef;
  --bad: #fcf0f1;
  --demo: #9a6700;
  --space-1: 0.35rem;
  --space-2: 0.7rem;
  --space-3: 1.15rem;
  --space-4: 1.8rem;
  --space-5: 3rem;
  --radius: 3px;
  --read: 42rem;
  --wide: 1280px;
  --motion: 160ms;
  --header: 4.2rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  font-size: 1.02rem;
  line-height: 1.75;
}
::selection { background: #d0ddd3; color: var(--ink); }
img, video { max-width: 100%; height: auto; }
a { color: var(--slate); text-underline-offset: 0.18em; transition: color var(--motion) ease; }
a:hover { color: var(--clay); }
:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; }
h1, h2, h3 { font-weight: 500; line-height: 1.45; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); margin: 0.15rem 0 0.7rem; }
.record h1, .reading > h1, .prose, .deck, .ancient-text, .reading-ar, .is-translation p {
  font-family: "Noto Naskh Arabic", "IBM Plex Sans Arabic", serif;
}
.kicker, .label, .mast, .site-footer, .media-stamp, .demo-chip, button, .meta, .help, .crumbs {
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}
h2 { font-size: 1.55rem; margin: 0 0 0.75rem; }
h3 { font-size: 1.08rem; margin: 0 0 0.45rem; }
p { margin: 0.35rem 0 0.85rem; }

.shell { width: min(var(--wide), calc(100% - 2.4rem)); margin-inline: auto; }
.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--ivory);
  padding: 0.45rem 0.75rem;
  z-index: 5;
}
.skip:focus { top: 0.6rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.latin { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kicker {
  margin: 0 0 0.35rem;
  color: var(--clay-deep);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.meta, .help { color: var(--ink-soft); font-size: 0.92rem; }
.deck { font-size: 1.2rem; line-height: 1.75; max-width: var(--read); color: var(--ink); }
.empty { color: var(--ink-soft); }

.mast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem 1.2rem;
  align-items: center;
  min-height: var(--header);
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
}
.brand-lock { display: flex; align-items: center; gap: 0.45rem; min-width: 0; }
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.brand-mark { width: 2rem; height: 2rem; display: block; color: var(--ink); --mark-line: var(--paper); }
.brand-seal { fill: var(--clay); }
.footer-brand { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.35rem; color: var(--ink); }
.footer-brand .brand-mark { width: 1.7rem; height: 1.7rem; }
.footer-brand strong { font-weight: 500; }
.brand-name { display: grid; line-height: 1.05; }
.brand-il { font-size: 1.2rem; font-weight: 600; letter-spacing: 0.04em; }
.brand-archive { font-weight: 400; font-size: 1.2rem; }
.brand-ar { color: var(--ink-soft); font-size: 0.75rem; margin-top: 0.15rem; }
.mast-nav { display: flex; flex-wrap: wrap; gap: 0.25rem; justify-content: center; }
.mast-nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; padding: 0.35rem 0.7rem; border-radius: 999px; }
.mast-nav a:hover { color: var(--clay); background: #eae8de; }
.mast-search { width: min(16rem, 28vw); }
.mast-search input, .search-hero input, .header-search input {
  width: 100%;
  background: #f3f1e9;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
}
.mast-menu { display: none; }

.demo-chip {
  display: inline-block;
  margin-inline-start: 0.45rem;
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--line-strong);
  color: var(--stone);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
  vertical-align: middle;
}

.hero-museum {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.6rem;
  align-items: center;
  margin: 0.4rem 0 1.4rem;
  padding: 1.4rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(29, 35, 39, 0.05);
  overflow: hidden;
}
.hero-panel {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0.6rem 0.4rem 0.6rem 0.2rem;
  background: transparent;
  color: var(--ink);
}
.hero-panel .kicker { color: var(--clay); }
.hero-panel .motto {
  color: var(--ink-soft);
  font-family: "Noto Naskh Arabic", "IBM Plex Sans Arabic", serif;
  font-size: 1.2rem;
  line-height: 1.85;
  max-width: 36rem;
}
.hero-panel h1 {
  color: var(--ink);
  font-family: "Noto Naskh Arabic", "IBM Plex Sans Arabic", serif;
  font-size: clamp(2.2rem, 4.2vw, 3.5rem);
  line-height: 1.25;
  max-width: 14ch;
}
.hero-panel .brand-mark { display: none; }
.search-hero { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.8rem; max-width: 34rem; }
.hero-panel .search-hero input {
  color: var(--ink);
  background: #f3f1e9;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 1rem;
}
.hero-panel .search-hero input::placeholder { color: #787c82; }
.hero-panel .search-hero button { background: #35655f; color: #fff; border-radius: 999px; padding-inline: 1.1rem; }
.hero-panel .search-hero button:hover { background: #2c514b; }
.hero-visual { position: relative; margin: 0; background: #eae8de; border-radius: 12px; overflow: hidden; min-height: 16rem; }
.hero-visual img, .hero-fallback { display: block; width: 100%; height: 22rem; object-fit: cover; object-position: 72% center; }
.hero-fallback { display: grid; place-items: center; }
.hero-fallback .brand-mark { width: 6rem; height: 6rem; color: #192d34; --mark-line: #f3f1e9; }
.hero-note {
  position: absolute;
  inset-inline-end: 0.7rem;
  bottom: 0.7rem;
  z-index: 1;
  margin: 0;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  color: #192d34;
  border-radius: 999px;
  font-size: 0.75rem;
}
.feature-dossier { align-items: stretch; }
.feature-visual { display: block; background: var(--mist); border: 1px solid var(--line); }
.feature-visual img { display: block; width: 100%; height: 100%; max-height: 22rem; object-fit: cover; }
.study-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.study-grid li { display: grid; gap: 0.25rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.study-thumb img { display: block; width: 100%; height: 9rem; object-fit: cover; background: var(--mist); }
.study-grid a { color: var(--ink); text-decoration: none; font-size: 1.12rem; }
.study-grid span { color: var(--ink-soft); }
.related-strip ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.8rem; margin: 0; padding: 0; }
.related-strip img { display: block; width: 100%; height: 8rem; object-fit: cover; background: var(--mist); }
.related-strip a { color: inherit; text-decoration: none; }
.dossier-stats { max-width: 28rem; }
.viewer-open { display: block; cursor: zoom-in; }
.gallery-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.7rem; }
.gallery-nav img { width: 4.4rem; height: 3.1rem; object-fit: cover; background: var(--mist); }
.lightbox { border: 0; padding: 0.6rem; background: var(--ink); color: var(--ivory); max-width: min(96vw, 70rem); max-height: 96vh; max-height: 96dvh; overflow: auto; box-sizing: border-box; }
.lightbox figure { margin: 0; }
.lightbox figcaption { padding: .75rem .35rem .2rem; color: var(--ivory); font-size: .9rem; line-height: 1.8; overflow-wrap: anywhere; }
.lightbox .figure-credit { display: block; color: #ded9cc; }
.public-archive .lightbox a { color: #e0c59b; }
.lightbox img { display: block; width: 100%; max-height: 70vh; max-height: 70dvh; object-fit: contain; background: var(--ivory); }
.lightbox button { margin-top: 0.45rem; }
.object-panel img, .hero-plate img, .study-thumb img, .feature-visual img { transition: transform var(--motion) ease; }
.object-panel:hover img, .study-thumb:hover img, .feature-visual:hover img { transform: scale(1.015); }
.hero-mark { width: 7.5rem; height: 7.5rem; }
.hero-mark .brand-mark { width: 100%; height: 100%; }
.dossier-facts { margin: 0.6rem 0 0.8rem; max-width: 46rem; }
.dossier-facts div { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.3rem 1.1rem; padding: 0.28rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.dossier-facts dt { color: var(--ink-soft); }
.dossier-facts dd, .date-list dd, .tombstone dd, .evidence-sheet dd, .meta-list dd { margin: 0; min-width: 0; overflow: visible; }
.note-line { display: block; margin-top: 0.15rem; color: var(--ink-soft); }
.record, .record > *, .record-head, .reading { min-width: 0; max-width: 100%; }
.evidence-sheet { margin: 0.35rem 0 0; }
.evidence-sheet div { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.25rem 0.8rem; padding: 0.28rem 0; align-items: start; }
.evidence-sheet dt { color: var(--stone); font-size: 0.82rem; }
.object-hero .media-frame { margin-top: 0; }
@media (min-width: 1100px) {
  .record-study, .record-research_file { display: grid; grid-template-columns: 14rem minmax(0, 1fr); column-gap: 2rem; align-items: start; }
  .record-study > .toc, .record-research_file > .toc { grid-column: 1; grid-row: 1 / span 40; position: sticky; top: 1rem; }
  .record-study > :not(.toc), .record-research_file > :not(.toc) { grid-column: 2; }
  .toc-details > ol { display: block !important; }
  .toc summary { display: none; }
  .toc a.is-current { color: var(--clay-deep); border-inline-start: 2px solid var(--clay); padding-inline-start: 0.45rem; }
}
.time-scroll { display: flex; gap: 0; width: 100%; min-width: 0; overflow-x: auto; padding: 0; border-bottom: 2px solid var(--ink); align-items: stretch; }
.era { min-width: 17rem; flex: 1 0 17rem; margin: 0; padding: 0.85rem 1rem 1.15rem; border-inline-end: 1px solid var(--line); }
.era:nth-child(even) { background: var(--sheet); }
.era:target { background: #f4ece4; }
.era:target h2 { color: var(--clay-deep); }
.era h2 { font-size: 1rem; }
.time-when { margin: 0; color: var(--clay-deep); font-size: 0.92rem; }
.time-bar { display: block; height: 3px; width: calc(18px + var(--span) * 0.35px); max-width: 100%; background: var(--clay); margin: 0.25rem 0 0.45rem; }
.era-jump { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0 0 1rem; }
.era-jump a { text-decoration: none; color: var(--slate); }
.method-path {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 1.7rem 0 0;
  counter-reset: step;
}
.method-path::before {
  content: "";
  position: absolute;
  top: 0.2rem;
  inset-inline: 1.5rem;
  height: 1px;
  background: var(--ink);
}
.method-path li { position: relative; min-width: 0; margin: 0; padding: 0.7rem 0.75rem 0; border: 0; }
.method-path li::before {
  content: counter(step, decimal-leading-zero);
  counter-increment: step;
  position: absolute;
  top: -1.55rem;
  inset-inline-end: 0.75rem;
  z-index: 1;
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 0.72rem;
  line-height: 1;
}
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; margin: 0.6rem 0 0; padding: 0; }
.social a { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ink); text-decoration: none; font-size: 0.88rem; }
.social svg { width: 1rem; height: 1rem; fill: currentColor; }
.social a:hover { color: var(--clay); }
@media (max-width: 900px) {
  .time-scroll { flex-direction: column; overflow: visible; border-bottom: 0; border-inline-start: 2px solid var(--ink); padding-inline-start: 0; }
  .era { min-width: 0; flex-basis: auto; border-inline-end: 0; padding-inline-start: 1rem; }
  .dossier-facts div, .evidence-sheet div, .date-list div, .tombstone div, .meta-list div { grid-template-columns: 1fr; }
  .method-path { grid-template-columns: 1fr; padding: 0; }
  .method-path::before { display: none; }
  .method-path li { padding: 0 0 1.15rem; padding-inline-start: 2.5rem; }
  .method-path li::before { top: 0.1rem; inset-inline-end: auto; inset-inline-start: 0; }
  .method-path li::after {
    content: "";
    position: absolute;
    top: 1.85rem;
    bottom: 0;
    inset-inline-start: 0.78rem;
    width: 1px;
    background: var(--ink);
  }
  .method-path li:last-child::after { display: none; }
  .toc summary { display: block; }
  .toc-details:not([open]) > ol { display: none; }
}
.hero-mark .brand-seal { fill: var(--clay); }
.motto { font-size: 1.22rem; max-width: 38rem; }
.search-hero { display: flex; gap: 0.8rem; align-items: end; max-width: 36rem; margin-top: 1.2rem; }
.search-hero input { flex: 1; font-size: 1.05rem; }
.search-hero button { border-radius: var(--radius); }

.atlas { margin: 2.2rem 0 0.5rem; }
.atlas ol { list-style: none; margin: 0; padding: 0; }
.atlas li { border-top: 1px solid var(--line); }
.atlas a {
  display: grid;
  grid-template-columns: 2.2rem minmax(7rem, 11rem) 1fr;
  gap: 0.6rem 1rem;
  align-items: baseline;
  padding: 0.85rem 0;
  color: inherit;
  text-decoration: none;
}
.atlas a:hover strong { color: var(--clay); }
.atlas .num { color: var(--stone); font-variant-numeric: tabular-nums; }
.atlas strong { font-weight: 500; font-size: 1.15rem; }
.atlas a > span:last-child { color: var(--ink-soft); }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(12rem, 0.7fr);
  gap: 1.5rem 2.5rem;
  margin: 2.6rem 0;
  padding: 1.4rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.feature h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin: 0.2rem 0 0.6rem; }
.feature h2 a { color: inherit; text-decoration: none; }
.feature h2 a:hover { color: var(--clay); }
.stat-list { margin: 0; }
.stat-list div { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.stat-list dt { color: var(--ink-soft); }
.stat-list dd { margin: 0; font-variant-numeric: tabular-nums; }

.home-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem 3rem;
  align-items: start;
}
.object-panel {
  margin: 0;
  background: var(--sheet);
  border: 1px solid var(--line);
}
.object-panel img { display: block; width: 100%; background: var(--ivory); }
.object-panel figcaption { padding: 0.8rem 0.95rem 1rem; }
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.ledger a { color: var(--ink); text-decoration: none; font-size: 1.08rem; }
.ledger a:hover { color: var(--clay); }
.ledger .kind {
  display: inline-block;
  margin-inline-end: 0.45rem;
  color: var(--clay-deep);
  font-size: 0.75rem;
}
.revisions-home { border-inline-start: 1px solid var(--line-strong); padding-inline-start: 1.2rem; }

.prose, .workshop { width: min(var(--read), 100%); }
.prose { font-family: "Noto Naskh Arabic", "IBM Plex Sans Arabic", serif; font-size: 1.16rem; line-height: 2; }
.prose h2 { margin-top: 2rem; scroll-margin-top: 1.2rem; }
.prose h2::before {
  content: "";
  display: block;
  width: 1.6rem;
  height: 1px;
  background: var(--clay);
  margin-bottom: 0.45rem;
}
.source-block { margin: 1.2rem 0; padding: 0.2rem 0 0.2rem 0; }
.source-block.ancient, .ancient-text {
  font-family: "Noto Naskh Arabic", "IBM Plex Sans Arabic", serif;
  font-size: 1.2rem;
  line-height: 2;
}
.source-block.ancient { border-inline-start: 2px solid var(--clay); padding-inline-start: 1rem; }
.source-block.modern { border-inline-start: 2px solid var(--slate); padding-inline-start: 1rem; color: var(--ink-soft); }
.source-kicker { margin: 0 0 0.3rem; font-size: 0.75rem; letter-spacing: 0.06em; color: var(--clay-deep); font-family: "IBM Plex Sans Arabic", sans-serif; }
blockquote { margin: 0.6rem 0; }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.3rem 0.45rem; color: var(--stone); font-size: 0.86rem; margin: 0 0 0.9rem; }
.crumbs a { color: var(--slate-soft); text-decoration: none; }
.banner-demo {
  margin: 0 0 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--demo);
  font-size: 0.9rem;
  background: transparent;
}
.names { display: flex; flex-wrap: wrap; gap: 0.25rem 0.7rem; color: var(--ink-soft); }
.record-head { max-width: 46rem; margin-bottom: 1.2rem; }
.toc { margin: 0.4rem 0 1.6rem; }
.toc ol { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; list-style: none; margin: 0.3rem 0 0; padding: 0; }
.toc a { text-decoration: none; color: var(--slate); }
.toc a:hover { color: var(--clay); }

.tombstone, .date-list { border-top: 1px solid var(--line); padding-top: 0.8rem; }
.tombstone dl, .date-list { margin: 0; }
.tombstone div, .date-list div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.25rem 1.1rem;
  align-items: start;
  padding: 0.38rem 0;
  border-bottom: 1px solid var(--line);
}
.tombstone dt, .date-list dt { color: var(--ink-soft); }
.tombstone dd, .date-list dd { margin: 0; }
.record-artifact .media-frame, .record-text .media-frame { margin-top: 0.4rem; }

.media-frame {
  margin: 1rem 0 1.4rem;
  background: var(--sheet);
  border: 1px solid var(--line);
}
.media-frame img, .media-frame video { display: block; width: 100%; max-height: 34rem; object-fit: contain; background: var(--ivory); }
.media-stamp {
  margin: 0;
  padding: 0.55rem 0.9rem;
  background: var(--ivory);
  color: var(--clay-deep);
  border-top: 1px solid var(--line-strong);
  font-size: 0.95rem;
  font-weight: 500;
}
.media-stamp.is-source { color: var(--slate); font-weight: 400; }
.corpus-line, .corpus, .line-nav { scroll-margin-top: 1.2rem; }
.line-nav { display: flex; justify-content: space-between; gap: 0.8rem; margin: 0.4rem 0 0.8rem; font-size: 0.92rem; }
.line-nav a { text-decoration: none; }
.media-frame figcaption { padding: 0.75rem 0.95rem 0.95rem; }
.media-flag {
  display: inline-block;
  margin: 0 0 0.35rem;
  color: var(--clay-deep);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.claim {
  margin: 0 0 1.1rem;
  padding: 0.9rem 0 0.2rem;
  border-top: 1px solid var(--line-strong);
  background: transparent;
}
.claim.muted { opacity: 1; }
.claim-meta, .names { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; align-items: center; }
.certainty, .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.05rem 0;
  background: transparent;
  border-radius: 0;
  font-size: 0.82rem;
  letter-spacing: 0;
}
.certainty::before, .badge.confirmed::before, .badge.probable::before, .badge.possible::before, .badge.unproven::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border: 1.5px solid currentColor;
  flex: 0 0 auto;
}
.badge.confirmed, .certainty.confirmed { color: var(--confirmed); }
.badge.confirmed::before, .certainty.confirmed::before { background: currentColor; }
.badge.probable, .certainty.probable { color: var(--probable); }
.badge.probable::before, .certainty.probable::before { border-radius: 50%; }
.badge.possible, .certainty.possible { color: var(--possible); }
.badge.possible::before, .certainty.possible::before { transform: rotate(45deg); }
.badge.unproven, .certainty.unproven { color: var(--unproven); }
.badge.unproven::before, .certainty.unproven::before { background: transparent; }
details summary {
  cursor: pointer;
  color: var(--slate);
  font-weight: 500;
  padding: 0.35rem 0;
}
details summary:hover { color: var(--clay); }
.evidence {
  margin: 0.7rem 0;
  padding: 0.75rem 0 0.75rem 0.9rem;
  border-inline-start: 2px solid var(--line-strong);
}
.evidence-support { border-inline-start-color: var(--support); }
.evidence-oppose { border-inline-start-color: var(--oppose); }
.evidence-context { border-inline-start-color: var(--context); }
.evidence-role { margin: 0 0 0.25rem; font-size: 0.78rem; letter-spacing: 0.06em; }
.evidence-support .evidence-role { color: var(--support); }
.evidence-oppose .evidence-role { color: var(--oppose); }
.evidence-context .evidence-role { color: var(--context); }

.relation-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.relation {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 0.35rem 0.7rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.relation .verb { color: var(--ink-soft); }
.relation a { color: var(--ink); text-decoration: none; }
.relation a:hover { color: var(--clay); }
.relation .note { grid-column: 1 / -1; color: var(--ink-soft); font-size: 0.92rem; }

.segments, .corpus-list { list-style: none; margin: 0; padding: 0; }
.segments li, .corpus-line {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 0.4rem 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}
.line-anchor {
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  color: var(--clay-deep);
  font-size: 1.05rem;
}
.corpus {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.6rem;
}
.corpus-anchor {
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 0.9;
  margin: 0;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.corpus-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.corpus-cols > div { padding-top: 0.45rem; border-top: 2px solid var(--line); }
.corpus-cols .is-original { border-top-color: var(--clay); }
.corpus-cols .is-translit { border-top-color: var(--slate); }
.corpus-cols .is-translation { border-top-color: var(--ink); }
.time-thumb { display: block; width: 4.5rem; height: 3rem; object-fit: cover; margin-top: 0.35rem; background: var(--mist); }
.corpus-cols p { margin: 0.2rem 0 0; }
.label { display: block; color: var(--stone); font-size: 0.75rem; letter-spacing: 0.06em; font-family: "IBM Plex Sans Arabic", sans-serif; }

.index-list { list-style: none; padding: 0; margin: 0; }
.index-list li { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.index-list ul { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.index-list ul li { border-bottom: 0; padding: 0.22rem 0; }
.index-list span { display: block; color: var(--ink-soft); }
.facets { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; }
.facets a { text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; margin-top: 1.4rem; font-family: var(--ui); }
.participate-note { margin-top: 2.2rem; font-size: 0.92rem; }
.privacy-note { margin: 1rem 0 1.2rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.privacy-note h2 { font-size: 1.05rem; }
.result-kind { color: var(--clay-deep); font-size: 0.75rem; margin-inline-end: 0.4rem; }

.timeline { list-style: none; margin: 0.2rem 0 0; padding: 0; border-inline-start: 1px solid var(--clay); }
.timeline li { border-bottom: 0; padding: 0.15rem 0 1rem; padding-inline-start: 1rem; position: relative; }
.timeline li::before {
  content: "";
  position: absolute;
  inset-inline-start: -5px;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
}
.era:nth-child(even) .timeline li::before { background: var(--sheet); }
.era:target .timeline li::before { background: #f4ece4; }
.era h2 { color: var(--slate); }

.footnotes { border-top: 1px solid var(--line); margin-top: 1.4rem; padding-top: 0.6rem; }
.footnotes ol { margin: 0; padding-inline-start: 1.2rem; }
.footnotes li { margin: 0.7rem 0; scroll-margin-top: 1rem; }
.fnref { text-decoration: none; scroll-margin-top: 1rem; color: var(--clay-deep); }
.fnref sup { font-size: 0.72em; }
.fn-back { margin-inline-end: 0.35rem; font-size: 0.82rem; }
.cite { border-top: 1px solid var(--ink); margin-top: 2rem; padding-top: 1rem; }
.cite p { max-width: var(--read); }

.method-key { margin-top: 2rem; }
.method-key ol, .degrees { list-style: none; margin: 0; padding: 0; }
.degrees {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.degrees li { min-width: 0; padding: 0.75rem 0.85rem; border-inline-start: 1px solid var(--line); }
.degrees li:first-child { border-inline-start: 0; }

.site-footer {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem 2rem;
  margin: var(--space-5) calc(50% - 50vw) 0;
  padding: 2rem calc(50vw - 50%) 2.6rem;
  background: var(--navy);
  color: #d5e0e4;
}
.site-footer a { color: var(--ivory); text-decoration: none; }
.site-footer a:hover { color: #e7c3b0; }
.site-footer .brand-mark { color: var(--ivory); --mark-line: var(--navy); }
.site-footer strong, .site-footer .help { color: #d5e0e4; }
.is-admin table { width: 100%; border-collapse: collapse; }
.is-admin th, .is-admin td { text-align: start; padding: 0.45rem 0.35rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }

label, .check { display: grid; gap: 0.3rem; }
.check { grid-template-columns: auto 1fr; align-items: start; }
.stack { display: grid; gap: 0.85rem; margin: 1rem 0 1.4rem; }
.years { display: grid; gap: 0.85rem; grid-template-columns: 1fr 1fr; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1rem; }
legend { padding-inline: 0.3rem; }
input, textarea, select, button { font: inherit; color: inherit; }
input, textarea, select {
  width: 100%;
  background: var(--sheet);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
}
textarea { min-height: 7rem; resize: vertical; }
textarea.tall { min-height: 16rem; }
button, .button {
  display: inline-block;
  width: auto;
  background: var(--ink);
  color: var(--ivory);
  border: 0;
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  min-height: 2.6rem;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--slate); color: var(--ivory); }
button.quiet { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
button.quiet:hover { border-color: var(--clay); color: var(--clay); background: transparent; }
.inline-form { display: inline-block; margin-inline-end: 0.4rem; }
.flash { padding: 0.75rem 0; margin: 0.6rem 0 1rem; border-bottom: 1px solid var(--line); }
.flash.ok { color: var(--confirmed); }
.flash.bad { color: var(--clay-deep); }
.filters details { margin-top: 0.6rem; }
.filters summary { font-size: 0.92rem; }

.admin-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
  background: var(--ink);
  color: var(--ivory);
  margin: 0 calc(50% - 50vw);
  padding: 0.55rem calc(50vw - 50%);
  font-size: 0.92rem;
}
.admin-brand { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--ivory); text-decoration: none; }
.admin-bar .brand-mark { width: 1.35rem; height: 1.35rem; color: var(--ivory); --mark-line: var(--ink); }
.admin-bar .brand-seal { fill: #c48774; }
.admin-bar .admin-brand:hover { color: var(--ivory); }
.admin-bar a { color: var(--ivory); text-decoration: none; }
.admin-bar a:hover { color: #e7c7bb; }
.admin-bar nav { display: flex; flex-wrap: wrap; gap: 0.55rem 0.9rem; }
.admin-bar form { margin-inline-start: auto; }
.admin-bar button { background: transparent; color: var(--ivory); border: 1px solid rgba(244, 239, 230, 0.4); }
.is-admin { background: #f7f4ee; }
.is-admin .mast { min-height: 3.4rem; margin-bottom: 0.8rem; }
.is-admin h1 { font-size: 1.7rem; }
.is-admin .prose, .is-admin .workshop { width: min(68rem, 100%); }

.archive-map, .cards { display: grid; gap: 0.8rem; }
.archive-map { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.archive-map a, .cards article {
  display: block;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  background: transparent;
}
.meta-list { margin: 0.4rem 0 0; }
.meta-list div { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.35rem; align-items: start; }
.meta-list dt { color: var(--ink-soft); }
.meta-list dd { margin: 0; }
.link-list, .pending { list-style: none; padding: 0; margin: 0; }
.link-list li, .pending li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.link-list span, .pending span { display: block; color: var(--ink-soft); }
.media-flag { font-family: "IBM Plex Sans Arabic", sans-serif; }
.quote { white-space: pre-wrap; }

@media (max-width: 900px) {
  .shell { width: min(100% - 1.4rem, var(--wide)); }
  .mast { grid-template-columns: 1fr auto; }
  .mast-nav, .mast-search { display: none; }
  .mast-menu { display: block; }
  .mast-menu summary { list-style: none; cursor: pointer; padding: 0.4rem 0; }
  .mast-menu summary::-webkit-details-marker { display: none; }
  .mast-menu[open] { grid-column: 1 / -1; }
  .mast-menu nav { display: grid; gap: 0.35rem; padding-bottom: 0.6rem; }
  .mast-menu a { color: var(--ink); text-decoration: none; padding: 0.35rem 0; }
  .hero, .feature, .home-split, .site-footer, .corpus-cols, .degrees { grid-template-columns: 1fr; }
  .degrees li { border-inline-start: 0; border-top: 1px solid var(--line); }
  .degrees li:first-child { border-top: 0; }
  .hero-mark { width: 4.2rem; height: 4.2rem; }
  .atlas a { grid-template-columns: 2rem 1fr; }
  .atlas a > span:last-child { grid-column: 2; }
  .relation { grid-template-columns: 1fr; }
  .tombstone div, .date-list div, .years, .meta-list div { grid-template-columns: 1fr; }
  .revisions-home { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); padding-top: 1rem; }
  .search-hero { flex-direction: column; align-items: stretch; }
  button, .button, summary, input, select { min-height: 2.75rem; }
}

.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; }
.robots-view { white-space: pre-wrap; background: var(--sheet); border: 1px solid var(--line); padding: 0.7rem; font-size: 0.88rem; }
.is-admin section { margin: 1.4rem 0; }
@media (max-width: 900px) {
  .control-grid { grid-template-columns: 1fr; }
  .hero-museum { grid-template-columns: 1fr; }
  .hero-visual img, .hero-fallback { height: 14rem; }
  .hero-panel h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
}

.is-admin { background: #eae8de; color: #192d34; }
.is-admin .desk {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  grid-template-rows: 48px minmax(0, 1fr);
  min-height: 100vh;
  align-items: start;
}
.desk-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  height: 48px;
  padding: 0 0.9rem;
  background: #192d34;
  color: #eae8de;
  position: sticky;
  top: 0;
  z-index: 40;
}
.desk-bar-brand, .desk-bar-link { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; }
.desk-bar-brand .brand-mark { width: 1.25rem; height: 1.25rem; color: #fff; --mark-line: #192d34; }
.desk-bar-brand .brand-seal { fill: #72aee6; }
.desk-bar-title { color: #bdbdae; font-size: 0.86rem; }
.desk-bar form { margin-inline-start: auto; }
.desk-bar button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 4px; min-height: 2rem; padding: 0.2rem 0.7rem; }
.desk-bar button:hover { background: #2c3338; color: #fff; }
.desk-nav {
  position: sticky;
  top: 48px;
  height: calc(100vh - 48px);
  overflow: auto;
  background: #192d34;
  color: #eae8de;
  padding: 0.8rem 0.7rem 1.4rem;
}
.desk-brand { display: none; }
.desk-group { margin: 1rem 0.45rem 0.3rem; color: #72aee6; font-size: 0.72rem; letter-spacing: 0.04em; }
.desk-nav a { display: block; color: #eae8de; text-decoration: none; padding: 0.38rem 0.6rem; border-radius: 4px; }
.desk-nav a.is-here { background: #35655f; color: #fff; }
.desk-nav a:hover { background: #2c3338; color: #fff; }
.desk-main { padding: 1.2rem 1.4rem 3rem; min-width: 0; background: #eae8de; min-height: calc(100vh - 48px); }
.is-admin .desk-main > section,
.is-admin .desk-main .workshop {
  background: #fff;
  border: 1px solid #d6d4c9;
  border-radius: 8px;
  padding: 1rem 1.05rem 1.1rem;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}
.is-admin button, .is-admin .button { background: #35655f; border-color: #35655f; border-radius: 4px; }
.is-admin button:hover, .is-admin .button:hover { background: #2c514b; }
.is-admin button.quiet { background: #f3f1e9; color: #35655f; border: 1px solid #35655f; }
.is-admin button.quiet:hover { background: #eae8de; color: #2c514b; }
.is-admin input, .is-admin textarea, .is-admin select { background: #fff; border: 1px solid #8c8f94; border-radius: 4px; }
.is-admin .flash { border-radius: 4px; }
.desk-stats { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; margin: 0 0 1rem; padding: 0; }
.desk-stats a { display: block; background: #fff; border: 1px solid #d6d4c9; border-radius: 8px; color: #192d34; text-decoration: none; padding: 0.85rem 0.9rem; box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.desk-stats a:hover { border-color: #35655f; color: #192d34; }
.desk-stats strong { display: block; font-size: 1.7rem; line-height: 1.1; color: #192d34; }
.desk-stats span { color: #65716e; font-size: 0.86rem; }
.desk-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.desk-filters { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr auto; gap: 0.7rem; align-items: end; margin: 0.6rem 0 1rem; }
.desk-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #d6d4c9; border-radius: 8px; overflow: hidden; }
.desk-table th, .desk-table td { text-align: start; padding: 0.6rem 0.7rem; border-bottom: 1px solid #eae8de; vertical-align: middle; }
.desk-table tr:hover td { background: #f3f1e9; }
.desk-table a { color: #35655f; font-weight: 600; text-decoration: none; }
.desk-jump { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 1rem; }
.desk-jump a { color: #35655f; text-decoration: none; background: #fff; border: 1px solid #d6d4c9; border-radius: 999px; padding: 0.2rem 0.65rem; }
.desk-fold { margin: 0.7rem 0; border-top: 1px solid #d6d4c9; }
.desk-thumb { width: 4.2rem; height: 3rem; object-fit: cover; background: #eae8de; display: block; border-radius: 4px; }
.desk-assets { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.7rem; margin: 0 0 1rem; padding: 0; }
.desk-assets img { width: 100%; height: 6rem; object-fit: cover; background: #eae8de; border-radius: 6px; }
.is-admin:not(:has(.desk)) main { min-height: 100vh; display: grid; place-items: center; }
.is-admin:not(:has(.desk)) .workshop { width: min(26rem, calc(100% - 2rem)); background: #fff; border: 1px solid #d6d4c9; border-radius: 12px; padding: 1.4rem; box-shadow: 0 12px 40px rgba(0,0,0,.08); }
@media (max-width: 900px) {
  .is-admin .desk { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; }
  .desk-nav { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 0.15rem 0.35rem; align-items: center; }
  .desk-brand, .desk-nav form { width: 100%; }
  .desk-group { width: 100%; margin-bottom: 0; }
  .desk-stats, .desk-filters { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

.read-tools { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 0.8rem; position: sticky; top: 4.5rem; z-index: 4; background: #f3f1e9; padding: 0.35rem 0; }
.read-tools button { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; min-height: 2rem; padding: 0.15rem 0.7rem; }
.read-tools button.is-on { background: var(--ink); color: var(--ivory); }
.text-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: 0.8rem; align-items: start; }
.corpus-line { cursor: pointer; scroll-margin-top: 8.5rem; border-inline-start: 3px solid transparent; }
.corpus-line.is-active { background: #e5ece5; border-inline-start-color: var(--clay); }
.corpus-line:has(.line-anchor:focus-visible) { outline: 2px solid var(--slate); outline-offset: 2px; }
.line-anchor:focus-visible { outline: none; }
.line-panel { position: sticky; top: 5rem; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem; max-height: 70vh; overflow: auto; }
.line-sheet h3, .line-sheet h4 { margin: 0.6rem 0 0.3rem; }
.line-sheet li { margin: 0.45rem 0; }
.path-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.path-grid section { border-top: 1px solid var(--line); padding-top: 0.4rem; }
.path-grid ul { margin: 0.2rem 0 0; padding-inline-start: 1.1rem; }
.catalog-note { color: var(--ink-soft); font-size: 0.92rem; }
.read-original .is-translit, .read-original .is-translation,
.read-translit .is-original, .read-translit .is-translation,
.read-translation .is-original, .read-translation .is-translit,
.read-original-translit .is-translation,
.read-original-translation .is-translit { display: none; }
@media (max-width: 800px) {
  .text-stage, .path-grid { grid-template-columns: 1fr; }
  .line-panel { position: sticky; top: auto; bottom: 0; max-height: 48vh; }
}

.line-panel, .text-stage, .corpus-line { transition: opacity 220ms ease, transform 220ms ease, background-color 220ms ease, border-color 220ms ease; }
.line-panel.is-enter { opacity: 0; transform: translateY(8px); }
.text-stage.is-fading { opacity: 0.45; }

@media (min-width: 960px) {
  .record-artifact {
    display: grid;
    grid-template-columns: minmax(16rem, 0.9fr) minmax(0, 1.1fr);
    column-gap: 1.5rem;
    align-items: start;
  }
  .record-artifact > * { grid-column: 2; min-width: 0; }
  .record-artifact > .object-hero {
    grid-column: 1;
    grid-row: 1 / span 80;
    position: sticky;
    top: 5.1rem;
    align-self: start;
  }
}
body:not(.is-admin) .record-artifact .media-frame img {
  width: 100%;
  max-height: min(58vh, 34rem);
  object-fit: contain;
  background: #f3f1e9;
}
.shot-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.55rem; }
.shot-nav:has(button:only-child) { display: none; }
.shot-nav button { padding: 0; border: 1px solid var(--line); background: #fff; }
.shot-nav button[aria-selected="true"] { border-color: var(--clay); }
.shot-nav img { width: 3.4rem; height: 2.5rem; object-fit: cover; display: block; }

.path-tabs, .place-index { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.path-tabs {
  position: sticky;
  top: 4.6rem;
  z-index: 4;
  background: #fff;
  padding: 0.4rem 0;
}
.path-tabs button, .place-index button, .era-jump a {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  min-height: 2rem;
  padding: 0.15rem 0.75rem;
  text-decoration: none;
}
.path-tabs button[aria-selected="true"],
.place-index button[aria-selected="true"],
.era-jump a[aria-current="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.path-stage { border-top: 1px solid var(--line); padding-top: 0.8rem; }

.dossier-layout, .place-stage { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 900px) {
  .dossier-layout, .place-stage { grid-template-columns: minmax(14rem, 0.85fr) minmax(0, 1.15fr); }
  .claim-rail, .place-index { position: sticky; top: 5rem; }
}
.claim-rail { display: grid; gap: 0.35rem; }
.claim-rail button {
  display: grid;
  gap: 0.25rem;
  width: 100%;
  text-align: start;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-inline-start: 3px solid transparent;
  padding: 0.55rem 0.45rem;
}
.claim-rail button[aria-selected="true"] { background: #e5ece5; border-inline-start-color: var(--clay); }
.claim-stage .claim { margin: 0; border-top: 0; }

.time-scroll.is-filtered .era.is-quiet .timeline,
.time-scroll.is-filtered .era.is-quiet .time-when,
.time-scroll.is-filtered .era.is-quiet .time-bar { display: none; }
.time-scroll.is-filtered .era.is-open { flex-basis: 24rem; }
.timeline li:hover .time-thumb,
.timeline li:focus-within .time-thumb { width: 100%; height: 7.5rem; }
.time-thumb { transition: width 220ms ease, height 220ms ease; }

.read-progress { position: sticky; top: 4.55rem; z-index: 4; height: 2px; background: #d6d4c9; }
.read-progress span { display: block; height: 100%; background: var(--clay); transform: scaleX(0); transform-origin: 100% 50%; }
@media (min-width: 1100px) {
  .record-study > .read-progress,
  .record-study > .editorial-plate { grid-column: 1 / -1; }
}

body:not(.is-admin) .atlas ol { grid-template-columns: 1fr 1fr; gap: 0 1.4rem; }
body:not(.is-admin) .atlas a {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  min-height: 0;
  padding: 0.8rem 0.2rem;
  background: transparent;
  border: 0;
  border-top: 1px solid #d6d4c9;
  border-radius: 0;
  box-shadow: none;
}
body:not(.is-admin) .atlas a > .num { grid-row: 1 / span 2; align-self: start; }
body:not(.is-admin) .atlas strong,
body:not(.is-admin) .atlas a > span:last-child { grid-column: 2; }
body:not(.is-admin) .atlas a:hover,
body:not(.is-admin) .atlas a:focus-visible { transform: none; background: rgba(53, 101, 95, 0.06); }
.plate-row { align-items: end; }
.plate-row a { position: relative; background: transparent; border: 0; border-radius: 0; overflow: hidden; }
.plate-row a:hover { border-color: transparent; }
.plate-row img { height: 15rem; transition: transform 240ms ease; }
.plate-row a:nth-child(1) img { height: 18rem; object-position: 72% center; }
.plate-row a:nth-child(2) img { height: 13rem; object-position: center 30%; }
.plate-row a:nth-child(3) img { height: 16rem; object-position: 18% center; }
.plate-row a:hover img, .plate-row a:focus-visible img { transform: scale(1.04); }
.plate-row span {
  position: absolute;
  inset-inline: 0.55rem;
  bottom: 0.55rem;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.25rem 0.55rem;
}
body:not(.is-admin) .study-grid { grid-template-columns: 1fr; gap: 0; }
body:not(.is-admin) .study-grid li {
  display: block;
  border: 0;
  border-bottom: 1px solid #d6d4c9;
  border-radius: 0;
  background: transparent;
  padding: 0;
  overflow: visible;
}
body:not(.is-admin) .study-row {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem 0;
  color: #192d34;
  text-decoration: none;
}
body:not(.is-admin) .study-row img { width: 7.2rem; height: 4.8rem; object-fit: cover; transition: object-position 240ms ease; }
body:not(.is-admin) .study-row:hover img,
body:not(.is-admin) .study-row:focus-visible img { object-position: 70% center; }
body:not(.is-admin) .study-row strong { display: block; color: #192d34; font-size: 1.15rem; }
body:not(.is-admin) .study-row span span { display: block; color: #65716e; font-size: 0.92rem; }
@media (min-width: 900px) {
  .feature-object .feature-visual { order: 2; }
}
@media (prefers-reduced-motion: no-preference) {
  .reveal.is-in { animation: rise 240ms ease both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 800px) {
  body:not(.is-admin) .record-artifact .media-frame img,
  .editorial-plate img,
  .plate-row img,
  .plate-row a:nth-child(1) img,
  .plate-row a:nth-child(2) img,
  .plate-row a:nth-child(3) img { max-height: 14rem; height: 12rem; }
  .record-artifact { display: block; }
  .record-artifact > .object-hero { position: static; }
  .dossier-layout, .place-stage { grid-template-columns: 1fr; }
  .claim-rail, .place-index, .path-tabs { position: static; }
  body:not(.is-admin) .atlas ol,
  body:not(.is-admin) .study-row { grid-template-columns: 1fr; }
}
body:not(.is-admin) .study-row:not(:has(img)) { grid-template-columns: 1fr; }
.hall { margin: 1.6rem 0; }
.desk-editor { display: grid; gap: 0.45rem; margin: 0.4rem 0 0.8rem; }
.desk-editor-label { margin: 0; font-weight: 600; }
.desk-editor-bar { display: flex; flex-wrap: wrap; gap: 0.35rem; position: sticky; top: 3.2rem; z-index: 2; background: #f3f1e9; padding: 0.35rem 0; }
.desk-editor-bar button { background: #fff; color: #192d34; border: 1px solid #d6d4c9; border-radius: 999px; min-height: 2rem; padding: 0.1rem 0.7rem; }
.desk-editor-bar button:hover { border-color: #35655f; color: #35655f; }
.desk-prose { min-height: 18rem; line-height: 1.7; font-size: 1.02rem; }
.desk-editor-foot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.8rem; align-items: start; }
.desk-editor-status { margin: 0; color: #65716e; font-size: 0.86rem; }
.desk-outline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.7rem; }
.desk-outline button { background: transparent; border: 0; color: #35655f; padding: 0; text-align: start; }
@media (max-width: 700px) {
  .desk-editor-foot { grid-template-columns: 1fr; }
}

/* A site photograph stays with the selected place and its source caption. */
.place-detail .article-cover { position:static; width:100%; max-width:32rem; margin:1rem 0; }
.place-detail .article-cover img { width:100%; height:14rem; object-fit:contain; }
