/* ============================================================
   Unnbug Insights - editorial cybersecurity publication
   Light-first, muted palette, one restrained accent.
   Serif display headings + Inter UI/body. Dark mode via
   [data-theme="dark"]. Hand-authored, dependency-free.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-gray: #f4f5f6;
  --surface: #ffffff;
  --text: #14161a;
  --text-2: #3c4148;
  --muted: #6b7280;
  --muted-2: #9aa1ab;
  --border: #e7e8ea;
  --border-strong: #d7d9dd;
  --accent: #c8202e;         /* refined brand red, used sparingly */
  --accent-ink: #a51824;     /* accent text on light */
  --accent-soft: #fbeced;    /* faint accent wash */
  --shadow-sm: 0 1px 2px rgba(16, 18, 22, 0.04), 0 1px 3px rgba(16, 18, 22, 0.06);
  --shadow-md: 0 6px 20px -8px rgba(16, 18, 22, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1200px;
  --read: 720px;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --step: 8px;
}

[data-theme="dark"] {
  --bg: #0e1013;
  --bg-soft: #121519;
  --bg-gray: #15181d;
  --surface: #14171b;
  --text: #e9eaec;
  --text-2: #c2c6cc;
  --muted: #8b929c;
  --muted-2: #666d78;
  --border: #242830;
  --border-strong: #313742;
  --accent: #f0616a;
  --accent-ink: #f0616a;
  --accent-soft: rgba(240, 97, 106, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 26px -10px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.2s ease, color 0.2s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.18; letter-spacing: -0.01em; margin: 0; color: var(--text); }
p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.serif { font-family: var(--font-serif); }
.center { text-align: center; }

/* eyebrow / kicker */
.kicker { font-family: var(--font-sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); }
.section-kicker { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }

/* meta row (category / date / read time) */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--muted); }
.meta .cat { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.72rem; color: var(--accent-ink); }
.meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }

/* reading progress */
#progress { position: fixed; top: 0; left: 0; height: 2px; width: 0%; background: var(--accent); z-index: 100; transition: width 0.08s linear; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 30px; width: auto; }
.brand .wm { display: flex; flex-direction: column; line-height: 1.05; }
.brand .wm b { font-family: var(--font-serif); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.brand .wm span { font-size: 0.58rem; letter-spacing: 0.22em; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: 14px; }
.nav-links a { font-size: 0.9rem; color: var(--text-2); font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); border-color: var(--accent); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-2); cursor: pointer; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }
.nav-toggle { display: none; }
.mobile-menu { display: none; }
.mobile-menu.open { display: flex; flex-direction: column; gap: 2px; padding: 8px 24px 16px; border-bottom: 1px solid var(--border); }
.mobile-menu a { padding: 10px 8px; color: var(--text-2); font-size: 0.95rem; border-radius: 8px; }
.mobile-menu a:hover { background: var(--bg-gray); color: var(--text); }
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: 0.9rem; font-weight: 600; padding: 10px 18px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; transition: transform 0.15s ease, background 0.15s, border-color 0.15s, color 0.15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); background: var(--accent-ink); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { transform: translateY(-2px); border-color: var(--text-2); }
.btn-text { color: var(--accent-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.btn-text:hover { gap: 9px; }
.btn-text svg { width: 15px; height: 15px; transition: transform 0.15s; }

/* ---------- search ---------- */
.searchbar { position: relative; display: flex; align-items: center; }
.searchbar svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.searchbar input { width: 100%; font-family: var(--font-sans); font-size: 0.92rem; color: var(--text); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px 10px 38px; transition: border-color 0.15s, background 0.15s; }
.searchbar input::placeholder { color: var(--muted-2); }
.searchbar input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.search-hint { position: absolute; right: 10px; font-size: 0.68rem; color: var(--muted-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-family: var(--font-mono); }

/* ---------- sections ---------- */
.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.section-head p { color: var(--muted); margin: 6px 0 0; }
.rule { height: 1px; background: var(--border); border: none; margin: 0; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 24px; }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.6rem); letter-spacing: -0.02em; max-width: 16ch; }
.hero .lede { font-size: 1.12rem; color: var(--text-2); max-width: 62ch; margin-top: 18px; line-height: 1.7; }
.hero-featured { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--border); }
@media (max-width: 860px) { .hero-featured { grid-template-columns: 1fr; gap: 20px; } }
.hero-featured .cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); aspect-ratio: 16 / 10; }
.hero-featured h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); margin: 12px 0; letter-spacing: -0.015em; }
.hero-featured h2 a:hover { color: var(--accent-ink); }
.hero-featured .excerpt { color: var(--text-2); font-size: 1.02rem; margin-bottom: 16px; }
.byline { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; font-family: var(--font-sans); flex-shrink: 0; }

