@import url("palette.css?v=3");
@import url("button-suite.css?v=4");

:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--palette-black); color: var(--palette-white); }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

.archive-header {
  min-height: clamp(190px, 31vw, 390px);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: right;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.archive-header h1 { margin: 0; color: var(--palette-amber); font-size: clamp(34px, 6vw, 64px); line-height: 1; letter-spacing: -.03em; text-shadow: 0 2px 18px rgba(var(--palette-black-rgb), 0.5); }
.archive-header h1 .www-prefix { margin-right: .08em; font-size: clamp(14px, 2vw, 21px); font-weight: 500; letter-spacing: .04em; }
.archive-header p { margin: 5px 0 0; color: var(--palette-amber); font-size: clamp(14px, 2vw, 20px); font-weight: 500; letter-spacing: .04em; text-shadow: 0 2px 12px rgba(var(--palette-black-rgb), 0.8); }

.archive-view-nav {
  width: min(100% - 24px, 680px);
  margin: 14px auto 22px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(var(--palette-white-rgb), 0.25);
  border-radius: 12px;
  background: var(--palette-navy);
}
.archive-view-nav a { min-height: 48px; display: grid; place-items: center; padding: 10px 7px 8px; border-bottom: 3px solid transparent; color: rgba(var(--palette-white-rgb), 0.8); font-size: 13px; font-weight: 700; letter-spacing: .045em; text-decoration: none; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.archive-view-nav a + a { border-left: 1px solid rgba(var(--palette-white-rgb), 0.25); }
.archive-view-nav .nav-icon { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.archive-view-nav a:hover { color: var(--palette-white); background: var(--palette-navy); }
.archive-view-nav a.active { border-bottom-color: var(--palette-sky); color: var(--palette-white); background: var(--palette-navy); }
.archive-view-nav a:focus-visible, .archive-story-link:focus-visible, .map-story-row:focus-visible { outline: 3px solid var(--palette-sky); outline-offset: 2px; }

.archive-main { width: min(100% - 24px, 1050px); margin: 0 auto; padding-bottom: 26px; }
.archive-title { margin: 0 0 4px; font-size: clamp(25px, 5vw, 38px); }
.archive-intro { margin: 0 0 22px; color: rgba(var(--palette-white-rgb), 0.8); }
.archive-notice { padding: 24px 4px; color: rgba(var(--palette-white-rgb), 0.8); }

.timeline-year { margin: 28px 0 34px; }
.timeline-year:first-child { margin-top: 8px; }
.timeline-year h2 { position: sticky; top: 0; z-index: 2; margin: 0 0 12px; padding: 7px 0; border-bottom: 2px solid rgba(var(--palette-white-rgb), 0.5); background: var(--palette-black); color: var(--palette-amber); font-size: 25px; }
.timeline-list { display: grid; gap: 12px; }
.archive-story-link { --thumbnail-width: 132px; min-height: 94px; display: grid; grid-template-columns: var(--thumbnail-width) 1fr; overflow: hidden; border: 1px solid rgba(var(--palette-white-rgb), 0.25); border-radius: 12px; background: linear-gradient(to right, var(--palette-black) 0, var(--palette-black) var(--thumbnail-width), var(--palette-navy) var(--thumbnail-width), var(--palette-navy) 100%); color: var(--palette-white); text-decoration: none; }
.archive-story-link:hover { border-color: var(--palette-sky); }
.archive-story-link img { width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 9; align-self: center; object-fit: contain; object-position: center; background: var(--palette-black); }
.timeline-list .archive-story-link { --thumbnail-width: 168px; grid-template-columns: var(--thumbnail-width) minmax(0, 1fr); }
.archive-story-copy { min-width: 0; padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; }
.archive-story-copy strong { font-size: 18px; font-weight: 650; }
.archive-story-copy span { margin-top: 4px; color: rgba(var(--palette-white-rgb), 0.8); font-size: 13px; }
.archive-story-copy small { margin-bottom: 4px; color: var(--palette-sky); font-size: 11px; font-weight: 700; letter-spacing: .04em; }

.map-status { min-height: 22px; margin: -12px 0 9px; color: rgba(var(--palette-white-rgb), 0.8); font-size: 13px; }
#archive-map { width: 100%; height: min(63vh, 650px); min-height: 430px; border: 1px solid rgba(var(--palette-white-rgb), 0.25); border-radius: 14px; background: var(--palette-navy); overflow: hidden; }
.leaflet-container { background: var(--palette-navy); color: var(--palette-navy); }
.leaflet-control-attribution { background: rgba(var(--palette-navy-rgb), 0.8) !important; color: rgba(var(--palette-white-rgb), 0.8) !important; }
.leaflet-control-attribution a { color: var(--palette-sky) !important; }
.local-country { fill: rgba(var(--palette-green-rgb), 0.25); fill-opacity: 0.5; stroke: var(--palette-green); stroke-width: 1; }
.online-map-ready .local-country { fill-opacity: 0.1; stroke-opacity: 0.25; }
.story-map-pin { width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--palette-white); border-radius: 50% 50% 50% 0; background: var(--palette-blue); box-shadow: 0 3px 12px rgba(var(--palette-black-rgb), 0.5); transform: rotate(-45deg); }
.story-map-pin span { width: 9px; height: 9px; border-radius: 50%; background: var(--palette-white); }
.story-map-cluster { width: 38px; height: 38px; display: grid; place-items: center; border: 3px solid var(--palette-white); border-radius: 50%; background: var(--palette-blue); color: var(--palette-white); box-shadow: 0 3px 14px rgba(var(--palette-black-rgb), 0.5); font-size: 14px; font-weight: 800; }
.leaflet-div-icon { border: 0; background: transparent; }
.map-location-choices { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid rgba(var(--palette-white-rgb), 0.25); border-radius: 12px; background: var(--palette-navy); }
.map-location-choices > strong { margin-bottom: 5px; color: var(--palette-white); font-size: 15px; }
.map-location-choices a { display: grid; gap: 2px; padding: 8px 2px; border-top: 1px solid rgba(var(--palette-white-rgb), 0.25); color: var(--palette-sky); text-decoration: none; }
.map-location-choices small { color: rgba(var(--palette-white-rgb), 0.8); }
.map-scroll-locked { touch-action: pan-y pinch-zoom !important; }
.map-dragging-active { touch-action: none !important; box-shadow: inset 0 0 0 2px var(--palette-sky); }
.map-interaction-control { border: 0 !important; background: transparent !important; box-shadow: none !important; }
.map-interaction-button { min-height: 38px; padding: 7px 12px; border: 2px solid var(--palette-white); border-radius: 9px; background: var(--palette-navy); color: var(--palette-white); box-shadow: 0 2px 9px rgba(var(--palette-black-rgb), 0.5); font: 750 13px/1.1 system-ui, sans-serif; }
.map-interaction-button[aria-pressed="true"] { border-color: var(--palette-sky); background: var(--palette-blue); }
.map-interaction-button:focus-visible { outline: 3px solid var(--palette-amber); outline-offset: 2px; }

.map-selection { margin: 12px 0 18px; min-height: 96px; }
.map-story-card { --thumbnail-width: 126px; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; overflow: hidden; border: 1px solid rgba(var(--palette-white-rgb), 0.25); border-radius: 12px; background: var(--palette-black); color: var(--palette-white); text-decoration: none; }
.map-story-card.map-story-with-cover { grid-template-columns: var(--thumbnail-width) minmax(0, 1fr); }
.map-story-card img { grid-column: 1; grid-row: 1; width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 9; align-self: start; object-fit: contain; object-position: center; background: var(--palette-black); }
.map-story-heading { grid-column: 1 / -1; grid-row: 1; min-width: 0; padding: 12px 14px 9px; display: flex; flex-direction: column; justify-content: flex-start; }
.map-story-with-cover .map-story-heading { grid-column: 2; }
.map-story-card small { color: var(--palette-sky); font-size: 11px; font-weight: 700; }
.map-story-card strong { margin: 4px 0; font-size: 18px; }
.map-story-card .map-story-detail { grid-column: 1 / -1; overflow: hidden; padding: 10px 14px 12px; border-top: 1px solid var(--palette-navy); color: rgba(var(--palette-white-rgb), 0.8); font-size: 13px; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.mapped-story-list { margin-top: 22px; }
.mapped-story-list h2 { margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid rgba(var(--palette-white-rgb), 0.5); font-size: 20px; }
.map-story-rows { display: grid; gap: 7px; }
.map-story-row { width: 100%; min-height: 48px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid rgba(var(--palette-white-rgb), 0.25); border-radius: 9px; background: var(--palette-navy); color: var(--palette-white); text-align: left; }
.map-story-row:hover { border-color: var(--palette-sky); background: var(--palette-navy); }
.map-story-row span { color: rgba(var(--palette-white-rgb), 0.8); font-size: 12px; }
.worldwide-story-list { padding: 14px; border: 1px solid rgba(var(--palette-white-rgb), 0.25); border-radius: 12px; background: var(--palette-navy); }
.worldwide-story-list .archive-notice { margin: -4px 0 10px; padding: 0; }

.search-main { max-width: 860px; }
.search-scope { width: fit-content; max-width: 100%; margin: -8px 0 13px; display: grid; grid-auto-flow: column; overflow: hidden; border: 1px solid rgba(var(--palette-white-rgb), 0.25); border-radius: 10px; background: var(--palette-navy); }
.search-scope[hidden] { display: none; }
.search-scope button { min-height: 44px; padding: 8px 13px; border: 0; border-bottom: 3px solid transparent; background: var(--palette-navy); color: rgba(var(--palette-white-rgb), 0.8); font: 750 11px/1 system-ui, sans-serif; letter-spacing: .035em; white-space: nowrap; }
.search-scope button + button { border-left: 1px solid rgba(var(--palette-white-rgb), 0.25); }
.search-scope button[aria-pressed="true"] { border-bottom-color: var(--palette-sky); background: var(--palette-navy); color: var(--palette-white); }
.search-scope button:disabled { opacity: 0.5; }
.search-scope button:focus-visible { position: relative; z-index: 1; outline: 3px solid var(--palette-sky); outline-offset: -3px; }
.search-form { margin: 16px 0 12px; padding: 15px; border: 1px solid rgba(var(--palette-white-rgb), 0.25); border-radius: 14px; background: var(--palette-navy); }
.search-query-label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 700; }
.search-query-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.search-query-row input, .search-filters select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid rgba(var(--palette-white-rgb), 0.25); border-radius: 9px; background: var(--palette-navy); color: var(--palette-white); font: inherit; }
.search-query-row button { min-height: 46px; padding: 8px 14px; border: 1px solid rgba(var(--palette-white-rgb), 0.25); border-radius: 9px; background: var(--palette-navy); color: var(--palette-white); font-weight: 700; }
.search-query-row input:focus-visible, .search-filters select:focus-visible, .search-query-row button:focus-visible { outline: 3px solid var(--palette-sky); outline-offset: 1px; }
.search-filters { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.search-filters label { min-width: 0; color: rgba(var(--palette-white-rgb), 0.8); font-size: 12px; font-weight: 650; }
.search-filters select { min-height: 44px; margin-top: 5px; padding: 7px 9px; }
.search-status { min-height: 24px; margin: 12px 2px; color: rgba(var(--palette-white-rgb), 0.8); }
.search-results { display: grid; gap: 11px; }
.search-result-card { --thumbnail-width: 145px; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; overflow: hidden; border: 1px solid rgba(var(--palette-white-rgb), 0.25); border-radius: 13px; background: var(--palette-black); color: var(--palette-white); text-decoration: none; }
.search-result-card.search-result-with-cover { grid-template-columns: var(--thumbnail-width) minmax(0, 1fr); }
.search-result-card:hover { border-color: var(--palette-sky); background: var(--palette-black); }
.search-result-card:focus-visible { outline: 3px solid var(--palette-sky); outline-offset: 2px; }
.search-result-card img { grid-column: 1; grid-row: 1; width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 9; align-self: start; object-fit: contain; object-position: center; background: var(--palette-black); }
.search-result-heading { grid-column: 1 / -1; grid-row: 1; min-width: 0; padding: 13px 15px 10px; display: flex; flex-direction: column; justify-content: flex-start; }
.search-result-with-cover .search-result-heading { grid-column: 2; }
.search-result-card small { color: var(--palette-sky); font-size: 11px; font-weight: 750; letter-spacing: .035em; }
.search-result-card strong { margin: 5px 0; font-size: 19px; }
.search-result-card .search-result-excerpt { grid-column: 1 / -1; min-width: 0; overflow: hidden; padding: 11px 15px 6px; border-top: 1px solid var(--palette-navy); color: rgba(var(--palette-white-rgb), 0.8); font-size: 13px; line-height: 1.45; white-space: nowrap; text-overflow: ellipsis; }
.search-result-card .search-result-context { grid-column: 1 / -1; min-width: 0; overflow: hidden; padding: 0 15px 13px; color: var(--palette-sky); font-size: 11px; font-weight: 700; letter-spacing: .025em; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.search-result-card mark { border-radius: 2px; background: rgba(var(--palette-amber-rgb), 0.5); color: var(--palette-white); }

@media (max-width: 600px) {
  .archive-header { min-height: 0; aspect-ratio: 1989 / 791; padding: 18px 14px; background-size: contain; }
  .archive-header h1 { font-size: 38px; }
  .archive-view-nav { margin-bottom: 18px; }
  .archive-main { width: min(100% - 20px, 1050px); }
  .timeline-list .archive-story-link { --thumbnail-width: 150px; grid-template-columns: var(--thumbnail-width) minmax(0, 1fr); }
  #archive-map { height: 58vh; min-height: 390px; }
  .map-story-card { --thumbnail-width: 105px; }
  .archive-view-nav a { padding-inline: 2px; font-size: 10px; letter-spacing: 0; }
  .search-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-result-card { --thumbnail-width: 105px; }
}

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