/* Hyper News. One stylesheet, no outside requests.
   Font: Quicksand (SIL Open Font License 1.1, static/fonts/Quicksand-OFL.txt), served from this site, in four
   weights. It has Latin letters only; other scripts fall back to the system's fonts. */
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/quicksand-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/quicksand-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/static/fonts/quicksand-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/static/fonts/quicksand-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/quicksand-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/quicksand-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/quicksand-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/quicksand-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #f7f6f3; --card: #ffffff; --ink: #14161a; --ink2: #3a3f47; --muted: #6b7079; --line: #e3e1db; --soft: #efede8;
  --sea: #e9eef2; --land: #d6dad3; --landline: #c3c8c0;
  --accent: #d33a2c; --link: #0f4c81;
  --ok: #17803d; --ok-bg: #e5f4ea; --warn: #a15c07; --warn-bg: #fbf0dc; --grey: #5b6472; --grey-bg: #eceef1;
  --homicide: #b3261e; --shooting: #c2410c; --conflict: #7f1d1d; --terrorism: #9d174d; --accident: #1d4ed8; --fire: #ea580c;
  --disaster: #0e7490; --crime: #4338ca; --kidnapping: #7e22ce; --protest: #a16207; --election: #0f766e; --economy: #15803d; --markets: #1d4ed8; --sports: #be185d; --other: #475569;
  --serif: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --sans: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --r: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1114; --card: #171a1f; --ink: #eef0f3; --ink2: #c7ccd4; --muted: #8b929c; --line: #2a2f37; --soft: #1e2228;
    --sea: #131820; --land: #2a313b; --landline: #353d48;
    --link: #8cc4ff; --ok: #4ade80; --ok-bg: #11291a; --warn: #fbbf24; --warn-bg: #2c2410; --grey: #a3acb9; --grey-bg: #232830;
    --homicide: #f87171; --shooting: #fb923c; --conflict: #fca5a5; --terrorism: #f472b6; --accident: #60a5fa; --fire: #fdba74;
    --disaster: #22d3ee; --crime: #a5b4fc; --kidnapping: #d8b4fe; --protest: #facc15; --election: #5eead4; --economy: #86efac; --markets: #93c5fd; --sports: #f9a8d4; --other: #94a3b8;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { line-height: 1.2; }
code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }

/* header */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font: 600 22px/1 var(--serif); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--accent); font-weight: 700; margin-left: 2px; }
.mark { width: 28px; height: 28px; color: var(--ink); }
.mark .dot { fill: var(--accent); }
.search { flex: 1; max-width: 460px; }
.search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; font: inherit; background: var(--bg); color: var(--ink); }
.search input:focus { outline: 2px solid var(--link); outline-offset: 1px; }
.nav { display: flex; gap: 18px; margin-left: auto; font-weight: 500; }
.nav a { color: var(--ink2); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: center; padding: 28px 0 18px; }
.hero h1 { font: 600 40px/1.1 var(--serif); margin: 0 0 12px; letter-spacing: -0.015em; }
.lede { font-size: 18px; color: var(--ink2); margin: 0 0 18px; }
.lede b { color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg a { padding: 6px 13px; font-size: 14px; color: var(--ink2); }
.seg a:hover { text-decoration: none; background: var(--soft); }
.seg a[aria-checked="true"] { background: var(--ink); color: var(--card); }
.map { width: 100%; height: auto; display: block; border-radius: var(--r); }
.map .sea { fill: var(--sea); }
.map .land path { fill: var(--land); stroke: var(--landline); stroke-width: 0.5; vector-effect: non-scaling-stroke; }
.map .d { fill-opacity: 0.78; stroke: var(--card); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map a:hover .d { fill-opacity: 1; stroke: var(--ink); stroke-width: 1.5; }
.map .ring { fill: none; stroke: var(--accent); stroke-width: 0.6; }
.map.zoom .land path { stroke-width: 0.15; }
.map.zoom .d { stroke-width: 0.4; }
.hero-map { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); padding: 6px; }

/* categories */
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.catchip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink2); font-size: 14px; }
.catchip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--other)); }
.catchip span { color: var(--muted); font-variant-numeric: tabular-nums; }
.catchip:hover { text-decoration: none; border-color: var(--ink2); }
.catchip.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.catchip.on span { color: inherit; opacity: 0.75; }
.cat-homicide { --c: var(--homicide); } .cat-shooting { --c: var(--shooting); } .cat-conflict { --c: var(--conflict); }
.cat-terrorism { --c: var(--terrorism); } .cat-accident { --c: var(--accident); } .cat-fire { --c: var(--fire); }
.cat-disaster { --c: var(--disaster); } .cat-crime { --c: var(--crime); } .cat-kidnapping { --c: var(--kidnapping); }
.cat-protest { --c: var(--protest); } .cat-election { --c: var(--election); } .cat-economy { --c: var(--economy); } .cat-markets { --c: var(--markets); } .cat-sports { --c: var(--sports); }
.cat-other { --c: var(--other); }
.map .d { fill: var(--c, var(--other)); }
.active { margin: -4px 0 14px; color: var(--ink2); }
.active .x { margin: 0 12px 0 4px; color: var(--muted); font-size: 18px; }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; align-content: start; }
.grid.wide { margin-top: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 13px; border-top: 3px solid var(--c, var(--other)); display: flex; flex-direction: column; gap: 6px; }
.card-head { display: flex; justify-content: space-between; font-size: 12.5px; letter-spacing: 0.02em; }
.cat { color: var(--c, var(--other)); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.06em; }
.when { color: var(--muted); }
.card h3 { font: 600 19px/1.25 var(--serif); margin: 0; }
.card h3 a { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.st-confirmed.chip { color: var(--ok); background: var(--ok-bg); }
.st-differ.chip { color: var(--warn); background: var(--warn-bg); }
.st-single.chip { color: var(--grey); background: var(--grey-bg); }
.meta { margin: 0; font-size: 13.5px; color: var(--muted); }
.meta .place { color: var(--ink2); font-weight: 500; }
.srcs { margin: 0; font-size: 12.5px; color: var(--muted); }
.srcs span { color: var(--ink2); }
.empty { color: var(--muted); padding: 40px 0; }
.side h2, .ev-side h2 { font: 600 13px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 18px 0 10px; }
.side h2:first-child { margin-top: 0; }
.countries, .names, .nearby { list-style: none; margin: 0; padding: 0; }
.countries li, .names li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.countries a, .names a { color: var(--ink); }
.countries a.on { font-weight: 700; }
.countries span, .names span { color: var(--muted); font-variant-numeric: tabular-nums; }
.nearby li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.note { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-top: 20px; font-size: 14px; }
.note h2 { margin-top: 0 !important; }
.note p { margin: 8px 0; }
.pager { display: flex; justify-content: center; gap: 18px; margin: 26px 0; }
.pager a { border: 1px solid var(--line); background: var(--card); padding: 8px 18px; border-radius: 999px; }

/* event */
.ev-head { padding: 26px 0 10px; max-width: 900px; }
.crumbs { margin: 0 0 8px; font-size: 14px; }
.ev-head h1 { font: 600 38px/1.12 var(--serif); margin: 0 0 10px; letter-spacing: -0.015em; }
.ev-meta { color: var(--ink2); margin: 0; }
.ev-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; margin-top: 14px; }
.verdict { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 14px; border-left: 4px solid var(--grey); }
.verdict.st-confirmed { border-left-color: var(--ok); }
.verdict.st-differ { border-left-color: var(--warn); }
.v-top { display: flex; align-items: center; gap: 10px; }
.v-kind { font-weight: 700; text-transform: uppercase; font-size: 12.5px; letter-spacing: 0.08em; color: var(--muted); }
.v-statement { font: 500 22px/1.3 var(--serif); margin: 8px 0 6px; }
details summary { cursor: pointer; color: var(--link); font-size: 14.5px; font-weight: 500; }
details[open] summary { margin-bottom: 8px; }
.why { color: var(--ink2); margin: 4px 0 10px; font-size: 14.5px; }
.figure { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.fig-head { margin: 0; }
.fig-why { margin: 2px 0 6px; color: var(--muted); font-size: 13.5px; }
.ok { color: var(--ok); font-weight: 600; } .no { color: var(--accent); font-weight: 600; } .un { color: var(--warn); font-weight: 600; }
.fig-out { opacity: 0.8; }
.claims { list-style: none; padding: 0; margin: 0; }
.claims li { margin: 10px 0 14px; }
blockquote { margin: 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--line); font: 17px/1.45 var(--serif); color: var(--ink); }
mark { background: color-mix(in srgb, var(--warn) 22%, transparent); color: inherit; padding: 0 2px; border-radius: 3px; }
.cite { margin: 5px 0 0 17px; font-size: 13.5px; color: var(--muted); }
.cite a { font-weight: 600; }
.cite .open { font-weight: 500; }
.coverage h2 { font: 600 22px/1.2 var(--serif); margin: 30px 0 4px; }
.timeline { list-style: none; padding: 0; margin: 14px 0; border-left: 2px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 9px 0 9px 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--c, var(--other)); }
.timeline time { color: var(--muted); font-size: 13.5px; padding-top: 2px; }
.tl-title { color: var(--ink); font-weight: 600; }
.tl-pub { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.copies { margin-top: 4px; font-size: 13.5px; }
.copies ul { margin: 4px 0 0; padding-left: 18px; list-style: disc; border: 0; }
.timeline .copies li { display: list-item; padding: 2px 0; }
.timeline .copies li::before { display: none; }
.copies li .muted { margin-left: 6px; }
.mini { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 6px; }
.mini p { margin: 6px 4px 2px; font-size: 13px; }

/* pages */
.namehead { padding: 26px 0 6px; max-width: 860px; }
.namehead h1 { font: 600 38px/1.1 var(--serif); margin: 0 0 8px; }
.prose { max-width: 760px; padding: 26px 0 40px; }
.prose h1 { font: 600 40px/1.1 var(--serif); margin: 0 0 12px; }
.prose h2 { font: 600 24px/1.2 var(--serif); margin: 30px 0 8px; }
.prose li { margin: 8px 0; }
.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 16px 0 40px; font-size: 14.5px; }
.table.narrow { max-width: 640px; }
.table th, .table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.table th { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--soft); }
.table .n { text-align: right; font-variant-numeric: tabular-nums; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 40px; background: var(--card); }
.foot-row { padding: 18px 20px 26px; font-size: 14px; color: var(--ink2); }
.foot-row p { margin: 6px 0; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .layout, .ev-body { grid-template-columns: 1fr; }
  /* The menu moves to its own row under the search box rather than disappearing. */
  .top-row { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 6px; row-gap: 6px; }
  .search { flex: 1; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 20px; font-size: 15px; padding: 2px 0 4px; }
}
@media (max-width: 560px) {
  .hero h1, .ev-head h1, .namehead h1, .prose h1 { font-size: 30px; }
  .top-row { gap: 12px; }
  .brand span { display: none; }
  .timeline li { grid-template-columns: 1fr; }
  .table th, .table td { padding-left: 8px; padding-right: 8px; }
  .table .muted { display: block; }
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.wd { margin: .5rem 0; padding: .5rem .75rem; border-left: 3px solid var(--accent, #2b6cb0); background: var(--card, transparent); }
.foreign { list-style: none; padding: 0; }
.foreign li { margin: .35rem 0; }

/* correction form and our own claim sentences */
.report { display: grid; gap: 14px; margin: 24px 0; max-width: 620px; }
.report label { display: grid; gap: 6px; font-weight: 600; }
.report input, .report select, .report textarea { font: inherit; font-weight: 400; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: inherit; }
.report button { justify-self: start; font: inherit; font-weight: 600; padding: 9px 18px; border-radius: 8px; border: 0; background: var(--accent); color: #fff; cursor: pointer; }
.report .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ok-box { padding: 12px 14px; border-radius: 8px; background: var(--ok-bg); color: var(--ok); }
.claim { margin: 0 0 4px; font-size: 16px; }
.prose pre { background: color-mix(in srgb, var(--line) 40%, transparent); padding: 10px 12px; border-radius: 8px; }

/* corrections */
.corrected-note { margin: 8px 0; padding: 10px 14px; border-radius: 8px; background: var(--warn-bg); color: var(--ink); border-left: 4px solid var(--warn); }
.corrected { padding-left: 18px; }
.corrected li { margin: 10px 0; }

/* summary */
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; margin-bottom: 14px; }
.summary h2 { margin: 0 0 6px; font-size: 18px; }
.summary p { line-height: 1.6; }
.sumtab { width: 100%; border-collapse: collapse; margin: 4px 0 8px; font-size: 14px; }
.sumtab th, .sumtab td { padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; text-align: left; }
.sumtab tr:first-child th, .sumtab tr:first-child td { border-top: 0; }
.sumtab th { width: 9.5em; font-weight: 600; color: var(--muted); white-space: nowrap; }
.sumtab td.sumsrc { width: 1%; white-space: nowrap; font-size: 12.5px; }
.sumtab td.sumsrc a { text-decoration: none; color: var(--muted); max-width: 14em; display: inline-block; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.sumtab td.sumsrc a:hover { color: var(--ink); }
@media (max-width: 640px) { .sumtab th { width: auto; white-space: normal; } .sumtab td.sumsrc a { max-width: 8em; } }
.summary a.src { text-decoration: none; font-size: 0.8em; margin-left: 2px; padding: 0 3px; border-radius: 4px; background: var(--soft); }

/* front page: tabs, biggest stories, one row per category */
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.tab { padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink2); font-weight: 600; }
.tab.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.overview { min-width: 0; }
.top3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.top3 .card h3 { font-size: 22px; }
.row { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--other)); border-radius: var(--r); padding: 10px 16px; margin-bottom: 12px; }
.row h2 { font-size: 17px; margin: 2px 0 6px; display: flex; align-items: baseline; gap: 8px; }
.row h2 i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--other)); display: inline-block; }
.row h2 .all { margin-left: auto; font-size: 14px; font-weight: 500; }
.compact { list-style: none; margin: 0; padding: 0; }
.compact li { padding: 6px 0; border-top: 1px solid var(--line); line-height: 1.35; }
.compact li:first-child { border-top: 0; }
.compact li > a { color: var(--ink); font-weight: 600; }
.compact .chips .chip { font-size: 12px; }

/* zoomable map (static/map.js) */
.mapbox { position: relative; }
.mapbox.live svg.map { cursor: grab; touch-action: none; }
.mapbox.live svg.map:active { cursor: grabbing; }
.mapbox svg.map:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.map .areas path { stroke: var(--landline); stroke-width: 0.6; vector-effect: non-scaling-stroke; cursor: pointer; fill: var(--land); }
.map .areas path.h1 { fill: color-mix(in srgb, var(--accent) 18%, var(--land)); }
.map .areas path.h2 { fill: color-mix(in srgb, var(--accent) 32%, var(--land)); }
.map .areas path.h3 { fill: color-mix(in srgb, var(--accent) 48%, var(--land)); }
.map .areas path.h4 { fill: color-mix(in srgb, var(--accent) 64%, var(--land)); }
.map .areas path:hover, .map .areas path.on { stroke: var(--ink); stroke-width: 1.6; }
.map .land path { cursor: pointer; }
.map .pulse { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; animation: pulse 1.2s ease-out 2; }
@keyframes pulse { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .map .pulse { animation: none; } }
.map-ctl { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; }
.map-ctl button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 18px; cursor: pointer; }
.map-ctl button:hover { background: var(--soft); }
.map-panel { position: absolute; left: 8px; bottom: 8px; max-width: min(320px, 70%); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; box-shadow: 0 2px 10px rgb(0 0 0 / 12%); }
.map-panel p { margin: 2px 0; }
.map-crumbs { font-size: 13px; }
.map-crumbs button { border: 0; background: none; padding: 0; color: var(--link); cursor: pointer; font: inherit; }
.map-name { font-weight: 700; }
.map-go { font-weight: 600; }
button.onmap { align-self: flex-start; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--ink2); font-size: 12px; padding: 2px 10px; cursor: pointer; }