/* ---------- category pills (filter) ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-family: var(--font-sans); font-size: 0.82rem; font-weight: 500; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 15px; cursor: pointer; transition: all 0.15s; }
.pill:hover { border-color: var(--border-strong); color: var(--text); }
.pill.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- editorial covers (typographic, no stock art) ---------- */
.cover { position: relative; background: var(--bg-gray); display: flex; align-items: flex-end; overflow: hidden; }
.cover::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--border-strong) 1px, transparent 1px); background-size: 22px 22px; opacity: 0.45; }
.cover .tick { position: absolute; top: 0; left: 0; width: 56px; height: 3px; background: var(--accent); }
.cover[data-label]::after { content: attr(data-label); position: relative; z-index: 1; font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.05rem, 2.6vw, 1.7rem); line-height: 1.2; color: var(--muted-2); padding: 18px 20px; max-width: 90%; letter-spacing: -0.01em; }
.cover.big[data-label]::after { font-size: clamp(1.4rem, 3.4vw, 2.4rem); }

/* ---------- cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card .cover { aspect-ratio: 16 / 9; border-bottom: 1px solid var(--border); }
.card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.16rem; line-height: 1.3; margin: 8px 0 0; }
.card h3 a:hover { color: var(--accent-ink); }
.card .excerpt { color: var(--muted); font-size: 0.9rem; margin: 8px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .byline { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* editor's picks (horizontal) */
.picks { display: grid; gap: 20px; }
.pick { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }
.pick:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.pick .cover { aspect-ratio: 4 / 3; height: 100%; border-right: 1px solid var(--border); }
.pick .body { padding: 22px 24px 22px 4px; }
.pick h3 { font-size: 1.5rem; margin: 10px 0; letter-spacing: -0.01em; }
.pick .excerpt { color: var(--text-2); font-size: 0.98rem; }
@media (max-width: 720px) { .pick { grid-template-columns: 1fr; } .pick .cover { aspect-ratio: 16/9; border-right: none; border-bottom: 1px solid var(--border); } .pick .body { padding: 20px; } }

/* ---------- category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-tile { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s; }
.cat-tile:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.cat-tile .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-gray); color: var(--text-2); display: flex; align-items: center; justify-content: center; }
.cat-tile .ic svg { width: 20px; height: 20px; }
.cat-tile h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 700; margin-top: 4px; }
.cat-tile p { font-size: 0.85rem; color: var(--muted); margin: 0; }
.cat-tile .count { font-size: 0.78rem; color: var(--muted-2); font-family: var(--font-mono); margin-top: auto; }

/* ---------- popular / ranked ---------- */
.ranked { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 40px; }
@media (max-width: 760px) { .ranked { grid-template-columns: 1fr; } }
.rank { display: flex; gap: 18px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--border); }
.rank .num { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; color: var(--muted-2); width: 34px; flex-shrink: 0; line-height: 1; }
.rank h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; line-height: 1.35; }
.rank h3 a:hover { color: var(--accent-ink); }
.rank .m { font-size: 0.76rem; color: var(--muted); margin-top: 5px; }

/* ---------- newsletter ---------- */
.newsletter { text-align: center; max-width: 560px; margin: 0 auto; }
.newsletter h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.newsletter p { color: var(--muted); margin: 10px 0 22px; }
.nl-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.nl-form input { flex: 1; font-family: var(--font-sans); font-size: 0.92rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 11px 14px; }
.nl-form input:focus { outline: none; border-color: var(--accent); }
@media (max-width: 480px) { .nl-form { flex-direction: column; } }

/* ---------- susphisious product section ---------- */
.prod { }
.prod .lead { max-width: 760px; }
.prod h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -0.015em; }
.prod .sub { font-size: 1.08rem; color: var(--text-2); margin-top: 14px; line-height: 1.7; }
.prod .about { color: var(--text-2); margin-top: 18px; font-size: 1rem; max-width: 760px; }

