@import url("/studio-navigation.css");
:root {
  --ink:#163f39;
  --muted:#66776e;
  --paper:#f7f5ed;
  --line:#d9ded2;
  --accent:#b25934;
  --pale:#e9ecdf;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.6 system-ui,
    -apple-system,
    sans-serif;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
input,
select {
  min-height: 44px;
  border: 1px solid var(--line);
  background: #fffcf6;
  border-radius: 9px;
  padding: 9px 12px;
}
button {
  cursor: pointer;
}
button:hover {
  background: var(--pale);
}
button:disabled {
  opacity: .5;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #ca8852;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  font-family:
    Georgia,
    "Times New Roman",
    serif;
  font-weight: 400;
  line-height: 1.15;
}
h1 {
  font-size: clamp(42px, 5.5vw, 76px);
  letter-spacing: -2px;
}
h2 {
  font-size: 27px;
}
h3 {
  font-size: 23px;
}
h4 {
  font-size: 20px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #6a7866;
}
.fine,
.scope-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}
.scope-note {
  max-width: 700px;
  margin: 14px 0 24px;
}
.primary {
  background: var(--ink);
  color: #fffdf3;
  border: 0;
}
.primary:hover {
  background: #2b5b4d;
}
.quiet {
  background: transparent;
  border-color: transparent;
}
.pill {
  background: var(--pale);
  padding: 6px 10px;
  border-radius: 22px;
  font-size: 11px;
  white-space: nowrap;
}
.skip {
  position: fixed;
  top: -100px;
}
.skip:focus {
  top: 5px;
  left: 5px;
  z-index: 2000;
  background: white;
  padding: 12px;
}
.atlas-header {
  padding: 20px max(24px, calc((100vw - 1280px)/2));
  display: flex;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font: bold 30px Georgia;
  text-decoration: none;
  white-space: nowrap;
}
.brand > span {
  color: var(--accent);
}
.brand small {
  display: inline-block;
  font: 8px system-ui;
  letter-spacing: 1.4px;
  margin-left: 10px;
}
.atlas-name {
  font-size: 10px;
  letter-spacing: 2px;
  border-left: 1px solid var(--line);
  padding-left: 30px;
}
.atlas-header > button {
  margin-left: auto;
  font-size: 12px;
}
main {
  max-width: 1280px;
  padding: 0 24px;
  margin: auto;
}
.moment-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 46px 0 28px;
}
.moment-hero h1 {
  margin-bottom: 20px;
}
.moment-hero h1 span#world-year {
  color: var(--accent);
}
.year-dot {
  color: #b7bca9;
}
.moment-hero > div > p:not(.eyebrow) {
  max-width: 740px;
}
.moment-hero > button {
  padding: 16px 22px;
  min-width: 160px;
}
.moment-hero > button span {
  padding-left: 20px;
}
.story-paths {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.story-paths button {
  border-radius: 2px;
  background: transparent;
  text-align: left;
  min-width: 176px;
  font-size: 12px;
  border: 0;
  border-left: 2px solid #c6cdb9;
}
.story-paths button span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.time-rail {
  background: var(--ink);
  color: #fffbed;
  border-radius: 15px;
  padding: 20px 24px;
}
.time-topline,
.time-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  color: #c4d1bb;
}
.time-topline strong {
  font: 19px Georgia;
  color: #fffbed;
}
.time-track {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 20px;
  align-items: center;
  margin: 14px 0 8px;
}
.time-track > button {
  background: #31564b;
  border: 0;
  color: white;
  border-radius: 50%;
  font-size: 22px;
  padding: 4px;
}
.time-track input {
  width: 100%;
  min-height: 32px;
  padding: 0;
  margin: 0;
  accent-color: #dbab73;
  border: 0;
  background: transparent;
  cursor: ew-resize;
}
#ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #c4d1bb;
}
.time-bottomline button {
  color: white;
}
.time-bottomline p {
  font-size: 10px;
}
#time-settings {
  border-top: 1px solid #577060;
  margin-top: 12px;
  padding-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}
