/* Laitest — ink atelier
   Distinctive editorial intelligence journal
   Themes: light | dark | darkest  (html[data-theme="…"]) */

:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3eee3;
  --bg-elev: #fffdf8;
  --bg-wash: #e8e0d0;
  --ink: #1a1712;
  --muted: #5e574c;
  --line: #d9d0c0;
  --line-strong: #c4b8a4;
  --accent: #0b4a52;
  --accent-bright: #12707c;
  --accent-soft: #dcecef;
  --warm: #b84a1f;
  --warm-soft: #f3e0d4;
  --sec: #8b2942;
  --def: #2d5a27;
  --oss: #3d4f8c;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(26, 23, 18, 0.04), 0 18px 48px -20px rgba(26, 23, 18, 0.18);
  --shadow-hover: 0 1px 0 rgba(26, 23, 18, 0.05), 0 28px 56px -18px rgba(26, 23, 18, 0.22);
  --header-bg: color-mix(in srgb, var(--bg) 78%, transparent);
  --theme-toggle-bg: var(--bg-elev);
  --glow: radial-gradient(ellipse 80% 60% at 12% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%),
    radial-gradient(ellipse 55% 45% at 92% 8%, color-mix(in srgb, var(--warm) 12%, transparent), transparent 50%);
  --font: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 720px;
  --wide: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121410;
  --bg-elev: #1a1c17;
  --bg-wash: #0c0e0b;
  --ink: #f2efe6;
  --muted: #a39e90;
  --line: #2e312a;
  --line-strong: #3d4138;
  --accent: #7ec8d0;
  --accent-bright: #9edde4;
  --accent-soft: #1a2f32;
  --warm: #e08a55;
  --warm-soft: #2a1c14;
  --sec: #e888a0;
  --def: #8fd48a;
  --oss: #9aafef;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 24px 56px -16px rgba(0, 0, 0, 0.55);
  --shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.04), 0 32px 64px -14px rgba(0, 0, 0, 0.65);
  --header-bg: color-mix(in srgb, var(--bg) 82%, transparent);
  --theme-toggle-bg: var(--bg-elev);
  --glow: radial-gradient(ellipse 70% 50% at 10% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%),
    radial-gradient(ellipse 50% 40% at 95% 5%, color-mix(in srgb, var(--warm) 12%, transparent), transparent 50%);
}

html[data-theme="darkest"] {
  color-scheme: dark;
  --bg: #060605;
  --bg-elev: #0d0d0c;
  --bg-wash: #000000;
  --ink: #eceae4;
  --muted: #8c887e;
  --line: #1c1c1a;
  --line-strong: #2a2a26;
  --accent: #8fd0dc;
  --accent-bright: #b0e4ec;
  --accent-soft: #0a181c;
  --warm: #e89a6a;
  --warm-soft: #1a120e;
  --sec: #e888a0;
  --def: #7dca7a;
  --oss: #a8b8f0;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.025), 0 28px 60px -12px rgba(0, 0, 0, 0.75);
  --shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.04), 0 36px 72px -10px rgba(0, 0, 0, 0.85);
  --header-bg: color-mix(in srgb, var(--bg) 88%, transparent);
  --theme-toggle-bg: var(--bg-elev);
  --glow: radial-gradient(ellipse 60% 45% at 8% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 50%),
    radial-gradient(ellipse 40% 35% at 98% 0%, color-mix(in srgb, var(--warm) 8%, transparent), transparent 45%);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --bg: #121410;
    --bg-elev: #1a1c17;
    --bg-wash: #0c0e0b;
    --ink: #f2efe6;
    --muted: #a39e90;
    --line: #2e312a;
    --line-strong: #3d4138;
    --accent: #7ec8d0;
    --accent-bright: #9edde4;
    --accent-soft: #1a2f32;
    --warm: #e08a55;
    --warm-soft: #2a1c14;
    --sec: #e888a0;
    --def: #8fd48a;
    --oss: #9aafef;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 24px 56px -16px rgba(0, 0, 0, 0.55);
    --shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.04), 0 32px 64px -14px rgba(0, 0, 0, 0.65);
    --header-bg: color-mix(in srgb, var(--bg) 82%, transparent);
    --theme-toggle-bg: var(--bg-elev);
    --glow: radial-gradient(ellipse 70% 50% at 10% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%),
      radial-gradient(ellipse 50% 40% at 95% 5%, color-mix(in srgb, var(--warm) 12%, transparent), transparent 50%);
  }
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-optical-sizing: auto;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Atmospheric wash + film grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: var(--glow);
  opacity: 1;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
