/* ATKLAB website — implements atklab/style-guide (main brand).
   Greyscale + Signal Red as the sole accent. 0 corner radius everywhere.
   Red is reserved for calls to action, severity, and focus; structure comes
   from hairlines and type weight, not from colour. */

:root {
  --ink: #0b0b0c;
  --true-black: #050506;
  --signal-red: #c8272c;
  --signal-red-deep: #a71f24;
  --signal-red-tint: rgba(200, 39, 44, 0.12);
  --paper-white: #ffffff;
  --steel: #e4e4e6;
  --slate: #a1a1a7;
  --ash: #6b6b72;
  --iron: #26262a;
  --iron-strong: #38383e;
  --panel: #111113;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  --measure: 64ch;
  --header-h: 64px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

* {
  box-sizing: border-box;
  border-radius: 0 !important; /* sharp corners are a brand rule, no exceptions */
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--steel);
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

main {
  flex: 1 0 auto;
}

::selection {
  background: var(--signal-red);
  color: var(--paper-white);
}

/* ------------------------------------------------------------ typography */

h1, h2, h3, h4 {
  color: var(--paper-white);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.08rem;
  letter-spacing: -0.005em;
}

p {
  margin: 0 0 var(--space-4);
  max-width: var(--measure);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--paper-white);
  text-decoration: underline;
  text-decoration-color: var(--iron-strong);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

a:hover,
a:focus-visible {
  text-decoration-color: var(--signal-red);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--signal-red);
  outline-offset: 2px;
}

strong {
  color: var(--paper-white);
  font-weight: 600;
}

hr {
  border: 0;
  border-top: 1px solid var(--iron);
  margin: var(--space-8) 0;
}

code, pre, kbd {
  font-family: var(--mono);
  font-size: 0.86em;
}

code {
  background: var(--panel);
  border: 1px solid var(--iron);
  padding: 1px 5px;
  color: var(--steel);
}

pre {
  background: var(--true-black);
  border: 1px solid var(--iron);
  padding: var(--space-4) var(--space-6);
  overflow-x: auto;
  line-height: 1.6;
  color: var(--steel);
  margin: 0;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 1em;
}

.prompt {
  color: var(--ash);
  user-select: none;
}

.muted {
  color: var(--slate);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

/* Section label: a numbered, quiet eyebrow in place of the old red kicker. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--slate);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.eyebrow .num {
  color: var(--ash);
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.eyebrow .num::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--iron-strong);
  vertical-align: middle;
  margin-left: var(--space-3);
}

/* Section head: heading on the left, intro copy on the right. */
.section-head h2 {
  margin: 0;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 11, 12, 0.88);
  border-bottom: 1px solid var(--iron);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--paper-white);
  text-decoration: none;
}

.wordmark-logo {
  display: block;
  height: 22px;
  aspect-ratio: 203.074 / 33.023;
  background-color: currentColor;
  -webkit-mask: url("../assets/atklab-line.svg") no-repeat center / contain;
  mask: url("../assets/atklab-line.svg") no-repeat center / contain;
}

.site-header .wordmark-logo {
  height: 18px;
}

.wordmark-sub {
  color: var(--signal-red);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  position: relative;
  top: 1px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav a {
  color: var(--slate);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--paper-white);
}

.site-nav a.active {
  color: var(--paper-white);
}

.site-nav .lang-switch {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--ash);
  padding-left: var(--space-6);
  border-left: 1px solid var(--iron);
}

.site-nav .nav-cta {
  color: var(--paper-white);
  margin-left: var(--space-2);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--iron);
  color: var(--paper-white);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
}

