/* ============================================================
   WindowsNews.AI — Component styles
   ============================================================ */

/* =========== TICKER =========== */
.ticker {
  position: sticky; top: 0; z-index: 60;
  height: 34px;
  display: flex; align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--glass-bg-2);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-line);
  overflow: hidden;
}
.ticker-tag {
  flex: none;
  display: inline-flex; align-items: center; gap: 7px;
  height: 100%;
  padding: 0 14px;
  background: var(--live);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 10.5px;
  z-index: 2;
}
.ticker-tag .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #fff;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1; transform:scale(1);} 50%{opacity:.35; transform:scale(.7);} }
.ticker-viewport { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 92%, transparent); }
.ticker-track { display: inline-flex; align-items: center; gap: 0; white-space: nowrap; animation: ticker-scroll 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item { display: inline-flex; align-items: center; gap: 9px; padding: 0 20px; color: var(--text-2); }
.ticker-item .tdot { width: 6px; height: 6px; border-radius: 2px; }
.ticker-item:hover { color: var(--text); }
.ticker-item .sep { color: var(--line-strong); }
.ticker-quote { color: var(--text-3); }
.ticker-quote b { color: var(--gain); font-weight: 600; }
.ticker-quote b.dn { color: var(--loss); }

/* =========== NAV =========== */
.nav {
  position: sticky; top: 34px; z-index: 55;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-line);
  transition: box-shadow .25s;
}
.nav.scrolled { box-shadow: var(--sh-md); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 22px; }

.brand {
  display: flex; align-items: center; gap: 11px;
  flex: none;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-bright), var(--brand));
  box-shadow: 0 4px 14px var(--brand-soft), 0 1px 0 rgba(255,255,255,.4) inset;
  flex: none;
}
.brand-mark svg { width: 19px; height: 19px; }
/* Real header logo (production asset): neutral chip — the logo's orange
   swoosh clashes with the blue gradient square, so the --img variant
   flattens the mark's chrome while keeping the 34px geometry. */
.brand-mark--img { background: var(--surface); border: 1px solid var(--line); box-shadow: none; }
.brand-mark--img img { width: 24px; height: 24px; display: block; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.035em;
  line-height: 1;
  display: flex; align-items: baseline; gap: 1px;
}
.brand-name .ai { color: var(--brand); }
.brand-name .dot { color: var(--text-faint); font-weight: 500; }

.nav-primary { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav-link {
  font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
  color: var(--text-2);
  padding: 8px 13px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; gap: 7px;
  position: relative;
  transition: color .18s, background .18s;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--brand); }
.nav-link.active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px; height: 2px;
  background: var(--brand); border-radius: 2px;
}
.nav-link .chev { width: 11px; height: 11px; opacity: .55; transition: transform .2s; }
.nav-dd { position: relative; }
.nav-dd:hover .chev { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 80;
}
.nav-dd:hover .nav-dd-menu { opacity: 1; visibility: visible; transform: none; }
.dd-group-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-faint); padding: 9px 11px 5px;
}
.dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500; color: var(--text-2);
  transition: background .15s, color .15s;
}
.dd-item:hover { background: var(--surface-2); color: var(--text); }
.dd-item .dd-dot { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.dd-divider { height: 1px; background: var(--line); margin: 6px 4px; }

.nav-spacer { flex: 1; }
.nav-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.nav-search {
  display: flex; align-items: center; gap: 9px;
  height: 38px; padding: 0 13px;
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  width: 210px;
  transition: border-color .2s, background .2s, width .25s;
}
.nav-search:focus-within { border-color: var(--brand-line); width: 250px; background: var(--surface); }
.nav-search svg { width: 15px; height: 15px; color: var(--text-faint); flex: none; }
.nav-search input { border: none; background: none; outline: none; font-family: var(--font-ui); font-size: 13.5px; color: var(--text); width: 100%; }
.nav-search input::placeholder { color: var(--text-faint); }
.nav-search kbd {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-faint);
  border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; flex: none;
}
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: background .18s, color .18s, border-color .18s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-login {
  font-weight: 600; font-size: 13.5px;
  padding: 9px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  color: var(--text);
  transition: border-color .2s, background .2s;
}
.nav-login:hover { border-color: var(--brand-line); color: var(--brand); }
.nav-join { background: var(--brand); border-color: var(--brand); color: #fff; }
.nav-join:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.nav-streak { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--cat-dev); background: var(--cat-dev-soft); border-radius: var(--r-pill); padding: 3px 8px; }
.nav-streak svg { width: 12px; height: 12px; }
.nav-burger { display: none; }