html[data-theme="dark"] body::after,
html[data-theme="darkest"] body::after {
  opacity: 0.07;
  mix-blend-mode: soft-light;
}

body > * { position: relative; z-index: 1; }

::selection {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--ink);
}

a {
  color: var(--accent-bright, var(--accent));
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--warm); }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.35rem; }
.narrow { max-width: var(--max); }

/* ── Header ── */
.site-header {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  flex-wrap: wrap;
}
.header-end {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.brand:hover { color: var(--ink); }
.brand-mark,
.brand-mark-img {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 8px;
  display: block;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 4px 14px color-mix(in srgb, var(--accent) 22%, transparent);
}
.brand-text {
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 550;
  font-variation-settings: "SOFT" 40, "WONK" 0.4;
  letter-spacing: -0.03em;
}
.brand-tag {
  font-family: var(--sans);
  color: var(--muted);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 0.1rem;
  opacity: 0.9;
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
}
@media (max-width: 640px) {
  .brand-tag { display: none; }
}

nav {
  display: flex;
  gap: 0.15rem 0.15rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  font-weight: 500;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
nav a:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--line) 45%, transparent);
}
nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Theme switcher */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--theme-toggle-bg);
  box-shadow: var(--shadow);
}
.theme-switch button {
  appearance: none;
  border: 0;
  margin: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: transparent;
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  line-height: 1.2;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease);
}
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}
.theme-switch button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
@media (max-width: 520px) {
  .theme-switch button .theme-label-long { display: none; }
  .theme-switch button .theme-label-short { display: inline; }
  .brand span { display: none; }
}
@media (min-width: 521px) {
  .theme-switch button .theme-label-short { display: none; }
}

/* ── Hero ── */
.hero {
  padding: 3.25rem 0 2.25rem;
  position: relative;
}
.hero::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 2.25rem;
  background: linear-gradient(90deg, transparent, var(--line-strong) 12%, var(--line-strong) 88%, transparent);
  opacity: 0.85;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm);
  margin: 0 0 1rem;
}
.hero .eyebrow::before {
  content: "";
  width: 1.35rem;
  height: 1px;
  background: var(--warm);
  opacity: 0.7;
}
.hero h1 {
  font-family: var(--font);
  font-size: clamp(2.15rem, 5.2vw, 3.35rem);
  font-weight: 500;
  font-variation-settings: "SOFT" 50, "WONK" 0.6, "opsz" 72;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 0 1rem;
  max-width: 16ch;
  text-wrap: balance;
}
.hero p.lede {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.12rem);
  line-height: 1.65;
  max-width: 38rem;
  margin: 0;
  font-weight: 400;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 4%, transparent);
}
.pill:first-child {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  color: var(--accent);
}

/* ── Trend panel ── */
.trend-panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.4rem 1.15rem;
  margin: 1.75rem 0 0.75rem;
  position: relative;
  overflow: hidden;
}
.trend-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  opacity: 0.85;
}
.trend-panel h2 {
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 0.3rem;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 40, "opsz" 36;
}
.trend-panel .sub {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  font-size: 0.76rem;
  margin-bottom: 0.65rem;
}
.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
}
.trend-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--bg-elev) 40%, transparent);
}
.chart-wrap { width: 100%; overflow-x: auto; }
.chart-wrap svg { display: block; width: 100%; min-width: 520px; height: auto; }
.chart-wrap .axis { fill: var(--muted); font-size: 10px; font-family: var(--mono); }
.chart-wrap .gridline { stroke: var(--line); stroke-width: 1; }
.chart-wrap .point { cursor: pointer; transition: r 0.15s var(--ease); }
.chart-wrap .point:hover { r: 6; }

/* ── Post cards ── */
.posts {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.5rem 0 3rem;
}
.post-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 1.15rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s var(--ease);
  position: relative;
}
.post-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--warm));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
}
.post-card:hover::before { opacity: 1; }
@media (max-width: 640px) {
  .post-card { grid-template-columns: 1fr; }
  .post-card::before { top: 0; bottom: auto; left: 12%; right: 12%; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
}
.thumb-wrap {
  position: relative;
  width: 132px;
}
.post-thumb {
  width: 132px;
  height: 132px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-wash);
  display: block;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent);
}
.post-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  padding: 0.5rem;
  width: 100%;
  min-height: 96px;
  border: 1px dashed var(--line);
}
.thumb-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  right: 6px;
  font-size: 0.58rem;
  font-weight: 650;
  text-align: center;
  padding: 0.2rem 0.3rem;
  border-radius: 7px;
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  color: #fff;
  letter-spacing: 0.03em;
  backdrop-filter: blur(6px);
}
.post-body { min-width: 0; }
.post-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
  margin-bottom: 0.4rem;
}
.cat {
  font-size: 0.66rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}
