/* ============================================================
   FutureAITechX — Design System
   Dark-first technology editorial. Space Grotesk + Inter.
   ============================================================ */

:root {
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --grad: linear-gradient(90deg, #22d3ee, #818cf8 55%, #a855f7);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 72px;
  --container: 1264px;
  --ease: cubic-bezier(.22, .8, .3, 1);
  /* Image overlays sit on artwork, so they stay dark in both themes */
  --img-overlay: linear-gradient(180deg, rgba(5, 7, 15, 0) 0%, rgba(5, 7, 15, .55) 46%, rgba(5, 7, 15, .94) 100%);
  --on-img: #eaf2ff;
  --on-img-soft: #b6c2d6;
  --on-img-faint: #93a0b5;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #05070f;
  --bg-2: #080d1a;
  --surface: rgba(148, 163, 184, .055);
  --surface-2: rgba(148, 163, 184, .1);
  --card: rgba(13, 20, 38, .62);
  --card-solid: #0b1222;
  --border: rgba(148, 163, 184, .16);
  --border-strong: rgba(148, 163, 184, .3);
  --text: #e8eef8;
  --muted: #97a3b8;
  --faint: #64748b;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --purple: #c084fc;
  --violet: #a78bfa;
  --teal: #2dd4bf;
  --amber: #fbbf24;
  --rose: #fb7185;
  --magenta: #e879f9;
  --emerald: #34d399;
  --shadow: 0 18px 44px -18px rgba(2, 6, 18, .9);
  --glow: 0 0 0 1px rgba(34, 211, 238, .22), 0 12px 40px -12px rgba(34, 211, 238, .25);
  --header-bg: rgba(5, 7, 15, .82);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fc;
  --bg-2: #eef2f9;
  --surface: rgba(15, 23, 42, .04);
  --surface-2: rgba(15, 23, 42, .07);
  --card: #ffffff;
  --card-solid: #ffffff;
  --border: rgba(15, 23, 42, .12);
  --border-strong: rgba(15, 23, 42, .24);
  --text: #0b1526;
  --muted: #4a5a72;
  --faint: #74839c;
  --cyan: #0891b2;
  --blue: #2563eb;
  --purple: #7c3aed;
  --violet: #6d28d9;
  --teal: #0d9488;
  --amber: #b45309;
  --rose: #e11d48;
  --magenta: #a21caf;
  --emerald: #059669;
  --shadow: 0 18px 40px -20px rgba(15, 23, 42, .25);
  --glow: 0 0 0 1px rgba(8, 145, 178, .25), 0 12px 32px -14px rgba(8, 145, 178, .3);
  --header-bg: rgba(244, 247, 252, .85);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.18; margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
ul, ol { margin: 0; }

/* Ambient background: soft glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(720px 460px at 12% -4%, rgba(34, 211, 238, .07), transparent 62%),
    radial-gradient(820px 560px at 88% 12%, rgba(168, 85, 247, .065), transparent 62%),
    radial-gradient(640px 520px at 55% 108%, rgba(59, 130, 246, .055), transparent 62%);
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(720px 460px at 12% -4%, rgba(8, 145, 178, .07), transparent 62%),
    radial-gradient(820px 560px at 88% 12%, rgba(124, 58, 237, .06), transparent 62%);
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
main { min-height: 60vh; }
::selection { background: rgba(34, 211, 238, .3); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  background: var(--cyan); color: #04121a; font-weight: 700;
  padding: 10px 18px; border-radius: 8px; transition: top .2s;
}
.skip-link:focus { top: 12px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ---------- Typography helpers ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: .78rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--cyan);
}
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--grad); border-radius: 2px; }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.chip {
  display: inline-flex; align-items: center;
  font-family: var(--font-head); font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent, var(--cyan));
  background: color-mix(in srgb, var(--accent, var(--cyan)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--cyan)) 34%, transparent);
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}
a.chip:hover { background: color-mix(in srgb, var(--accent, var(--cyan)) 22%, transparent); }

/* Category accents */
[data-accent="ai"]            { --accent: var(--cyan); }
[data-accent="technology"]    { --accent: var(--blue); }
[data-accent="gadgets"]       { --accent: var(--violet); }
[data-accent="cybersecurity"] { --accent: var(--magenta); }
[data-accent="software"]      { --accent: var(--teal); }
[data-accent="science"]       { --accent: var(--blue); }
[data-accent="future"]        { --accent: var(--purple); }
[data-accent="startups"]      { --accent: var(--magenta); }
[data-accent="reviews"]       { --accent: var(--amber); }
[data-accent="guides"]        { --accent: var(--emerald); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: 12px 24px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .25s, background .25s, border-color .25s, color .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(90deg, #0ea5cf, #6366f1 60%, #9333ea);
  color: #fff;
  box-shadow: 0 8px 26px -10px rgba(56, 189, 248, .55);
}
.btn-primary:hover { box-shadow: 0 10px 34px -8px rgba(99, 102, 241, .65); transform: translateY(-1px); }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-1px); }
.btn-ghost { color: var(--muted); padding: 8px 12px; border-radius: 8px; }
.btn-ghost:hover { color: var(--cyan); background: var(--surface); }
.btn-small { padding: 8px 16px; font-size: .85rem; }
.text-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--cyan);
}
.text-link::after { content: "→"; transition: transform .2s; }
.text-link:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .55); }
.nav-row {
  display: flex; align-items: center; gap: 28px;
  height: var(--header-h);
  transition: height .25s var(--ease);
}
.site-header.scrolled .nav-row { height: 60px; }
.brand { flex-shrink: 0; display: inline-flex; }
/* Theme-aware logo: dark variant on light bg, light variant on dark bg */
.logo-light { display: none; }
html[data-theme="light"] .logo-dark { display: none; }
html[data-theme="light"] .logo-light { display: inline-block; }
.brand img { height: 42px; width: auto; transition: height .25s var(--ease); }
.site-header.scrolled .brand img { height: 36px; }
.main-nav { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.main-nav a {
  font-family: var(--font-head); font-size: .92rem; font-weight: 500;
  color: var(--muted); padding: 8px 13px; border-radius: 8px;
  transition: color .2s, background .2s;
  position: relative;
}
.main-nav a:hover { color: var(--text); background: var(--surface); }
.main-nav a.active { color: var(--text); }
.main-nav a.active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--grad);
}
.nav-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; color: var(--muted);
  border: 1px solid transparent;
  transition: color .2s, background .2s, border-color .2s;
}
.icon-btn:hover { color: var(--cyan); background: var(--surface); border-color: var(--border); }
.icon-btn svg { width: 19px; height: 19px; }
/* Theme toggle: show the icon of the mode you'd switch TO */
.theme-btn svg { display: none; }
html[data-theme="dark"] .theme-btn svg:first-child { display: block; }
html[data-theme="light"] .theme-btn svg:last-child { display: block; }
.nav-cta { margin-left: 6px; }
.menu-btn { display: none; }

