/* ═══════════════════════════════════════════════════════════════
   SUNAGRO TECHINFO — site.css  (design system v5)
   One stylesheet for every page: home, category, article, info, 404.
   Light/dark via CSS custom properties + [data-theme="dark"].
   ═══════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --font-ui:      'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

  --bg:        #f7f8fa;
  --surface:   #ffffff;
  --surface-2: #eef1f5;
  --border:    #e3e7ee;
  --border-2:  #d2d8e2;
  --text:      #101828;
  --text-2:    #384252;
  --muted:     #66707f;
  --muted-2:   #98a1b0;

  --accent:      #0d9488;
  --accent-ink:  #0f766e;
  --accent-soft: rgba(13, 148, 136, .1);
  --gold:        #d97706;

  --tech:  #0284c7;
  --biz:   #059669;
  --ent:   #7c3aed;
  --life:  #e11d48;
  --soc:   #d97706;
  --sport: #dc2626;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;

  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-2: 0 8px 24px rgba(16, 24, 40, .1);

  --nav-h: 62px;
  --ease:   cubic-bezier(.22, .61, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --max-w: 1200px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg:        #0d1117;
  --surface:   #151b24;
  --surface-2: #1d2530;
  --border:    #242e3c;
  --border-2:  #334052;
  --text:      #eef2f7;
  --text-2:    #c4cdd9;
  --muted:     #8b96a6;
  --muted-2:   #616d80;

  --accent:      #2dd4bf;
  --accent-ink:  #5eead4;
  --accent-soft: rgba(45, 212, 191, .12);
  --gold:        #fbbf24;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background .25s, color .25s;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
time { color: inherit; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 18px;
  border-radius: 0 0 var(--r-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

::selection { background: var(--accent-soft); color: var(--accent-ink); }

/* ── Reveal on scroll ───────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.no-observer .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Ticker ─────────────────────────────────────────────────── */
.ticker {
  display: flex; align-items: stretch; overflow: hidden;
  background: var(--text); color: #fff; font-size: .78rem;
}
[data-theme="dark"] .ticker { background: #050810; }
.ticker-label {
  display: flex; align-items: center; gap: 6px;
  background: var(--accent); color: #06302b;
  font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 14px; flex-shrink: 0; z-index: 1;
}
.ticker-viewport { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-track {
  display: flex; gap: 44px; white-space: nowrap; padding-left: 20px;
  animation: ticker 60s linear infinite; will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track a { color: rgba(255, 255, 255, .85); position: relative; transition: color .2s; }
.ticker-track a:hover { color: #fff; text-decoration: underline; }
.ticker-track a + a::before { content: '◆'; position: absolute; left: -27px; color: var(--accent); font-size: .55em; top: .5em; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ── Header / nav ───────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s;
}
.site-header.scrolled { box-shadow: var(--shadow-1); }
.header-inner { display: flex; align-items: center; gap: 22px; height: var(--nav-h); }

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 34px; width: auto; }
.brand-logo-dark { display: none; }
[data-theme="dark"] .brand-logo-light { display: none; }
[data-theme="dark"] .brand-logo-dark { display: block; }

.main-nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  padding: 8px 13px; border-radius: 999px;
  font-size: .86rem; font-weight: 600; color: var(--text-2);
  white-space: nowrap; transition: color .2s, background .2s;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

#themeToggle .icon-sun { display: none; }
[data-theme="dark"] #themeToggle .icon-sun { display: block; }
[data-theme="dark"] #themeToggle .icon-moon { display: none; }

.menu-btn { display: none; flex-direction: column; gap: 5px; }
.menu-btn span { width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column;
  border-top: 1px solid var(--border);
  background: var(--surface); padding: 8px 14px 14px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 11px 12px; border-radius: var(--r-sm); font-weight: 600; font-size: .95rem; color: var(--text-2); }
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }

/* ── Search overlay ─────────────────────────────────────────── */
/* [hidden] must always win, even over rules that set display */
[hidden] { display: none !important; }
.search-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(9, 12, 18, .55); backdrop-filter: blur(4px);
  display: flex; justify-content: center; align-items: flex-start;
  padding: 9vh 18px 18px;
}
.search-panel {
  width: 100%; max-width: 620px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden;
  animation: pop .22s var(--spring);
}
@keyframes pop { from { opacity: 0; transform: translateY(-12px) scale(.98); } }
.search-bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.search-bar svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.search-bar input { flex: 1; border: none; background: none; font: inherit; font-size: 1.02rem; color: var(--text); outline: none; }
.search-bar input::placeholder { color: var(--muted-2); }
.search-results { max-height: 55vh; overflow-y: auto; padding: 6px; }
.search-results a {
  display: block; padding: 11px 12px; border-radius: var(--r-sm);
  transition: background .15s;
}
.search-results a:hover, .search-results a.active { background: var(--surface-2); }
.search-results .sr-title { font-weight: 600; font-size: .92rem; color: var(--text); display: block; }
.search-results .sr-meta { font-size: .76rem; color: var(--muted); }
.search-results .sr-empty { padding: 22px; text-align: center; color: var(--muted); font-size: .9rem; }

/* ── Chips & meta ───────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px; width: fit-content;
  background: var(--accent-soft); color: var(--accent-ink);
  transition: filter .2s;
}
.chip:hover { filter: brightness(1.1); }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip[data-cat="technology"]    { color: var(--tech);  background: color-mix(in srgb, var(--tech) 12%, transparent); }
.chip[data-cat="business"]      { color: var(--biz);   background: color-mix(in srgb, var(--biz) 12%, transparent); }
.chip[data-cat="entertainment"] { color: var(--ent);   background: color-mix(in srgb, var(--ent) 12%, transparent); }
.chip[data-cat="lifestyle"]     { color: var(--life);  background: color-mix(in srgb, var(--life) 12%, transparent); }
.chip[data-cat="society"]       { color: var(--soc);   background: color-mix(in srgb, var(--soc) 12%, transparent); }
.chip[data-cat="sports"]        { color: var(--sport); background: color-mix(in srgb, var(--sport) 12%, transparent); }
[data-theme="dark"] .chip[data-cat] { filter: brightness(1.5) saturate(.85); }

.card-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  font-size: .78rem; color: var(--muted); margin-top: auto; padding-top: 10px;
}
.card-meta .byline { font-weight: 600; color: var(--text-2); }
.read-time { background: var(--surface-2); padding: 2px 9px; border-radius: 999px; font-size: .72rem; }

/* ── Media & placeholders ───────────────────────────────────── */
.card-media, .hero-media, .hero-sm-media, .feature-media, .related-media,
.trend-thumb, .mini-thumb { display: block; overflow: hidden; background: var(--surface-2); }

.card-media img, .hero-media img, .hero-sm-media img, .feature-media img,
.related-media img, .trend-thumb img, .mini-thumb img, .ph-img {
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9;
  transition: transform .55s var(--ease);
}
.trend-thumb img, .mini-thumb img { aspect-ratio: auto; }

.ph-img {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--ph, #0d9488) 82%, #000), var(--ph, #0d9488));
  font-size: 2rem;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  display: flex; height: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1);
  transition: transform .3s var(--spring), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-2); }
