/* KairoSols design system.
   Editorial layout (serif headlines, rounded panels, mono labels) in the KairoSols brand colours.
   Light theme by default; dark theme when the visitor turns it on. No external fonts or frameworks. */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Lora"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/Lora-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/Manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  /* Brand colours, sampled from the KairoSols logo */
  --logo-blue: #1096c7;       /* "Kairo" and the swoosh */
  --logo-green: #02a458;      /* "Sols" */
  --logo-ink: #181818;        /* "Get Secured" */
  --brand-gradient: linear-gradient(100deg, #1096c7 0%, #02a458 100%);  /* decoration only */
  /* Same hues, deep enough for white text and small text (see tests/contrast_check.py) */
  --brand-solid: #0c7095;     /* brand buttons and tiles, white text 5.6:1, same in both themes */
  --brand-solid-hover: #095b7a;
  --action-gradient: linear-gradient(100deg, #0c7095 0%, #027b42 100%);  /* CTA block behind white text */

  /* Usage tokens */
  --blue: #0c7095;            /* links and accent text */
  --green: #027b42;           /* "fixed" and positive accents in text */
  --page: #ffffff;
  --ink: #181818;             /* headings, dark buttons */
  --text: #333333;
  --muted: #5f6368;
  --line: rgba(24, 24, 24, .12);
  --line-soft: rgba(24, 24, 24, .07);
  --tint: #eaf6fb;            /* logo blue at 8%: the one light panel colour */
  --tint-green: #e6f6ee;      /* logo green at 10%: secondary tiles only */
  --surface: #ffffff;         /* cards */
  --dark: #181818;            /* dark panels (the logo's ink) */
  --dark-2: #242424;          /* raised surfaces on dark panels */
  --on-dark: #f2f2f2;
  --on-dark-muted: #b4b4b4;

  /* Severity: only for severity labels */
  --critical: #c4262e;
  --high: #b04a0c;
  --medium: #8a6500;
  --fixed: #027b42;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius: 12px;
  --serif: "Lora", Georgia, Cambria, "Times New Roman", serif;
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --page-gutter: clamp(12px, 2.2vw, 40px);
  --panel-pad: clamp(22px, 5vw, 80px);   /* inner padding of every panel */
  /* Content starts at the same x everywhere: panel gutter + panel padding, or centred at --container width */
  --content-inset: max(calc(var(--page-gutter) + var(--panel-pad)), calc((100% - var(--container)) / 2));
  --container: 1240px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --blue: #1096c7;
  --green: #02a458;
  --page: #111111;
  --ink: #f2f2f2;
  --text: #d2d2d2;
  --muted: #a3a6ab;
  --line: rgba(255, 255, 255, .13);
  --line-soft: rgba(255, 255, 255, .07);
  --tint: #0f2029;
  --tint-green: #0e231a;
  --surface: #191919;
  --dark: #1c1c1c;
  --dark-2: #2a2a2a;
  --critical: #ff7b7f;
  --high: #ffa25a;
  --medium: #f0c040;
  --fixed: #3cc47f;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; color: var(--text);
  background: var(--page); -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-solid-hover); }
.prose a, p > a:not(.btn):not(.link-arrow), dd a, .faq a {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .5em; font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -.012em; }
h1 { font-size: clamp(2.6rem, 5.4vw + .5rem, 5.9rem); letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 3vw + .6rem, 3.6rem); }
h3 { font-size: clamp(1.3rem, .6vw + 1.05rem, 1.65rem); line-height: 1.2; }
h4 { font-family: var(--sans); font-weight: 700; font-size: 1rem; letter-spacing: 0; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
address { font-style: normal; }
strong { color: var(--ink); font-weight: 650; }
/* In-page links (e.g. #sample-report) stop below the sticky header */
[id] { scroll-margin-top: 100px; }
::selection { background: color-mix(in srgb, var(--logo-blue) 25%, transparent); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; margin: 0; padding: 0 var(--content-inset); }
.skip-link { position: absolute; left: -9999px; top: 10px; z-index: 200; background: var(--page); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); }
.skip-link:focus { left: 10px; }