.nav-toggle-bars::before { margin-bottom: 5px; }
.nav-toggle-bars::after { margin-top: 5px; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--ink);
    border-bottom: 1px solid var(--iron);
    transition: max-height 0.2s ease;
  }

  /* Capped by the viewport, not a fixed height, so a short landscape
     phone can still scroll to the last entry instead of clipping it. */
  .site-nav.open {
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    border-bottom-color: var(--iron-strong);
  }

  .site-nav a {
    padding: var(--space-4) var(--space-8);
    border-top: 1px solid var(--iron);
    font-size: 1rem;
  }

  .site-nav .lang-switch {
    border-left: 0;
    padding-left: var(--space-8);
  }

  .site-nav .nav-cta {
    margin: var(--space-4) var(--space-8) var(--space-6);
    padding: 12px 20px;
    text-align: center;
    border-top: 0;
  }
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 22px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--signal-red);
  color: var(--paper-white);
  border: 1px solid var(--signal-red);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--signal-red-deep);
  border-color: var(--signal-red-deep);
  color: var(--paper-white);
}

.btn-secondary {
  background: transparent;
  color: var(--steel);
  border: 1px solid var(--iron-strong);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  color: var(--paper-white);
  border-color: var(--paper-white);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-ghost {
  background: none;
  border: 0;
  color: var(--slate);
  padding: 12px 0;
  cursor: pointer;
  font: inherit;
}

.btn-ghost:hover { color: var(--paper-white); }

/* Text link with a trailing arrow, for "see more" style links. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--steel);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.link-arrow::after {
  content: "\2192";
  color: var(--signal-red);
  transition: transform 0.15s ease;
}

.link-arrow:hover,
.link-arrow:focus-visible {
  color: var(--paper-white);
}

.link-arrow:hover::after {
  transform: translateX(3px);
}

/* ------------------------------------------------------------------ hero */

.hero {
  border-bottom: 1px solid var(--iron);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 55%),
    var(--ink);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-12) var(--space-16);
  align-items: center;
  padding-top: clamp(64px, 10vh, 112px);
  padding-bottom: clamp(64px, 10vh, 112px);
}

.hero-copy h1 {
  margin-bottom: var(--space-6);
  max-width: 18ch;
}

.hero .eyebrow {
  margin-bottom: var(--space-6);
}

.hero .lede {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--slate);
  max-width: 50ch;
  margin-bottom: var(--space-8);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.hero-aside {
  justify-self: end;
  width: 100%;
  max-width: 560px;
}

.hero-aside .cert-card {
  background: var(--panel);
}

.hero-aside-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-3);
  color: var(--ash);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.hero-aside-caption a {
  color: var(--slate);
  text-decoration: none;
}

.hero-aside-caption a:hover {
  color: var(--paper-white);
}

/* Fact strip beneath the hero: three short claims, hairline-separated. */
.facts {
  border-bottom: 1px solid var(--iron);
}

.facts .wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fact {
  padding: var(--space-6) var(--space-8) var(--space-6) 0;
  border-left: 1px solid var(--iron);
  padding-left: var(--space-6);
}

.fact:first-child {
  border-left: 0;
  padding-left: 0;
}