.card:hover .card-media img { transform: scale(1.05); }
.card-media { width: 250px; flex-shrink: 0; }
.card-media img, .card-media .ph-img { height: 100%; }
.card-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.card-title { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; line-height: 1.32; }
.card-title a:hover { color: var(--accent-ink); }
.card-excerpt {
  font-size: .86rem; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-list { display: flex; flex-direction: column; gap: 16px; }
.card-list > .filterable { display: contents; }

/* ── Section heads ──────────────────────────────────────────── */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  margin: 40px 0 20px;
}
.section-head h2, .section-title {
  font-family: var(--font-display); font-size: 1.45rem; font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.sh-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--dot, var(--accent)); flex-shrink: 0; }
.see-all { font-size: .84rem; font-weight: 700; color: var(--accent-ink); white-space: nowrap; }
.see-all:hover { text-decoration: underline; }

/* ── Hero (homepage) ────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1fr 320px 300px; gap: 18px;
  padding-top: 26px;
}
.hero-lead {
  grid-row: span 2; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1);
  transition: box-shadow .3s;
}
.hero-lead:hover { box-shadow: var(--shadow-2); }
.hero-lead:hover .hero-media img { transform: scale(1.03); }
.hero-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.hero-title { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; line-height: 1.22; }
.hero-title a:hover { color: var(--accent-ink); }
.hero-excerpt { color: var(--muted); font-size: .93rem; }

.hero-side { display: flex; flex-direction: column; gap: 18px; grid-row: span 2; }
.hero-sm {
  flex: 1; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1);
  transition: box-shadow .3s;
}
.hero-sm:hover { box-shadow: var(--shadow-2); }
.hero-sm:hover .hero-sm-media img { transform: scale(1.04); }
.hero-sm-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; }
.hero-sm-body h2 { font-family: var(--font-display); font-size: .98rem; font-weight: 700; line-height: 1.3; }
.hero-sm-body h2 a:hover { color: var(--accent-ink); }
.hero-sm-body time { font-size: .74rem; color: var(--muted); }

.hero-trending {
  grid-row: span 2;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-1);
  align-self: start;
}

/* ── Trend / update / category lists (sidebar) ──────────────── */
.side-title {
  font-family: var(--font-display); font-size: 1rem; font-weight: 800;
  padding-bottom: 11px; margin-bottom: 6px; border-bottom: 2px solid var(--border);
}
.trend-list { counter-reset: trend; }
.trend-list li + li { border-top: 1px solid var(--border); }
.trend-list a { display: flex; gap: 11px; padding: 11px 4px; align-items: flex-start; border-radius: var(--r-sm); transition: background .15s; }
.trend-list a:hover { background: var(--surface-2); }
.trend-list li::before { display: none; }
.trend-list a::before {
  counter-increment: trend; content: counter(trend);
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  color: var(--muted-2); width: 18px; flex-shrink: 0; line-height: 1.2;
}
.trend-list li:first-child a::before { color: var(--gold); }
.trend-thumb { width: 64px; height: 48px; border-radius: 7px; flex-shrink: 0; }
.trend-thumb img, .trend-thumb .ph-img { width: 100%; height: 100%; font-size: 1.1rem; }
.trend-info { min-width: 0; }
.trend-info strong { display: block; font-size: .8rem; font-weight: 600; line-height: 1.35; }
.trend-info time { font-size: .7rem; color: var(--muted); }
.trend-list a:hover strong { color: var(--accent-ink); }

