/* JIMS (Purushoth Kumar Guthula, telugufonts.in, free) for Telugu running text, scaled 110% to match Noto's visual size; Telugu block only so Latin/digits stay Inter Tight */
@font-face { font-family: "JIMS"; src: url("../fonts/jims.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; size-adjust: 110%;
  unicode-range: U+0C00-0C7F, U+0951-0952, U+0964-0965, U+200C-200D, U+25CC; }
@font-face { font-family: "JIMS"; src: url("../fonts/jims-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; size-adjust: 110%;
  unicode-range: U+0C00-0C7F, U+0951-0952, U+0964-0965, U+200C-200D, U+25CC; }

/* AP Report: neutral news-desk look. Chrome stays monochrome; party colours carry the colour. */
:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f8f9fb; --ink: #0d1321; --ink-2: #2b3445; --muted: #626c7d;
  --line: #e2e5ea; --line-2: #eef0f3; --track: #e9ecf1; --live: #e5162e; --live-soft: #fde8eb; --focus: #2563eb;
  --shadow: 0 1px 2px rgba(13,19,33,.05), 0 4px 16px rgba(13,19,33,.05);
  --radius: 14px; --gut: 16px;
  --f-ui: "Inter Tight", "JIMS", "Noto Sans Telugu", system-ui, sans-serif;
  --f-te: "Inter Tight", "JIMS", "Noto Sans Telugu", system-ui, sans-serif;
  --f-disp: "Anek Telugu", "Noto Sans Telugu", "Inter Tight", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e14; --surface: #121722; --surface-2: #171d2a; --ink: #eef1f6; --ink-2: #cdd3de; --muted: #96a0b2;
    --line: #232b39; --line-2: #1b2230; --track: #222a38; --live-soft: #3a1219; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0e14; --surface: #121722; --surface-2: #171d2a; --ink: #eef1f6; --ink-2: #cdd3de; --muted: #96a0b2;
  --line: #232b39; --line-2: #1b2230; --track: #222a38; --live-soft: #3a1219; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--f-ui); -webkit-font-smoothing: antialiased; }
:lang(te) body, [lang="te"] body { font-family: var(--f-te); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gut); }
.muted { color: var(--muted); }
.num { font-family: "Inter Tight", sans-serif; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--surface); padding: 8px 12px; }

.preview-banner { background: repeating-linear-gradient(135deg, #fff4c2 0 12px, #ffefa8 12px 24px); color: #4a3b00;
  text-align: center; font-size: 13px; font-weight: 600; padding: 6px 12px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ink);
  color: var(--bg); font: 800 15px/1 "Inter Tight", sans-serif; letter-spacing: -.02em; flex: none; }
.mark i { position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--live); border: 2px solid var(--surface); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-txt b { font: 800 18px/1.1 "Inter Tight", sans-serif; letter-spacing: -.02em; }
.brand-txt small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--live-soft); color: var(--live);
  font: 700 12px/1 "Inter Tight", var(--f-te); letter-spacing: .04em; padding: 6px 10px; border-radius: 999px; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229,22,46,.55); } 70% { box-shadow: 0 0 0 8px rgba(229,22,46,0); } 100% { box-shadow: 0 0 0 0 rgba(229,22,46,0); } }
.updated { color: var(--muted); font-size: 12px; white-space: nowrap; }
.icon-btn { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-weight: 700; font-size: 13px; }
.icon-btn:hover { background: var(--surface-2); }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: 10px 14px 12px; font-family: var(--f-disp); font-weight: 600; color: var(--muted); white-space: nowrap; font-size: 15px; }
.tabs a.on { color: var(--ink); }
.tabs a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--ink); }