/* member: follow chips + my-feed surfaces */
.follow-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 22px 0 8px; }
.follow-chip { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); border: 1px solid var(--brand-line); background: var(--brand-soft); border-radius: var(--r-pill); padding: 6px 8px 6px 13px; }
.follow-chip a:hover { color: var(--brand); }
.follow-x { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--text-faint); transition: color .15s, background .15s; }
.follow-x:hover { color: var(--cat-security); background: var(--cat-security-soft); }
.follow-x svg { width: 11px; height: 11px; }
.follow-add { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); border: 1px dashed var(--line-2); border-radius: var(--r-pill); padding: 6px 13px; transition: all .15s; }
.follow-add:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }

.perks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); padding: 34px 0 50px; }
@media (max-width: 980px) { .perks-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .perks-grid { grid-template-columns: 1fr; } }
.perk-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 22px; display: flex; flex-direction: column; gap: 9px; }
.perk-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand-bright), var(--cat-ai)); }
.perk-ico svg { width: 18px; height: 18px; }
.perk-card b { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; }
.perk-card p { font-size: 13.5px; line-height: 1.55; color: var(--text-3); }

.week-panel { border: 1px solid var(--cat-ai-soft); border-radius: var(--r-lg); padding: 22px; margin: 22px 0 30px; background: radial-gradient(120% 120% at 100% 0%, var(--cat-ai-soft), transparent 55%), var(--surface); }
.week-bullets { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.week-bullets li { display: grid; grid-template-columns: 24px 1fr; gap: 11px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.week-bullets .n { font-family: var(--font-mono); font-size: 11px; color: var(--cat-ai); padding-top: 2px; }
.week-bullets b { color: var(--text); font-weight: 650; }
.week-pending { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }

.statspanel { display: flex; flex-direction: column; gap: 18px; }
.stats-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 980px) { .stats-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .stats-tiles { grid-template-columns: repeat(2, 1fr); } }
.stat-tile { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.stat-ico { color: var(--brand); }
.stat-ico svg { width: 16px; height: 16px; }
.stat-tile b { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.stat-l { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 980px) { .badge-grid { grid-template-columns: repeat(2, 1fr); } }
.badge-card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 5px; opacity: .45; }
.badge-card.earned { opacity: 1; border-color: var(--brand-line); background: linear-gradient(160deg, var(--brand-soft), var(--surface) 55%); }
.badge-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--text-3); background: var(--surface-3); }
.badge-card.earned .badge-ico { color: #fff; background: linear-gradient(135deg, var(--brand-bright), var(--cat-ai)); }
.badge-ico svg { width: 17px; height: 17px; }
.badge-nm { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; }
.badge-ds { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); line-height: 1.45; }
.stats-forum { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); padding: 13px 16px; }
.stat-f { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); }
.stat-f svg { width: 13px; height: 13px; color: var(--brand); }

/* member badge toast (wn-member.js) */
.wn-badge-toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 300;
  display: flex; flex-direction: column; gap: 2px;
  padding: 13px 18px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--brand-line); box-shadow: var(--sh-lg);
  opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s;
}
.wn-badge-toast.show { opacity: 1; transform: none; }
.wn-badge-toast b { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); }
.wn-badge-toast span { font-family: var(--font-display); font-weight: 700; font-size: 14px; }