.update-list li + li { border-top: 1px dashed var(--border); }
.update-list a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 4px; font-size: .82rem; line-height: 1.4; border-radius: var(--r-sm); transition: background .15s; }
.update-list a:hover { background: var(--surface-2); color: var(--accent-ink); }
.update-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--accent)); flex-shrink: 0; margin-top: 6px; }

.cat-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 6px; font-size: .86rem; font-weight: 500; color: var(--text-2);
  border-radius: var(--r-sm); transition: background .15s, color .15s;
}
.cat-list a:hover { background: var(--surface-2); color: var(--text); }
.cat-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--accent)); flex-shrink: 0; }
.cat-count { margin-left: auto; font-size: .72rem; color: var(--muted); background: var(--surface-2); padding: 1px 9px; border-radius: 999px; }

.sidebar { display: flex; flex-direction: column; gap: 20px; }
.side-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-1);
}
@media (min-width: 901px) {
  .sidebar { position: sticky; top: calc(var(--nav-h) + 18px); align-self: start; max-height: calc(100vh - var(--nav-h) - 36px); overflow-y: auto; scrollbar-width: thin; }
}

/* ── Category tiles (homepage + 404) ────────────────────────── */
.cat-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cat-tile {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--tile, var(--accent));
  border-radius: var(--r-md); padding: 16px 15px;
  box-shadow: var(--shadow-1);
  transition: transform .3s var(--spring), box-shadow .3s;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.cat-tile-icon { font-size: 1.4rem; }
.cat-tile-label { font-weight: 700; font-size: .92rem; }
.cat-tile-desc {
  font-size: .74rem; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Homepage layout ────────────────────────────────────────── */
.home-main { display: grid; grid-template-columns: 1fr 310px; gap: 30px; align-items: start; }
.home-cat-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; }
.home-cat-grid .card { flex-direction: column; }
.home-cat-grid .card .card-media { width: 100%; }
.home-cat-links { display: flex; flex-direction: column; gap: 10px; }
.mini-item {
  display: flex; gap: 12px; align-items: center; flex: 1;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 10px 12px;
  transition: border-color .2s, background .2s;
}
.mini-item:hover { border-color: var(--border-2); background: var(--surface-2); }
.mini-thumb { width: 84px; height: 58px; border-radius: 8px; flex-shrink: 0; }
.mini-thumb img, .mini-thumb .ph-img { width: 100%; height: 100%; font-size: 1.2rem; }
.mini-info { min-width: 0; }
.mini-info strong { display: block; font-size: .82rem; font-weight: 600; line-height: 1.35; }
.mini-item:hover .mini-info strong { color: var(--accent-ink); }
.mini-info time { font-size: .7rem; color: var(--muted); }