/* ticker */
.ticker { display: flex; align-items: stretch; background: var(--ink); color: var(--bg); font-size: 15px; overflow: hidden; }
.ticker-label { flex: none; display: flex; align-items: center; background: var(--live); color: #fff; font-weight: 700; padding: 0 14px; font-size: 13px; }
.ticker-track { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ticker-run { display: inline-flex; gap: 36px; padding: 9px 0; white-space: nowrap; animation: run 60s linear infinite; }
.ticker:hover .ticker-run { animation-play-state: paused; }
.ticker-run span { display: inline-flex; align-items: center; gap: 8px; }
.ticker-run .dot { width: 9px; height: 9px; border-radius: 3px; }
.ticker-run .plogo { --sz: 20px; }
@keyframes run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-run { animation: none; } .live-pill i { animation: none; } }

main { padding-top: 20px; padding-bottom: 40px; min-height: 60vh; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .g2, .g3, .home-grid { grid-template-columns: minmax(0, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h2, .sec-h h2 { margin: 0; font: 700 21px/1.25 var(--f-disp); letter-spacing: 0; }
[lang="en"] .card-h h2, [lang="en"] .sec-h h2 { font: 800 20px/1.2 "Inter Tight", sans-serif; letter-spacing: -.02em; }
.card-h p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.sec-h a { color: var(--muted); font-weight: 600; font-size: 14px; }
.sec-h a:hover { color: var(--ink); }

/* summary */
.prog { text-align: right; flex: none; }
.prog b { font: 800 28px/1 "Inter Tight", sans-serif; letter-spacing: -.03em; }
.prog span { color: var(--muted); font: 600 16px/1 "Inter Tight", sans-serif; }
.prog small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.bar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; background: var(--track); }
.bar.thin { height: 8px; border-radius: 4px; }
.seg { height: 100%; transition: width .9s cubic-bezier(.2,.8,.2,1); min-width: 0; }
.seg.l { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.42) 0 4px, transparent 4px 9px); }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px 14px; margin-top: 14px; }
.lg { display: grid; grid-template-columns: 24px 1fr; column-gap: 8px; align-items: center; }
.lg .plogo { --sz: 24px; grid-row: span 2; }
.lg .sw { width: 10px; height: 10px; border-radius: 3px; }
.lg .nm { font-size: 13.5px; color: var(--ink-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg .ct { grid-column: 2; grid-row: 2; font: 800 22px/1.1 "Inter Tight", sans-serif; letter-spacing: -.02em; }
.lg .ct small { font: 600 12px/1 "Inter Tight", var(--f-te); color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.lg.zero { opacity: .45; }
.key { display: flex; gap: 14px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.key span { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 18px; height: 10px; border-radius: 2px; background: var(--muted); }
.key i.l { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 3px, transparent 3px 6px); }

/* tile map */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.seg-ctl { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg-ctl button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg-ctl button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tilemap { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); grid-template-rows: repeat(8, auto); gap: 5px; max-width: 560px; margin: 0 auto; width: 100%; }
.tile { aspect-ratio: 1; border-radius: 8px; border: 0; padding: 2px; display: grid; place-items: center; text-align: center; cursor: pointer;
  background: var(--track); color: var(--muted); font: 600 10px/1.1 var(--f-te); overflow: hidden; transition: transform .15s, box-shadow .15s, background .5s; }
.tile:hover { transform: scale(1.06); z-index: 1; }
.tile.sel { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.tile.l { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.4) 0 4px, transparent 4px 9px); }
.tile span { word-break: break-word; }
@media (min-width: 560px) { .tile { font-size: 11.5px; } }
@media (max-width: 479px) { .tile span { display: none; } .tilemap { gap: 4px; } .tile { border-radius: 6px; } }
.dist-panel { border-top: 1px solid var(--line); padding-top: 14px; }
.dist-panel h3 { margin: 0 0 8px; font: 700 18px/1.3 var(--f-disp); }
[lang="en"] .dist-panel h3 { font: 800 17px/1.3 "Inter Tight", sans-serif; }
.hint { color: var(--muted); font-size: 14px; text-align: center; margin: 0; }

/* rows (compact results) */
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.row:first-child { border-top: 0; }
.row .stripe { align-self: stretch; border-radius: 4px; background: var(--track); }
.row .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .rt { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* party logo badge: white disc with a party-colour ring so symbols read in light and dark */
.plogo { --sz: 22px; flex: none; display: inline-grid; place-items: center; width: var(--sz); height: var(--sz); border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 1.5px var(--pc, var(--line)); overflow: hidden; vertical-align: middle; }
.plogo img { width: 82%; height: 82%; object-fit: contain; display: block; }
.plogo.dot { background: var(--pc); box-shadow: none; }
.plogo.dot i { font: 800 calc(var(--sz) * .42)/1 "Inter Tight", sans-serif; color: #fff; font-style: normal; }
.chip .plogo { --sz: 18px; margin-left: -6px; }

/* chips + status */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font: 700 13px/1.45 "Inter Tight", var(--f-te); white-space: nowrap; }
.chip.out { background: transparent !important; border: 1.5px solid currentColor; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.st.ct::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 1.6s infinite; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 16px; }
.search { flex: 1 1 260px; position: relative; }
.search input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  padding: 0 14px 0 40px; font: 15px var(--f-ui); }
.search svg { position: absolute; left: 13px; top: 13px; color: var(--muted); }
select.sel { height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); padding: 0 12px; font: 600 14px var(--f-ui); max-width: 100%; }
.pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.pills::-webkit-scrollbar { display: none; }
.pill { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; color: var(--ink-2); }
.pill.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill b { font-family: "Inter Tight", sans-serif; margin-left: 4px; opacity: .7; }

/* result cards */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.rc { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.rc::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--pc, var(--track)); }
.rc.flash { animation: flash 2.4s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--pc, var(--ink)); } 100% { box-shadow: var(--shadow); } }
.rc-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.rc-h h3 { margin: 0; font: 700 20px/1.25 var(--f-disp); }
[lang="en"] .rc-h h3 { font: 800 18px/1.25 "Inter Tight", sans-serif; letter-spacing: -.01em; }
.rc-h p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.rc-res { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.rc-res .who { min-width: 0; display: flex; align-items: center; gap: 12px; }
.rc-res .who .plogo { --sz: 44px; box-shadow: 0 0 0 2px var(--pc); }
.rc-res .who > div { min-width: 0; }
.rc-res .who b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-res .who small { color: var(--muted); font-size: 13.5px; }
.rc-res .mg { text-align: right; flex: none; }
.rc-res .mg b { display: block; font: 800 22px/1 "Inter Tight", sans-serif; letter-spacing: -.02em; }
.rc-res .mg small { color: var(--muted); font-size: 13px; }
.rc-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; }
.rc-f > .num { white-space: nowrap; flex: none; }
.rc-tally { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--ink-2); }
.rc-tally span { display: inline-flex; align-items: center; gap: 4px; }
.rc-tally i { width: 8px; height: 8px; border-radius: 2px; }
.share-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; height: 34px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); flex: none; }
.share-btn:hover { background: var(--surface-2); }
.more { display: flex; justify-content: center; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg); font-weight: 700; cursor: pointer; font-size: 14px; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* feed */
.feed { display: flex; flex-direction: column; }
.feed-i { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); cursor: pointer; }
.feed-i:first-child { border-top: 0; }
.feed-i .t { color: var(--muted); font-size: 13px; white-space: nowrap; }
.feed-i .x { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }

/* news */
.news-lead { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .news-lead { grid-template-columns: minmax(0, 1fr); } }
.nl { display: flex; flex-direction: column; gap: 10px; }
.nl .img { aspect-ratio: 16/9; border-radius: 12px; background: var(--track) center/cover; }
.nl h3 { margin: 0; font: 700 25px/1.38 var(--f-disp); }
[lang="en"] .nl h3 { font-family: var(--f-disp); }
.nl p { margin: 0; color: var(--ink-2); font-size: 16.5px; line-height: 1.65; }
.ni { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); align-items: start; }
.ni:first-child { border-top: 0; padding-top: 0; }
.ni.noimg { grid-template-columns: minmax(0, 1fr); }
.ni .img { width: 104px; aspect-ratio: 4/3; border-radius: 10px; background: var(--track) center/cover; }
.ni h4 { margin: 0 0 4px; font: 600 17px/1.45 var(--f-disp); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ni p { margin: 0 0 8px; color: var(--ink-2); opacity: .82; font-size: 15px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 13px; align-items: center; }
.meta .cat { font-weight: 700; color: var(--ink-2); }
.meta a { font-weight: 700; color: var(--ink); }
.meta a:hover { text-decoration: underline; }
.news-cols { display: grid; gap: 0 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .news-cols { grid-template-columns: minmax(0, 1fr); } }
.news-cols .ni:nth-child(2) { border-top: 0; padding-top: 0; }
@media (max-width: 760px) { .news-cols .ni:nth-child(2) { border-top: 1px solid var(--line-2); padding-top: 12px; } }
.note { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 22px 0 calc(22px + env(safe-area-inset-bottom)); font-size: 14px; }
.foot p { margin: 0 0 4px; }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.switch input { display: none; }
.switch span { width: 36px; height: 20px; border-radius: 999px; background: var(--track); position: relative; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + span { background: var(--live); }
.switch input:checked + span::after { transform: translateX(16px); }

/* entry chooser */
.gate { position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow: auto; }
.gate[hidden] { display: none; }
.gate-in { min-height: 100%; max-width: 920px; margin: 0 auto; padding: 20px var(--gut) calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.gate-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 6vh; }
.gate-foot { text-align: center; color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.gate-top { display: flex; justify-content: space-between; align-items: center; }
.gate-q { font: 700 clamp(28px, 6vw, 44px)/1.25 var(--f-disp); margin: 24px 0 26px; text-align: center; }
[lang="en"] .gate-q { font: 800 clamp(28px, 6vw, 44px)/1.15 "Inter Tight", sans-serif; letter-spacing: -.03em; }
.gate-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .gate-cards { grid-template-columns: 1fr; } }
.gate-card { position: relative; text-align: left; border: 1px solid var(--line); border-radius: 22px; padding: 22px 22px 26px; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: clamp(220px, 36vh, 320px); overflow: hidden; transition: transform .18s, box-shadow .18s; }
.gate-card:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(13,19,33,.14); }
.gate-card:active { transform: scale(.985); }
.gate-card b { font: 700 clamp(30px, 5vw, 40px)/1.2 var(--f-disp); margin-top: auto; }
[lang="en"] .gate-card b { font: 800 clamp(28px, 5vw, 38px)/1.1 "Inter Tight", sans-serif; letter-spacing: -.03em; }
.gate-card small { font-size: 15px; opacity: .8; }
.gate-card.results { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.gate-card.results .live-pill { background: rgba(229,22,46,.18); }
.gate-card.news { background: var(--surface); color: var(--ink); }
.gate-card.news .gate-img { position: absolute; inset: 0 0 auto 0; height: 48%; background: var(--track) center/cover; }
.gate-card.news .gate-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, var(--surface)); }
.gate-card.news > :not(.gate-img) { position: relative; }
.gate-card.news .gate-go { position: absolute; }
.gate-tag { font: 700 12px/1 "Inter Tight", var(--f-te); letter-spacing: .04em; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.gate-stat { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; opacity: .9; }
.gate-stat em { font: 800 20px/1 "Inter Tight", sans-serif; font-style: normal; margin-right: 4px; }
.gate-head { margin-top: 6px; font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; }
.gate-go { position: absolute; top: 18px; right: 20px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px;
  background: color-mix(in srgb, currentColor 12%, transparent); }
/* the results card gets a soft party-colour wash from the live tally */
.gate-card.results::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--wash, transparent); }

