/* CODEX RENDER CONTRACT: keep historical workbench styles synchronized with the SSR and enhanced viewer states. */

:root {
  --history-ink: #edf6f0;
  --history-muted: #a6b9b0;
  --history-faint: #73877e;
  --history-surface: #0b1714;
  --history-surface-2: #101f1b;
  --history-surface-3: #162821;
  --history-line: rgba(190, 220, 202, 0.16);
  --history-line-strong: rgba(190, 220, 202, 0.28);
  --history-green: #58d68d;
  --history-green-deep: #1f9c62;
  --history-gold: #e9b86d;
  --history-cyan: #62d8e8;
  --history-violet: #d29af2;
  --history-rose: #f090a4;
  --history-before: #edb865;
  --history-after: #62e39a;
  --history-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body[data-page="white-mountains-through-time"] {
  margin: 0;
  color: var(--history-ink);
  background:
    radial-gradient(circle at 18% -10%, rgba(47, 132, 86, 0.18), transparent 38rem),
    #06100d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-page="white-mountains-through-time"] a {
  color: inherit;
}

.history-page {
  min-height: 100vh;
  overflow: clip;
}

.history-kicker {
  margin: 0 0 0.65rem;
  color: var(--history-green);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.history-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(4.5rem, 8vw, 8rem) max(1.25rem, calc((100vw - 1360px) / 2)) clamp(3.25rem, 6vw, 6rem);
  border-bottom: 1px solid var(--history-line);
  background:
    linear-gradient(90deg, rgba(4, 13, 11, 0.98) 0%, rgba(5, 16, 13, 0.88) 48%, rgba(5, 18, 14, 0.7) 100%),
    radial-gradient(ellipse at 82% 48%, rgba(73, 158, 108, 0.22), transparent 33rem);
}

.history-hero::before,
.history-hero::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.history-hero::before {
  inset: 0 0 0 46%;
  opacity: 0.3;
  background-image:
    linear-gradient(30deg, transparent 48%, rgba(153, 196, 169, 0.14) 49%, rgba(153, 196, 169, 0.14) 50%, transparent 51%),
    linear-gradient(150deg, transparent 48%, rgba(153, 196, 169, 0.1) 49%, rgba(153, 196, 169, 0.1) 50%, transparent 51%);
  background-size: 72px 42px;
  mask-image: linear-gradient(90deg, transparent, #000 35%);
}

.history-hero::after {
  right: 3%;
  bottom: -1px;
  width: min(49vw, 750px);
  height: 72%;
  border-bottom: 1px solid rgba(119, 192, 148, 0.24);
  clip-path: polygon(0 100%, 16% 60%, 27% 71%, 43% 31%, 53% 47%, 66% 18%, 79% 55%, 92% 35%, 100% 58%, 100% 100%);
  background: linear-gradient(180deg, rgba(61, 139, 91, 0.04), rgba(61, 139, 91, 0.18));
}

.history-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: end;
  max-width: 1360px;
  margin: 0 auto;
}

.history-breadcrumbs {
  margin-bottom: 2.5rem;
  color: var(--history-muted);
  font-size: 0.82rem;
}

.history-breadcrumbs ol {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-breadcrumbs li + li::before {
  margin-right: 0.65rem;
  color: var(--history-faint);
  content: "/";
}

.history-breadcrumbs a:hover {
  color: var(--history-ink);
}

.history-hero h1 {
  max-width: 920px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.3rem, 7.6vw, 7.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.83;
}

.history-hero h1 em {
  color: var(--history-green);
  font-weight: 400;
}

.history-hero__lede {
  max-width: 800px;
  margin: 2rem 0 0;
  color: #c6d5cd;
  font-size: clamp(1.02rem, 1.8vw, 1.27rem);
  line-height: 1.72;
}

.history-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.history-button,
.history-share-button {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.78rem 1rem;
  border: 1px solid var(--history-line-strong);
  border-radius: 8px;
  color: var(--history-ink);
  background: rgba(17, 35, 29, 0.74);
  font: inherit;
  font-size: 0.87rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.history-button:hover,
.history-share-button:hover {
  border-color: rgba(88, 214, 141, 0.55);
  background: rgba(28, 62, 48, 0.9);
}

.history-button--primary {
  border-color: var(--history-green);
  color: #062014;
  background: var(--history-green);
}

.history-button--primary:hover {
  color: #03120c;
  background: #79e5a7;
}

.history-hero__summary {
  position: relative;
  z-index: 1;
  padding: 1.15rem;
  border: 1px solid var(--history-line-strong);
  border-radius: 14px;
  background: rgba(9, 24, 19, 0.8);
  box-shadow: var(--history-shadow);
  backdrop-filter: blur(12px);
}

.history-era-card {
  padding: 1rem 1rem 1.1rem;
  border: 1px solid rgba(88, 214, 141, 0.26);
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(64, 146, 98, 0.2), rgba(10, 27, 21, 0.7));
}

.history-era-card__label {
  display: block;
  color: var(--history-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.history-era-card strong {
  display: block;
  margin-top: 0.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3vw, 2.65rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.history-era-card strong span {
  color: var(--history-green);
}

.history-era-card p {
  margin: 0.45rem 0 0;
  color: var(--history-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.history-hero__facts {
  margin: 1rem 0 0;
}

.history-hero__facts div {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 0.8rem;
  padding: 0.72rem 0.4rem;
  border-bottom: 1px solid var(--history-line);
  font-size: 0.78rem;
}

.history-hero__facts div:last-child {
  border-bottom: 0;
}

.history-hero__facts dt {
  color: var(--history-faint);
  font-weight: 700;
}

.history-hero__facts dd {
  margin: 0;
  color: #d6e3dc;
}

.history-workbench,
.history-story-section,
.history-chronology,
.history-methods {
  padding-right: max(1.25rem, calc((100vw - 1440px) / 2));
  padding-left: max(1.25rem, calc((100vw - 1440px) / 2));
}

.history-workbench {
  padding-top: clamp(3.25rem, 6vw, 5.75rem);
  padding-bottom: clamp(3.5rem, 7vw, 7rem);
  background:
    radial-gradient(circle at 80% 15%, rgba(71, 134, 98, 0.1), transparent 32rem),
    #07110f;
}

.history-workbench__intro,
.history-section-heading {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto 1.5rem;
}

.history-workbench__intro h2,
.history-section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.history-release-badge {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  max-width: 360px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--history-line);
  border-radius: 999px;
  color: var(--history-muted);
  background: rgba(12, 28, 23, 0.74);
  font-size: 0.73rem;
  line-height: 1.25;
}

.history-release-badge__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--history-gold);
  box-shadow: 0 0 0 4px rgba(233, 184, 109, 0.13);
}

.history-release-badge.is-live .history-release-badge__dot {
  background: var(--history-green);
  box-shadow: 0 0 0 4px rgba(88, 214, 141, 0.13);
}

.history-release-badge.is-error .history-release-badge__dot {
  background: var(--history-rose);
}

.history-noscript {
  max-width: 1440px;
  margin: 0 auto 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(233, 184, 109, 0.45);
  border-radius: 10px;
  background: rgba(73, 48, 19, 0.35);
}

.history-noscript h3,
.history-noscript p {
  margin: 0;
}

.history-noscript p {
  margin-top: 0.35rem;
  color: var(--history-muted);
}

.history-app {
  max-width: 1440px;
  margin: 0 auto;
  border: 1px solid var(--history-line-strong);
  border-radius: 16px;
  background: #0a1512;
  box-shadow: var(--history-shadow);
  overflow: hidden;
}

.history-toolbar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(520px, 1.35fr) minmax(420px, 0.65fr);
  gap: 1rem;
  align-items: end;
  padding: 1rem;
  border-bottom: 1px solid var(--history-line);
  background: rgba(13, 29, 24, 0.98);
}

.history-toolbar fieldset,
.history-compare-bar fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.history-toolbar legend,
.history-compare-bar legend,
.history-search-field > span:first-child,
.history-amount-control > span:first-child,
.history-epoch-selectors label > span {
  display: block;
  margin: 0 0 0.45rem;
  color: var(--history-faint);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.history-segments {
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--history-line);
  border-radius: 10px;
  background: #07100e;
}

.history-segments--modes {
  grid-template-columns: repeat(3, 1fr);
}

.history-segments button {
  display: flex;
  gap: 0.58rem;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 0.55rem 0.62rem;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--history-muted);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.history-segments button:hover {
  color: var(--history-ink);
  background: rgba(129, 176, 150, 0.08);
}

.history-segments button[aria-pressed="true"] {
  border-color: rgba(88, 214, 141, 0.34);
  color: var(--history-ink);
  background: rgba(41, 104, 70, 0.32);
}

.history-segments button strong,
.history-segments button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-segments button strong {
  font-size: 0.77rem;
}

.history-segments button small {
  margin-top: 0.13rem;
  color: #92a99e;
  font-size: 0.64rem;
}

.history-mode-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  font-weight: 900;
}

.history-mode-icon--forest {
  color: var(--history-green);
  background: rgba(88, 214, 141, 0.12);
}

.history-mode-icon--transport {
  color: var(--history-gold);
  background: rgba(233, 184, 109, 0.12);
}

.history-mode-icon--communities {
  color: var(--history-violet);
  background: rgba(210, 154, 242, 0.12);
}

.history-toolbar__utility {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto auto;
  gap: 0.65rem;
  align-items: end;
}

.history-search-field {
  min-width: 0;
}

.history-search-field__input {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  height: 50px;
  padding: 0 0.7rem;
  border: 1px solid var(--history-line-strong);
  border-radius: 8px;
  background: #07100e;
}

.history-search-field__input > span {
  color: var(--history-faint);
  font-size: 1.25rem;
}

.history-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--history-ink);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
}

