/* DriveData history timelines — always-dark "museum at night" look */
body.hist { --bg: #0b0d10; --surface: #13161b; --surface2: #181c22; --ink: #050608; --text: #eef1f5; --muted: #a2abb8; --muted2: #5d6673; --line: #252a32;
  --c: #c9822b; background: var(--bg); color: var(--text); color-scheme: dark; }
body.hist .top { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom-color: var(--line); }
body.hist .btn { background: var(--text); color: var(--bg); border-color: var(--text); }
body.hist .btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
body.hist .crumbs a { color: var(--muted); }
body.hist main { overflow-x: clip; }
body.hist .hx-links a, body.hist .hx-after a:not(.chip):not(.btn), body.hist .hx-intro a, body.hist .note a { color: #7cc4ff; }
body.hist .mainnav a, body.hist .logo, body.hist .hx-eras a, body.hist .hh-card, body.hist .chip { color: var(--text); }
body.hist .mainnav a:hover, body.hist .mainnav a[aria-current] { background: var(--surface); }
body.hist .search input, body.hist .filter input { background: var(--surface); color: var(--text); border-color: var(--line); }
body.hist .results { background: var(--surface); border-color: var(--line); }
.hx { position: relative; }
.hx-hero { position: relative; isolation: isolate; padding: 26px 0 8px; }
.hx-hero::before { content: ""; position: absolute; z-index: -1; inset: -60px -40px auto; height: 360px; pointer-events: none; transition: background 1s;
  background: radial-gradient(40% 70% at 12% 40%, color-mix(in srgb, var(--c) 32%, transparent), transparent 70%), radial-gradient(35% 60% at 88% 25%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%); }
.hx-kicker { margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hx h1 { margin: 6px 0 0; font: 800 clamp(2.3rem, 6.5vw, 4rem)/1 var(--display); letter-spacing: -.035em; color: var(--text); }
.hx h1 span { background: linear-gradient(90deg, #ff6b6b, #ffcc33, #a3c95a, #26c6da, #4fb3ff, #b388ff, #ff6b6b); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hx-sheen 14s linear infinite; }
@keyframes hx-sheen { to { background-position: 200% 0; } }
.hx-tag { margin: 12px 0 0; color: var(--muted); font-size: 1.1rem; max-width: 70ch; }
.hx-intro { margin: 10px 0 0; color: var(--text); max-width: 75ch; }
.hx-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 16px 0 0; }
.hx-stats div b { display: block; font: 800 1.6rem/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.hx-stats div span { font-size: .78rem; color: var(--muted); }
.hx-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 18px 0 0; }
.hx-facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.hx-facts dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.hx-facts dd { margin: 4px 0 0; font-size: .95rem; }

.hx-eras { position: sticky; top: 61px; z-index: 30; display: flex; gap: 8px; overflow-x: auto; margin: 18px -16px 0; padding: 10px 16px; scrollbar-width: none; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hx-eras::-webkit-scrollbar { display: none; }
.hx-eras a { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: .82rem; font-weight: 700; text-decoration: none !important; transition: border-color .2s, background .2s; }
.hx-eras a i { width: 10px; height: 10px; border-radius: 50%; background: var(--ec); box-shadow: 0 0 10px var(--ec); }
.hx-eras a small { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.hx-eras a.is-on { border-color: var(--ec); background: color-mix(in srgb, var(--ec) 16%, var(--surface)); }

.hx-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 10px; }
.hx-dash { position: sticky; top: 112px; z-index: 20; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 0 -16px; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 12px 18px -14px rgba(0,0,0,.9); }
.hx-year { display: block; font: 800 2rem/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text); }
.hx-era { display: block; margin-top: 4px; font-size: .82rem; font-weight: 700; color: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .6s; }
.hx-place { display: block; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-nav { display: flex; gap: 6px; align-items: center; }
.hx-nav button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: 1rem; }
.hx-nav button:hover { border-color: var(--c); }
.hx-maptoggle { width: auto !important; padding: 0 12px; border-radius: 999px !important; font-weight: 700; font-size: .8rem !important; }
.hx-bar { grid-column: 1 / -1; position: relative; height: 22px; display: none; }
.hx-bar .seg { position: absolute; top: 8px; height: 6px; border-radius: 999px; }
.hx-bar input { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.hx-bar input::-webkit-slider-runnable-track { height: 22px; background: transparent; }
.hx-bar input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent); }
.hx-bar input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--c); }
.hx-bar input::-moz-range-track { background: transparent; }
.hx-barl { grid-column: 1 / -1; display: none; justify-content: space-between; font-size: .74rem; color: var(--muted); }
.hx-mapwrap { display: none; grid-column: 1 / -1; }
.hx-dash.map-open .hx-mapwrap { display: block; }
#hxMap { width: 100%; height: 240px; border-radius: 14px; overflow: hidden; background: #0f1318; border: 1px solid var(--line); }
.hx-mapnote { font-size: .72rem; color: var(--muted); margin: 6px 0 0; }
.maplibregl-ctrl-attrib { font-size: 10px; }

.hx-main { min-width: 0; padding-top: 14px; }
.hx-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.hx-filters button { display: inline-flex; gap: 6px; align-items: center; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 .84rem var(--font); cursor: pointer; }
.hx-filters button small { color: var(--muted); font-weight: 500; }
.hx-filters button.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.hx-filters button.is-on small { color: var(--bg); opacity: .7; }

.hx-era-sec { --ec: var(--c); margin: 0 0 24px; scroll-margin-top: 130px; }
.hx-era-head { position: relative; overflow: hidden; border-radius: 18px; padding: 18px 20px; border: 1px solid color-mix(in srgb, var(--ec) 45%, var(--line)); background: linear-gradient(120deg, color-mix(in srgb, var(--ec) 22%, var(--surface)), var(--surface) 70%); }
.hx-era-head p.span { margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ec); }
.hx-era-head h2 { margin: 6px 0 6px; font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--text); position: relative; z-index: 1; }
.hx-era-head p.sum { margin: 0; color: var(--muted); position: relative; z-index: 1; max-width: 60ch; }
.hx-era-head .wm { position: absolute; right: -6px; bottom: -18px; font: 800 clamp(3.4rem, 9vw, 6rem)/1 var(--display); letter-spacing: -.04em; color: color-mix(in srgb, var(--ec) 24%, transparent); pointer-events: none; white-space: nowrap; }
.hx-events { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.hx-events::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 3px; border-radius: 3px; background: linear-gradient(var(--ec), color-mix(in srgb, var(--ec) 25%, transparent)); }
.hx-ev { position: relative; margin: 14px 0 0; scroll-margin-top: 150px; }
.hx-ev::before { content: ""; position: absolute; left: -24px; top: 22px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 3px solid var(--ec); transition: transform .3s, background .3s; }
.hx-ev.is-on::before { transform: scale(1.5); background: var(--ec); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ec) 25%, transparent); }
.hx-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; transition: border-color .3s, transform .3s, box-shadow .3s; }
.hx-ev.is-on .hx-card { border-color: color-mix(in srgb, var(--ec) 70%, var(--line)); box-shadow: 0 10px 30px -18px var(--ec); }
.hx-ev.big .hx-card { background: linear-gradient(140deg, color-mix(in srgb, var(--ec) 12%, var(--surface)), var(--surface) 60%); }
.hx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 6px; font-size: .8rem; color: var(--muted); }
.hx-meta time { color: var(--ec); font-weight: 800; }
.hx-meta .k { background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--text); font-weight: 600; }
.hx-meta .big { background: var(--ec); color: #111; border-radius: 999px; padding: 2px 9px; font-weight: 800; }
.hx-card h3 { margin: 0 0 6px; font: 700 1.12rem/1.3 var(--font); color: var(--text); }
.hx-card h3 a { color: inherit; }
.hx-b { margin: 0; color: #c9d0da; }
.hx-fact { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ec) 9%, var(--surface2)); font-size: .93rem; color: var(--text); }
.hx-fact b { color: var(--ec); }
.hx-rec { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #1b1416; border: 1px solid #4a2a2e; font-size: .93rem; color: var(--text); }
.hx-rec b { display: inline-block; margin-right: 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; }
.hx-rec.s-acknowledged b { background: #2f5d3a; color: #c7f5d2; }
.hx-rec.s-proven b { background: #5d4a1f; color: #ffe7a8; }
.hx-rec.s-disputed b { background: #3a3f4a; color: #dde3ee; }
.hx-links { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 12px 0 0; font-size: .8rem; }
.hx-links a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); }
.hx-share { background: none; border: 0; color: var(--text); font: 700 .8rem var(--font); cursor: pointer; padding: 0; }
.hx-ev.hide { display: none; }
.hx-era-sec.hide { display: none; }
.js .hx-ev.rv .hx-card { opacity: 0; transform: translateY(14px); }
.js .hx-ev.rv.in .hx-card { opacity: 1; transform: none; transition: opacity .5s, transform .5s, border-color .3s; }

.hx-quiz { margin: 8px 0 26px; border-radius: 18px; padding: 18px 20px; border: 1px solid var(--line); background: linear-gradient(140deg, #1d1a14, var(--surface) 60%); }
.hx-quiz h2 { margin: 0 0 10px; font-size: 1.25rem; color: var(--text); }
.hx-qtabs { display: flex; gap: 8px; margin: 0 0 12px; }
.hx-qtabs button { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); font: 700 .84rem var(--font); cursor: pointer; }
.hx-qtabs button.is-on { background: var(--text); color: var(--bg); }
.hx-q { font-weight: 700; margin: 0 0 12px; min-height: 2.6em; }
.hx-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hx-opts.two { grid-template-columns: 1fr 1fr; }
.hx-opts button { padding: 14px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); font: 700 .95rem var(--font); cursor: pointer; text-align: center; }
.hx-opts button.ok { background: #1f4d2d; border-color: #3fa564; }
.hx-opts button.no { background: #4d1f24; border-color: #b0434f; }
.hx-qfoot { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 0; font-size: .84rem; color: var(--muted); }
.hx-qfoot button { background: none; border: 0; color: #ffcc33; font: 700 .86rem var(--font); cursor: pointer; }
.hx-after { margin: 30px 0 0; }
.hx-after .card { background: var(--surface); border-color: var(--line); }

/* history hub */
.hh-feature { display: block; position: relative; overflow: hidden; border-radius: 22px; padding: 26px; margin: 18px 0; border: 1px solid #4a3a1c; background: radial-gradient(60% 120% at 0% 0%, #4a2f12, transparent 60%), radial-gradient(50% 100% at 100% 100%, #13314a, transparent 60%), var(--surface); color: var(--text); text-decoration: none !important; }
.hh-feature h2 { margin: 6px 0; font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--text); }
.hh-feature p { color: var(--muted); margin: 0; max-width: 65ch; }
.hh-feature .wm { position: absolute; right: 10px; bottom: -14px; font: 800 clamp(3rem, 10vw, 7rem)/1 var(--display); color: rgba(255,255,255,.06); }
.hh-prov { margin: 26px 0 0; }
.hh-prov h2 { font-size: 1.15rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.hh-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; transition: transform .2s, border-color .2s; }
.hh-card:hover { transform: translateY(-2px); border-color: #7cc4ff; }
.hh-card b { font: 800 1.25rem var(--display); }
.hh-card span { font-size: .84rem; color: var(--muted); }
.hh-card .strip { display: flex; height: 5px; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.hh-card .strip i { flex: 1; }

@media (min-width: 960px) {
  .hx-stage { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 36px; align-items: start; }
  .hx-dash { top: 124px; display: block; margin: 14px 0 0; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 30px 60px -40px var(--c); }
  .hx-year { font-size: 3.4rem; }
  .hx-era { font-size: 1rem; margin-top: 8px; }
  .hx-nav { position: absolute; top: 24px; right: 20px; }
  .hx-maptoggle { display: none; }
  .hx-bar, .hx-barl { display: flex; } .hx-bar { display: block; margin: 16px 0 4px; }
  .hx-mapwrap { display: block; margin-top: 14px; }
  #hxMap { height: 380px; }
  .hx-ev { scroll-margin-top: 140px; }
}
@media (max-width: 959px) {
  .hx-nav button:not(.hx-maptoggle) { width: 32px; height: 32px; }
  .hx-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 4px; scrollbar-width: none; }
  .hx-filters::-webkit-scrollbar { display: none; }
  .hx-filters button { flex: none; }
}
@media (max-width: 560px) {
  .hx-eras { top: 108px; }
  .hx-dash { top: 156px; }
  .hx-opts { grid-template-columns: 1fr; }
  .hx-events { padding-left: 20px; }
  .hx-ev::before { left: -18px; }
  .hx-events::before { left: 5px; }
}
@media (prefers-reduced-motion: reduce) { .hx h1 span { animation: none; } .js .hx-ev.rv .hx-card { opacity: 1; transform: none; } }
/* v3.4: compact hero so the timeline starts on the first phone screen */
.hx-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 12px 0 0; font-size: .88rem; color: var(--muted); }
.hx-stats b { font: 800 1.15rem/1 var(--display); color: var(--text); margin-right: 3px; font-variant-numeric: tabular-nums; }
.hx-stats a { margin-left: auto; color: var(--muted); font-size: .82rem; }
.hx-after .hx-intro { font-size: 1.02rem; line-height: 1.6; }
@media (max-width: 760px) {
  body.hist .top .search { display: none; }
  body.hist .crumbs { display: none; }
  .hx-hero { padding: 12px 0 2px; }
  .hx-hero h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); margin-bottom: 0; }
  .hx-kicker { font-size: .68rem; }
  .hx-tag { font-size: .95rem; margin-top: 6px; }
  .hx-stats { margin-top: 8px; }
  .hx-stats a { display: none; }
}
/* v3.4: history hub */
.hh-hero h1 { font-size: clamp(2.1rem, 6.5vw, 4.2rem); max-width: 16ch; }
.hh-nums { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 14px 0 16px; color: var(--muted); }
.hh-nums b { display: block; font: 800 clamp(1.8rem, 5vw, 2.6rem)/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #ffb347, #ffd86b 40%, #7cc4ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hh-mapsec { margin: 10px 0 4px; }
.hh-map { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(84px, auto); gap: 8px; max-width: 900px; }
.hh-t { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 10px; border-radius: 14px; overflow: hidden; color: var(--text);
  background: linear-gradient(150deg, hsl(var(--h) 70% 45% / .55), hsl(calc(var(--h) + 40) 70% 30% / .35)), var(--surface); border: 1px solid hsl(var(--h) 60% 55% / .45);
  text-decoration: none !important; transition: transform .2s, box-shadow .2s; }
.hh-t:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 30px hsl(var(--h) 80% 40% / .35); }
.hh-t b { font: 800 1.5rem/1 var(--display); }
.hh-t span { font-size: .72rem; line-height: 1.2; color: #dfe5ec; }
.hh-t em { font-style: normal; font-size: .68rem; color: #ffd86b; font-weight: 700; }
.hh-t.off { opacity: .35; filter: grayscale(.7); }
.hh-hint { color: var(--muted); font-size: .82rem; margin: 8px 0 0; }
.hh-feature .hh-fm { margin-top: 10px; color: #ffd86b; font-weight: 700; font-size: .9rem; }
.hh-feature .strip, .hh-card .strip { display: flex; height: 6px; border-radius: 999px; overflow: hidden; margin-top: 12px; max-width: 520px; }
.hh-feature .strip i { flex: 1; }
.hh-ribbon-sec { margin: 26px 0 0; }
.hh-ribbon-sec h2 { font-size: 1.15rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hh-ribbon { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.hh-m { scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 18px; background: linear-gradient(180deg, #1c2129, var(--surface)); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; min-height: 150px; transition: border-color .2s, transform .2s; }
.hh-m:hover { border-color: #ffd86b; transform: translateY(-2px); }
.hh-m .y { font: 800 2rem/1 var(--display); color: #ffd86b; font-variant-numeric: tabular-nums; }
.hh-m b { font-size: .98rem; line-height: 1.3; }
.hh-m span:last-child { margin-top: auto; font-size: .78rem; color: var(--muted); }
.hh-prov h2 { display: flex; align-items: center; gap: 10px; }
.hh-prov h2 span { display: inline-grid; place-items: center; min-width: 38px; height: 26px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--line); font-size: .8rem; color: var(--text); }
.hh-card .hh-k { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: #7cc4ff; }
.hh-card .hh-big { color: var(--text); opacity: .85; }
.hh-pcard { grid-column: span 2; background: radial-gradient(80% 140% at 0% 0%, #3a2a12, transparent 60%), radial-gradient(60% 120% at 100% 100%, #12304a, transparent 60%), var(--surface); border-color: #4a3a1c; }
.hh-pcard b { font-size: 1.6rem; }
.hh-pcard .hh-k { color: #ffd86b; }
@media (max-width: 760px) {
  .hh-map { grid-auto-rows: 64px; gap: 5px; }
  .hh-t { padding: 6px; border-radius: 10px; }
  .hh-t b { font-size: 1.05rem; }
  .hh-t span { display: none; }
  .hh-t em { font-size: .55rem; }
  .hh-pcard { grid-column: auto; }
}
.hh-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.hh-top .hh-feature { margin: 10px 0 0; min-height: 100%; }
@media (max-width: 900px) { .hh-top { grid-template-columns: 1fr; } .hh-top .hh-feature { min-height: 0; } }
@media (max-width: 760px) { .hh-t em span { display: none; } .hh-t em { font-size: .7rem; } }
/* v3.4: short cards — two-line preview, tap to read more */
.hx-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.hx-filters::-webkit-scrollbar { display: none; }
.hx-filters button { flex: none; }
.hx-ev:not(.open) .hx-b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hx-ev:not(.open) .hx-x { display: none; }
.hx-ev.open .hx-bd { display: none; }
.hx-card { cursor: pointer; }
.hx-card h3 { font-size: 1.18rem; }
.hx-bd { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.hx-bd span { font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); color: var(--text); }
.hx-bd .bd-f { border-color: color-mix(in srgb, var(--ec) 50%, var(--line)); }
.hx-bd .s-acknowledged { background: #1d3524; border-color: #2f5d3a; color: #c7f5d2; }
.hx-bd .s-proven { background: #3a2f14; border-color: #5d4a1f; color: #ffe7a8; }
.hx-bd .s-disputed { background: #262a33; border-color: #3a3f4a; color: #dde3ee; }
.hx-more { margin: 8px 0 0; padding: 0; border: 0; background: none; color: var(--ec); font: 700 .84rem var(--font); cursor: pointer; }
.hx-more::after { content: " ▾"; }
.hx-ev.open .hx-more::after { content: " ▴"; }
.hx-era-head .sum { max-width: 60ch; }
@media (max-width: 760px) {
  .hx-era-head { padding: 14px 16px; }
  .hx-era-head h2 { font-size: 1.35rem; margin: 2px 0 4px; }
  .hx-era-head .sum { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .92rem; margin: 0; }
  .hx-era-head .wm { font-size: 3.2rem; }
  .hx-card { padding: 13px 14px; }
  .hx-card h3 { font-size: 1.05rem; }
  .hx-b { font-size: .95rem; }
}
.hh-top .hh-feature { min-height: 0; align-self: start; }
.hh-feature .wm { font-size: clamp(2.6rem, 6vw, 4.6rem); bottom: -8px; }
.hh-t span { font-size: .64rem; overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 1100px) { .hh-t span { display: none; } }
/* v3.4: history pages use the timeline switcher instead of the city-data search */
body.hist .top .search { display: none; }
body.hist .mainnav { margin-left: auto; }
.hx-toprow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hx-toprow .hx-kicker { margin: 0; }
.hx-sw { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px 8px 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 55%, var(--line)); background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--text); font: 700 .84rem var(--font); cursor: pointer; transition: transform .15s, background .2s; }
.hx-sw:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--c) 24%, var(--surface)); }
.hx-sw svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hx-swd { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(3, 5, 8, .62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.hx-swd[hidden] { display: none; }
.hx-swd-in { width: min(640px, 100%); max-height: min(82vh, 720px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 40px 80px -30px #000; animation: swin .2s ease-out; }
@keyframes swin { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.sw-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sw-head b { font: 800 1.2rem var(--display); }
.sw-head button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface2); color: var(--text); cursor: pointer; font-size: 1rem; }
.sw-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 12px; }
.sw-tabs::-webkit-scrollbar { display: none; }
.sw-tabs button { flex: none; min-width: 46px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--muted); font: 800 .86rem var(--font); cursor: pointer; }
.sw-tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.sw-pn { margin: 0 0 8px; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.sw-i { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.sw-i:hover, .sw-i:focus-visible { border-color: #7cc4ff; transform: translateY(-1px); }
.sw-i b { font: 800 1.05rem var(--display); }
.sw-i span { font-size: .76rem; color: var(--muted); }
.sw-i .sw-k { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: #7cc4ff; }
.sw-i.sw-p { grid-column: 1 / -1; background: radial-gradient(80% 160% at 0% 0%, #3a2a12, transparent 60%), var(--surface2); border-color: #4a3a1c; }
.sw-i.sw-p .sw-k { color: #ffd86b; }
.sw-i[aria-current] { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.sw-i[aria-current]::after { content: "You are here"; font-size: .66rem; font-weight: 800; color: var(--c); }
.sw-all { display: block; margin-top: 14px; font-weight: 700; font-size: .86rem; color: #7cc4ff; }
html.sw-lock { overflow: hidden; }
.hx-tools { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.hx-tools .hx-filters { margin: 0; flex: 1; min-width: 0; }
.hx-expall { flex: none; padding: 7px 13px; border-radius: 999px; border: 1px dashed var(--line); background: transparent; color: var(--muted); font: 700 .8rem var(--font); cursor: pointer; }
.hx-expall[aria-pressed="true"] { color: var(--text); border-style: solid; }
.hx-prog { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 70; pointer-events: none; }
.hx-prog i { display: block; height: 100%; background: var(--c); transform: scaleX(0); transform-origin: 0 50%; transition: background .4s; }
.hx-totop { position: fixed; right: 16px; bottom: 22px; z-index: 55; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 1.2rem; box-shadow: 0 10px 24px -10px #000; cursor: pointer; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.hx-totop.on { opacity: 1; transform: none; pointer-events: auto; }
.hx-nexts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 26px 0 0; }
.hx-next { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; transition: border-color .2s, transform .2s; }
.hx-next:hover { border-color: var(--c); transform: translateY(-2px); }
.hx-next span { font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.hx-next b { font: 800 1.1rem var(--display); }
.hx-next em { font-style: normal; font-size: .8rem; color: var(--muted); }
@media (max-width: 760px) {
  .hx-swd { place-items: end stretch; padding: 0; }
  .hx-swd-in { width: 100%; max-height: 78vh; border-radius: 22px 22px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); animation: sheetup .22s ease-out; }
  .sw-list { grid-template-columns: 1fr 1fr; }
  .hx-sw { padding: 6px 11px 6px 9px; font-size: .78rem; }
  .hx-totop { bottom: calc(80px + env(safe-area-inset-bottom)); width: 42px; height: 42px; }
  .hx-expall { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hx-swd-in { animation: none; } }
@media (max-width: 760px) { .hx-kx { display: none; } }
.hh-t span { font-size: .6rem; overflow-wrap: normal; hyphens: none; letter-spacing: -.01em; }
/* v3.4.1: the sticky year bar sits flush under the header (header height measured by history.js) */
.hx-dash, .hx-dash.hx-dash { top: calc(var(--hdr, 61px) - 1px); }
@media (min-width: 960px) { .hx-dash, .hx-dash.hx-dash { top: calc(var(--hdr, 61px) + 14px); } }
/* era chips stick right under the header on desktop; on phones only the year bar sticks (the era name is shown in it) */
.hx-eras, .hx-eras.hx-eras { top: calc(var(--hdr, 61px) - 1px); }
@media (min-width: 960px) { .hx-dash, .hx-dash.hx-dash { top: calc(var(--hdr, 61px) + var(--eras, 58px) + 12px); } }
@media (max-width: 959px) { .hx-eras, .hx-eras.hx-eras { position: relative; top: auto; } }
