:root {
  --water: #0f171f;
  --land: #18222d;
  --coast: #2c3a48;
  --ink: #e9edf0;
  --ink-2: #a9b4be;
  --ink-3: #74818d;
  --rule: rgba(233, 237, 240, 0.14);
  --panel: rgba(15, 23, 31, 0.86);
  --focus: #9ec5f2;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: 28px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--water); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow: hidden; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#map { position: fixed; inset: 0; }

/* ---------- top bar ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 20px; padding: 20px var(--gutter); pointer-events: none; z-index: 5; }
.top > * { pointer-events: auto; }
.mark { font-size: 13px; color: var(--ink-2); text-decoration: none; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; }
.mark:hover { color: var(--ink); border-color: var(--ink-3); }
.title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: 0.005em; line-height: 1.1; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.text-btn { font-size: 14px; color: var(--ink-2); }
.text-btn:hover { color: var(--ink); }

.find { position: relative; }
.find input { width: 230px; font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 999px; padding: 7px 14px 7px 34px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.find input::placeholder { color: var(--ink-3); }
.find::before { content: ""; position: absolute; left: 13px; top: 50%; width: 11px; height: 11px; margin-top: -7px; border: 1.3px solid var(--ink-3); border-radius: 50%; pointer-events: none; }
.find::after { content: ""; position: absolute; left: 23px; top: 50%; width: 5px; height: 1.3px; margin-top: 3px; background: var(--ink-3); transform: rotate(45deg); pointer-events: none; }
.find input:focus { outline: none; border-color: var(--ink-3); }
.find-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none; background: #121b24; border: 1px solid var(--rule); border-radius: 10px; max-height: 280px; overflow: auto; }
.find-list li { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.find-list li small { color: var(--ink-3); margin-left: 6px; }
.find-list li[aria-selected="true"], .find-list li:hover { background: rgba(233,237,240,0.08); }

.lang { position: relative; }
#langBtn { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: 5px 11px; }
#langBtn:hover { color: var(--ink); border-color: var(--ink-3); }
#langBtn svg { width: 9px; height: 6px; }
#langList { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 4px; list-style: none; background: #121b24; border: 1px solid var(--rule); border-radius: 10px; min-width: 140px; }
#langList li { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
#langList li:hover, #langList li:focus { background: rgba(233,237,240,0.08); outline: none; }
.flag { display: inline-block; width: 16px; height: 11px; border-radius: 1.5px; box-shadow: 0 0 0 0.5px rgba(255,255,255,0.25); flex: none; }
.flag-ee { background: linear-gradient(#0072ce 0 33.3%, #000 33.3% 66.6%, #fff 66.6%); }
.flag-us { background: repeating-linear-gradient(#b22234 0 1.57px, #fff 1.57px 3.14px); position: relative; overflow: hidden; }
.flag-us::before { content: ""; position: absolute; left: 0; top: 0; width: 7px; height: 6px; background: #3c3b6e; }

/* ---------- legend ---------- */
.legend { position: fixed; right: var(--gutter); top: 84px; width: 286px; max-height: calc(100vh - 110px); overflow: auto; z-index: 4; padding: 16px 16px 12px; background: var(--panel); border: 1px solid var(--rule); border-radius: 14px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.legend-intro { margin: 0 0 10px; font-size: 13px; color: var(--ink-2); }
#groups { list-style: none; margin: 0; padding: 0; }
.g-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 6px 6px; margin: 0 -6px; border-radius: 7px; width: calc(100% + 12px); }
.g-row:hover { background: rgba(233,237,240,0.06); }
.g-dot { width: 10px; height: 10px; border-radius: 50%; }
.g-name { font-size: 14px; line-height: 1.3; }
.g-n { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.g-row[aria-pressed="true"] { background: rgba(233,237,240,0.09); }
.dim .g-row[aria-pressed="false"] .g-name, .dim .g-row[aria-pressed="false"] .g-n { color: var(--ink-3); }
.dim .g-row[aria-pressed="false"] .g-dot { opacity: 0.35; }
.subs { list-style: none; margin: 2px 0 6px 22px; padding: 0; }
.subs[hidden] { display: none; }
.s-row { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 4px 6px; margin-left: -6px; border-radius: 6px; font-size: 13px; color: var(--ink-2); }
.s-row:hover { background: rgba(233,237,240,0.06); color: var(--ink); }
.s-row[aria-pressed="true"] { color: var(--ink); background: rgba(233,237,240,0.09); }
.s-row .g-n { font-size: 12.5px; }
.show-all { margin-top: 8px; font-size: 13px; }

/* ---------- time ---------- */
.stamp { position: fixed; left: var(--gutter); top: 84px; z-index: 3; width: min(330px, 24vw); pointer-events: none; }
.year { font-family: var(--serif); font-weight: 400; font-size: clamp(84px, 9.5vw, 150px); line-height: 0.86; letter-spacing: -0.025em; font-variant-numeric: lining-nums; }
.measure { margin: 18px 0 0; font-size: 14px; color: var(--ink-2); }
.time { position: fixed; left: var(--gutter); bottom: 26px; z-index: 4; width: min(760px, calc(100vw - 2 * var(--gutter) - 330px)); }
.scrub { display: flex; align-items: flex-end; gap: 16px; padding: 14px 30px 12px 14px; background: var(--panel); border: 1px solid var(--rule); border-radius: 22px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.play { flex: none; align-self: flex-end; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ink-3); display: grid; place-items: center; }
.play:hover { border-color: var(--ink); }
.play svg { width: 16px; height: 16px; fill: var(--ink); }
.play .i-pause { display: none; }
.play.on .i-play { display: none; }
.play.on .i-pause { display: inline; }
.track { position: relative; flex: 1; height: 38px; margin-top: 46px; }
.strip { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); height: 40px; }
.strip .col { position: absolute; bottom: 0; width: 14px; height: 100%; transform: translateX(-50%); display: flex; flex-direction: column-reverse; gap: 1px; padding: 0; border-radius: 3px; overflow: hidden; opacity: .62; transition: opacity .3s ease, transform .3s ease; }
.strip .col i { display: block; width: 100%; flex: none; transition: opacity .3s ease; }
.strip .col:hover { opacity: .9; }
.strip .col.on { opacity: 1; transform: translateX(-50%) scaleX(1.25); }
.strip.single .col { overflow: visible; justify-content: flex-start; background: rgba(233,237,240,.05); }
.strip.single .col i { border-radius: 2px; }
.strip.single .col b { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); font: 600 10px/1 "Public Sans", sans-serif; color: var(--ink, #e9edf0); white-space: nowrap; opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.strip.single .col.on b, .strip.single .col:hover b { opacity: .9; }
.strip.single .col.on { transform: translateX(-50%); }
body.touring .tour-btn { visibility: hidden; }
#range { position: absolute; inset: 0; width: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.ticks { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.ticks::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 1px; background: var(--rule); }
.ticks li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; width: 0; white-space: nowrap; }
.ticks li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--water); border: 1px solid var(--ink-3); transform: translateY(9px); transition: background .2s, border-color .2s, transform .2s; }
.ticks li span { transform: translateY(12px); }
.ticks li.on { color: var(--ink); }
.ticks li.on::before { background: var(--ink); border-color: var(--ink); transform: translateY(9px) scale(1.4); }
#range:focus-visible + .ticks li.on::before { box-shadow: 0 0 0 3px var(--water), 0 0 0 5px var(--focus); }