.fact strong {
  display: block;
  color: var(--paper-white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.fact span {
  color: var(--slate);
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .facts .wrap {
    grid-template-columns: 1fr;
  }

  .fact,
  .fact:first-child {
    border-left: 0;
    border-top: 1px solid var(--iron);
    padding: var(--space-4) 0;
  }

  .fact:first-child {
    border-top: 0;
  }
}

/* -------------------------------------------------------------- sections */

section {
  padding: var(--space-24) 0;
  border-bottom: 1px solid var(--iron);
  /* Anchor jumps land below the sticky header. */
  scroll-margin-top: calc(var(--header-h) + 1px);
}

section:last-of-type {
  border-bottom: 0;
}

/* Three (or two) columns of short copy separated by hairlines, no boxes. */
.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: var(--space-16);
  border-top: 1px solid var(--iron);
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.col {
  padding: var(--space-8) var(--space-8) var(--space-8) 0;
  border-left: 1px solid var(--iron);
  padding-left: var(--space-8);
  min-width: 0;
}

.col:first-child {
  border-left: 0;
  padding-left: 0;
}

.col-meta {
  display: block;
  color: var(--ash);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.col h3 {
  margin-bottom: var(--space-3);
}

.col p {
  color: var(--slate);
  font-size: 0.95rem;
  margin: 0;
}

@media (max-width: 860px) {
  .cols,
  .cols-2 {
    grid-template-columns: 1fr;
  }

  .col,
  .col:first-child {
    border-left: 0;
    border-top: 1px solid var(--iron);
    padding: var(--space-6) 0;
  }

  .col:first-child {
    border-top: 0;
  }
}

/* --------------------------------------------------------- severity badge */

.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
}

.badge-info     { border: 1px solid var(--iron-strong); color: var(--slate); }
.badge-low      { border: 1px solid var(--iron-strong); color: var(--steel); }
.badge-medium   { background: var(--iron-strong); border: 1px solid var(--iron-strong); color: var(--paper-white); }
.badge-high     { border: 1px solid var(--signal-red); color: var(--signal-red); }
.badge-critical { background: var(--signal-red); border: 1px solid var(--signal-red); color: var(--paper-white); }

/* --------------------------------------------------------------- process */

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-8);
  margin: var(--space-16) 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  border-top: 1px solid var(--iron-strong);
  padding-top: var(--space-6);
  position: relative;
}

.steps li::before {
  content: "0" counter(step);
  display: block;
  color: var(--ash);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-4);
}

.steps h3 {
  margin-bottom: var(--space-3);
}

.steps p {
  color: var(--slate);
  font-size: 0.95rem;
  margin: 0;
}

@media (max-width: 960px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .steps {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* "You provide / we create" */
.io-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid var(--iron);
}

.io-label {
  display: block;
  color: var(--ash);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.io-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.io-col li {
  color: var(--steel);
  font-size: 0.98rem;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--iron);
}

.io-col li:first-child {
  border-top: 0;
}

@media (max-width: 640px) {
  .io-cols {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* --------------------------------------------------------- sample finding */

.finding {
  margin-top: var(--space-16);
  background: var(--panel);
  border: 1px solid var(--iron);
}

.finding-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--iron);
}

.finding-head h3 {
  margin: 0;
  font-size: 1rem;
}

.finding-id {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ash);
  letter-spacing: 0.04em;
}

.finding-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0;
}

.finding-text {
  padding: var(--space-6);
  border-right: 1px solid var(--iron);
}

.finding-text p {
  color: var(--slate);
  font-size: 0.95rem;
}

.finding-text dl {
  margin: var(--space-6) 0 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-4);
  font-size: 0.86rem;
}

.finding-text dt {
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 500;
  padding-top: 3px;
}

.finding-text dd {
  margin: 0;
  color: var(--steel);
}

.finding pre {
  border: 0;
  height: 100%;
  padding: var(--space-6);
  font-size: 0.8rem;
}

@media (max-width: 860px) {
  .finding-body {
    grid-template-columns: 1fr;
  }

  .finding-text {
    border-right: 0;
    border-bottom: 1px solid var(--iron);
  }
}

/* ---------------------------------------------------- traceability graph */

.graph-wrap {
  margin-top: var(--space-16);
  overflow-x: auto;
  border: 1px solid var(--iron);
  background: var(--panel);
}