/* Mono uppercase label (section kicker) */
.eyebrow, .label {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  font-family: var(--mono); font-size: .78rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.lead { font-size: clamp(1.08rem, .35vw + 1rem, 1.25rem); color: var(--text); max-width: 620px; }

/* ---------- Buttons and links ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .8em 1.35em; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .97rem; line-height: 1.25; cursor: pointer; text-align: center;
  transition: background-color .25s var(--ease), color .25s, border-color .25s, transform .25s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: var(--page); }
.btn-primary:hover { background: var(--brand-solid); color: #fff; }
.btn-brand { background: var(--brand-solid); color: #fff; }
.btn-brand:hover { background: var(--brand-solid-hover); color: #fff; }
.btn-light { background: #fff; color: var(--logo-ink); }
.btn-light:hover { background: #eaf6fb; color: var(--logo-ink); }
.btn-sm { padding: .58em 1.1em; font-size: .9rem; white-space: nowrap; }
.btn .arrow, .link-arrow .arrow, .card-link::after { display: inline-block; transition: transform .35s var(--ease); }
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: .45em; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.link-arrow:hover { color: var(--blue); }
.link-download:hover .arrow { transform: translateY(3px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; padding: 10px var(--page-gutter); transition: background-color .3s, box-shadow .3s, backdrop-filter .3s; }
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--page) 78%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line-soft);
}
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; max-width: 1400px; margin: 0 auto; }
.brand { justify-self: start; display: flex; align-items: center; }
.brand img { height: 60px; width: auto; transition: transform .3s var(--ease); }
@media (max-width: 600px) { .brand img { height: 50px; } }
.brand:hover img { transform: scale(1.03); }
:root[data-theme="dark"] .brand img, :root[data-theme="dark"] .footer-brand img { background: #fff; border-radius: 10px; padding: 3px 7px; box-sizing: content-box; }
.site-nav ul {
  list-style: none; margin: 0; padding: 5px; display: flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--page) 85%, transparent);
}
.site-nav a:not(.btn) { display: block; padding: 7px 15px; border-radius: 999px; color: var(--ink); font-size: .93rem; font-weight: 550; transition: background-color .2s, color .2s; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"]:not(.btn) { background: var(--tint); color: var(--ink); }
.site-nav .nav-cta { display: none; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer; transition: border-color .2s, background-color .2s;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; transition: transform .45s var(--ease); }
.theme-toggle:hover svg { transform: rotate(-25deg); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.nav-toggle { display: none; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 17px; height: 1.5px; border-radius: 2px; background: currentColor; position: relative; content: "";
  transition: transform .3s var(--ease), background-color .2s;
}
.nav-toggle-bar::before { position: absolute; top: -5.5px; }
.nav-toggle-bar::after { position: absolute; top: 5.5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 960px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .header-actions .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: calc(100% - 4px); left: var(--page-gutter); right: var(--page-gutter);
    /* Fit short (e.g. landscape) screens: scroll inside the menu, never the page behind it */
    max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain;
    background: var(--page); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .35);
    opacity: 0; transform: translateY(-8px); visibility: hidden; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
  }
  .site-nav.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
  html.menu-open { overflow: hidden; }
  .site-nav ul { flex-direction: column; align-items: stretch; border: 0; padding: 10px; background: transparent; }
  .site-nav a:not(.btn) { padding: 12px 14px; border-radius: 12px; font-size: 1rem; }
  .site-nav .nav-cta { display: block; margin-top: 6px; }
  .site-nav .nav-cta .btn { width: 100%; }
}

/* ---------- Panels (the rounded full-width blocks) ---------- */
.panel {
  position: relative; border-radius: var(--radius-xl); margin: 0 var(--page-gutter);
  padding: clamp(36px, 5.5vw, 88px) var(--panel-pad); overflow: hidden;
}
.panel-outline { border: 1px solid var(--line); }