/* Mobile drawer */
.mobile-drawer {
  display: block;
  position: fixed; inset: 0; z-index: 120;
  background: var(--bg);
  padding: 20px 24px 40px;
  overflow-y: auto;
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.mobile-drawer.open { opacity: 1; transform: none; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a {
  font-family: var(--font-head); font-size: 1.35rem; font-weight: 600;
  padding: 15px 6px; border-bottom: 1px solid var(--border); color: var(--text);
  display: flex; justify-content: space-between; align-items: center;
}
.drawer-nav a::after { content: "→"; color: var(--faint); font-size: 1rem; }
.drawer-nav a:hover { color: var(--cyan); }
.drawer-secondary { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.drawer-secondary a {
  font-size: .88rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px;
}
.drawer-secondary a:hover { color: var(--cyan); border-color: var(--cyan); }

/* ---------- Ticker ---------- */
.ticker {
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  display: flex; align-items: stretch; overflow: hidden;
  position: relative; z-index: 5;
}
html[data-theme="dark"] .ticker { background: rgba(8, 13, 26, .8); }
.ticker-label {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: .72rem; font-weight: 700; letter-spacing: .16em;
  color: #04121a;
  background: linear-gradient(90deg, #22d3ee, #38bdf8);
  padding: 9px 18px; margin-right: 8px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}
.ticker-label::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #04121a;
  animation: pulse 1.6s ease-in-out infinite;
}
.ticker-viewport { overflow: hidden; display: flex; align-items: center; flex: 1; min-width: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: flex; align-items: center; gap: 44px; width: max-content; padding-left: 20px; animation: ticker 55s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track a {
  font-size: .88rem; color: var(--muted); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 10px;
}
.ticker-track a b { color: var(--accent, var(--cyan)); font-weight: 600; font-size: .78rem; font-family: var(--font-head); letter-spacing: .06em; text-transform: uppercase; }
.ticker-track a:hover { color: var(--text); }

/* ---------- Sections ---------- */
.section { padding: 74px 0; }
.section-tight { padding: 48px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 34px;
}
.section-head h2 { font-size: clamp(1.55rem, 2.6vw, 2.15rem); margin-top: 10px; }
.section-sub { color: var(--muted); max-width: 640px; margin-top: 10px; font-size: 1.02rem; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
html[data-theme="dark"] .section-alt { background: rgba(8, 13, 26, .55); }

/* Cybersecurity: darker treatment */
.section-dark {
  background:
    radial-gradient(760px 420px at 20% 0%, rgba(232, 121, 249, .06), transparent 60%),
    linear-gradient(180deg, rgba(2, 4, 10, .6), rgba(2, 4, 10, .25));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
html[data-theme="light"] .section-dark {
  background: radial-gradient(760px 420px at 20% 0%, rgba(162, 28, 175, .05), transparent 60%), var(--bg-2);
}
/* Future tech: futuristic treatment */
.section-future {
  background:
    radial-gradient(900px 480px at 82% 10%, rgba(168, 85, 247, .09), transparent 62%),
    radial-gradient(620px 380px at 8% 90%, rgba(34, 211, 238, .07), transparent 60%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ---------- Hero ---------- */
.hero-section { padding: 30px 0 66px; }
.hero-grid {
  display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px;
}
.hero-main {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); min-height: 520px;
  display: flex; align-items: flex-end;
  box-shadow: var(--shadow);
  transition: border-color .3s, box-shadow .3s;
}
.hero-main:hover { border-color: var(--border-strong); box-shadow: var(--glow); }
.hero-main .hero-media { position: absolute; inset: 0; }
.hero-main .hero-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.hero-main:hover .hero-media img { transform: scale(1.045); }
.hero-main::after { content: ""; position: absolute; inset: 0; background: var(--img-overlay); }
/* Text lives over the dark image overlay — keep it light in both themes */
.hero-body { position: relative; z-index: 2; padding: 34px 36px; max-width: 660px; color: var(--on-img); }
.hero-body h1 a { color: var(--on-img); }
.hero-body .hero-deck { color: var(--on-img-soft); }
.hero-body h1 {
  font-size: clamp(1.7rem, 3.1vw, 2.6rem); margin: 14px 0 12px; letter-spacing: -.02em;
}
.hero-body h1 a:hover { color: var(--cyan); }
.hero-meta { display: flex; align-items: center; gap: 14px; font-size: .85rem; color: var(--faint); margin-bottom: 20px; flex-wrap: wrap; }
.hero-meta .chip { margin-right: 4px; }
.hero-meta .avatar { width: 30px; height: 30px; font-size: .68rem; }
.hero-side { display: grid; grid-template-rows: repeat(4, 1fr); gap: 14px; }
.hero-mini {
  display: grid; grid-template-columns: 128px 1fr; gap: 16px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; padding: 10px;
  transition: border-color .25s, transform .25s var(--ease), box-shadow .3s;
}
.hero-mini:hover { border-color: var(--border-strong); transform: translateX(4px); box-shadow: var(--shadow); }
.hero-mini img { width: 100%; height: 86px; object-fit: cover; border-radius: 9px; }
.hero-mini-body { padding-right: 6px; min-width: 0; }
.hero-mini-body .chip { font-size: .64rem; padding: 2px 8px; }
.hero-mini-body h3 { font-size: .98rem; margin-top: 8px; line-height: 1.32; }
.hero-mini-body h3 a:hover { color: var(--cyan); }
.hero-mini-body .mini-meta { font-size: .76rem; color: var(--faint); margin-top: 6px; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(34, 211, 238, .25), rgba(168, 85, 247, .25));
  border: 1px solid var(--border-strong);
  font-family: var(--font-head); font-weight: 700; font-size: .72rem; color: var(--cyan);
  letter-spacing: .04em;
}

/* ---------- Article cards ---------- */
.card-grid { display: grid; gap: 20px; }
.card-grid.c-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.c-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.c-4 { grid-template-columns: repeat(4, 1fr); }

.a-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .28s, transform .28s var(--ease), box-shadow .3s;
}
.a-card:hover { border-color: color-mix(in srgb, var(--accent, var(--cyan)) 55%, var(--border)); transform: translateY(-4px); box-shadow: var(--shadow), 0 14px 34px -18px color-mix(in srgb, var(--accent, var(--cyan)) 45%, transparent); }
.a-card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; display: block; background: var(--bg-2); }
.a-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.a-card:hover .a-card-media img { transform: scale(1.05); }
.a-card-media .badge {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-head); font-size: .66rem; font-weight: 700; letter-spacing: .14em;
  padding: 4px 10px; border-radius: 6px; color: #04121a;
  background: linear-gradient(90deg, #22d3ee, #67e8f9);
}
.a-card-media .badge.badge-review { background: linear-gradient(90deg, #fbbf24, #fde68a); }
.a-card-media .badge.badge-guide { background: linear-gradient(90deg, #34d399, #6ee7b7); }
.a-card-media .badge.badge-analysis { background: linear-gradient(90deg, #a855f7, #d8b4fe); }
.a-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.a-card-meta { display: flex; align-items: center; gap: 12px; font-size: .8rem; color: var(--faint); flex-wrap: wrap; }
.a-card-title { font-size: 1.16rem; line-height: 1.32; }
.a-card-title a:hover { color: var(--accent, var(--cyan)); }
.a-card-excerpt { color: var(--muted); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.a-card-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--faint); border-top: 1px solid var(--border); padding-top: 14px; }

/* Compact horizontal card */
.story-row {
  display: grid; grid-template-columns: 148px 1fr; gap: 18px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; padding: 12px;
  transition: border-color .25s, transform .25s var(--ease);
}
.story-row:hover { border-color: color-mix(in srgb, var(--accent, var(--cyan)) 55%, var(--border)); transform: translateY(-2px); }
.story-row img { width: 100%; height: 96px; object-fit: cover; border-radius: 9px; }
.story-row h3 { font-size: 1.04rem; line-height: 1.32; margin-top: 7px; }
.story-row h3 a:hover { color: var(--accent, var(--cyan)); }
.story-row .row-meta { font-size: .78rem; color: var(--faint); margin-top: 7px; }

/* Split layout: feature + list */
.split-2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: stretch; }
.split-2 .feature-card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); display: flex; align-items: flex-end; min-height: 430px; box-shadow: var(--shadow); transition: border-color .3s, box-shadow .3s; }
.split-2 .feature-card:hover { border-color: var(--border-strong); box-shadow: var(--glow); }
.split-2 .feature-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.split-2 .feature-card:hover img { transform: scale(1.04); }
.split-2 .feature-card::after { content: ""; position: absolute; inset: 0; background: var(--img-overlay); }
.feature-body { position: relative; z-index: 2; padding: 30px; color: var(--on-img); }
.feature-body h3 a { color: var(--on-img); }
.feature-body h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); margin: 12px 0 10px; }
.feature-body h3 a:hover { color: var(--accent, var(--cyan)); }
.feature-body p { color: var(--on-img-soft); font-size: .96rem; }
.feature-body .row-meta { margin-top: 14px; color: var(--on-img-faint); font-size: .82rem; }
.stack-list { display: flex; flex-direction: column; gap: 14px; }
.stack-list .story-row { flex: 1; }

/* ---------- Trending ---------- */
.trend-wrap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 44px; }
.trend-item {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center;
  padding: 16px 10px; border-bottom: 1px solid var(--border);
}
.trend-num {
  font-family: var(--font-head); font-size: 2.3rem; font-weight: 700; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--accent, var(--cyan)); opacity: .85;
  min-width: 56px;
}
.trend-item h3 { font-size: 1.06rem; line-height: 1.34; }
.trend-item h3 a:hover { color: var(--accent, var(--cyan)); }
.trend-item .row-meta { font-size: .78rem; color: var(--faint); margin-top: 6px; }

/* ---------- Editor's picks ---------- */
.picks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.picks-band {
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(34, 211, 238, .08), transparent 60%),
    radial-gradient(800px 460px at 85% 100%, rgba(168, 85, 247, .09), transparent 62%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.pick-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); min-height: 380px; display: flex; align-items: flex-end;
  transition: border-color .3s, box-shadow .3s;
}
.pick-card:hover { border-color: var(--border-strong); box-shadow: var(--glow); }
.pick-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.pick-card:hover img { transform: scale(1.05); }
.pick-card::after { content: ""; position: absolute; inset: 0; background: var(--img-overlay); }
.pick-card .feature-body { color: var(--on-img); }
.pick-card .feature-body h3 a { color: var(--on-img); }
.pick-card .feature-body h3 { font-size: 1.3rem; }
.pick-card .feature-body h3 a:hover { color: var(--cyan); }
.pick-card .badge-floating {
  position: absolute; z-index: 2; top: 16px; left: 16px;
  font-family: var(--font-head); font-size: .68rem; font-weight: 700; letter-spacing: .16em;
  color: var(--cyan); background: rgba(4, 12, 24, .72); border: 1px solid rgba(34, 211, 238, .4);
  padding: 6px 12px; border-radius: 999px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* ---------- Review cards ---------- */
.review-card .verdict {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: .88rem; color: var(--muted);
}
.review-card .verdict b { color: var(--amber); font-family: var(--font-head); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; flex-shrink: 0; margin-top: 2px; }

/* ---------- Newsletter ---------- */
.newsletter-band { padding: 70px 0; }
.newsletter-card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 54px 40px; text-align: center;
  box-shadow: var(--shadow);
}
.newsletter-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(120deg, rgba(34, 211, 238, .5), transparent 30%, transparent 70%, rgba(168, 85, 247, .5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.newsletter-card::after {
  content: ""; position: absolute; top: -140px; left: 50%; transform: translateX(-50%);
  width: 560px; height: 280px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(34, 211, 238, .14), transparent);
}
.newsletter-card h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); position: relative; }
.newsletter-card p { color: var(--muted); max-width: 560px; margin: 14px auto 0; position: relative; }
.newsletter-form { display: flex; gap: 12px; max-width: 480px; margin: 28px auto 0; position: relative; }
.newsletter-form input {
  flex: 1; background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 13px 18px; color: var(--text); min-width: 0;
}
.newsletter-form input::placeholder { color: var(--faint); }
.newsletter-form input:focus { outline: 2px solid var(--cyan); outline-offset: 0; border-color: transparent; }
.form-note { display: block; margin-top: 14px; font-size: .88rem; color: var(--emerald); min-height: 1.2em; }