.history-search-field input::placeholder {
  color: #688077;
}

.history-check-control {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  min-height: 50px;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--history-line-strong);
  border-radius: 8px;
  color: var(--history-muted);
  background: #07100e;
  cursor: pointer;
}

.history-check-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.history-check-control input:focus-visible + .history-check-control__box {
  outline: 3px solid var(--history-cyan);
  outline-offset: 3px;
}

.history-check-control__box {
  position: relative;
  width: 29px;
  height: 17px;
  flex: 0 0 auto;
  border: 1px solid var(--history-line-strong);
  border-radius: 999px;
  background: #17241f;
}

.history-check-control__box::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--history-muted);
  content: "";
  transition: transform 160ms ease, background 160ms ease;
}

.history-check-control input:checked + .history-check-control__box {
  border-color: var(--history-green);
  background: rgba(88, 214, 141, 0.24);
}

.history-check-control input:checked + .history-check-control__box::after {
  background: var(--history-green);
  transform: translateX(12px);
}

.history-check-control strong,
.history-check-control small {
  display: block;
  white-space: nowrap;
}

.history-check-control strong {
  color: var(--history-ink);
  font-size: 0.69rem;
}

.history-check-control small {
  margin-top: 0.12rem;
  color: var(--history-faint);
  font-size: 0.59rem;
}