/* share sheet */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(5,8,14,.6); display: grid; place-items: center; padding: 16px; }
.sheet[hidden] { display: none; }
.sheet-card { position: relative; background: var(--surface); border-radius: 18px; padding: 18px; width: min(440px, 100%); max-height: 92vh; overflow: auto; }
.sheet-x { position: absolute; top: 12px; right: 12px; }
.sheet-card h3 { margin: 0 44px 12px 0; font: 700 17px/1.3 var(--f-ui); }
.sheet-card img { width: 100%; border-radius: 12px; display: block; background: var(--track); }
.sheet-act { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

@media (max-width: 560px) {
  .updated { display: none; }
  .brand-txt small { display: none; }
  .card { padding: 15px; }
  .prog b { font-size: 24px; }
  .lg .ct { font-size: 19px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .nl h3 { font-size: 20px; }
}

/* whole news card opens the story in a new tab */
.ni, .nl { cursor: pointer; }
.ni:hover h4, .nl:hover h3 { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }

/* share sheet: format switch + preview sizing */
.sheet-fmt { display: flex; width: 100%; margin-bottom: 12px; }
.sheet-fmt button { flex: 1; }
.sheet-img { transition: opacity .2s; max-height: 62vh; width: auto !important; max-width: 100%; margin: 0 auto; }
.sheet-img.status { max-height: 64vh; }
.key { align-items: center; }
.key-share { margin-left: auto; }

/* WhatsApp share buttons */
.btn.wa { background: #25D366; border-color: #25D366; color: #fff; }
.btn.wa:hover { background: #1ebe5b; }
.share-btn .wa-ic { color: #25D366; width: 17px; height: 17px; }
.share-btn { border-color: color-mix(in srgb, #25D366 45%, var(--line)); }

/* ---------- AP results map ---------- */
:root { --map-land: #ffffff; --map-border: #c9cfd9; --map-mborder: #dfe3ea; --map-await: #c4cad4; --map-halo: rgba(255,255,255,.92);
  --sea-1: #e9f1fb; --sea-2: #f7f9fc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --map-land: #1b2232; --map-border: #34405a; --map-mborder: #273046; --map-await: #4a5468; --map-halo: rgba(11,14,20,.9); --sea-1: #0f1a2c; --sea-2: #0b0e14; } }
:root[data-theme="dark"] { --map-land: #1b2232; --map-border: #34405a; --map-mborder: #273046; --map-await: #4a5468; --map-halo: rgba(11,14,20,.9); --sea-1: #0f1a2c; --sea-2: #0b0e14; }

.map-card { padding: 18px; }
.map-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .map-grid { grid-template-columns: minmax(0, 1fr); } }
.amap-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.amap-back { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 13px; cursor: pointer; }
.amap-back[hidden] { display: none; }
.amap-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; margin-left: auto; }
.amap-legend span { display: inline-flex; align-items: center; gap: 6px; }
.amap-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.amap-legend i.h { background: repeating-linear-gradient(135deg, var(--muted) 0 3px, transparent 3px 6px); }
.amap-stage { position: relative; border-radius: 16px; overflow: hidden; background: radial-gradient(120% 90% at 85% 30%, var(--sea-1), var(--sea-2)); }
.amap-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.amap-loading { aspect-ratio: 1.1; display: grid; place-items: center; color: var(--muted); }
.amap-svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.amap-base { fill: var(--map-land); }
.amap-d { fill: var(--map-land); stroke: var(--map-border); stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .6s, fill-opacity .6s, opacity .4s; stroke-linejoin: round; }
.mode-urban .amap-d:hover { stroke: var(--ink); stroke-width: 2; }
.amap-d.sel { stroke: var(--ink); stroke-width: 2.6; }
.zoomed .amap-d:not(.sel) { opacity: .35; }
.mode-rural .amap-d { fill: none !important; stroke: var(--ink); stroke-opacity: .55; stroke-width: 1.3; pointer-events: none; }
.mode-rural .amap-d.sel { stroke-opacity: 1; stroke-width: 2.4; }
.mode-urban .amap-m { display: none; }
.amap-m { fill: var(--map-land); stroke: var(--map-mborder); stroke-width: .6; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .6s; stroke-linejoin: round; }
.amap-m:hover { stroke: var(--ink); stroke-width: 1.6; }
.amap-m.ct { fill: var(--map-await); animation: mpulse 1.6s ease-in-out infinite; }
@keyframes mpulse { 50% { fill-opacity: .45; } }
.mode-rural .amap-ulbs { display: none; }
.amap-u { fill: var(--map-await); stroke: var(--surface); stroke-width: 1.6; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .5s, stroke .5s;
  transform-box: fill-box; transform-origin: center; }
.amap-u.ld { stroke-width: 3; }
.amap-u.ct { animation: mpulse 1.6s ease-in-out infinite; }
.amap-u:hover { stroke: var(--ink); stroke-width: 2.4; }
.amap-u.pulse, .amap-m.pulse { animation: pop 1.2s ease-out 2; }
@keyframes pop { 0% { transform: scale(1); filter: brightness(1.4); } 40% { transform: scale(1.7); } 100% { transform: scale(1); filter: none; } }
.amap-m.pulse { transform-box: fill-box; transform-origin: center; animation: mflash 1.2s ease-out 2; }
@keyframes mflash { 40% { filter: brightness(1.5) saturate(1.3); } }
.amap-labels { font-size: 26px; pointer-events: none; }
.amap-lab { font-family: var(--f-disp); font-weight: 700; font-size: 1em; fill: var(--ink); text-anchor: middle; dominant-baseline: middle;
  paint-order: stroke; stroke: var(--map-halo); stroke-width: .22em; stroke-linejoin: round; opacity: .9; }
[lang="en"] .amap-lab { font-family: "Inter Tight", sans-serif; font-weight: 800; letter-spacing: -.01em; font-size: .78em; }
.zoomed .amap-lab { display: none; }
.amap-mlab { font-family: var(--f-te); font-weight: 600; fill: var(--ink); text-anchor: middle; dominant-baseline: middle; paint-order: stroke;
  stroke: var(--map-halo); stroke-width: .18em; stroke-linejoin: round; }
.amap-mlab.u { font-family: var(--f-disp); font-weight: 700; }
.amap-tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; display: flex; flex-direction: column; gap: 3px; max-width: 250px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.amap-tip[hidden] { display: none; }
.amap-tip b { font: 700 16px/1.3 var(--f-disp); }
.amap-tip small { color: var(--muted); }
.amap-tip .tp { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.amap-tip .tp::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--pc); }
.amap-credit { margin: 6px 2px 0; font-size: 11px; color: var(--muted); text-align: right; }

/* ---------- past results ---------- */
.past-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-bottom: 16px; }
.past-head .seg-ctl button { padding: 8px 14px; font-size: 14px; }
.past-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: center; position: relative; overflow: hidden;
  background: radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--pc) 16%, transparent), transparent 60%), var(--surface); }
@media (max-width: 900px) { .past-hero { grid-template-columns: minmax(0, 1fr); } }
.past-hero .kick { margin: 0; color: var(--muted); font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.past-hero h2 { margin: 14px 0 4px; font: 800 clamp(30px, 5vw, 46px)/1.15 var(--f-disp); }
.past-hero h2 span { font: 800 .62em "Inter Tight", sans-serif; color: var(--muted); }
.pps { display: grid; gap: 8px; margin-top: 16px; }
.pp { display: grid; grid-template-columns: minmax(0, 150px) 44px 64px minmax(0, 1fr); gap: 10px; align-items: center; }
.pp b { font: 800 20px "Inter Tight", sans-serif; text-align: right; }
.dv { font: 700 13px "Inter Tight", sans-serif; color: var(--muted); }
.dv.up { color: #15803d; } .dv.dn { color: #dc2626; }
.pp-bar { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.pp-bar i { display: block; height: 100%; border-radius: 4px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.hemi { width: 100%; height: auto; display: block; }
.hemi circle { animation: dotIn .5s both; transform-box: fill-box; transform-origin: center; }
@keyframes dotIn { from { transform: scale(0); opacity: 0; } }
.hemi-n { font: 800 64px "Inter Tight", sans-serif; text-anchor: middle; fill: var(--ink); }
.hemi-l { font: 600 22px var(--f-te); text-anchor: middle; fill: var(--muted); }
.flows { display: grid; gap: 10px; }
.flow { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr) minmax(0, 110px) 40px; gap: 10px; align-items: center; font-size: 14px; }
.flow span[style] { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.flow span[style]::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--pc); flex: none; }
.fl-arrow { height: 10px; background: var(--track); border-radius: 5px; overflow: hidden; }
.fl-arrow i { display: block; height: 100%; border-radius: 5px; }
.flow b { font: 800 18px "Inter Tight", sans-serif; text-align: right; }
.dbars { display: grid; gap: 7px; }
.dbar { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr) 30px; gap: 10px; align-items: center; font-size: 13.5px; }
.dn-n { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.dn-b { display: flex; height: 20px; border-radius: 5px; overflow: hidden; gap: 2px; }
.dn-b i { display: grid; place-items: center; font: 700 11px "Inter Tight", sans-serif; color: rgba(255,255,255,.95); font-style: normal; min-width: 4px; }
.dbar b { font: 700 13px "Inter Tight", sans-serif; text-align: right; color: var(--muted); }
.hist { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 190px; }
.hb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.hb i { width: 100%; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--ink), color-mix(in srgb, var(--ink) 55%, transparent)); min-height: 3px; transition: height .8s; }
.hb b { font: 800 15px "Inter Tight", sans-serif; }
.hb span { font: 600 11.5px "Inter Tight", sans-serif; color: var(--muted); white-space: nowrap; }
.mrows { display: flex; flex-direction: column; }
.mrow { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.mrow:first-child { border-top: 0; }
.mrow .stripe { align-self: stretch; border-radius: 3px; }
.mrow b { font-weight: 700; }
.mrow small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow > b.num { font: 800 18px "Inter Tight", sans-serif; }
.hist3 { display: grid; gap: 8px; }
.y3 { display: grid; grid-template-columns: 44px 10px minmax(0, 1fr); gap: 10px; align-items: center; }
.yy { font: 800 14px "Inter Tight", sans-serif; color: var(--muted); }
.dotp { width: 10px; height: 10px; border-radius: 50%; }
.yw b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yw small { color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .pp { grid-template-columns: minmax(0, 1fr) 40px 56px; } .pp-bar { grid-column: 1 / -1; } .flow { grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1fr) 30px; } }

/* ---------- home hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: clamp(22px, 4vw, 40px); margin-bottom: 16px; color: #fff;
  background: #0b1020; display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 24px; align-items: center; isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .55; }
.hero::before { width: 520px; height: 520px; left: -140px; top: -260px; background: radial-gradient(circle, #3b5bdb, transparent 65%); animation: drift 14s ease-in-out infinite alternate; }
.hero::after { width: 480px; height: 480px; right: -120px; bottom: -280px; background: radial-gradient(circle, #0ea5a4, transparent 65%); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(80px, 60px) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .hero::before, .hero::after { animation: none; } }
.hero .kick { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; font-size: 13.5px; color: rgba(255,255,255,.75); }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff3b52; box-shadow: 0 0 0 0 rgba(255,59,82,.6); animation: pulse 1.6s infinite; }
.hero h1 { margin: 10px 0 8px; font: 800 clamp(40px, 7vw, 72px)/1.08 var(--f-disp); letter-spacing: -.01em; }
[lang="en"] .hero h1 { font-family: "Inter Tight", sans-serif; letter-spacing: -.04em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #ff6b7d, #ffb36b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 0; max-width: 560px; color: rgba(255,255,255,.78); font-size: 16px; }
.hero-rings { display: flex; gap: 22px; }
.ring { position: relative; width: 132px; text-align: center; }
.ring svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 10; }
.ring-fg { fill: none; stroke: #fff; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.ring-c { position: absolute; top: 0; left: 0; width: 132px; height: 132px; display: grid; place-content: center; grid-auto-flow: column; align-items: baseline; }
.ring-c b { font: 800 36px "Inter Tight", sans-serif; }
.ring-c small { font: 700 16px "Inter Tight", sans-serif; opacity: .7; }
.ring p { margin: 8px 0 0; font-size: 13.5px; color: rgba(255,255,255,.8); line-height: 1.35; }
.ring p span { font: 700 14px "Inter Tight", sans-serif; color: #fff; }
@media (max-width: 760px) { .hero { grid-template-columns: minmax(0, 1fr); } .hero-rings { justify-content: flex-start; gap: 18px; } .ring, .ring svg, .ring-c { width: 112px; } .ring svg, .ring-c { height: 112px; } .ring-c b { font-size: 30px; } }

/* entrance: sections rise in once when a tab opens */
main.enter > * { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }
main.enter > *:nth-child(2) { animation-delay: .06s; } main.enter > *:nth-child(3) { animation-delay: .12s; }
main.enter > *:nth-child(4) { animation-delay: .18s; } main.enter > *:nth-child(n+5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { main.enter > * { animation: none; } }
.amap-lab.hide { display: none; }
.ticker[hidden] { display: none; }

/* APreport.online wordmark: black in light mode, white in dark mode */
.logo { display: block; height: 28px; width: auto; }
.logo-white { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-ink { display: none; } :root:not([data-theme="light"]) .logo-white { display: block; } }
:root[data-theme="dark"] .logo-ink { display: none; }
:root[data-theme="dark"] .logo-white { display: block; }
.gate-top .logo { height: 30px; }
@media (max-width: 560px) { .logo { height: 22px !important; } }

/* official SEC announcements */
.secl { display: flex; flex-direction: column; }
.sec-i { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 4px; border-top: 1px solid var(--line-2); border-radius: 8px; }
.sec-i:first-child { border-top: 0; }
.sec-i:hover { background: var(--surface-2); }
.sec-d { color: var(--muted); font-size: 13px; font-weight: 700; }
.sec-n { font-size: 14.5px; line-height: 1.45; }
.sec-i.res .sec-n { font-weight: 700; }
.sec-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tag { font: 700 11.5px/1 "Inter Tight", var(--f-te); padding: 5px 8px; border-radius: 999px; white-space: nowrap; }
.tag.new { background: var(--live-soft); color: var(--live); }
.tag.res { background: #e7f6ec; color: #15803d; }
.tag.pdf { color: var(--muted); border: 1px solid var(--line); }
@media (max-width: 640px) { .sec-i { grid-template-columns: minmax(0, 1fr); gap: 4px; } .sec-tags { justify-content: flex-start; } }
.sec-banner { display: block; background: #15803d; color: #fff; text-align: center; font-weight: 700; padding: 10px 16px; font-size: 14.5px; }
.sec-banner[hidden] { display: none; }

/* alliances (Past results + live tallies) */
.pp.ally { padding: 6px 0; }
.pp-n { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ally-chip { background: var(--ink); color: var(--bg); }
.ally-m { display: flex; gap: 3px; flex-wrap: wrap; }
.ally-m .chip { font-size: 10.5px; padding: 1px 6px; }
.pp-bar { display: flex; }
.pp-bar i { border-radius: 0; }
.pp-bar i:first-child { border-radius: 4px 0 0 4px; }
.ally-sum { margin: 2px 0 6px; font-weight: 700; color: var(--ink-2); }
.ally-tag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.ally-live { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.ally-live b.num { font: 800 20px "Inter Tight", sans-serif; }
.ally-live .chip { font-size: 11px; }