.graph {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.graph .edge line {
  stroke: var(--slate);
  stroke-width: 1.25;
}

.graph .edge.crit line {
  stroke: var(--signal-red);
}

.graph .edge.context line {
  stroke: var(--ash);
  stroke-dasharray: 3 5;
}

.graph .elabel-bg { fill: var(--panel); }

.graph #ah-n path { fill: var(--slate); }
.graph #ah-c path { fill: var(--signal-red); }
.graph #ah-x path { fill: var(--ash); }

.graph .edge text {
  fill: var(--slate);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-anchor: middle;
  dominant-baseline: middle;
}

.graph .edge.crit text { fill: var(--signal-red); }

.graph .node { cursor: default; }

.graph .node rect {
  fill: var(--ink);
  stroke: var(--slate);
  stroke-width: 1;
  transition: stroke 0.15s ease, fill 0.15s ease;
}

.graph .node.crit rect { stroke: var(--signal-red); }

.graph .node text {
  fill: var(--paper-white);
  font-size: 13px;
  font-weight: 500;
  text-anchor: middle;
  dominant-baseline: middle;
  transition: fill 0.15s ease;
}

.graph .node.mono text,
.graph .node.endpoint text {
  font-family: var(--mono);
  font-size: 12px;
}

.graph .node.crit text { fill: var(--paper-white); }

.graph .node text.ntype {
  fill: var(--slate);
  font-family: "Roboto", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.graph .node.crit text.ntype { fill: var(--signal-red); }

.graph .ntype-bg { fill: var(--panel); }

.graph .node:hover rect {
  fill: var(--iron);
  stroke: var(--paper-white);
}

.graph .node:hover text { fill: var(--paper-white); }

.graph-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-4);
  color: var(--slate);
  font-size: 0.82rem;
}

.graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.graph-legend span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.graph-legend i {
  width: 12px;
  height: 12px;
  border: 1px solid var(--slate);
  background: var(--ink);
}

.graph-legend i.crit { border-color: var(--signal-red); }

.scroll-hint {
  display: none;
  color: var(--ash);
  margin: 0;
}

@media (max-width: 760px) {
  .scroll-hint { display: block; }
}

/* ----------------------------------------------------- certificate verify */

.cert-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-12) var(--space-16);
  align-items: center;
}

.cert-layout h2 {
  margin-bottom: var(--space-4);
}

.cert-layout .intro {
  color: var(--slate);
  margin-bottom: var(--space-8);
}

.cert-form {
  display: flex;
  gap: var(--space-3);
  max-width: 460px;
}

.cert-form input,
.artifacts-form input,
.field input,
.field textarea {
  min-width: 0;
  width: 100%;
  font: inherit;
  color: var(--paper-white);
  background: var(--true-black);
  border: 1px solid var(--iron-strong);
  padding: 11px 14px;
  transition: border-color 0.15s ease;
}

.cert-form input,
.artifacts-form input {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
}

.cert-form input::placeholder,
.artifacts-form input::placeholder {
  color: var(--ash);
}

.cert-form input:focus,
.artifacts-form input:focus,
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--paper-white);
}

.cert-form input {
  flex: 1;
}

.cert-hint {
  color: var(--ash);
  font-size: 0.82rem;
  margin-top: var(--space-4);
}

.cert-demo {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--steel);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--iron-strong);
  padding: 0 0 1px;
  cursor: pointer;
}

.cert-demo:hover,
.cert-demo:focus-visible {
  color: var(--paper-white);
  border-bottom-color: var(--signal-red);
  outline: none;
}

.cert-result {
  min-height: 0;
}

.cert-result:empty {
  display: none;
}

/* Before a code is checked the result column previews the card's shape. */
.cert-card--placeholder .cert-figure,
.cert-card--placeholder .cert-client {
  color: var(--ash);
}

.cert-card--placeholder .cert-bar-fill {
  width: 0;
}

.cert-card {
  background: var(--panel);
  border: 1px solid var(--iron);
}

.cert-card--empty {
  padding: var(--space-6);
  color: var(--slate);
  font-size: 0.95rem;
}

.cert-card--empty .cert-id {
  display: block;
  margin: 0 0 var(--space-2);
  color: var(--steel);
}

.cert-card-head {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--iron);
}

.cert-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--paper-white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cert-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--signal-red);
}

.cert-badge--sample {
  color: var(--slate);
}

.cert-badge--sample::before {
  background: var(--iron-strong);
}

/* Schema version of the verified record, so older certificates keep
   rendering when the engagement details change. */
.cert-version {
  color: var(--ash);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.cert-client {
  display: block;
  color: var(--paper-white);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin-top: var(--space-2);
}

.cert-id {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ash);
}