.history-share-button {
  min-height: 50px;
  white-space: nowrap;
}

.history-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  min-height: 770px;
}

.history-map-column {
  min-width: 0;
}

.history-map-shell {
  border-bottom: 1px solid var(--history-line);
}

.history-map-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--history-line);
  background: #0c1815;
}

.history-map-header__eyebrow,
.history-map-header strong,
.history-north-lock span {
  display: block;
}

.history-map-header__eyebrow {
  color: var(--history-faint);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.history-map-header > div:first-child > strong {
  margin-top: 0.18rem;
  font-size: 0.85rem;
}

.history-north-lock {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  color: var(--history-muted);
  font-size: 0.66rem;
  text-align: right;
}

.history-north-lock__arrow {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--history-line-strong);
  border-radius: 50%;
  color: var(--history-green);
  font-size: 1rem;
}

.history-north-lock small {
  color: var(--history-faint);
  font-size: 0.57rem;
}

.history-map-stage {
  position: relative;
  height: clamp(470px, 56vw, 630px);
  max-height: 630px;
  min-height: 470px;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(rgba(5, 17, 13, 0.22), rgba(5, 17, 13, 0.22)),
    repeating-linear-gradient(30deg, transparent 0 26px, rgba(146, 178, 157, 0.035) 27px 28px),
    #0c1b16;
}

.history-map,
.history-map-clip {
  position: absolute;
  inset: 0;
}

.history-map-clip {
  z-index: 2;
  pointer-events: none;
  will-change: clip-path, opacity;
}

.history-map--after {
  pointer-events: none;
}

.history-map-stage[data-comparison="fade"] .history-swipe-rule,
.history-map-stage[data-comparison="change"] .history-swipe-rule {
  opacity: 0;
  visibility: hidden;
}

.history-map-poster,
.history-map-fallback {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-content: center;
  padding: 2rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(7, 18, 15, 0.58), rgba(7, 18, 15, 0.91)),
    radial-gradient(circle at 50% 35%, rgba(84, 211, 138, 0.14), transparent 21rem),
    #0a1713;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.history-map-poster__mark {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  margin: 0 auto 1rem;
  border: 1px solid rgba(88, 214, 141, 0.45);
  border-radius: 50%;
  color: var(--history-green);
  background: rgba(28, 72, 48, 0.38);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.history-map-poster strong,
.history-map-fallback strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 500;
}

.history-map-poster p,
.history-map-fallback p {
  max-width: 520px;
  margin: 0.65rem auto 0;
  color: var(--history-muted);
  line-height: 1.6;
}

.history-app[data-status="ready"] .history-map-poster,
.history-app[data-status="partial"] .history-map-poster {
  opacity: 0;
  visibility: hidden;
}

.history-map-fallback[hidden] {
  display: none;
}

.history-map-fallback a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--history-green);
}

.history-missing-state {
  position: absolute;
  z-index: 7;
  top: 74px;
  left: 50%;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  width: min(500px, calc(100% - 2rem));
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(233, 184, 109, 0.5);
  border-radius: 9px;
  color: #f7e4c5;
  background: rgba(53, 37, 19, 0.93);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  transform: translateX(-50%);
}

.history-missing-state[hidden] {
  display: none;
}

.history-missing-state > span {
  color: var(--history-gold);
  font-size: 1.8rem;
}

.history-missing-state strong,
.history-missing-state p {
  margin: 0;
}

.history-missing-state strong {
  font-size: 0.8rem;
}

