:root {
  --brand-red: #E73938;
  --brand-red-dark: #B61616;
  --brand-red-deep: #7F1010;
  --brand-grey: #3C3C3B;

  --bg: #ffffff;
  --bg-elev: #f7f6f5;
  --bg-code: #f3f2f1;
  --border: #e2e0de;
  --text: #3C3C3B;
  --text-muted: #6b6a68;
  --heading: #1f1f1e;
  --accent: #B61616;
  --accent-strong: #7F1010;
  --accent-deco: #E73938;
  --accent-soft: rgba(231, 57, 56, 0.07);
  --link: #B61616;
  --hero-bg: linear-gradient(135deg, #D12C2B 0%, #B61616 50%, #7F1010 100%);
  --hero-text: #ffffff;
  --ph-bg: #fff6e0;
  --ph-border: #c27c00;
  --ph-text: #6b4300;
  --font-display: "Chalet NewYorkNineteenSixty", "Archivo", system-ui, sans-serif;
  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 70ch;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171716;
    --bg-elev: #212120;
    --bg-code: #1c1c1b;
    --border: #3C3C3B;
    --text: #e6e4e2;
    --text-muted: #a8a5a2;
    --heading: #ffffff;
    --accent: #F26867;
    --accent-strong: #F79190;
    --accent-deco: #E73938;
    --accent-soft: rgba(231, 57, 56, 0.12);
    --link: #F26867;
    --hero-bg: linear-gradient(135deg, #B61616 0%, #7F1010 60%, #3a0808 100%);
    --ph-bg: rgba(255, 181, 71, 0.10);
    --ph-border: #ffb547;
    --ph-text: #ffd08a;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: var(--link); text-underline-offset: 2px; overflow-wrap: anywhere; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, kbd, pre { font-family: var(--font-mono); }
:not(pre) > code {
  font-size: 0.88em;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}
.mono { font-family: var(--font-mono); }
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand-red-dark); color: #fff; padding: 0.5rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.ph {
  display: inline;
  background: var(--ph-bg);
  color: var(--ph-text);
  border: 1px dashed var(--ph-border);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  font-size: 0.92em;
  font-family: var(--font-mono);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.ph-block {
  display: block;
  background: var(--ph-bg);
  color: var(--ph-text);
  border: 2px dashed var(--ph-border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.55;
}
.ph-block::before {
  content: "Placeholder";
  display: block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  opacity: 0.85;
}
.ph-block p { margin: 0; }
.ph-block ul { margin: 0.5rem 0 0; }
.media-slot {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
}
.media-slot::before { margin: 0; }
.media-slot svg { width: 48px; height: 48px; opacity: 0.8; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header .inner {
  max-width: 1200px; margin: 0 auto; padding: 0.85rem 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem;
  color: var(--heading); text-decoration: none;
}
.wordmark svg { width: 22px; height: 22px; color: var(--accent-deco); flex: none; }
.wordmark .two { color: var(--accent-deco); }
.header-cve {
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted);
}
.site-header { border-top: 4px solid var(--accent-deco); }

.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
}
.hero .inner { max-width: 1200px; margin: 0 auto; padding: 4rem 16px 3.5rem; }
.badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.badge {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.45); border-radius: 999px;
  padding: 0.2rem 0.7rem; color: #fff; background: rgba(0,0,0,0.12);
}
.badge.cve { background: #fff; color: var(--brand-red-deep); border-color: #fff; }
.hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  color: #fff;
}
.hero h1 .two { background: #fff; color: var(--brand-red-dark); padding: 0 0.08em; border-radius: 6px; }
.hero .lede {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.45;
  max-width: 48ch;
  margin: 0 0 1.5rem;
  color: #fff;
  font-weight: 500;
}
.byline { font-size: 0.92rem; color: rgba(255,255,255,0.85); margin: 0; }
.hero .ph { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.7); }
.byline span + span::before { content: "·"; margin: 0 0.5rem; }

.layout {
  max-width: 1200px; margin: 0 auto; padding: 2.5rem 16px 4rem;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem;
}
@media (min-width: 1080px) {
  .layout { grid-template-columns: 240px minmax(0, 1fr); }
}
.toc { display: none; }
@media (min-width: 1080px) {
  .toc {
    display: block; position: sticky; top: 1.5rem; align-self: start;
    max-height: calc(100vh - 3rem); overflow-y: auto;
    font-size: 0.9rem;
  }
  .toc h2 {
    font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-muted); margin: 0 0 0.75rem;
  }
  .toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
  .toc li a {
    display: block; padding: 0.3rem 0 0.3rem 0.9rem; margin-left: -1px;
    color: var(--text-muted); text-decoration: none; border-left: 2px solid transparent;
  }
  .toc li a:hover { color: var(--heading); border-left-color: var(--accent-deco); }
}
main { min-width: 0; }
.prose { max-width: var(--measure); }
.prose > section { margin-bottom: 3rem; }
h2, h3 { color: var(--heading); line-height: 1.25; scroll-margin-top: 1.5rem; font-family: var(--font-display); }
h2 {
  font-size: 1.65rem; margin: 0 0 1rem; padding-top: 0.5rem;
  letter-spacing: -0.01em; font-weight: 700;
}
h2 a.anchor, h3 a.anchor {
  color: var(--text-muted); text-decoration: none; font-family: var(--font-mono);
  font-weight: 400; margin-left: 0.4rem; opacity: 0; font-size: 0.8em;
}
h2:hover a.anchor, h3:hover a.anchor, a.anchor:focus { opacity: 1; }
h3 { font-size: 1.2rem; margin: 2rem 0 0.6rem; }
p, ul, ol { margin: 0 0 1.1rem; }
li { margin-bottom: 0.4rem; }
strong { color: var(--heading); }
hr { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }

.tldr {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-deco);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem 0.4rem;
  margin: 0 0 2rem;
}
.tldr h2 {
  font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 0.75rem; padding: 0;
}
.tldr ul { padding-left: 1.2rem; }

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.55;
  margin: 0 0 1.4rem;
  max-width: 100%;
  tab-size: 8;
}
pre code { background: none; border: 0; padding: 0; }
.code-label {
  display: block; font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}
.c-com { color: var(--text-muted); font-style: italic; }

.table-wrap {
  overflow-x: auto; margin: 0 0 1.5rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev);
}
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--border); }
thead th {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); background: var(--bg-code); white-space: nowrap;
}
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; color: var(--heading); }
td.ph-cell { background: var(--ph-bg); }
.wide-table { min-width: 640px; }

ol.steps { padding-left: 1.3rem; }
ol.steps li::marker { font-family: var(--font-mono); color: var(--accent-deco); font-weight: 700; }
.result-head { margin-bottom: 0.4rem; }
.callout {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev); padding: 1rem 1.2rem; margin: 0 0 1.4rem;
}
.callout p:last-child { margin-bottom: 0; }

footer.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.88rem;
}
footer.site-footer .inner { max-width: 1200px; margin: 0 auto; padding: 1.5rem 16px; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }


.pre-wrap { position: relative; }
.pre-wrap pre { padding-right: 4.5rem; }
.copy-btn {
  position: absolute; top: 0.5rem; right: 0.5rem;
  font: 600 0.72rem var(--font-sans); letter-spacing: 0.04em;
  color: var(--text-muted); background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 0.25rem 0.55rem; cursor: pointer;
}
.copy-btn:hover { color: var(--heading); border-color: var(--accent-deco); }
.toc li a[aria-current="true"] { color: var(--heading); border-left-color: var(--accent-deco); font-weight: 600; }

.ds-card {
  container-type: inline-size;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  background: #000;
  color: #fff;
  border-radius: 20px;
  overflow: hidden;
  letter-spacing: 0.05em;
  line-height: 1.55;
}
.ds-card .ds-body { padding: clamp(1.5rem, 5cqi, 2.75rem); }
.ds-card .ds-logo { display: block; width: 180px; max-width: 100%; height: auto; margin-bottom: 1.5rem; }
.ds-card h2 {
  font-family: var(--font-sans);
  font-size: clamp(1.375rem, 3.6cqi, 1.8rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: #fff;
  margin: 0;
  padding: 0;
}
.ds-card p { margin: 1rem 0 0; font-size: 0.95rem; color: #CDCDCB; max-width: 64ch; }
.ds-card p + p { margin-top: 0.75rem; }
.ds-card .ds-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-top: 1.75rem; padding: 0.8rem 1.5rem;
  font-size: 0.9rem; font-weight: 500; letter-spacing: 0.02em; line-height: 1.2;
  text-decoration: none; color: #fff;
  background: var(--brand-red); border: 2px solid var(--brand-red); border-radius: 999px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.ds-card .ds-btn:hover { background: var(--brand-red-dark); border-color: var(--brand-red-dark); color: #fff; }
.ds-card .ds-btn svg { width: 1.1em; height: 1.1em; flex: none; }
.ds-card a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ds-card .ds-side { background: #000 url("../img/drivesec-pattern-v.svg") center / cover no-repeat; }
@container (max-width: 820px) {
  .ds-card .ds-body p { font-size: 0.925rem; }
}
@media (max-width: 640px) {
  .ds-card { grid-template-columns: 1fr; border-radius: 16px; }
  .ds-card .ds-side { order: -1; height: 64px; background-image: url("../img/drivesec-pattern-h.svg"); background-position: left center; }
  .ds-card .ds-logo { width: 155px; margin-bottom: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-card .ds-btn { transition: none; }
}
.demo { margin: 2rem 0; }
.demo video { display: block; width: 100%; height: auto; border-radius: 10px; background: #0b0b0b; box-shadow: 0 8px 28px rgba(0,0,0,.25); }
.demo figcaption { margin-top: 0.6rem; font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }
