/* Inherit the site's established type, background, text, line and gold variables. */
.history-page { line-height: 1.65; }
.history-page h1, .history-page h2, .history-page h3, .history-page h4 { line-height: 1.3; }
.history-page h1, .history-page h2 { font-family: 'Libre Baskerville', Georgia, serif; font-weight: 400; }
.history-page h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.history-page h3 { font-size: 1rem; }
.history-page h4 { font-size: .9rem; }
.history-page p { max-width: 82ch; }
.history-page button, .history-page input, .history-page select { font: inherit; min-height: 44px; color: var(--text); }
.history-page button { border: 1px solid var(--line); background: #201e1a; border-radius: .3rem; padding: .55rem .85rem; cursor: pointer; }
.history-page button:hover { border-color: var(--gold); }
.history-page :is(a, button, input, select, summary, h2):focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.history-header, .history-footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.5rem clamp(1rem, 4vw, 4rem); border-bottom: 1px solid var(--line); }
.history-header nav { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; font-size: .85rem; }
.history-header .brand { flex-shrink: 0; }
.history-page main {
  --history-content-width: min(100% - 3rem, 1440px);
}
.history-page main > section:not(.history-map-section) {
  width: var(--history-content-width);
  margin: 2.5rem auto;
  padding-block: 1rem;
  min-width: 0;
}
.history-map-section > :not(.history-intro) {
  width: var(--history-content-width);
  margin-inline: auto;
}
.history-map-tools { padding-block: 1.25rem .5rem; }
.history-map-instructions { color: var(--muted); font-size: .9rem; margin-bottom: .25rem; }
.history-map-disclosure { margin-top: .65rem; }
.history-map-disclosure > summary { cursor: pointer; padding-block: .55rem; color: var(--gold); font-size: .9rem; }
.history-search-row { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }
.history-search-row .history-search-field { flex: 1 1 14rem; max-width: 36rem; }
.history-map-tools .history-legend { padding: 0 .75rem !important; }
.history-map-section > .history-workbench { margin-block: 1rem; }
.history-page .eyebrow { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.history-intro {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(270px, 29vw, 410px);
  background: #17120e;
  border-bottom: 1px solid #65513b;
}
.history-hero-art {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 auto;
  width: min(61%, 1000px);
  height: 100%;
  opacity: .64;
  object-fit: cover;
  object-position: center 57%;
}
.history-intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #17120e 39%, #17120eb3 52%, transparent 79%),
              linear-gradient(0deg, #17120e 0%, #17120e00 24%);
}
.history-hero-copy {
  width: min(100% - clamp(3rem, 8vw, 8rem), 1300px);
  margin-inline: auto;
  padding-block: clamp(2rem, 4vw, 3.5rem);
}
.history-hero-copy .eyebrow {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1.15rem;
  font-weight: 700;
}
.history-hero-copy .eyebrow span { width: 1.75rem; height: 1px; background: currentColor; }
.history-intro h1 {
  margin: 0 0 1.4rem;
  font-size: clamp(3rem, 6vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -.06em;
  text-wrap: nowrap;
}
.history-intro h1 em { color: #f0cc91; }
.history-lede {
  max-width: 32ch !important;
  margin: 0;
  color: #fff3de;
  font-size: clamp(1.12rem, 1.85vw, 1.55rem);
  line-height: 1.45;
}
.history-art-caption {
  position: absolute;
  right: clamp(1.5rem, 4vw, 4rem);
  bottom: .75rem;
  margin: 0;
  color: #e6d2b8;
  font-size: .72rem;
}
.history-page :is(#history-map-title, #history-map, #history-comparison, #history-method) { scroll-margin-top: 1.25rem; }
.history-legend, .history-workbench, .history-comparison, .history-method { border: 1px solid var(--line); padding: clamp(1rem, 3vw, 2rem) !important; border-radius: .5rem; background: #171613; }
.history-legend > ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1.5rem; font-size: .9rem; }
.history-view-key { display: inline-block; width: .9rem; height: .9rem; margin-right: .4rem; border: 2px solid var(--line); border-radius: .2rem; }
.history-page [data-view="before-tribulation"] { --history-view-color: #dfbb78; }
.history-page [data-view="with-return"] { --history-view-color: #8ebcbc; }
.history-page [data-view="present-age-millennium"] { --history-view-color: #b6a1ca; }
.history-view-key { border-color: var(--history-view-color, var(--muted)); }
.history-filter-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.history-filter-fields label, .history-search-field label { display: block; margin-bottom: .35rem; font-size: .9rem; font-weight: 600; }
.history-search-field input, .history-filter-fields select { width: 100%; max-width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: .3rem; padding: .65rem; background: var(--bg); }
#history-filter-help { color: var(--muted); font-size: .85rem; }
#history-results-count { font-weight: 600; color: var(--gold); }
.history-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.history-selection-notice, .history-empty { border-inline-start: 3px solid var(--gold); padding: 1rem; background: #262116; }
.history-map-canvas { position: relative; isolation: isolate; }
.history-era-headings, .history-era-columns { display: grid; grid-template-columns: repeat(var(--history-era-count, 5), minmax(0, 1fr)); gap: .7rem; }
.history-era-headings { font-size: .75rem; color: var(--gold); padding: .6rem; gap: .7rem; }
.history-era-headings > span { overflow-wrap: anywhere; }
.history-map-lane { position: relative; z-index: 1; padding: .75rem; margin-block: .65rem; border: 1px solid var(--line); border-radius: .4rem; }
.history-map-lane > summary { cursor: pointer; min-height: 44px; }
.history-lane-count { display: inline-block; font-size: .75rem; color: var(--muted); margin-inline-start: .5rem; }
.history-map-lane h3 { display: inline-block; margin: 0 0 .65rem; background: var(--bg); padding-inline-end: .5rem; }
.history-era-group { min-width: 0; }
.history-era-group > h4 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.history-era-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.history-map-node { min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--history-view-color, var(--line)); border-radius: .3rem; background: #1c1a16; }
.history-map-node > button { text-align: start; width: 100%; height: 100%; border: 0; border-radius: inherit; background: transparent; padding: .75rem; }
.history-map-node button > span, .history-context summary > span { display: block; font-size: .75rem; color: var(--muted); margin-top: .4rem; }
.history-map-node strong { font-size: .9rem; }
.history-map-node .history-evidence-badge { color: var(--text); }
.history-map-node:has([aria-pressed="true"]) { outline: 2px solid var(--gold); outline-offset: 2px; background: #32291a; }
.history-map-node[data-connected="true"] { border-color: var(--gold); }
.history-context { padding: .75rem; font-size: .8rem; }
.history-context summary { cursor: pointer; min-height: 44px; }
.history-context a { overflow-wrap: anywhere; }
.history-lane-empty { font-size: .8rem; color: var(--muted); margin: 0; }
.history-connection-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.history-connection-overlay line { stroke: #aca18e; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.history-connection-overlay [data-pattern="dashed"] { stroke-dasharray: 7 5; }
.history-connection-overlay [data-highlighted="true"] { stroke: var(--gold); }
.history-alphabetical { margin-block: 1.5rem; border: 1px solid var(--line); padding: 1rem; border-radius: .4rem; }
.history-alphabetical summary, .history-relationships summary { cursor: pointer; min-height: 44px; padding-block: .4rem; }
.history-alphabetical ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem 2rem; padding-left: 1.4rem; }
.history-alphabetical li { padding-inline-start: .15rem; min-width: 0; }
.history-alphabetical li button { text-align: start; }
.history-alphabetical li span { display: block; color: var(--muted); font-size: .8rem; }
.history-alphabetical [aria-pressed="true"] { border-color: var(--gold); }
.history-relationships > ul { list-style: none; padding: 0; }
.history-relationships > ul > li { border-block-start: 1px solid var(--line); padding-block: .5rem; }
.history-relationships [data-connected="true"] > details > summary { color: var(--gold); }
.history-relationships a { overflow-wrap: anywhere; }
.history-line-sample { display: inline-block; width: 2rem; border-block-start: 2px solid currentColor; vertical-align: middle; margin-inline-end: .5rem; }
[data-connection-pattern="dashed"] > details > summary > .history-line-sample, .history-dashed { border-block-start-style: dashed; }
.history-timeline-markers { padding-left: 1.5rem; }
.history-timeline-markers > li { margin-block: 1rem; padding: .5rem; border: 1px solid var(--line); }
.history-timeline-claims article { border-block-start: 1px solid var(--line); padding-block: .5rem; }
.history-workbench a { overflow-wrap: anywhere; }
.history-workbench, .history-comparison, .history-evidence-panels { min-width: 0; overflow-wrap: anywhere; }
.history-workbench { scroll-margin-block-start: 1rem; }
.history-evidence-panels > details { border: 1px solid var(--line); border-radius: .3rem; margin-block: .8rem; padding: .75rem 1rem; }
.history-evidence-panels > details > summary { cursor: pointer; min-height: 44px; padding-block: .5rem; font-weight: 600; color: var(--gold); }
.history-evidence-panels article { border-block-start: 1px solid var(--line); margin-block-start: 1rem; padding-block: .5rem; }
.history-evidence-label { font-weight: 600; }
.history-doctrine-boundary { border-inline-start: 3px solid var(--gold); padding-inline-start: 1rem; }
.history-source-list { padding-inline-start: 1.3rem; }
.history-source-list > li { margin-block: 1.25rem; }
.history-source-list p { margin-block: .5rem; }
.history-source-list blockquote { margin-inline: 0; padding-inline-start: 1rem; border-inline-start: 2px solid var(--line); }
.history-claim-selector { margin-block: 1rem; }
.history-claim-selector label, .history-compare-controls label { display: block; font-weight: 600; margin-block-end: .5rem; }
.history-claim-selector select, .history-compare-controls select { width: 100%; max-width: 100%; min-width: 0; padding: .65rem; border: 1px solid var(--line); border-radius: .3rem; background: var(--bg); }
.history-claim-selector p { color: var(--muted); font-size: .85rem; }
.history-comparison h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.history-compare-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-block: 1.5rem; }
.history-profile-hero, .history-comparison-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  min-width: 0;
  border: 1px solid #65513b;
  border-radius: .45rem;
  background: linear-gradient(105deg, #272117, #171613);
}
.history-profile-hero { padding: .65rem clamp(.85rem, 3vw, 1.65rem); }
.history-profile-hero p { margin-block: .35rem; }
.history-leader-portrait { flex: none; margin: 0; text-align: right; }
.history-leader-portrait img {
  display: block;
  width: clamp(5rem, 18vw, 9rem);
  height: clamp(5.5rem, 21vw, 10.5rem);
  object-fit: cover;
  object-position: center 28%;
  opacity: .76;
  filter: sepia(.28);
  border-radius: .25rem;
}
.history-leader-portrait figcaption { margin-top: .25rem; color: var(--muted); font-size: .75rem; }
.history-comparison-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.history-comparison-person { --teacher-tone: #ecc98e; padding: .65rem .8rem; }
.history-comparison [data-marker-side="right"] { --teacher-tone: #a3d1d1; }
.history-comparison-person-copy { min-width: 0; flex: 1; }
.history-comparison-person-copy > p { margin: .3rem 0; }
.history-comparison-person-copy > p + p { font-size: .88rem; color: var(--muted); }
.history-comparison-person .history-leader-portrait img { width: 4.25rem; height: 4.75rem; }
.history-person-key, .history-track-marker b {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  min-height: 1.25rem;
  background: var(--teacher-tone);
  color: #191613;
  border-radius: .2rem;
  font-size: .72rem;
  line-height: 1;
}
.history-person-key { margin-inline-end: .45rem; }
.history-shared-track { margin: 1.1rem 0; padding: .8rem; border: 1px solid var(--line); border-radius: .4rem; }
.history-shared-track figcaption { margin-bottom: .75rem; font-size: .86rem; color: var(--muted); }
.history-shared-phases { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
.history-shared-phases li { display: grid; grid-template-rows: subgrid; grid-row: span 3; min-width: 0; text-align: center; }
.history-phase-markers { display: flex; flex-wrap: wrap; align-content: flex-end; justify-content: center; gap: .3rem; padding: 0 .18rem .5rem; }
.history-track-marker {
  --teacher-tone: #ecc98e;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .16rem .27rem;
  border: 1px solid var(--teacher-tone);
  border-radius: .3rem;
  color: var(--teacher-tone);
  font-size: .78rem;
  line-height: 1.22;
}
.history-phase-line { position: relative; height: 1px; background: #8c7757; }
.history-phase-line::after { content: ""; position: absolute; left: calc(50% - 3px); top: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.history-phase-label { padding: .4rem .12rem 0; color: var(--muted); font-size: .75rem; line-height: 1.25; }
.history-compare-details { margin-top: 1rem; border-block-start: 1px solid var(--line); }
.history-compare-details > summary { padding-block: .65rem; min-height: 44px; color: var(--gold); cursor: pointer; }
.history-comparison-timelines { display: grid; gap: 1.5rem; }
.history-comparison-timelines > div { min-width: 0; border: 1px solid var(--line); padding: 1rem; border-radius: .3rem; }
.history-comparison [data-comparison-result] { border-block-start: 1px solid var(--line); padding-block: .75rem; }
.history-page :is(summary, button):focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.history-footer { border-top: 1px solid var(--line); border-bottom: 0; font-size: .85rem; }
@media (max-width: 900px) {
  .history-header { align-items: flex-start; flex-direction: column; }
  .history-hero-art { object-position: 67% center; }
  .history-filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-era-headings { display: none; }
  .history-era-columns { display: flex; flex-direction: column; gap: .75rem; }
  .history-era-group:has(ul:empty) { display: none; }
  .history-era-group > h4 { position: static; width: auto; height: auto; overflow: visible; clip-path: none; margin: .25rem 0 .5rem; color: var(--gold); }
  .history-era-group ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-connection-overlay { display: none; }
  .history-alphabetical ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
  .history-page main { --history-content-width: calc(100% - 2rem); }
  .history-intro { min-height: 0; padding-top: clamp(5.5rem, 24vw, 8rem); }
  .history-intro::after {
    background: linear-gradient(90deg, #17120e 20%, transparent 75%),
                linear-gradient(180deg, transparent, #17120e 11rem);
  }
  .history-hero-art { width: 77%; height: clamp(9rem, 42vw, 12rem); object-position: 73% 56%; }
  .history-hero-copy { width: var(--history-content-width); padding: 0 0 2.5rem; }
  .history-hero-copy .eyebrow { margin-bottom: .6rem; }
  .history-intro h1 { font-size: clamp(2.5rem, 9.5vw, 3.5rem); margin-bottom: .9rem; white-space: normal; }
  .history-art-caption { top: .5rem; right: 1rem; bottom: auto; text-shadow: 0 1px 5px #000; }
  .history-legend > ul, .history-filter-fields, .history-alphabetical ol, .history-era-group ul { grid-template-columns: minmax(0, 1fr); }
  .history-header, .history-footer { padding: 1.25rem 1rem; flex-wrap: wrap; }
  .history-header { padding-block: .85rem; gap: .65rem; }
  .history-header nav { gap: .35rem .85rem; font-size: .75rem; }
  .history-map-lane { padding: .75rem; }
  .history-page main > section:not(.history-map-section) { margin-block: 1.5rem; }
  .history-compare-controls, .history-comparison-people { grid-template-columns: minmax(0, 1fr); }
  .history-shared-track { padding: .6rem .3rem; }
  .history-shared-track figcaption { padding-inline: .3rem; }
  .history-track-marker { flex-direction: column; padding: .15rem; font-size: .68rem; }
  .history-phase-label { font-size: .69rem; }
  .history-evidence-panels > details, .history-comparison-timelines > div { padding: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .history-page *, .history-page *::before, .history-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .history-header, .history-footer, .history-connection-overlay,
  .history-hero-art, .history-intro::after, .history-art-caption, .history-map-tools { display: none; }
  .history-page main { --history-content-width: 100%; }
  .history-intro { min-height: 0; padding: 0; background: white; }
  .history-hero-copy { width: 100%; padding-block: 1rem; }
  .history-intro :is(h1 em, p, .eyebrow) { color: black; }
  .history-page { background: white; color: black; }
  .history-map-node, .history-workbench, .history-method { background: white; color: black; }
}
/* One readable history, with the source explorer kept below it. */
.history-compare-prompt,.history-story,#history-explorer{width:var(--history-content-width, min(1120px,92%));max-width:1120px;margin:2rem auto}.history-story{position:relative}.history-story>h2{font:clamp(2rem,4vw,3.4rem)/1.1 Georgia,serif}.history-story>p{max-width:760px}.history-chapter{display:grid;grid-template-columns:150px minmax(0,1fr);gap:30px;padding:45px 30px 45px 0;border-top:1px solid #80683c66;background:linear-gradient(110deg,#d9a64608,transparent 60%)}.chapter-date{align-self:start;position:sticky;top:100px;color:var(--gold);font-size:1.2rem;border-top:3px solid var(--gold);padding-top:12px}.history-chapter h3{font:clamp(1.6rem,3vw,2.5rem)/1.2 Georgia,serif;margin:0 0 1rem}.history-chapter p{max-width:720px}.chapter-leaders{display:flex;flex-wrap:wrap;gap:7px}.chapter-leaders button{border-radius:30px;border:1px solid #a2854f88;padding:5px 12px;background:#191a20;color:var(--gold);font-size:.85rem}.history-chapter blockquote{margin:25px 0 0;padding:15px 20px;border-left:2px solid var(--gold);font-family:Georgia,serif}.history-chapter cite{display:block;margin-top:8px;font:12px system-ui,sans-serif}.history-all-toggle{display:flex;gap:12px;align-items:center;font-weight:600}.history-all-toggle input{width:20px;height:20px;flex:none}.history-era-headings{display:grid!important;position:sticky;top:0;z-index:15;background:#17191ff5;border-block:1px solid #a2854f88;padding:12px 6px;box-shadow:0 4px 16px #0004}.history-era-group>h4{display:none!important}.history-map-lane .history-era-columns{gap:10px}.history-map-node .history-own-compare{font-size:.75rem;padding:.5rem;color:var(--gold);border-top:1px solid #80683c66}.history-method li{margin:.75rem 0}.history-map-node button{overflow-wrap:anywhere}.history-page .evidence-dialog{max-width:1100px;width:calc(100% - 24px)}.history-page .evidence-dialog .chart-instance{font-family:system-ui,sans-serif}.history-chapter:target{outline:1px solid var(--gold)}
@media(max-width:900px){.history-era-headings{font-size:.6rem;gap:3px}.history-era-columns{display:block}.history-era-group ul{grid-template-columns:repeat(2,minmax(0,1fr))}.history-chapter{grid-template-columns:110px minmax(0,1fr);gap:18px;padding-right:0}.history-story,#history-explorer{width:calc(100% - 32px)}}
@media(max-width:600px){.history-chapter{display:block;padding:28px 0}.chapter-date{position:static;font-size:1rem;width:max-content}.history-era-group ul{grid-template-columns:1fr}.history-story>h2{font-size:2rem}.history-era-headings{font-size:.52rem;line-height:1.35}.history-chapter blockquote{font-size:1rem}.history-all-toggle{align-items:flex-start}.chapter-leaders button{min-height:36px}}
.history-chapter{position:relative}.history-chapter::before{content:"";position:absolute;left:163px;top:0;bottom:0;border-left:1px solid #a2854f66}.history-chapter::after{content:"";position:absolute;left:159px;top:55px;width:9px;height:9px;border-radius:50%;background:var(--gold);box-shadow:0 0 0 5px #17120e}.history-chapter:last-of-type::before{bottom:50%}@media(max-width:900px){.history-chapter::before{left:117px}.history-chapter::after{left:113px}}@media(max-width:600px){.history-chapter{padding-left:18px}.history-chapter::before{left:1px}.history-chapter::after{left:-3px;top:50px}}