/* ── Page head, breadcrumb, filters ─────────────────────────── */
.page-head { padding: 30px 20px 6px; }
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: .78rem; color: var(--muted); margin-bottom: 14px;
}
.breadcrumb a:hover { color: var(--accent-ink); text-decoration: underline; }
.breadcrumb span[aria-current] {
  color: var(--text-2); font-weight: 500;
  max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.page-title { font-family: var(--font-display); font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 800; line-height: 1.15; }
.page-desc { color: var(--muted); margin-top: 8px; max-width: 68ch; }

.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 4px; }
.filter-btn {
  font-size: .8rem; font-weight: 600; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 16px; border-radius: 999px;
  transition: background .2s, color .2s, border-color .2s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #06302b; }
.filter-empty { color: var(--muted); padding: 30px 0; text-align: center; }

/* ── Category page layout ───────────────────────────────────── */
.cat-layout, .article-layout, .info-layout {
  display: grid; grid-template-columns: 1fr 310px; gap: 30px;
  padding-top: 22px; padding-bottom: 50px; align-items: start;
}

.feature-card {
  display: grid; grid-template-columns: 1.15fr 1fr;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1);
  margin-bottom: 22px; transition: box-shadow .3s;
}
.feature-card:hover { box-shadow: var(--shadow-2); }
.feature-card:hover .feature-media img { transform: scale(1.03); }
.feature-media img, .feature-media .ph-img { height: 100%; }
.feature-body { padding: 24px 26px; display: flex; flex-direction: column; gap: 10px; }
.feature-tag {
  width: fit-content; font-size: .66rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: #7c2d12; background: color-mix(in srgb, var(--gold) 22%, transparent);
  padding: 4px 11px; border-radius: 999px;
}
[data-theme="dark"] .feature-tag { color: var(--gold); }
.feature-title { font-family: var(--font-display); font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 800; line-height: 1.25; }
.feature-title a:hover { color: var(--accent-ink); }

/* ── Article page ───────────────────────────────────────────── */
.article-main { min-width: 0; }
.article-header { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.article-title { font-family: var(--font-display); font-size: clamp(1.65rem, 3.4vw, 2.35rem); font-weight: 800; line-height: 1.18; }
.article-standfirst { font-size: 1.06rem; color: var(--text-2); line-height: 1.6; max-width: 70ch; }

.article-byline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-ink));
  color: #fff; font-weight: 800; font-size: .82rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.byline-text { display: flex; flex-direction: column; font-size: .84rem; }
.byline-text strong { font-weight: 700; }
.byline-text span { color: var(--muted); font-size: .78rem; }

.copy-link {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  font-size: .78rem; font-weight: 600; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 15px;
  transition: border-color .2s, color .2s, background .2s;
}
.copy-link:hover { border-color: var(--accent); color: var(--accent-ink); }
.copy-link.copied { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.copy-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.article-hero { border-radius: var(--r-lg); overflow: hidden; margin-bottom: 26px; box-shadow: var(--shadow-1); }
.article-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.article-body { font-size: 1.02rem; line-height: 1.75; color: var(--text-2); max-width: 72ch; }
.article-body p { margin-bottom: 1.15em; }
.article-body h2 {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--text);
  margin: 1.6em 0 .6em; line-height: 1.3;
}
.article-body h3 { font-size: 1.08rem; font-weight: 700; color: var(--text); margin: 1.4em 0 .5em; }
.article-body ul { margin: 0 0 1.15em; padding-left: 4px; }
.article-body li { position: relative; padding-left: 22px; margin-bottom: .5em; }
.article-body li::before {
  content: ''; position: absolute; left: 3px; top: .58em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--accent);
}
.article-body blockquote {
  border-left: 4px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 16px 20px; margin: 1.4em 0; font-style: italic; color: var(--text);
}
.article-body blockquote p { margin: 0; }
.article-body blockquote cite { display: block; margin-top: 8px; font-size: .82rem; font-style: normal; color: var(--muted); }
.article-body a { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; }
.tag-pill {
  font-size: .74rem; font-weight: 600; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 5px 13px; border-radius: 999px;
}

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 34px; }
.pn {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 15px 18px;
  transition: border-color .2s, box-shadow .2s;
}
.pn:hover { border-color: var(--accent); box-shadow: var(--shadow-1); }
.pn.next { text-align: right; }
.pn span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.pn strong { font-size: .87rem; font-weight: 600; line-height: 1.35; }
.pn:hover strong { color: var(--accent-ink); }

.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 18px; }
.related-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-1);
  transition: transform .3s var(--spring), box-shadow .3s;
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.related-card:hover .related-media img { transform: scale(1.05); }
.related-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 5px; }
.related-cat { font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-ink); }
.related-body strong { font-size: .88rem; font-weight: 700; line-height: 1.35; }
.related-card:hover .related-body strong { color: var(--accent-ink); }
.related-body time { font-size: .72rem; color: var(--muted); }