/* ---------- Contributor CTA ---------- */
.contrib-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 36px; margin: 8px 0 74px;
}
.contrib-cta h2 { font-size: 1.35rem; }
.contrib-cta p { color: var(--muted); margin-top: 8px; max-width: 620px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
  padding: 60px 0 30px;
}
html[data-theme="dark"] .site-footer { background: linear-gradient(180deg, rgba(8, 13, 26, .5), #04060d); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid var(--border); }
.footer-brand img { height: 42px; }
.footer-brand p { color: var(--muted); font-size: .93rem; margin: 16px 0 20px; max-width: 320px; }
.social-row { display: flex; gap: 10px; }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); color: var(--muted);
  transition: color .2s, border-color .2s, transform .2s;
}
.social-row a:hover { color: var(--cyan); border-color: var(--cyan); transform: translateY(-2px); }
.footer-col h3 {
  font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
  font-weight: 700; margin-bottom: 18px;
}
.footer-links { display: flex; flex-direction: column; gap: 11px; }
.footer-links a { color: var(--muted); font-size: .93rem; transition: color .2s, padding-left .2s; }
.footer-links a:hover { color: var(--cyan); padding-left: 4px; }
.footer-links a.footer-soft { color: var(--faint); font-size: .87rem; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 26px; color: var(--faint); font-size: .86rem;
}
.footer-bottom .secondary-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom .secondary-links a { color: var(--faint); }
.footer-bottom .secondary-links a:hover { color: var(--muted); }