.history-missing-state p {
  margin-top: 0.15rem;
  color: #d8c4a5;
  font-size: 0.7rem;
  line-height: 1.45;
}

.history-map-date {
  position: absolute;
  z-index: 5;
  top: 12px;
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.46rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #fff;
  background: rgba(5, 16, 13, 0.78);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(7px);
}

.history-map-date--before {
  left: 12px;
}

.history-map-date--after {
  right: 12px;
}

.history-map-date span {
  color: var(--history-muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.history-map-date strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 500;
}

.history-map-date--before strong {
  color: var(--history-before);
}

.history-map-date--after strong {
  color: var(--history-after);
}

.history-swipe-rule {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: 52%;
  width: 2px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  transform: translateX(-1px);
  transition: opacity 140ms ease;
}

.history-swipe-rule span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #07100d;
  background: #fff;
  font-size: 1rem;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.history-map-legend {
  position: absolute;
  z-index: 5;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  max-width: min(540px, calc(100% - 24px));
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  color: #c9d8d0;
  background: rgba(5, 16, 13, 0.82);
  font-size: 0.62rem;
  backdrop-filter: blur(8px);
}

.history-map-legend span {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.history-legend-swatch {
  display: inline-block;
  width: 18px;
  height: 4px;
  border-radius: 999px;
}

.history-legend-swatch--before {
  background: var(--history-before);
}

.history-legend-swatch--after {
  background: var(--history-after);
}

.history-legend-swatch--draft {
  height: 2px;
  background: repeating-linear-gradient(90deg, #fff 0 4px, transparent 4px 7px);
}

.history-legend-swatch--coverage {
  height: 8px;
  border: 1px dashed var(--history-cyan);
  background: transparent;
}

.history-legend-swatch--absence {
  height: 8px;
  border: 1px solid #d6e3dc;
  background: linear-gradient(135deg, transparent 43%, #d6e3dc 45% 55%, transparent 57%);
}

.history-legend-swatch--gap {
  height: 8px;
  border: 1px dotted var(--history-faint);
  background: transparent;
  opacity: 0.68;
}

.history-compare-bar {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(240px, 1.3fr);
  gap: 1rem;
  align-items: end;
  padding: 0.8rem;
  border-top: 1px solid var(--history-line);
  background: #0c1815;
}

.history-segments--compare {
  grid-template-columns: repeat(3, 1fr);
}

.history-segments--compare button {
  justify-content: center;
  min-height: 34px;
  padding: 0.38rem 0.5rem;
  font-size: 0.69rem;
  font-weight: 750;
  text-align: center;
}

.history-amount-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.7rem;
  align-items: center;
}

.history-amount-control > span:first-child {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.history-amount-control input {
  width: 100%;
  height: 5px;
  accent-color: var(--history-green);
  cursor: ew-resize;
}

.history-amount-control output {
  min-width: 39px;
  color: var(--history-muted);
  font-size: 0.69rem;
  font-variant-numeric: tabular-nums;
}

.history-timeline-panel {
  padding: 1.2rem 1rem 1rem;
  border-bottom: 1px solid var(--history-line);
  background: #091411;
}

.history-timeline-panel__head {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
}

.history-timeline-panel__head h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 500;
}

.history-timeline-panel__head > p {
  max-width: 520px;
  margin: 0;
  color: var(--history-faint);
  font-size: 0.68rem;
  line-height: 1.5;
  text-align: right;
}

.history-epoch-selectors {
  display: grid;
  grid-template-columns: minmax(145px, 220px) auto minmax(145px, 220px);
  gap: 0.65rem;
  align-items: end;
  margin-top: 1rem;
}

.history-epoch-selectors select {
  width: 100%;
  height: 40px;
  padding: 0 2rem 0 0.65rem;
  border: 1px solid var(--history-line-strong);
  border-radius: 7px;
  color: var(--history-ink);
  background: #0f211b;
  font: inherit;
  font-size: 0.75rem;
}

.history-epoch-selectors__arrow {
  display: grid;
  height: 40px;
  place-items: center;
  color: var(--history-green);
}

.history-timeline-scroll {
  margin-top: 0.9rem;
  padding: 0 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #3e6856 #0b1713;
}

.history-timeline-track {
  position: relative;
  width: max(100%, 1320px);
  height: 102px;
  margin: 0 auto;
}

.history-timeline-track__line {
  position: absolute;
  top: 42px;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, #4b685c, #568f6e 70%, var(--history-green));
}

.history-timeline-track__line::after {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: var(--history-annual-start, 84%);
  width: 1px;
  background: rgba(98, 216, 232, 0.65);
  content: "";
}

.history-timeline-tick {
  position: absolute;
  top: 27px;
  left: calc(var(--tick-position) + var(--tick-offset, 0px));
  z-index: 2;
  width: 12px;
  height: 30px;
  padding: 0;
  border: 0;
  color: var(--history-faint);
  background: transparent;
  cursor: pointer;
  transform: translateX(-50%);
}

.history-timeline-tick::before {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid #678076;
  border-radius: 50%;
  background: #091411;
  content: "";
  transform: translateX(-50%);
}

.history-timeline-tick[data-tick-state="filled"]::before {
  border-color: var(--history-green);
  background: var(--history-green);
  box-shadow: 0 0 0 3px rgba(88, 214, 141, 0.1);
}

.history-timeline-tick[data-tick-state="striped"]::before {
  border-color: var(--history-gold);
  background: repeating-linear-gradient(135deg, var(--history-gold) 0 2px, #091411 2px 4px);
}

.history-timeline-tick[data-tick-state="gap"]::before {
  border-style: dotted;
  border-color: var(--history-faint);
  background: transparent;
  opacity: 0.66;
}

.history-timeline-tick[data-tick-state="confirmed-absence"]::before {
  border-color: #d9e5df;
  background: linear-gradient(135deg, transparent 40%, #d9e5df 42% 58%, transparent 60%);
}

.history-timeline-tick[data-kind="annual-land-cover"]::before {
  border-color: var(--history-cyan);
}

.history-timeline-tick span {
  position: absolute;
  top: 31px;
  left: 50%;
  min-width: 48px;
  color: var(--history-faint);
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform: translateX(-50%);
}

.history-timeline-tick[data-show-label="false"] span {
  display: none;
}

.history-timeline-tick:nth-child(even) span {
  top: 48px;
}

.history-timeline-tick:hover span,
.history-timeline-tick:focus-visible span,
.history-timeline-tick.is-selected span {
  color: var(--history-ink);
}

.history-timeline-marker {
  position: absolute;
  z-index: 1;
  top: 8px;
  bottom: 30px;
  left: var(--marker-position);
  width: 1px;
  pointer-events: none;
}

.history-timeline-marker span {
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateX(-50%);
}

.history-timeline-marker--before {
  background: linear-gradient(var(--history-before), transparent);
}

.history-timeline-marker--before span {
  background: var(--history-before);
}

.history-timeline-marker--after {
  background: linear-gradient(var(--history-after), transparent);
}

.history-timeline-marker--after span {
  background: var(--history-after);
}

.history-timeline-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  color: var(--history-faint);
  font-size: 0.6rem;
}

.history-timeline-key span {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.history-timeline-key i {
  width: 8px;
  height: 8px;
  border: 2px solid #678076;
  border-radius: 50%;
}

.history-timeline-key .is-filled {
  border-color: var(--history-green);
  background: var(--history-green);
}

.history-timeline-key .is-striped {
  border-color: var(--history-gold);
  background: repeating-linear-gradient(135deg, var(--history-gold) 0 2px, #091411 2px 4px);
}

.history-timeline-key .is-gap {
  border-style: dotted;
  border-color: var(--history-faint);
  opacity: 0.68;
}

.history-timeline-key .is-annual {
  border-color: var(--history-cyan);
}

.history-map-status-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: 49px;
  padding: 0.7rem 1rem;
  color: var(--history-muted);
  background: #0c1815;
  font-size: 0.65rem;
}

.history-map-status-row p {
  margin: 0;
}

#historyCoverageStatus {
  color: var(--history-faint);
  text-align: right;
}

.history-evidence-drawer {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-left: 1px solid var(--history-line);
  background:
    linear-gradient(180deg, rgba(54, 120, 81, 0.06), transparent 15rem),
    #0d1a16;
}

.history-evidence-drawer__head {
  display: flex;
  gap: 1rem;
  align-items: start;
  justify-content: space-between;
  min-height: 87px;
  padding: 1.2rem 1rem;
  border-bottom: 1px solid var(--history-line);
}

.history-evidence-drawer__head h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.1;
}

.history-evidence-drawer__head button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--history-line);
  border-radius: 7px;
  color: var(--history-muted);
  background: transparent;
  font-size: 1.35rem;
  cursor: pointer;
}

.history-evidence-drawer__head button:hover {
  color: var(--history-ink);
  background: rgba(255, 255, 255, 0.05);
}

.history-evidence-empty {
  display: grid;
  min-height: 390px;
  flex: 1;
  place-content: center;
  padding: 2rem;
  color: var(--history-faint);
  text-align: center;
}

.history-evidence-empty p {
  max-width: 245px;
  margin: 1rem auto 0;
  font-size: 0.76rem;
  line-height: 1.6;
}

.history-evidence-empty__diagram {
  position: relative;
  width: 92px;
  height: 74px;
  margin: 0 auto;
}

.history-evidence-empty__diagram span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(88, 214, 141, 0.22);
  clip-path: polygon(5% 72%, 30% 20%, 50% 53%, 69% 8%, 96% 70%, 79% 91%, 25% 92%);
  background: rgba(88, 214, 141, 0.035);
}