.cert-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.cert-stat {
  padding: var(--space-6) var(--space-4) var(--space-6) var(--space-6);
  border-left: 1px solid var(--iron);
  min-width: 0;
}

.cert-stat:first-child {
  border-left: 0;
}

.cert-stat dt {
  color: var(--ash);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.cert-fn {
  font-weight: 600;
  margin-left: 2px;
  color: var(--slate);
  text-decoration: none;
}

.cert-fn:hover {
  color: var(--paper-white);
}

.cert-stat dd {
  margin: 0;
  color: var(--steel);
}

.cert-figure {
  display: block;
  color: var(--paper-white);
  font-size: 1.3rem;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.cert-note {
  display: block;
  color: var(--ash);
  font-size: 0.8rem;
  margin-top: var(--space-2);
}

.cert-stat .badge {
  font-size: 0.95rem;
  padding: 7px 14px;
  margin-top: 2px;
}

.cert-bar {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--iron);
  margin-top: var(--space-3);
}

.cert-bar-fill {
  display: block;
  height: 100%;
  background: var(--paper-white);
  transition: width 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Severity as a vertical gauge on the risk cell's right edge, filling
   upward from the bottom: one fifth per rating step, info to critical. */
.cert-stat--risk {
  position: relative;
}

.cert-risk-bar {
  position: absolute;
  top: var(--space-6);
  right: var(--space-4);
  bottom: var(--space-6);
  width: 3px;
  background: var(--iron);
}

.cert-risk-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: var(--signal-red);
  transition: height 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Footer row into the artifacts login for the verified engagement. */
.cert-card-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 20px var(--space-6);
  border-top: 1px solid var(--iron);
  color: var(--paper-white);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.cert-lock {
  width: 13px;
  height: 13px;
  /* Optically centre on the uppercase label, whose caps sit above the baseline. */
  position: relative;
  top: -1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: miter;
}

.cert-card-foot:hover,
.cert-card-foot:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--signal-red);
  text-underline-offset: 4px;
}

@media (max-width: 960px) {
  .cert-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .cert-form { flex-direction: column; }

  .cert-stats { grid-template-columns: 1fr; }

  .cert-stat,
  .cert-stat:first-child {
    border-left: 0;
    border-top: 1px solid var(--iron);
  }

  .cert-stat:first-child {
    border-top: 0;
  }
}

/* ----------------------------------------------------------- methodology */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: var(--space-16);
  border: 1px solid var(--iron);
  background: var(--panel);
}

.compare-col {
  padding: var(--space-8);
  border-left: 1px solid var(--iron);
  min-width: 0;
}

.compare-col:first-child {
  border-left: 0;
}

.compare-col h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.compare-col h3 small {
  color: var(--ash);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.compare-col p {
  color: var(--slate);
  font-size: 0.95rem;
}

.compare-col ul {
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
}

.compare-col li {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--iron);
  font-size: 0.92rem;
  color: var(--steel);
}

.compare-note {
  grid-column: 1 / -1;
  padding: var(--space-4) var(--space-8);
  border-top: 1px solid var(--iron);
  color: var(--slate);
  font-size: 0.9rem;
}

.compare-note p {
  max-width: none;
}

@media (max-width: 760px) {
  .compare {
    grid-template-columns: 1fr;
  }

  .compare-col {
    border-left: 0;
    border-top: 1px solid var(--iron);
  }

  .compare-col:first-child {
    border-top: 0;
  }
}

/* --------------------------------------------------------------- contact */

/* The eyebrow takes its own row so the actions centre on the heading and
   paragraph, not on the column including the label. */
.contact .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: var(--space-16);
  align-items: center;
}

.contact .eyebrow {
  grid-column: 1 / -1;
}

.contact h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
}

.contact p {
  color: var(--slate);
  font-size: 1.05rem;
  margin: 0;
  max-width: 48ch;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  justify-self: end;
}

.contact-mail {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--slate);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.contact-mail:hover {
  color: var(--paper-white);
}