/* ---------- Search overlay ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  display: flex; justify-content: center; padding: 9vh 24px 40px;
  opacity: 0; pointer-events: none; transition: opacity .28s var(--ease);
}
.search-overlay.open { opacity: 1; pointer-events: auto; }
.search-panel {
  width: min(760px, 100%); height: fit-content; max-height: 82vh; overflow-y: auto;
  background: var(--card-solid); border: 1px solid var(--border-strong); border-radius: 18px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7);
  transform: translateY(14px) scale(.985); transition: transform .3s var(--ease);
}
.search-overlay.open .search-panel { transform: none; }
.search-input-row { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--card); z-index: 2; border-radius: 18px 18px 0 0; }
.search-input-row svg { width: 22px; height: 22px; color: var(--cyan); flex-shrink: 0; }
.search-input-row input { flex: 1; background: none; border: 0; outline: none; font-size: 1.15rem; color: var(--text); min-width: 0; }
.search-input-row input::placeholder { color: var(--faint); }
.search-esc { font-size: .72rem; color: var(--faint); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-family: var(--font-head); }
.search-body { padding: 22px 24px 28px; }
.search-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.search-chips button {
  font-size: .82rem; font-family: var(--font-head); font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px;
  transition: all .2s;
}
.search-chips button:hover { color: var(--cyan); border-color: var(--cyan); }
.search-chips button.active { color: #04121a; background: var(--cyan); border-color: var(--cyan); }
.search-label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin: 18px 0 12px; font-family: var(--font-head); }
.search-popular { display: flex; flex-wrap: wrap; gap: 8px; }
.search-popular button {
  font-size: .86rem; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; transition: all .2s;
}
.search-popular button:hover { color: var(--cyan); border-color: var(--cyan); }
.search-results { display: flex; flex-direction: column; gap: 4px; }
.search-result {
  display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center;
  padding: 10px; border-radius: var(--radius-sm);
}
.search-result:hover { background: var(--surface); }
.search-result img { width: 88px; height: 56px; object-fit: cover; border-radius: 8px; }
.search-result h4 { font-size: .97rem; font-family: var(--font-head); font-weight: 600; }
.search-result:hover h4 { color: var(--cyan); }
.search-result .row-meta { font-size: .78rem; color: var(--faint); margin-top: 4px; }
.search-empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* ---------- AI assistant ---------- */
.fsh-bot { position: fixed; right: 22px; bottom: 22px; z-index: 110; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.bot-toggle {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #0ea5cf, #6366f1 55%, #9333ea);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px -8px rgba(99, 102, 241, .65);
  transition: transform .25s var(--ease), box-shadow .3s;
  position: relative;
}
.bot-toggle:hover { transform: translateY(-3px) scale(1.04); }
.bot-toggle svg { width: 25px; height: 25px; }
.bot-toggle .bot-dot {
  position: absolute; top: 3px; right: 3px; width: 12px; height: 12px; border-radius: 50%;
  background: #34d399; border: 2px solid var(--bg);
}
.bot-panel {
  width: min(380px, calc(100vw - 32px)); height: min(520px, 68vh);
  background: var(--card-solid); border: 1px solid var(--border-strong); border-radius: 18px;
  box-shadow: 0 34px 80px -24px rgba(0, 0, 0, .7);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(.97); pointer-events: none;
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.bot-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.bot-head {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(34, 211, 238, .1), rgba(168, 85, 247, .1));
}
.bot-head .avatar { width: 36px; height: 36px; background: linear-gradient(135deg, #0ea5cf, #9333ea); color: #fff; border: 0; }
.bot-head strong { font-family: var(--font-head); font-size: .98rem; display: block; }
.bot-head span { font-size: .76rem; color: var(--emerald); display: flex; align-items: center; gap: 6px; }
.bot-head span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); }
.bot-close { margin-left: auto; }
.bot-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.bot-msg {
  max-width: 86%; padding: 11px 15px; border-radius: 14px; font-size: .92rem; line-height: 1.5;
}
.bot-msg.bot { background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; align-self: flex-start; }
.bot-msg.user { background: linear-gradient(90deg, rgba(34, 211, 238, .2), rgba(99, 102, 241, .2)); border: 1px solid rgba(34, 211, 238, .3); border-bottom-right-radius: 4px; align-self: flex-end; }
.bot-msg a { color: var(--cyan); font-weight: 600; }
.bot-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.bot-suggest button {
  font-size: .8rem; color: var(--muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px; transition: all .2s;
}
.bot-suggest button:hover { color: var(--cyan); border-color: var(--cyan); }
.bot-form { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); }
.bot-form input {
  flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; color: var(--text); min-width: 0;
}
.bot-form input:focus { outline: 2px solid var(--cyan); outline-offset: 0; border-color: transparent; }

/* ---------- Page hero (secondary pages) ---------- */
.page-hero {
  padding: 84px 0 46px;
  background: radial-gradient(700px 340px at 24% 0%, rgba(34, 211, 238, .08), transparent 62%);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-top: 14px; letter-spacing: -.02em; }
.page-hero .lead { color: var(--muted); font-size: 1.12rem; max-width: 680px; margin-top: 16px; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--faint); flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs .sep { opacity: .5; }

/* ---------- Category landing ---------- */
.cat-hero {
  padding: 64px 0 40px;
  background: radial-gradient(760px 380px at 18% 0%, color-mix(in srgb, var(--accent, var(--cyan)) 9%, transparent), transparent 62%);
  border-bottom: 1px solid var(--border);
}
.cat-hero .cat-icon {
  width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent, var(--cyan)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--cyan)) 38%, transparent);
  color: var(--accent, var(--cyan)); font-size: 1.5rem; margin-bottom: 20px;
}
.cat-hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.cat-hero .lead { color: var(--muted); max-width: 660px; margin-top: 14px; font-size: 1.06rem; }
.cat-hero .cat-stats { display: flex; gap: 26px; margin-top: 22px; color: var(--faint); font-size: .88rem; flex-wrap: wrap; }
.cat-hero .cat-stats b { color: var(--accent, var(--cyan)); font-family: var(--font-head); }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pager button {
  min-width: 42px; height: 42px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--border); color: var(--muted); font-family: var(--font-head); font-weight: 600;
  transition: all .2s;
}
.pager button:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); }
.pager button.active { background: var(--cyan); border-color: var(--cyan); color: #04121a; }
.pager button:disabled { opacity: .35; cursor: default; }

/* ---------- Sidebar cards ---------- */
.side-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; margin-bottom: 20px;
}
.side-card h3 {
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
  margin-bottom: 16px; font-weight: 700;
}
.toc-list { display: flex; flex-direction: column; gap: 4px; border-left: 2px solid var(--border); }
.toc-list a {
  font-size: .9rem; color: var(--muted); padding: 6px 0 6px 16px; margin-left: -2px;
  border-left: 2px solid transparent; transition: all .2s;
}
.toc-list a:hover, .toc-list a.active { color: var(--cyan); border-left-color: var(--cyan); }
.side-list { display: flex; flex-direction: column; gap: 14px; }
.side-item { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; }
.side-item img { width: 72px; height: 50px; object-fit: cover; border-radius: 8px; }
.side-item h4 { font-size: .9rem; font-weight: 600; font-family: var(--font-body); line-height: 1.35; }
.side-item a:hover h4 { color: var(--cyan); }
.side-item .row-meta { font-size: .74rem; color: var(--faint); margin-top: 4px; }

