:root {
  --ink: #1f2529;
  --muted: #61707a;
  --paper: #d3d4d1;
  --row-separator: #c3c5c1;
  --row-title-background: #a9a8a8;
  --grid: rgba(255, 255, 255, 0.72);
  --dark: #2d3032;
  --label: #8c6b38;
  --blue: #2072bc;
  --gold: #d1a52d;
  --top-layer: 2147483647;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: #e9ebe7;
  overflow: hidden;
}

button {
  font: inherit;
}

.app {
  height: 100vh;
  overflow: hidden;
}

.timeline-shell {
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: auto;
  background: #c7c9c5;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.timeline-shell.is-dragging,
.timeline-shell.is-dragging * {
  cursor: grabbing !important;
}

.timeline {
  --label-width: 86px;
  --header-height: 64px;
  --header-tick-height: 32px;
  --age-band-lane-height: 20px;
  --age-band-level-count: 1;
  --row-height: 92px;
  --events-height: 230px;
  position: relative;
  min-height: 100%;
  background: var(--paper);
}

.timeline-corner {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 90;
  width: var(--label-width);
  height: var(--header-height);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  --corner-background: #a7a9a6;
  background: var(--corner-background);
  border-right: 1px solid var(--corner-background);
  box-shadow: 5px 0 14px rgba(0,0,0,0.12);
  font-size: 9px;
  font-weight: 950;
  line-height: 1.15;
  text-transform: none;
}

/* The corner stacks two rows: a top utility row (burger + language, set in
   the corner via the absolutely-positioned toggles) and the horizontal layer
   glyphs below it. The switcher reserves the top strip for the toggles. */
.layer-switcher {
  display: flex;
  flex-direction: row;
  /* Anchor the glyph row to the top (below the toggle strip), not the corner's
     center — the corner's height varies per layer, so centering would shift the
     glyphs vertically on every switch. A fixed top offset keeps them put. */
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 33px 4px 0 6px;
}

.layer-glyph {
  appearance: none;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b3b4b1;
  font-family: inherit;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  transition: color 0.12s ease;
}

.layer-glyph.is-active {
  color: #111;
  cursor: default;
}

.layer-glyph:not(.is-active):hover,
.layer-glyph:focus-visible {
  color: #6d6e6b;
  outline: none;
}

.layer-glyph.is-active:hover {
  color: #111;
}

.layer-glyph:focus-visible {
  outline: 2px solid rgba(32,114,188,0.55);
  outline-offset: 1px;
  border-radius: 3px;
}

.layer-menu-mount {
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--top-layer);
}

