/* ===== Cshmg Tech - Design System ===== */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --blue: #4f46e5;
  --blue-dark: #3730a3;
  --blue-soft: #eef2ff;
  --cyan: #7c3aed;
  --amber: #ec4899;
  --navy: #1e1b4b;
  --navy-2: #312e81;
  --grad: linear-gradient(135deg, #4f46e5, #7c3aed);
  --grad-soft: linear-gradient(135deg, #818cf8, #a78bfa);
  --grad-diag: linear-gradient(135deg, #4f46e5, #ec4899);
  --grad-tri: linear-gradient(135deg, #4f46e5, #7c3aed, #ec4899);
  --shadow-card: 0 1px 3px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.04);
  --shadow-soft: 0 1px 2px rgba(15,23,42,.04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font: "Inter","Segoe UI",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.65; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; }

/* ===== Layout ===== */
.container { width: min(1280px, calc(100% - 32px)); margin-inline: auto; }
@media (min-width: 640px) { .container { width: min(1280px, calc(100% - 48px)); } }
.main { min-height: 62vh; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 8px 16px; border-radius: var(--radius-sm); background: var(--blue); color: #fff; }

/* ===== Utilities ===== */
.block { display: block; }
.grad-text { background: var(--grad-tri); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-text-cyan { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.clamp-1, .clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* ===== Header ===== */
.site-header { background: rgba(255,255,255,.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid transparent; transition: background .3s, box-shadow .3s, border-color .3s; }
.site-header.is-scrolled { background: rgba(255,255,255,.97); border-bottom-color: var(--line); box-shadow: 0 1px 3px rgba(15,23,42,.04); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 36px; height: 36px; border-radius: var(--radius-sm); object-fit: cover; box-shadow: none; border: none; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }

/* Desktop nav */
.desktop-nav { display: none; align-items: center; gap: 0; }
@media (min-width: 1024px) { .desktop-nav { display: flex; } }
.desktop-nav a { padding: 8px 14px; border-radius: var(--radius-sm); color: var(--body); font-size: 13px; font-weight: 600; letter-spacing: .01em; transition: color .15s, background .15s; }
.desktop-nav a:hover { color: var(--blue); background: var(--blue-soft); }
.desktop-nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }

/* Menu button */
.menu-button { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--body); transition: background .15s; }
.menu-button:hover { background: var(--line-soft); }
.menu-button svg { width: 20px; height: 20px; }
.menu-button .icon-close { display: none; }
.menu-button[aria-expanded="true"] .icon-menu { display: none; }
.menu-button[aria-expanded="true"] .icon-close { display: inline-block; }
@media (min-width: 1024px) { .menu-button { display: none; } }
.menu-close svg { width: 20px; height: 20px; }

/* Mobile menu */
.menu-overlay { position: fixed; z-index: 45; inset: 0; visibility: hidden; opacity: 0; background: rgba(0,0,0,.4); transition: opacity .25s, visibility .25s; }
.menu-overlay.is-open { visibility: visible; opacity: 1; }
.mobile-menu { position: fixed; z-index: 50; top: 0; right: 0; width: min(320px, 85vw); height: 100vh; overflow-y: auto; padding: 24px; background: #fff; transform: translateX(102%); transition: transform .25s ease-out; box-shadow: -1px 0 0 var(--line), -12px 0 40px rgba(0,0,0,.08); border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.mobile-menu.is-open { transform: none; }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.mobile-menu-top .brand img { width: 32px; height: 32px; border-radius: var(--radius-sm); }
.mobile-menu-top .brand-name { font-size: 18px; }
.mobile-menu nav { display: grid; gap: 2px; }
.mobile-menu nav a { padding: 14px 16px; border-radius: var(--radius-sm); color: var(--body); font-size: 15px; font-weight: 600; letter-spacing: .01em; transition: .15s; }
.mobile-menu nav a:hover { color: var(--blue); background: var(--blue-soft); }
.mobile-menu nav a[aria-current="page"] { color: var(--blue); background: var(--blue-soft); }
.menu-close { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); }
.menu-close:hover { background: var(--line-soft); }

/* ===== Hero Section (NEW: Light) ===== */
.hero-light { position: relative; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--line); }
.hero-light::before { content: ''; position: absolute; top: -120px; right: -80px; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle, rgba(79,70,229,.06), transparent 70%); pointer-events: none; }
.hero-light::after { content: ''; position: absolute; bottom: -100px; left: -60px; width: 350px; height: 350px; border-radius: 50%; background: radial-gradient(circle, rgba(124,58,237,.05), transparent 70%); pointer-events: none; }
.hero-inner { position: relative; z-index: 10; padding: 40px 0 24px; }
@media (min-width: 640px) { .hero-inner { padding: 56px 0 32px; } }
.hero-label { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.hero-label svg { width: 16px; height: 16px; }

/* Hero grid (replaces carousel) */
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .hero-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.hero-card { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, box-shadow .2s, transform .2s; }
.hero-card:hover { border-color: var(--blue); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.hero-card-media { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.hero-card-media .article-cover { position: absolute; inset: 0; }
.hero-card-body { padding: 16px; }
@media (min-width: 640px) { .hero-card-body { padding: 20px; } }
.hero-card-body h2 { margin-bottom: 8px; font-size: 16px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; color: var(--text); transition: color .15s; }
@media (min-width: 640px) { .hero-card-body h2 { font-size: 18px; } }
.hero-card:first-child .hero-card-body h2 { font-size: 20px; }
@media (min-width: 640px) { .hero-card:first-child .hero-card-body h2 { font-size: 22px; } }
.hero-card-body p { margin-bottom: 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.hero-card-meta { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 11px; }
.hero-card-meta svg { width: 12px; height: 12px; }
a:hover .hero-card-body h2 { color: var(--blue); }

/* Legacy hero-dark kept for category pages */
.hero-dark { position: relative; overflow: hidden; background: var(--navy); }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; opacity: .25; }
.hero-dots { position: absolute; inset: 0; opacity: .06; background-image: radial-gradient(circle at 1px 1px, rgba(79,70,229,.5) 1px, transparent 0); background-size: 24px 24px; }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.hero-fade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(30,27,75,.5), rgba(30,27,75,.3), var(--bg)); }

/* ===== Article Cover ===== */
.article-cover { position: relative; overflow: hidden; background: var(--line-soft); }
.article-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== Home Sections ===== */
.home-section { position: relative; overflow: hidden; padding: 56px 0; }
@media (min-width: 640px) { .home-section { padding: 80px 0; } }
.home-section.alt-bg { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-section.tinted { background: var(--line-soft); }

.blur-spot { position: absolute; width: 288px; height: 288px; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.blur-spot.violet { background: rgba(79,70,229,.12); }
.blur-spot.blue { background: rgba(124,58,237,.1); }
.blur-spot.cyan { background: rgba(236,72,153,.08); }

.section-inner { position: relative; z-index: 10; }
.section-heading { margin-bottom: 32px; }
.section-heading .eyebrow { display: block; margin-bottom: 6px; }
.section-heading h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
@media (min-width: 640px) { .section-heading h2 { font-size: 26px; } }
.section-heading .sub { max-width: 672px; margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.625; }
@media (min-width: 640px) { .section-heading .sub { font-size: 16px; } }

/* ===== Editor's Picks (NEW: horizontal layout) ===== */
.editor-picks { display: grid; gap: 20px; }
@media (min-width: 768px) { .editor-picks { grid-template-columns: 3fr 2fr; gap: 24px; } }

.pick-main { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, box-shadow .2s; height: 100%; }
.pick-main:hover { border-color: var(--blue); box-shadow: var(--shadow-card); }
.pick-media { position: relative; aspect-ratio: 16/9; overflow: hidden; }
@media (min-width: 768px) { .pick-media { aspect-ratio: 16/10; } }
.pick-media .article-cover { position: absolute; inset: 0; }
.pick-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.4), transparent); }
.pick-flag { position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: var(--navy); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.pick-flag svg { width: 12px; height: 12px; color: #fbbf24; fill: #fbbf24; }
.pick-body { display: flex; flex-direction: column; justify-content: center; padding: 20px; flex: 1; }
@media (min-width: 640px) { .pick-body { padding: 24px; } }
.pick-body h3 { margin-bottom: 8px; font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; transition: color .15s; }
@media (min-width: 640px) { .pick-body h3 { font-size: 20px; } }
.pick-body p { margin-bottom: 12px; color: var(--muted); font-size: 13px; line-height: 1.625; }
@media (min-width: 640px) { .pick-body p { font-size: 14px; } }

.pick-side { display: grid; gap: 12px; }
.pick-item { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.pick-item:hover { border-color: var(--blue); box-shadow: var(--shadow-soft); }
.pick-thumb { flex: 0 0 80px; width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; }
.pick-thumb .article-cover { width: 100%; height: 100%; }
.pick-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.pick-item-body h3 { font-size: 13px; font-weight: 700; line-height: 1.4; transition: color .2s; }
@media (min-width: 640px) { .pick-item-body h3 { font-size: 14px; } }
.item-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--faint); font-size: 10px; }
.item-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--blue); }
.item-meta svg { width: 10px; height: 10px; }

.meta-small { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 11px; }
.meta-small svg { width: 12px; height: 12px; }

/* Hover color transitions */
a:hover .pick-body h3, a:hover .mix-body h3, a:hover .mix-medium-body h3,
a:hover .mix-small-body h3, a:hover .trend-body h3, a:hover .cat-feature-body h2,
a:hover .cat-card-body h3 { color: var(--blue); }

/* ===== Featured Stories (NEW: uniform horizontal cards) ===== */
.featured-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .featured-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .featured-grid { grid-template-columns: repeat(3, 1fr); } }

.feat-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, box-shadow .2s, transform .2s; height: 100%; }
.feat-card:hover { border-color: var(--blue); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.feat-card-media { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.feat-card-media .article-cover { position: absolute; inset: 0; }
.feat-flag { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; background: var(--navy); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.feat-flag svg { width: 10px; height: 10px; }
.feat-card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
@media (min-width: 640px) { .feat-card-body { padding: 20px; } }
.feat-card-body h3 { margin-bottom: 8px; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--text); transition: color .2s; }
@media (min-width: 640px) { .feat-card-body h3 { font-size: 16px; } }
.feat-card-body p { margin-bottom: 12px; color: var(--muted); font-size: 12px; line-height: 1.6; flex: 1; }
.feat-card-meta { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 11px; }
.feat-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--blue); }
.feat-card-meta svg { width: 11px; height: 11px; }