/* workflow timeline */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 32px; counter-reset: step; }
@media (max-width: 900px) { .flow { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } }
.step { position: relative; padding: 16px 16px 16px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.step .n { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; color: var(--accent-ink); }
.step h4 { font-family: var(--font-sans); font-size: 0.92rem; font-weight: 600; margin: 6px 0 0; line-height: 1.3; color: var(--text); }

/* benefits / features grid */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
@media (max-width: 860px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .feat-grid { grid-template-columns: 1fr; } }
.feat { display: flex; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.feat .ic { flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px; background: var(--bg-gray); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.feat .ic svg { width: 17px; height: 17px; }
.feat b { font-family: var(--font-sans); font-size: 0.92rem; font-weight: 600; display: block; }
.feat span { font-size: 0.82rem; color: var(--muted); }

/* benefits list (CSS check, no icon spam) */
.ben-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; margin-top: 26px; }
@media (max-width: 820px) { .ben-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ben-grid { grid-template-columns: 1fr; } }
.ben { position: relative; padding: 10px 0 10px 28px; font-size: 0.94rem; color: var(--text-2); border-bottom: 1px solid var(--border); }
.ben::before { content: ""; position: absolute; left: 3px; top: 14px; width: 13px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.ben b { color: var(--text); font-family: var(--font-sans); font-weight: 600; }

/* audience tags */
.aud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.aud span { font-size: 0.85rem; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; }

/* product CTA */
.prod-cta { margin-top: 40px; padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: center; }
.prod-cta h3 { font-size: 1.5rem; }
.prod-cta p { color: var(--muted); max-width: 60ch; margin: 10px auto 22px; }
.prod-cta .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* inline service CTA (subtle, contextual) */
.service-note { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--bg-soft); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); margin: 28px 0; }
.service-note .txt { flex: 1; }
.service-note b { font-family: var(--font-sans); font-size: 0.98rem; }
.service-note p { margin: 3px 0 0; font-size: 0.88rem; color: var(--muted); }
.service-note .btn { flex-shrink: 0; }
@media (max-width: 560px) { .service-note { flex-direction: column; align-items: flex-start; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 32px; padding: 48px 0 32px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h5 { font-family: var(--font-sans); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.footer-grid a { display: block; color: var(--text-2); font-size: 0.9rem; padding: 5px 0; }
.footer-grid a:hover { color: var(--accent-ink); }
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 40ch; margin-top: 12px; }
.footer-social { display: flex; gap: 8px; margin-top: 14px; }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.82rem; color: var(--muted); }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-shell { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.crumbs { font-size: 0.82rem; color: var(--muted); padding: 22px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs .cur { color: var(--text-2); }

.article-head { max-width: var(--read); margin: 0 auto; padding: 20px 0 8px; }
.article-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.14; letter-spacing: -0.02em; margin: 14px 0; }
.article-head .subtitle { font-size: 1.2rem; color: var(--text-2); line-height: 1.6; font-family: var(--font-serif); font-weight: 400; }
.article-head .head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--muted); }
.article-head .authorline { display: flex; align-items: center; gap: 10px; }
.article-head .authorline b { font-family: var(--font-sans); color: var(--text); font-weight: 600; font-size: 0.9rem; }
.share { display: flex; gap: 8px; margin-left: auto; }
.share a, .share button { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.share a:hover, .share button:hover { color: var(--text); border-color: var(--border-strong); }
.share svg { width: 16px; height: 16px; }

.article-cover { max-width: 1000px; margin: 24px auto 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 21 / 9; }

/* layout: content + sticky TOC */
.article-layout { display: grid; grid-template-columns: minmax(0, var(--read)) 260px; gap: 56px; justify-content: center; padding: 40px 0 20px; }
@media (max-width: 1080px) { .article-layout { grid-template-columns: minmax(0, var(--read)); } .toc-side { display: none; } }
.toc-side { position: sticky; top: 88px; align-self: start; height: max-content; }
.toc-side h4 { font-family: var(--font-sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.toc-side ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc-side li a { display: block; font-size: 0.85rem; color: var(--muted); padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; transition: color 0.15s, border-color 0.15s; }
.toc-side li a:hover { color: var(--text); }
.toc-side li a.active { color: var(--accent-ink); border-color: var(--accent); font-weight: 500; }

/* prose */
.prose { font-size: 1.06rem; color: var(--text-2); line-height: 1.78; }
.prose > p:first-of-type { font-size: 1.14rem; color: var(--text); }
.prose h2 { font-size: 1.7rem; margin: 2.4rem 0 0.9rem; letter-spacing: -0.01em; scroll-margin-top: 88px; color: var(--text); }
.prose h3 { font-family: var(--font-sans); font-size: 1.15rem; font-weight: 700; margin: 1.9rem 0 0.6rem; color: var(--text); }
.prose p { margin: 0 0 1.25rem; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { color: var(--text); font-weight: 700; }
.prose ul, .prose ol { margin: 0 0 1.3rem; padding-left: 1.3rem; }
.prose li { margin: 0.45rem 0; }
.prose li::marker { color: var(--muted-2); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.4rem 0; }
.prose blockquote { margin: 1.6rem 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); font-family: var(--font-serif); font-size: 1.24rem; line-height: 1.55; color: var(--text); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: 0.92rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border: 1px solid var(--border); }
.prose th { background: var(--bg-gray); font-family: var(--font-sans); font-weight: 700; color: var(--text); font-size: 0.82rem; }
.prose td { color: var(--text-2); }

/* code */
.prose code { font-family: var(--font-mono); font-size: 0.86em; background: var(--bg-gray); border: 1px solid var(--border); padding: 0.1rem 0.4rem; border-radius: 5px; color: var(--accent-ink); }
.codeblock { position: relative; margin: 0 0 1.5rem; }
.codeblock pre { background: #0f1216; border: 1px solid #20242b; border-radius: 12px; padding: 18px 18px; overflow-x: auto; margin: 0; }
.codeblock pre code { font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.7; color: #d6dae0; background: none; border: none; padding: 0; }
.copy-btn { position: absolute; top: 10px; right: 10px; font-family: var(--font-sans); font-size: 0.72rem; font-weight: 600; color: #9aa1ab; background: rgba(255,255,255,0.05); border: 1px solid #2a2f37; border-radius: 7px; padding: 5px 10px; cursor: pointer; transition: color 0.15s, background 0.15s; }
.copy-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* callouts */
.callout { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--radius-sm); margin: 1.6rem 0; border: 1px solid var(--border); background: var(--bg-soft); font-size: 0.96rem; color: var(--text-2); }
.callout .ic { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.callout .ic svg { width: 20px; height: 20px; }
.callout p:last-child { margin: 0; }
.callout b { color: var(--text); }
.callout.info { border-left: 3px solid #2563eb; } .callout.info .ic { color: #2563eb; }
.callout.tip { border-left: 3px solid #0d9488; } .callout.tip .ic { color: #0d9488; }
.callout.warn { border-left: 3px solid var(--accent); } .callout.warn .ic { color: var(--accent); }

/* takeaways */
.takeaways { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-gray); padding: 20px 22px; margin: 2rem 0; }
.takeaways h4 { font-family: var(--font-sans); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.takeaways ul { margin: 0; padding-left: 1.1rem; color: var(--text-2); font-size: 0.98rem; }

/* severity pill (inline) */
.sev { font-family: var(--font-sans); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 6px; }
.sev.crit { background: var(--accent-soft); color: var(--accent-ink); }
.sev.high { background: #fdf0e6; color: #b4530f; }
.sev.med { background: #fbf6e5; color: #96700d; }
.sev.low { background: #eaf1fb; color: #2557a7; }
[data-theme="dark"] .sev.high { background: rgba(180,83,15,0.18); color: #e69a5c; }
[data-theme="dark"] .sev.med { background: rgba(150,112,13,0.18); color: #d9b74e; }
[data-theme="dark"] .sev.low { background: rgba(37,87,167,0.2); color: #7da3e0; }

/* author bio */
.author-bio { display: flex; gap: 16px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin: 40px 0; }
.author-bio .av { width: 54px; height: 54px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-sans); flex-shrink: 0; font-size: 1.1rem; }
.author-bio b { font-family: var(--font-sans); font-size: 1rem; }
.author-bio .role { font-size: 0.82rem; color: var(--muted); }
.author-bio p { font-size: 0.92rem; color: var(--text-2); margin: 8px 0 0; }

/* related */
.related-wrap { border-top: 1px solid var(--border); padding-top: 40px; margin-top: 8px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.4s ease, transform 0.4s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .card:hover, .pick:hover, .cat-tile:hover, .btn:hover { transform: none; } html { scroll-behavior: auto; } }