/* Category strip */
.catstrip {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.catstrip-inner { display: flex; align-items: center; gap: 4px; height: 46px; overflow-x: auto; scrollbar-width: none; }
.catstrip-inner::-webkit-scrollbar { display: none; }
.catstrip-link {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 500; color: var(--text-3);
  padding: 7px 12px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; gap: 7px;
  white-space: nowrap; flex: none;
  transition: color .18s, background .18s;
}
.catstrip-link:hover { color: var(--text); background: var(--surface-2); }
.catstrip-link .cdot { width: 6px; height: 6px; border-radius: 2px; }
.catstrip-live { color: var(--live); margin-left: auto; flex: none; }

/* =========== HERO =========== */
.hero { padding: 30px 0 8px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: var(--gap);
}
.hero-lead {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  min-height: 480px;
  background: var(--skeleton);
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: var(--sh-lg);
  isolation: isolate;
}
.hero-lead .mesh { position: absolute; inset: 0; z-index: 0; }
.hero-lead::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(6,9,18,0.92) 0%, rgba(6,9,18,0.55) 38%, rgba(6,9,18,0.08) 70%, transparent 100%);
}
.hero-lead-body { position: relative; z-index: 2; padding: 34px; color: #fff; }
.hero-lead h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 3.3vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 14px 0 12px;
  text-wrap: balance;
}
.hero-lead .dek { font-size: 16px; color: rgba(255,255,255,0.82); max-width: 60ch; line-height: 1.5; }
.byline {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.02em;
  color: var(--text-3);
  margin-top: 16px;
}
.hero-lead .byline { color: rgba(255,255,255,0.72); }
.byline .av { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg,var(--brand-bright),var(--cat-ai)); flex: none; display:grid;place-items:center;color:#fff;font-family:var(--font-display);font-weight:700;font-size:10px; }
.byline .sep { opacity: .5; }

.hero-side { display: flex; flex-direction: column; gap: 16px; }
.hero-sec {
  display: grid; grid-template-columns: 112px 1fr; gap: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 13px;
  transition: transform .18s, box-shadow .2s, border-color .2s;
}
.hero-sec:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--line-2); }
.hero-sec .thumb { border-radius: var(--r-sm); aspect-ratio: 1; overflow: hidden; position: relative; background: var(--skeleton); }
.hero-sec .thumb .mesh { position: absolute; inset: 0; }
.hero-sec h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.18; letter-spacing: -0.018em;
  margin: 9px 0 0; text-wrap: balance;
}
.hero-sec:hover h3 { color: var(--brand); }
.hero-sec .meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); margin-top: 8px; letter-spacing: 0.03em; }

/* =========== AI BRIEFING =========== */
.briefing {
  border-radius: var(--r-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 100% 0%, var(--cat-ai-soft), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
}
.briefing-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.briefing-spark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--cat-ai), var(--brand));
  box-shadow: 0 4px 12px var(--cat-ai-soft);
}
.briefing-spark svg { width: 17px; height: 17px; }
.briefing-head .t { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.briefing-head .live { margin-left: auto; flex: none; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cat-ai); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.briefing-head .live .d { width: 6px; height: 6px; border-radius: 50%; background: var(--cat-ai); animation: pulse 1.6s infinite; }
.briefing ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.briefing li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 13.5px; line-height: 1.42; color: var(--text-2); }
.briefing li .n { font-family: var(--font-mono); font-size: 11px; color: var(--cat-ai); font-weight: 600; padding-top: 1px; }
.briefing li b { color: var(--text); font-weight: 600; }
.briefing-foot { margin-top: 15px; padding-top: 13px; border-top: 1px dashed var(--line-2); font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); display: flex; justify-content: space-between; align-items: center; }