/* ===== Small article list ===== */
.article-list { display: grid; gap: 12px; }
@media (min-width: 640px) { .article-list { grid-template-columns: repeat(2, 1fr); } }
.list-card { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.list-card:hover { border-color: var(--blue); box-shadow: var(--shadow-soft); }
.list-thumb { flex: 0 0 88px; width: 88px; height: 88px; border-radius: var(--radius-sm); overflow: hidden; }
.list-thumb .article-cover { width: 100%; height: 100%; }
.list-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.list-body h3 { font-size: 13px; font-weight: 700; line-height: 1.4; transition: color .2s; margin-bottom: 4px; }
@media (min-width: 640px) { .list-body h3 { font-size: 14px; } }
.list-meta { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 10px; }
.list-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--blue); }
.list-meta svg { width: 10px; height: 10px; }

/* ===== Trending (NEW: numbered list) ===== */
.trending-list { display: grid; gap: 0; }
.trend-item { display: flex; align-items: flex-start; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); transition: background .15s; }
.trend-item:first-child { padding-top: 0; }
.trend-item:last-child { border-bottom: none; }
@media (min-width: 640px) { .trend-item { gap: 20px; padding: 24px 16px; border-bottom: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 8px; } }
.trend-rank { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--grad); color: #fff; font-size: 14px; font-weight: 800; }
.trend-media-sm { flex: 0 0 auto; display: none; }
@media (min-width: 640px) { .trend-media-sm { display: block; width: 120px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; } }
.trend-media-sm .article-cover { width: 100%; height: 100%; }
.trend-body { flex: 1; min-width: 0; }
.trend-body h3 { margin-bottom: 6px; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--text); transition: color .2s; }
@media (min-width: 640px) { .trend-body h3 { font-size: 16px; } }
.trend-body p { margin-bottom: 8px; color: var(--muted); font-size: 12px; line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 2; }
@media (min-width: 640px) { .trend-body p { font-size: 13px; } }