#time-settings[hidden] {
  display: none;
}
#time-settings label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  flex: 1;
  min-width: 135px;
}
#time-settings input,
#time-settings select {
  width: 100%;
  background: #fcf9ee;
  color: var(--ink);
}
#time-settings .fine {
  flex-basis: 100%;
  color: #d6dfcf;
}
#time-error {
  flex-basis: 100%;
  color: #ffc99a;
}
.lens-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 34px 0 18px;
}
.lens-heading h2 {
  font-size: 25px;
}
.lenses {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.lenses button {
  background: transparent;
  border-radius: 24px;
  font-size: 12px;
}
.lenses button[aria-pressed=true] {
  background: #e5eadb;
  border-color: #aaba9b;
}
.view-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
}
.view-tabs {
  display: flex;
  gap: 8px;
}
.view-tabs button {
  border: 0;
  background: transparent;
  border-radius: 0;
}
.view-tabs button[aria-selected=true] {
  border-bottom: 2px solid var(--accent);
  font-weight: 700;
}
.region-picker {
  font-size: 11px;
  color: var(--muted);
}
.region-picker select {
  margin-left: 8px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.context-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 50px;
}
.context-overview {
  min-width: 0;
}
.world-sidebar {
  border-left: 1px solid var(--line);
  padding-left: 26px;
}
.world-sidebar h2 {
  font-size: 22px;
  margin-bottom: 10px;
}
#world-content {
  padding: 30px 0 0;
}
#filter-status {
  margin-top: 10px;
}
#load-status:not(:empty) {
  margin: 18px 0;
  background: #e7eadb;
  padding: 18px;
}
.context-card {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 15px;
}
.context-number {
  font: 22px Georgia;
  color: #a79c81;
  padding-top: 2px;
}
.card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 9px;
  text-transform: uppercase;
  letter-spacing: .8px;
}
.context-card h3 {
  margin-bottom: 12px;
}
.context-card .summary {
  font-size: 14px;
  line-height: 1.8;
  max-width: 650px;
}
.context-card details {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}
.context-card summary {
  cursor: pointer;
  min-height: 36px;
  line-height: 36px;
}
.sources {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  font-size: 12px;
}
.source-note {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 8px;
}
.region-card {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.region-card > button {
  font: 20px Georgia;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0;
  display: block;
}
.region-card p {
  font-size: 12px;
  margin: 7px 0;
  color: var(--muted);
}
.region-card .region-compare {
  font: 11px system-ui;
  min-height: 38px;
  color: var(--accent);
}
.period-section {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.period-section h2 {
  font-size: 23px;
}
.period-band {
  margin: 18px 0;
  font-size: 12px;
}
.band-line {
  height: 7px;
  background: #e2e8d9;
  border-radius: 5px;
  position: relative;
  margin: 8px 0;
}
.band-fill {
  height: 7px;
  background: #9aaa84;
  position: absolute;
  border-radius: 5px;
}
.period-band button {
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 30px;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.map-viewport {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
#map {
  height: 510px;
  background: #dae7e5;
  z-index: 0;
}
.atlas-marker {
  background: transparent;
  border: 0;
}
.atlas-marker > span {
  display: block;
  background: #fffdf2;
  border: 1px solid #b9c6ab;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 11px;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 4px 20px #12392a25;
}
.atlas-marker.selected > span {
  background: var(--ink);
  color: white;
}
.leaflet-tooltip {
  max-width: 260px;
  white-space: normal;
}
#map-summary {
  padding: 20px 0;
}
.compare-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 25px 0 14px;
}
.compare-options label {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
}
input[type=checkbox] {
  min-height: 18px;
  width: 18px;
  accent-color: var(--ink);
}
#comparison {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.compare-panel {
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 10px;
  background: #fffdf6;
}
.compare-panel > h3 {
  color: var(--accent);
  margin-bottom: 20px;
}
.compare-panel .context-card {
  grid-template-columns: 1fr;
  padding: 20px 0;
}
.compare-panel .context-number {
  display: none;
}
.compare-panel .context-card h3 {
  font-size: 21px;
}
.events-section,
.evidence-section {
  padding-top: 40px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.events-section h2,
.evidence-section h2 {
  font-size: 29px;
}
.search-line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  margin: 20px 0;
}
.search-line input {
  width: min(420px, 100%);
}
#events,
#evidence-records {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.event-card,
.evidence-card {
  border: 1px solid var(--line);
  padding: 20px;
  background: #fffdf6;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.event-card .event-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}
.event-card h3 {
  font-size: 22px;
}
.event-card p {
  font-size: 12px;
  color: var(--muted);
}
.event-card .event-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.event-card button {
  font-size: 11px;
  min-height: 42px;
}
.event-card .when {
  background: var(--pale);
  padding: 4px 8px;
  border-radius: 12px;
  width: fit-content;
  font-size: 10px;
}
.evidence-card h3 {
  font-size: 20px;
}
.evidence-card p {
  font-size: 12px;
}
.empty {
  padding: 25px;
  border: 1px dashed #bdc8ad;
  border-radius: 8px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
}
.show-more {
  margin-top: 18px;
}
footer {
  padding: 50px 0;
  max-width: 850px;
  color: var(--muted);
  font-size: 12px;
}
footer strong {
  font: 25px Georgia;
  color: var(--ink);
}
footer p {
  margin: 15px 0;
}
footer a {
  margin-right: 25px;
  display: inline-block;
  margin-top: 8px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  max-width: 650px;
  width: calc(100vw - 28px);
  max-height: calc(100dvh - 40px);
  background: var(--paper);
  padding: 30px;
  color: var(--ink);
}
dialog:not([open]) {
  display: none;
}
dialog::backdrop {
  background: #163a31aa;
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.dialog-heading button,
.close {
  min-width: 44px;
}
.close {
  float: right;
}
dialog label {
  display: grid;
  gap: 8px;
  font-size: 12px;
}
dialog h2 {
  font-size: 30px;
  margin-bottom: 15px;
}
dialog p {
  margin: 12px 0;
}
#jump-results button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px;
  margin-top: 8px;
  background: #fffdf6;
}
#jump-results strong,
#jump-results small {
  display: block;
}
#jump-results small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
#coverage > p {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
[hidden] {
  display: none !important;
}
#evidence-status {
  margin: 15px 0;
}
.evidence-section > div > label {
  font-size: 12px;
}
.evidence-card .sources {
  overflow-wrap: anywhere;
}
@media (max-width: 850px) {
  .context-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .world-sidebar {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 25px 0;
  }
  .world-sidebar > div {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 24px;
  }
  #comparison {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #events,
  #evidence-records {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .atlas-name {
    display: none;
  }
  .moment-hero {
    align-items: start;
  }
  .moment-hero > button {
    min-width: 135px;
    padding: 12px;
  }
}
@media (max-width: 560px) {
  main {
    padding: 0 18px;
  }
  .atlas-header {
    padding: 15px 18px;
  }
  .brand {
    font-size: 25px;
  }
  .brand small {
    font-size: 7px;
    max-width: 60px;
    white-space: normal;
    line-height: 1.5;
  }
  .atlas-header > button {
    font-size: 10px;
    padding: 5px;
  }
  .moment-hero {
    display: block;
    padding-top: 32px;
  }
  .moment-hero h1 {
    font-size: 44px;
    letter-spacing: -1.6px;
    max-width: 330px;
  }
  .moment-hero > button {
    margin-top: 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  .moment-hero #moment-description {
    font-size: 13px;
  }
  .story-paths {
    margin-bottom: 20px;
  }
  .time-rail {
    padding: 16px 13px;
    border-radius: 10px;
  }
  .time-topline {
    gap: 6px;
    font-size: 9px;
    flex-wrap: wrap;
  }
  .time-topline strong {
    font-size: 16px;
    order: -1;
    flex-basis: 100%;
    margin-bottom: 5px;
  }
  .time-track {
    gap: 10px;
  }
  .time-bottomline {
    display: block;
  }
  .time-bottomline p {
    font-size: 9px;
  }
  .time-bottomline button {
    display: block;
    margin: auto;
    font-size: 11px;
  }
  .lens-heading {
    margin-top: 26px;
  }
  .lens-heading h2 {
    font-size: 23px;
  }
  .lenses {
    gap: 6px;
  }
  .lenses button {
    font-size: 10px;
    padding: 5px 10px;
    min-height: 40px;
  }
  .view-bar {
    display: block;
  }
  .view-tabs {
    gap: 4px;
    justify-content: space-between;
  }
  .view-tabs button {
    font-size: 12px;
    padding: 9px 8px;
  }
  .region-picker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
  }
  .region-picker select {
    width: 75%;
  }
  .section-head {
    align-items: start;
  }
  .section-head h2 {
    font-size: 24px;
  }
  .context-card {
    grid-template-columns: 28px 1fr;
    gap: 9px;
  }
  .context-card .summary {
    font-size: 13px;
    line-height: 1.75;
  }
  .context-card h3 {
    font-size: 23px;
  }
  .card-meta {
    font-size: 9px;
    flex-wrap: wrap;
  }
  .scope-note {
    font-size: 11px;
  }
  .context-count {
    font-size: 9px;
  }
  .world-sidebar > div {
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }
  .region-card > button {
    font-size: 19px;
  }
  .region-card p {
    font-size: 11px;
  }
  #map {
    height: 400px;
  }
  #comparison {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 15px;
    gap: 14px;
  }
  .compare-panel {
    flex: 0 0 90%;
    scroll-snap-align: start;
    padding: 18px;
  }
  #events,
  #evidence-records {
    grid-template-columns: 1fr;
  }
  .search-line {
    display: block;
  }
  .search-line input {
    display: block;
    width: 100%;
    margin-top: 8px;
  }
  .period-section .section-head {
    display: block;
  }
  .time-track #ticks span:nth-child(2),
  .time-track #ticks span:nth-child(4) {
    display: none;
  }
  #time-settings label {
    min-width: 110px;
  }
  dialog {
    padding: 24px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .events-section {
    margin-top: 28px;
    padding-top: 28px;
  }
}
#lens-settings {
  margin-top: 25px;
}
#lens-settings > summary {
  display: none;
  cursor: pointer;
  min-height: 44px;
  font-size: 12px;
  line-height: 44px;
}
#lens-settings .lens-heading {
  margin-top: 12px;
}
#lens-summary {
  font-size: 10px;
  color: var(--muted);
}
.view-bar > #reset-filters {
  font-size: 11px;
}
@media (max-width: 560px) {
  #lens-settings {
    margin-top: 14px;
  }
  #lens-settings > summary {
    display: list-item;
    list-style-position: inside;
    border-bottom: 1px solid var(--line);
  }
  #lens-settings .lens-heading {
    margin: 16px 0 12px;
  }
  .lenses {
    margin-bottom: 16px;
  }
  .moment-hero {
    padding-top: 24px;
    padding-bottom: 20px;
  }
  .moment-hero h1 {
    font-size: 40px;
    margin-bottom: 14px;
  }
  .moment-hero .eyebrow {
    margin-bottom: 9px;
  }
  .moment-hero > button {
    margin-top: 14px;
  }
  .time-bottomline p {
    display: none;
  }
  .time-bottomline button {
    min-height: 34px;
  }
  .view-bar > #reset-filters {
    float: right;
    font-size: 10px;
    padding: 4px;
  }
  .story-paths button {
    min-width: 154px;
    font-size: 11px;
  }
  .view-bar {
    padding-top: 12px;
  }
  .context-overview > .section-head h2 {
    font-size: 25px;
  }
  .context-card {
    padding: 21px 0;
  }
  .context-overview .scope-note {
    margin-bottom: 14px;
  }
}
#world-year {
  white-space: nowrap;
}
.glance-section {
  margin: 0 0 28px;
}
#glance-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.glance-card {
  background: #e9ecdf;
  border: 1px solid #d4dbc8;
  border-radius: 10px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.glance-card:nth-child(2) {
  background: #eee7d8;
  border-color: #e1d9c6;
}
.glance-card:nth-child(3) {
  background: #e1e9e3;
  border-color: #cddbd0;
}
.glance-card h3 {
  font-size: 24px;
  margin-bottom: 12px;
}
.glance-summary {
  font-size: 12px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.glance-card button {
  font-size: 11px;
  text-align: left;
  padding: 8px 0;
  margin-top: auto;
}
.glance-card .card-meta {
  margin-bottom: 10px;
}
.glance-section > .eyebrow {
  margin-bottom: 14px;
}
@media (max-width: 560px) {
  #glance-cards {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 10px;
  }
  .glance-card {
    flex: 0 0 86%;
    scroll-snap-align: start;
    padding: 18px;
  }
  .glance-card h3 {
    font-size: 24px;
  }
  .glance-section {
    margin-bottom: 18px;
  }
  .glance-summary {
    -webkit-line-clamp: 3;
  }
  .moment-hero #anchor-note {
    font-size: 10px;
    max-height: 34px;
    overflow: auto;
  }
  .glance-card > button {
    min-height: 44px;
  }
}
.coverage-table {
  overflow: auto;
  max-width: 100%;
  margin: 25px 0;
}
.coverage-table table {
  border-collapse: collapse;
  min-width: 650px;
  font-size: 10px;
}
.coverage-table th,
.coverage-table td {
  border: 1px solid var(--line);
  padding: 8px;
  text-align: center;
}
.coverage-table th:first-child {
  text-align: left;
}
.coverage-table h3 {
  font-size: 22px;
}
.coverage-table p {
  font-size: 11px;
  color: var(--muted);
}