/* =========== STATUS STRIP =========== */
.statusstrip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 26px 0 6px;
}
.status-cell { background: var(--surface); padding: 15px 18px; display: flex; align-items: center; gap: 13px; transition: background .2s; }
.status-cell:hover { background: var(--surface-2); }
.status-ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.status-ico svg { width: 18px; height: 18px; }
.status-meta .l { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.status-meta .v { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; margin-top: 2px; display: flex; align-items: center; gap: 7px; }
.status-meta .v small { font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0; }
.s-ok { color: var(--cat-enterprise); }
.s-warn { color: var(--cat-dev); }
.s-crit { color: var(--cat-security); }

/* =========== STORY CARDS =========== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  height: 100%;
  transition: transform .18s ease, box-shadow .22s ease, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: var(--line-2); }
.card-media { aspect-ratio: 16/10; position: relative; background: var(--skeleton); }
.card-media .mesh { position: absolute; inset: 0; }
.card-media .chip-float { position: absolute; top: 11px; left: 11px; z-index: 4; }
.card-body { padding: 15px 16px 17px; display: flex; flex-direction: column; flex: 1; }
.card h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 17px; line-height: 1.16; letter-spacing: -0.02em;
  margin: 10px 0 0; text-wrap: balance;
}
.card:hover h3 { color: var(--brand); }
.card .dek { font-size: 13.5px; color: var(--text-3); line-height: 1.45; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); margin-top: auto; padding-top: 13px; letter-spacing: 0.02em; display: flex; align-items: center; gap: 8px; }
.card .meta .sep { opacity: .5; }

/* river list item */
.river { display: flex; flex-direction: column; }
.river-item {
  display: grid; grid-template-columns: 168px 1fr; gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity .2s;
}
.river-item:first-child { padding-top: 0; }
.river-item .thumb { border-radius: var(--r-md); aspect-ratio: 16/11; overflow: hidden; position: relative; background: var(--skeleton); }
.river-item .thumb .mesh { position: absolute; inset: 0; }
.river-item .thumb .chip-float { position: absolute; top: 9px; left: 9px; }
.river-body { display: flex; flex-direction: column; }
.river-body h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.16; letter-spacing: -0.02em; margin: 9px 0 0; text-wrap: balance; }
.river-item:hover h3 { color: var(--brand); }
.river-body .dek { font-size: 14px; color: var(--text-3); line-height: 1.5; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.river-body .meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: 11px; letter-spacing: 0.02em; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.river-body .meta .av { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg,var(--brand-bright),var(--cat-ai)); display:grid;place-items:center;color:#fff;font-family:var(--font-display);font-weight:700;font-size:8px; }

/* =========== LAYOUT: content + sidebar =========== */
.feed { padding: 30px 0 50px; }
.feed-grid { display: grid; grid-template-columns: 1fr 332px; gap: 44px; align-items: start; }
.sidebar { display: flex; flex-direction: column; gap: 26px; position: sticky; top: calc(34px + var(--nav-h) + 16px); will-change: transform; }

/* trending rail */
.rail {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.rail-head {
  display: flex; align-items: center; gap: 9px;
  padding: 14px 17px;
  background: var(--glass-bg-2);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--line);
}
.rail-head .t { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: -0.01em; }
.rail-head svg { width: 16px; height: 16px; color: var(--cat-security); }
.rail-head .live { margin-left: auto; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.rail-item {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
  transition: background .16s;
}
.rail-item:last-child { border-bottom: none; }
.rail-item:hover { background: var(--surface-2); }
.rail-rank { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--line-strong); line-height: 1; }
.rail-item:hover .rail-rank { color: var(--brand); }
.rail-main .rt { font-weight: 650; font-size: 13.5px; line-height: 1.28; letter-spacing: -0.01em; font-family: var(--font-display); }
.rail-item:hover .rt { color: var(--brand); }
.rail-main .rm { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); margin-top: 5px; display: flex; align-items: center; gap: 6px; }
.rail-vel { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; display: flex; align-items: center; gap: 3px; }
.rail-vel.up { color: var(--gain); }
.rail-vel.hot { color: var(--cat-security); }
.rail-vel svg { width: 11px; height: 11px; }