@media (max-width: 860px) {
  .contact .wrap {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    justify-self: start;
    margin-top: var(--space-8);
  }
}

/* ---------------------------------------------------------- page headers */

.page-head {
  padding: var(--space-16) 0 var(--space-12);
  border-bottom: 1px solid var(--iron);
  margin-bottom: var(--space-8);
}

.page-head h1 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
}

.page-head p {
  color: var(--slate);
  font-size: 1.05rem;
}

.page-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-8);
}

.page-head-row p {
  margin: 0;
}

.rss-link {
  color: var(--slate);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.rss-link:hover {
  color: var(--paper-white);
}

/* ------------------------------------------------------------------ blog */

.post-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-16);
}

.post-list li {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--space-4) var(--space-12);
  border-bottom: 1px solid var(--iron);
  padding: var(--space-8) 0;
}

.post-list h2 {
  font-size: 1.35rem;
  margin-bottom: var(--space-2);
}

.post-list h2 a {
  color: var(--paper-white);
  text-decoration: none;
}

.post-list h2 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--signal-red);
}

.post-meta {
  display: block;
  color: var(--ash);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.post-list .post-meta {
  margin: 0;
  padding-top: 6px;
  line-height: 1.6;
}

.post-list p {
  color: var(--slate);
  margin: 0;
}

.post-list .link-arrow {
  margin-top: var(--space-4);
}

@media (max-width: 720px) {
  .post-list li {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
}

article.post {
  padding: var(--space-12) 0 var(--space-24);
  max-width: 760px;
}

article.post .page-head {
  padding-top: var(--space-6);
  border-bottom: 0;
  margin-bottom: var(--space-4);
}

article.post .page-head h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}

article.post h2 {
  font-size: 1.45rem;
  margin-top: var(--space-16);
}

article.post h3 {
  margin-top: var(--space-8);
}

article.post p,
article.post li {
  color: var(--steel);
}

article.post pre {
  margin: var(--space-6) 0;
}

article.post ul,
article.post ol {
  max-width: var(--measure);
  padding-left: 1.3em;
  margin: 0 0 var(--space-4);
}

article.post li {
  margin-bottom: var(--space-2);
}

article.post blockquote {
  border-left: 2px solid var(--signal-red);
  margin: var(--space-8) 0;
  padding: var(--space-2) var(--space-6);
  color: var(--paper-white);
  font-size: 1.1rem;
  font-weight: 500;
}

.back-link {
  display: inline-block;
  color: var(--slate);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  margin-top: var(--space-8);
}

.back-link:hover {
  color: var(--paper-white);
}

.translation-notice {
  color: var(--slate);
  font-size: 0.9rem;
  border: 1px solid var(--iron);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-8);
}

/* Keep the closing call-to-action link on one line. */
article.post a[href="/engage"] {
  white-space: nowrap;
}

/* ------------------------------------------------ coverage ceiling curve */

.coverage-curve {
  max-width: var(--measure);
  margin: var(--space-8) 0;
  padding: var(--space-4) var(--space-4) var(--space-2);
  border: 1px solid var(--iron);
  background: var(--panel);
  overflow-x: auto;
}

.coverage-curve svg {
  display: block;
  width: 100%;
  height: auto;
}

.coverage-curve text {
  fill: var(--slate);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  dominant-baseline: middle;
}

.coverage-curve .ceilings text { text-anchor: end; }
.coverage-curve .passes text { text-anchor: middle; }
.coverage-curve .axis-title { text-anchor: end; fill: var(--ash); }

.coverage-curve .axes line,
.coverage-curve .passes line {
  stroke: var(--iron-strong);
  stroke-width: 1;
}