/* story ring (static/thread.js): cards on a circle, black stage, mirrored floor */
.thread { margin: 18px 0; }
.ring-wrap { display: flex; gap: 12px; overflow-x: auto; padding: 8px 0 18px; outline: none; }
.tcard { flex: 0 0 180px; min-height: 200px; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--c, var(--other)); color: var(--ink); text-decoration: none; }
.tcard .t-date { font-size: 12px; color: var(--muted); }
.tcard .t-kind { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--c, var(--other)); display: flex; align-items: center; gap: 6px; }
.tcard .t-kind i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--other)); }
.tcard .t-title { font: 600 16px/1.25 var(--serif); }
.tcard .t-place { font-size: 13px; color: var(--muted); margin-top: auto; }
.tcard.t-all { justify-content: center; align-items: center; text-align: center; border-top-color: var(--accent); }
.tcard.t-all .t-title { font-size: 20px; }
.ring-ctl, .t-detail { display: none; }
.thread.live .ring-wrap { --r: 380px; display: block; overflow: hidden; height: 330px; perspective: 1100px; background: radial-gradient(ellipse at 50% 85%, #1d2129 0%, #050608 65%); border-radius: var(--r-box, 14px); cursor: grab; }
.thread.live .ring { position: relative; width: 180px; height: 210px; margin: 34px auto 0; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.thread.live .tcard { position: absolute; inset: 0;
  background: #f5f5f2; color: #14161a; box-shadow: 0 0 24px rgb(255 255 255 / 22%); backface-visibility: hidden; opacity: 0.55; transition: opacity 0.4s;
  -webkit-box-reflect: below 6px linear-gradient(transparent 55%, rgb(255 255 255 / 25%)); }
.thread.live .tcard.front { opacity: 1; box-shadow: 0 0 36px rgb(255 255 255 / 45%); }
.thread.live .tcard .t-date, .thread.live .tcard .t-place { color: #555b64; }
.thread.live .ring-ctl { display: flex; justify-content: center; gap: 12px; margin-top: 10px; }
.ring-ctl button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 24px; cursor: pointer; }
.thread.live .t-detail:not([hidden]) { display: block; margin-top: 12px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.t-detail p { margin: 2px 0; } .t-detail .t-title { font: 600 18px/1.3 var(--serif); }
@media (max-width: 640px) { .thread.live .ring-wrap { --r: 260px; height: 300px; } .thread.live .ring { width: 150px; } }
.timeline-all h3 { margin: 18px 0 6px; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tl-events { list-style: none; margin: 0; padding: 0 0 0 4px; border-left: 2px solid var(--line); }
.tl-events li { display: grid; grid-template-columns: 120px 14px 1fr; align-items: start; gap: 8px; padding: 7px 0; }
.tl-events time { font-size: 13px; color: var(--muted); padding-left: 8px; }
.tl-events li > i { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; background: var(--c, var(--other)); }
.tl-events a { font-weight: 600; color: var(--ink); }
a.thread-link { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--link) 16%, transparent)); border-radius: 6px; padding: 1px 6px; font-weight: 600; }
a.thread-link::after { content: " ◎"; font-size: 0.8em; }

/* official figures */
.official { margin: .4rem 0 0; font-size: .92rem; color: var(--muted, #475569); }
.official-differs { color: var(--warn, #b45309); }
.official-table { border-collapse: collapse; margin: .5rem 0; font-variant-numeric: tabular-nums; }
.official-table th, .official-table td { padding: .3rem .7rem; border-bottom: 1px solid var(--line, #e2e8f0); text-align: right; }
.official-table th[scope="row"], .official-table thead th:first-child { text-align: left; }

/* ---- one-screen front page (templates/app.html, static/app.mjs): night console ---- */
body.appmode {
  --bar: #080c13; --ctl: rgba(7, 11, 18, 0.86); --drawer: rgba(9, 13, 20, 0.97); --space: radial-gradient(ellipse at 50% 40%, #0b1626 0%, #04070c 70%);
  --accent2: #38bdf8; --row: #111824; --rowh: #0f1622;
  --bg: #05080d; --card: #0b1018; --ink: #e6ebf2; --ink2: #b8c2d0; --muted: #7d8899; --line: #1b2433; --soft: #111824;
  --link: #8cc4ff; --ok: #4ade80; --ok-bg: #0f2a1a; --warn: #fbbf24; --warn-bg: #2b2210; --grey: #a3acb9; --grey-bg: #1a212c;
  --homicide: #f87171; --shooting: #fb923c; --conflict: #ef4444; --terrorism: #f472b6; --accident: #60a5fa; --fire: #fdba74;
  --disaster: #22d3ee; --crime: #a5b4fc; --kidnapping: #d8b4fe; --protest: #facc15; --election: #5eead4; --economy: #86efac; --markets: #93c5fd; --sports: #f9a8d4; --other: #94a3b8;
  color-scheme: dark; height: 100vh; overflow: hidden; display: flex; flex-direction: column; font-size: 14px;
}
.appmode .top { background: var(--bar); border-bottom: 1px solid var(--line); position: static; }
.appmode .top .wrap { max-width: none; padding: 0 12px; }
.appmode .top-row { height: 44px; gap: 14px; }
.appmode .brand { font-size: 19px; color: var(--ink); } .appmode .mark { width: 22px; height: 22px; color: var(--ink); }
.appmode .search input { height: 30px; background: var(--soft); border-color: var(--line); color: var(--ink); font-size: 13px; }
.appmode .nav a { color: var(--ink2); font-size: 13px; }
.appmode main.wrap { max-width: none; padding: 0; margin: 0; flex: 1; min-height: 0; display: flex; }
.appmode .foot { display: none; }
.app { flex: 1; min-height: 0; display: grid; grid-template-rows: 38px minmax(0, 1fr); width: 100%; }
.app.loading .pbody { opacity: 0.55; transition: opacity 0.2s; }

/* market strip */
.tick { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bar); display: flex; align-items: center; }
.tick-clip { flex: 1; overflow: hidden; min-width: 0; }
.tick-track { display: flex; gap: 2px; white-space: nowrap; padding-left: 8px; width: max-content; }
.tick-track.run { animation: tick 120s linear infinite; }
.tick:hover .tick-track.run { animation-play-state: paused; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ti { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-right: 1px solid var(--line); color: var(--ink); font-size: 12.5px; }
.ti:hover { background: var(--soft); text-decoration: none; }
.ti .tl { color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.ti .tv { font-variant-numeric: tabular-nums; font-weight: 600; }
.ti .tc { font-variant-numeric: tabular-nums; font-size: 11.5px; color: var(--muted); } .ti .tc.up { color: #4ade80; } .ti .tc.down { color: #f87171; }
.ti.g-crypto .tl { color: #fbbf24; } .ti.g-rates .tl, .ti.g-fx .tl { color: #93c5fd; } .ti.g-economy .tl { color: #86efac; } .ti.g-commodity .tl { color: #fdba74; }
.spark { width: 64px; height: 20px; } .spark .l { fill: none; stroke: #94a3b8; stroke-width: 1.4; vector-effect: non-scaling-stroke; } .spark .a { fill: #94a3b8; opacity: 0.12; }
.spark.up .l { stroke: #4ade80; } .spark.up .a { fill: #4ade80; } .spark.down .l { stroke: #f87171; } .spark.down .a { fill: #f87171; }
.ti .tw { font-size: 10.5px; color: var(--muted); padding: 1px 5px; border-radius: 4px; background: color-mix(in srgb, var(--line) 45%, transparent); }
.ti .tw.stale { color: #fbbf24; background: color-mix(in srgb, #fbbf24 14%, transparent); }

/* map stage */
.stage { position: relative; min-height: 0; }
.glmap, .glmap.maplibregl-map { position: absolute; inset: 0; background: var(--space); }
.app.nogl .glmap { position: static; overflow: auto; padding: 8px; }
.mbar { position: absolute; top: 10px; left: 10px; right: 64px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none; z-index: 2; }
.mbar > * { pointer-events: auto; }
.mcrumbs { display: flex; align-items: center; gap: 6px; background: var(--ctl); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px;
  font-weight: 600; backdrop-filter: blur(6px); }
.mcrumbs a { color: var(--ink); } .mcrumbs a:last-child { color: #fde68a; } .mcrumbs span { color: var(--muted); }
.mform { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mform select, .mseg button, .mtools button { height: 30px; background: var(--ctl); color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 13px; padding: 0 10px; backdrop-filter: blur(6px); }
.mform select { max-width: 260px; }
.mmode { height: 32px; background: rgba(7, 11, 18, 0.92); color: var(--ink); border: 1px solid #f59e0b; border-radius: 8px; padding: 0 8px;
  font-weight: 600; cursor: pointer; }
.mseg { display: inline-flex; } .mseg button { border-radius: 0; margin-left: -1px; cursor: pointer; } .mseg button:first-child { border-radius: 8px 0 0 8px; } .mseg button:last-child { border-radius: 0 8px 8px 0; }
.mseg button[aria-checked="true"] { background: #1d4ed8; border-color: #2563eb; color: #fff; }
.mseg.small button { height: 24px; font-size: 11.5px; padding: 0 8px; }
.mtools { position: absolute; left: 10px; bottom: 34px; display: flex; gap: 4px; z-index: 2; }
.mtools button { cursor: pointer; font-weight: 600; } .mtools button[aria-pressed="true"] { background: #0e7490; border-color: #0891b2; }
.msum { position: absolute; left: 10px; bottom: 6px; margin: 0; font-size: 12px; color: var(--ink2); background: rgba(7, 11, 18, 0.7); padding: 2px 8px; border-radius: 6px; z-index: 2; }
.msum b { color: var(--ink); }
.hn-pop .maplibregl-popup-content { background: rgba(7, 11, 18, 0.94); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px;
  max-width: 300px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }
.hn-pop .maplibregl-popup-content b { display: block; } .hn-pop .maplibregl-popup-content span { color: var(--muted); }
.hn-pop .maplibregl-popup-tip { display: none; }
.maplibregl-ctrl-group { background: rgba(7, 11, 18, 0.86) !important; border: 1px solid var(--line); }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); }
.maplibregl-ctrl-attrib { background: rgba(7, 11, 18, 0.7) !important; color: var(--muted); } .maplibregl-ctrl-attrib a { color: var(--ink2) !important; }
.pulse { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fde68a; box-shadow: 0 0 18px #fde68a; animation: pulse 1.4s ease-out infinite; pointer-events: none; }
@keyframes pulse { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* event drawer over the map */
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 92vw); background: var(--drawer); border-left: 1px solid var(--line); z-index: 4;
  display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5); }
.drawer-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.drawer-x { background: none; border: 0; color: var(--ink); font-size: 24px; cursor: pointer; line-height: 1; }
.drawer-body { overflow: auto; padding: 4px 16px 20px; font-size: 14px; }
.drawer-body h1 { font-size: 22px; } .drawer-body .hero-map, .drawer-body .ev-map { display: none; }

/* dock: three dense panels */
.panel { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--card); }
.phead { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 10px; border-bottom: 1px solid var(--line); background: var(--bar); }
.phead h2 { margin: 0; font: 700 11.5px/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbody { overflow: auto; min-height: 0; flex: 1; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 3px minmax(0, 1fr) auto; column-gap: 8px; padding: 4px 10px 4px 0; border-bottom: 1px solid var(--row); align-items: baseline; }
.rows li:hover { background: var(--rowh); }
.rows li > i { grid-row: 1 / 4; align-self: stretch; background: var(--c); border-radius: 2px; }
.rows .rt { grid-column: 2 / 4; grid-row: 1; color: var(--ink); font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the figures wrap onto as many lines as they need, never cut off */
.rows .chips { grid-column: 2 / 4; grid-row: 2; display: flex; gap: 3px; flex-wrap: wrap; min-width: 0; }
.rows .chips:not(:empty) { margin: 2px 0 1px; }
.rows .chips .chip { font-size: 10.5px; padding: 0 5px; white-space: normal; max-width: 100%; }
.rows .rm { grid-column: 2 / 4; grid-row: 3; font-size: 11.5px; color: var(--muted); }
.rows .empty { display: block; padding: 12px; color: var(--muted); }
.plist .more { margin: 6px 10px; font-size: 12.5px; }
.outs { list-style: none; margin: 0; padding: 0; columns: 2 220px; column-gap: 0; }
.outs li { break-inside: avoid; padding: 3px 10px; border-bottom: 1px solid #111824; font-size: 12.5px; display: flex; flex-direction: column; }
.outs li a, .outs li > span:first-child { color: var(--ink); font-weight: 600; }
.outs li.k-tv a { color: #67e8f9; } .outs li.k-newspaper a { color: #fcd34d; }
.outs .rm { color: var(--muted); font-size: 11px; }
.pside .pbody p { margin: 10px; }
.legend { border-top: 1px solid var(--line); padding: 4px 10px; font-size: 11.5px; color: var(--muted); }
.legend p { margin: 3px 0; }

/* the ring, in its panel */
.pring .pbody { overflow: hidden; display: flex; flex-direction: column; }
.thread.mini { margin: 0; flex: 1; display: flex; flex-direction: column; }
.thread.mini .ring-wrap { flex: 1; }
.thread.mini.live .ring-wrap { --r: 300px; height: auto; min-height: 0; border-radius: 0; background: radial-gradient(ellipse at 50% 90%, #13203a 0%, #04070c 70%); }
.thread.mini.live .ring { width: var(--card, 170px); height: var(--card, 170px); margin: 0; }
.thread.mini .tcard { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 10px; background: linear-gradient(160deg, #111a2a, #0a0f18);
  border: 1px solid #22304a; border-top: 3px solid var(--c); color: var(--ink); font-size: 12.5px; text-decoration: none; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); -webkit-box-reflect: below 6px linear-gradient(transparent 70%, rgba(255, 255, 255, 0.12)); }
.thread.mini .tcard.front { border-color: #3b82f6; box-shadow: 0 0 30px rgba(59, 130, 246, 0.35); }
.thread.mini .t-kind { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c); font-weight: 700; }
.thread.mini .t-title { font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.thread.mini .t-chips { display: flex; flex-wrap: wrap; gap: 3px; } .thread.mini .t-chips .chip { font-size: 10px; padding: 0 5px; }
.thread.mini .t-place { color: var(--muted); font-size: 11px; margin-top: auto; }
.thread.mini .ring-ctl { margin: 4px 0; } .thread.mini .ring-ctl button { width: 30px; height: 30px; font-size: 18px; background: var(--soft); color: var(--ink); border-color: var(--line); }

@media (max-width: 900px) {
  body.appmode { height: auto; overflow: auto; }
  .app { grid-template-rows: 38px auto; }
  .panel { max-height: 70vh; }
  .appmode .nav { display: none; }
}
.thread.mini .tcard { min-height: 0; height: var(--card, 170px); width: var(--card, 170px); }
.drawer[hidden] { display: none; }
.thread.mini.live .ring-wrap { perspective: 900px; }
.thread.mini.live .tcard { opacity: 0.5; backface-visibility: hidden; background: linear-gradient(160deg, #142036, #0b111c); color: var(--ink); }
.thread.mini.live .tcard.front { opacity: 1; }
.thread.mini .t-title { font: 700 13px/1.25 var(--sans); }
.drawer-body .ev-head { padding: 10px 0 4px; } .drawer-body .ev-head h1 { font-size: 24px; }
.drawer-body .ev-body { grid-template-columns: 1fr; gap: 14px; } .drawer-body .mapbox { display: none; }
.drawer-body .summary, .drawer-body .verdict { background: var(--soft); border-color: var(--line); }
.legend .links { margin-top: 6px; font-size: 11px; } .legend .links a { color: var(--ink2); }
/* header: legend and links right of the search box */
.hkey { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.hkey p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hlegend { display: flex; gap: 14px; } .hlegend .chip { font-size: 11px; padding: 0 6px; }
.hlinks a { color: var(--ink2); } .hlinks a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.appmode .top-row { height: 52px; }
.appmode .search { max-width: 380px; }
@media (max-width: 1100px) { .hlegend { display: none; } }
@media (max-width: 700px) { .hkey { flex-basis: 100%; } .hkey p { white-space: normal; } }
body:not(.appmode) .top-row { height: auto; min-height: 62px; padding-top: 8px; padding-bottom: 8px; }
body:not(.appmode) .hkey p { white-space: normal; }
body:not(.appmode) .hlegend { flex-wrap: wrap; row-gap: 2px; }
@media (max-width: 900px) { .appmode .top-row { height: auto; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; row-gap: 4px; } }
/* the place's last 30 days, under the story ring */
.act { padding: 4px 12px 6px; border-top: 1px solid #111824; flex: none; }
.act-h { margin: 0 0 3px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-h b { color: var(--ink2); font-weight: 600; }
.act-bars { display: block; width: 100%; height: 34px; }
.act-bars rect[class^="cat-"] { fill: var(--c, #64748b); }
.act-bars .act-day { fill: transparent; cursor: default; }
.act-bars .act-day:hover { fill: rgba(255, 255, 255, 0.08); }
/* the market chart that takes the map's place */
.ti[data-series] { cursor: pointer; }
.mchart { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 30%, #0c1628 0%, #04070c 75%); padding: 12px 16px 8px; }
.mchart[hidden] { display: none; }
.mc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mc-title { font-size: 18px; color: var(--ink); }
.mc-unit { color: var(--muted); font-size: 13px; }
.mc-ranges { display: flex; gap: 2px; margin-left: auto; }
.mc-ranges button { background: #0d1420; color: var(--ink2); border: 1px solid var(--line); padding: 3px 9px; font-size: 12.5px; cursor: pointer; }
.mc-ranges button:first-child { border-radius: 6px 0 0 6px; } .mc-ranges button:last-child { border-radius: 0 6px 6px 0; }
.mc-ranges button[aria-checked="true"] { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.mc-x { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #0d1420; color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.mc-plot { flex: 1; min-height: 0; margin-top: 8px; }
.mc-svg { display: block; width: 100%; height: 100%; }
.mc-grid { stroke: #1b2534; stroke-width: 1; }
.mc-ax { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.mc-line { fill: none; stroke-width: 2; } .mc-line.up { stroke: #4ade80; } .mc-line.down { stroke: #f87171; }
.mc-area.up { fill: rgba(74, 222, 128, 0.08); } .mc-area.down { fill: rgba(248, 113, 113, 0.08); }
.mc-dot.up { fill: #4ade80; } .mc-dot.down { fill: #f87171; }
.mc-vl { stroke: #475569; stroke-dasharray: 3 3; } .mc-hdot { fill: #fff; }
.mc-tip { fill: var(--ink); font-size: 12.5px; font-weight: 600; paint-order: stroke; stroke: #04070c; stroke-width: 4px; }
.mc-src { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); }

/* loading marks (static/loading.mjs, static/nav.js): a ring of colour, a running bar, "Loading…" */
.panel, .mc-plot { position: relative; }
.hn-load { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; pointer-events: none;
  background: rgba(5, 8, 13, 0.58); backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.15s; }
.hn-load.on { opacity: 1; }
.panel > .hn-load { top: 31px; }
.drawer > .hn-load { top: 37px; background: rgba(9, 13, 20, 0.6); }
.hn-box { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 14px 20px 12px; border-radius: 14px;
  background: rgba(11, 16, 24, 0.9); border: 1px solid #22304a; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55), 0 0 22px rgba(56, 189, 248, 0.12); }
.hn-spin { position: relative; display: inline-block; width: 38px; height: 38px; flex: none; }
.hn-spin::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0turn, rgba(56, 189, 248, 0) 0 8%, #38bdf8 38%, #a855f7 68%, #f97316 92%, rgba(249, 115, 22, 0) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.7)); animation: hn-turn 0.85s linear infinite; }
.hn-spin i { position: absolute; inset: 36%; border-radius: 50%; background: #fde68a; box-shadow: 0 0 10px 2px rgba(253, 230, 138, 0.75);
  animation: hn-beat 1.1s ease-in-out infinite; }
.hn-lt { font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(90deg, #7d8899 0%, #e6ebf2 45%, #7d8899 90%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: hn-shine 1.6s linear infinite; }
.hn-bar { position: absolute; left: 0; right: 0; top: 0; height: 2px; overflow: hidden; background: rgba(56, 189, 248, 0.12); }
.hn-bar::before { content: ""; position: absolute; top: 0; bottom: 0; width: 38%; left: -38%;
  background: linear-gradient(90deg, transparent, #38bdf8, #a855f7, #f97316, transparent); box-shadow: 0 0 10px #a855f7;
  animation: hn-run 1.25s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
/* over the map: the bar along the top and a small label under the controls; the map stays visible */
.hn-load.pill { inset: 0 0 auto 0; height: 0; background: none; backdrop-filter: none; display: block; }
.hn-load.pill .hn-box { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); flex-direction: row; gap: 10px; padding: 6px 16px 6px 8px; border-radius: 999px; }
.hn-load.pill .hn-spin, .hn-nav .hn-spin { width: 22px; height: 22px; }
.hn-load.pill .hn-spin::before, .hn-nav .hn-spin::before { -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); }
.hn-load.pill .hn-bar { height: 3px; }
/* a whole new page on its way */
.hn-nav { position: fixed; left: 0; right: 0; top: 0; height: 0; z-index: 1000; pointer-events: none; }
.hn-nav .hn-bar { height: 3px; position: fixed; }
.hn-nav-t { position: fixed; top: 10px; right: 14px; display: flex; align-items: center; gap: 9px; padding: 5px 14px 5px 7px; border-radius: 999px;
  background: rgba(11, 16, 24, 0.92); border: 1px solid #22304a; color: #e6ebf2; font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.4); }
@keyframes hn-turn { to { transform: rotate(1turn); } }
@keyframes hn-beat { 0%, 100% { transform: scale(0.7); opacity: 0.7; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes hn-shine { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes hn-run { from { left: -38%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .hn-spin::before { animation-duration: 2.4s; } .hn-spin i, .hn-lt { animation: none; } .hn-lt { color: #e6ebf2; background: none; }
  .hn-bar::before { animation-duration: 3s; }
}
/* while the event drawer is open, the map's controls stay in the part of the map that can be seen */
.stage:has(> .drawer:not([hidden])) .mbar { right: calc(min(560px, 92vw) + 10px); }
.stage:has(> .drawer:not([hidden])) .maplibregl-ctrl-top-right { right: min(560px, 92vw); }
.one-report { margin: 8px 0 0; color: var(--ink2); font-size: 14px; } .one-report .chip { margin-right: 4px; }

/* ---- header: the sponsor's space, the account buttons, the menu ---- */
.top-row .sponsor-wrap { flex: 1; min-width: 0; position: relative; display: flex; margin: 0 6px; }
.top-row .sponsor { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 3px 14px;
  border: 1px dashed var(--line); border-radius: 10px; color: var(--ink2); background: transparent; font: inherit; cursor: pointer; overflow: hidden;
  transition: background-color .15s, border-color .15s; }
.top-row .sponsor:hover, .top-row .sponsor:focus-visible, .top-row .sponsor[aria-expanded="true"] {
  background: color-mix(in srgb, var(--accent) 16%, var(--soft)); border-color: var(--accent); border-style: solid; }
.sp-caret { width: 12px; height: 12px; flex: none; color: var(--muted); transition: transform .15s; }
.sponsor[aria-expanded="true"] .sp-caret { transform: rotate(180deg); }
.bdmenu { position: absolute; left: 50%; transform: translateX(-50%); top: 48px; z-index: 60; width: min(560px, 92vw); padding: 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5); font-size: 13px; }
.bd-h { margin: 0 2px 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bd-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bd-list a { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.bd-list a:hover, .bd-list a:focus-visible { background: var(--soft); border-color: var(--line); text-decoration: none; }
.bd-list img { width: 96px; height: 50px; object-fit: cover; border-radius: 6px; flex: none; border: 1px solid var(--line); }
.bd-list a > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.bd-list b { font-size: 13px; } .bd-list span span { font-size: 11.5px; color: var(--ink2); } .bd-list i { font-style: normal; font-size: 11px; color: var(--accent); }
.bd-foot { margin: 10px 2px 0; font-size: 12px; }
@media (max-width: 640px) { .bd-list { grid-template-columns: 1fr; } }
.sponsor img { height: 38px; width: auto; flex: none; }
.sp-text { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; min-width: 0; }
.sp-text b { font-weight: 600; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sp-text span { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.acct { position: relative; display: flex; align-items: center; gap: 6px; flex: none; }
.hbtn { height: 30px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); font: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer; white-space: nowrap; }
.hbtn:hover { border-color: var(--muted); }
.hbtn-main { background: var(--accent2, #2563eb); border-color: transparent; color: #04111c; }
.hbtn-danger { background: #b91c1c; border-color: transparent; color: #fff; }
.hbtn:disabled { opacity: 0.6; cursor: wait; }
.hmenu { position: absolute; right: 0; top: 38px; z-index: 50; width: 340px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5); font-size: 13px; }
.hm-legend { margin: 0 0 6px; color: var(--muted); } .hm-legend .chip { font-size: 11px; }
.hm-links { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; margin: 10px 0; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hm-links a { color: var(--ink2); padding: 3px 0; }
.hm-act { display: block; width: 100%; text-align: left; margin: 0 0 10px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); font: inherit; cursor: pointer; }
.hm-themes, .themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.th { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border-radius: 9px; border: 1px solid var(--line); background: var(--soft);
  color: var(--ink2); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.th i { width: 34px; height: 20px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.2); }
.th[aria-checked="true"] { border-color: var(--accent2, #38bdf8); color: var(--ink); box-shadow: 0 0 0 1px var(--accent2, #38bdf8); }
.th-night i { background: linear-gradient(135deg, #04070c, #1e3a8a 60%, #38bdf8); }
.th-aurora i { background: linear-gradient(135deg, #031014, #0f766e 55%, #a855f7); }
.th-ember i { background: linear-gradient(135deg, #120606, #9a3412 55%, #fbbf24); }
.th-daylight i { background: linear-gradient(135deg, #f8fafc, #a9cbe4 60%, #f59e0b); }
@media (max-width: 1100px) { .sp-text { display: none; } }
@media (max-width: 760px) { .top-row .sponsor-wrap { display: none; } }

/* ---- windows: sign in, register, settings ---- */
.dlg { border: 1px solid var(--line); border-radius: 16px; padding: 0; background: var(--card); color: var(--ink); width: min(440px, 94vw);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6); }
.dlg::backdrop { background: rgba(2, 4, 8, 0.6); backdrop-filter: blur(3px); }
.dlg-form { display: grid; gap: 12px; padding: 20px 22px 18px; }
.dlg h2 { margin: 0; font-size: 21px; } .dlg h3 { margin: 6px 0 0; font-size: 14px; color: var(--ink2); }
.dlg p { margin: 0; }
.dlg label { display: grid; gap: 5px; font-weight: 600; font-size: 13px; }
.dlg input { font: inherit; font-weight: 500; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.dlg input:focus { outline: 2px solid var(--accent2, #38bdf8); outline-offset: 0; }
.dlg-row { display: flex; gap: 8px; }
.dlg-err { color: #fca5a5; background: rgba(185, 28, 28, 0.15); border: 1px solid rgba(248, 113, 113, 0.35); padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.dlg-ok { color: #86efac; font-size: 13px; }
.dlg-sub { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.dlg-sub.danger h3 { color: #fca5a5; }

/* ---- the panels: a tree of rows and columns (static/workspace.mjs) ---- */
.ws { min-height: 0; display: flex; }
.ws > .ws-split, .ws > .sect { flex: 1; }
.ws-split { display: flex; flex: 1; min-width: 0; min-height: 0; }
.ws-row { flex-direction: row; } .ws-col { flex-direction: column; }
.ws-cell { display: flex; min-width: 0; min-height: 0; }
.ws-cell > .sect, .ws-cell > .ws-split { flex: 1; }
.ws-sep { flex: none; background: var(--line); }
.ws-row > .ws-sep { width: 5px; cursor: col-resize; } .ws-col > .ws-sep { height: 5px; cursor: row-resize; }
.ws-sep:hover { background: var(--accent2, #38bdf8); }
.sect { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--card); border-right: 0; }
.smap .stage { flex: 1; min-height: 0; }
.sect-bar { cursor: grab; user-select: none; touch-action: none; }
.sect-bar h2 { display: flex; align-items: center; gap: 7px; min-width: 0; }
.grip { width: 9px; height: 13px; flex: none; opacity: 0.55;
  background-image: radial-gradient(currentColor 1.1px, transparent 1.3px); background-size: 4.5px 4.4px; }
.sect-bar:hover .grip { opacity: 1; color: var(--accent2, #38bdf8); }
.ws-dragging, .ws-dragging * { cursor: grabbing !important; }
.ws-dragging .glmap { pointer-events: none; }
.ws-moving { opacity: 0.55; }
.ws-ghost { position: fixed; z-index: 1001; pointer-events: none; padding: 4px 9px; border-radius: 7px; background: #0c4a6e; color: #e0f2fe; font-size: 12px; font-weight: 700;
  border: 1px solid #38bdf8; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); white-space: nowrap; }
.ws-mark { position: fixed; z-index: 1000; pointer-events: none; border: 2px solid #38bdf8; background: rgba(56, 189, 248, 0.16); border-radius: 8px; transition: all 0.08s; }
.ws.stacked { flex-direction: column; overflow: auto; }
.ws.stacked .smap { height: 62vh; flex: none; }
.ws.stacked .panel { max-height: 70vh; flex: none; }
.ws .panel { border-right: 0; }
@media (max-width: 900px) { .sect-bar { cursor: default; } .grip { display: none; } }

/* ---- stars behind the globe, each layer fading a little at its own pace ---- */
.stars { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.star-layer { position: absolute; inset: 0; background-repeat: repeat; background-size: 1200px 900px; animation: twinkle 7s ease-in-out infinite alternate; }
.star-layer.s1 { animation-duration: 5.3s; animation-delay: -2s; background-position: 337px 211px; }
.star-layer.s2 { animation-duration: 3.9s; animation-delay: -1s; background-position: 711px 523px; }
@keyframes twinkle { from { opacity: 1; } to { opacity: 0.62; } }
@media (prefers-reduced-motion: reduce) { .star-layer { animation: none; } }
.glmap .maplibregl-canvas-container { position: relative; z-index: 1; }
body[data-theme="daylight"] .stars { display: none; }

/* ---- the story ring fills its panel, in its middle ---- */
.thread.mini.live .ring-wrap { display: flex; align-items: center; justify-content: center; }
.thread.mini .tcard { font-size: calc(var(--card, 170px) / 13.6); }
.thread.mini .t-title { font-size: calc(var(--card, 170px) / 12) !important; -webkit-line-clamp: 5; }
.thread.mini .t-kind { font-size: calc(var(--card, 170px) / 17); }

/* ---- themes (account menu): Night is the default ---- */
body.appmode[data-theme="aurora"] {
  --bar: #03141a; --ctl: rgba(3, 20, 26, 0.88); --drawer: rgba(4, 22, 28, 0.97); --space: radial-gradient(ellipse at 50% 40%, #082a33 0%, #02090c 70%);
  --accent2: #2dd4bf; --row: #0b2228; --rowh: #0c2a30;
  --bg: #020c10; --card: #061a20; --ink: #e6fffb; --ink2: #b2e6df; --muted: #6fa8a1; --line: #123540; --soft: #0a242b; --link: #5eead4;
}
body.appmode[data-theme="ember"] {
  --bar: #160909; --ctl: rgba(22, 9, 9, 0.88); --drawer: rgba(24, 10, 10, 0.97); --space: radial-gradient(ellipse at 50% 40%, #2a0f0a 0%, #0a0303 70%);
  --accent2: #fb923c; --row: #2a1512; --rowh: #301814;
  --bg: #0b0404; --card: #170b09; --ink: #fff1e6; --ink2: #f5cdb5; --muted: #b48774; --line: #3a1d16; --soft: #22110d; --link: #fdba74;
}
body.appmode[data-theme="daylight"] {
  --bar: #ffffff; --ctl: rgba(255, 255, 255, 0.92); --drawer: rgba(255, 255, 255, 0.98); --space: radial-gradient(ellipse at 50% 40%, #e8f1fa 0%, #c9dbea 75%);
  --accent2: #2563eb; --row: #e7ebf0; --rowh: #f1f5f9;
  --bg: #f4f6f9; --card: #ffffff; --ink: #0f172a; --ink2: #334155; --muted: #64748b; --line: #d8dee6; --soft: #eef2f6; --link: #1d4ed8;
  --ok: #15803d; --ok-bg: #dcfce7; --warn: #a16207; --warn-bg: #fef3c7; --grey: #475569; --grey-bg: #e2e8f0;
  color-scheme: light;
}
body.appmode[data-theme="daylight"] .hbtn-main { color: #fff; }
body.appmode[data-theme="daylight"] .hn-pop .maplibregl-popup-content { background: rgba(255, 255, 255, 0.97); color: #0f172a; }
body.appmode[data-theme="daylight"] .thread.mini .tcard { background: linear-gradient(160deg, #ffffff, #eef2f7); border-color: #cbd5e1; color: #0f172a; box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18); }
body.appmode[data-theme="daylight"] .thread.mini.live .ring-wrap { background: radial-gradient(ellipse at 50% 90%, #dbe7f3 0%, #f8fafc 70%); }
body.appmode[data-theme="daylight"] .mchart { background: radial-gradient(ellipse at 50% 30%, #ffffff 0%, #e9eff5 75%); }
body.appmode[data-theme="daylight"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: none; }
body.appmode[data-theme="daylight"] .hn-box, body.appmode[data-theme="daylight"] .hn-nav-t { background: rgba(255, 255, 255, 0.95); border-color: #cbd5e1; }
body.appmode[data-theme="daylight"] .hn-lt { background-image: linear-gradient(90deg, #64748b 0%, #0f172a 45%, #64748b 90%); }
body.appmode[data-theme="daylight"] .hn-load { background: rgba(244, 246, 249, 0.6); }
body.appmode[data-theme="daylight"] .ws-ghost { background: #dbeafe; color: #1e3a8a; }
body.appmode[data-theme="aurora"] .thread.mini .tcard { background: linear-gradient(160deg, #0b2a31, #061a20); border-color: #164552; }
body.appmode[data-theme="ember"] .thread.mini .tcard { background: linear-gradient(160deg, #2a130e, #170b09); border-color: #4a2318; }
body.appmode[data-theme="aurora"] .thread.mini.live .ring-wrap { background: radial-gradient(ellipse at 50% 90%, #0b3a3f 0%, #02090c 70%); }
body.appmode[data-theme="ember"] .thread.mini.live .ring-wrap { background: radial-gradient(ellipse at 50% 90%, #3a1610 0%, #0a0303 70%); }

/* ---- the market view (static/chart.mjs): a 3D chart, key figures, month-by-month bars, a pie, the others ---- */
.mchart { overflow: auto; }
.mc-grid { position: relative; flex: 1; min-height: 0; display: grid; gap: 10px; margin-top: 8px;
  grid-template-columns: minmax(0, 2.2fr) minmax(250px, 1fr); grid-template-rows: minmax(220px, 1.35fr) minmax(170px, 1fr);
  grid-template-areas: "main side" "lower side"; }
.mc-main { grid-area: main; } .mc-side { grid-area: side; overflow: auto; }

.mc-grid { grid-template-areas: "main main main side" "bars pie peers side"; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr) minmax(250px, 0.9fr); }
.mc-main { grid-area: main; } .mc-bars { grid-area: bars; } .mc-pie { grid-area: pie; } .mc-peers { grid-area: peers; } .mc-side { grid-area: side; }
.mc-card { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: color-mix(in srgb, var(--card) 82%, transparent); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.mc-card h3 { margin: 0 0 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink2); }
.mc-main .mc-plot, .mc-b, .mc-p, .mc-c { flex: 1; min-height: 0; }
.mc-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.mc-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 4px 4px 4px 0; border-bottom: 1px solid var(--line); }
.mc-table td { text-align: right; font-weight: 700; padding: 4px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.mc-table td.up { color: #4ade80; } .mc-table td.down { color: #f87171; }
.mc-range { margin-top: 10px; } .mc-rl { margin: 0 0 2px; font-size: 11.5px; color: var(--muted); }
.mc-mark { fill: #fde68a; filter: drop-shadow(0 0 4px rgba(253, 230, 138, 0.8)); }
.mc-strong { fill: var(--ink); font-weight: 700; }
.mc-floor { fill: color-mix(in srgb, var(--ink) 7%, transparent); stroke: var(--line); }
.mc-line { stroke-width: 2.2; filter: drop-shadow(0 0 5px currentColor); }
.mc-line.up { color: #4ade80; } .mc-line.down { color: #f87171; }
.mc-bar { transition: opacity 0.15s; } .mc-bar:hover { opacity: 0.8; }
.mc-bar.mark rect { filter: drop-shadow(0 0 6px #38bdf8); }
.mc-slice { stroke: rgba(0, 0, 0, 0.25); stroke-width: 0.6; }
.mc-ax { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
@media (max-width: 1100px) {
  .mc-grid { grid-template-areas: "main main" "side side" "bars pie" "peers peers"; grid-template-columns: 1fr 1fr; grid-template-rows: 300px auto 190px 190px; }
}

/* ---- the story ring: turned by hand, an info line under it ---- */
.thread.live .ring.free { transition: none; }
.thread.mini.live .ring-wrap { cursor: grab; touch-action: pan-y; user-select: none; }
.thread.mini.live .ring-wrap:active { cursor: grabbing; }
.ring-info { flex: none; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; padding: 6px 10px 8px; border-top: 1px solid var(--line); }
.thread:not(.live) .ring-info { display: none; }
.ri-meta { margin: 0; font-size: 11.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ri-act { display: flex; gap: 4px; } .ri-act .hbtn { height: 26px; padding: 0 9px; font-size: 12px; }
.ri-act .ri-play { width: 30px; padding: 0; }
.ri-act .hbtn:disabled { opacity: .45; cursor: default; }
.ri-dots { grid-column: 1 / -1; display: flex; justify-content: center; gap: 5px; }
.ri-dots button { width: 7px; height: 7px; padding: 0; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; }
.ri-dots button[aria-selected="true"] { background: var(--accent); width: 18px; border-radius: 4px; }

/* ---- the activity panel ---- */
.pact .pbody { display: flex; flex-direction: column; justify-content: center; }
.pact .act { border-top: 0; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pact .act-bars { flex: 1; height: auto; min-height: 30px; }
.act-key { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 10.5px; color: var(--muted); }
.act-key li { display: flex; align-items: center; gap: 4px; } .act-key i { width: 8px; height: 8px; border-radius: 2px; background: var(--c, #64748b); }
.pact.nokey .act-key { display: none; }

/* ---- the briefing panel ---- */
.brief { padding: 8px 12px 12px; font-size: 13px; }
.brief h3 { margin: 12px 0 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.b-day { margin: 0 0 6px; color: var(--ink2); } .b-day b { color: var(--ink); }
.b-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.b-cats li { display: grid; grid-template-columns: 7.5em 1fr 3em; align-items: center; gap: 6px; font-size: 12px; }
.b-cats span { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-cats svg { width: 100%; height: 6px; } .b-cats rect { fill: var(--c, #64748b); }
.b-cats b { text-align: right; font-variant-numeric: tabular-nums; }
.b-list { list-style: none; margin: 0; padding: 0; }
.b-list li { display: grid; grid-template-columns: 8px 1fr; gap: 2px 8px; padding: 4px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.b-list li > i { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: var(--c, var(--other)); }
.b-list a { color: var(--ink); font-weight: 600; line-height: 1.3; }
.b-list .rm { grid-column: 2; font-size: 11.5px; color: var(--muted); }
.b-list li.muted { display: block; } /* an empty list's line has no dot: not in the dot's column */

/* ---- the Panels window ---- */
.dlg.dlg-panels { width: min(600px, 96vw); max-height: 92vh; }
.dlg-panels fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 10px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.dlg-panels legend { padding: 0 4px; font-weight: 700; }
.dlg-panels fieldset label { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 13px; }
.dlg-panels legend label { font-weight: 700; font-size: 14px; }
.dlg-panels fieldset.off > label { opacity: .45; }
.dlg-panels select { font: inherit; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }

/* ---- the market desk: header, tabs, views ---- */
.mc-head { row-gap: 6px; }
.mc-name { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.mc-now { display: flex; align-items: baseline; gap: 10px; font-variant-numeric: tabular-nums; }
.mc-last { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.mc-chg { font-weight: 700; font-size: 14px; color: var(--muted); } .mc-chg.up { color: #4ade80; } .mc-chg.down { color: #f87171; }
.mc-asof { font-size: 12px; color: var(--muted); }
.mc-ranges.off { opacity: .35; pointer-events: none; }
.mc-tabs { display: flex; gap: 2px; margin-top: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; }
.mc-tabs button { flex: none; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--ink2); font: inherit; font-size: 13px; font-weight: 600;
  padding: 6px 12px; cursor: pointer; }
.mc-tabs button:hover { color: var(--ink); }
.mc-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: #38bdf8; }
.mc-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 8px; }
.mc-body > .mc-card { flex: 1; }
.mc-body .mc-grid { margin-top: 0; }
.mc-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.mc-split-v { grid-template-columns: 1fr; grid-template-rows: 1.4fr 1fr; }
.mc-scroll { overflow: auto; }
.mc-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.mc-main > .mc-note { margin: 0 0 6px; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, #fbbf24 10%, transparent); color: #fcd34d; }
.mc-rows thead th { position: sticky; top: 0; background: var(--card); z-index: 1; }
.mc-rows th.num, .mc-rows td.num { text-align: right; }
.mc-rows td.lead { text-align: left; font-weight: 500; color: var(--ink2); }
.mc-rows tbody tr:hover td { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.mc-rows a { font-weight: 600; }
.mc-matrix th, .mc-matrix td { text-align: center; padding: 5px 6px; font-size: 12.5px; }
.mc-matrix td.mc-same { color: var(--muted); }
.mc-heat[data-heat="10"], .mc-heat[data-heat="9"] { background: rgba(56, 189, 248, .55); } .mc-heat[data-heat="8"], .mc-heat[data-heat="7"] { background: rgba(56, 189, 248, .4); }
.mc-heat[data-heat="6"], .mc-heat[data-heat="5"] { background: rgba(56, 189, 248, .26); } .mc-heat[data-heat="4"], .mc-heat[data-heat="3"] { background: rgba(56, 189, 248, .14); }
.mc-conv { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; align-content: flex-start; }
.mc-conv h3 { flex-basis: 100%; }
.mc-conv label { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink2); }
.mc-conv input { width: 11em; font: 700 22px var(--sans); padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-variant-numeric: tabular-nums; }
.mc-eq { font-size: 22px; color: var(--muted); }
.mc-conv .mc-note { flex-basis: 100%; }
.mc-l2 { fill: none; stroke-width: 1.6; opacity: .85; } .mc-l2.main { stroke-width: 2.6; opacity: 1; filter: drop-shadow(0 0 4px currentColor); }
.mc-neg { fill: rgba(248, 113, 113, .1); } .mc-zero { stroke: #94a3b8; stroke-dasharray: 4 3; }
.mc-news { list-style: none; margin: 0; padding: 0; }
.mc-news li { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mc-news a { color: var(--ink); font-weight: 600; } .mc-news .rm { font-size: 11.5px; color: var(--muted); }
@media (max-width: 900px) { .mc-split { grid-template-columns: 1fr; } .mc-last { font-size: 20px; } }
.mc-split > .mc-card, .mc-body > .mc-card { grid-area: auto; }
.mc-body .mc-plot { flex: 1; min-height: 160px; }

/* ---- the front page's opening screen (boot.mjs): a turning globe, the step under way, a bar that fills ---- */
.hn-boot { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; color: #e5edf8;
  background:
    radial-gradient(1px 1px at 12% 22%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 78% 14%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 64% 78%, #fff7 50%, transparent 51%), radial-gradient(1px 1px at 30% 68%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 52%, #fff6 50%, transparent 51%), radial-gradient(1.5px 1.5px at 44% 10%, #fff5 50%, transparent 51%),
    radial-gradient(ellipse at 50% 42%, #16264a 0%, #0a1224 45%, #04070e 100%);
  transition: opacity .7s ease, visibility .7s ease, transform .7s ease; }
.hn-boot.done { opacity: 0; visibility: hidden; pointer-events: none; transform: scale(1.04); }
.hn-boot-bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #ffffff10; overflow: hidden; }
.hn-boot-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); position: relative;
  background: linear-gradient(90deg, #38bdf8, #a855f7 55%, #f97316); box-shadow: 0 0 14px #a855f7cc, 0 0 6px #38bdf8;
  transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.hn-boot-bar i::after { content: ""; position: absolute; right: 0; top: -3px; width: 90px; height: 9px; border-radius: 50%;
  background: radial-gradient(ellipse at right, #fde68aee, transparent 70%); filter: blur(2px); }
/* before the script runs the bar creeps forward by itself */
.hn-boot:not([data-p]) .hn-boot-bar i { animation: hn-creep 14s cubic-bezier(.08, .7, .15, 1) forwards; }
@keyframes hn-creep { from { width: 3%; } to { width: 70%; } }
.hn-boot-card { display: grid; justify-items: center; gap: 10px; padding: 28px 40px 24px; text-align: center;
  animation: hn-rise .8s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes hn-rise { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.hn-boot-globe { width: 148px; height: 148px; overflow: visible; filter: drop-shadow(0 0 26px #3b82f655); }
.hn-boot-globe .g-halo { fill: none; stroke: #60a5fa30; stroke-width: 10; animation: hn-breathe 3.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes hn-breathe { 50% { stroke: #a855f733; transform: scale(1.05); } }
.hn-boot-globe .g-body { stroke: #60a5fa88; stroke-width: 1.2; }
.hn-boot-globe .g-mer, .hn-boot-globe .g-par { fill: none; stroke: #7dd3fc66; stroke-width: .9; }
.hn-boot-globe .g-mer { transform-box: fill-box; transform-origin: center; animation: hn-turn 4.8s linear infinite; }
.hn-boot-globe .m2 { animation-delay: -1.6s; }
.hn-boot-globe .m3 { animation-delay: -3.2s; }
@keyframes hn-turn { 0% { transform: scaleX(1); opacity: .25; } 25% { transform: scaleX(.5); opacity: .8; } 50% { transform: scaleX(0); opacity: 1; }
  75% { transform: scaleX(.5); opacity: .8; } 100% { transform: scaleX(1); opacity: .25; } }
.hn-boot-globe .g-pin { fill: #f97316; transform-box: fill-box; transform-origin: center; animation: hn-pin 2.4s ease-in-out infinite;
  filter: drop-shadow(0 0 4px #fb923c); }
.hn-boot-globe .p2 { fill: #ec4899; animation-delay: -.6s; }
.hn-boot-globe .p3 { fill: #facc15; animation-delay: -1.2s; }
.hn-boot-globe .p4 { fill: #38bdf8; animation-delay: -1.8s; }
@keyframes hn-pin { 0%, 100% { transform: scale(.5); opacity: .35; } 45% { transform: scale(1.35); opacity: 1; } }
.hn-boot-globe .g-orbit { transform-origin: 60px 60px; animation: hn-orbit 7s linear infinite; }
.hn-boot-globe .g-orbit ellipse { fill: none; stroke-width: 1.3; stroke-dasharray: 4 5; opacity: .75; }
.hn-boot-globe .g-sat { fill: #fde68a; filter: drop-shadow(0 0 5px #fde68a); }
@keyframes hn-orbit { from { transform: rotate(-18deg); } to { transform: rotate(342deg); } }
.hn-boot-brand { font: 700 26px/1.1 var(--sans); letter-spacing: .02em; color: #f1f5f9; }
.hn-boot-brand b { background: linear-gradient(90deg, #f97316, #ec4899, #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; margin-left: 2px; }
.hn-boot-step { min-height: 1.5em; font-size: 14.5px; color: #cbd5e1; animation: hn-glow 2.4s ease-in-out infinite; }
@keyframes hn-glow { 50% { color: #f8fafc; } }
.hn-boot-meter { width: min(320px, 70vw); height: 6px; border-radius: 99px; background: #ffffff14; overflow: hidden; box-shadow: inset 0 0 0 1px #ffffff12; }
.hn-boot-meter span { display: block; height: 100%; width: calc(var(--p, 0) * 1%); border-radius: inherit; position: relative; overflow: hidden;
  background: linear-gradient(90deg, #38bdf8, #a855f7 55%, #f97316); transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.hn-boot:not([data-p]) .hn-boot-meter span { animation: hn-creep 14s cubic-bezier(.08, .7, .15, 1) forwards; }
.hn-boot-meter span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, #ffffff88 50%, transparent 70%);
  transform: translateX(-100%); animation: hn-shine 1.4s ease-in-out infinite; }
@keyframes hn-shine { to { transform: translateX(100%); } }
.hn-boot-pct { font: 600 12px/1 var(--mono, ui-monospace, monospace); color: #94a3b8; letter-spacing: .08em; min-height: 1em; }
@media (prefers-reduced-motion: reduce) {
  .hn-boot *, .hn-boot *::after { animation: none !important; }
  .hn-boot-bar i, .hn-boot-meter span { transition: none; }
}
