/* Akailabs - theme */
:root {
  --bg: #0a0b0e;
  --bg-alt: #0e1015;
  --surface: #13151c;
  --surface-2: #1a1d26;
  --border: #242833;
  --border-strong: #353a48;
  --text: #ecedf0;
  --text-2: #c4c8d0;
  --muted: #8b909d;
  --red: #ff2225;
  --red-hover: #e3161a;
  --red-text: #ff4e50;
  --red-soft: rgba(255, 34, 37, .10);
  --red-line: rgba(255, 34, 37, .45);

  --sev-critical: #ff3b30;
  --sev-high: #ff9300;
  --sev-medium: #ffc400;
  --sev-low: #4c8dff;
  --sev-info: #22c06b;

  --header-bg: rgba(10, 11, 14, .86);
  --hover-bg: rgba(255, 255, 255, .05);
  --input-bg: #0c0d12;
  --code-inline: #ff8a8c;
  --code-inline-bg: rgba(255, 255, 255, .06);
  --show-on-dark: block;
  --show-on-light: none;
  color-scheme: dark;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --container: 1180px;
  --header-h: 72px;
}

/* Light theme: follows the system unless the visitor picked a theme (data-theme on <html>) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5f7; --bg-alt: #eaebef; --surface: #ffffff; --surface-2: #f0f1f4;
    --border: #dfe1e7; --border-strong: #c9ccd5;
    --text: #14161c; --text-2: #3b404b; --muted: #676c79;
    --red-text: #c8151a; --red-soft: rgba(210, 20, 25, .07); --red-line: rgba(210, 20, 25, .38);
    --sev-critical: #d0241a; --sev-high: #c25e00; --sev-medium: #8f6c00; --sev-low: #2a63d4; --sev-info: #11804a;
    --header-bg: rgba(255, 255, 255, .88); --hover-bg: rgba(20, 22, 28, .05); --input-bg: #ffffff;
    --code-inline: #b3141a; --code-inline-bg: rgba(20, 22, 28, .05);
    --show-on-dark: none; --show-on-light: block;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4f5f7; --bg-alt: #eaebef; --surface: #ffffff; --surface-2: #f0f1f4;
  --border: #dfe1e7; --border-strong: #c9ccd5;
  --text: #14161c; --text-2: #3b404b; --muted: #676c79;
  --red-text: #c8151a; --red-soft: rgba(210, 20, 25, .07); --red-line: rgba(210, 20, 25, .38);
  --sev-critical: #d0241a; --sev-high: #c25e00; --sev-medium: #8f6c00; --sev-low: #2a63d4; --sev-info: #11804a;
  --header-bg: rgba(255, 255, 255, .88); --hover-bg: rgba(20, 22, 28, .05); --input-bg: #ffffff;
  --code-inline: #b3141a; --code-inline-bg: rgba(20, 22, 28, .05);
  --show-on-dark: none; --show-on-light: block;
  color-scheme: light;
}
/* Areas that stay dark in both themes (circuit banner, footer, code) */
.hero, .page-head, .site-footer, .code-block {
  --bg: #0a0b0e; --surface: #13151c; --surface-2: #1a1d26;
  --border: #242833; --border-strong: #353a48;
  --text: #ecedf0; --text-2: #c4c8d0; --muted: #8b909d;
  --red-text: #ff4e50; --red-soft: rgba(255, 34, 37, .10); --red-line: rgba(255, 34, 37, .45);
  --sev-critical: #ff3b30; --sev-high: #ff9300; --sev-medium: #ffc400; --sev-low: #4c8dff; --sev-info: #22c06b;
  --hover-bg: rgba(255, 255, 255, .05);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
::selection { background: var(--red); color: #fff; }

a { color: var(--red-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; font-weight: 700; color: var(--text); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 860px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--red); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip-link:focus { left: 8px; }

.kicker {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red-text); margin: 0 0 .9rem;
}
.kicker a { color: inherit; }

/* ---------- buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  height: 46px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem/1 var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background-color .15s, border-color .15s, box-shadow .2s, color .15s, filter .15s;
}
.btn > span { text-box: trim-both cap alphabetic; } /* label centred on its real cap height, whatever the font metrics */
.btn-primary {
  color: #fff !important;
  background: linear-gradient(180deg, #d42a2d 0%, #bb1d21 55%, #a3171b 100%);
  border-color: rgba(255, 120, 122, .28) rgba(200, 30, 34, .5) rgba(110, 10, 14, .8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 4px 14px -6px rgba(200, 24, 28, .5);
}
.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 0 3px rgba(255, 34, 37, .12), 0 8px 22px -8px rgba(220, 28, 32, .6);
}
.btn-primary:active { filter: brightness(.95); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .25); }
/* small arrow on navigation buttons, sliding on hover */
a.btn-primary::after {
  content: ""; width: .8em; height: .8em; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8h9M8.5 4L12.5 8l-4 4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8h9M8.5 4L12.5 8l-4 4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s ease;
}
a.btn-primary:hover::after { transform: translateX(3px); }
.btn-ghost { border-color: var(--border-strong); color: var(--text) !important; background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--red-line); background: var(--red-soft); }
.btn-sm { height: 38px; padding: 0 18px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

.chip {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--text-2); font-size: .78rem; line-height: 1.6;
  background: rgba(255,255,255,.02);
}
.chip-type { border-color: var(--red-line); color: var(--red-text); }
.chip-lang { font-family: var(--mono); font-weight: 600; font-size: .7rem; letter-spacing: .06em; }
.chip-btn { cursor: pointer; font-family: var(--font); }
.chip-btn:hover { border-color: var(--red-line); }
.chip-btn.active { background: var(--red); border-color: var(--red); color: #fff; }

.sev {
  --c: var(--sev-info);
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 2px 10px; border-radius: 999px; font: 600 .76rem/1.6 var(--mono);
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
}
.sev-critical { --c: var(--sev-critical); }
.sev-high { --c: var(--sev-high); }
.sev-medium { --c: var(--sev-medium); }
.sev-low { --c: var(--sev-low); }
.sev-info { --c: var(--sev-info); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--header-bg); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 var(--border); /* not a border: keeps the full height for whole-pixel centring */
}
.nav-bar { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { flex: none; }
.brand img { height: 40px; width: auto; }
.logo-on-dark { display: var(--show-on-dark); }
.logo-on-light { display: var(--show-on-light); }
.site-nav { margin-left: auto; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.tool-btn {
  display: inline-grid; place-items: center; height: 36px; min-width: 36px; padding: 0 9px; border-radius: 9px;
  border: 1px solid var(--border); background: transparent; color: var(--text-2); cursor: pointer;
  font: 600 .78rem/1 var(--mono); letter-spacing: .06em; text-decoration: none !important;
  transition: color .15s, border-color .15s, background-color .15s;
}
.tool-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--hover-bg); }
.tool-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { fill: currentColor; stroke: none; }
/* shows the icon of the theme you would switch to */
.theme-toggle .icon-sun { display: var(--show-on-dark); }
.theme-toggle .icon-moon { display: var(--show-on-light); }
.site-nav ul { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.nav-link { display: block; padding: 8px 14px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: .95rem; }
.nav-link:hover { color: var(--text); background: var(--hover-bg); text-decoration: none; }
.nav-link.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
.site-nav .btn { margin-left: 10px; }
.nav-toggle { display: none; flex: none; background: none; border: 1px solid var(--border-strong); border-radius: 8px; width: 42px; height: 38px; padding: 9px 10px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 24px 20px;
  }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { padding: 12px 8px; }
  .nav-link.active { box-shadow: inset 3px 0 0 var(--red); padding-left: 14px; }
  .site-nav .btn { margin: 10px 0 0; width: 100%; }
  .header-tools { margin-left: auto; }
}

/* ---------- hero & page heads ---------- */
.hero, .page-head {
  position: relative; isolation: isolate;
  background: url("/img/hero.jpg") 70% 40% / cover no-repeat, var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero::before, .page-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10,11,14,.97) 0%, rgba(10,11,14,.86) 42%, rgba(10,11,14,.45) 100%),
    linear-gradient(180deg, rgba(10,11,14,0) 60%, var(--bg) 100%);
}
.hero-inner { padding: 112px 24px 104px; }
.hero h1 { font-size: clamp(1.9rem, 3.3vw, 2.75rem); max-width: 16em; text-wrap: balance; margin-bottom: .5em; }
.hero h1 em, .page-head h1 em { font-style: normal; color: var(--red); }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-2); max-width: 58ch; margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.page-head { padding: 64px 0 52px; }
.page-head::before { background: linear-gradient(90deg, rgba(10,11,14,.97) 0%, rgba(10,11,14,.9) 55%, rgba(10,11,14,.62) 100%); }
.page-head.compact { padding: 52px 0 40px; }
.page-head h1 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); max-width: 32ch; margin: 0; }
.page-head .lead { color: var(--text-2); font-size: 1.08rem; max-width: 70ch; margin: .9rem 0 0; }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section-tight { padding: 48px 0 72px; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section + .section:not(.section-alt) { padding-top: 0; }
.section.section-alt + .section { padding-top: 80px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 24px; margin-bottom: 36px; }
.section-head .kicker { flex-basis: 100%; margin: 0; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; flex: 1; }
.more-link { font-weight: 600; white-space: nowrap; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: border-color .2s, transform .2s;
}
.feature:hover { border-color: var(--red-line); transform: translateY(-2px); }
.feature-icon { display: block; width: 76px; height: 76px; margin-bottom: 18px; filter: drop-shadow(0 6px 16px rgba(255, 34, 37, .14)); }
.feature h3 { font-size: 1.15rem; margin-bottom: .45em; }
.feature p { margin: 0; color: var(--text-2); font-size: .97rem; }
.values .feature { padding: 24px; }
.values .feature-icon { width: 60px; height: 60px; }

.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
  padding: 40px 44px; border-radius: var(--radius); border: 1px solid var(--red-line);
  background: radial-gradient(120% 140% at 100% 0%, rgba(255,34,37,.18) 0%, rgba(255,34,37,0) 55%), var(--surface);
}
.cta-band h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); margin: 0 0 .3em; }
.cta-band p { margin: 0; color: var(--text-2); }