.cat.security { background: color-mix(in srgb, var(--sec) 15%, var(--bg)); color: var(--sec); }
.cat.product_security { background: color-mix(in srgb, #b45309 18%, var(--bg)); color: #b45309; }
.cat.defense { background: color-mix(in srgb, var(--def) 15%, var(--bg)); color: var(--def); }
.cat.open_source, .cat.agent_infra { background: color-mix(in srgb, var(--oss) 15%, var(--bg)); color: var(--oss); }
.cat.privacy { background: color-mix(in srgb, var(--warm) 15%, var(--bg)); color: var(--warm); }
.post-author { font-size: 0.88rem; font-weight: 600; }
.post-author a { color: inherit; text-decoration: none; }
.post-author a:hover { color: var(--accent); }
.post-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  margin: 0.5rem 0 0.6rem;
}
.metric {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.26rem 0.52rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 70%, var(--bg-elev));
  border: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
}
.metric strong { font-weight: 700; }
.metric.hot {
  border-color: color-mix(in srgb, var(--warm) 45%, var(--line));
  background: color-mix(in srgb, var(--warm) 12%, var(--bg));
}
.metric .label { color: var(--muted); margin-right: 0.25rem; }

.post-blurb {
  font-size: 0.94rem;
  color: var(--ink);
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
}
.post-links { font-size: 0.82rem; margin: 0.3rem 0; }
.post-links a { margin-right: 0.85rem; font-weight: 500; }
.lesson-chip {
  font-size: 0.84rem;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding: 0.15rem 0 0.15rem 0.65rem;
  margin: 0.5rem 0 0.55rem;
  font-style: italic;
  font-family: var(--font);
  font-variation-settings: "SOFT" 60, "opsz" 18;
}

details.post-full {
  margin-top: 0.4rem;
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
}
details.post-full summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
  user-select: none;
}
details.post-full summary::-webkit-details-marker { display: none; }
details.post-full summary::before { content: "▸ "; }
details.post-full[open] summary::before { content: "▾ "; }
details.post-full .full-text {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  white-space: pre-wrap;
  background: color-mix(in srgb, var(--bg) 80%, var(--bg-elev));
  border-radius: 12px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  color: var(--ink);
  max-height: 320px;
  overflow-y: auto;
  line-height: 1.55;
}

details.post-adopt {
  margin-top: 0.55rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.55rem;
}
details.post-adopt summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--warm);
  list-style: none;
  user-select: none;
}
details.post-adopt summary::-webkit-details-marker { display: none; }
details.post-adopt summary::before { content: "▸ "; }
details.post-adopt[open] summary::before { content: "▾ "; }
.adopt-help {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.5rem 0 0.55rem;
  line-height: 1.45;
}
.adopt-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.btn-copy {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.btn-copy:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.btn-copy.copied {
  background: color-mix(in srgb, var(--def) 22%, var(--bg-elev));
  color: var(--def);
  border-color: var(--def);
}
textarea.adopt-prompt {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 80%, var(--bg-elev));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  resize: vertical;
  min-height: 10rem;
  max-height: 28rem;
}

/* ── Threat radar ── */
.threat-radar {
  margin: 0.5rem auto 0.75rem;
  padding: 0 0 0.5rem;
}
.threat-radar .radar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  margin-bottom: 0.45rem;
}
.threat-radar h2 {
  font-family: var(--font);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.025em;
  font-variation-settings: "SOFT" 45, "opsz" 36;
}
.threat-radar .radar-link {
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
}
.threat-radar .radar-link:hover { color: var(--accent); }
.threat-radar .sub {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0 0 0.9rem;
  max-width: 48rem;
  line-height: 1.5;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}