.layer-menu {
  position: absolute;
  top: calc(var(--header-height) + 4px);
  left: 4px;
  min-width: 232px;
  max-width: 320px;
  padding: 6px;
  background: #f4f2ec;
  border: 1px solid #b6b4ad;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.layer-menu-heading {
  padding: 4px 10px 6px;
  color: #6c6a63;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layer-menu-item {
  appearance: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1f2529;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.layer-menu-item:hover:not(.is-disabled):not(.is-active),
.layer-menu-item:focus-visible:not(.is-disabled) {
  background: #e3e0d7;
  outline: none;
}

.layer-menu-item.is-active {
  background: #20283a;
  color: #ffffff;
  cursor: default;
}

.layer-menu-item.is-disabled {
  color: #9c9a92;
  cursor: not-allowed;
}

.layer-menu-hint {
  flex: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a08a55;
}

.event-filters-mount {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
}

.timeline-header {
  position: sticky;
  top: 0;
  z-index: 70;
  height: var(--header-height);
  background: #bfc1be;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.tick {
  position: absolute;
  top: 0;
  width: 1px;
  height: var(--header-tick-height);
  background: rgba(31,37,41,0.44);
  z-index: 3;
}

.tick span {
  position: absolute;
  left: 6px;
  top: 7px;
  width: 72px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.tick-next-link,
.tick-prev-link {
  position: absolute;
  left: 6px;
  top: 7px;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.tick-next-link:hover,
.tick-next-link:focus-visible,
.tick-prev-link:hover,
.tick-prev-link:focus-visible {
  color: #0d5f9b;
  text-decoration-thickness: 2px;
}

.age-bands {
  position: absolute;
  top: 0;
  left: var(--label-width);
  z-index: 71;
  height: var(--header-height);
  background: #bfc1be;
}

.age-band {
  --age-band-color: #8f9290;
  appearance: none;
  position: absolute;
  top: var(--header-tick-height);
  height: var(--age-band-lane-height);
  padding: 2px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--age-band-color);
  background: var(--age-band-color);
  color: #111;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  z-index: 2;
  cursor: pointer;
}

.age-band:focus-visible {
  outline: 2px solid rgba(32,114,188,0.65);
  outline-offset: -2px;
}

.age-band-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* A band too narrow for its label spells it out and lets it spill over the
   neighboring bands instead of truncating (e.g. the thin Quaternary). */
.age-band.is-overflowing {
  overflow: visible;
  z-index: 3;
}

.age-band.is-overflowing .age-band-label {
  overflow: visible;
}

.age-population {
  position: absolute;
  top: 21px;
  transform: translateX(-100%);
  max-width: 42px;
  padding-right: 5px;
  overflow: hidden;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 4;
  cursor: help;
}

.bar-population {
  position: absolute;
  transform: translateX(-100%);
  max-width: 72px;
  padding: 1px 4px;
  border-radius: 7px;
  background: rgba(12, 16, 22, 0.62);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 26;
  cursor: help;
}

.rows {
  position: relative;
}

.impact-veils {
  position: absolute;
  top: 0;
  left: var(--label-width);
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.lineage-links {
  position: absolute;
  top: 0;
  left: var(--label-width);
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}

.lineage-link {
  fill: none;
  stroke: rgba(28, 34, 38, 0.5);
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: miter;
  stroke-opacity: 0.9;
}

.lineage-link.is-related {
  stroke-width: 5px;
  stroke-opacity: 1;
}

.lineage-funnel {
  stroke: none;
  fill-opacity: 0.9;
}

.lineage-funnel.is-related {
  fill-opacity: 1;
}

/* World-languages tree: a faint underlay beneath the bars that lifts to the
   foreground on hover. Normal state has no z-index, so DOM order keeps it below
   the bars; .is-raised creates a stacking context above them. */
.language-tree {
  position: absolute;
  top: 0;
  left: var(--label-width);
  overflow: visible;
  pointer-events: none;
}

.language-tree.is-raised {
  z-index: 29;
}

.language-tree-curves {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
}

.language-branch,
.language-connector {
  fill: none;
  stroke-width: 2.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-opacity: 0.4;
  transition: stroke-opacity 120ms ease, stroke-width 120ms ease;
}

/* While the tree is raised, families other than the hovered one recede, so only
   the hovered family stands out (the .is-related rule below lifts it back up). */
.language-tree.is-raised .language-branch,
.language-tree.is-raised .language-connector {
  stroke-opacity: 0.15;
}

/* Scoped under .language-tree so this wins over the .is-raised baseline rule
   above (equal specificity, later in source) — otherwise the hovered branch's
   ancestry could never brighten past the raised baseline. */
.language-tree .language-branch.is-related,
.language-tree .language-connector.is-related {
  stroke-width: 4px;
  stroke-opacity: 1;
}

/* Transparent, wide hover target sitting over each branch's whole path. Only
   the stroke is hittable, so gaps between branches fall through to the bars. */
.language-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 13px;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
}

.language-markers {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* Tower of Babel marker at each root branch's origin. Subdued with the rest of
   the underlay; brightens when the tree is raised or its family is hovered
   (its root is in every descendant's ancestry chain). */
/* No opacity transition here: Chromium leaves a transitioned `opacity` on an
   SVG <image> stuck at its start value, so the tower would never brighten. An
   instant switch is reliable. */
.language-root-icon {
  opacity: 0.6;
  pointer-events: auto;
  cursor: default;
}

.language-tree.is-raised .language-root-icon {
  opacity: 0.25;
}

.language-tree .language-root-icon.is-related {
  opacity: 1;
}

.language-branch-name {
  position: absolute;
  transform: translate(6px, -50%);
  margin: 0;
  padding: 0 3px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #2f2a22;
  font-family: inherit;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0.45;
  text-shadow: 0 0 3px var(--paper), 0 0 3px var(--paper);
  transition: opacity 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.language-tree.is-raised .language-branch-name {
  opacity: 0.15;
}

.language-tree .language-branch-name.is-related {
  opacity: 1;
}

.language-tree .language-branch-name:hover,
.language-tree .language-branch-name:focus-visible,
.language-tree .language-branch-name.is-open {
  opacity: 1;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(32, 114, 188, 0.4), 0 4px 12px rgba(0, 0, 0, 0.18);
  outline: 0;
}

.language-event {
  position: absolute;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 1px 6px;
  border: 0;
  border-radius: 8px;
  background: rgba(244, 240, 223, 0.72);
  color: #2a2118;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.language-tree.is-raised .language-event {
  opacity: 0.2;
}

.language-tree .language-event.is-related,
.language-tree .language-event:hover,
.language-tree .language-event:focus-visible,
.language-tree .language-event.is-open {
  opacity: 1;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(32, 114, 188, 0.4), 0 4px 12px rgba(0, 0, 0, 0.18);
  outline: 0;
}

.impact-veil {
  --impact-veil-border-color: #7ba7d9;
  position: absolute;
  border: 0 solid transparent;
  border-radius: 999px;
  filter: blur(1px);
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: border-color 120ms ease;
}

.impact-veil.is-source-hovered {
  border: 1px solid var(--impact-veil-border-color);
}

.axis-markers {
  position: absolute;
  top: 0;
  left: var(--label-width);
  z-index: 0;
  pointer-events: none;
}

.axis-marker {
  position: absolute;
  top: 0;
  background: #000;
}

.axis-marker-hits {
  position: absolute;
  top: 0;
  left: var(--label-width);
  z-index: 28;
  pointer-events: none;
}

.axis-marker-hit {
  position: absolute;
  top: 0;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
}

.row {
  position: relative;
  height: var(--row-height);
  /* The language-tree underlay sits beneath the rows. A row's empty space must
     let pointer events fall through to the tree below (so hovering an exposed
     branch line works); its real children (bars, label, popovers) stay
     interactive via the rule below. */
  pointer-events: none;
}

.row > * {
  pointer-events: auto;
}

.row-label {
  position: sticky;
  left: 0;
  z-index: 30;
  width: var(--label-width);
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 7px;
  background: var(--row-title-background);
  color: #111;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.14;
  text-transform: none;
  border-bottom: 1px solid var(--row-separator);
  box-shadow: 5px 0 14px rgba(0,0,0,0.12);
  cursor: default;
}

.row-label-text {
  appearance: none;
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.row-label-text.is-selected {
  color: #111;
}

.row-label-text.is-dimmed {
  color: #818181;
}

.row-label-text:focus-visible {
  outline: 2px solid rgba(32,114,188,0.65);
  outline-offset: 2px;
}

.row[data-row="armenia"] .row-label {
  padding-right: 28px;
  overflow: hidden;
}

.ararat-contour {
  position: absolute;
  top: 5px;
  right: 4px;
  width: 36px;
  height: 20px;
  opacity: 0.9;
  pointer-events: none;
}

.ararat-ridge,
.ararat-snow {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ararat-ridge {
  stroke: rgba(15, 19, 21, 0.88);
  stroke-width: 3;
}

.ararat-snow {
  stroke: rgba(239, 212, 128, 0.92);
  stroke-width: 2;
}

.bar {
  --bar-color: #7ba7d9;
  --bar-text-color: #000000;
  position: absolute;
  top: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--bar-color);
  border-radius: 0;
  background: var(--bar-color);
  color: var(--bar-text-color);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 5px 12px rgba(0,0,0,0.12);
}

.bar:focus-visible,
.bar:hover {
  z-index: 20;
  outline: 3px solid rgba(32,114,188,0.4);
  filter: brightness(1.05);
}

.bar.is-event-relevant {
  z-index: 25;
  outline: 4px solid rgba(208, 165, 38, 0.9);
  outline-offset: 0;
  filter: brightness(1.08) saturate(1.12);
  box-shadow: 0 7px 18px rgba(0,0,0,0.22);
}

.bar.marker {
  width: 16px !important;
  height: 16px;
  border-radius: 50%;
  overflow: visible;
  border: 3px solid var(--bar-color);
}

.bar.marker .bar-label {
  position: absolute;
  left: 20px;
  top: -4px;
  width: 130px;
  height: auto;
  padding: 0;
  text-align: left;
}

.bar-label {
  display: block;
  width: 100%;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.events-row {
  position: sticky;
  bottom: 0;
  z-index: 55;
  height: var(--events-height);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 2px solid var(--dark);
  background: #bfc1be;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.12);
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: none;
}

.events-row::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.events-resize-handle {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 8px;
  margin-top: -8px;
  background: transparent;
  cursor: ns-resize;
  touch-action: none;
}

.events-resize-handle::before {
  content: "";
  position: absolute;
  inset: -6px 0;
}

.events-row.is-resizing,
.events-row.is-resizing * {
  cursor: ns-resize !important;
  user-select: none;
}

.events-row.is-dragging,
.events-row.is-dragging * {
  cursor: grabbing !important;
}

.events-label {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  width: var(--label-width);
  min-width: var(--label-width);
  max-width: var(--label-width);
  height: 100%;
  padding: 0 7px;
  background: var(--row-title-background);
  color: #111;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.14;
  text-transform: none;
  box-shadow: 5px 0 14px rgba(0,0,0,0.12);
  transform: translateX(var(--timeline-scroll-left, 0px));
  will-change: transform;
}

.events-content {
  position: relative;
  min-height: var(--events-height);
  margin-top: calc(-1 * var(--events-height));
}

.event-pin {
  position: absolute;
  top: 22px;
  width: 0;
  height: 172px;
}

.event-pin.is-open {
  z-index: 35;
}

.event-pin button {
  position: absolute;
  top: var(--offset);
  left: 7px;
  width: 208px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #273039;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.22;
  text-align: left;
  border-radius: 3px;
  white-space: normal;
  overflow-wrap: break-word;
  cursor: pointer;
  transition: opacity 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.event-pin button:hover,
.event-pin button:focus-visible,
.event-pin.is-open > button {
  background: rgba(255,255,255,0.7);
  box-shadow: 0 0 0 2px rgba(32,114,188,0.35);
  outline: 0;
}

.event-pin strong {
  color: var(--blue);
}

/* Clicked ("visited") events: the event text shifts to a muted amber so it
   reads as already-seen, while staying legible on both the band and the lighter
   hover/open background and distinct from the blue time label, which keeps its
   own color via the rule above. Resets on page load. */
.event-pin button.is-visited {
  color: #a08016;
}

.events-row.is-filtering .event-pin button {
  opacity: 0.22;
}

.events-row.is-filtering .event-pin.is-relevant button {
  z-index: 2;
  background: rgba(255, 242, 135, 0.95);
  box-shadow: 0 0 0 3px rgba(208, 165, 38, 0.45), 0 6px 14px rgba(0,0,0,0.18);
  opacity: 1;
}

.event-detail-popover,
.era-detail-popover,
.bar-detail-popover,
.language-detail-popover {
  position: fixed;
  z-index: var(--top-layer);
  box-sizing: border-box;
  width: 286px;
  max-height: calc(100vh - 16px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 12px 11px;
  border: 1px solid rgba(31,37,41,0.38);
  background: #f4f0df;
  color: #1f2529;
  box-shadow: 0 12px 24px rgba(0,0,0,0.24);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.34;
  cursor: default;
  user-select: text;
}

.event-detail-header {
  display: block;
}

.event-detail-title {
  margin: 0;
  color: #172027;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.event-detail-title-link {
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.event-detail-title-link:hover,
.event-detail-title-link:focus-visible {
  color: #0d5f9b;
}

.event-detail-meta {
  margin: 5px 0 7px;
  color: #52616b;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.25;
}

.event-detail-popover p,
.era-detail-popover p,
.bar-detail-popover p,
.language-detail-popover p {
  margin: 0;
}

.event-filters {
  /* The panel sits over the header's left edge; let clicks fall through its
     empty area to the previous-timescale link beneath, keeping its own
     controls (below) clickable. */
  pointer-events: none;
}

.event-filters button,
.event-filters input,
.event-filters label,
.event-filters legend,
.event-filters select {
  pointer-events: auto;
}

.event-filters {
  position: absolute;
  top: 6px;
  /* Fly out just past the corner's right edge so the open panel never covers
     the burger, language toggle, or layer glyphs inside the corner. */
  left: 100%;
  z-index: 95;
  width: max-content;
  min-width: 156px;
  max-width: min(300px, calc(100vw - var(--label-width) - 20px));
  max-height: none;
  margin: 0;
  padding: 7px 8px 8px;
  overflow-y: visible;
  border: 1px solid rgba(31,37,41,0.42);
  background: rgba(167,169,166,0.96);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  cursor: default;
}

.event-filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 5px 0 6px;
}

.event-filter-row {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) 68px;
  align-items: center;
  gap: 5px;
}

.event-filter-action,
.event-filter-only {
  min-height: 20px;
  padding: 0 5px;
  border: 1px solid rgba(31,37,41,0.32);
  background: rgba(255,255,255,0.58);
  color: #172027;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.event-filter-only {
  width: 68px;
}

.event-filter-action:hover,
.event-filter-action:focus-visible,
.event-filter-only:hover,
.event-filter-only:focus-visible {
  background: rgba(255,255,255,0.88);
  outline: 2px solid rgba(32,114,188,0.35);
}

.event-filter {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 20px;
  color: #172027;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.05;
  cursor: pointer;
}

.event-filter span {
  overflow: visible;
  white-space: nowrap;
}

.event-filter input {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--blue);
}

.event-filters-toggle,
.language-toggle,
.news-toggle {
  position: absolute;
  top: 4px;
  z-index: 96;
  width: 20px;
  height: 20px;
  display: grid;
  place-content: center;
  gap: 2px;
  padding: 0;
  border: 1px solid rgba(31,37,41,0.42);
  background: rgba(167,169,166,0.96);
  color: #172027;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  cursor: pointer;
}

.event-filters-toggle {
  left: 6px;
}

.language-toggle {
  left: 30px;
  overflow: hidden;
}

.news-toggle {
  left: 54px;
}

.news-icon {
  width: 15px;
  height: 15px;
  display: block;
}

.news-icon .mega-body {
  fill: #172027;
  stroke: none;
}

.news-icon .mega-wave {
  fill: none;
  stroke: #172027;
  stroke-width: 1.2;
  stroke-linecap: round;
}

.language-flag {
  display: block;
  width: 14px;
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(31,37,41,0.45);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.28);
}

.flag-armenia {
  background: linear-gradient(
    to bottom,
    #d90012 0 33.333%,
    #0033a0 33.333% 66.666%,
    #f2a800 66.666% 100%
  );
}

.flag-russia {
  background: linear-gradient(
    to bottom,
    #ffffff 0 33.333%,
    #0039a6 33.333% 66.666%,
    #d52b1e 66.666% 100%
  );
}

.flag-us {
  position: relative;
  background: repeating-linear-gradient(
    to bottom,
    #b22234 0 1px,
    #ffffff 1px 2px
  );
}

.flag-us::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 5px;
  background: #3c3b6e;
}

.event-filters-toggle span {
  display: block;
  width: 11px;
  height: 2px;
  background: #172027;
}

.event-filters-toggle:hover,
.event-filters-toggle:focus-visible,
.language-toggle:hover,
.language-toggle:focus-visible,
.news-toggle:hover,
.news-toggle:focus-visible {
  background: rgba(225,226,222,0.96);
  outline: 2px solid rgba(32,114,188,0.35);
}

.timeline-error {
  margin: 24px;
  max-width: 760px;
  padding: 18px;
  border: 1px solid #b85a5a;
  background: #fff7f7;
  color: #631f1f;
}

.timeline-error pre {
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .timeline {
    --label-width: 86px;
  }

  .row-label,
  .events-label {
    font-size: 10px;
    padding: 0 7px;
  }
}

/* The #news view: a layer-agnostic, full-screen overlay listing release
   highlights. A timeline layer still renders beneath it. */
.news-view {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow-y: auto;
  background: #e9ebe7;
  color: var(--ink);
}

.news-view[hidden] {
  display: none;
}

.news-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}

.news-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--row-separator);
}

.news-title {
  margin: 0;
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.01em;
}

.news-back {
  flex: none;
  appearance: none;
  padding: 7px 14px;
  border: 1px solid #b6b4ad;
  border-radius: 999px;
  background: #f4f2ec;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.news-back:hover,
.news-back:focus-visible {
  background: #ffffff;
  border-color: var(--blue);
  outline: none;
}

.news-entries {
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.news-date {
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--label);
}

.news-entry-title {
  margin: 0 0 18px;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.25;
}

.news-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.news-highlight {
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}

.news-highlight h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 850;
}

.news-highlight p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #2f3a42;
}

/* "What's new" sits below the layers in the corner menu, set apart by a rule. */
.layer-menu-news {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid #d7d4cb;
  color: var(--blue);
}

@media (max-width: 760px) {
  .news-page {
    padding: 28px 18px 64px;
  }

  .news-title {
    font-size: 24px;
  }
}