/* ---------- Article page ---------- */
.article-wrap { padding: 44px 0 70px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; }
.article-main { min-width: 0; max-width: 800px; }
.article-top .breadcrumbs { margin-bottom: 24px; }
.article-title { font-size: clamp(1.9rem, 3.6vw, 2.75rem); letter-spacing: -.02em; margin: 16px 0 0; }
.article-deck { color: var(--muted); font-size: 1.18rem; line-height: 1.6; margin-top: 18px; max-width: 760px; }
.article-byline {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 26px 0; padding: 16px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  font-size: .9rem; color: var(--muted);
}
.article-byline .who { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.article-byline .dot-sep { color: var(--faint); }
.article-figure { margin: 30px 0; }
.article-figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.article-figure figcaption { font-size: .84rem; color: var(--faint); margin-top: 10px; text-align: center; }
.article-body { font-size: 1.07rem; line-height: 1.75; color: var(--text); }
.article-body > * + * { margin-top: 22px; }
.article-body h2 { font-size: 1.55rem; margin-top: 44px; scroll-margin-top: 90px; }
.article-body h3 { font-size: 1.2rem; margin-top: 32px; scroll-margin-top: 90px; }
.article-body h2::before {
  content: ""; display: block; width: 44px; height: 3px; border-radius: 3px;
  background: var(--grad); margin-bottom: 14px; opacity: .8;
}
.article-body a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { padding-left: 24px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.article-body li::marker { color: var(--cyan); }
.article-body strong { color: var(--text); }
.article-body blockquote {
  margin: 30px 0; padding: 22px 28px; border-left: 3px solid var(--cyan);
  background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-head); font-size: 1.12rem; line-height: 1.55; color: var(--text);
}
.article-body pre {
  background: #060a16; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 20px 22px; overflow-x: auto; font-size: .88rem; line-height: 1.6;
  color: #c9d6f2;
}
html[data-theme="light"] .article-body pre { background: #0d1526; }
.article-body code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.article-body :not(pre) > code {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 6px; font-size: .86em; color: var(--cyan);
}
.article-body table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.article-body th, .article-body td { text-align: left; padding: 12px 16px; border: 1px solid var(--border); }
.article-body th { font-family: var(--font-head); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.article-body td { color: var(--muted); }
.article-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 38px; }
.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; margin-top: 44px;
}
.author-box .avatar { width: 52px; height: 52px; font-size: 1rem; }
.author-box h3 { font-size: 1.05rem; margin-bottom: 6px; }
.author-box p { color: var(--muted); font-size: .93rem; }
.article-side { position: sticky; top: 92px; align-self: start; }
.comment-box { margin-top: 48px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.comment-box h3 { font-size: 1.1rem; margin-bottom: 6px; }
.comment-box > p { color: var(--muted); font-size: .92rem; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 18px; }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-size: .88rem; font-weight: 600; font-family: var(--font-head); }
.form-control {
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 12px 16px; color: var(--text); width: 100%;
}
.form-control::placeholder { color: var(--faint); }
.form-control:focus { outline: 2px solid var(--cyan); outline-offset: 0; border-color: transparent; }
textarea.form-control { min-height: 150px; resize: vertical; }
.form-status { font-size: .9rem; color: var(--emerald); min-height: 1.2em; }
.form-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-inline input {
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 10px 14px; color: var(--text); min-width: 200px;
}
.form-inline input:focus { outline: 2px solid var(--cyan); outline-offset: 0; border-color: transparent; }
.form-inline .form-note { width: 100%; margin-top: 4px; }

/* ---------- Glass / utility cards ---------- */
.glass-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px;
}
.glass-card h2 { font-size: 1.4rem; margin: 12px 0 14px; }
.glass-card p { color: var(--muted); }
.cta-list { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; padding: 0; list-style: none; }
.cta-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: .95rem; }
.cta-list li::before {
  content: "◆"; color: var(--cyan); font-size: .7rem; margin-top: 6px; flex-shrink: 0;
}
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---------- Reading progress ---------- */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad); z-index: 130; transition: width .1s linear;
}