.history-evidence-empty__diagram span:nth-child(2) {
  transform: translate(8px, 7px);
}

.history-evidence-empty__diagram span:nth-child(3) {
  transform: translate(16px, 14px);
}

.history-evidence-content {
  padding: 1rem;
  overflow-y: auto;
}

.history-evidence-content[hidden] {
  display: none;
}

.history-evidence-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.history-evidence-badge {
  padding: 0.28rem 0.48rem;
  border: 1px solid rgba(88, 214, 141, 0.35);
  border-radius: 999px;
  color: #9df0bd;
  background: rgba(88, 214, 141, 0.1);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-evidence-badge.is-draft {
  border-color: rgba(233, 184, 109, 0.42);
  color: #f2c98d;
  background: rgba(233, 184, 109, 0.1);
}

.history-evidence-badge--quiet {
  border-color: var(--history-line);
  color: var(--history-muted);
  background: rgba(255, 255, 255, 0.03);
}

.history-evidence-summary {
  margin: 0.9rem 0 1rem;
  color: #d8e6df;
  font-size: 0.83rem;
  line-height: 1.6;
}

.history-evidence-grid {
  margin: 0;
  border-top: 1px solid var(--history-line);
}

.history-evidence-grid div {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 0.65rem;
  padding: 0.66rem 0;
  border-bottom: 1px solid var(--history-line);
}

.history-evidence-grid dt {
  color: var(--history-faint);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-evidence-grid dd {
  margin: 0;
  color: var(--history-muted);
  font-size: 0.69rem;
  line-height: 1.45;
}

.history-evidence-note {
  margin-top: 1rem;
  padding: 0.8rem;
  border-left: 2px solid var(--history-gold);
  color: var(--history-muted);
  background: rgba(233, 184, 109, 0.06);
}

.history-evidence-note strong {
  color: #eed09d;
  font-size: 0.67rem;
}

.history-evidence-note p {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  line-height: 1.5;
}

.history-evidence-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(88, 214, 141, 0.3);
  border-radius: 7px;
  color: var(--history-green);
  background: rgba(88, 214, 141, 0.07);
  font-size: 0.7rem;
  font-weight: 750;
  text-decoration: none;
}

.history-evidence-source:hover {
  background: rgba(88, 214, 141, 0.12);
}

.history-evidence-drawer__footer {
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
  margin-top: auto;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--history-line);
  color: var(--history-faint);
  font-size: 0.56rem;
  line-height: 1.35;
}