/* newsletter */
.newsbox {
  border-radius: var(--r-lg);
  padding: 22px;
  position: relative; overflow: hidden;
  background:
    radial-gradient(130% 120% at 0% 0%, var(--brand-soft), transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
}
.newsbox .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand-bright), var(--brand)); margin-bottom: 14px; }
.newsbox .ico svg { width: 18px; height: 18px; }
.newsbox h4 { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.025em; line-height: 1.1; }
.newsbox p { font-size: 13px; color: var(--text-3); line-height: 1.5; margin: 8px 0 15px; }
.newsbox form { display: flex; flex-direction: column; gap: 9px; }
.newsbox input {
  height: 42px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface-sunk);
  font-family: var(--font-ui); font-size: 13.5px; color: var(--text); outline: none;
  transition: border-color .2s;
}
.newsbox input:focus { border-color: var(--brand-line); }
.newsbox button { height: 42px; justify-content: center; }
.newsbox .fine { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-faint); margin-top: 10px; letter-spacing: 0.02em; text-align: center; }
.newsbox.ok form { display: none; }
.newsbox .done { display: none; align-items: center; gap: 9px; color: var(--cat-enterprise); font-weight: 600; font-size: 14px; }
.newsbox.ok .done { display: flex; }

/* ad slot — QUIET until filled: live units render no frame, no label, just
   reserved space (CLS-free fill). The dashed placeholder chrome appears only
   around the dev stub (.ad-inner, ENABLE_ADSENSE=false). */
.ad {
  display: grid; place-items: center;
  text-align: center;
  position: relative;
  border-radius: var(--r-md);
}
.ad-label { display: none; position: absolute; top: 8px; left: 10px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); }
.ad:has(> .ad-inner) {
  border: 1px dashed var(--line-strong);
  background: repeating-linear-gradient(135deg, var(--surface-sunk), var(--surface-sunk) 11px, transparent 11px, transparent 22px);
}
.ad:has(> .ad-inner) .ad-label { display: block; }
.ad-inner { color: var(--text-faint); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; padding: 26px; }
.ad-mpu { aspect-ratio: 300/250; }
.ad-leader { height: 92px; margin: 0 0 6px; }
/* native/in-feed: card chrome + "Sponsored" bar appear only once filled
   (.ad.ad-native scoping keeps the stub <article class="card ad-native"> on
   its normal card styles) */
.ad.ad-native { grid-template-columns: none; display: block; padding: 0; overflow: hidden; }
.ad.ad-native .ad-native-head { display: none; align-items: center; gap: 7px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.ad.ad-native:has(> ins.adsbygoogle[data-ad-status="filled"]) {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
}
.ad.ad-native:has(> ins.adsbygoogle[data-ad-status="filled"]) .ad-native-head { display: flex; }
/* AdSense marks units it declines to fill with data-ad-status="unfilled" or
   "unfill-optimized" (always the case on the robots-blocked /beta staging
   path; occasional in production). Collapse the whole slot — including the
   reserved aspect-ratio/height — the moment any non-"filled" status lands.
   Units that never receive a status (blocked script) are handled by the 4s
   judge in templates/adsense.php. */
.ad:has(> ins.adsbygoogle[data-ad-status]:not([data-ad-status="filled"])) { display: none; }

/* most read */
.mostread { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.mostread .h { padding: 14px 17px; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 9px; }
.mostread .h svg { width: 15px; height: 15px; color: var(--cat-dev); }
.mr-item { display: flex; gap: 11px; padding: 12px 17px; border-bottom: 1px solid var(--line); align-items: baseline; }
.mr-item:last-child { border: none; }
.mr-item .num { font-family: var(--font-mono); font-size: 11px; color: var(--cat-dev); font-weight: 600; flex: none; }
.mr-item .rt { font-weight: 600; font-size: 13px; line-height: 1.3; letter-spacing: -0.01em; }
.mr-item:hover .rt { color: var(--brand); }

/* =========== CATEGORY BANDS =========== */
.band { padding: 36px 0; border-top: 1px solid var(--line); }
.band-cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.band-cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }

/* split feature band */
.splitfeat { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--gap); }
.splitfeat-main { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 360px; background: var(--skeleton); display: flex; flex-direction: column; justify-content: flex-end; box-shadow: var(--sh-md); }
.splitfeat-main .mesh { position: absolute; inset: 0; z-index: 0; }
.splitfeat-main::before { content:""; position:absolute; inset:0; z-index: 1; background: linear-gradient(to top, rgba(6,9,18,0.9), transparent 65%); }
.splitfeat-main .b { position: relative; z-index: 2; padding: 26px; color: #fff; }
.splitfeat-main h3 { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.06; letter-spacing: -0.025em; margin: 12px 0 0; text-wrap: balance; }
.splitfeat-list { display: flex; flex-direction: column; gap: 0; }
.sf-item { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; }
.sf-item:first-child { padding-top: 0; }
.sf-item:last-child { border: none; }
.sf-item .idx { font-family: var(--font-mono); font-size: 12px; color: var(--accent, var(--brand)); font-weight: 600; padding-top: 2px; }
.sf-item h4 { font-family: var(--font-display); font-weight: 650; font-size: 16px; line-height: 1.22; letter-spacing: -0.015em; }
.sf-item:hover h4 { color: var(--brand); }
.sf-item .m { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); margin-top: 6px; }