/* Learning Studio navigation: same desktop shell and destinations as Discover. */

.timeline-page { --studio-deep:#173b3b; --studio-line:#e3e5dc; }

.timeline-shell { margin-left:var(--studio-sidebar-width); min-width:0; }
.timeline-shell .atlas-header { padding:20px max(24px, calc((100vw - 1518px)/2)); gap:20px; }

/* Account for the persistent rail when choosing atlas column counts. */
@media (min-width:761px) and (max-width:1088px) {
  .context-layout { grid-template-columns:1fr; gap:25px; }
  .world-sidebar { border-left:0; border-top:1px solid var(--line); padding:25px 0; }
  .world-sidebar > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; }
  #comparison, #events, #evidence-records { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .atlas-name { display:none; }
}
@media (max-width:1200px) and (min-width:761px) {
  .timeline-shell .atlas-name { display:none; }
  .context-layout { gap:28px; }
  .view-bar { flex-wrap:wrap; }
  .moment-hero h1 { font-size:clamp(40px,4.8vw,62px); }
  .glance-card { padding:18px; }
  .glance-card h3 { font-size:21px; }
}
@media (max-width:760px) {

  /* Keep the studio menu reachable after event jumps and long map scrolling. */
  html { scroll-padding-bottom:var(--studio-mobile-nav-height); }
  .timeline-shell { margin-left:0; padding-bottom:var(--studio-mobile-nav-height); }
  .timeline-page .studio-mobile-nav { z-index:1100; }

  .timeline-shell .atlas-header { padding:18px 24px; }
}
@media (max-width:560px) {

  .timeline-shell .atlas-header { padding:15px 18px; }
  .timeline-shell .atlas-name { display:none; }
}