/* ── Info pages ─────────────────────────────────────────────── */
.info-main { min-width: 0; }
.info-layout .page-head { padding: 6px 0 18px; }
.info-icon { margin-right: 10px; }

/* ── 404 ────────────────────────────────────────────────────── */
.nf-wrap { text-align: center; padding: 60px 20px 70px; }
.nf-code {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(5rem, 14vw, 8.5rem); line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nf-wrap .page-desc { margin: 10px auto 26px; }
.nf-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .88rem; font-weight: 700; padding: 11px 26px; border-radius: 999px;
  transition: transform .2s var(--spring), box-shadow .2s, background .2s;
}
.btn-primary { background: var(--accent); color: #06302b; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn-secondary { border: 2px solid var(--accent); color: var(--accent-ink); }
.btn-secondary:hover { background: var(--accent-soft); }
.nf-tiles { max-width: 900px; margin: 0 auto; grid-template-columns: repeat(3, 1fr); text-align: left; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer { background: #0b1020; color: #cbd5e1; margin-top: 56px; }
[data-theme="dark"] .site-footer { background: #060a14; border-top: 1px solid var(--border); }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.5fr; gap: 34px;
  padding-top: 44px; padding-bottom: 36px;
}
.footer-brand img { height: 32px; width: auto; margin-bottom: 14px; }
.footer-brand p { font-size: .84rem; line-height: 1.6; color: #94a3b8; max-width: 30ch; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  font-size: .76rem; font-weight: 700; color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 6px 14px;
  transition: background .2s, border-color .2s;
}
.footer-social a:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .4); }
.footer-col h4 {
  font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #7dd3c8; margin-bottom: 14px;
}
.footer-col a { display: block; font-size: .84rem; color: #94a3b8; padding: 4px 0; transition: color .2s, padding-left .2s; }
.footer-col a:hover { color: #fff; padding-left: 4px; }
.footer-post { display: flex; flex-direction: column; gap: 2px; padding: 7px 0 !important; }
.footer-post + .footer-post { border-top: 1px solid rgba(255, 255, 255, .07); }
.fp-title { font-size: .82rem; color: #cbd5e1; line-height: 1.4; }
.footer-post:hover .fp-title { color: #fff; }
.footer-post time { font-size: .7rem; color: #64748b; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding-top: 18px; padding-bottom: 22px; font-size: .78rem; color: #64748b;
}
.footer-bottom nav { display: flex; gap: 18px; }
.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: #fff; }

/* ── Back to top ────────────────────────────────────────────── */
.back-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #06302b; font-size: 1.1rem; font-weight: 800;
  box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .25s, transform .25s var(--spring);
}
.back-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-top:hover { transform: translateY(-3px); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1.4fr 1fr; }
  .hero-trending { grid-column: 1 / -1; grid-row: auto; }
  .cat-tiles { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-lead, .hero-side, .hero-trending { grid-row: auto; }
  .hero-side { flex-direction: row; }
  .hero-side .hero-sm { flex: 1; }
  .home-main, .cat-layout, .article-layout, .info-layout { grid-template-columns: 1fr; }
  .home-cat-grid { grid-template-columns: 1fr; }
  .feature-card { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .menu-btn { display: flex; }
}

@media (max-width: 640px) {
  :root { --nav-h: 56px; }
  .wrap { padding: 0 14px; }
  .brand-logo { height: 28px; }
  .hero { padding-top: 16px; gap: 14px; }
  .hero-side { flex-direction: column; }
  .card { flex-direction: column; }
  .card-media { width: 100%; }
  .card-excerpt { -webkit-line-clamp: 3; }
  .cat-tiles, .nf-tiles { grid-template-columns: repeat(2, 1fr); }
  .cat-tile-desc { display: none; }
  .related-grid, .prev-next { grid-template-columns: 1fr; }
  .pn.next { text-align: left; }
  .copy-link { margin-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-brand { grid-column: 1 / -1; }
  .section-head { margin: 30px 0 16px; }
  .ticker { font-size: .72rem; }
  .ticker-label { padding: 6px 10px; }
  .back-top { right: 14px; bottom: 14px; width: 40px; height: 40px; }
}

@media (max-width: 400px) {
  .cat-tiles, .nf-tiles { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .trend-thumb { width: 56px; height: 44px; }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .ticker, .site-header, .sidebar, .site-footer, .back-top,
  .prev-next, .related, .copy-link, .search-overlay { display: none !important; }
  body { background: #fff; color: #000; }
  .article-body { max-width: none; }
}