/* ---------- place panel ---------- */
.place { position: fixed; right: var(--gutter); top: 84px; width: 340px; z-index: 6; padding: 18px 20px 16px; background: #121b24; border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,0.35); }
.place h2 { margin: 0 28px 2px 0; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; }
.place-sub { margin: 0 0 14px; font-size: 13px; color: var(--ink-2); }
.place-note { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); }
.close { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.close:hover { color: var(--ink); background: rgba(233,237,240,0.08); }
.close svg { width: 11px; height: 11px; }
.place-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.place-chart .ax { font-size: 10.5px; fill: var(--ink-3); font-family: var(--sans); }
.place-chart .bar-hit { fill: transparent; cursor: default; }
.place-chart .cur { fill: none; stroke: var(--ink); stroke-width: 1; }
.tip { position: fixed; z-index: 9; pointer-events: none; background: #0b1218; border: 1px solid var(--rule); border-radius: 8px; padding: 9px 11px; font-size: 12.5px; min-width: 190px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.tip b { display: block; font-weight: 600; margin-bottom: 4px; }
.tip div { display: grid; grid-template-columns: 9px 1fr auto; gap: 7px; align-items: center; color: var(--ink-2); }
.tip i { width: 8px; height: 8px; border-radius: 50%; }
.tip span:last-child { font-variant-numeric: tabular-nums; color: var(--ink); }

.hover { position: fixed; z-index: 7; pointer-events: none; font-size: 13px; padding: 6px 10px; background: #0b1218; border: 1px solid var(--rule); border-radius: 7px; white-space: nowrap; }
.hover small { display: block; color: var(--ink-3); font-size: 11.5px; }

/* ---------- about ---------- */
dialog { padding: 0; border: 1px solid var(--rule); border-radius: 16px; background: #121b24; color: var(--ink); max-width: 640px; width: calc(100vw - 32px); max-height: calc(100vh - 64px); }
dialog::backdrop { background: rgba(5, 9, 13, 0.6); }
.about-body { position: relative; padding: 30px 34px 26px; overflow: auto; max-height: calc(100vh - 66px); }
.about-body h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 0 0 14px; }
.about-body h3 { font-size: 15px; font-weight: 600; margin: 22px 0 6px; }
.about-body p { margin: 0 0 12px; color: var(--ink-2); max-width: 68ch; }
.about-body .credit { margin-top: 20px; color: var(--ink); }

.loading { position: fixed; inset: 0; display: grid; place-items: center; z-index: 20; background: var(--water); transition: opacity .6s; font-family: var(--serif); font-size: 22px; color: var(--ink-2); }
.loading.done { opacity: 0; pointer-events: none; }
.loading span::after { content: ""; display: block; margin: 18px auto 0; width: 120px; height: 1px; background: linear-gradient(90deg, transparent, var(--ink-2), transparent); background-size: 200% 100%; animation: sweep 1.4s linear infinite; }
@keyframes sweep { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .top { flex-wrap: wrap; gap: 10px 12px; padding: 14px var(--gutter) 0; }
  .title { font-size: 22px; order: 2; width: 100%; }
  .mark { order: 1; }
  .top-actions { order: 1; gap: 10px; }
  .top-actions .text-btn { display: none; }
  .find { flex: 1; min-width: 0; }
  .find input { width: 100%; }
  .top-actions { flex: 1; }
  .legend { left: var(--gutter); right: var(--gutter); top: auto; bottom: 170px; width: auto; max-height: none; padding: 10px; border-radius: 12px; overflow: visible; }
  .legend-intro { display: none; }
  #groups { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  #groups > li { flex: none; }
  .g-row { grid-template-columns: 10px auto; width: auto; margin: 0; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 999px; }
  .g-row .g-n { display: none; }
  .g-name { font-size: 13px; white-space: nowrap; }
  .subs { display: none !important; }
  .show-all { display: none; }
  .time { left: var(--gutter); right: var(--gutter); width: auto; bottom: 16px; }
  .stamp { top: 86px; width: calc(100vw - 2 * var(--gutter)); display: flex; align-items: flex-end; gap: 14px; }
  .year { font-size: 56px; flex: none; }
  .measure { margin: 0; font-size: 12px; line-height: 1.4; }
  .ticks li span { font-size: 10px; }
  .ticks li:nth-child(even) span { visibility: hidden; }
  .place { left: var(--gutter); right: var(--gutter); width: auto; top: auto; bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .loading span::after { animation: none; }
  * { transition: none !important; }
}

/* ---------- year change ---------- */
.year.turn { animation: yearIn .7s cubic-bezier(.2,.7,.2,1); }
@keyframes yearIn { from { opacity: .15; transform: translateY(14px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- tour ---------- */
.tour-btn { pointer-events: auto; margin-top: 18px; font-size: 14px; color: var(--ink); border: 1px solid var(--ink-3); border-radius: 999px; padding: 9px 18px; background: var(--panel); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color .3s ease; }
.tour-btn:hover { border-color: var(--ink); }
.tour { position: fixed; right: var(--gutter); top: 84px; width: 340px; z-index: 7; padding: 18px 20px 16px; background: #121b24; border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35); animation: tourIn .5s cubic-bezier(.2,.7,.2,1); }
@keyframes tourIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tour-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tour-head .close { position: static; }
.tour-n { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tour h2 { margin: 0 0 10px; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; }
.tour p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.tour-nav { display: flex; justify-content: space-between; align-items: center; }
.tour-nav .text-btn:disabled { opacity: .35; cursor: default; }
.tour-next { font-size: 14px; color: var(--water); background: var(--ink); border-radius: 999px; padding: 8px 18px; font-weight: 500; }
.tour-next:hover { background: #fff; }
.place.with-tour { top: auto; bottom: 26px; }
@media (max-width: 860px) {
  .tour-btn { margin-top: 0; padding: 6px 12px; font-size: 12.5px; position: fixed; right: var(--gutter); top: 156px; }
  .tour { left: var(--gutter); right: var(--gutter); width: auto; top: auto; bottom: 150px; padding: 14px 16px 12px; }
  .tour h2 { font-size: 21px; } .tour p { font-size: 13.5px; margin-bottom: 12px; }
  .place.with-tour { display: none; }
  .track { margin-top: 38px; } .strip { height: 30px; } .strip .col { width: 9px; }
}
@media (prefers-reduced-motion: reduce) { .year.turn, .tour { animation: none; } }

/* ---------- map modes ---------- */
.pill-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink); border: 1px solid var(--rule); border-radius: 999px; padding: 5px 13px 5px 11px; background: var(--panel); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pill-btn svg { width: 14px; height: 14px; }
.pill-btn:hover, .pill-btn[aria-expanded="true"] { border-color: var(--ink-3); }
.pill-btn[aria-expanded="true"] { background: rgba(233,237,240,.1); }
.modes { display: grid; grid-template-columns: repeat(3, auto); gap: 2px; padding: 3px; margin: -4px -4px 12px; border-radius: 10px; background: rgba(233,237,240,.05); }
.modes button { font-size: 12.5px; color: var(--ink-2); padding: 6px 8px; border-radius: 7px; white-space: nowrap; transition: background .2s ease, color .2s ease; }
.modes button:hover { color: var(--ink); }
.modes button[aria-checked="true"] { background: rgba(233,237,240,.13); color: var(--ink); }
.mix-key .ramp { height: 10px; border-radius: 3px; background: linear-gradient(90deg, #0d366b, #184f95, #256abf, #3987e5, #6da7ec, #9ec5f4, #cde2fb); }
.mix-key .ramp-l { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--ink-2); }
#groups[hidden], .legend-intro[hidden] { display: none; }

/* ---------- history ---------- */
.notice { margin: 14px 0 0; padding: 9px 12px; font-size: 13px; line-height: 1.45; color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-left: 2px solid var(--ink-2); border-radius: 8px; max-width: 330px; }
.notice[hidden] { display: none; }
.since { pointer-events: auto; margin-top: 18px; }
.since-h { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.since ul { list-style: none; margin: 0; padding: 0; }
.since li button, .ins-ev button { display: grid; grid-template-columns: 62px 1fr; gap: 8px; align-items: baseline; width: 100%; text-align: left; font-size: 13.5px; line-height: 1.35; color: var(--ink); padding: 5px 0; border-top: 1px solid var(--rule); }
.since li:last-child button { border-bottom: 1px solid var(--rule); }
.since li button:hover span + *, .since li button:hover { color: #fff; }
.since-y { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.evmarks { position: absolute; left: 0; right: 0; top: 50%; height: 0; z-index: 3; pointer-events: none; }
.evm { position: absolute; top: -13px; width: 9px; height: 12px; margin-left: -4.5px; pointer-events: auto; }
.evm::before { content: ""; position: absolute; left: 4px; top: 2px; width: 1px; height: 8px; background: var(--ink-3); opacity: .55; transition: opacity .2s, background .2s, height .2s; }
.evm.cur::before { opacity: 1; background: var(--ink-2); }
.evm.on::before, .evm:hover::before { background: var(--ink); opacity: 1; height: 10px; top: 0; }
.evm span { position: absolute; bottom: calc(100% + 54px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; padding: 5px 9px; background: #0b1218; border: 1px solid var(--rule); border-radius: 7px; color: var(--ink); opacity: 0; pointer-events: none; transition: opacity .15s; }
.evm:hover span, .evm:focus-visible span { opacity: 1; }
.event { position: fixed; left: var(--gutter); top: 84px; width: 360px; z-index: 7; padding: 18px 20px 16px; background: #121b24; border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35); animation: tourIn .45s cubic-bezier(.2,.7,.2,1); }
.event .ev-year { margin: 4px 0 0; font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -.01em; }
.event h2 { margin: 6px 0 10px; font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.15; }
.event #evP { margin: 0 0 16px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.event .tour-next:disabled, .event .text-btn:disabled { opacity: .35; cursor: default; }
body.ev-open .stamp { visibility: hidden; }

/* ---------- insights ---------- */
.ins { position: fixed; left: var(--gutter); top: 84px; bottom: 166px; width: 390px; z-index: 6; display: flex; flex-direction: column; background: #121b24; border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35); animation: tourIn .4s cubic-bezier(.2,.7,.2,1); }
.ins[hidden] { display: none; }
body.ins-open .stamp { visibility: hidden; }
.ins-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px 20px; border-bottom: 1px solid var(--rule); }
.ins-head h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 26px; }
.ins-head .close { position: static; }
.ins-body { overflow: auto; padding: 4px 20px 20px; scrollbar-width: thin; }
.ins-body section { padding: 16px 0 4px; }
.ins-body section + section { border-top: 1px solid var(--rule); }
.ins-body h3 { margin: 0 0 3px; font-size: 14.5px; font-weight: 600; }
.ins-sub { margin: 0 0 10px; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.ins-note { margin: 8px 0 4px; font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.ins-ev { list-style: none; margin: 8px 0 8px; padding: 0; }
.ins-ev button:hover { color: #fff; }
.ins-list { list-style: none; margin: 0 0 8px; padding: 0; }
.ins-list button { display: block; width: 100%; text-align: left; padding: 8px 8px; margin: 0 -8px; width: calc(100% + 16px); border-radius: 8px; }
.ins-list button:hover { background: rgba(233,237,240,.06); }
.ins-list .nb { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.ins-list .nb small { color: var(--ink-3); font-size: 12px; margin-left: 2px; }
.ins-list .flip { display: block; margin-top: 3px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.ins-list .flip .dot { margin-right: 5px; vertical-align: 0; }
.ins-list em, .ins-list .pk em { font-style: normal; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ins-list .arr { margin: 0 7px; color: var(--ink-3); }
.peaks button { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; }
.peaks .nb { font-size: 13px; }
.peaks .pk { font-size: 13px; text-align: right; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ins-seg { list-style: none; margin: 0 0 8px; padding: 0; }
.ins-seg li { display: grid; grid-template-columns: 1fr 132px 26px; gap: 10px; align-items: center; padding: 4px 0; font-size: 13px; }
.ins-seg .nb { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ins-seg b, .ins-mix b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.spark { display: block; overflow: visible; }
.spark path { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark .base { stroke: var(--rule); stroke-width: 1; }
.spark .now { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 2; }
.spark circle { stroke: #121b24; stroke-width: 2; }
.ins-mix { display: flex; align-items: flex-end; gap: 14px; }
.ins-mix b { font-size: 22px; font-family: var(--serif); font-weight: 400; }
.ins-axis { display: flex; justify-content: space-between; width: 240px; font-size: 11px; color: var(--ink-3); margin-top: 3px; }

/* ---------- compare ---------- */
.cmp-btn { flex: none; align-self: flex-end; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 1px solid var(--ink-3); border-radius: 999px; font-size: 13.5px; }
.cmp-btn svg { width: 15px; height: 15px; }
.cmp-btn:hover { border-color: var(--ink); }
.cmp-btn[aria-pressed="true"] { background: var(--ink); color: var(--water); border-color: var(--ink); }
.cmp { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.cmp-line { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px solid rgba(233,237,240,.85); }
.cmp-handle { pointer-events: auto; position: absolute; top: 50%; left: 0; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: var(--ink); color: var(--water); display: grid; place-items: center; cursor: ew-resize; touch-action: none; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.cmp-handle svg { width: 18px; height: 11px; }
.cmp-tag { position: absolute; top: 84px; display: flex; align-items: center; gap: 4px; pointer-events: auto; font-family: var(--serif); font-size: 34px; line-height: 1; padding: 6px 10px; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cmp-tag button { font-family: var(--sans); font-size: 22px; width: 28px; height: 32px; color: var(--ink-2); border-radius: 6px; }
.cmp-tag button:hover:not(:disabled) { color: var(--ink); background: rgba(233,237,240,.08); }
.cmp-tag button:disabled { opacity: .25; cursor: default; }
body.comparing .stamp, body.comparing .since { visibility: hidden; }

@media (max-width: 860px) {
  .pill-btn span { display: none; }
  .pill-btn { padding: 7px 10px; }
  .modes { margin: 0 0 8px; }
  .modes button { font-size: 12px; padding: 5px 6px; }
  .mix-key .legend-intro { display: none; }
  .since { display: none; }
  .evm span { display: none; }
  .event { left: var(--gutter); right: var(--gutter); width: auto; top: auto; bottom: 150px; padding: 14px 16px 12px; max-height: 52vh; overflow: auto; }
  .event .ev-year { font-size: 30px; } .event h2 { font-size: 21px; } .event #evP { font-size: 13.5px; margin-bottom: 12px; }
  .ins { left: 0; right: 0; top: 64px; bottom: 0; width: auto; border-radius: 16px 16px 0 0; z-index: 12; }
  .cmp-btn span { display: none; }
  .cmp-btn { width: 38px; padding: 0; justify-content: center; }
  .cmp-tag { top: 150px; font-size: 24px; padding: 4px 6px; }
  .cmp-tag button { width: 22px; font-size: 18px; }
}

/* ---------- overlays ---------- */
.ovl { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.ovl-btn { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); padding: 3px 0; }
.ovl-btn:hover { color: var(--ink); }
.ovl-btn .sw { width: 26px; height: 15px; border-radius: 999px; border: 1px solid var(--ink-3); position: relative; transition: background .2s, border-color .2s; flex: none; }
.ovl-btn .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-2); transition: transform .2s, background .2s; }
.ovl-btn[aria-pressed="true"] { color: var(--ink); }
.ovl-btn[aria-pressed="true"] .sw { background: var(--ink); border-color: var(--ink); }
.ovl-btn[aria-pressed="true"] .sw::after { transform: translateX(11px); background: var(--water); }
.holc-key { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin-top: 8px; font-size: 12px; color: var(--ink); }
.holc-key[hidden] { display: none; }
.holc-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.holc-key em { font-style: normal; color: var(--ink-2); }
@media (max-width: 860px) { .ovl { margin-top: 8px; padding-top: 6px; } .holc-key { grid-template-columns: repeat(4, auto); } .holc-key em { display: none; } }
@media (max-width: 860px) { .stamp { flex-wrap: wrap; } .notice { flex-basis: 100%; margin-top: 6px; font-size: 12px; padding: 7px 10px; } }