/* ---------- Empty states ---------- */
.no-results { color: var(--muted); padding: 40px 0; text-align: center; grid-column: 1 / -1; }
.noscript-note { text-align: center; padding: 30px; color: var(--muted); }


/* ---------- Fact-check + pillar ---------- */
.factcheck { color: var(--faint); }
.pillar-box {
  display: flex; gap: 14px; align-items: flex-start;
  background: color-mix(in srgb, var(--accent, var(--cyan)) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--cyan)) 30%, transparent);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 26px 0 0;
}
.pillar-box .kicker { flex-shrink: 0; }
.pillar-box a { color: var(--accent, var(--cyan)); font-weight: 600; font-family: var(--font-head); }
.pillar-box p { color: var(--muted); font-size: .9rem; margin-top: 4px; }

/* ---------- Admin dashboard ---------- */
.dash-wrap { padding: 40px 0 70px; }
.dash-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 26px 0 40px; }
.dash-stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.dash-stat b { display: block; font-family: var(--font-head); font-size: 2rem; line-height: 1.1; }
.dash-stat span { color: var(--muted); font-size: .85rem; }
.dash-section { margin-bottom: 44px; }
.dash-section h2 { font-size: 1.3rem; margin: 10px 0 18px; }
.inv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.inv-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.inv-card .inv-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.inv-card .inv-head a { font-family: var(--font-head); font-weight: 600; }
.inv-card .inv-head a:hover { color: var(--accent, var(--cyan)); }
.inv-bar { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.inv-bar i { display: block; height: 100%; border-radius: 6px; background: var(--grad); }
.inv-meta { display: flex; justify-content: space-between; font-size: .78rem; color: var(--faint); margin-top: 8px; }
.dash-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.dash-table th { text-align: left; padding: 10px 12px; font-family: var(--font-head); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--border-strong); }
.dash-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); color: var(--muted); }
.dash-table tr:hover td { background: var(--surface); cursor: pointer; }
.dash-table .t-title { color: var(--text); font-weight: 600; max-width: 360px; }
.pill { display: inline-block; font-size: .7rem; font-family: var(--font-head); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; }
.pill.published { color: var(--emerald); background: color-mix(in srgb, var(--emerald) 12%, transparent); border: 1px solid color-mix(in srgb, var(--emerald) 35%, transparent); }
.pill.draft { color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.pill.review { color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); border: 1px solid color-mix(in srgb, var(--blue) 35%, transparent); }
.pill.scheduled { color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); border: 1px solid color-mix(in srgb, var(--violet) 35%, transparent); }
.pill.archived { color: var(--faint); background: var(--surface); border: 1px solid var(--border); }
.pill.pass { color: var(--emerald); } .pill.fail { color: var(--rose); }
.dash-detail { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin-top: 30px; }
.check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin-top: 14px; }
.check-list li { list-style: none; display: flex; gap: 10px; align-items: baseline; font-size: .9rem; color: var(--muted); }
.check-list .ok { color: var(--emerald); font-weight: 700; }
.check-list .no { color: var(--rose); font-weight: 700; }
.not-ready { background: color-mix(in srgb, var(--rose) 10%, transparent); border: 1px solid color-mix(in srgb, var(--rose) 40%, transparent); color: var(--rose); font-family: var(--font-head); font-weight: 700; padding: 12px 16px; border-radius: var(--radius-sm); margin-top: 18px; }
.ready-note { background: color-mix(in srgb, var(--emerald) 10%, transparent); border: 1px solid color-mix(in srgb, var(--emerald) 40%, transparent); color: var(--emerald); font-family: var(--font-head); font-weight: 700; padding: 12px 16px; border-radius: var(--radius-sm); margin-top: 18px; }
.dup-warn { background: var(--card); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; font-size: .9rem; color: var(--muted); }
.dash-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.dash-filters button { font-size: .8rem; font-family: var(--font-head); font-weight: 600; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 5px 13px; }
.dash-filters button.active { color: #04121a; background: var(--cyan); border-color: var(--cyan); }
@media (max-width: 900px) { .inv-grid { grid-template-columns: 1fr 1fr; } .dash-stats { grid-template-columns: repeat(2, 1fr); } .check-list { grid-template-columns: 1fr; } }


/* ---------- Advanced AI Assistant ---------- */
.fsh-bot { position: fixed; right: 20px; bottom: 20px; z-index: 1100; }
.bot-toggle {
  width: 54px; height: 54px; border-radius: 16px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #0ea5cf, #6366f1 55%, #9333ea);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 30px -6px rgba(99, 102, 241, .5), 0 0 0 0 rgba(99, 102, 241, .3);
  transition: transform .2s, box-shadow .3s;
}
.bot-toggle:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 12px 36px -6px rgba(99, 102, 241, .6); }
.bot-toggle svg { width: 24px; height: 24px; }
.bot-panel {
  position: fixed; right: 20px; bottom: 84px; width: 400px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 120px);
  background: var(--card); border: 1px solid var(--border-strong); border-radius: 18px;
  box-shadow: 0 24px 70px -14px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(.97); pointer-events: none;
  transition: opacity .3s cubic-bezier(.22,.8,.3,1), transform .3s cubic-bezier(.22,.8,.3,1);
  z-index: 1100;
}
.bot-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.bot-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: linear-gradient(135deg, rgba(34, 211, 238, .08), rgba(168, 85, 247, .08));
  border-bottom: 1px solid var(--border);
}
.bot-head .bot-avatar {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, #0ea5cf, #6366f1 55%, #9333ea); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: .85rem;
  position: relative;
}
.bot-head .bot-avatar::after {
  content: ""; position: absolute; bottom: 2px; right: 2px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--emerald); border: 2px solid var(--card);
}
.bot-head .bot-info { flex: 1; }
.bot-head .bot-info b { font-family: var(--font-head); font-size: .92rem; display: block; }
.bot-head .bot-info span { font-size: .74rem; color: var(--emerald); }
.bot-head .bot-close {
  width: 30px; height: 30px; border-radius: 8px; border: none; background: none;
  color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 1.1rem;
}
.bot-head .bot-close:hover { color: var(--text); background: var(--surface); }
.bot-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bot-msg {
  max-width: 88%; padding: 11px 15px; border-radius: 16px; font-size: .88rem; line-height: 1.55;
}
.bot-msg.bot {
  background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.bot-msg.bot a { color: var(--cyan); font-weight: 600; }
.bot-msg.bot b { color: var(--text); }
.bot-msg.user {
  background: linear-gradient(135deg, rgba(34, 211, 238, .12), rgba(99, 102, 241, .12));
  border: 1px solid rgba(34, 211, 238, .2); border-bottom-right-radius: 4px;
  align-self: flex-end; color: var(--text);
}
.bot-card {
  display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border); cursor: pointer;
  transition: border-color .2s, transform .15s; text-decoration: none; max-width: 100%;
}
.bot-card:hover { border-color: var(--cyan); transform: translateX(3px); }
.bot-card img { width: 60px; height: 40px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.bot-card .bc-body { min-width: 0; }
.bot-card .bc-body b { font-size: .82rem; display: block; line-height: 1.3; color: var(--text); }
.bot-card .bc-body span { font-size: .72rem; color: var(--faint); }
.bot-card .bc-body .bc-link { font-size: .74rem; color: var(--cyan); font-weight: 600; }
.bot-suggest { padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.bot-suggest button {
  font-size: .78rem; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); cursor: pointer; transition: all .2s;
}
.bot-suggest button:hover { color: var(--cyan); border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 8%, transparent); }
.bot-input-row { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.bot-input-row input {
  flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; color: var(--text); font-size: .88rem; outline: none;
}
.bot-input-row input:focus { border-color: var(--cyan); }
.bot-input-row button {
  width: 40px; height: 40px; border-radius: 12px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #0ea5cf, #6366f1); color: #fff;
  display: grid; place-items: center; font-size: 1rem;
}
.typing-indicator { display: flex; gap: 4px; padding: 12px 16px; align-self: flex-start; }
.typing-indicator span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--faint);
  animation: typing-bounce 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: .15s; }