@media (min-width:761px) and (max-width:1000px) {

  .timeline-shell { margin-left:205px; }
  .moment-hero { display:block; }
  .moment-hero > button { margin-top:18px; }
  #glance-cards { gap:12px; }
  .glance-card { padding:14px; }
  .glance-card h3 { font-size:20px; }
}

/* Historical Timeline: an illustrated editorial introduction, with evidence kept distinct. */
.timeline-page { --paper:#f8f4eb; --line:#e0d9c9; --accent:#a44d2d; --muted:#58685e; background:radial-gradient(ellipse at 80% 0%,#f0e3c9 0,transparent 42%),var(--paper); }
.timeline-shell .atlas-header { background:rgba(255,253,247,.8); }

.moment-hero { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); align-items:center; gap:38px; padding:36px 0 32px; }
.moment-hero h1 { font-size:clamp(42px,4.5vw,70px); line-height:1.02; letter-spacing:-2px; margin-bottom:16px; }
.moment-hero h1 em { font-weight:400; color:var(--accent); }
.history-welcome { max-width:460px; font-size:14px; color:var(--muted); line-height:1.75; }
.selected-moment { margin-top:24px; padding:18px 0 0; border-top:1px solid #cfb995; }
.selected-moment .eyebrow { margin-bottom:8px; color:#895330; }
.selected-moment .moment-title { font-size:clamp(25px,2.5vw,36px); margin-bottom:12px; }
.selected-moment #world-year { color:var(--accent); white-space:normal; }
.selected-moment #moment-description { font-size:13px; line-height:1.6; }
.selected-moment #anchor-note { margin-top:6px; }
.selected-moment .primary { margin-top:15px; padding:11px 20px; box-shadow:0 4px 12px #173b3b18; }
.selected-moment .primary span { margin-left:22px; }
.history-collection { min-width:0; }
.history-gallery { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.history-object { margin:0; min-width:0; background:#fffdf7; border:1px solid #dfd4c0; border-radius:14px; padding:7px; box-shadow:0 8px 24px #513a1d0c; }
.history-object a { display:block; overflow:hidden; border-radius:8px; background:#eee7d9; }
.history-object img { width:100%; height:135px; display:block; object-fit:contain; }
.history-object-wave { transform:rotate(-2deg); }
.history-object-wave img { object-fit:cover; }
.history-object-sphinx img { object-fit:cover; }
.history-object-shiva { transform:rotate(2deg); }
.history-object figcaption { display:grid; padding:9px 4px 4px; gap:3px; }
.history-object figcaption strong { font:16px Georgia,serif; }
.history-object figcaption span { font-size:9px; color:#5b655b; line-height:1.4; }
.collection-note { font-size:10px; color:#616b60; line-height:1.6; margin:13px 4px 0; }
.collection-note a { white-space:nowrap; }
.glance-card { border-radius:16px; box-shadow:0 5px 16px #243d2f08; border-top:4px solid #879969; }
.glance-card:nth-child(2) { border-top-color:#c4995a; }
.glance-card:nth-child(3) { border-top-color:#65918e; }
.story-paths { flex-wrap:wrap; overflow:visible; gap:8px; }
.story-paths button { background:#fffcf4; border:1px solid #ded3bb; border-radius:10px; flex:1 1 150px; min-width:0; padding:12px 14px; }
.story-paths button:hover { background:#eee5d3; }
.time-rail { box-shadow:0 12px 24px #163f3914; border:1px solid #34564b; }
.context-card { background:#fffdf8; border:1px solid #e4ddcd; border-radius:12px; padding:22px 20px; margin-bottom:12px; }
.context-number { width:34px; height:34px; display:grid; place-items:center; padding:0; background:#f0e7d6; color:#84653e; border-radius:50%; font-size:17px; }
.context-card .summary { font-size:14px; }
.event-card { border-radius:13px; border-top:3px solid #c5a36e; box-shadow:0 4px 14px #523c1b06; }
.event-card .event-date { color:#8b452c; }
.event-card .when { background:#edf0e4; color:#42543e; }
.image-credits { margin:32px 0; border:1px solid var(--line); background:#fffcf5; padding:16px 20px; border-radius:12px; font-size:12px; color:var(--muted); }
.image-credits summary { cursor:pointer; min-height:30px; font-weight:600; color:var(--ink); }
.image-credits li { margin-top:12px; line-height:1.7; }
.image-credits p { margin-top:12px; }
@media (min-width:761px) and (max-width:1000px) {
 .moment-hero { grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:20px; }
 .moment-hero h1 { font-size:42px; }
 .history-object img { height:105px; }
 .history-object figcaption strong { font-size:14px; }
 .history-gallery { gap:8px; }
}
@media (max-width:760px) {
 .moment-hero { grid-template-columns:1fr; gap:22px; padding-top:26px; }
 .moment-hero h1 { font-size:48px; }
 .moment-hero h1 br { display:none; }
 .moment-hero h1 em::before { content:' '; }
 .history-gallery { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
 .history-object img { height:90px; }
 .history-object figcaption strong { font-size:12px; }
 .history-object figcaption span { font-size:8px; }
 .selected-moment { margin-top:18px; }
 .context-card { padding:18px 14px; grid-template-columns:32px minmax(0,1fr); gap:10px; }
 .story-paths button { flex-basis:130px; }
}
@media (max-width:480px) {
 .history-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .history-object img { height:105px; }
 .history-object figcaption strong { font-size:15px; }
 .history-object figcaption span { font-size:9px; }
 .moment-hero h1 { font-size:43px; letter-spacing:-1.5px; }
 .history-object { transform:none; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

/* Catalogue-first history explorer. The map and time controls are one workspace. */
.timeline-page { --ink:#173e3b; --accent:#a94a2d; --paper:#f6f4ed; background:var(--paper); }
.timeline-shell main { max-width:1440px; padding:0 36px; }
.timeline-shell .atlas-header { padding:17px 36px; background:#faf9f4; }
.explorer-hero { padding:35px 0 28px; }
.explorer-heading { display:flex; justify-content:space-between; align-items:center; gap:24px; }
.explorer-heading .eyebrow { color:#826545; font-size:9px; letter-spacing:2px; }
.explorer-heading h1 { font-size:clamp(38px,4.1vw,65px); line-height:1.06; letter-spacing:-2.5px; }
.explorer-heading h1 em { color:var(--accent); font-weight:400; }
.explorer-intro { font-size:14px; color:#5a6c66; margin-top:15px; }
.compass-art { width:172px; height:172px; flex-shrink:0; border:1px solid #cec3a9; border-radius:50%; display:grid; place-content:center; text-align:center; position:relative; margin-right:30px; background:repeating-radial-gradient(circle,transparent 0 37px,#e5dfcf 38px 39px,transparent 40px 62px); }
.compass-art::before,.compass-art::after { content:''; position:absolute; inset:18px; border:1px solid #d3c7ae; border-radius:50%; }
.compass-art::after { inset:42px -18px; transform:rotate(-35deg); border-color:#b9c5b3; }
.compass-art > span { font-size:9px; color:#8a6c46; }
.compass-art > div { font-size:68px; line-height:1.05; color:#a85735; font-family:Georgia,serif; }
.compass-art > small { font-size:5px; letter-spacing:1.8px; color:#5a7567; }
.explore-entry { margin-top:27px; background:#fffdf7; border:1px solid #dcd8c8; border-radius:17px; box-shadow:0 9px 35px #30433a07; overflow:hidden; }
.entry-tabs { display:flex; border-bottom:1px solid #e2ddcf; padding:0 24px; gap:26px; background:#eeeee4; }
.entry-tabs button { border:0; border-bottom:3px solid transparent; border-radius:0; background:transparent; color:#6b7469; font-size:11px; min-height:52px; padding:12px 1px; display:flex; align-items:center; gap:9px; }
.entry-tabs button span { font-size:13px; }
.entry-tabs button[aria-selected=true] { border-bottom-color:#a65b39; color:#153f37; font-weight:650; }
#moment-entry,#century-entry { padding:20px 24px 16px; }
#explore-form > label { display:block; font-size:11px; font-weight:600; color:#506357; margin-bottom:9px; }
.explore-search { display:flex; align-items:center; border:1px solid #c6cebf; border-radius:9px; padding:5px; gap:6px; background:#fff; }
.explore-search > span { font-size:26px; color:#8c986f; margin-left:10px; }
.explore-search input { border:0; background:transparent; flex:1; width:0; min-width:0; padding:9px; font-size:16px; }
.explore-search button { padding:6px; min-width:44px; min-height:44px; border:0; border-radius:6px; background:transparent; color:#244d40; font-size:24px; }
.explore-search button span { margin:0; }
#explore-help { font-size:10px; color:#62746a; margin-top:8px; }
#explore-status:not(:empty) { font-size:12px; color:#654e31; padding:0 24px 17px; }
#event-picker-panel { margin-top:7px; border:1px solid #c6cebf; border-radius:9px; background:#fff; overflow:hidden; box-shadow:0 8px 24px #173e3b0c; }
#explore-list-heading { padding:10px 14px; margin:0; background:#f1f2e9; font-size:11px; color:#526555; }
#explore-results { max-height:320px; overflow-y:auto; overscroll-behavior:contain; scroll-padding:4px; }
.event-option { padding:12px 16px; min-height:68px; border-bottom:1px solid #e9e8dd; cursor:pointer; touch-action:pan-y; }
.event-option:hover,.event-option[aria-selected=true] { background:#eaf0e4; box-shadow:inset 3px 0 #315d42; }
.event-option strong,.event-option small { display:block; overflow-wrap:anywhere; }
.event-option strong { font-size:14px; font-weight:600; color:#1b4237; }
.event-option small { font-size:11px; line-height:1.5; color:#566a5d; margin-top:3px; }
.event-option .event-choice-kind { font-size:10px; color:#696b5c; }
#explore-empty { margin:0; padding:22px 16px; font-size:13px; color:#66513b; }
#explore-more { margin:9px 12px; min-height:44px; font-size:12px; }
.explore-search:focus-within { outline:2px solid #356a51; outline-offset:2px; }
#century-explore-form > p { font-size:12px; color:#657268; }
.century-inputs { display:flex; gap:14px; align-items:end; margin-top:14px; flex-wrap:wrap; }
.century-inputs label { display:grid; gap:4px; font-size:10px; }
.century-inputs input { width:92px; }
#century-preview { align-self:center; font-size:12px; color:#88603c; }
.entry-examples { display:grid; grid-template-columns:auto repeat(3,minmax(0,1fr)); gap:12px; align-items:center; margin-top:17px; }
.entry-examples > span { font-size:8px; letter-spacing:1.3px; color:#76816f; max-width:50px; }
.entry-examples button { display:flex; align-items:center; gap:11px; text-align:left; border:0; border-left:1px solid #d7cfba; border-radius:0; background:transparent; padding:3px 10px 3px 18px; font-size:12px; }
.entry-examples button > span:last-child { margin-left:auto; color:#a6613b; }
.entry-examples small { display:block; font-size:9px; color:#738072; margin-top:2px; }
.example-symbol { background:#ece6d5; border-radius:50%; width:33px; height:33px; flex-shrink:0; display:grid; place-items:center; font:18px Georgia; color:#9b6039; }
.journey-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; border-top:1px solid #d5cfbc; padding:25px 0 17px; scroll-margin-top:15px; }
.journey-heading .eyebrow { margin-bottom:6px; font-size:8px; color:#826545; }
.journey-heading h2 { font-size:31px; letter-spacing:-.6px; }
#world-year { color:#a45535; }
.journey-heading #moment-description { font-size:12px; max-width:660px; margin-top:7px; }
.journey-heading #anchor-note { font-size:10px; max-width:750px; margin-top:5px; line-height:1.5; }
.journey-heading > button { white-space:nowrap; font-size:11px; }
.time-rail { padding:18px 22px 14px; background:#173e3b; border:0; border-radius:12px; box-shadow:none; }
.interval-toolbar { display:flex; justify-content:space-between; align-items:center; gap:14px; border-bottom:1px solid #49645a; padding-bottom:14px; margin-bottom:11px; }
.interval-toolbar .eyebrow { color:#b6cab9; font-size:8px; display:block; margin-bottom:8px; }
.radius-presets { display:flex; gap:6px; flex-wrap:wrap; }
.radius-presets button { min-height:36px; padding:6px 11px; font-size:11px; background:#2e5149; border:1px solid #4b6b5c; color:#e7ebdf; border-radius:5px; }
.radius-presets button[aria-pressed=true] { background:#dfb77c; color:#193d34; border-color:#dfb77c; font-weight:700; }
#radius-form { display:flex; gap:6px; align-items:end; }
#radius-form label { display:grid; gap:5px; font-size:9px; color:#c1cfbc; }
#radius-years { width:85px; background:#244a43; color:#fff7e4; border-color:#536b5e; min-height:36px; padding:6px 8px; border-radius:5px; }
#radius-form button { min-height:44px; font-size:11px; padding:6px 10px; background:#dfb77c; color:#193d34; border-color:#dfb77c; font-weight:700; }
#radius-form button:hover { background:#efcb94; border-color:#efcb94; }
#interval-description { font-size:11px; color:#eee5d0; margin-bottom:10px; }
#interval-error { color:#ffe0af; font-size:12px; }
.time-topline { font-size:9px; }
.time-topline strong { font-size:15px; }
.time-track { margin:7px 0 0; gap:13px; grid-template-columns:36px 1fr 36px; }
.time-track > button { min-height:36px; }
.time-bottomline > p { font-size:9px; }
.time-bottomline button { font-size:10px; min-height:34px; }
#lens-settings { margin:18px 0 0; padding:0; border-bottom:1px solid var(--line); }
#lens-settings > summary { min-height:44px; cursor:pointer; font-size:11px; }
#lens-settings .lens-heading { display:none; }
#lenses { padding-bottom:15px; }
.view-bar { margin-top:18px; margin-bottom:10px; }
.view-tabs button { font-size:12px; }
#filter-status { font-size:10px; margin-bottom:13px; }
#map-view > .section-head { margin-bottom:6px; }
#map-view > .section-head h2 { font-size:26px; }
#map-view > .section-head .eyebrow { margin-bottom:4px; font-size:8px; }
#map-view > .scope-note { max-width:none; font-size:10px; margin:8px 0; }
#map-count { margin-bottom:12px; font-size:10px; }
.map-workspace { display:grid; grid-template-columns:minmax(0,1fr) 270px; background:#faf9f2; border:1px solid #d1d6c9; border-radius:13px; overflow:hidden; }
.map-viewport { border:0; border-radius:0; min-width:0; }
#map { height:490px; background:#e0e9e2; }
#map-summary { padding:22px 18px; border-left:1px solid #d1d6c9; max-height:490px; overflow-y:auto; }
#map-summary > h3 { font-size:22px; margin-bottom:9px; }
#map-summary > .fine { font-size:10px; margin-bottom:13px; }
#map-summary .context-card { display:block; background:transparent; padding:15px 0; border:0; border-top:1px solid #ddd9c9; border-radius:0; margin:0; }
#map-summary .context-number { display:none; }
#map-summary .card-meta { font-size:8px; }
#map-summary .context-card h3 { font-size:19px; }
#map-summary .context-card .summary { font-size:11px; line-height:1.6; }
#map-summary .context-card summary { font-size:10px; }
#map-summary > button { font-size:11px; margin-top:12px; }
.atlas-marker > span { background:#fbfcf1d9; border:1px solid #c0cbb7; font-size:9px; padding:6px 8px; color:#4c6d5c; box-shadow:0 2px 7px #163d2a0e; }
.history-pin { border:3px solid #fff9ea; border-radius:50%; background:#a95534; box-shadow:0 2px 6px #213e3a50; }
.history-pin:focus-visible { outline:3px solid #133d32; outline-offset:4px; }
.history-cluster { background:#224e45; color:#fff5d6; display:grid; place-items:center; font-size:12px; font-weight:650; border:3px solid #f0e4c4; }
.map-legend { display:flex; gap:18px; flex-wrap:wrap; margin:9px 0 0; font-size:9px; color:#617165; }
.map-legend span { display:flex; align-items:center; gap:6px; }
.legend-dot,.legend-cluster { width:8px; height:8px; border-radius:50%; background:#a95534; display:inline-block; }
.legend-cluster { background:#224e45; width:12px; height:12px; }
.map-record-popup > div { border-bottom:1px solid #ddd; padding:9px 0; }
.map-record-popup p { font-size:10px; margin:5px 0; }
.map-record-popup strong { font-size:12px; }
.map-record-popup button { font-size:10px; min-height:36px; padding:6px 8px; }
.map-record-popup > .eyebrow { font-size:8px; }
.glance-section { margin-top:26px; }
.glance-card { border-radius:10px; box-shadow:none; }
.glance-card h3 { font-size:23px; }
.glance-summary { font-size:12px; }
.story-paths { margin-top:32px; }
.image-credits .history-collection { margin:16px 0; max-width:700px; }
.image-credits .history-object { transform:none; }
@media (max-width:1200px) and (min-width:761px) {
 .timeline-shell main { padding:0 24px; }
 .compass-art { width:125px; height:125px; margin-right:10px; }
 .compass-art > div { font-size:49px; }
 .entry-examples { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
 .entry-examples > span { display:none; }
 .entry-examples button { padding-left:10px; font-size:10px; }
 .example-symbol { width:25px; height:25px; }
 .map-workspace { grid-template-columns:1fr; }
 #map-summary { display:grid; grid-template-columns:1fr 1fr; gap:10px 18px; max-height:none; border-left:0; border-top:1px solid #d1d6c9; }
 #map-summary > h3,#map-summary > .fine { grid-column:1/-1; }
 #map-summary > button { justify-self:start; }
}
@media (max-width:760px) {
 .timeline-shell main { padding:0 20px; }
 .timeline-shell .atlas-header { padding:13px 20px; }
 .explorer-hero { padding-top:23px; }
 .explorer-heading h1 { font-size:clamp(38px,7vw,56px); }
 .compass-art { width:100px; height:100px; margin-right:9px; }
 .compass-art > div { font-size:36px; }
 .compass-art > small { display:none; }
 .explorer-intro { font-size:12px; }
 .entry-examples { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
 .entry-examples > span { display:none; }
 .entry-examples button { padding:5px 7px; gap:7px; font-size:10px; }
 .entry-examples small { font-size:8px; }
 .example-symbol { display:none; }
 .entry-examples button > span:last-child { display:none; }
 .journey-heading h2 { font-size:29px; }
 .journey-heading > button { font-size:10px; padding:6px; white-space:normal; width:90px; }
 .map-workspace { grid-template-columns:1fr; }
 #map { height:370px; }
 #map-summary { border:0; border-top:1px solid #d1d6c9; max-height:none; }
 #map-summary .context-card { padding:12px 0; }
 #map-summary .context-card .summary { font-size:12px; }
 #map-summary .context-card:nth-of-type(2) { display:none; }
 #explore-results { max-height:290px; }
}
@media (max-width:480px) {
 .timeline-shell main { padding:0 15px; }
 .compass-art { display:none; }
 .explorer-heading h1 { font-size:39px; letter-spacing:-1.7px; }
 .explorer-heading .eyebrow { font-size:7px; letter-spacing:1.5px; }
 .explore-entry { margin-top:21px; }
 .entry-tabs { gap:20px; padding:0 15px; }
 .entry-tabs button span { font-size:11px; }
 .entry-tabs button { font-size:9px; }
 #moment-entry,#century-entry { padding:16px 14px; }
 .explore-search { padding:4px; gap:1px; }
 .explore-search input { font-size:16px; width:0; flex:1; padding:8px 5px; }
 .explore-search > span { margin-left:4px; }
 .explore-search button { min-width:44px; width:44px; min-height:44px; padding:5px; }
 #explore-help { line-height:1.6; font-size:9px; }
 .explorer-hero { padding-bottom:21px; }
 .journey-heading { align-items:start; padding-top:21px; }
 .journey-heading h2 { font-size:25px; }
 .journey-heading #moment-description { font-size:11px; }
 .journey-heading #anchor-note { font-size:10px; }
 .interval-toolbar { flex-direction:column; align-items:stretch; gap:10px; }
 #radius-form { align-items:center; }
 #radius-form label { display:flex; align-items:center; gap:7px; }
 .time-rail { padding:15px 13px 10px; }
 .radius-presets { gap:5px; }
 .radius-presets button { flex:1; padding:7px 6px; min-height:44px; }
 .time-topline { flex-wrap:wrap; gap:5px 10px; }
 .time-topline strong { order:-1; width:100%; }
 #step-status { margin-left:auto; }
 #ticks { font-size:8px; }
 #ticks span:nth-child(2),#ticks span:nth-child(4) { visibility:hidden; }
 .time-bottomline { gap:6px; align-items:start; }
 .time-bottomline p { max-width:155px; }
 .view-bar { gap:9px; }
 .view-tabs { width:100%; }
 .view-tabs button { flex:1; padding:8px; font-size:11px; }
 .region-picker { width:100%; justify-content:space-between; }
 #map-view > .section-head h2 { font-size:24px; }
 #map-view #reset-map { font-size:10px; }
 #map-summary { padding:18px; }
 .century-inputs { gap:10px; }
 .century-inputs button { width:100%; }
 #century-preview { order:-1; width:100%; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; } }

/* Visible map navigation also works without a drag gesture. */
.map-pan-controls { display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin:12px 0; }
.map-pan-controls > span { font-size:11px; color:#526555; margin-right:3px; }
.map-pan-controls button { min-width:70px; min-height:44px; padding:6px 10px; font-size:12px; background:#fffdf7; border-color:#bbc8b6; }
.map-pan-controls button:hover { background:#eaf0e4; }
#explore-results { scrollbar-gutter:stable; }
@media (max-width:480px) { .map-pan-controls > span { flex-basis:100%; } .map-pan-controls button { flex:1; min-width:60px; } }

/* Newspaper entry is separate from, and links back to, the existing atlas. */
.newspaper-open{display:inline-flex;align-items:center;min-height:44px;padding:8px 14px;border:1px solid #7f8f7e;border-radius:6px;color:#244b3b;background:#f8f3e6;font-size:12px;font-weight:700;text-decoration:none;white-space:nowrap}
.newspaper-intro{display:flex;align-items:center;justify-content:space-between;gap:24px;border:1px solid #b8bea7;border-top:4px double #415740;margin:12px 0 24px;padding:24px;background:#f1edde}
.newspaper-intro h2{font:700 clamp(26px,3.5vw,40px)/1.1 Georgia,serif;margin:8px 0 10px;color:#263f2d}.newspaper-intro p{max-width:680px;line-height:1.6}.newspaper-intro a{flex-shrink:0;min-height:44px;display:inline-flex;align-items:center;text-decoration:none;padding:10px 18px}
@media(max-width:720px){.newspaper-intro{display:block;padding:18px}.newspaper-intro a{margin-top:16px}.atlas-header{flex-wrap:wrap;gap:8px}.atlas-header .newspaper-open{margin-left:0}.atlas-header .atlas-name{flex:1}.atlas-header #coverage-open{font-size:11px}}

@media print { .timeline-shell { padding-bottom:0; } }