.threat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.threat-table th,
.threat-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.threat-table th {
  font-size: 0.7rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: color-mix(in srgb, var(--bg) 55%, var(--bg-elev));
}
.threat-table tbody tr {
  transition: background 0.2s var(--ease);
}
.threat-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
}
.threat-table tr:last-child td { border-bottom: none; }
.ti-title a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.4;
}
.ti-title a:hover { color: var(--accent); text-decoration: underline; }
.ti-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.25rem;
  font-family: var(--mono);
}
.sev-pill {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.26rem 0.55rem;
  border-radius: 999px;
  background: var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.sev-critical { background: color-mix(in srgb, var(--sec) 28%, transparent); color: var(--sec); }
.sev-high { background: color-mix(in srgb, var(--warm) 28%, transparent); color: var(--warm); }
.sev-elevated, .sev-medium { background: color-mix(in srgb, #b45309 22%, transparent); color: #b45309; }
.sev-needs_score { background: color-mix(in srgb, var(--oss) 22%, transparent); color: var(--oss); }
.sev-low { background: color-mix(in srgb, var(--def) 22%, transparent); color: var(--def); }
.sev-watch, .sev-unknown { background: var(--accent-soft); color: var(--accent); }

.urgency-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.95rem;
  margin: 0 0 0.9rem;
  font-size: 0.74rem;
  color: var(--muted);
  max-width: 56rem;
}
.urgency-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.urgency-legend .sev-pill {
  font-style: normal;
  font-size: 0.62rem;
}
.th-note {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-size: 0.68rem;
}
.urgency-meta {
  margin-top: 0.3rem;
  font-size: 0.66rem;
  color: var(--muted);
  line-height: 1.3;
  max-width: 9.5rem;
  font-family: var(--mono);
}

/* ── Grid / cards ── */
.grid {
  display: grid;
  gap: 1.1rem;
  padding: 1.75rem 0 2.75rem;
}
@media (min-width: 700px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
}
.card h2, .card h3 {
  font-family: var(--font);
  letter-spacing: -0.025em;
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  font-weight: 500;
  font-variation-settings: "SOFT" 40, "opsz" 28;
  position: relative;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  position: relative;
}
.card .date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--warm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  position: relative;
}
.card a.stretch { color: inherit; text-decoration: none; display: block; }

.section-title {
  font-family: var(--font);
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 2.25rem 0 0.35rem;
  font-variation-settings: "SOFT" 45, "opsz" 40;
}
.section-title + .section-sub {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 36rem;
}

/* ── Prose ── */
article.prose {
  padding: 2.5rem 0 3.5rem;
  max-width: var(--max);
  margin: 0 auto;
}
article.prose h1 {
  font-family: var(--font);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  margin: 0 0 0.75rem;
  font-variation-settings: "SOFT" 50, "opsz" 48;
  line-height: 1.12;
}
article.prose h2 {
  font-family: var(--font);
  font-size: 1.3rem;
  font-weight: 500;
  margin: 2rem 0 0.6rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
  letter-spacing: -0.02em;
}
article.prose p { color: var(--ink); }
article.prose li { margin: 0.35rem 0; }
.lessons {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 1.4rem 0;
  border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--line));
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.25rem 0 3rem;
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 1rem;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg-wash) 40%, transparent));
}
.site-footer p { margin: 0 0 0.4rem; max-width: 40rem; line-height: 1.55; }
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--line-strong) 70%, transparent);
}
.site-footer a:hover { color: var(--accent); }

/* ── Timeline ── */
.timeline {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 1.35rem 0 0;
}
.timeline a {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.38rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  background: var(--bg-elev);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease);
  letter-spacing: -0.01em;
}
.timeline a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ── Scoreboard ── */
.scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1.35rem 0 0;
}
.scoreboard .stat {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), border-color 0.2s var(--ease);
}
.scoreboard .stat:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}
.scoreboard .stat .n {
  font-family: var(--font);
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variation-settings: "SOFT" 30, "opsz" 36;
  line-height: 1.1;
}
.scoreboard .stat .l {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
  font-weight: 600;
}

/* ── Motion (respect reduced motion) ── */
@media (prefers-reduced-motion: no-preference) {
  .hero h1,
  .hero .lede,
  .hero .eyebrow,
  .hero .meta-row,
  .hero .timeline {
    animation: rise 0.7s var(--ease) both;
  }
  .hero .lede { animation-delay: 0.06s; }
  .hero .eyebrow { animation-delay: 0s; }
  .hero .meta-row { animation-delay: 0.12s; }
  .hero .timeline { animation-delay: 0.18s; }
  .threat-radar,
  .trend-panel,
  .posts .post-card,
  .grid .card {
    animation: rise 0.65s var(--ease) both;
  }
  .threat-radar { animation-delay: 0.1s; }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* code in body */
code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: color-mix(in srgb, var(--line) 45%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}