.typing-indicator span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-5px); opacity: 1; }
}
@media (max-width: 480px) {
  .bot-panel { width: calc(100vw - 24px); right: 12px; bottom: 78px; height: calc(100vh - 140px); }
  .fsh-bot { right: 12px; bottom: 12px; }
}

/* ============================================================
   Crypto market board — /crypto landing + homepage widget.
   Uses the existing design tokens only (cards, borders, accents);
   up/down colors reuse the theme's emerald/rose.
   ============================================================ */
[data-accent="crypto"] { --accent: var(--amber); }

.coin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 14px; margin: 6px 0 22px;
}
.coin-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 16px 13px; position: relative; overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s;
}
.coin-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent, var(--cyan)) 45%, var(--border)); }
.coin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.coin-sym {
  font-family: var(--font-head); font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  color: var(--accent, var(--cyan));
  background: color-mix(in srgb, var(--accent, var(--cyan)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--cyan)) 34%, transparent);
  padding: 3px 9px; border-radius: 999px;
}
.coin-rank { font-size: .72rem; color: var(--faint); }
.coin-name {
  font-family: var(--font-head); font-size: .95rem; font-weight: 600;
  margin: 0 0 6px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.coin-price { font-family: var(--font-head); font-size: 1.42rem; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.coin-chg { font-family: var(--font-head); font-size: .88rem; font-weight: 700; margin: 3px 0 10px; }
.coin-chg span { font-weight: 400; color: var(--faint); font-size: .72rem; margin-left: 3px; }
.chg-up { color: var(--emerald, #34d399); }
.chg-down { color: var(--rose, #fb7185); }
.coin-stats {
  display: flex; gap: 10px; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding-top: 9px;
  font-size: .74rem; color: var(--muted);
}
.coin-updated { margin-top: 7px; font-size: .68rem; color: var(--faint); }

.movers-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.mover-list { list-style: none; margin: 0; padding: 0; }
.mover-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: .84rem;
}
.mover-list li:last-child { border-bottom: 0; }
.mover-sym {
  font-family: var(--font-head); font-size: .7rem; font-weight: 700; color: var(--accent, var(--cyan));
  min-width: 44px;
}
.mover-name { flex: 1; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mover-chg { font-family: var(--font-head); font-weight: 700; font-size: .82rem; }
.crypto-updated { font-size: .8rem; }
.crypto-disclaimer { font-size: .74rem; margin-top: 14px; }
.crypto-unavailable { max-width: 720px; }
.crypto-widget-note { font-size: .72rem; color: var(--faint); margin-top: 10px; }


/* Live market UX — indicator, stale state, unavailable cards, change flashes */
.live-indicator { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--emerald, #34d399); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: live-pulse 2s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); }
  50% { opacity: .55; box-shadow: 0 0 0 4px transparent; } }
.crypto-updated.is-stale .live-indicator { color: var(--amber, #fbbf24); }
.crypto-updated.is-stale .live-dot { animation: none; }
.coin-card.coin-unavailable { opacity: .68; }
.coin-card.coin-unavailable .coin-price { font-size: 1rem; color: var(--muted); }
.coin-card.coin-unavailable .coin-sym { color: var(--muted); border-color: var(--border); background: transparent; }
.side-card.is-hidden { display: none; }
.crypto-source { font-size: .76rem; margin-top: 10px; }
@keyframes flash-up { 0% { background: color-mix(in srgb, var(--emerald, #34d399) 22%, transparent); } 100% { background: transparent; } }
@keyframes flash-down { 0% { background: color-mix(in srgb, var(--rose, #fb7185) 22%, transparent); } 100% { background: transparent; } }
.flash-up { animation: flash-up .9s ease-out; border-radius: 6px; }
.flash-down { animation: flash-down .9s ease-out; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  .flash-up, .flash-down { animation: none; }
}

@media (max-width: 720px) {
  .coin-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .movers-row { grid-template-columns: 1fr; }
  .coin-price { font-size: 1.2rem; }
}
@media (max-width: 380px) {
  .coin-grid { grid-template-columns: 1fr; }
}

/* Cards for articles without a featured image (e.g. daily market updates
   before an editor attaches artwork) — accent gradient placeholder. */
.a-card-media.no-img {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent, var(--cyan)) 26%, transparent), transparent 65%), var(--surface, rgba(148,163,184,.06));
  min-height: 120px;
}
