/* ============================================================
   Super header · masthead · nav + mega menu · ticker · mobile panel
   ============================================================ */

/* --- super header --- */
.super{background:var(--brand-deep);color:var(--on-black);font-size:12.5px;border-bottom:1px solid rgba(255,255,255,.12)}
.super .container{display:flex;align-items:center;justify-content:space-between;height:40px;gap:12px}
.super-right,.super-left{display:flex;align-items:center;gap:13px}
.super .dot{width:4px;height:4px;border-radius:4px;background:var(--red);display:inline-block}
.super time{font-variant-numeric:tabular-nums;color:#cfcfcf}
.super .wx-chip{display:flex;align-items:center;gap:6px;color:#cfcfcf}
.super .wx-chip b{color:#ffb3b3;font-weight:600}
.fx-chip{display:flex;align-items:center;gap:7px;color:#cfcfcf;font-variant-numeric:tabular-nums}
.fx-chip b{color:#ffb3b3;font-weight:600}
.super a:hover,.super button:hover{color:#fff}
.btn-ghost{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 12px;border:1px solid rgba(255,255,255,.25);border-radius:4px;font-size:12px;color:var(--on-black);transition:.2s;line-height:1}
.btn-ghost:hover{border-color:var(--red);color:#fff;background:rgba(204,0,0,.15)}
.btn-ghost:active{transform:translateY(1px)}
/* rate chips: label on desktop, compact glyph reserved for mobile */
.fx-chip .fx-1{display:inline-flex;align-items:center;gap:5px}
.fx-chip .fx-1+.fx-1{margin-inline-start:8px}
.fx-chip .fx-1+.fx-1::before{content:"·";margin-inline-end:8px;color:rgba(255,255,255,.4)}
.fx-chip .fx-sym{display:none;font-weight:800;color:#ffb3b3}

/* custom light/dark toggle switch */
.theme-switch{padding:0;background:none;border:0;cursor:pointer;display:inline-flex;align-items:center}
.theme-switch__track{position:relative;width:46px;height:24px;border-radius:999px;
  background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.25);
  display:flex;align-items:center;justify-content:space-between;padding:0 6px;transition:background .2s}
.theme-switch__track .icon{width:12px;height:12px;transition:color .2s}
.theme-switch .ts-sun{color:#ffd94a}
.theme-switch .ts-moon{color:rgba(255,255,255,.55)}
.theme-switch__knob{position:absolute;top:2px;right:3px;width:18px;height:18px;border-radius:50%;
  background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.35);transition:transform .22s ease}
html[data-theme="dark"] .theme-switch__track{background:var(--red);border-color:var(--red)}
html[data-theme="dark"] .theme-switch__knob{transform:translateX(-22px)}
html[data-theme="dark"] .theme-switch .ts-sun{color:rgba(255,255,255,.45)}
html[data-theme="dark"] .theme-switch .ts-moon{color:#fff}

/* --- masthead --- */
.masthead{background:var(--bg);border-bottom:1px solid var(--line)}
.masthead .container{display:flex;align-items:center;gap:22px;padding-top:16px;padding-bottom:16px}
.head-socials{display:flex;gap:6px;flex-shrink:0}
.head-socials a{width:28px;height:28px;border-radius:4px;display:flex;align-items:center;justify-content:center;background:transparent;border:1.5px solid var(--line-strong);color:var(--muted);transition:.15s}
.head-socials .icon{width:13px;height:13px}
/* Header controls share one height (city selector / socials / search box). */
.masthead .head-socials a{width:30px;height:30px}
.masthead .head-socials .icon{width:15px;height:15px}
.head-socials .s-fb:hover{border-color:var(--fb);color:var(--fb)}
.head-socials .s-ig:hover{border-color:var(--ig);color:var(--ig)}
.head-socials .s-tg:hover{border-color:var(--tg);color:var(--tg)}
.head-socials .s-wa:hover{border-color:var(--wa);color:var(--wa)}
.head-socials .s-yt:hover{border-color:var(--yt);color:var(--yt)}
footer .head-socials a{border-color:#3a3a41;color:#8f8f97}

/* --- header city selector (replaces the tagline) --- */
.city-select{position:relative;flex-shrink:0}
.city-select__btn{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 15px;border:1px solid var(--line-strong);border-radius:999px;background:var(--surface);color:var(--ink);font-family:var(--font-head);font-weight:700;font-size:13px;cursor:pointer;transition:.15s}
.city-select__btn:hover,.city-select.is-open .city-select__btn{border-color:var(--brand);color:var(--brand);background:var(--brand-soft)}
.city-select__btn .icon{width:15px;height:15px}
.city-select__panel{position:absolute;top:calc(100% + 8px);inset-inline-start:0;width:320px;max-width:86vw;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:12px;display:none;z-index:70;text-align:right}
.city-select.is-open .city-select__panel{display:block;animation:cs-pop .18s ease}
@keyframes cs-pop{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.city-select__search{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:8px;padding:8px 12px;margin-bottom:8px}
.city-select__search .icon{width:15px;height:15px;color:var(--muted)}
.city-select__search input{border:none;outline:none;flex:1;font-family:inherit;font-size:13.5px;background:none;color:var(--ink);min-width:0}
.city-select__list{max-height:330px;overflow:auto;display:grid;grid-template-columns:1fr 1fr;gap:2px}
.city-select__list a{display:flex;align-items:center;gap:7px;padding:8px 9px;border-radius:8px;font-size:12.5px;font-weight:600;color:var(--ink-2)}
.city-select__list a:hover{background:var(--brand-soft);color:var(--brand)}
.city-select__list a .icon{width:13px;height:13px;color:var(--muted);flex-shrink:0}
.city-select__list a:hover .icon{color:var(--brand)}
.city-select__empty{grid-column:1/-1;padding:16px;text-align:center;color:var(--muted);font-size:13px}
@media (max-width:720px){.masthead .city-select{display:none}}

/* --- elections quick button --- */
.elx-btn{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 16px;flex-shrink:0;border-radius:999px;background:var(--red);color:#fff;font-family:var(--font-head);font-weight:800;font-size:13px;transition:.15s;line-height:1;border:1px solid var(--red)}
.elx-btn:hover{background:var(--red-deep);border-color:var(--red-deep);transform:translateY(-1px);box-shadow:0 4px 14px rgba(239,51,64,.35)}
.elx-btn .icon{width:16px;height:16px}
@media (max-width:960px){.elx-btn span{display:none}.elx-btn{padding:0 12px}}
@media (max-width:720px){.elx-btn{display:none}}

/* Dark mode: header/navbar and input fields get their own shades (tokens.css). */
html[data-theme="dark"] .masthead,
html[data-theme="dark"] .mainnav{background:var(--header)}
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .search-box:focus-within,
html[data-theme="dark"] .city-select__btn,
html[data-theme="dark"] .city-select__search{background:var(--input)}

/* --- search --- */
.search{position:relative;flex:0 1 250px;max-width:250px;min-width:150px;margin-inline-start:auto}
.search-box{display:flex;align-items:center;gap:8px;height:30px;background:var(--surface);border:1px solid var(--line);border-radius:4px;padding:0 6px 0 16px;transition:.2s}
.search-box:focus-within{border-color:var(--red);background:var(--surface);box-shadow:0 0 0 3px var(--red-soft)}
.search-box input{border:none;background:none;outline:none;flex:1;font-family:inherit;font-size:13px;color:var(--ink);min-width:0}
.search-go{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:0;border-radius:5px;background:var(--red);color:#fff;cursor:pointer;transition:.15s}
.search-go:hover{background:var(--red-deep)}
.search-go .icon{width:15px;height:15px}
.search-box input::placeholder{color:var(--muted)}
.search-panel{position:absolute;top:calc(100% + 8px);right:0;left:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:14px;display:none;z-index:60;max-height:70vh;overflow:auto}
.search-panel.open{display:block}
.sp-label{font-size:11px;color:var(--muted);font-weight:600;margin:10px 0 7px;display:flex;align-items:center;gap:6px}
.sp-label:first-child{margin-top:0}
.sp-label::before{content:"";width:10px;height:2px;background:var(--red);border-radius:2px}
.sp-chips{display:flex;flex-wrap:wrap;gap:7px}
.sp-chip{font-size:12.5px;border:1px solid var(--line);border-radius:4px;padding:4px 12px;color:var(--ink-2);transition:.15s;display:inline-block}
.sp-chip:hover{border-color:var(--red);color:var(--red)}
.sp-row{display:flex;align-items:center;gap:10px;padding:7px 6px;border-radius:4px;font-size:13.5px}
.sp-row:hover{background:var(--surface-2)}
.sp-row .n{color:var(--red);font-weight:700;font-size:12px;min-width:14px;text-align:center}
.sp-avatar{width:28px;height:28px;border-radius:4px;background:var(--red-soft);color:var(--red);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;flex-shrink:0}
.sp-row small{color:var(--muted);font-size:11.5px;margin-inline-start:auto}
.sp-empty{padding:14px;text-align:center;color:var(--muted);font-size:13px}

/* --- masthead actions --- */
.mast-actions{display:flex;align-items:center;gap:14px;flex-shrink:0}
.app-btn{display:inline-flex;align-items:center;gap:10px;height:30px;background:var(--black-block);color:var(--on-black);border-radius:4px;padding:0 16px;transition:.2s;border:1px solid var(--black-block);line-height:1.25}
.app-btn:hover{background:var(--red);border-color:var(--red);box-shadow:0 4px 14px rgba(204,0,0,.35);transform:translateY(-1px)}
.app-btn:active{transform:translateY(0) scale(.98);box-shadow:none}
.app-btn .icon{width:20px;height:20px;color:var(--gold)}
.app-btn:hover .icon{color:#fff}
.app-btn div{line-height:1.3;text-align:right}
.app-btn small{display:block;font-size:10px;color:#b9b9bf;display: none}
.app-btn:hover small{color:#ffd9df}
.app-btn b{font-family:var(--font-head);font-size:13px;font-weight:800}
.btn-send{display:inline-flex;align-items:center;gap:8px;height:30px;background:var(--red);color:#fff;border:1px solid var(--red);border-radius:4px;padding:0 18px;font-family:var(--font-head);font-weight:800;font-size:13px;transition:.2s;line-height:1}
.btn-send:hover{background:var(--red-deep);border-color:var(--red-deep);box-shadow:0 4px 14px rgba(204,0,0,.35);transform:translateY(-1px)}
.btn-send:active{transform:translateY(0) scale(.98);box-shadow:none}
.btn-send .icon{width:16px;height:16px}
.burger{display:none;padding:6px}

/* --- nav + mega menu --- */
.mainnav{background:var(--surface);border-bottom:1px solid var(--line-strong);position:sticky;top:0;z-index:50}
.mainnav .container{display:flex;align-items:stretch;position:relative}
.nav-list{display:flex;align-items:stretch}
.nav-item{position:static;--nav-c:var(--red)}
.nav-item[data-c="gold"]{--nav-c:var(--gold)}
.nav-item[data-c="black"]{--nav-c:var(--ink)}
.nav-item[data-c="deep"]{--nav-c:var(--red-deep)}
.nav-link{display:flex;align-items:center;gap:5px;padding:13px 11px;font-family:var(--font-head);font-weight:700;font-size:14.5px;color:var(--ink);position:relative;transition:.15s;white-space:nowrap}
.nav-link::after{content:"";position:absolute;bottom:0;right:14px;left:14px;height:3px;background:var(--nav-c);transform:scaleX(0);transform-origin:right;transition:transform .2s}
.nav-item:hover .nav-link::after,.nav-link.active::after{transform:scaleX(1)}
.nav-link.active,.nav-item:hover .nav-link{color:var(--nav-c)}

/* --- ticker: continuous marquee, text only ---
   The <ticker> feed node has no images, so cards are title + time. The item
   set is rendered twice and the track slides one set width, which loops
   seamlessly. RTL: the first item sits at the right and the rest extend to
   the left, so the track travels in the +X direction. */
.ticker{background:var(--surface);border-bottom:1px solid var(--line)}
.ticker .container{display:flex;align-items:stretch;gap:0;min-height:74px}

.ticker-bell{
  display:flex;align-items:center;justify-content:center;padding-inline-end:14px;
  color:var(--red);flex-shrink:0;position:relative
}
.ticker-bell .icon{width:20px;height:20px}
.ticker-bell .pulse{
  position:absolute;top:20px;inset-inline-start:2px;width:7px;height:7px;
  border-radius:50%;background:var(--red);animation:pulse 1.4s infinite
}

.ticker-viewport{
  flex:1;min-width:0;overflow:hidden;position:relative;
  mask-image:linear-gradient(to left,transparent,#000 3%,#000 97%,transparent);
  -webkit-mask-image:linear-gradient(to left,transparent,#000 3%,#000 97%,transparent)
}
.ticker-track{
  display:flex;align-items:stretch;width:max-content;height:100%;
  animation:tk-scroll 70s linear infinite
}
.ticker:hover .ticker-track,
.ticker-track:focus-within{animation-play-state:paused}
@keyframes tk-scroll{from{transform:translateX(0)}to{transform:translateX(50%)}}

.tk-item{
  display:flex;flex-direction:column;justify-content:center;gap:5px;
  width:330px;flex-shrink:0;text-align:start;
  padding:14px 18px;border-inline-start:1px solid var(--line);
  font-family:inherit;transition:background .15s
}
.tk-item:hover{background:var(--surface-2)}
.tk-title{
  font-family:var(--font-head);font-weight:700;font-size:13.5px;line-height:1.55;color:var(--ink);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden
}
.tk-item:hover .tk-title{color:var(--red)}
.tk-time{font-size:11.5px;font-weight:700;color:var(--red);font-variant-numeric:tabular-nums}

/* Flex child, not absolute: inset-inline-start resolves to the RIGHT under
   RTL, which put the pill on top of the bell. */
.ticker-more{
  align-self:center;margin-inline-start:12px;flex-shrink:0;
  display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 14px;
  background:var(--red);color:#fff;border-radius:999px;
  font-family:var(--font-head);font-weight:800;font-size:11.5px;line-height:1;
  transition:.2s;white-space:nowrap
}
.ticker-more:hover{background:var(--red-deep)}
.ticker-more .icon{width:12px;height:12px;transform:rotate(90deg)}

@media (prefers-reduced-motion:reduce){
  .ticker-track{animation:none}
}
/* --- mobile panel --- */
.mobile-panel{display:none}