/* ---------- posts ---------- */
.post-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.post-card:hover { border-color: var(--red-line); transform: translateY(-2px); }
.post-card-link { display: flex; flex-direction: column; height: 100%; padding: 24px; color: inherit; text-decoration: none !important; }
.post-card-meta { display: flex; align-items: center; gap: 10px; font: .8rem var(--mono); color: var(--muted); margin-bottom: 12px; }
.post-card h3 { font-size: 1.12rem; line-height: 1.35; margin-bottom: .55em; }
.post-card p { color: var(--text-2); font-size: .95rem; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cve-count { font: 600 .78rem var(--mono); color: var(--text); padding-right: 4px; }

.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.year-group + .year-group { margin-top: 44px; }
.year { font: 600 .9rem var(--mono); color: var(--muted); letter-spacing: .1em; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 18px; }
.post-list { display: grid; gap: 16px; }
.post-list .post-card h3 { font-size: 1.25rem; }
.post-card[hidden], .year-group[hidden] { display: none; }

/* ---------- article ---------- */
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 22px; color: var(--muted); font: .85rem var(--mono); }

.article-layout { padding-top: 48px; padding-bottom: 88px; }
.article-layout .prose { max-width: 860px; margin: 0 auto; }
.article-layout.has-toc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; }
.article-layout.has-toc .prose { margin: 0; }
.toc { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; max-height: calc(100vh - var(--header-h) - 56px); overflow: auto; font-size: .88rem; }
.toc-title { font: 600 .75rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; color: var(--text-2); border-left: 1px solid transparent; line-height: 1.4; }
.toc a:hover { color: var(--text); border-left-color: var(--red); text-decoration: none; }
.toc ol ol { border-left: 0; margin: 0 0 4px; }
.toc ol ol a { padding: 3px 0 3px 28px; font-size: .94em; color: var(--muted); }
.toc ol ol a:hover { color: var(--text); }
@media (max-width: 1080px) {
  .article-layout.has-toc { display: block; }
  .toc { position: static; max-height: none; margin-bottom: 36px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
  .article-layout.has-toc .prose { margin: 0 auto; }
}

.prose { color: var(--text-2); font-size: 1.02rem; min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.55rem; margin: 2.4em 0 .8em; padding-bottom: .4em; border-bottom: 1px solid var(--border); }
.prose h3 { font-size: 1.2rem; margin: 2em 0 .6em; }
.prose h4 { font-size: 1.02rem; margin: 1.6em 0 .5em; color: var(--text); }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2em; }
.prose ul li::marker { color: var(--red); }
.prose li + li { margin-top: .3em; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }

.prose :not(pre) > code {
  font: .86em var(--mono); color: var(--code-inline); background: var(--code-inline-bg);
  border: 1px solid var(--code-inline-bg); padding: .08em .38em; border-radius: 5px; word-break: break-word;
}
.prose blockquote {
  margin: 1.5em 0; padding: 14px 18px; border-left: 3px solid var(--red);
  background: var(--red-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-2);
}
.prose blockquote > :last-child { margin-bottom: 0; }
.prose blockquote strong:first-child { color: var(--red-text); }
.callout-title { font: 700 .75rem var(--mono); letter-spacing: .12em; color: var(--red-text); margin-bottom: .4em !important; }
.callout-tip { border-left-color: var(--sev-info); background: color-mix(in srgb, var(--sev-info) 9%, transparent); }
.callout-tip .callout-title { color: var(--sev-info); }
.callout-warning, .callout-caution { border-left-color: var(--sev-high); background: color-mix(in srgb, var(--sev-high) 9%, transparent); }
.callout-warning .callout-title, .callout-caution .callout-title { color: var(--sev-high); }

.prose figure { margin: 1.8em 0; text-align: center; }
.prose figure img { border-radius: var(--radius-sm); border: 1px solid var(--border); background: #fff; }
.prose figure a { display: inline-block; }
.lang-notice {
  display: flex; align-items: center; gap: 10px; margin: 0 0 2em !important; padding: 10px 14px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--muted); font-size: .9rem;
}
.lang-notice::before {
  content: ""; width: 16px; height: 16px; flex: none; background: var(--red-text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prose figcaption { margin-top: .7em; font-size: .87rem; color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface-2); color: var(--text); font-weight: 600; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose td ul { margin: 0; padding-left: 1em; }

/* code */
.code-block { position: relative; margin: 1.4em 0; }
.code-block pre {
  margin: 0; padding: 18px 20px; overflow: auto; max-height: 640px;
  background: #0c0d12; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: .84rem/1.6 var(--mono); color: #d4d6dc; tab-size: 4;
  white-space: pre-wrap; word-break: break-word;
}
.code-block[data-lang]::before {
  content: attr(data-lang); position: absolute; top: 0; right: 14px; transform: translateY(-50%);
  font: 600 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px 9px;
}
.copy-btn {
  position: absolute; top: 10px; right: 10px; opacity: 0; transition: opacity .15s;
  font: 600 .72rem var(--font); color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: 6px; padding: 5px 9px; cursor: pointer;
}
.code-block:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #6f7685; font-style: italic; }
.token.punctuation { color: #a9aebb; }
.token.tag, .token.attr-name, .token.namespace, .token.deleted { color: #ff7b7d; }
.token.function-name, .token.function { color: #7aa7ff; }
.token.boolean, .token.number { color: #f6a35b; }
.token.property, .token.class-name, .token.constant, .token.symbol { color: #f8c555; }
.token.selector, .token.important, .token.atrule, .token.keyword, .token.builtin { color: #d08cf0; }
.token.string, .token.char, .token.attr-value, .token.regex, .token.variable { color: #8bd49c; }
.token.operator, .token.entity, .token.url { color: #67cdcc; }
.token.inserted { color: #8bd49c; }
.token.bold, .token.important { font-weight: bold; }
.token.italic { font-style: italic; }

/* advisory */
.report-block h2 { margin-top: 0; }
.report-block + .report-block, .report-block + * { margin-top: 2.6em; }
.kv { margin: 0; display: grid; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.kv > div { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; border-bottom: 1px solid var(--border); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { padding: 10px 14px; background: var(--surface-2); color: var(--muted); font: .82rem/1.6 var(--mono); }
.kv dd { padding: 10px 14px; margin: 0; color: var(--text); word-break: break-word; }
.vuln-table td:first-child { white-space: nowrap; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 1px solid var(--border-strong); }
.timeline li { position: relative; display: grid; grid-template-columns: 180px 1fr; gap: 4px 18px; padding: 7px 0; }
.timeline li::before { content: ""; position: absolute; left: -27px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--red); }
.timeline li:last-child::before { background: var(--red); }
.tl-date { font: .84rem/1.9 var(--mono); color: var(--red-text); }
.tl-text { color: var(--text-2); }
@media (max-width: 640px) { .timeline li { grid-template-columns: 1fr; } }

.vuln-head {
  --c: var(--sev-info);
  margin: 3.2em 0 1.4em; padding: 22px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--c);
}
.sev-border-critical { --c: var(--sev-critical); }
.sev-border-high { --c: var(--sev-high); }
.sev-border-medium { --c: var(--sev-medium); }
.sev-border-low { --c: var(--sev-low); }
.prose .vuln-head :is(h2, h3, h4, h5) { margin: 0 0 16px; padding: 0; border: 0; font-size: 1.35rem; }
.vuln-id { display: block; font: 600 .82rem var(--mono); letter-spacing: .04em; color: var(--c); margin-bottom: 6px; }
.vuln-facts { margin: 0; display: grid; gap: 10px; }
.vuln-facts > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: baseline; }
.vuln-facts dt { font: .75rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vuln-facts dd { margin: 0; font-size: .93rem; }
.vuln-facts ul { margin: 0; padding-left: 1em; }
.prose code.cvss-vector { color: var(--text); background: transparent; border: 0; padding: 0; font-size: .84rem; word-break: break-all; }
.vuln-missing { padding: 12px; border: 1px dashed var(--sev-high); color: var(--sev-high); border-radius: 8px; }

/* ---------- contact form ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
form label { display: block; font-size: .88rem; font-weight: 600; color: var(--text-2); margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
input, textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px;
  font: 400 .97rem/1.4 var(--font); color: var(--text);
  background: var(--input-bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 140px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 34, 37, .2); }
input:user-invalid, textarea:user-invalid { border-color: var(--sev-high); }
.h-captcha { margin: 4px 0 18px; }
.form-status { margin: 12px 0 0; font-size: .9rem; color: var(--sev-high); min-height: 1.2em; }
.form-success h3 { color: var(--sev-info); }

/* ---------- footer ---------- */
.site-footer { background: #07080a; border-top: 1px solid var(--border); color: var(--muted); font-size: .92rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 32px 56px; padding-top: 56px; padding-bottom: 40px; }
.footer-brand { flex: 2 1 280px; }
.footer-col { flex: 1 1 150px; }
.footer-brand img { height: 34px; width: auto; margin-bottom: 14px; }
.footer-brand p { margin: 0; max-width: 40ch; }
.footer-col h4 { font: 600 .75rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li + li { margin-top: 8px; }
.footer-col a, .footer-bottom a { color: var(--muted); }
.footer-col a:hover, .footer-bottom a:hover { color: var(--red-text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--border); font-size: .85rem; }
@media (max-width: 720px) { .footer-brand { flex-basis: 100%; } }

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero-inner { padding: 72px 16px 64px; }
  .section { padding: 56px 0; }
  .section.section-alt + .section { padding-top: 56px; }
  .cta-band { padding: 28px 24px; }
  .feature, .post-card-link, .card { padding: 22px; }
  .kv > div { grid-template-columns: 1fr; }
  .kv dt { padding-bottom: 2px; }
  .vuln-facts > div { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .site-header, .site-footer, .toc, .copy-btn, .hero::before, .page-head::before { display: none !important; }
  body { background: #fff; color: #000; }
  .prose, .prose h2, .prose h3 { color: #000; }
}