/* =========== FOOTER =========== */
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 20px; }
.footer-cta {
  border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 160% at 80% 0%, var(--brand-soft), transparent 55%);
}
.footer-cta-inner { padding: 44px 0; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; }
.footer-cta h3 { font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
.footer-cta p { color: var(--text-3); font-size: 15px; margin-top: 8px; max-width: 52ch; }
.footer-cta-form { display: flex; gap: 9px; }
.footer-cta-form input { height: 48px; width: 280px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); font-family: var(--font-ui); font-size: 14px; color: var(--text); outline: none; }
.footer-cta-form input:focus { border-color: var(--brand-line); }

.footer-main { padding: 50px 0 38px; display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 36px; }
.footer-brand .brand { margin-bottom: 15px; }
.footer-brand p { color: var(--text-3); font-size: 13.5px; line-height: 1.6; max-width: 34ch; }
.footer-social { display: flex; gap: 8px; margin-top: 18px; }
.footer-social a { width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2); transition: all .18s; }
.footer-social a:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.footer-social svg { width: 16px; height: 16px; }
.footer-col h5 { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 15px; }
.footer-col a { display: block; font-size: 13.5px; color: var(--text-2); padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: var(--brand); }
.footer-bar { border-top: 1px solid var(--line); padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-bar .legal { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-bar .legal a:hover { color: var(--brand); }
.footer-bar .status-pill { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 11px; }
.footer-bar .status-pill .d { width: 7px; height: 7px; border-radius: 50%; background: var(--cat-enterprise); box-shadow: 0 0 0 3px var(--cat-enterprise-soft); }

/* =========== RESPONSIVE =========== */
@media (max-width: 1024px) {
  .feed-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; will-change: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .band-cards4 { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-primary, .nav-search, .nav-login { display: none; }
  .nav-burger { display: grid; }
  .band-cards3 { grid-template-columns: 1fr; }
  .splitfeat { grid-template-columns: 1fr; }
  .statusstrip { grid-template-columns: 1fr 1fr; }
  .footer-cta-inner { grid-template-columns: 1fr; }
  .footer-cta-form input { width: 100%; }
}
/* ---- Touch targets: guarantee >=44px hit areas on coarse pointers ---- */
@media (pointer: coarse), (max-width: 860px) {
  .icon-btn, .nav-burger, .share-btn { width: 44px; height: 44px; }
  .catstrip-link { min-height: 44px; }
  .pager a { min-width: 44px; height: 44px; }
  .ticker { height: 44px; }
  .ticker-tag { font-size: 11px; }
  .ticker-item { padding: 0 22px; min-height: 44px; }
  .footer-social a { width: 44px; height: 44px; }
  .nav { top: 44px; }
  .filterbar, .sidebar { top: calc(44px + var(--nav-h)); }
}
@media (max-width: 560px) {
  .sidebar { grid-template-columns: 1fr; }
  .band-cards4 { grid-template-columns: 1fr; }
  .river-item { grid-template-columns: 116px 1fr; gap: 13px; }
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
  .hero-sec { grid-template-columns: 92px 1fr; }
}