.history-evidence-drawer__footer span:last-child {
  text-align: right;
}

.maplibregl-map {
  font: inherit;
}

.history-map .maplibregl-ctrl-top-left {
  top: 58px;
  left: 6px;
}

.history-map .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(8, 21, 17, 0.88);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.history-map .maplibregl-ctrl-group button {
  width: 34px;
  height: 34px;
}

.history-map .maplibregl-ctrl-group button + button {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.history-map .maplibregl-ctrl-icon {
  filter: invert(1) opacity(0.72);
}

.history-map .maplibregl-ctrl-attrib {
  color: #9eaea6;
  background: rgba(5, 15, 12, 0.8);
  font-size: 9px;
}

.history-map .maplibregl-ctrl-attrib a {
  color: #b9c9c1;
}

.history-story-section,
.history-chronology,
.history-methods {
  padding-top: clamp(4rem, 8vw, 8rem);
  padding-bottom: clamp(4rem, 8vw, 8rem);
}

.history-story-section {
  border-top: 1px solid var(--history-line);
  background:
    radial-gradient(circle at 18% 75%, rgba(39, 107, 70, 0.14), transparent 32rem),
    #091511;
}

.history-section-heading {
  align-items: end;
}

.history-section-heading > p:last-child {
  max-width: 520px;
  margin: 0;
  color: var(--history-muted);
  font-size: 0.87rem;
  line-height: 1.6;
  text-align: right;
}

.history-section-heading--wide {
  align-items: start;
}

.history-story-grid,
.history-era-grid,
.history-method-grid {
  display: grid;
  max-width: 1440px;
  margin: 2.2rem auto 0;
}

.history-story-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.history-story-card {
  position: relative;
  min-height: 310px;
  padding: 1.25rem;
  border: 1px solid var(--history-line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, transparent, rgba(4, 13, 10, 0.76)),
    radial-gradient(circle at 85% 10%, var(--story-glow, rgba(88, 214, 141, 0.17)), transparent 15rem),
    #10211b;
  overflow: hidden;
}

.history-story-card::after {
  position: absolute;
  right: -20%;
  bottom: -25%;
  width: 90%;
  height: 68%;
  border: 1px solid var(--story-line, rgba(88, 214, 141, 0.18));
  border-radius: 50%;
  content: "";
}

.history-story-card[data-mode="roads-rail"] {
  --story-glow: rgba(233, 184, 109, 0.17);
  --story-line: rgba(233, 184, 109, 0.2);
}

.history-story-card[data-mode="mountain-communities"] {
  --story-glow: rgba(210, 154, 242, 0.15);
  --story-line: rgba(210, 154, 242, 0.19);
}

.history-story-card > span {
  color: var(--history-faint);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
}

.history-story-card h3 {
  max-width: 330px;
  margin: 3rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.5vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.history-story-card p {
  position: relative;
  z-index: 1;
  max-width: 360px;
  margin: 0.85rem 0 0;
  color: var(--history-muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.history-story-card button {
  position: absolute;
  z-index: 2;
  right: 1.2rem;
  bottom: 1.2rem;
  left: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 43px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--history-line-strong);
  border-radius: 7px;
  color: var(--history-ink);
  background: rgba(7, 18, 14, 0.78);
  font: inherit;
  font-size: 0.69rem;
  font-weight: 750;
  cursor: pointer;
}

.history-story-card button:hover {
  border-color: rgba(88, 214, 141, 0.46);
  background: rgba(22, 52, 39, 0.9);
}

.history-story-card.is-loading {
  min-height: 220px;
  opacity: 0.65;
}

.history-chronology {
  border-top: 1px solid var(--history-line);
  background: #07110f;
}

.history-era-grid {
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--history-line-strong);
  border-bottom: 1px solid var(--history-line-strong);
}

.history-era-grid article {
  padding: 1.5rem;
  border-right: 1px solid var(--history-line);
}

.history-era-grid article:last-child {
  border-right: 0;
}

.history-era-grid__range {
  color: var(--history-green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
}

.history-era-grid h3 {
  margin: 1.3rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.history-era-grid p,
.history-era-grid li {
  color: var(--history-muted);
  font-size: 0.75rem;
  line-height: 1.62;
}

.history-era-grid .history-geometry-caveat {
  padding: 0.65rem;
  border-left: 2px solid var(--history-gold);
  color: #d9c39f;
  background: rgba(233, 184, 109, 0.07);
  font-size: 0.68rem;
}

[dir="rtl"] .history-era-grid .history-geometry-caveat {
  border-right: 2px solid var(--history-gold);
  border-left: 0;
}

.history-era-grid ul {
  margin: 1rem 0 0;
  padding-left: 1rem;
}

.history-source-ruler {
  max-width: 1440px;
  margin: 3rem auto 0;
  padding: 1rem 0;
  overflow: hidden;
}

.history-source-ruler__years {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.7rem;
  color: var(--history-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.64rem;
}

.history-source-band {
  position: relative;
  height: 29px;
  margin-top: 5px;
  border-radius: 4px;
  color: #dce9e2;
  background: rgba(88, 214, 141, 0.13);
  font-size: 0.65rem;
}

.history-source-band span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 0.65rem;
}

.history-source-band--maps {
  width: 76%;
}

.history-source-band--ownership {
  width: 43%;
  margin-left: 46%;
  background: rgba(84, 211, 138, 0.24);
}

.history-source-band--aerial {
  width: 34%;
  margin-left: 58%;
  background: rgba(210, 154, 242, 0.17);
}

.history-source-band--annual {
  width: 28%;
  margin-left: 72%;
  background: rgba(98, 216, 232, 0.18);
}

.history-methods {
  border-top: 1px solid var(--history-line);
  background:
    radial-gradient(circle at 85% 75%, rgba(81, 154, 108, 0.12), transparent 34rem),
    #0a1612;
}

.history-method-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.history-method-grid article {
  min-height: 205px;
  padding: 1.2rem;
  border: 1px solid var(--history-line);
  border-radius: 10px;
  background: rgba(15, 32, 26, 0.72);
}

.history-method-grid__number {
  color: var(--history-green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.67rem;
}

.history-method-grid h3 {
  margin: 2.6rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.history-method-grid p {
  margin: 0.65rem 0 0;
  color: var(--history-muted);
  font-size: 0.74rem;
  line-height: 1.6;
}

.history-fixture-note,
.history-official-sources {
  max-width: 1440px;
  margin: 1rem auto 0;
}

.history-fixture-note {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(233, 184, 109, 0.34);
  border-radius: 9px;
  background: rgba(73, 48, 19, 0.2);
}

.history-fixture-note strong {
  color: #f0cb91;
  font-size: 0.8rem;
}

.history-fixture-note p {
  margin: 0.25rem 0 0;
  color: var(--history-muted);
  font-size: 0.73rem;
  line-height: 1.5;
}

.history-fixture-note a {
  flex: 0 0 auto;
  color: var(--history-green);
  font-size: 0.7rem;
  font-weight: 750;
}

.history-official-sources {
  padding-top: 2.25rem;
}

.history-official-sources h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 500;
}

.history-official-sources ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.2rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.history-official-sources a {
  color: var(--history-muted);
  font-size: 0.72rem;
}

.history-official-sources a:hover {
  color: var(--history-green);
}

.history-page button:focus-visible,
.history-page a:focus-visible,
.history-page input:focus-visible,
.history-page select:focus-visible,
.history-timeline-scroll:focus-visible {
  outline: 3px solid rgba(98, 216, 232, 0.8);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .history-toolbar {
    grid-template-columns: 1fr;
  }

  .history-toolbar__utility {
    grid-template-columns: minmax(220px, 1fr) auto auto;
  }

  .history-workspace {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .history-era-grid,
  .history-method-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .history-era-grid article:nth-child(2) {
    border-right: 0;
  }

  .history-era-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--history-line);
  }
}

@media (max-width: 900px) {
  .history-hero__grid {
    grid-template-columns: 1fr;
  }

  .history-hero__summary {
    max-width: 560px;
  }

  .history-workbench__intro,
  .history-section-heading {
    display: block;
  }

  .history-release-badge {
    margin-top: 1rem;
  }

  .history-section-heading > p:last-child {
    margin-top: 1rem;
    text-align: left;
  }

  .history-workspace {
    display: block;
  }

  .history-evidence-drawer {
    border-top: 1px solid var(--history-line);
    border-left: 0;
  }

  .history-evidence-drawer:not(.is-open) .history-evidence-content,
  .history-evidence-drawer:not(.is-open) .history-evidence-empty {
    min-height: auto;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    opacity: 0;
  }

  .history-evidence-drawer.is-open .history-evidence-content {
    max-height: 560px;
  }

  .history-story-grid {
    grid-template-columns: 1fr;
  }

  .history-story-card {
    min-height: 270px;
  }
}

@media (max-width: 680px) {
  .history-hero {
    padding-top: 3rem;
  }

  .history-breadcrumbs {
    margin-bottom: 1.8rem;
  }

  .history-hero h1 {
    font-size: clamp(3rem, 15.2vw, 5.2rem);
  }

  .history-toolbar {
    padding: 0.75rem;
  }

  .history-segments--modes {
    grid-template-columns: 1fr;
  }

  .history-segments--modes button {
    min-height: 43px;
  }

  .history-toolbar__utility {
    grid-template-columns: 1fr;
  }

  .history-check-control,
  .history-share-button {
    width: 100%;
  }

  .history-map-header {
    align-items: start;
  }

  .history-north-lock small,
  .history-map-header__eyebrow {
    display: none;
  }

  .history-map-stage {
    height: 64vh;
    min-height: 430px;
  }

  .history-map-date {
    top: 8px;
    padding: 0.38rem 0.45rem;
  }

  .history-map-date--before {
    left: 8px;
  }

  .history-map-date--after {
    right: 8px;
  }

  .history-map-legend {
    right: 8px;
    bottom: 8px;
    left: 8px;
    max-width: none;
  }

  .history-compare-bar {
    grid-template-columns: 1fr;
  }

  .history-timeline-panel__head {
    display: block;
  }

  .history-timeline-panel__head > p {
    margin-top: 0.65rem;
    text-align: left;
  }

  .history-epoch-selectors {
    grid-template-columns: 1fr;
  }

  .history-epoch-selectors__arrow {
    height: 16px;
    transform: rotate(90deg);
  }

  .history-map-status-row {
    display: block;
  }

  #historyCoverageStatus {
    margin-top: 0.35rem;
    text-align: left;
  }

  .history-era-grid,
  .history-method-grid {
    grid-template-columns: 1fr;
  }

  .history-era-grid article,
  .history-era-grid article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--history-line);
  }

  .history-era-grid article:last-child {
    border-bottom: 0;
  }

  .history-fixture-note {
    display: block;
  }

  .history-fixture-note a {
    display: inline-block;
    margin-top: 0.8rem;
  }

  .history-source-band {
    font-size: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  .history-legend-swatch,
  .history-release-badge__dot,
  .history-timeline-tick::before,
  .history-timeline-key i {
    forced-color-adjust: none;
  }
}

[dir="rtl"] .history-toolbar,
[dir="rtl"] .history-evidence-drawer,
[dir="rtl"] .history-section-heading,
[dir="rtl"] .history-workbench__intro,
[dir="rtl"] .history-methods,
[dir="rtl"] .history-chronology {
  text-align: right;
}

[dir="rtl"] .history-segments button {
  text-align: right;
}

[dir="rtl"] .history-evidence-drawer {
  border-right: 1px solid var(--history-line);
  border-left: 0;
}

[dir="rtl"] .history-evidence-note {
  border-right: 2px solid var(--history-gold);
  border-left: 0;
}

[dir="rtl"] .history-map-stage,
[dir="rtl"] .history-timeline-scroll,
[dir="rtl"] .history-source-ruler {
  direction: ltr;
}

@media (max-width: 900px) {
  [dir="rtl"] .history-evidence-drawer {
    border-right: 0;
  }
}
