/* ==============================================================
   nodewire.net — modern tech publication (CNET-inspired)
   Light surface · broadcast red · dense card grid · sidebar rail
   ============================================================== */

:root {
  /* Surfaces */
  --bg:         #ffffff;
  --bg-2:       #f6f7f9;
  --bg-3:       #eef0f4;
  --ink:        #0a0f1c;
  --ink-2:      #2b3448;
  --ink-3:      #5a6478;
  --ink-4:      #8893a6;
  --rule:       #e2e6ee;
  --rule-2:     #cfd4df;

  /* Accent — broadcast red */
  --accent:     #e31b23;
  --accent-2:   #b0141b;
  --accent-soft:#ffe7e8;

  /* Status */
  --critical:   #d8222a;
  --high:       #ed7d15;
  --medium:     #efbb13;
  --low:        #1f8f3e;
  --info:       #1f6feb;

  /* Type */
  --font-sans:  'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-head:  'Source Serif 4', 'Charter', 'Georgia', serif;
  --font-mono:  'JetBrains Mono', ui-monospace, Menlo, monospace;

  --maxw:       1280px;
  --gutter:     40px;
}

[data-theme="dark"] {
  --bg:         #0c0f16;
  --bg-2:       #151a25;
  --bg-3:       #1d2330;
  --ink:        #f3f5f9;
  --ink-2:      #c8ced9;
  --ink-3:      #8d97a8;
  --ink-4:      #626d81;
  --rule:       #232b3a;
  --rule-2:     #303a4d;
  --accent-soft:#2a0c0e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Belt-and-braces against accidental horizontal overflow. clip is the
 * modern equivalent of hidden but also pins the layout viewport so a
 * runaway child can't widen the page (with hidden, body width still
 * grows and right-padding gets sucked off-screen — exactly the bug we
 * were chasing on mobile article pages). */
html, body { overflow-x: clip; max-width: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; }
p { margin: 0 0 0.7em; }
/* Global list reset. Includes <li> because some WordPress fragments
 * (wp_nav_menu with a custom items_wrap, widget output, etc.) emit
 * orphan list items without a <ul> parent — those still render the
 * default disc bullet unless we strip it from <li> directly. Article
 * lists re-opt-in to bullets via .entry-content rules below. */
ul, ol { list-style: none; padding: 0; margin: 0; }
li { list-style: none; }

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* WordPress accessibility helper. Core enqueues markup that relies on
 * this class (search labels, comment-form labels, "skip" links) and
 * expects the theme to provide it. We didn't, so the search <label>
 * was rendering as a giant "Search" headline above the input. */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background-color: var(--bg);
  clip: auto !important;
  -webkit-clip-path: none;
  clip-path: none;
  color: var(--ink);
  display: block;
  font-size: 14px;
  font-weight: 600;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 12px 18px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ================================================================
   TOP RIBBON — breaking bar, like CNET's "The Daily Charge"

   This bar is intentionally an "always-dark surface" regardless of
   light/dark theme. We used to read background from var(--ink), but
   --ink inverts to near-white in dark mode, while .ribbon's text
   colors were hard-coded white — producing white-on-white. Locking
   the surface palette here removes the dependence on the theme.
   ================================================================ */
.ribbon {
  background: #0a0f1c;
  color: #f3f5f9;
  font-size: 12px;
  line-height: 1.4;
  padding: 9px 0;
  border-bottom: 1px solid #000;
}
.ribbon .shell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 22px;
  flex-wrap: nowrap;
}
.ribbon .tag {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 2px;
  flex-shrink: 0;
}
.ribbon .ribbon-stories {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ribbon .ribbon-stories a {
  overflow: hidden;
  text-overflow: ellipsis;
}
.ribbon a { color: #e4e7ef; }
.ribbon a:hover { color: #fff; text-decoration: underline; }
.ribbon .sep { color: #626d81; flex-shrink: 0; }
.ribbon .right { margin-left: auto; display: flex; gap: 12px; color: #8d97a8; flex-shrink: 0; font-size: 11px; }
.ribbon .right a { color: #8d97a8; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.ribbon .right a:hover { color: #fff; }

/* ================================================================
   HEADER — logo, search, theme
   ================================================================ */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.masthead .shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 18px var(--gutter);
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.logo .wire { color: var(--accent); font-style: italic; }
.logo .dot {
  width: 10px; height: 10px;
  background: var(--accent);
  margin-left: 2px;
  display: inline-block;
  transform: translateY(-1px);
  border-radius: 1px;
}
.logo small {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--rule);
  transform: translateY(-2px);
}

.search {
  position: relative;
  max-width: 520px;
  width: 100%;
  justify-self: center;
}
/* Inline SVG magnifier as a background-image on the input itself.
 * The previous approach drew the icon with two pseudo-elements at
 * absolute pixel offsets — at the slightest input-height drift the
 * "handle" detached from the "ring" and the result read as a tiny
 * loading spinner. background-image stays glued to the input no
 * matter what padding/font-size the form inherits. */
.search input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  background-color: var(--bg-2);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a6478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  background-repeat: no-repeat;
  background-position: 14px center;
  background-size: 16px 16px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background-color 0.15s;
}
.search input::placeholder { color: var(--ink-4); }
.search input:focus {
  border-color: var(--accent);
  background-color: var(--bg);
}
/* Dark theme: use a lighter stroke so the magnifier stays visible
 * against the darker bg-2 without losing contrast. */
[data-theme="dark"] .search input {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238d97a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
}

.mast-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-3);
}
.mast-tools button {
  background: none;
  border: 1px solid var(--rule-2);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mast-tools button:hover { border-color: var(--accent); color: var(--accent); }
.mast-tools .theme-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}
.mast-tools .theme-toggle svg { display: block; }
.mast-tools .sub {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}
.mast-tools .sub:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

/* Hamburger button — only shown on narrow viewports */
.mast-tools .nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--rule-2);
  background: var(--bg);
  position: relative;
}
.mast-tools .nav-toggle span {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .15s ease, top .2s ease;
}
.mast-tools .nav-toggle span:nth-child(1) { top: 12px; }
.mast-tools .nav-toggle span:nth-child(2) { top: 18px; }
.mast-tools .nav-toggle span:nth-child(3) { top: 24px; }
body.nav-open .mast-tools .nav-toggle span:nth-child(1) { top: 18px; transform: rotate(45deg); }
body.nav-open .mast-tools .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .mast-tools .nav-toggle span:nth-child(3) { top: 18px; transform: rotate(-45deg); }

/* ================================================================
   NAV BAR — category strip
   ================================================================ */
.navbar {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 40;
}
.navbar .shell {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.navbar .shell::-webkit-scrollbar { display: none; }
.navbar a {
  padding: 14px 14px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.navbar a:hover { color: var(--accent); }
.navbar a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.navbar .trending {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 20px;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}
.navbar .trending b {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.navbar .trending a { padding: 6px 8px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-2); border: none; }
/* Trending menu can grow large via Appearance → Menus; keep at most three
 * pills visible so the navbar never overflows on laptop-class screens.
 * Using nth-child here because nth-of-type counts can be fooled by some
 * minifiers; this counts every direct child and the <b>Trending</b> kicker
 * is child #1, so the first three <a>s are 2/3/4 and the 4th <a> onwards
 * (5th child and beyond) gets hidden. */
.navbar .trending > *:nth-child(n+5) { display: none !important; }

/* ================================================================
   HERO LEDE — compact lead story + sidebar stories
   ================================================================ */
.hero-lede {
  padding: 20px 0 12px;
}
.hero-lede .shell {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
  align-items: start;
}

.lede-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.lede-main .imgwrap {
  position: relative;
  width: 100%;
  height: 280px;
  background: var(--bg-3);
  overflow: hidden;
  border-radius: 2px;
}
.lede-main .cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 4px;
}
.lede-main h1 {
  font-family: var(--font-head);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--ink);
}
.lede-main h1:hover { color: var(--accent); cursor: pointer; }
.lede-main .dek {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 66ch;
}
.lede-main .byline {
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}
.lede-main .byline .av {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.lede-main .byline b { color: var(--ink); font-weight: 600; }
.lede-main .byline .dot { width: 3px; height: 3px; background: var(--ink-4); border-radius: 50%; display: inline-block; }

.lede-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.lede-side .item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  min-width: 0;
}
.lede-side .item:last-child { border-bottom: none; padding-bottom: 0; }
.lede-side .item .imgwrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-3);
  overflow: hidden;
  border-radius: 2px;
}
.lede-side .item .cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.lede-side .item h3 {
  font-family: var(--font-head);
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}
.lede-side .item h3:hover { color: var(--accent); cursor: pointer; }
.lede-side .item .meta {
  font-size: 11px;
  color: var(--ink-3);
}

/* ================================================================
   ADVISORY BAR — critical CVE advisory strip
   ================================================================ */
.advisory {
  background: var(--accent-soft);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 24px;
}
.advisory .shell {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  font-size: 14px;
  flex-wrap: wrap;
}
.advisory .pill {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  white-space: nowrap;
}
.advisory .adv-list {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.advisory .adv-list a {
  color: var(--ink);
  font-weight: 500;
}
.advisory .adv-list a:hover { color: var(--accent); }
.advisory .adv-list code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-right: 6px;
}
.advisory .see-all {
  margin-left: auto;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

/* ================================================================
   MAIN LAYOUT — content + sidebar rail
   ================================================================ */
.main {
  padding: 32px 0 48px;
  display: block; /* main is a block by default but we ship as <main> */
}
.main .shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
}
.main .content { min-width: 0; }
.main .content--archive {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.main .content--home {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.rv-hero__meta {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 8px;
}
.rv-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.main .rail {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.archive-desc {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 60ch;
}
.pagination {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  justify-content: center;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Skip-to-content link for keyboard / screen-reader users.
 * Hidden until focused, then jumps into view top-left. */
.skip-link {
  position: absolute;
  left: -10000px;
  top: 8px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 16px; }

/* ================================================================
   SECTION HEADER — "Latest from Primers"
   ================================================================ */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}
.sec-head h2 {
  font-family: var(--font-head);
  font-size: 26px;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--ink);
  position: relative;
}
.sec-head h2::before {
  content: '';
  display: inline-block;
  width: 4px; height: 20px;
  background: var(--accent);
  margin-right: 10px;
  transform: translateY(2px);
}
.sec-head .more {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ================================================================
   CARD GRID — varies by section
   ================================================================ */
/* Magazine-style "row" containers. Flex with max-width keeps each card in
 * a sensible width band: when the cluster has fewer posts than the column
 * count the row simply stops at the last card instead of stretching a
 * single card across the whole section or leaving hollow grid cells. */
.grid-3,
.grid-4 {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.grid-3 > * { flex: 1 1 260px; max-width: 360px; min-width: 0; }
.grid-4 > * { flex: 1 1 220px; max-width: 320px; min-width: 0; }
.grid-2-1 {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
}
.card h3, .card .cat, .card .meta { overflow-wrap: break-word; }
.card .imgwrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-3);
  overflow: hidden;
  border-radius: 2px;
  width: 100%;
}
.card > a { display: block; min-width: 0; }
.card .imgwrap .dur {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 3px 6px;
  border-radius: 2px;
}
.card .cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.card h3 {
  font-family: var(--font-head);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  font-weight: 700;
  color: var(--ink);
}
.card:hover h3 { color: var(--accent); }
.card .meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: auto;
}
.card .meta b { color: var(--ink-2); font-weight: 500; }

/* Card: compact (no image) for rubric lists */
.card-compact {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.card-compact:first-child { padding-top: 0; }
.card-compact:last-child { border-bottom: none; }
.card-compact .imgwrap {
  position: relative;
  width: 120px;
  flex-shrink: 0;
  aspect-ratio: 4 / 3;
  background: var(--bg-3);
  border-radius: 2px;
  overflow: hidden;
}
.card-compact .body { display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.card-compact .cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.card-compact h4 {
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
}
.card-compact:hover h4 { color: var(--accent); }
.card-compact .meta { font-size: 12px; color: var(--ink-3); margin-top: auto; }

/* Section: tight list for News ticker */
.news-list { display: flex; flex-direction: column; }
.news-list .row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.news-list .row:last-child { border-bottom: none; }
.news-list .time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}
.news-list .row:hover h4 { color: var(--accent); }
.news-list h4 {
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
}
.news-list .cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 3px 8px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  white-space: nowrap;
}
.news-list .cat.cve { color: var(--accent); border-color: var(--accent); }

/* ================================================================
   CVE TABLE — proper table treatment
   ================================================================ */
.cve-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}
.cve-table tbody td { word-break: break-word; overflow-wrap: anywhere; }
.cve-table thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 2px solid var(--ink);
}
.cve-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.cve-table tbody tr { cursor: pointer; }
.cve-table tbody tr:hover { background: var(--bg-2); }
.cve-table tbody tr:hover .title { color: var(--accent); }
.cve-table .cve-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}
.cve-table .title {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  display: block;
}
.cve-table .subtitle { color: var(--ink-3); font-size: 13px; margin-top: 3px; }
.cve-table .sev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.cve-table .sev::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.cve-table .sev.critical { color: var(--critical); }
.cve-table .sev.high     { color: var(--high); }
.cve-table .sev.medium   { color: var(--medium); }
.cve-table .sev.low      { color: var(--low); }
.cve-table .score {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
}
.cve-table .status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--rule);
  padding: 3px 7px;
  border-radius: 3px;
  /* Long shell snippets like `lsof -ti:3000 | xargs kill -9` must wrap
   * inside the 160px Status column instead of trailing past the row's
   * hover highlight. break-word lets us split on whitespace; anywhere
   * is the safety net for tokens with no break opportunity. */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* ================================================================
   RAIL MODULES — sidebar cards
   ================================================================ */
.rail-mod {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: 2px;
  padding: 18px 20px;
}
.rail-mod h3 {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.mostread .item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--rule);
  cursor: pointer;
}
.mostread .item:last-child { border-bottom: none; }
.mostread .item .n {
  font-family: var(--font-head);
  font-size: 28px;
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.mostread .item h4 {
  font-family: var(--font-head);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.mostread .item:hover h4 { color: var(--accent); }
.mostread .item .meta { font-size: 11px; color: var(--ink-3); }
.mostread .item .meta .cat { color: var(--ink-2); font-weight: 600; }

.newsletter {
  background: linear-gradient(165deg, #0a1424, #1c2941);
  color: #fff;
  border: none;
  padding: 22px 22px 24px;
}
.newsletter h3 { color: #ff5961; border-color: rgba(255,255,255,0.18); }
.newsletter p { color: #e3e8f0; font-size: 14px; line-height: 1.5; margin-bottom: 14px; }
.newsletter .fm {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
}
.newsletter input {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 10px;
  color: #fff;
  font: inherit;
  outline: none;
  min-width: 0;
}
.newsletter input::placeholder { color: #c1c9d8; opacity: 1; }
.newsletter button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 14px;
  font: 600 13px/1 var(--font-sans);
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
}
.newsletter button:hover { background: var(--accent-2); }
.newsletter .note {
  font-size: 11px;
  color: #b3bccc;
  margin-top: 10px;
  margin-bottom: 0;
}

.rail-list { display: flex; flex-direction: column; }
.rail-list .row {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.rail-list .row:last-child { border-bottom: none; }
.rail-list .row .cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.rail-list .row h4 {
  font-family: var(--font-head);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
}
.rail-list .row:hover h4 { color: var(--accent); }
.rail-list .row .meta { font-size: 11px; color: var(--ink-3); margin-top: 4px; }

/* ================================================================
   REVIEWS — rating widget
   ================================================================ */
/* Hero card for the Comparisons section. We stack image on top of the
 * body across all viewports — the hero column inside .grid-2-1 is too
 * narrow on laptop/tablet for a side-by-side image+body split, and the
 * stacked layout reads like a magazine cover on every width. */
.rv-hero {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
}
.rv-hero > a { display: block; }
.rv-hero .imgwrap {
  position: relative;
  background: var(--bg-3);
  aspect-ratio: 16 / 8;
  min-height: 220px;
  width: 100%;
}
.rv-hero .body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rv-hero .cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.rv-hero h3 {
  font-family: var(--font-head);
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--ink);
}
.rv-hero .dek { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.rating {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.rating > div:last-child { flex: 1 1 200px; min-width: 0; }
.rating .score {
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.rating .score sub {
  font-size: 16px;
  color: var(--ink-3);
  font-weight: 400;
  vertical-align: baseline;
}
.rating .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 3px;
}
.rating .verdict {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

/* ================================================================
   TOOLS — terminal-like card
   ================================================================ */
.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.tools-grid > * { flex: 1 1 280px; max-width: 380px; min-width: 0; }
.tool-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 18px 20px 20px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.tool-card:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.tool-card .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  min-width: 0;
}
.tool-card .head .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-card .head .tag { flex-shrink: 0; }
.tool-card .name {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.tool-card .tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  background: var(--bg-3);
  color: var(--ink-3);
}
.tool-card .tag.new { background: var(--accent-soft); color: var(--accent); }
.tool-card .tag.hot { background: var(--accent); color: #fff; }
.tool-card h4 {
  font-family: var(--font-head);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.tool-card .tc-body {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 10px 12px;
  margin-bottom: 10px;
  /* Wrap long lines instead of producing a horizontal scrollbar that
   * leaks content outside the card. We still preserve hard line breaks
   * (\n) thanks to pre-wrap, but soft-wrap on whitespace and break very
   * long tokens inside code/URLs. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 5.4em; /* ~3 lines: keeps homepage cards uniform */
  overflow: hidden;
  position: relative;
}
.tool-card .tc-body::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 1.6em;
  background: linear-gradient(to bottom, transparent, var(--bg-2));
  pointer-events: none;
}
.tool-card .tc-body .cm { color: var(--ink-4); }
.tool-card .tc-body .kw { color: var(--accent); font-weight: 600; }
.tool-card .meta { font-size: 12px; color: var(--ink-3); }

/* ================================================================
   FOOTER
   ================================================================ */
/* Footer is also an "always-dark" surface. Same fix as .ribbon —
 * background was reading var(--ink) which flips to near-white in dark
 * mode, so all of the hard-coded light text below ended up invisible
 * on a near-white background. Locking the palette to absolute values
 * keeps the broadcast look in both themes. */
.footer {
  background: #0a0f1c;
  color: #c8ced9;
  padding: 48px 0 24px;
  margin-top: 40px;
  font-size: 14px;
}
.footer .shell { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); gap: 32px; }
.footer .brand {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.footer .brand .wire { color: var(--accent); font-style: italic; }
.footer p { color: #8d97a8; font-size: 13px; line-height: 1.5; max-width: 36ch; }
.footer h5 {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer ul li { margin-bottom: 8px; }
.footer ul li a { color: #c8ced9; font-size: 13px; }
.footer ul li a:hover { color: var(--accent); }
.footer .copy {
  grid-column: 1 / -1;
  border-top: 1px solid #303a4d;
  padding-top: 20px;
  margin-top: 24px;
  font-size: 12px;
  color: #626d81;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer .copy a { color: #8d97a8; }
.footer .copy .ftr-nav { display: flex; gap: 16px; }

/* ================================================================
   PLACEHOLDER IMAGES — colored gradient + icon
   ================================================================ */
.ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  font-weight: 600;
  text-align: center;
  padding: 20px;
  background-size: cover;
  background-position: center;
}
.ph.a { background: linear-gradient(135deg, #0a1f3a 0%, #1a3a6b 45%, #e31b23 100%); }
.ph.b { background: linear-gradient(160deg, #2a0c3a 0%, #5a2a7a 55%, #e31b23 100%); }
.ph.c { background: linear-gradient(120deg, #0a2a2a 0%, #15625a 50%, #1d9480 100%); }
.ph.d { background: linear-gradient(155deg, #3a1a0a 0%, #8a3a1a 50%, #e35b15 100%); }
.ph.e { background: linear-gradient(140deg, #0a1220 0%, #1f2c45 60%, #5a6478 100%); }
.ph.f { background: linear-gradient(135deg, #3a0a0a 0%, #8a1015 55%, #e31b23 100%); }
.ph.g { background: linear-gradient(150deg, #0f2a10 0%, #1f5a2a 50%, #3eaa4a 100%); }
.ph.h { background: linear-gradient(125deg, #1a1a2a 0%, #3a3a5a 60%, #8a8ab0 100%); }
.ph .overlay {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.14), transparent 40%),
    repeating-linear-gradient(45deg, transparent 0 20px, rgba(0,0,0,0.05) 20px 21px);
  pointer-events: none;
}
.ph .mark {
  position: relative;
  z-index: 1;
  font-size: 11px;
  opacity: 0.75;
  padding: 4px 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ================================================================
   SUBPAGE HERO — category landing pages
   ================================================================ */
.sub-hero {
  border-bottom: 1px solid var(--rule);
  padding: 40px 0 28px;
  background: var(--bg-2);
}
.sub-hero .crumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.sub-hero .crumbs a { color: var(--ink-3); }
.sub-hero .crumbs a:hover { color: var(--accent); }
.sub-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(40px, 4vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}
.sub-hero h1 em { color: var(--accent); font-style: italic; }
.sub-hero .dek {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 72ch;
}
.sub-hero .stats {
  display: flex;
  gap: 32px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}
.sub-hero .stats .s {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sub-hero .stats .s b {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.sub-hero .stats .s span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ================================================================
   INLINE SVG COVERS (replaces empty .ph blocks)
   ================================================================ */
.imgwrap.nw-cover-wrap { overflow: hidden; }
.nw-cover {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  border-radius: 2px;
}

/* ================================================================
   ADVISORY (Hot fixes ribbon) — clean compact rows
   ================================================================ */
.advisory .adv-list {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
}
.advisory .adv-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}
.advisory .adv-item code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.advisory .adv-item .adv-arrow { color: var(--ink-3); font-weight: 600; }
.advisory .adv-item .adv-tail {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
}
.advisory .adv-item:hover { color: var(--accent); }
.advisory .adv-item:hover .adv-tail { color: var(--accent); }

/* Surface chips in CVE table — one pill per stack tag so the background
 * always tightly hugs its label, never trailing under wrapped text. */
.cve-table .surface-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  max-width: 100%;
}
.cve-table .surface {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--rule);
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.4;
}

/* ================================================================
   AUTHOR HERO — top of /author/<slug>/
   ================================================================ */
.author-hero {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  padding: 28px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}
.author-hero__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.author-hero__body { min-width: 0; }
.author-hero__body .kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.author-hero__body h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 10px;
}
.author-hero__body .bio {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 12px;
  max-width: 70ch;
}
.author-hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
}
.author-hero__links a {
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 1px;
}
.author-hero__links a:hover { color: var(--accent); border-color: var(--accent); }

/* ================================================================
   ARTICLE FRAME — single-post / page wrapper.
   Lives here (not as inline style on the <article>) so phone-width
   media queries can tune title size, dek, and meta-strip rhythm.
   ================================================================ */
.post-frame {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
/* Hero cover for the article header. Same shape as the homepage lede
 * (which uses .lede-main .imgwrap), but scoped to .post-frame so it
 * also covers static pages and never inherits from the homepage rule
 * if we ever change the masthead. */
.post-frame > .imgwrap {
  position: relative;
  width: 100%;
  height: 280px;
  background: var(--bg-3);
  overflow: hidden;
  border-radius: 2px;
}
.post-frame > .cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 4px;
}
.post-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 16px 0 12px;
}
.post-dek {
  font-family: var(--font-head);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 14px;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 18px 0 24px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink-2);
}
.post-meta b { color: var(--ink); font-weight: 600; }
.post-meta code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-3);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--ink);
}
.post-tags {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.post-tags a {
  padding: 4px 10px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
}
.post-tags a:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.post-comments {
  max-width: 760px;
  margin: 48px auto 0;
}

/* ================================================================
   ENTRY CONTENT — long-form WordPress block content inside articles.
   Tightens the column width, lifts line-height and softens the body
   colour so 1500-2000-word reads aren't a wall of black on white.
   Tables, pre, images, and the FAQ accordion all live below.
   ================================================================ */
.entry-content {
  font-family: var(--font-head); /* serif body — confirmed standard from the JWT pilot */
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
}
/* Body paragraphs / lists. Slightly stronger line-height than UI copy and
 * a touch more vertical rhythm so consecutive paragraphs don't smear. */
.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote {
  margin: 0 0 1.15em;
}
.entry-content p:last-child { margin-bottom: 0; }
.entry-content ul,
.entry-content ol {
  padding-left: 1.4em;
  margin: 0 0 1.15em;
}
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content ul ul,
.entry-content ol ol { margin-bottom: 0.4em; }
.entry-content ul ul { list-style: circle; }
.entry-content li { list-style: inherit; margin: 0.35em 0; padding-left: 4px; }
.entry-content li::marker { color: var(--ink-4); }
.entry-content li > p { margin-bottom: 0.4em; }
.entry-content strong { color: var(--ink); font-weight: 600; }
.entry-content em { color: var(--ink); }

/* Section headings — restful spacing + an accent rule on H2 so the eye
 * has something to hook onto when scanning a long page. */
.entry-content h2 {
  font-family: var(--font-head);
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
  margin: 2em 0 0.6em;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  letter-spacing: -0.005em;
}
.entry-content h3 {
  font-family: var(--font-head);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
  margin: 1.8em 0 0.5em;
}
.entry-content h2:first-child,
.entry-content h3:first-child { margin-top: 0.4em; }

/* Inline links inside body copy — underlined so they don't disappear
 * into the prose colour. */
.entry-content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-2);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.12s, text-decoration-color 0.12s;
}
.entry-content a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Inline <code> chip. Differentiated from prose without screaming. */
.entry-content :not(pre) > code,
.entry-content p code,
.entry-content li code,
.entry-content td code,
.entry-content h2 code,
.entry-content h3 code,
.entry-content summary code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Pull-quote / admonition. Uses default <blockquote>. */
.entry-content blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--rule-2);
  color: var(--ink-2);
  font-style: italic;
  font-size: 18px;
  line-height: 1.6;
}

/* Generic article tables (kept compact, with horizontal scroll on
 * narrow screens). */
/* In-article tables. Default to a true <table> layout that lets long
 * verdict cells wrap naturally instead of triggering a horizontal
 * scrollbar. The ".has-wide-table" wrapper opt-in below is for the rare
 * case of 5+ column comparison tables that genuinely cannot fit. */
.entry-content table,
.entry-content .wp-block-table table {
  display: table;
  width: 100%;
  max-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 14.5px;
}
.entry-content .wp-block-table {
  margin: 1.6em 0;
  overflow: visible;
}
.entry-content table th,
.entry-content table td {
  /* Wrap by default — only narrow chips like inline <code> stay on one
   * line because of their own white-space:nowrap on the chip itself. */
  white-space: normal;
  overflow-wrap: break-word;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.55;
  text-align: left;
}
.entry-content table thead th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
/* Suggested column hint for 2-col "label / verdict" tables. The first
 * column gets a comfortable upper bound so the verdict column always
 * gets the lion's share of the row. */
.entry-content table tbody td:first-child {
  width: 28%;
  min-width: 130px;
  font-weight: 500;
  color: var(--ink);
}
.entry-content table tbody tr:hover {
  background: var(--bg-2);
}
/* Inside in-article CVE-style tables (used in JWT post for the
 * storage matrix) we explicitly switch off the table-layout:fixed
 * inherited from the homepage variant — there are no fixed widths in
 * a 2-col article version, and "fixed" makes the verdict column too
 * narrow. */
.entry-content table.cve-table {
  table-layout: auto;
  font-size: 14.5px;
}
.entry-content table.cve-table tbody td {
  word-break: normal;
  overflow-wrap: break-word;
}
/* Optional escape hatch for genuinely wide tables: wrap them in
 * <figure class="wp-block-table is-wide"> or <div class="table-scroll">
 * and only those will horizontally scroll on narrow screens. */
.entry-content .table-scroll,
.entry-content .wp-block-table.is-wide {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.6em 0;
}
.entry-content .table-scroll table,
.entry-content .wp-block-table.is-wide table {
  min-width: 640px;
}

/* Bare <pre> fallback (raw blocks not yet wrapped by .nw-code) — keeps
 * old content readable until we re-process it. */
.entry-content pre,
.entry-content .wp-block-code {
  overflow-x: auto;
  max-width: 100%;
}
.entry-content img,
.entry-content figure { max-width: 100%; height: auto; }

/* ================================================================
   CODE BLOCKS — premium presentation card with header bar.
   Markup is generated by nodewire_wrap_code_blocks() in
   inc/content-filters.php; the JS copy handler lives in theme.js.
   ================================================================ */
.entry-content .nw-code {
  position: relative;
  margin: 1.6em 0;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}
.entry-content .nw-code__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px 6px 14px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.entry-content .nw-code__lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.entry-content .nw-code__lang::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-4);
  opacity: 0.55;
}
.entry-content .nw-code__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 6px 10px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.entry-content .nw-code__copy:hover {
  color: var(--ink);
  background: var(--bg);
  border-color: var(--rule);
}
.entry-content .nw-code__copy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.entry-content .nw-code__copy.is-copied {
  color: #166534;
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.entry-content .nw-code__copy.is-failed {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}
.entry-content .nw-code__copy-icon { display: inline-flex; }
.entry-content .nw-code__copy-icon svg { display: block; }

/* The actual code area. We override the bare <pre> fallback above so the
 * card has the right padding/typography and the scrollbar shows up only
 * if a single line genuinely cannot wrap (very rare with .pre-wrap). */
.entry-content .nw-code__pre,
.entry-content .nw-code pre {
  margin: 0;
  padding: 16px 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
  /* Wrap long shell lines instead of hiding them under a horizontal
   * scrollbar; preserve hard newlines from the original snippet. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  /* But keep horizontal scroll available for blocks where wrapping is
   * the wrong call (long ASCII art, tables in code, etc.). */
  overflow-x: auto;
}
.entry-content .nw-code code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  white-space: inherit;
}
[data-theme="dark"] .entry-content .nw-code__copy.is-copied {
  color: #86efac;
  background: rgba(22, 101, 52, 0.18);
  border-color: rgba(134, 239, 172, 0.45);
}

/* ================================================================
   FAQ ACCORDION — generated by nodewire_faq_accordion().
   Each <details class="nw-faq__item"> is a click-to-expand row with a
   chevron that rotates 180° when the row is open.
   ================================================================ */
.entry-content .nw-faq {
  margin: 1.4em 0 0;
  border-top: 1px solid var(--rule);
}
.entry-content .nw-faq__item {
  border-bottom: 1px solid var(--rule);
}
.entry-content .nw-faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  transition: color 0.12s;
}
.entry-content .nw-faq__item summary::-webkit-details-marker { display: none; }
.entry-content .nw-faq__item summary:hover { color: var(--accent); }
.entry-content .nw-faq__item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
.entry-content .nw-faq__chev {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--ink-3);
  transition: transform 0.18s ease, color 0.12s;
}
.entry-content .nw-faq__item[open] .nw-faq__chev {
  transform: rotate(180deg);
  color: var(--accent);
}
.entry-content .nw-faq__a {
  padding: 0 4px 18px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
}
.entry-content .nw-faq__a > p { margin: 0; }
.entry-content .nw-faq__a > p + p { margin-top: 0.7em; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1280px) {
  /* Tighten the gutter on laptop-class screens so content has breathing
   * room without forcing a horizontal scroll on inner blocks. */
  :root { --gutter: 28px; }
  /* Trending tag rail in the navbar fights for space with the primary
   * categories on laptop-class screens and gets clipped off-screen. The
   * same tags live on /tag/ pages and in the footer, so hiding the rail
   * here keeps the navbar tidy. */
  .navbar .trending { display: none; }
}
@media (max-width: 1100px) {
  .main .shell { grid-template-columns: 1fr; }
  .main .rail { order: 2; }
  /* On laptop/tablet width the comparisons row should also stack so the
   * hero card can use the whole content width and the side picks line up
   * underneath instead of competing for the right column. */
  .grid-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .hero-lede .shell { grid-template-columns: 1fr; }
  .footer .shell { grid-template-columns: 1fr 1fr; }
  .search { grid-column: 1 / -1; grid-row: 2; max-width: 100%; }
  .masthead .shell { grid-template-columns: 1fr auto; gap: 16px; padding: 14px var(--gutter); }
  .logo { font-size: 26px; }
  .logo .tagline { display: none; }
  .ribbon .right { display: none; }

  /* Hide desktop-only Sign in / Subscribe buttons; show hamburger */
  .mast-tools .hide-on-mobile { display: none; }
  .mast-tools .nav-toggle { display: inline-flex; }

  /* Mobile drawer for primary nav */
  .navbar {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: min(320px, 86vw);
    background: var(--bg);
    border-left: 1px solid var(--rule);
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    overflow-y: auto;
    z-index: 100;
    transition: right .25s ease;
    padding: 24px 0;
  }
  .navbar .shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 var(--gutter);
    overflow: visible;
  }
  .navbar a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--rule);
    font-size: 14px;
    margin-bottom: 0;
  }
  .navbar a.active { color: var(--accent); border-bottom-color: var(--rule); }
  .navbar .trending {
    margin-left: 0;
    margin-top: 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-left: 0;
  }
  .navbar .trending a { padding: 6px 0; }

  body.nav-open .navbar { right: 0; }
  body.nav-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(8,12,20,0.5);
    z-index: 90;
  }
  body.nav-open { overflow: hidden; }

  .author-hero { grid-template-columns: 72px 1fr; gap: 16px; padding: 20px; }
  .author-hero__avatar { width: 72px; height: 72px; font-size: 28px; }
}
@media (max-width: 600px) {
  /* Let cards span the full content width on small phones. */
  .grid-3 > *,
  .grid-4 > *,
  .tools-grid > * { max-width: 100%; flex-basis: 100%; }
  .lede-side .item { grid-template-columns: 96px 1fr; }
  .cve-table .hide-sm { display: none; }
  /* On phones the ERROR column has a fixed 200px inline width and the
   * monospaced strings inside it (UnhandledPromise, MODULE_NOT_FOUND…)
   * push the table beyond the viewport. Let the table scroll
   * horizontally instead of clipping content under body's overflow. */
  .cve-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    table-layout: auto;
    width: 100%;
  }
  .cve-table thead, .cve-table tbody { display: table; width: 100%; }
  .cve-table .title { font-size: 14px; }
  .footer .shell { grid-template-columns: 1fr; }
  .ribbon { font-size: 11px; padding: 8px 0; }
  /* Stack section-head title + "more" link vertically so the link can't
   * get crushed into 3-line wrap-blocks next to wide titles. */
  .sec-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .sec-head h2 { font-size: 22px; }
  .ribbon .ribbon-stories { gap: 8px; }
  .ribbon .ribbon-stories a { max-width: 60vw; }
  .lede-main .imgwrap { height: 200px; }
  .author-hero { grid-template-columns: 1fr; gap: 12px; text-align: left; }
  /* Long-form article tweaks for narrow phones: smaller body, tighter
   * code blocks, FAQ summaries that don't crowd the chevron. */
  .entry-content { font-size: 16px; line-height: 1.65; }
  .entry-content h2 { font-size: 22px; padding-left: 12px; }
  .entry-content h3 { font-size: 18px; }

  /* Article frame parts: tighten title, dek, meta-strip, hero cover. */
  .post-frame > .imgwrap { height: 200px; }
  .post-title { font-size: clamp(24px, 6vw, 32px); margin: 12px 0 10px; }
  .post-dek { font-size: 16px; line-height: 1.5; }
  .post-meta { padding: 12px 14px; gap: 10px; font-size: 13px; }
  .post-tags { gap: 6px; font-size: 11px; }
  .post-tags a { padding: 4px 8px; }
  .entry-content .nw-code { border-radius: 6px; margin: 1.3em 0; }
  .entry-content .nw-code__head { padding: 5px 6px 5px 12px; font-size: 10.5px; }
  .entry-content .nw-code__copy-text { display: none; }
  .entry-content .nw-code__copy { padding: 6px 8px; }
  .entry-content .nw-code__pre,
  .entry-content .nw-code pre { padding: 14px 14px; font-size: 12.5px; }
  .entry-content .nw-faq__item summary { padding: 14px 0; font-size: 15px; }
  .entry-content .nw-faq__a { padding: 0 0 14px; font-size: 15px; }
  /* In-article tables on phones: stack rows so each row reads like a
   * mini-card. Looks cleaner than horizontal scroll for 2-3 column
   * matrices used in tutorials. Wide tables can still opt back into
   * scroll via .table-scroll / .wp-block-table.is-wide. */
  .entry-content table:not(.table-scroll table):not(.wp-block-table.is-wide table),
  .entry-content table.cve-table:not(.table-scroll table) {
    display: block;
    width: 100%;
  }
  .entry-content table:not(.table-scroll table) thead {
    display: none;
  }
  .entry-content table:not(.table-scroll table) tbody,
  .entry-content table:not(.table-scroll table) tr,
  .entry-content table:not(.table-scroll table) td {
    display: block;
    width: 100% !important;
  }
  .entry-content table:not(.table-scroll table) tbody tr {
    border: 1px solid var(--rule);
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 4px 0;
    background: var(--bg);
  }
  .entry-content table:not(.table-scroll table) tbody tr:hover { background: var(--bg-2); }
  .entry-content table:not(.table-scroll table) tbody td {
    padding: 8px 14px;
    border-bottom: 1px dashed var(--rule);
  }
  .entry-content table:not(.table-scroll table) tbody td:last-child { border-bottom: 0; }
  .entry-content table:not(.table-scroll table) tbody td:first-child {
    width: 100% !important;
    min-width: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-3);
    font-weight: 600;
    padding-bottom: 2px;
    border-bottom: 0;
  }
  .author-hero__avatar { width: 64px; height: 64px; font-size: 24px; }

  /* Tighten masthead on small phones so the hamburger never overflows. */
  .masthead .shell { gap: 10px; padding: 12px var(--gutter); }
  :root { --gutter: 16px; }
  .logo { font-size: 22px; }
  .mast-tools { gap: 8px; }
  .mast-tools .theme-toggle { display: none; }
  .mast-tools .nav-toggle { width: 40px; height: 40px; }
}