/* ===== Legacy carousel (kept for reference but not used on homepage) ===== */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius); }
.carousel-track { display: flex; transition: transform .5s ease-out; }
.carousel-slide { flex: 0 0 100%; width: 100%; }
.slide-media { position: relative; aspect-ratio: 16/9; overflow: hidden; }
@media (min-width: 640px) { .slide-media { aspect-ratio: 21/9; } }
.slide-media .article-cover { position: absolute; inset: 0; }
.slide-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.4), transparent); }
.slide-shade2 { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,.3), transparent); }
.slide-copy { position: absolute; inset: auto 0 0 0; padding: 20px; }
@media (min-width: 640px) { .slide-copy { padding: 32px; } }
@media (min-width: 1024px) { .slide-copy { padding: 40px; } }
.slide-copy h2 { max-width: 768px; margin-bottom: 8px; color: #fff; font-size: 20px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; }
@media (min-width: 640px) { .slide-copy h2 { font-size: 24px; } }
@media (min-width: 1024px) { .slide-copy h2 { font-size: 30px; } }
.slide-copy p { max-width: 672px; margin-bottom: 12px; color: rgba(255,255,255,.7); font-size: 12px; }
@media (min-width: 640px) { .slide-copy p { font-size: 14px; } }
.slide-meta { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.5); font-size: 12px; }
.slide-meta svg { width: 12px; height: 12px; }
.carousel-arrow { position: absolute; z-index: 10; top: 50%; transform: translateY(-50%); display: none; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--radius-sm); background: rgba(0,0,0,.5); color: #fff; opacity: 0; transition: opacity .15s, background .15s; }
.carousel-arrow:hover { background: rgba(0,0,0,.7); }
.carousel-arrow svg { width: 20px; height: 20px; }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel:hover .carousel-arrow, .carousel-arrow:focus-visible { opacity: 1; }
@media (min-width: 640px) { .carousel-arrow { display: inline-flex; } }
.carousel-dots { position: absolute; z-index: 10; right: 20px; bottom: 12px; display: flex; gap: 6px; }
@media (min-width: 640px) { .carousel-dots { right: 32px; bottom: 20px; } }
.carousel-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.4); transition: all .2s; }
.carousel-dots button:hover { background: rgba(255,255,255,.6); }
.carousel-dots button.is-active { width: 24px; border-radius: 3px; background: #fff; }

/* ===== Category Page ===== */
.hero-category .hero-fade { background: linear-gradient(to bottom, rgba(30,27,75,.5), rgba(30,27,75,.3), var(--bg)); }
.hero-category .hero-inner { padding: 40px 0 48px; }
@media (min-width: 640px) { .hero-category .hero-inner { padding: 56px 0 64px; } }

.crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 24px; overflow-x: auto; color: rgba(255,255,255,.5); font-size: 12px; scrollbar-width: none; }
.crumbs::-webkit-scrollbar { display: none; }
.crumbs svg { flex: 0 0 auto; width: 12px; height: 12px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; transition: color .2s; }
.crumbs a:hover { color: #fff; }
.crumbs .current { color: rgba(255,255,255,.9); font-weight: 500; white-space: nowrap; }

.category-head { display: flex; align-items: flex-start; gap: 16px; }
@media (min-width: 640px) { .category-head { gap: 24px; } }
.category-icon { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: var(--radius); box-shadow: none; }
@media (min-width: 640px) { .category-icon { width: 64px; height: 64px; } }
.category-icon svg { width: 28px; height: 28px; color: #fff; }
@media (min-width: 640px) { .category-icon svg { width: 32px; height: 32px; } }
.category-head h1 { margin-bottom: 8px; color: #fff; font-size: 30px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; }
@media (min-width: 640px) { .category-head h1 { font-size: 36px; } }
@media (min-width: 768px) { .category-head h1 { font-size: 48px; } }
.category-head > :last-child { flex: 1; min-width: 0; }
.category-head p { max-width: 672px; color: rgba(255,255,255,.6); font-size: 14px; line-height: 1.625; }
@media (min-width: 640px) { .category-head p { font-size: 16px; } }
@media (min-width: 768px) { .category-head p { font-size: 18px; } }

.category-counts { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.count-pill { padding: 6px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; background: rgba(255,255,255,.1); backdrop-filter: blur(4px); color: rgba(255,255,255,.8); font-size: 12px; font-weight: 500; }
.count-note { display: flex; align-items: center; gap: 4px; color: rgba(255,255,255,.4); font-size: 12px; }
.count-note svg { width: 12px; height: 12px; }

.category-wrap { padding: 40px 0 64px; }
@media (min-width: 640px) { .category-wrap { padding: 64px 0; } }

.cat-feature { position: relative; display: grid; grid-template-columns: 1fr; margin-bottom: 40px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
@media (min-width: 1024px) { .cat-feature { grid-template-columns: repeat(12, 1fr); } }
.cat-feature:hover { border-color: var(--blue); box-shadow: var(--shadow-card); }
.cat-feature-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--line-soft); }
.cat-feature-media .article-cover { position: absolute; inset: 0; }
@media (min-width: 1024px) { .cat-feature-media { grid-column: span 7; aspect-ratio: auto; } }
.featured-flag { position: absolute; top: 16px; left: 16px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 6px; background: var(--navy); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.featured-flag svg { width: 12px; height: 12px; }
.cat-feature-body { display: flex; flex-direction: column; justify-content: center; padding: 24px; }
@media (min-width: 640px) { .cat-feature-body { padding: 32px; } }
@media (min-width: 1024px) { .cat-feature-body { grid-column: span 5; } }
.cat-feature-body h2 { margin-bottom: 12px; font-size: 20px; font-weight: 800; line-height: 1.375; letter-spacing: -.02em; transition: color .2s; }
@media (min-width: 640px) { .cat-feature-body h2 { font-size: 24px; } }
.cat-feature-body p { margin-bottom: 20px; color: var(--muted); font-size: 14px; line-height: 1.625; }
.cat-feature-meta { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 12px; }
.cat-feature-meta svg { width: 14px; height: 14px; }

.masonry-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 640px) { .masonry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .masonry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.cat-card { position: relative; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, box-shadow .2s, transform .2s; }
.cat-card:hover { border-color: var(--blue); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.cat-card:hover .card-image { transform: scale(1.03); }
.cat-card-media { position: relative; overflow: hidden; background: var(--line-soft); }
.card-image { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform .4s ease; }
.cat-card-body { padding: 16px; }
.cat-card-body h3 { margin-bottom: 6px; font-size: 14px; font-weight: 700; line-height: 1.375; transition: color .2s; }
@media (min-width: 640px) { .cat-card-body h3 { font-size: 15px; } }
.cat-card-body p { margin-bottom: 12px; color: var(--muted); font-size: 11px; line-height: 1.625; }
@media (min-width: 640px) { .cat-card-body p { font-size: 12px; } }
.cat-card-foot { display: flex; align-items: center; justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.cat-card-foot .item-meta { margin-top: 0; }

.empty-state { padding: 64px 0 80px; text-align: center; }
.empty-state .icon-box { display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; margin: 0 auto 16px; border-radius: var(--radius); background: var(--blue-soft); }
.empty-state .icon-box svg { width: 40px; height: 40px; color: var(--blue); }
.empty-state p { color: var(--muted); font-size: 14px; }
@media (min-width: 640px) { .empty-state p { font-size: 18px; } }

.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
@media (min-width: 640px) { .pagination { margin-top: 64px; } }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 40px; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500; transition: .15s; }
.pagination a:hover { border-color: var(--blue); background: var(--blue-soft); }
.pagination .current { border-color: transparent; background: var(--navy); color: #fff; }
.pagination .disabled { border-color: var(--line); color: var(--faint); cursor: not-allowed; }
.pagination svg { width: 16px; height: 16px; }

/* ===== Article Page ===== */
.reading-progress { position: fixed; z-index: 90; top: 0; left: 0; width: 0; height: 3px; background: var(--grad-tri); transition: width .1s linear; }

.article-hero { position: relative; overflow: hidden; min-height: 420px; background: var(--line-soft); }
@media (min-width: 640px) { .article-hero { min-height: 460px; } }
.article-hero-cover { position: absolute; inset: 0; }
.article-hero-cover .article-cover { width: 100%; height: 100%; }
.article-hero-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.35), rgba(0,0,0,.7)); }
.article-hero-shade2 { position: absolute; inset: 0; background: linear-gradient(to bottom right, rgba(30,27,75,.3), transparent, rgba(30,27,75,.3)); mix-blend-mode: multiply; }
.article-hero-fade { position: absolute; inset: auto 0 0 0; height: 80px; background: linear-gradient(to top, var(--bg), transparent); }
.article-hero-shade, .article-hero-shade2 { display: none; }
.article-hero:has(.article-hero-cover img) .article-hero-shade,
.article-hero:has(.article-hero-cover img) .article-hero-shade2,
.article-hero:has(.article-hero-cover img) .article-hero-fade { display: block; }

.article-hero-inner { position: relative; z-index: 10; max-width: 1280px; margin: 0 auto; padding: 32px 16px 40px; }
@media (min-width: 640px) { .article-hero-inner { padding: 48px 24px 56px; } }
@media (min-width: 1024px) { .article-hero-inner { padding: 48px 32px 56px; } }
.article-hero-inner .narrow { max-width: 900px; margin: 0 auto; }

.ah-title { margin-bottom: 20px; font-size: 30px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; color: var(--text); }
@media (min-width: 640px) { .ah-title { font-size: 36px; } }
@media (min-width: 768px) { .ah-title { font-size: 48px; } }
.ah-summary { max-width: 768px; margin-bottom: 24px; color: var(--body); font-size: 14px; line-height: 1.625; }
@media (min-width: 640px) { .ah-summary { font-size: 16px; } }
.ah-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; color: var(--muted); font-size: 12px; }
.ah-meta svg { width: 14px; height: 14px; }
.ah-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }

.article-hero:has(.article-hero-cover img) .ah-title { color: #fff; }
.article-hero:has(.article-hero-cover img) .ah-summary { color: rgba(255,255,255,.7); }
.article-hero:has(.article-hero-cover img) .ah-meta,
.article-hero:has(.article-hero-cover img) .crumbs { color: rgba(255,255,255,.5); }
.article-hero:has(.article-hero-cover img) .crumbs .current { color: rgba(255,255,255,.9); }
.article-hero:has(.article-hero-cover img) .crumbs a:hover { color: #fff; }
.article-hero:has(.article-hero-cover img) .ah-meta .dot { background: rgba(255,255,255,.3); }

.article-wrap { max-width: 1280px; margin: 0 auto; padding: 40px 16px 56px; }
@media (min-width: 640px) { .article-wrap { padding: 56px 24px; } }
@media (min-width: 1024px) { .article-wrap { padding: 56px 32px; } }

.article-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 1024px) { .article-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px; } }
.article-aside { display: none; }
@media (min-width: 1024px) {
  .article-aside { display: block; order: 1; grid-column: span 3; }
  .article-main { order: 2; grid-column: span 9; }
  .article-grid.no-toc .article-main { grid-column: 2 / span 10; }
}

/* TOC */
.toc-card { position: sticky; top: 80px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.9); backdrop-filter: blur(8px); }
.toc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.toc-head svg { width: 16px; height: 16px; color: var(--blue); }
.toc-head h3 { font-size: 14px; font-weight: 700; }
.toc-nav { display: grid; gap: 6px; max-height: 60vh; overflow-y: auto; }
.toc-nav a { display: block; font-size: 12px; color: var(--muted); transition: color .2s; }
.toc-nav a:hover { color: var(--blue); }
.toc-nav a.sub { padding-left: 12px; color: var(--faint); }

.toc-mobile { margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.9); backdrop-filter: blur(8px); overflow: hidden; }
@media (min-width: 1024px) { .toc-mobile { display: none; } }
.toc-mobile summary { display: flex; align-items: center; gap: 8px; padding: 16px; font-size: 14px; font-weight: 700; cursor: pointer; list-style: none; user-select: none; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary svg { width: 16px; height: 16px; color: var(--blue); }
.toc-mobile summary .chev { margin-left: auto; color: var(--faint); transition: transform .2s; }
.toc-mobile[open] summary .chev { transform: rotate(90deg); }
.toc-mobile nav { display: grid; gap: 6px; padding: 12px 16px 16px; border-top: 1px solid var(--line-soft); }
.toc-mobile nav a { display: block; font-size: 12px; color: var(--muted); }
.toc-mobile nav a:hover { color: var(--blue); }
.toc-mobile nav a.sub { padding-left: 12px; color: var(--faint); }

/* Prose */
.prose { max-width: none; }
.prose h1 { margin: 2.5rem 0 1rem; color: var(--text); font-size: 1.75rem; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; }
.prose h2 { margin: 2rem 0 .75rem; color: var(--text); font-size: 1.5rem; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; scroll-margin-top: 80px; }
.prose h3 { margin: 1.5rem 0 .5rem; color: var(--text); font-size: 1.2rem; font-weight: 650; }
.prose h4 { margin: 1.25rem 0 .5rem; color: var(--text); font-size: 1.05rem; font-weight: 650; }
.prose p { margin-bottom: 1.25rem; color: var(--body); font-size: 1.005rem; line-height: 1.8; }
.prose ul, .prose ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.prose li { margin-bottom: .5rem; color: var(--body); line-height: 1.7; }
.prose strong { color: var(--text); font-weight: 650; }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 3px solid var(--blue); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--blue-soft); color: #334155; font-style: italic; }
.prose img { margin: 1.5rem 0; border-radius: var(--radius); box-shadow: var(--shadow-card); max-width: 100%; height: auto; }
.prose a { color: var(--blue); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--blue-dark); text-decoration-thickness: 2px; }
.prose code { padding: .15em .4em; border-radius: 5px; background: var(--blue-soft); color: var(--blue-dark); font-size: .875em; font-weight: 500; }
.prose pre { margin: 1.5rem 0; padding: 1.25rem; border-radius: var(--radius); background: var(--navy); color: #e2e8f0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose pre code { padding: 0; background: transparent; color: inherit; font-weight: 400; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.prose hr { margin: 2rem 0; border: 0; border-top: 1px solid var(--line); }
.prose > :first-child { margin-top: 0; }

.disclaimer { margin-top: 40px; padding: 20px; border: 1px solid #fde68a; border-radius: var(--radius); background: #fffbeb; }
.disclaimer p { margin: 0; color: #78350f; font-size: 12px; line-height: 1.625; }

/* Related */
.section-related { position: relative; overflow: hidden; padding: 56px 0; background: var(--line-soft); }
@media (min-width: 640px) { .section-related { padding: 80px 0; } }
.related-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===== Static Pages ===== */
.page-hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.page-hero .hero-bg { opacity: .25; }
.page-hero .hero-fade { background: linear-gradient(to bottom, rgba(30,27,75,.5), rgba(30,27,75,.3), var(--navy)); }
.page-hero .hero-dots { opacity: .1; background-image: radial-gradient(circle at 1px 1px, rgba(79,70,229,.4) 1px, transparent 0); background-size: 24px 24px; }
.page-hero-inner { position: relative; z-index: 10; max-width: 896px; margin: 0 auto; padding: 64px 24px; text-align: center; }
@media (min-width: 640px) { .page-hero-inner { padding: 96px 24px; } }
.page-hero-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 24px; border-radius: var(--radius); background: var(--grad-diag); box-shadow: none; }
@media (min-width: 640px) { .page-hero-icon { width: 80px; height: 80px; } }
.page-hero-icon svg { width: 32px; height: 32px; color: #fff; }
@media (min-width: 640px) { .page-hero-icon svg { width: 40px; height: 40px; } }
.page-hero .eyebrow-cyan { display: block; margin-bottom: 12px; color: #a78bfa; font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.page-hero h1 { margin-bottom: 20px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
@media (min-width: 640px) { .page-hero h1 { font-size: 40px; } }
@media (min-width: 768px) { .page-hero h1 { font-size: 52px; } }
.page-hero .hero-sub { max-width: 672px; margin: 0 auto; color: #cbd5e1; font-size: 14px; line-height: 1.625; }
@media (min-width: 640px) { .page-hero .hero-sub { font-size: 18px; } }
.page-hero .hero-sub-sm { max-width: 672px; margin: 12px auto 0; color: #94a3b8; font-size: 12px; }
@media (min-width: 640px) { .page-hero .hero-sub-sm { font-size: 14px; } }
.page-hero .hero-sub strong { color: #fff; }

.page-wrap { max-width: 1024px; margin: 0 auto; padding: 48px 16px 64px; }
@media (min-width: 640px) { .page-wrap { padding: 64px 24px; } }

.section-block { margin-bottom: 56px; }
@media (min-width: 640px) { .section-block { margin-bottom: 80px; } }

.section-title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-title-row .icon-chip { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--blue-soft); }
.section-title-row .icon-chip svg { width: 20px; height: 20px; color: var(--blue); }
.section-title-row h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
@media (min-width: 640px) { .section-title-row h2 { font-size: 30px; } }

.card-panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
@media (min-width: 640px) { .card-panel { padding: 32px; } }

.center-heading { margin-bottom: 32px; text-align: center; }
.center-heading .eyebrow { display: block; margin-bottom: 6px; }
.center-heading h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
@media (min-width: 640px) { .center-heading h2 { font-size: 30px; } }
.center-heading p { max-width: 672px; margin: 12px auto 0; color: var(--muted); font-size: 14px; }
@media (min-width: 640px) { .center-heading p { font-size: 16px; } }

.values-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .values-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.value-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
@media (min-width: 640px) { .value-card { padding: 28px; } }
.value-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: var(--radius-sm); box-shadow: none; }
.value-icon svg { width: 24px; height: 24px; color: #fff; }
.value-icon.blue { background: var(--grad); }
.value-icon.cyan { background: linear-gradient(135deg, #7c3aed, #4f46e5); }
.value-icon.indigo { background: var(--grad-diag); }
.value-card h3 { margin-bottom: 8px; font-size: 18px; font-weight: 700; }
.value-card p { color: #334155; font-size: 14px; line-height: 1.625; }

.coverage-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .coverage-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .coverage-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.coverage-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: .2s; }
@media (min-width: 640px) { .coverage-card { padding: 24px; } }
.coverage-card:hover { border-color: var(--blue); box-shadow: var(--shadow-soft); }
.coverage-card .icon-chip { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 12px; border-radius: var(--radius-sm); background: var(--blue-soft); }
.coverage-card .icon-chip svg { width: 20px; height: 20px; color: var(--blue); }
.coverage-card h3 { margin-bottom: 8px; font-size: 16px; font-weight: 700; }
@media (min-width: 640px) { .coverage-card h3 { font-size: 18px; } }
.coverage-card p { color: #334155; font-size: 14px; line-height: 1.625; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
.contact-card { display: block; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); transition: .2s; }
@media (min-width: 640px) { .contact-card { padding: 24px; } }
.contact-card:hover { border-color: var(--blue); box-shadow: var(--shadow-card); }
.contact-card svg.card-icon { width: 28px; height: 28px; margin-bottom: 12px; color: var(--blue); }
@media (min-width: 640px) { .contact-card svg.card-icon { width: 32px; height: 32px; } }
.contact-card h3 { margin-bottom: 4px; font-size: 14px; font-weight: 700; }
@media (min-width: 640px) { .contact-card h3 { font-size: 16px; } }
.contact-card .value { margin-bottom: 6px; color: #334155; font-size: 12px; font-weight: 500; word-break: break-word; }
@media (min-width: 640px) { .contact-card .value { font-size: 14px; } }
.contact-card .note { color: var(--muted); font-size: 12px; line-height: 1.625; }

.info-callout { padding: 24px; border: 1px solid var(--blue); border-radius: var(--radius); background: var(--blue-soft); }
@media (min-width: 640px) { .info-callout { padding: 32px; } }
.info-callout h3 { margin-bottom: 16px; color: var(--text); font-size: 18px; font-weight: 700; }
@media (min-width: 640px) { .info-callout h3 { font-size: 20px; } }
.check-list { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; color: #334155; font-size: 14px; }
@media (min-width: 640px) { .check-list { font-size: 16px; } }
.check-list li { display: flex; align-items: flex-start; gap: 12px; }
.check-list svg { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; color: var(--blue); }

.contact-chip { margin-top: 20px; padding: 20px 24px; border: 1px solid var(--blue); border-radius: var(--radius); background: var(--blue-soft); }
.contact-chip .chip-flex { display: flex; align-items: flex-start; gap: 12px; }
.contact-chip .chip-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--blue-soft); }
.contact-chip .chip-icon svg { width: 16px; height: 16px; color: var(--blue); }
.contact-chip a { color: var(--blue); font-size: 14px; font-weight: 500; word-break: break-all; }
.contact-chip a:hover { text-decoration: underline; }
.contact-chip .chip-note { margin-top: 4px; color: var(--muted); font-size: 12px; }

/* TOC panel (static pages) */
.toc-panel { margin-bottom: 40px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
@media (min-width: 640px) { .toc-panel { padding: 24px; } }
.toc-panel .toc-panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.toc-panel .toc-panel-head svg { width: 16px; height: 16px; color: var(--blue); }
.toc-panel .toc-panel-head h2 { font-size: 16px; font-weight: 700; }
@media (min-width: 640px) { .toc-panel .toc-panel-head h2 { font-size: 18px; } }
.toc-panel ul { display: grid; grid-template-columns: 1fr; gap: 6px 24px; padding: 0; margin: 0; list-style: none; font-size: 14px; }
@media (min-width: 640px) { .toc-panel ul { grid-template-columns: repeat(2, 1fr); } }
.toc-panel ul a { display: block; padding: 4px 0; color: var(--muted); transition: color .2s; }
.toc-panel ul a:hover { color: var(--blue); }

.intro-callout { margin-bottom: 40px; padding: 20px; border: 1px solid var(--blue); border-radius: var(--radius); background: var(--blue-soft); }
@media (min-width: 640px) { .intro-callout { padding: 24px; } }
.intro-callout p { margin: 0; color: #334155; font-size: 14px; line-height: 1.625; }
@media (min-width: 640px) { .intro-callout p { font-size: 16px; } }
.intro-callout a { color: var(--blue); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

.note-box { margin: 16px 0; padding: 16px 20px; border: 1px solid var(--blue); border-radius: var(--radius); background: var(--blue-soft); }
.note-box p { margin: 0; color: #334155; font-size: 14px; line-height: 1.625; }

.warn-box { margin: 0 0 16px; padding: 16px 20px; border: 1px solid #fde68a; border-radius: var(--radius); background: #fffbeb; }
.warn-box .warn-flex { display: flex; align-items: flex-start; gap: 12px; }
.warn-box svg { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; color: #f59e0b; }
.warn-box p { margin: 0; color: #334155; font-size: 14px; line-height: 1.625; }
@media (min-width: 640px) { .warn-box p { font-size: 16px; } }

.prose-section { margin-bottom: 40px; scroll-margin-top: 80px; }

/* ===== Footer ===== */
.site-footer { color: var(--muted); background: var(--navy); }
.footer-inner { padding: 56px 0 64px; }
@media (min-width: 640px) { .footer-inner { padding: 64px 0; } }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 48px; } }
.footer-brand .brand img { width: 32px; height: 32px; border-radius: var(--radius-sm); }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand .brand-name { color: #fff; font-size: 18px; }
.footer-brand p { max-width: 320px; color: #94a3b8; font-size: 14px; line-height: 1.625; }
.footer-col h3 { margin-bottom: 16px; color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.footer-col ul { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.footer-col a { color: #94a3b8; font-size: 14px; transition: color .15s; }
.footer-col a:hover { color: #a78bfa; }
.footer-bottom { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); }
@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }
.footer-bottom .copyright { color: #94a3b8; font-size: 12px; }
.footer-bottom .legal-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }
.footer-bottom .legal-links a { color: #94a3b8; font-size: 12px; transition: color .15s; }
.footer-bottom .legal-links a:hover { color: #a78bfa; }

/* ===== 404 ===== */
.notfound-wrap { padding: 96px 0 128px; text-align: center; }
.notfound-code { margin-bottom: 16px; background: var(--grad-tri); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 96px; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.notfound-wrap h1 { margin-bottom: 12px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
@media (min-width: 640px) { .notfound-wrap h1 { font-size: 30px; } }
.notfound-wrap p { max-width: 480px; margin: 0 auto 32px; color: var(--muted); font-size: 14px; }
@media (min-width: 640px) { .notfound-wrap p { font-size: 16px; } }
.button-primary { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border: 0; border-radius: var(--radius-sm); background: var(--navy); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .02em; transition: .15s; }
.button-primary:hover { background: var(--navy-2); transform: translateY(-1px); }
.notfound-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; }
.notfound-links a { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 500; transition: .15s; }
.notfound-links a:hover { border-color: var(--blue); color: var(--blue); }

/* ===== Scroll Top ===== */
.scroll-top { position: fixed; z-index: 40; right: 16px; bottom: 16px; display: none; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: var(--radius); background: var(--navy); color: #fff; opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; }
@media (min-width: 640px) { .scroll-top { right: 32px; bottom: 32px; } }
.scroll-top.is-visible { display: inline-flex; opacity: 1; transform: none; }
.scroll-top svg { width: 20px; height: 20px; }

/* ===== Reveal Animation ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--line-soft); }
::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .prose h2 { font-size: 1.3rem; }
  .prose h3 { font-size: 1.1rem; }
  .prose p { font-size: .95rem; line-height: 1.75; }
  .prose li { font-size: .95rem; }
  .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .prose pre { font-size: .8rem; padding: 1rem; }
  .article-hero { min-height: 0; }
}
@media (max-width: 768px) {
  button, a { -webkit-tap-highlight-color: rgba(79,70,229,.08); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