.coverage-curve .ceilings line,
.coverage-curve .drops line {
  stroke: var(--ash);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.coverage-curve .curve {
  fill: none;
  stroke: var(--paper-white);
  stroke-width: 2;
  stroke-linecap: round;
}

.coverage-curve .marks circle {
  fill: var(--paper-white);
  stroke: var(--panel);
  stroke-width: 2;
}

/* The SVG scales with the column; below the measure its 11-unit labels
   would render under 8px, so enlarge them and part the two top ceilings. */
@media (max-width: 640px) {
  .coverage-curve text { font-size: 17px; }
  .coverage-curve .ceilings text:nth-of-type(2) { transform: translateY(4px); }
  .coverage-curve .ceilings text:nth-of-type(3) { transform: translateY(-4px); }
}

/* ------------------------------------------------- risk severity matrix */

.table-scroll {
  overflow-x: auto;
  max-width: var(--measure);
  margin: var(--space-6) 0;
}

.risk-matrix {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.coverage-curve figcaption,
.risk-matrix caption {
  text-align: left;
  color: var(--ash);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.risk-matrix th,
.risk-matrix td {
  border: 2px solid var(--ink);
  padding: var(--space-3) var(--space-4);
  text-align: center;
  white-space: nowrap;
}

.risk-matrix thead th,
.risk-matrix tbody th {
  background: var(--panel);
  color: var(--slate);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.risk-matrix thead th:first-child {
  text-align: left;
  width: 1%;
}

.risk-matrix thead th:not(:first-child) {
  width: 33%;
}

.risk-matrix td {
  color: var(--paper-white);
  font-weight: 600;
}

/* Grey-to-red heat ramp: note is neutral, critical is full accent. */
.risk-matrix .sev-note     { background: var(--panel); color: var(--slate); font-weight: 500; }
.risk-matrix .sev-low      { background: #2c1d1e; color: var(--steel); }
.risk-matrix .sev-medium   { background: #5a2226; }
.risk-matrix .sev-high     { background: #8e2328; }
.risk-matrix .sev-critical { background: var(--signal-red); }

@media (max-width: 520px) {
  .risk-matrix { min-width: 0; font-size: 0.8rem; }
  .risk-matrix th,
  .risk-matrix td {
    padding: var(--space-2);
    white-space: normal;
  }
}

/* ------------------------------------------------------------- artifacts */

.artifacts {
  padding: var(--space-24) 0;
  border-bottom: 0;
}

.artifacts .wrap {
  max-width: 560px;
}

.artifacts h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.4rem);
}

.artifacts p {
  color: var(--slate);
}

.artifacts-form {
  margin-top: var(--space-8);
  padding: var(--space-8);
  background: var(--panel);
  border: 1px solid var(--iron);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.artifacts-form label span {
  display: block;
  color: var(--slate);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.artifacts-form .btn {
  align-self: flex-start;
}

.artifacts-error {
  color: var(--signal-red);
  font-size: 0.85rem;
  margin: 0;
}

/* ---------------------------------------------------------- engage funnel */

.funnel-bar {
  position: sticky;
  /* Header height plus its 1px border; matching it avoids a 1px jump when
     the bar pins on scroll. */
  top: calc(var(--header-h) + 1px);
  z-index: 9;
  background: rgba(11, 11, 12, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--iron);
}

.funnel-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.funnel-bar-title {
  margin: 0;
  color: var(--paper-white);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
}

.funnel-bar-right {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.funnel-bar-count {
  color: var(--ash);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.funnel-reset {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--slate);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.funnel-reset:hover,
.funnel-reset:focus-visible {
  color: var(--paper-white);
}

.funnel-bar-track {
  height: 2px;
  background: var(--iron);
}

.funnel-bar-fill {
  height: 100%;
  width: 0;
  background: var(--signal-red);
  transition: width 0.35s ease;
}

.funnel-intro {
  max-width: var(--measure);
  color: var(--slate);
  margin: var(--space-12) 0 0;
}

#funnel {
  max-width: 880px;
}

.funnel-step {
  padding: var(--space-12) 0 var(--space-8);
  border-top: 1px solid var(--iron);
  border-bottom: 0;
  margin-top: var(--space-8);
  scroll-margin-top: 130px;
}

.funnel-step:first-child {
  border-top: 0;
  margin-top: 0;
}

.funnel-count {
  display: block;
  color: var(--ash);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.funnel-step h2 {
  font-size: 1.5rem;
}

.funnel-help {
  color: var(--slate);
  margin-top: calc(-1 * var(--space-2));
}

.opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.opt {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
  font: inherit;
  color: var(--steel);
  background: var(--panel);
  border: 1px solid var(--iron);
  padding: var(--space-4) var(--space-6);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.opt:hover,
.opt:focus-visible {
  border-color: var(--slate);
  outline: none;
}

.opt.selected {
  border-color: var(--signal-red);
  background: var(--signal-red-tint);
}

.opt-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--paper-white);
  font-weight: 600;
}

.opt-label .mark {
  color: var(--signal-red);
  font-weight: 700;
  opacity: 0;
}

.opt.selected .opt-label .mark { opacity: 1; }

.opt-desc {
  color: var(--slate);
  font-size: 0.9rem;
  line-height: 1.5;
}

.reassure {
  border-left: 2px solid var(--signal-red);
  background: var(--panel);
  padding: var(--space-4) var(--space-6);
  margin-top: var(--space-6);
}

.reassure p {
  margin: var(--space-2) 0;
  max-width: none;
  color: var(--steel);
  font-size: 0.95rem;
}

.funnel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.funnel-summary {
  background: var(--panel);
  border: 1px solid var(--iron);
  padding: var(--space-6);
  margin-top: var(--space-6);
}

.funnel-summary dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-3) var(--space-6);
  margin: 0;
}

.funnel-summary dt {
  color: var(--ash);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 4px;
}

.funnel-summary dd {
  margin: 0;
  color: var(--steel);
}

.field { margin-top: var(--space-6); }

.field label {
  display: block;
  color: var(--slate);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.field input,
.field textarea {
  color: var(--steel);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.funnel-done {
  border-left: 2px solid var(--signal-red);
  background: var(--panel);
  padding: var(--space-6);
  margin-top: var(--space-6);
}

.funnel-done h2 { font-size: 1.3rem; }
.funnel-done p { color: var(--steel); }

.funnel-done-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.funnel-done-head h2 { margin: 0; }

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--iron);
  padding: var(--space-16) 0 var(--space-12);
  color: var(--slate);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-12) var(--space-16);
}

.footer-brand .wordmark {
  margin-bottom: var(--space-4);
}

.footer-brand p {
  color: var(--slate);
  margin: 0;
  max-width: 34ch;
}

.footer-col h4 {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: var(--space-4);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: var(--space-2);
}

.site-footer a {
  color: var(--slate);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--paper-white);
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ---------------------------------------------------------------- mobile */

@media (max-width: 860px) {
  section {
    padding: var(--space-16) 0;
  }

  .cols,
  .steps,
  .io-cols,
  .finding,
  .graph-wrap,
  .compare {
    margin-top: var(--space-12);
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 58px;
  }

  .wrap {
    padding: 0 var(--space-6);
  }

  .hero .wrap {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }

  .hero-copy h1 {
    max-width: none;
  }

  .site-nav a {
    padding: var(--space-4) var(--space-6);
  }

  .site-nav .lang-switch {
    padding-left: var(--space-6);
  }

  .site-nav .nav-cta {
    margin: var(--space-4) var(--space-6) var(--space-6);
  }

  .cert-card-head {
    padding: var(--space-4);
  }

  .cert-stat {
    padding: var(--space-4);
  }

  .finding-head,
  .finding-text,
  .finding pre {
    padding: var(--space-4);
  }
}

@media (max-width: 480px) {
  .hero-ctas .btn {
    flex: 1 1 100%;
  }
}

/* iOS Safari zooms the page when a focused input is set below 16px. */
@media (pointer: coarse) {
  .cert-form input,
  .artifacts-form input,
  .field input,
  .field textarea {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