/* Stat band: the site's headline numbers ({{stat:...}} from src/stats.json), one style everywhere */
.stat-band {
  position: relative; overflow: hidden; isolation: isolate; margin: 0 var(--page-gutter); border-radius: var(--radius-xl);
  background: var(--dark); padding: clamp(32px, 4.5vw, 64px) var(--panel-pad);
}
.stat-band::before { content: ""; position: absolute; z-index: -1; inset: auto -10% -70% auto; width: 55%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--logo-blue) 38%, transparent), transparent); filter: blur(30px); }
.stat-band-head { max-width: var(--container); margin: 0 auto clamp(22px, 3vw, 40px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px 24px; }
.stat-band-head h2 { color: #fff; margin: 0; font-size: clamp(1.6rem, 2.4vw, 2.3rem); }
.stat-band-head .eyebrow { color: var(--on-dark-muted); }
.stats { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats .stat { padding: 6px clamp(14px, 2.2vw, 36px); border-left: 1px solid rgba(255, 255, 255, .14); display: flex; flex-direction: column; gap: 12px; }
.stats .stat:first-child { border-left: 0; padding-left: 0; }
.stat-num {
  align-self: flex-start; padding-right: .04em; font-family: var(--serif); font-size: clamp(3rem, 6.2vw, 5.8rem); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-band-note { max-width: var(--container); margin: clamp(22px, 3vw, 36px) auto 0; color: var(--on-dark-muted); font-size: 1.02rem; }
.sample-report { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.sample-report .check-list { margin: 0; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--tint); }
@media (max-width: 860px) { .sample-report { grid-template-columns: minmax(0, 1fr); } }
.stat-label { font-family: var(--mono); font-size: .76rem; line-height: 1.45; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); }
@media (max-width: 900px) {
  .stats, .stats-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .stats .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
}
@media (max-width: 460px) {
  .stats, .stats-3 { grid-template-columns: minmax(0, 1fr); }
  .stats .stat { border-left: 0; padding-left: 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); }
  .stats .stat:first-child { border-top: 0; padding-top: 0; }
}
.panel-dark { background: var(--dark); color: var(--on-dark-muted); }
.panel-dark h1, .panel-dark h2, .panel-dark h3, .panel-dark strong { color: #fff; }
.panel-dark .eyebrow, .panel-dark .label { color: var(--on-dark-muted); }
.panel-dark p, .panel-dark .lead { color: var(--on-dark-muted); }
.panel-dark .link-arrow { color: #fff; }
.panel-inner { max-width: var(--container); margin: 0 auto; }
.block { padding: clamp(14px, 2vw, 24px) 0; }

/* Inner pages reuse the same look through these older section classes */

.section-head { max-width: 760px; margin-bottom: clamp(30px, 4vw, 52px); }
.section-head p { color: var(--muted); font-size: 1.12rem; }

/* ---------- Hero (home) ---------- */
.hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.2vw, 16px); margin: 0 var(--page-gutter); min-height: min(78vh, 760px); }
.hero-copy {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--tint); border-radius: var(--radius-xl); padding: clamp(32px, 5vw, 72px) clamp(32px, 5vw, 72px) clamp(64px, 8vw, 112px);
  display: flex; flex-direction: column; justify-content: center;
}
/* The previous site's signature: light sky fading into the logo's blue-to-green band */
.hero-copy::after {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: clamp(34px, 5vw, 64px);
  background: var(--brand-gradient);
  -webkit-mask: linear-gradient(180deg, transparent, #000 85%); mask: linear-gradient(180deg, transparent, #000 85%);
}
.hero-copy h1 { margin-bottom: .35em; }
.hero-copy .lead { margin-bottom: 1em; }
.hero-proof { font-weight: 650; color: var(--ink); margin-bottom: 1.8em; }
.hero-tool { margin: 1.6em 0 0; font-size: .95rem; color: var(--muted); }
.hero-tool a { font-weight: 650; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hero-art {
  position: relative; background-color: var(--dark); border-radius: var(--radius-xl); overflow: hidden; min-height: 460px;
  --px: 0; --py: 0;   /* pointer position, set by site.js for a subtle parallax */
}
/* Dot grid fills the whole panel and drifts slowly; the map itself always fits inside without cropping */
.hero-art::before {
  content: ""; position: absolute; inset: -20px; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1.2px, transparent 1.4px); background-size: 20px 20px;
  animation: grid-drift 18s linear infinite;
}
@keyframes grid-drift { to { transform: translate(20px, 20px); } }
:root[data-theme="dark"] .hero-art { border: 1px solid var(--line); }
@media (max-width: 960px) { .hero-split { grid-template-columns: minmax(0, 1fr); min-height: 0; } .hero-art { min-height: 480px; } }
@media (max-width: 600px) {
  .finding-card { min-width: 0; max-width: 72%; font-size: .7rem; }
}
/* Side-by-side hero on smaller laptops and tablets: the panel gets too narrow for the card and the
   counters to share the top row, so the cards sit just below the counters */
.hero-art { container: hero-art / inline-size; }
@media (min-width: 961px) {
  @container hero-art (max-width: 660px) {
    /* .hero-art prefix: must outrank the cards' default .finding-card.cN position defined further down */
    .hero-art .finding-card.c1, .hero-art .finding-card.c2, .hero-art .finding-card.c3 { top: calc(4% + 50px); }
  }
}

/* Attack-surface map */
.map { position: absolute; inset: 0; width: 100%; height: 100%; translate: calc(var(--px) * -10px) calc(var(--py) * -10px); transition: translate .8s var(--ease); }
.map .link { stroke: rgba(255, 255, 255, .3); stroke-width: 1.4; fill: none; stroke-dasharray: 3 7; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -10; } }
.map .ring { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.map .ring-outer { stroke-dasharray: 3 9; stroke: rgba(255, 255, 255, .14); }
.map .ring-outer, .map .radar { transform-box: view-box; transform-origin: 300px 280px; }
.map .ring-outer { animation: spin 40s linear infinite reverse; }
.map .radar { animation: spin 5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Packets: bright dashes with a glow, travelling out and back along every link */
.map .packet { fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: 18 208; filter: drop-shadow(0 0 6px currentColor); animation: packet 3s linear infinite; }
.map .packet.back { animation-duration: 4.4s; animation-direction: reverse; opacity: .8; }
.map .packet.blue { color: var(--logo-blue); }
.map .packet.green { color: var(--logo-green); }
.map .packet.d1 { animation-delay: -.6s; } .map .packet.d2 { animation-delay: -1.4s; } .map .packet.d3 { animation-delay: -2.1s; }
.map .packet.d4 { animation-delay: -2.8s; } .map .packet.d5 { animation-delay: -3.3s; }
@keyframes packet { from { stroke-dashoffset: 226; } to { stroke-dashoffset: 0; } }

/* Nodes are scanned one after another: border lights blue, then the status dot turns green */
.map .node rect { fill: var(--dark-2); stroke: rgba(255, 255, 255, .16); }
.map .node text { fill: var(--on-dark); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; }
.map .node .status { fill: #5a5a5a; }
.map .node:not(.core) rect { animation: node-scan 12s linear infinite; }
.map .node .status { animation: node-status 12s linear infinite; }
.map .n2 rect, .map .n2 .status { animation-delay: 2s; }
.map .n3 rect, .map .n3 .status { animation-delay: 4s; }
.map .n4 rect, .map .n4 .status { animation-delay: 6s; }
.map .n5 rect, .map .n5 .status { animation-delay: 8s; }
.map .n6 rect, .map .n6 .status { animation-delay: 10s; }
@keyframes node-scan {
  0%, 22%, 100% { stroke: rgba(255, 255, 255, .16); filter: none; }
  4% { stroke: var(--logo-blue); filter: drop-shadow(0 0 6px rgba(16, 150, 199, .9)); }
  12% { stroke: var(--logo-green); filter: drop-shadow(0 0 6px rgba(2, 164, 88, .85)); }
}
@keyframes node-status {
  0%, 2% { fill: #5a5a5a; }
  4%, 9% { fill: var(--logo-blue); }
  12%, 96% { fill: var(--logo-green); }
  100% { fill: #5a5a5a; }
}
.map .core rect { fill: #fff; stroke: none; transform-box: fill-box; transform-origin: center; animation: breathe 3s ease-in-out infinite; }
.map .core text { fill: var(--logo-ink); font-weight: 700; }
@keyframes breathe { 50% { transform: scale(1.04); } }
.map .pulse { fill: none; stroke: var(--logo-green); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: ring 3s var(--ease) infinite; }
.map .pulse.late { stroke: var(--logo-blue); animation-delay: 1.5s; }
@keyframes ring { from { opacity: .8; transform: scale(.6); } to { opacity: 0; transform: scale(1.8); } }

/* Findings pop up in turn above the map */
.finding-card {
  position: absolute; z-index: 2; min-width: 200px; max-width: 250px; padding: 10px 12px; border-radius: 10px;
  background: #fff; color: var(--logo-ink); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
  font-family: var(--mono); font-size: .74rem; line-height: 1.45; opacity: 0; animation: card-cycle 12s var(--ease) infinite;
  translate: calc(var(--px) * 14px) calc(var(--py) * 14px); transition: translate .8s var(--ease);
}
.finding-card b { display: block; font-family: var(--sans); font-size: .86rem; font-weight: 700; margin-bottom: 2px; }
.finding-card .sevtag { display: inline-block; margin-top: 4px; font-weight: 700; letter-spacing: .06em; }
/* Finding cards are always white, so their severity colours don't follow the theme */
.finding-card .sev-critical { color: #c4262e; } .finding-card .sev-high { color: #b04a0c; } .finding-card .sev-fixed { color: #027b42; }
/* Cards take turns in the top-left slot; the live counters sit top-right */
.finding-card.c1 { top: 4%; left: 5%; }
.finding-card.c2 { top: 4%; left: 5%; animation-delay: 4s; }
.finding-card.c3 { top: 4%; left: 5%; animation-delay: 8s; }
/* Each card is fully gone (31%) before the next one starts (33.3% = 4s of the 12s cycle), so they never stack */
@keyframes card-cycle { 0% { opacity: 0; transform: translateY(8px); } 4%, 26% { opacity: 1; transform: none; } 31%, 100% { opacity: 0; transform: translateY(-6px); } }

/* Nodes build in on load, then float gently */
.map .node:not(.core) { transform-box: fill-box; transform-origin: center; animation: node-in .7s var(--ease) both, bob 4.5s ease-in-out .9s infinite; }
.map .n1 { animation-delay: .15s, 1s; } .map .n2 { animation-delay: .3s, 1.6s; } .map .n3 { animation-delay: .45s, 2.2s; }
.map .n4 { animation-delay: .6s, 1.3s; } .map .n5 { animation-delay: .75s, 1.9s; } .map .n6 { animation-delay: .9s, 2.5s; }
@keyframes node-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* A scan beam sweeps down the panel */
.beam {
  position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 140px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(16, 150, 199, .14) 70%, rgba(16, 150, 199, .55) 99%, transparent);
  animation: beam 6s cubic-bezier(.45, 0, .55, 1) infinite;
}
@keyframes beam { 0% { top: -150px; } 70%, 100% { top: 100%; } }

/* Live counters */
.hud { position: absolute; z-index: 2; top: 4%; right: 5%; display: flex; gap: 6px; font-family: var(--mono); font-size: .7rem; color: var(--on-dark-muted); text-transform: uppercase; letter-spacing: .06em; }
.hud span { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--dark-2) 92%, transparent); border: 1px solid rgba(255, 255, 255, .1); }
.hud b { font-size: 1rem; color: #fff; font-variant-numeric: tabular-nums; min-width: 1.2em; text-align: right; }
.hud .ok b { color: var(--logo-green); }
.hud b.tick { animation: tick .45s var(--ease); }
@keyframes tick { 0% { transform: translateY(-6px); opacity: .3; } 100% { transform: none; opacity: 1; } }
@media (max-width: 760px) { .hud { display: none; } }

/* Play / pause control. One switch (html.motion-paused) governs all looping motion on the site. */
.anim-toggle {
  position: absolute; z-index: 3; right: 14px; bottom: 18px; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer;
  background: color-mix(in srgb, var(--dark-2) 92%, transparent); border: 1px solid rgba(255, 255, 255, .16); color: var(--on-dark);
  font: inherit; font-size: .8rem; font-weight: 600;
}
.anim-toggle:hover { border-color: rgba(255, 255, 255, .5); }
.anim-toggle svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
.anim-toggle .i-play, .anim-toggle .anim-label { display: none; }
.motion-paused .anim-toggle { background: #fff; color: var(--logo-ink); border-color: #fff; }
.motion-paused .anim-toggle .i-pause { display: none; }
.motion-paused .anim-toggle .i-play, .motion-paused .anim-toggle .anim-label { display: inline; }

/* Paused with the Pause button: a finished, static frame of the scan */
.motion-paused .hero-art *, .motion-paused .hero-art::before, .motion-paused .hero-side::before,
.motion-paused .marquee-track, .motion-paused .dots i, .motion-paused .cta-block::before, .motion-paused .cta-block::after {
  animation: none !important;
}
.motion-paused .map, .motion-paused .finding-card { translate: none; }
.motion-paused .map .packet, .motion-paused .beam, .motion-paused .finding-card { opacity: 0; }
.motion-paused .finding-card.c2 { opacity: 1; }
.motion-paused .map .node .status { fill: var(--logo-green); }
.motion-paused .map .pulse { opacity: .35; }
.motion-paused .term-lines { transform: translateY(-6em); }
.motion-paused .marquee { -webkit-mask: none; mask: none; padding: 0 var(--page-gutter); }
.motion-paused .marquee-track { width: auto; flex-wrap: wrap; justify-content: center; transform: none; }
.motion-paused .marquee-track [aria-hidden="true"] { display: none; }

/* Live terminal line along the bottom */
.term {
  position: absolute; z-index: 2; left: 14px; bottom: 18px; max-width: calc(100% - 76px);
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--dark-2) 92%, transparent); border: 1px solid rgba(255, 255, 255, .12);
  font-family: var(--mono); font-size: .76rem; color: var(--on-dark); white-space: nowrap;
}
.term-prompt { color: var(--logo-green); font-weight: 700; }
.term-window { display: inline-block; height: 1.5em; line-height: 1.5em; overflow: hidden; min-width: 0; }
.term-lines { display: block; animation: term-roll 15s var(--ease) infinite; }
.term-lines > span { display: block; height: 1.5em; overflow: hidden; text-overflow: ellipsis; }
.term-lines .ok { color: var(--logo-green); }
.term-caret { width: 7px; height: 1.05em; background: var(--logo-blue); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@keyframes term-roll {
  0%, 16% { transform: translateY(0); }
  20%, 36% { transform: translateY(-1.5em); }
  40%, 56% { transform: translateY(-3em); }
  60%, 76% { transform: translateY(-4.5em); }
  80%, 96% { transform: translateY(-6em); }
  100% { transform: translateY(-7.5em); }
}

/* ---------- Marquee ---------- */
.marquee-wrap { padding: clamp(36px, 5vw, 64px) 0; text-align: center; }
.marquee-title { font-family: var(--serif); font-size: clamp(1.35rem, 1.2vw + 1rem, 2rem); color: var(--ink); margin-bottom: 24px; padding: 0 20px; }
.marquee { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 14px; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  white-space: nowrap; font-weight: 600; color: var(--ink); padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 9px;
}
.marquee-track span::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--brand-gradient); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Dot matrix ---------- */
.dots { display: grid; gap: 5px; }
.dots i { aspect-ratio: 1; border-radius: 2px; background: rgba(255, 255, 255, .08); }
.dots i.on { background: rgba(255, 255, 255, .5); }
.dots i.blue { background: var(--logo-blue); }
.dots i.green { background: var(--logo-green); }
.dots.live i.blink { animation: blink 2.8s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.dots-wide { grid-template-columns: repeat(32, 1fr); max-width: 100%; margin: clamp(26px, 4vw, 48px) 0; }
.matrix-legend { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); }

/* Pixel icon (SVG made of squares) */
.pixel { width: 40px; height: 40px; color: var(--logo-blue); margin-bottom: 18px; }
.pixel rect { fill: currentColor; }
.pixel .accent { fill: var(--logo-green); }

/* ---------- Columns with hairlines ---------- */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.col { border-top: 1px solid var(--line); padding-top: 22px; }
.panel-dark .col { border-color: rgba(255, 255, 255, .14); }
.col h3 { margin-bottom: .55em; }
.col ul { list-style: none; padding: 0; margin: 0 0 1em; }
.col li { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.panel-dark .col li { border-color: rgba(255, 255, 255, .08); color: var(--on-dark); }
.col p { color: var(--muted); }
.panel-dark .col p { color: var(--on-dark-muted); }
.numeral { font-family: var(--serif); font-size: clamp(3.4rem, 5vw, 5.4rem); line-height: 1; color: var(--ink); margin-bottom: 16px; display: block; }
.panel-dark .numeral { color: #fff; }
@media (max-width: 960px) { .cols, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cols, .cols-4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Tabs (numbered service switcher) ---------- */
.tabs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.tab-list { display: flex; flex-direction: column; }
.tab {
  display: flex; align-items: center; gap: 18px; width: 100%; padding: 16px 0; text-align: left;
  font: inherit; font-family: var(--serif); font-size: clamp(1.25rem, 1vw + 1rem, 1.7rem); color: var(--muted);
  background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; transition: color .25s;
}
.tab .num { font-size: .8em; min-width: 1.4em; }
.tab::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.tab-panel {
  border-radius: var(--radius-xl); background: var(--dark); color: var(--on-dark-muted); padding: clamp(26px, 3.5vw, 44px);
  min-height: 100%; animation: panel-in .5s var(--ease);
}
.tab-panel[hidden] { display: none; }
.tab-panel h3 { color: #fff; }
.tab-panel .check-list li { color: var(--on-dark); }
.tab-panel .link-arrow { color: #fff; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) { .tabs { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Bento outcome tiles ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(250px, auto); gap: clamp(10px, 1.2vw, 16px); margin: 0 var(--page-gutter); }
.tile .pixel { width: min(62%, 170px); height: auto; margin: auto; color: var(--logo-blue); }
.tile .pixel .accent { fill: var(--logo-green); }
.quote-split .art .pixel { width: min(60%, 300px); height: auto; margin: 0; color: var(--logo-blue); }
/* Pixels pop in when their tile scrolls into view */
.tile.is-visible .pixel rect, .quote-split.is-visible .pixel rect { animation: pixel-in .6s var(--ease) both; }
.is-visible .pixel rect:nth-child(3n) { animation-delay: .12s; }
.is-visible .pixel rect:nth-child(3n+1) { animation-delay: .24s; }
@keyframes pixel-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.pixel rect { transform-box: fill-box; transform-origin: center; }
.tile {
  border-radius: var(--radius-xl); padding: clamp(22px, 2.4vw, 32px); display: flex; flex-direction: column; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); transition: transform .45s var(--ease);
}
.tile.sky, .tile.mint, .tile.dark, .tile.solid { border-color: transparent; }
.tile:hover { transform: translateY(-4px); }
.tile.sky { background: var(--tint); }
.tile.mint { background: var(--tint-green); }
.tile.dark { background: var(--dark); color: var(--on-dark-muted); }
.tile.solid { background: var(--brand-solid); color: #fff; }
.tile.wide { grid-column: span 2; }
.tile .big { font-family: var(--serif); font-size: clamp(2.1rem, 2.6vw + .6rem, 3.3rem); line-height: 1.05; color: var(--ink); margin: 0 0 .4em; }
.tile.dark .big, .tile.solid .big { color: #fff; }
.tile .ref { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: block; }
.tile.dark .ref { color: var(--on-dark-muted); }
.tile.solid .ref { color: rgba(255, 255, 255, .85); }
.tile p { margin: 0; color: var(--text); font-size: .98rem; }
.tile.dark p { color: var(--on-dark); }
.tile.solid p { color: #fff; }
.tile .dots { grid-template-columns: repeat(9, 1fr); width: min(100%, 220px); margin: auto; }
.tile.dark .dots i { background: rgba(255, 255, 255, .1); }
@media (max-width: 1000px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .bento { grid-template-columns: minmax(0, 1fr); } .tile.wide { grid-column: auto; } }

/* ---------- Quote split ---------- */
.quote-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.2vw, 16px); margin: 0 var(--page-gutter); }
.quote-split .art { border-radius: var(--radius-xl); background: var(--tint); display: grid; place-items: center; padding: 40px; min-height: 380px; }
.quote-split .art .dots { grid-template-columns: repeat(13, 1fr); width: min(100%, 360px); gap: 7px; }
.quote-split .art .dots i { background: color-mix(in srgb, var(--logo-blue) 12%, transparent); }
.quote-split .art .dots i.on { background: var(--logo-blue); }
.quote-split .art .dots i.green { background: var(--green); }
.quote-split blockquote { margin: 0; border-radius: var(--radius-xl); background: var(--dark); padding: clamp(30px, 4.5vw, 68px); display: flex; flex-direction: column; justify-content: center; }
.quote-split blockquote p { font-family: var(--serif); font-size: clamp(1.6rem, 1.8vw + 1rem, 2.6rem); line-height: 1.2; color: #fff; }
.quote-split blockquote footer { font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); }
@media (max-width: 860px) { .quote-split { grid-template-columns: minmax(0, 1fr); } .quote-split .art { min-height: 260px; } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: clamp(12px, 1.4vw, 18px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.grid > *, .cols > *, .bento > *, .tabs > *, .hero-split > *, .quote-split > *, .footer-grid > *, .form-row > * { min-width: 0; }

.card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius-lg); padding: clamp(22px, 2.4vw, 30px);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, transform .45s var(--ease), background-color .3s;
}
.card h3 { margin-bottom: .45em; }
.card p { color: var(--muted); }
.card > :last-child { margin-bottom: 0; }
a.card { color: inherit; }
a.card:hover { border-color: var(--ink); transform: translateY(-3px); }
.card-link { margin-top: auto; padding-top: 12px; font-weight: 600; color: var(--ink); display: inline-flex; gap: 6px; }
.card-link::after { content: "\2192"; }
a.card:hover .card-link::after { transform: translateX(4px); }
/* Icon wrapper on inner pages: same pixel icon style as the home page */

.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding: 11px 0 11px 28px; border-bottom: 1px solid var(--line-soft); }
.check-list li:last-child { border-bottom: 0; }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 9px; height: 9px; border-radius: 2px; background: var(--brand-gradient); }

/* ---------- Inner page hero: the same split as the home hero ---------- */
.page-hero { min-height: 0; }
.page-hero .hero-copy { justify-content: flex-start; }
.page-hero h1 { font-size: clamp(2.4rem, 3.4vw + .6rem, 4.3rem); }
.hero-side {
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-xl); background: var(--dark); color: var(--on-dark-muted);
  padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.hero-side::before {
  content: ""; position: absolute; z-index: -1; inset: -20px; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1.2px, transparent 1.4px); background-size: 20px 20px;
  animation: grid-drift 18s linear infinite;
}
:root[data-theme="dark"] .hero-side { border: 1px solid var(--line); }
.hero-side .pixel { width: clamp(72px, 8vw, 104px); height: auto; margin: 0; color: var(--logo-blue); }
.hero-side .pixel .accent { fill: var(--logo-green); }
.hero-side .label { color: var(--on-dark-muted); margin-bottom: 4px; }
.fact-list { list-style: none; margin: 0; padding: 0; }
.fact-list li { display: grid; grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr); gap: 16px; padding: 13px 0; border-top: 1px solid rgba(255, 255, 255, .12); color: var(--on-dark); }
.fact-list .k { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); padding-top: .25em; }
@media (max-width: 520px) { .fact-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
/* Contact: the form takes the right-hand panel */
.hero-form { border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface); padding: clamp(24px, 3.5vw, 48px); }
.next-steps { list-style: none; counter-reset: step; padding: 0; margin: 4px 0 28px; max-width: 560px; }
.next-steps li { counter-increment: step; position: relative; padding: 12px 0 12px 46px; border-top: 1px solid var(--line); color: var(--text); }
.next-steps li::before { content: counter(step); position: absolute; left: 0; top: 4px; font-family: var(--serif); font-size: 1.9rem; line-height: 1.2; color: var(--ink); }
.contact-direct { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; font-weight: 650; }
.contact-direct a { color: var(--ink); text-decoration: none; }
.contact-direct a:hover { color: var(--blue); }
.contact-direct .muted { flex-basis: 100%; font-weight: 400; font-size: .92rem; }
.on-dark-link { color: #fff; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.on-dark-link:hover { color: var(--logo-blue); }
.breadcrumb { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 22px; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
/* ---------- Stats ---------- */

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 2.5vw, 36px); list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding-top: 18px; }
.steps li::before { content: counter(step); display: block; font-family: var(--serif); font-size: clamp(3rem, 4vw, 4.4rem); line-height: 1; color: var(--ink); margin-bottom: 14px; }
.steps h3 { font-size: 1.3rem; }
.steps p { color: var(--muted); }

/* ---------- Severity ---------- */
.sev { font-weight: 700; }
.sev-critical { color: var(--critical); }
.sev-high { color: var(--high); }
.sev-medium { color: var(--medium); }
.sev-fixed { color: var(--fixed); }

/* ---------- Case studies ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-btn {
  font: inherit; font-size: .92rem; font-weight: 600; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  color: var(--ink); background: transparent; border: 1px solid var(--line); transition: background-color .2s, color .2s, border-color .2s;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--ink); color: var(--page); border-color: var(--ink); }
/* Case cards share rows with their neighbours (subgrid), so reference, title, outcome,
   work and findings line up across every card in a row, whatever the text length. */
.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(12px, 1.4vw, 18px); row-gap: 0; }
@media (max-width: 1100px) { .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .case-grid { grid-template-columns: minmax(0, 1fr); } }
.case-card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; margin-bottom: clamp(12px, 1.4vw, 18px); }
.case-card > * { margin: 0; }
.case-card .case-ref { font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 12px; }
.case-card h3 { font-size: 1.3rem; padding-bottom: 16px; }
.case-card .outcome { font-family: var(--serif); font-size: 1.22rem; line-height: 1.3; color: var(--ink); padding: 16px 0 18px; border-top: 1px solid var(--line); }
.case-meta { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.case-meta:last-child { padding-bottom: 0; }
.case-meta .k { display: block; font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 3px; }
.case-meta p { margin: 0; color: var(--text); font-size: .96rem; }
.case-card[hidden] { display: none; }
.case-card.is-entering { animation: panel-in .45s var(--ease); }
/* ---------- FAQ ---------- */
.faq { max-width: 920px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; position: relative; padding: 22px 44px 22px 0; font-family: var(--serif); font-size: clamp(1.15rem, .6vw + 1rem, 1.45rem); color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 16px; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0); }
.faq details > :not(summary) { color: var(--muted); max-width: 760px; animation: panel-in .35s var(--ease); }
.faq details > :last-child { padding-bottom: 14px; }

/* ---------- CTA block ---------- */
.cta-block {
  position: relative; overflow: hidden; isolation: isolate; margin: 0 var(--page-gutter); border-radius: var(--radius-xl);
  background: var(--action-gradient); color: #fff; padding: clamp(48px, 9vw, 140px) clamp(24px, 6vw, 96px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 28px;
}
.cta-block::before, .cta-block::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(40px); }
.cta-block::before { width: 46%; aspect-ratio: 1; right: -12%; top: -40%; background: radial-gradient(closest-side, color-mix(in srgb, var(--logo-green) 70%, transparent), transparent); animation: drift 14s ease-in-out infinite alternate; }
.cta-block::after { width: 34%; aspect-ratio: 1; right: 6%; bottom: -60%; background: radial-gradient(closest-side, color-mix(in srgb, var(--logo-blue) 70%, transparent), transparent); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-6%, 8%) scale(1.12); } }
.cta-block h2 { color: #fff; font-size: clamp(3.2rem, 9vw, 9rem); line-height: .95; margin: 0; }
.cta-block p { color: #fff; max-width: 520px; margin: 18px 0 0; font-size: 1.1rem; }
@media (max-width: 760px) { .cta-block { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
.field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 7px; font-size: .94rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .86rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--page);
  padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 16%, transparent); }
.field ::placeholder { color: var(--muted); opacity: .85; }
.field [aria-invalid="true"] { border-color: var(--critical); }
.field-error { color: var(--critical); font-size: .88rem; margin: 6px 0 0; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .88rem; color: var(--muted); }
.notice { padding: 14px 18px; border-radius: var(--radius); font-weight: 600; }
.notice-error { background: color-mix(in srgb, var(--critical) 9%, var(--page)); color: var(--critical); border: 1px solid color-mix(in srgb, var(--critical) 30%, transparent); }

/* ---------- Prose ---------- */
/* Keep reading lines short without moving the column off the shared left edge */
.prose > * { max-width: 820px; }
.prose h2 { font-size: clamp(1.6rem, 1vw + 1.2rem, 2.1rem); margin-top: 1.6em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.3em; font-size: .96rem; }
.prose th, .prose td { text-align: left; padding: 12px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 650; }
.table-wrap { overflow-x: auto; }

/* ---------- Footer ---------- */
.site-footer { margin: clamp(14px, 2vw, 24px) var(--page-gutter) var(--page-gutter); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: clamp(40px, 5vw, 72px) 0 26px; font-size: .95rem; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--blue); }
.site-footer > .container { padding: 0 max(var(--panel-pad), calc((100% - var(--container)) / 2)); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 36px; }
.footer-brand img { height: 76px; width: auto; margin-bottom: 18px; }
.footer-brand .footer-tag { font-family: var(--serif); font-size: clamp(1.5rem, 1.3vw + 1rem, 2.1rem); line-height: 1.15; color: var(--ink); max-width: 340px; }
.footer-heading { font-family: var(--mono); font-weight: 500; color: var(--muted); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer address { color: var(--muted); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 44px; padding-top: 22px; font-size: .88rem; color: var(--muted); }
.footer-bottom p { margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Website security check (/security-check/) ---------- */
.sc-form { margin-top: 26px; gap: 14px; max-width: 640px; }
.sc-input-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-input-row input { flex: 1 1 240px; min-width: 0; }
.sc-input-row .btn { flex: 0 0 auto; }
.sc-input-row .field-error, .sc-consent .field-error { flex-basis: 100%; }
.sc-consent { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.sc-consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--brand-solid); }
.sc-consent label { margin: 0; font-weight: 500; flex: 1 1 0; }
@media (max-width: 520px) { .sc-input-row .btn { flex: 1 1 100%; justify-content: center; } }

.sc-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sc-steps li { position: relative; padding: 12px 0 12px 34px; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.sc-steps li:last-child { border-bottom: 0; }
.sc-steps li::before { content: ""; position: absolute; left: 4px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 4px; border: 2px solid var(--line); }
.sc-steps li[data-state="active"] { color: var(--ink); font-weight: 600; }
.sc-steps li[data-state="active"]::before { border-color: var(--blue); border-right-color: transparent; border-radius: 50%; animation: sc-spin .8s linear infinite; }
.sc-steps li[data-state="done"] { color: var(--ink); }
.sc-steps li[data-state="done"]::before { border-color: transparent; background: var(--brand-gradient); }
@keyframes sc-spin { to { transform: rotate(360deg); } }

.sc-results { display: grid; gap: clamp(10px, 1.2vw, 16px); margin: 0 var(--page-gutter); outline: none; }
.sc-results[hidden] { display: none; }
.sc-shared { margin: 0; background: var(--tint); color: var(--ink); font-weight: 500; }
.sc-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: clamp(10px, 1.2vw, 16px); }
.sc-grade { --grade: var(--muted); justify-content: space-between; background: color-mix(in srgb, var(--grade) 10%, var(--page)); border-color: transparent; }
.sc-grade[data-grade="A"], .sc-grade[data-grade="B"] { --grade: var(--fixed); }
.sc-grade[data-grade="C"] { --grade: var(--medium); }
.sc-grade[data-grade="D"] { --grade: var(--high); }
.sc-grade[data-grade="F"] { --grade: var(--critical); }
.sc-grade .sc-letter { margin: 0; font-family: var(--serif); font-size: clamp(6rem, 13vw, 11rem); line-height: .9; color: var(--grade); }
.sc-grade .sc-score { margin: 0; font-family: var(--mono); font-size: .9rem; letter-spacing: .08em; color: var(--ink); }
.sc-overview { gap: 22px; }
.sc-domain { margin: 0 0 .3em; font-size: clamp(1.8rem, 2.6vw + .6rem, 3rem); overflow-wrap: anywhere; }
.sc-overview .sc-verdict { margin: 0; font-size: 1.1rem; color: var(--text); max-width: 620px; }
.sc-counts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--muted); }
.sc-counts b { font-family: var(--serif); font-weight: 400; font-size: 2rem; color: var(--ink); margin-right: 6px; }
.sc-share .ref { margin-bottom: 10px; }
.sc-share .btn-row { gap: 10px; }
.sc-share-link { border: 1px solid var(--line); color: var(--ink); }
.sc-share-link:hover { border-color: var(--ink); color: var(--ink); }
@media (max-width: 760px) { .sc-summary { grid-template-columns: minmax(0, 1fr); } }

.sc-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); }
@media (max-width: 900px) { .sc-groups { grid-template-columns: minmax(0, 1fr); } }
.sc-group { border: 1px solid var(--line); border-radius: var(--radius-xl); padding: clamp(22px, 2.4vw, 32px); min-width: 0; }
.sc-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.sc-group-title { margin: 0; }
.sc-group-score { font-family: var(--mono); font-size: .85rem; color: var(--muted); white-space: nowrap; }
.sc-checks { list-style: none; margin: 0; padding: 0; }
.sc-check { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.sc-check p { margin: 0; }
.sc-status {
  --status: var(--muted); align-self: start; justify-self: start; padding: 3px 9px; border-radius: 999px;
  font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--status); background: color-mix(in srgb, var(--status) 12%, var(--page));
}
.sc-status[data-status="pass"] { --status: var(--fixed); }
.sc-status[data-status="warn"] { --status: var(--medium); }
.sc-status[data-status="fail"] { --status: var(--critical); }
.sc-check-title { font-weight: 650; color: var(--ink); }
.sc-check-detail { color: var(--muted); font-size: .95rem; margin-top: 2px; }
.sc-fix { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--tint); color: var(--text); font-size: .92rem; overflow-wrap: anywhere; }
.sc-fix b { color: var(--ink); }
.sc-next h2 { max-width: 820px; }
.sc-results .panel { margin: 0; }
@media (max-width: 520px) { .sc-check { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.sc-next .lead { max-width: 720px; margin-bottom: 26px; }

/* ---------- Motion ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.js .hero-copy > * { animation: rise .9s var(--ease) both; }
.js .hero-copy > :nth-child(2) { animation-delay: .08s; }
.js .hero-copy > :nth-child(3) { animation-delay: .16s; }
.js .hero-copy > :nth-child(4) { animation-delay: .24s; }
.js .hero-copy > :nth-child(5) { animation-delay: .32s; }
.js .hero-copy > :nth-child(6) { animation-delay: .4s; }
.js .hero-art { animation: rise 1.1s var(--ease) .2s both; }

.mt-0 { margin-top: 0; }
.mt-lg { margin-top: 36px; }
.muted { color: var(--muted); }

/* Reduced motion: the hero animation still plays (the owner's choice; the Pause button stops it and is
   remembered). Only page-level motion is dropped: sections sliding in on scroll, the hero entrance,
   pointer parallax and hover lifts. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .js .hero-copy > *, .js .hero-art { animation: none; }
  .map, .finding-card { translate: none; transition: none; }
  .tile.is-visible .pixel rect, .quote-split.is-visible .pixel rect, .case-card.is-entering { animation: none; }
  .tile:hover, a.card:hover, .btn:hover .arrow, .link-arrow:hover .arrow { transform: none; }
}
