/* ==========================================================================
   R&D Right Now / design system
   Dark throughout: black ground, deeper anchor bands, one structural red.
   Restrained motion: nothing moves unless it earns it.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */

:root {
  /* Ground: the site is dark throughout. "black" is the deepest band, used for
     the masthead, stat strip, CTA and footer; "paper" is the page surface. */
  --black: #05060a;
  --black-soft: #0d0f14;
  --graphite: #1b1f27;

  --paper: #08090c;
  --paper-2: #0f1116;
  --paper-3: #14171e;

  /* Red: brand accent: actions, state, the one line that must be seen */
  --red: #e01030;
  --red-700: #b00c26;
  --red-400: #ff2a48;
  --red-tint: rgba(224, 16, 48, 0.07);
  --red-ring: rgba(224, 16, 48, 0.18);
  --red-glow: rgba(224, 16, 48, 0.20);

  --amber: #c8963c;
  --amber-400: #e0b45e;
  --amber-700: #9a6f24;
  --amber-tint: rgba(200, 150, 60, 0.09);
  --amber-ring: rgba(200, 150, 60, 0.26);

  /* Text */
  --text: #f2f4f7;
  --text-2: #9aa3b0;
  --text-3: #6b7380;
  --text-inv: #ffffff;
  --text-inv-2: #9aa3b0;
  --text-inv-3: #6b7380;

  /* Lines */
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --line-inv: rgba(255, 255, 255, 0.13);
  --line-inv-2: rgba(255, 255, 255, 0.07);

  /* Aliases used by the dark hero module */
  --bg: #08090c;
  --surface: #0f1116;
  --surface-2: #14171e;
  --surface-3: #1b1f27;
  --line-2: rgba(255, 255, 255, 0.16);
  --red-hot: #ff2a48;
  --red-deep: #8f0a1f;
  --ok: #3ddc84;

  /* Shape */
  --r-sm: 3px;
  --r: 5px;
  --r-lg: 8px;

  /* Elevation: low and cool, never dreamy */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.6);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 40px -20px rgba(0, 0, 0, 0.85);
  --shadow-3: 0 2px 6px rgba(0, 0, 0, 0.55), 0 34px 70px -28px rgba(0, 0, 0, 0.95);

  --maxw: clamp(1180px, 90vw, 1580px);
  --maxw-narrow: 860px;
  --gutter: clamp(20px, 4vw, 48px);

  --section-y: clamp(52px, 5.4vw, 76px);
  --header-h: 74px;

  /* Type */

  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.16s var(--ease);
  --t: 0.26s var(--ease);
  --t-slow: 0.5s var(--ease-out);
}

/* --- 2. Reset ------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {

  font-size: 106.25%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1, 'cv11' 1;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -0.021em;
  color: var(--text);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

strong {
  font-weight: 620;
}

::selection {
  background: var(--red);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translate(-50%, -160%);
  z-index: 200;
  background: var(--black);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 560;
  transition: transform var(--t);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* --- 3. Layout primitives ----------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-narrow {
  max-width: var(--maxw-narrow);
}

.section {
  padding-block: var(--section-y);
}

.section-sm {
  padding-block: clamp(40px, 4.2vw, 58px);
}

.section+.section {
  padding-top: 0;
}

.section.bordered {
  border-top: 1px solid var(--line);
  padding-top: calc(var(--section-y) * 0.72);
}

.section-sm.bordered {
  border-top: 1px solid var(--line);
}

.band-dark {
  position: relative;
  background-color: rgba(3, 4, 7, 0.74);
  color: var(--text-inv);
  background-image:
    radial-gradient(120% 100% at 12% 0%, rgba(224, 16, 48, 0.15), transparent 58%),
    radial-gradient(90% 90% at 100% 100%, rgba(200, 150, 60, 0.07), transparent 60%);
}

.band-dark::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red-700) 34%, transparent 78%);
}

.band-dark h1,
.band-dark h2,
.band-dark h3,
.band-dark h4 {
  color: var(--text-inv);
}

.band-dark .lede,
.band-dark p {
  color: var(--text-inv-2);
}

.band-muted {
  background: rgba(15, 17, 22, 0.72);
}

/* Grid and flex children default to min-width:auto, which lets wide content
   (the scrolling code panel, long code lines) push a track past the viewport.
   Every layout child opts out. */
.grid>*,
.hero-grid>*,
.split>*,
.article-layout>*,
.feed-item>*,
.masthead-grid>*,
.cta-inner>*,
.stats>* {
  min-width: 0;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.stack {
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mt-s {
  margin-top: 12px;
}

.mt-m {
  margin-top: 24px;
}

.mt-l {
  margin-top: 40px;
}

.mt-xl {
  margin-top: 64px;
}

.center {
  text-align: center;
}

.center-x {
  margin-inline: auto;
}

/* --- 4. Type ------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--red);
  transform: rotate(45deg);
  flex: none;
}

.band-dark .eyebrow {
  color: var(--red-400);
}

.band-dark .eyebrow::before {
  background: var(--red-400);
}

.h-hero {
  font-size: clamp(2.4rem, 5.6vw, 4.55rem);
  font-weight: 680;
  letter-spacing: -0.033em;
  line-height: 1.04;
}

.h-page {
  font-size: clamp(2.05rem, 4.4vw, 3.55rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.h-section {
  font-size: clamp(1.68rem, 2.9vw, 2.6rem);
  letter-spacing: -0.027em;
}

.h-card {
  font-size: 1.21rem;
  letter-spacing: -0.016em;
  line-height: 1.32;
}

.h-sub {
  font-size: 1rem;
  font-weight: 620;
  letter-spacing: -0.008em;
}

.lede {
  font-size: clamp(1.03rem, 1.45vw, 1.28rem);
  line-height: 1.62;
  color: var(--text-2);
}

.body-2 {
  font-size: 0.97rem;
  line-height: 1.68;
  color: var(--text-2);
}

.small {
  font-size: 0.865rem;
  color: var(--text-3);
}

.mono {
  font-family: var(--mono);
  font-size: 0.845rem;
  letter-spacing: -0.01em;
}

.accent {
  color: var(--red);
}

.section-head {
  max-width: 780px;
}

.section-head .h-section {
  margin-top: 16px;
}

.section-head .lede {
  margin-top: 18px;
}

.section-head.center {
  margin-inline: auto;
}

.section-head.center .eyebrow {
  justify-content: center;
}

/* Rule with a red tick: used above section heads on dark bands */
.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.band-dark .rule {
  background: var(--line-inv);
}

/* --- 5. Buttons and links ----------------------------------------------- */

.btn {
  --btn-bg: var(--black);
  --btn-fg: #fff;
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding-inline: 22px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.905rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast),
    transform var(--t-fast), box-shadow var(--t-fast);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-1);
}

.btn svg {
  width: 15px;
  height: 15px;
  flex: none;
  transition: transform var(--t-fast);
}

.btn:hover svg {
  transform: translateX(2px);
}

.btn-red {
  --btn-bg: var(--red);
  --btn-fg: #fff;
}

.btn-red:hover {
  --btn-bg: var(--red-700);
}

.btn-dark {
  --btn-bg: var(--black);
}

.btn-dark:hover {
  --btn-bg: var(--graphite);
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--line-strong);
}

.btn-ghost:hover {
  --btn-bd: var(--line-strong);
  --btn-bg: rgba(255, 255, 255, 0.04);
}

.btn-light {
  --btn-bg: #fff;
  --btn-fg: var(--black);
}

.btn-light:hover {
  --btn-bg: var(--paper-3);
}

.btn-ghost-inv {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-bd: var(--line-inv);
}

.btn-ghost-inv:hover {
  --btn-bd: rgba(255, 255, 255, 0.45);
  --btn-bg: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  height: 38px;
  padding-inline: 16px;
  font-size: 0.855rem;
}

.btn-block {
  width: 100%;
}

/* Text link with a travelling arrow */
.arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--red);
  transition: gap var(--t-fast), color var(--t-fast);
}

.arrow svg {
  width: 14px;
  height: 14px;
  transition: transform var(--t-fast);
}

.arrow:hover {
  color: var(--red-700);
}

.arrow:hover svg {
  transform: translateX(3px);
}

.band-dark .arrow {
  color: var(--red-400);
}

.band-dark .arrow:hover {
  color: #fff;
}

.link-u {
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  transition: border-color var(--t-fast), color var(--t-fast);
}

.link-u:hover {
  color: var(--red);
  border-color: var(--red);
}

/* --- 6. Chips, tags, badges --------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding-inline: 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  font-size: 0.755rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  color: var(--text-2);
  font-family: var(--mono);
  white-space: nowrap;
}

.chip {
  background: rgba(255, 255, 255, 0.04);
}

.band-dark .chip {
  background: rgba(255, 255, 255, 0.06);
}

.chip-red {
  background: var(--red-tint);
  border-color: rgba(224, 16, 48, 0.22);
  color: var(--red-700);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.735rem;
  font-weight: 640;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--r-sm);
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.badge-open {
  background: rgba(224, 16, 48, 0.12);
  color: var(--red-400);
}

.badge-soon {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-2);
}

.badge-closed {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-3);
}

/* Status pill with a quietly breathing dot */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  color: var(--text-2);
  box-shadow: var(--shadow-1);
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 var(--red-ring);
  animation: pulse 2.8s var(--ease-out) infinite;
  flex: none;
}

.band-dark .pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-inv);
  color: var(--text-inv-2);
  box-shadow: none;
}

.band-dark .panel,
.masthead .panel {
  border-color: var(--line-inv);
}

@keyframes pulse {

  0%,
  70%,
  100% {
    box-shadow: 0 0 0 0 rgba(224, 16, 48, 0.22);
  }

  35% {
    box-shadow: 0 0 0 6px rgba(224, 16, 48, 0);
  }
}

/* --- 7. Header ---------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 12, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}

.header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 0 var(--line-inv-2), 0 18px 40px -26px #000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 5px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand-sub {
  font-size: 0.605rem;
  font-weight: 560;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--text-3);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  position: relative;
  padding: 8px 13px;
  border-radius: var(--r-sm);
  font-size: 0.895rem;
  font-weight: 540;
  color: var(--text-2);
  transition: color var(--t-fast), background var(--t-fast);
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav a.is-active {
  color: var(--text);
  font-weight: 600;
}

.nav a.is-active::after {
  content: '';
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 1px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
  cursor: pointer;
  position: relative;
}

.burger span {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  transition: transform var(--t), opacity var(--t-fast);
}

.burger span:nth-child(1) {
  top: 15px;
}

.burger span:nth-child(2) {
  top: 20px;
}

.burger span:nth-child(3) {
  top: 25px;
}

.burger[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.burger[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* The header CTA lives twice in the markup: inline on desktop, inside the
   drawer on mobile. Only one is ever visible. */
.nav>.btn {
  display: none;
}

/* --- 7b. Brand identity ------------------------------------------------
   Taken from the R&D banner: heavy italic red wordmark on black, CRT scan
   lines, and service lines set in wide italic caps with double-rule leaders.
   ---------------------------------------------------------------------- */

/* CRT scan lines. Sits above artwork, never intercepts clicks. */
.scan {
  position: relative;
}

.scan::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom,
      rgba(0, 0, 0, 0.42) 0px,
      rgba(0, 0, 0, 0.42) 1px,
      transparent 1px,
      transparent 3px);
  pointer-events: none;
  z-index: 2;
}

.scan>* {
  position: relative;
  z-index: 1;
}

.wordmark {
  display: block;
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.86;
  color: var(--red);
  text-shadow:
    0 0 14px rgba(224, 16, 48, 0.55),
    0 0 46px rgba(224, 16, 48, 0.30),
    0 0 90px rgba(224, 16, 48, 0.16);
}

.wordmark-xl {
  font-size: clamp(3.6rem, 12vw, 8.5rem);
}

.wordmark-md {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
}

/* Service lines with the trailing double rule from the banner. */
.svc-lines {
  display: grid;
  gap: clamp(10px, 1.4vw, 18px);
}

.svc-line {
  display: flex;
  align-items: center;
  gap: 14px;
  font-style: italic;
  font-weight: 620;
  font-size: clamp(0.7rem, 1.05vw, 0.895rem);
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--red-400);
  white-space: nowrap;
}

.svc-line::after {
  content: '';
  flex: 1 1 auto;
  min-width: 26px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.9;
}

.svc-line.is-link {
  transition: color var(--t-fast), transform var(--t-fast);
}

.svc-line.is-link:hover {
  color: #fff;
  transform: translateX(2px);
}

/* Brand masthead: the black band that opens the home page. */
.masthead {
  position: relative;
  overflow: hidden;
  background: var(--black);
  color: var(--text-inv);
  padding-block: clamp(52px, 7vw, 92px);
  border-bottom: 2px solid var(--red-700);
}

.masthead::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 120% at 18% 40%, rgba(224, 16, 48, 0.22), transparent 62%),
    radial-gradient(60% 90% at 92% 8%, rgba(224, 16, 48, 0.10), transparent 60%);
  pointer-events: none;
}

.masthead-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, auto) 1px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
}

.masthead-rule {
  background: linear-gradient(to bottom, transparent, var(--red-700) 18%, var(--red-700) 82%, transparent);
}

/* Label motif reused on light sections: italic caps + single rule */
.tick {
  display: flex;
  align-items: center;
  gap: 12px;
  font-style: italic;
  font-weight: 620;
  font-size: 0.735rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--red);
}

.tick::after {
  content: '';
  flex: 1 1 auto;
  height: 5px;
  border-top: 1px solid rgba(224, 16, 48, 0.45);
  border-bottom: 1px solid rgba(224, 16, 48, 0.45);
}

/* --- 8. Hero ------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 9vw, 116px) clamp(56px, 7vw, 96px);
  background: var(--paper);
}

/* Hairline grid + a single warm bloom, both very low contrast */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 78%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: -32%;
  right: -8%;
  width: 62vw;
  height: 62vw;
  max-width: 820px;
  max-height: 820px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 16, 48, 0.20) 0%, rgba(224, 16, 48, 0.07) 42%, transparent 68%);
  pointer-events: none;
  animation: drift 22s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(-3%, 3%, 0) scale(1.06);
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero .h-hero {
  margin-top: 20px;
}

.hero .lede {
  margin-top: 22px;
  max-width: 56ch;
}

.hero-actions {
  margin-top: 34px;
}

.hero-meta {
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

/* Compact page hero for interior pages */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(52px, 6.5vw, 92px) clamp(36px, 4.5vw, 60px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(90% 130% at 88% -10%, rgba(224, 16, 48, 0.14), transparent 62%),
    var(--paper);
}

.page-hero .h-page {
  margin-top: 16px;
  max-width: 20ch;
}

.page-hero .lede {
  margin-top: 20px;
  max-width: 62ch;
}

.page-hero-wide .h-page {
  max-width: 30ch;
}

/* Prose pages (legal, articles) keep the full container in the hero so its left
   edge lines up with the .prose column below; the reading measure is capped on
   the hero's children instead of on the wrap, which used to centre it and push
   the headline ~170px right of the body text. */
.page-hero .wrap-narrow {
  max-width: var(--maxw);
}

.page-hero .wrap-narrow>* {
  max-width: 980px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.815rem;
  color: var(--text-3);
}

.crumbs a:hover {
  color: var(--red);
}

.crumbs span {
  color: var(--line-strong);
}

/* --- 9. Terminal / code panel (hero visual) ----------------------------- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--black);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}

.panel-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-inv-2);
  background: rgba(255, 255, 255, 0.03);
}

.panel-bar .lamp {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.panel-bar .lamp:first-child {
  background: var(--red);
}

.panel-title {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 0.735rem;
  color: var(--text-inv-3);
  letter-spacing: 0.02em;
}

.panel-body {
  padding: 18px 20px 22px;
  font-family: var(--mono);
  font-size: 0.79rem;
  line-height: 1.85;
  color: var(--text-inv-2);
  overflow-x: auto;
}

.panel-body .ln {
  display: block;
  white-space: pre;
}

.panel-body .c-key {
  color: #ff8fa0;
}

.panel-body .c-str {
  color: #9fd0ff;
}

.panel-body .c-dim {
  color: var(--text-inv-3);
}

.panel-body .c-ok {
  color: #7fd4a0;
}

.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line-inv-2);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-inv-3);
}

/* --- 10. Cards ---------------------------------------------------------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 26px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background-color: var(--paper-2);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 42%);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.05) inset,
    0 14px 30px -22px rgba(0, 0, 0, 0.9);
  transition: border-color var(--t), transform var(--t), box-shadow var(--t), background-color var(--t);
}

/* A red hairline that draws itself across the top edge on hover */
.card::before {
  content: '';
  position: absolute;
  inset: -1px auto auto -1px;
  width: 0;
  height: 2px;
  background: var(--red);
  border-radius: 2px 0 0 0;
  transition: width var(--t-slow);
}

.card:hover {
  border-color: var(--line-strong);
  background-color: var(--paper-3);
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.07) inset,
    0 22px 46px -20px rgba(0, 0, 0, 0.95);
}

.card:hover::before {
  width: calc(100% + 2px);
}

.card .h-card {
  margin-top: 20px;
}

.card .body-2 {
  margin-top: 11px;
}

.card .chips {
  margin-top: 20px;
}

.card .arrow {
  margin-top: auto;
  padding-top: 22px;
}

/* Cards are flex columns, so an inline control would otherwise stretch to the
   full card width. */
.card>.btn:not(.btn-block),
.card>.arrow,
.card>.chip {
  align-self: flex-start;
}

.card-link {
  cursor: pointer;
}

.card-flat {
  background-color: rgba(255, 255, 255, 0.025);
  background-image: none;
  box-shadow: none;
  border-color: transparent;
}

.card-flat:hover {
  background-color: var(--paper-2);
  border-color: var(--line);
}

.card-dark {
  background-color: var(--black);
  background-image: none;
  border-color: var(--line-inv);
  color: var(--text-inv);
}

.card-dark .h-card {
  color: #fff;
}

.card-dark .body-2 {
  color: var(--text-inv-2);
}

.card-dark:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--red-400);
  flex: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.icon svg {
  width: 19px;
  height: 19px;
}

.card:hover .icon {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.card-dark .icon {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-inv);
  color: var(--red-400);
}

/* Numbered list card (process steps) */
.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.step:last-child {
  border-bottom: 1px solid var(--line);
}

.step-n {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
  padding-top: 3px;
  min-width: 34px;
}

.step h3 {
  font-size: 1.05rem;
}

.step p {
  margin-top: 8px;
}

/* --- 11. Stat band ------------------------------------------------------ */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding-block: clamp(44px, 5vw, 66px);
}

.stat {
  padding: 6px 28px;
  border-left: 1px solid var(--line-inv);
}

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

.stat-n {
  font-size: clamp(2.3rem, 4.2vw, 3.45rem);
  font-weight: 640;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.stat-n .suf {
  color: var(--red-400);
  font-size: 0.5em;
  font-weight: 600;
  letter-spacing: 0;
}

.stat-label {
  margin-top: 14px;
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--text-inv-2);
  max-width: 22ch;
}

.stat-note {
  margin-top: 6px;
  font-size: 0.755rem;
  color: var(--text-inv-3);
}

/* Light variant: used when the band above it is already black. */
.stats-light .stat {
  border-left-color: var(--line);
}

.stats-light .stat-n {
  color: var(--text);
}

.stats-light .stat-n .suf {
  color: var(--red);
}

.stats-light .stat-label {
  color: var(--text-2);
}

.stats-light .stat-note {
  color: var(--text-3);
}

/* --- 12. Split feature -------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.split-tight {
  gap: clamp(28px, 3.5vw, 48px);
}

.split.middle {
  align-items: center;
}

.checklist li {
  position: relative;
  padding: 13px 0 13px 30px;
  border-bottom: 1px solid var(--line);
  font-size: 0.945rem;
  color: var(--text-2);
}

.checklist li:first-child {
  border-top: 1px solid var(--line);
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 20px;
  width: 6px;
  height: 10px;
  border: 1.6px solid var(--red);
  border-top: 0;
  border-left: 0;
  transform: rotate(42deg);
}

.checklist strong {
  color: var(--text);
}

.band-dark .checklist li {
  border-color: var(--line-inv);
  color: var(--text-inv-2);
}

.band-dark .checklist strong {
  color: #fff;
}

.deflist {
  border-top: 1px solid var(--line);
}

.deflist>div {
  display: grid;
  grid-template-columns: minmax(140px, 0.4fr) minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.deflist dt {
  font-size: 0.83rem;
  font-weight: 620;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0;
}

.deflist dd {
  margin: 0;
  font-size: 0.945rem;
  color: var(--text-2);
}

/* --- 13. Feed (insights) ----------------------------------------------- */

.feed {
  border-top: 1px solid var(--line);
}

.feed-item {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  transition: background var(--t);
}

.feed-item:hover {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent 72%);
}

.feed-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--black);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
}

.feed-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
}

.feed-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 100% at 20% 0%, rgba(224, 16, 48, 0.5), transparent 62%);
}

.feed-thumb svg {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  opacity: 0.92;
}

.feed-thumb.alt-2::after {
  background: radial-gradient(90% 100% at 80% 10%, rgba(224, 16, 48, 0.42), transparent 60%);
}

.feed-thumb.alt-3::after {
  background: radial-gradient(100% 100% at 50% 100%, rgba(224, 16, 48, 0.44), transparent 62%);
}

.feed-body {
  display: flex;
  flex-direction: column;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.79rem;
  color: var(--text-3);
}

.feed-meta .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.feed-body h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.58rem);
  margin-top: 13px;
}

.feed-item:hover .feed-body h3 {
  color: var(--red);
}

.feed-body h3 {
  transition: color var(--t-fast);
}

.feed-body .body-2 {
  margin-top: 11px;
}

.feed-body .arrow {
  margin-top: auto;
  padding-top: 18px;
}

/* Filter tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  height: 36px;
  padding-inline: 15px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.855rem;
  font-weight: 560;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t-fast);
}

.tab:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.tab[aria-selected='true'] {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.tab .count {
  opacity: 0.55;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  color: var(--text-3);
  font-size: 0.945rem;
}

/* --- 14. Article -------------------------------------------------------- */

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: clamp(36px, 5vw, 76px);
  align-items: start;
}

.prose {
  max-width: 70ch;
}

.prose>*+* {
  margin-top: 22px;
}

.prose h2 {
  font-size: 1.52rem;
  margin-top: 46px;
  letter-spacing: -0.024em;
}

.prose h3 {
  font-size: 1.16rem;
  margin-top: 34px;
}

.prose p,
.prose li {
  font-size: 1.035rem;
  line-height: 1.75;
  color: #cbd2db;
}

.prose ul,
.prose ol {
  padding-left: 0;
}

.prose li {
  position: relative;
  padding-left: 24px;
  margin-top: 10px;
  list-style: none;
}

.prose ul>li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 12px;
  width: 7px;
  height: 1.5px;
  background: var(--red);
}

.prose ol {
  counter-reset: n;
}

.prose ol>li {
  counter-increment: n;
}

.prose ol>li::before {
  content: counter(n) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--red);
  font-weight: 600;
}

.prose blockquote {
  margin: 34px 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--red);
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text);
  font-weight: 500;
}

.prose pre {
  margin: 28px 0;
  padding: 20px 22px;
  border-radius: var(--r);
  background: var(--black);
  color: var(--text-inv-2);
  font-family: var(--mono);
  font-size: 0.815rem;
  line-height: 1.75;
  overflow-x: auto;
  border: 1px solid var(--line-inv);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.875em;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--paper-3);
  color: var(--red-400);
}

.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.prose hr {
  margin: 44px 0;
  height: 1px;
  border: 0;
  background: var(--line);
}

.prose a {
  color: var(--red);
  border-bottom: 1px solid rgba(224, 16, 48, 0.3);
}

.prose a:hover {
  border-color: var(--red);
}

.prose figure {
  margin: 32px 0;
}

.prose figcaption {
  margin-top: 10px;
  font-size: 0.825rem;
  color: var(--text-3);
}

.callout {
  margin: 32px 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--red);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(255, 255, 255, 0.03);
}

.callout .h-sub {
  display: flex;
  align-items: center;
  gap: 9px;
}

.callout p {
  margin-top: 9px;
  font-size: 0.945rem;
  color: var(--text-2);
}

.aside-rail {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.rail-title {
  font-size: 0.735rem;
  font-weight: 640;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.toc {
  margin-top: 14px;
}

.toc a {
  display: block;
  padding: 7px 0 7px 13px;
  border-left: 2px solid var(--line);
  font-size: 0.875rem;
  color: var(--text-2);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.toc a:hover,
.toc a.is-current {
  color: var(--red);
  border-color: var(--red);
}

.byline {
  display: flex;
  align-items: center;
  gap: 13px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--black);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 650;
  flex: none;
}

/* --- 15. Forms ---------------------------------------------------------- */

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
}

.field .hint {
  font-size: 0.79rem;
  color: var(--text-3);
}

.field .req {
  color: var(--red);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  font-family: inherit;
  font-size: 0.945rem;
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-3);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-ring);
}

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

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa3b0' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.field-error .input,
.field-error .textarea,
.field-error .select {
  border-color: var(--red);
}

.error-msg {
  font-size: 0.8rem;
  color: var(--red-700);
  font-weight: 540;
}

.form-note {
  padding: 14px 16px;
  border-radius: var(--r-sm);
  font-size: 0.885rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
}

.form-note.ok {
  border-color: rgba(224, 16, 48, 0.25);
  background: var(--red-tint);
  color: var(--text);
}

.grid-2-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* --- 16. Footer --------------------------------------------------------- */

.footer {
  padding-block: clamp(52px, 6vw, 78px) 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
}

.footer .brand-mark {
  background: transparent;
  color: #fff;
}

.footer .brand-name {
  color: #fff;
}

.footer .brand-sub {
  color: var(--text-inv-3);
}

.footer-blurb {
  margin-top: 20px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-inv-2);
  max-width: 34ch;
}

.footer-col h4 {
  font-size: 0.735rem;
  font-weight: 640;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-inv-3);
}

.footer-col ul {
  margin-top: 16px;
  display: grid;
  gap: 11px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-inv-2);
  transition: color var(--t-fast);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: clamp(40px, 5vw, 62px);
  padding-top: 22px;
  border-top: 1px solid var(--line-inv-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.83rem;
  color: var(--text-inv-3);
}

.footer-bottom a:hover {
  color: #fff;
}

.footer-legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* --- 17. CTA band ------------------------------------------------------- */

.cta-band {
  padding-block: clamp(56px, 7vw, 96px);
}

.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
}

.cta-inner .h-section {
  max-width: 24ch;
}

.cta-inner .lede {
  margin-top: 16px;
  max-width: 52ch;
}

/* --- 18. Motion (reveal) ------------------------------------------------ */

/* Reveal is a progressive enhancement: the .js class is set by an inline
   script in <head>, so with JavaScript off or broken the content is simply
   visible rather than permanently transparent. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* --- 19. Responsive ---------------------------------------------------- */

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

  .hero-visual {
    order: -1;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .aside-rail {
    position: static;
    display: none;
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 40px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 62px;
  }

  .burger {
    display: block;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 16px var(--gutter) 24px;
    background: #0b0d12;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t), transform var(--t), visibility var(--t);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .nav.is-open {
    opacity: 1;
    transform: none;
    visibility: visible;
  }

  .nav>.btn {
    display: inline-flex;
  }

  .masthead-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .masthead-rule {
    display: none;
  }

  .nav a {
    padding: 13px 12px;
    font-size: 1rem;
    border-radius: var(--r-sm);
  }

  .nav a.is-active::after {
    left: 12px;
    right: auto;
    width: 18px;
  }

  .nav .btn {
    margin-top: 10px;
    height: 48px;
  }

  .header-cta .btn:not(.burger) {
    display: none;
  }

  .g-2,
  .g-3,
  .g-4 {
    grid-template-columns: 1fr;
  }

  .split,
  .split-tight {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 34px 0;
  }

  .stat {
    padding-inline: 22px;
  }

  .stat:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }

  .feed-item {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .feed-thumb {
    max-width: 100%;
    aspect-ratio: 16 / 8;
  }

  .cta-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .grid-2-form {
    grid-template-columns: 1fr;
  }

  .deflist>div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
    row-gap: 34px;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .stat {
    border-left: 0;
    padding-left: 0;
  }

  .btn {
    width: 100%;
  }

  .hero-actions .btn,
  .cta-inner .btn {
    width: 100%;
  }

  .row.hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-sub {
    display: none;
  }
}

/* --- 20. Accessibility and print --------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media print {

  .header,
  .footer,
  .cta-band,
  .burger,
  .aside-rail {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .band-dark {
    background: #fff !important;
    color: #000 !important;
  }

  .band-dark * {
    color: #000 !important;
  }

  a {
    text-decoration: underline;
  }

  .section {
    padding-block: 24px;
  }
}

/* ==========================================================================
   21. Atmosphere: wave arc, perspective floor, travelling scanline
   Three borrowed-and-rebuilt effects: the living sine arc (recoloured to the
   brand red), the top-to-bottom light line, and the view-from-below grid.
   ========================================================================== */

/* A single red line that flows down the whole page, once every 9s. Fixed, so it
   crosses every section. Purely decorative. */
.page-scan {
  position: fixed;
  inset: 0 0 auto 0;
  height: 1px;
  z-index: 90;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--red) 22%, var(--red-400) 50%, var(--red) 78%, transparent);
  box-shadow: 0 0 10px rgba(224, 16, 48, 0.16);
  opacity: 0;
  animation: page-scan 9s linear infinite;
  will-change: transform, opacity;
}

@keyframes page-scan {
  0% {
    transform: translateY(-4vh);
    opacity: 0;
  }

  8% {
    opacity: 0.24;
  }

  88% {
    opacity: 0.24;
  }

  100% {
    transform: translateY(104vh);
    opacity: 0;
  }
}

/* Wave canvas: layered sine arcs. Sits behind content, above the ground. */
.wave-canvas {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 62%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

/* View from below: a grid in perspective receding to a red horizon. */
.floor {
  position: absolute;
  inset: auto 0 0 0;
  height: 320px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  perspective: 420px;
  perspective-origin: 50% 0%;
  mask-image: linear-gradient(to top, #000 12%, transparent 92%);
  -webkit-mask-image: linear-gradient(to top, #000 12%, transparent 92%);
}

.floor::before {
  content: '';
  position: absolute;
  left: -60%;
  right: -60%;
  top: 0;
  height: 900px;
  transform: rotateX(80deg);
  transform-origin: 50% 0%;
  background-image:
    linear-gradient(to right, rgba(224, 16, 48, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(224, 16, 48, 0.13) 1px, transparent 1px);
  background-size: 78px 78px;
  animation: floor-run 14s linear infinite;
}

/* The horizon itself: a thin red bloom where the grid vanishes. */
.floor::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 130px;
  background:
    linear-gradient(to bottom, rgba(224, 16, 48, 0.045), transparent 74%),
    radial-gradient(70% 100% at 50% 0%, rgba(224, 16, 48, 0.09), transparent 72%);
}

@keyframes floor-run {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 0 78px;
  }
}

/* Sections that carry atmosphere need their content lifted above it. */
.has-atmos {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.has-atmos>.wrap {
  position: relative;
  z-index: 1;
}

/* Card hover: a light line sweeps across the top edge (from v4, restrained). */
.card {
  overflow: hidden;
}

.card .sweep {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-400), transparent);
  box-shadow: 0 0 10px var(--red-glow);
  transition: left 0.75s var(--ease-out);
  pointer-events: none;
}

.card:hover .sweep {
  left: 100%;
}

/* ==========================================================================
   22. Card artwork: the bespoke SVG illustration at the top of each card
   ========================================================================== */

.card-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 168;
  margin: -6px 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background:
    radial-gradient(120% 130% at 82% -20%, rgba(224, 16, 48, 0.14), transparent 62%),
    #06070a;
}

.card-art .stroke {
  fill: none;
  stroke: var(--text-3);
  stroke-width: 1.1;
}

.card-art .stroke-dim {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
}

.card-art .stroke-red {
  fill: none;
  stroke: var(--red);
  stroke-width: 1.4;
}

.card-art .fill-red {
  fill: var(--red);
}

.card-art .fill-dim {
  fill: rgba(255, 255, 255, 0.07);
}

.card-art .dash {
  stroke-dasharray: 4 4;
}

.card-art .glyph {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  fill: var(--text-3);
  text-transform: uppercase;
}

.card-art .grid-line {
  stroke: rgba(255, 255, 255, 0.055);
  stroke-width: 1;
}

/* The travelling dot follows its own path via animateMotion, so it ends where
   the run ends. .mp is the invisible guide that path references. */
.card-art .mp {
  fill: none;
  stroke: none;
}

.card-art .flow {
  fill: var(--red);
}

/* pathLength="1" on the path normalises the reveal, so one dasharray is correct
   for every path length. */
.card-art .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1s var(--ease-out);
}

.card:hover .card-art .draw {
  stroke-dashoffset: 0;
}

/* ==========================================================================
   23. Process diagram: the animated automation flow
   ========================================================================== */

.diagram-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(90% 120% at 12% -10%, rgba(224, 16, 48, 0.10), transparent 60%),
    var(--paper-2);
  padding: 26px 24px 20px;
  overflow: hidden;
}

.diagram-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}

.diagram-scroll {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
}

.diagram {
  display: block;
  min-width: 760px;
  width: 100%;
  height: auto;
}

.diagram .node {
  fill: #10131a;
  stroke: var(--line-strong);
  stroke-width: 1;
}

.diagram .node-red {
  fill: rgba(224, 16, 48, 0.10);
  stroke: var(--red);
  stroke-width: 1.2;
}

.diagram .edge {
  fill: none;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1.2;
}

.diagram .edge-red {
  fill: none;
  stroke: var(--red);
  stroke-width: 1.3;
}

.diagram .edge-retry {
  fill: none;
  stroke: var(--text-3);
  stroke-width: 1.2;
  stroke-dasharray: 5 4;
}

.diagram .edge-esc {
  fill: none;
  stroke: var(--red);
  stroke-width: 1.2;
  stroke-dasharray: 2 5;
}

.diagram .label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  fill: var(--text-2);
}

.diagram .label-sm {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  fill: var(--text-3);
}

.diagram .idx {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  fill: var(--red);
}

.diagram .ok {
  fill: #3ddc84;
}

.diagram .packet {
  fill: var(--red-400);
  filter: drop-shadow(0 0 4px var(--red-glow));
}

.diagram-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.diagram-legend div {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-3);
  text-transform: uppercase;
}

.diagram-legend svg {
  width: 34px;
  height: 8px;
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .page-scan {
    display: none;
  }

  .floor::before {
    animation: none;
  }

  .diagram .packet {
    display: none;
  }
}

/* ==========================================================================
   24. Dark hero + brand masthead (namespaced .rdx-*)
   ========================================================================== */
/* ==========================================================================
   MODULE: Home hero + brand masthead   (namespace: .rdx-*)
   Dark, technical. Canvas constellation behind a recreation of the client's
   black/red banner, a working headline, status strip and evidence terminal.
   ========================================================================== */

/* --- Shell --------------------------------------------------------------- */

.rdx-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-top: clamp(30px, 4.6vw, 62px);
}

@supports (min-height: 100svh) {
  .rdx-hero {
    min-height: 100svh;
  }
}

/* Canvas: atmosphere only. Never carries content. */
.rdx-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: .9;
}

/* Static backdrop: engineering dot-grid + vignette + one red bloom. */
.rdx-fx {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    radial-gradient(30% 34% at 13% 15%, rgba(224, 16, 48, .13), transparent 70%),
    radial-gradient(130% 110% at 50% 34%, transparent 30%, rgba(8, 9, 12, .92) 100%);
  background-size: 44px 44px, 100% 100%, 100% 100%;
  background-position: 0 0, 0 0, 0 0;
}

/* CRT scan lines across the whole composition, low strength. */
.rdx-fx::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom,
      rgba(0, 0, 0, .22) 0px, rgba(0, 0, 0, .22) 1px,
      transparent 1px, transparent 3px);
}

.rdx-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.rdx-wrap>* {
  min-width: 0;
}

/* --- 1. Brand masthead (recreation of the banner) ------------------------ */

.rdx-masthead {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, auto) 2px minmax(0, 1fr);
  gap: clamp(16px, 3.2vw, 46px);
  align-items: center;
  padding-bottom: clamp(22px, 3.2vw, 38px);
}

.rdx-masthead>* {
  min-width: 0;
}

/* Heavier CRT lines local to the wordmark block, exactly as the banner. */
.rdx-masthead::after {
  content: '';
  position: absolute;
  inset: -10px -4px;
  pointer-events: none;
  z-index: 3;
  background: repeating-linear-gradient(to bottom,
      rgba(0, 0, 0, .34) 0px, rgba(0, 0, 0, .34) 1px,
      transparent 1px, transparent 3px);
}

.rdx-masthead>* {
  position: relative;
  z-index: 2;
}

.rdx-markcol {
  position: relative;
}

/* Neon bloom pooled behind the wordmark. */
.rdx-markcol::before {
  content: '';
  position: absolute;
  left: -22%;
  top: -34%;
  width: 150%;
  height: 168%;
  pointer-events: none;
  background: radial-gradient(44% 44% at 44% 50%, rgba(224, 16, 48, .26), rgba(224, 16, 48, 0) 72%);
  z-index: 0;
}

.rdx-wordmark {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0;
  font-size: clamp(3.4rem, 12.4vw, 9rem);
  font-style: italic;
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: .84;
  color: #e8e8ea;
  text-shadow: 0 0 34px rgba(224, 16, 48, 0.18);
  animation: rdx-flicker 7s steps(1, end) infinite;
}

.rdx-markcap {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: clamp(8px, 1.1vw, 14px);
  font-family: var(--mono);
  font-size: clamp(.58rem, .72vw, .69rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Vertical red divider from the banner. */
.rdx-vrule {
  align-self: stretch;
  min-height: 96px;
  background: linear-gradient(to bottom, rgba(224, 16, 48, 0), var(--red) 18%, var(--red-deep) 84%, rgba(224, 16, 48, 0));
  box-shadow: 0 0 14px var(--red-glow);
}

/* Service lines, wide italic caps, each trailed by the double-rule leader. */
.rdx-svc {
  display: grid;
  gap: clamp(9px, 1.5vw, 19px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.rdx-svc li {
  display: block;
  min-width: 0;
}

.rdx-svcline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(.6rem, 1.02vw, .885rem);
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
  text-decoration: none;
}

/* One of the three carries the accent; three red lines competed with the
   wordmark and the CTA for the same attention. */
.rdx-svc li:first-child .rdx-svcline {
  color: var(--red);
}

.rdx-svcline>span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rdx-svcline::after {
  content: '';
  flex: 1 1 auto;
  min-width: 22px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: .85;
}

a.rdx-svcline {
  transition: color .16s var(--ease), transform .16s var(--ease);
}

a.rdx-svcline:hover {
  color: var(--text);
  transform: translateX(2px);
}

a.rdx-svcline:focus-visible {
  outline: 2px solid var(--red-hot);
  outline-offset: 4px;
}

/* --- 2. Bracketed status strip ------------------------------------------- */

.rdx-avail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px clamp(16px, 2.4vw, 28px);
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rdx-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.885rem;
  font-weight: 520;
  color: var(--text);
  white-space: nowrap;
}

.rdx-note {
  font-size: 0.905rem;
  color: var(--text-2);
}

.rdx-dot {
  position: relative;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(61, 220, 132, .75);
}

.rdx-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--ok);
  opacity: 0;
  animation: rdx-ping 2.6s var(--ease) infinite;
}

/* --- 3. Asymmetric main grid -------------------------------------------- */

.rdx-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) 1px minmax(0, .94fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  flex: 1 1 auto;
  padding: clamp(32px, 4.6vw, 62px) 0 clamp(28px, 3.6vw, 46px);
}

.rdx-grid>* {
  min-width: 0;
}

.rdx-colrule {
  align-self: stretch;
  background: linear-gradient(to bottom, var(--line), rgba(255, 255, 255, .02));
}

.rdx-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(16px, 2vw, 24px);
  font-family: var(--mono);
  font-size: clamp(.6rem, .74vw, .7rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-2);
}

.rdx-eyebrow b {
  color: var(--red);
  font-weight: 700;
}

.rdx-eyebrow::after {
  content: '';
  flex: 1 1 auto;
  min-width: 18px;
  height: 5px;
  border-top: 1px solid rgba(224, 16, 48, .5);
  border-bottom: 1px solid rgba(224, 16, 48, .5);
}

.rdx-h1 {
  margin: 0;
  font-size: clamp(2.05rem, 4.9vw, 4.05rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.03;
  color: var(--text);
  max-width: 20ch;
  text-wrap: balance;
}

.rdx-h1 i {
  color: var(--red);
  font-style: normal;
}

.rdx-lede {
  margin: clamp(18px, 2.2vw, 26px) 0 0;
  max-width: 54ch;
  font-size: clamp(.95rem, 1.2vw, 1.185rem);
  line-height: 1.62;
  color: var(--text-2);
}

.rdx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(26px, 3vw, 36px);
}

.rdx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 21px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: .93rem;
  font-weight: 600;
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease),
    color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}

.rdx-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.rdx-btn:focus-visible {
  outline: 2px solid var(--red-hot);
  outline-offset: 3px;
}

.rdx-btn-red {
  background: var(--red);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10), 0 10px 34px -14px var(--red-glow);
}

.rdx-btn-red:hover {
  background: var(--red-hot);
  transform: translateY(-1px);
}

.rdx-btn-red:hover svg {
  transform: translateX(2px);
}

.rdx-btn-red svg {
  transition: transform .18s var(--ease);
}

.rdx-btn-ghost {
  background: rgba(255, 255, 255, .025);
  border-color: var(--line-2);
  color: var(--text);
}

.rdx-btn-ghost:hover {
  border-color: var(--red);
  color: #fff;
  background: var(--red-tint);
}

/* Capability rail: anchors the bottom of the left column. */
.rdx-rail {
  margin-top: clamp(30px, 4vw, 48px);
  padding-top: clamp(18px, 2.2vw, 26px);
  border-top: 1px solid var(--line);
}

.rdx-rail-h {
  margin: 0 0 clamp(12px, 1.6vw, 18px);
  font-family: var(--mono);
  font-size: clamp(.58rem, .72vw, .675rem);
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.rdx-rail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px clamp(16px, 2.4vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.rdx-rail-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  font-size: clamp(.795rem, .95vw, .875rem);
  line-height: 1.35;
  color: var(--text-2);
}

.rdx-rail-list li::before {
  content: '';
  flex: 0 0 auto;
  width: 10px;
  height: 5px;
  border-top: 1px solid var(--red);
  border-bottom: 1px solid var(--red);
  transform: translateY(-2px);
  opacity: .8;
}

/* --- 4. Evidence column (terminal) -------------------------------------- */

.rdx-ev {
  display: grid;
  gap: 14px;
}

.rdx-evhead {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: clamp(.6rem, .72vw, .69rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.rdx-evhead b {
  color: var(--red);
  font-weight: 700;
}

.rdx-evhead::after {
  content: '';
  flex: 1 1 auto;
  min-width: 18px;
  height: 5px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rdx-term {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: 0 34px 74px -34px #000, 0 0 0 1px rgba(255, 255, 255, .02);
  overflow: hidden;
}

.rdx-term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .022);
}

.rdx-lamp {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  flex: 0 0 auto;
}

.rdx-lamp:first-child {
  background: var(--red);
  box-shadow: 0 0 8px var(--red-glow);
}

.rdx-term-title {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: .705rem;
  letter-spacing: .02em;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rdx-term-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  font-family: var(--mono);
  font-size: clamp(.665rem, .82vw, .775rem);
  line-height: 1.78;
  padding: 14px 0;
}

.rdx-gutter,
.rdx-code {
  margin: 0;
  font: inherit;
  white-space: pre;
}

.rdx-gutter {
  padding: 0 12px 0 14px;
  border-right: 1px solid rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .18);
  text-align: right;
  user-select: none;
}

.rdx-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.rdx-code {
  padding: 0 18px 0 16px;
  color: var(--text-2);
}

.rdx-code .k {
  color: var(--red-hot);
}

.rdx-code .d {
  color: var(--red);
}

.rdx-code .s {
  color: var(--text);
}

.rdx-code .n {
  color: #ff7d90;
}

.rdx-code .f {
  color: #cdd4de;
}

.rdx-code .c {
  color: var(--text-3);
}

.rdx-term-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .015);
  font-family: var(--mono);
  font-size: .665rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.rdx-term-foot em {
  font-style: normal;
  color: var(--text-2);
}

.rdx-evnote {
  margin: 0;
  font-size: .82rem;
  line-height: 1.6;
  color: var(--text-3);
}

.rdx-evnote b {
  color: var(--text-2);
  font-weight: 500;
}

/* --- 5. Facts band ------------------------------------------------------ */

.rdx-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.rdx-fact {
  min-width: 0;
  padding: clamp(16px, 2vw, 22px) clamp(12px, 1.6vw, 22px) clamp(16px, 2vw, 22px) 0;
}

.rdx-fact+.rdx-fact {
  border-left: 1px solid var(--line);
  padding-left: clamp(14px, 1.8vw, 24px);
}

.rdx-fact dt {
  font-family: var(--mono);
  font-size: clamp(.55rem, .68vw, .645rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.rdx-fact dd {
  margin: 6px 0 0;
  font-size: clamp(1.25rem, 2.3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--text);
}

.rdx-fact dd small {
  display: block;
  margin-top: 3px;
  font-size: .74rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-2);
}

/* --- Motion ------------------------------------------------------------- */

@keyframes rdx-ping {
  0% {
    opacity: .9;
    transform: scale(.7);
  }

  70% {
    opacity: 0;
    transform: scale(1.9);
  }

  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

@keyframes rdx-flicker {

  0%,
  96%,
  100% {
    opacity: 1;
  }

  97% {
    opacity: .88;
  }

  98% {
    opacity: 1;
  }

  99% {
    opacity: .93;
  }
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 1000px) {
  .rdx-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(30px, 5vw, 44px);
  }

  .rdx-colrule {
    display: none;
  }

  .rdx-h1 {
    max-width: 24ch;
  }
}

@media (max-width: 860px) {
  .rdx-masthead {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .rdx-vrule {
    min-height: 0;
    height: 2px;
    width: min(240px, 60%);
    background: linear-gradient(to right, var(--red), rgba(224, 16, 48, 0));
  }

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

  .rdx-fact:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .rdx-fact:nth-child(3),
  .rdx-fact:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .rdx-hero {
    min-height: 0;
  }

  .rdx-svcline {
    font-size: .615rem;
    letter-spacing: .14em;
    gap: 9px;
  }

  .rdx-note {
    font-size: .855rem;
  }

  .rdx-svcline::after {
    min-width: 14px;
  }

  .rdx-actions .rdx-btn {
    flex: 1 1 100%;
  }

  .rdx-avail {
    gap: 11px 16px;
  }
}

@media (max-width: 400px) {
  .rdx-svcline {
    font-size: .555rem;
    letter-spacing: .1em;
  }

  .rdx-fact dd {
    font-size: 1.2rem;
  }
}

/* --- Reduced motion: freeze everything, show the final state ------------ */

@media (prefers-reduced-motion: reduce) {

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

  .rdx-dot::after {
    opacity: .5;
    transform: scale(1.5);
  }
}

/* Clear the sticky site header */
.rdx-hero {
  padding-top: calc(var(--header-h) + clamp(24px, 3.6vw, 48px));
}

/* The closing scene layers the arc over the horizon grid, so the grid is quieter. */
.floor-cta {
  height: 240px;
  opacity: 0.7;
}

.floor-cta::after {
  opacity: 0.8;
}

/* --- 26. Gaps closed during the third-party-edit repair ------------------
   These selectors were used in markup but had no rule anywhere: the pages
   only looked right locally because of page-level <style> blocks, which the
   site CSP (style-src 'self') blocks in production. The blocks are gone; the
   rules live here now. */

/* Perspective floor behind the metrics band sits lower and quieter than the
   masthead one, so the numbers stay the brightest thing in the band. */
.floor-stats {
  height: 180px;
  opacity: 0.55;
}

/* Contact page: the aside beside the form, and its cards. */
.contact-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-card h3 {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.contact-card p,
.contact-card address {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.66;
  font-style: normal;
  color: var(--text-2);
}

/* Consent row: the box keeps its own size while the label wraps. */
.field-checkbox {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
}

.field-checkbox input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--red);
}

.field-checkbox label {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-2);
}

/* Submit feedback. Hidden until the script writes text into it, so an empty
   node never leaves a gap; state classes come from site.js. */
.form-status:empty {
  display: none;
}

.form-status {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--text-3);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-2);
}

.form-status.is-ok {
  border-left-color: #3ddc84;
}

.form-status.is-err {
  border-left-color: var(--red);
}

.btn-lg {
  padding: 15px 26px;
  font-size: 0.95rem;
}

/* A filled position keeps the arrow row's rhythm without offering a link. */
.arrow.is-static {
  color: var(--text-3);
  cursor: default;
}

.arrow.is-static:hover {
  color: var(--text-3);
}

/* Inline text button (filter reset inside a sentence). */
.link {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link:hover {
  color: var(--red-hot);
}

/* --- 27. Utilities replacing inline style attributes ---------------------
   The CSP is `style-src 'self'` with no 'unsafe-inline', which blocks style
   attributes as well as <style> blocks. Everything the pages used to set
   inline lives here, so production renders what local rendering shows. */
.t-inv-2 {
  color: var(--text-inv-2);
}

.t-inv-3 {
  color: var(--text-inv-3);
}

.bd-inv {
  border-color: rgba(255, 255, 255, 0.13);
}

.mt-0 {
  margin-top: 0;
}

.mw-34ch {
  max-width: 34ch;
}

.mw-52ch {
  max-width: 52ch;
}

.mw-56ch {
  max-width: 56ch;
}

.mw-340 {
  max-width: 340px;
}

.mw-420 {
  max-width: 420px;
}

.row-between {
  justify-content: space-between;
}

.row-split {
  justify-content: space-between;
  align-items: flex-end;
  gap: 22px;
}

.grid-contact {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}

.pt-18 {
  padding-top: 18px;
}

@media (max-width: 900px) {
  .grid-contact {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   28. Section rule: the hairline above a bordered section carries three red
   ticks, so a section boundary reads as part of the system rather than as a
   default border.
   ========================================================================== */

.section.bordered,
.section-sm.bordered {
  position: relative;
}

.section.bordered::before,
.section-sm.bordered::before {
  content: '';
  position: absolute;
  top: -1px;
  /* Starts where .wrap content starts, so the mark lines up with the heading. */
  left: max(var(--gutter), calc(50% - var(--maxw) / 2 + var(--gutter)));
  width: 62px;
  height: 1px;
  background: linear-gradient(to right,
      var(--red) 0 14px, transparent 14px 22px,
      rgba(224, 16, 48, 0.6) 22px 32px, transparent 32px 40px,
      rgba(224, 16, 48, 0.3) 40px 46px, transparent 46px);
  pointer-events: none;
}

/* ==========================================================================
   29. Editorial: article covers and the stack ticker
   ========================================================================== */

/* The cover uses the same drawing grammar as .card-art in a wider frame.
   Strokes are non-scaling so the drawing keeps its weight whether it renders
   250 px wide in the feed or full width on the article. */
.cover-art {
  display: block;
  width: 100%;
  height: 100%;
}

.cover-art [class*='stroke'] {
  vector-effect: non-scaling-stroke;
}

.cover-art .stroke {
  fill: none;
  stroke: var(--text-2);
  stroke-width: 1.2;
}

.cover-art .stroke-dim {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
}

.cover-art .stroke-red {
  fill: none;
  stroke: var(--red);
  stroke-width: 1.5;
}

.cover-art .fill-red {
  fill: var(--red);
}

.cover-art .fill-dim {
  fill: rgba(255, 255, 255, 0.08);
}

.cover-art .dash {
  stroke-dasharray: 5 5;
}

.cover-art .grid-line {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 1;
}

.cover-art .glyph {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  fill: var(--text-3);
  text-transform: uppercase;
}

.cover-art .mp {
  fill: none;
  stroke: none;
}

.cover-art .flow {
  fill: var(--red);
}

/* In the feed the cover replaces the glyph, so the gradient wash goes away and
   the 40 px icon sizing with it. Labels are dropped: at feed width they would
   be 5 px tall, which is texture rather than text. */
.feed-thumb.has-cover {
  aspect-ratio: 480 / 270;
  background: #06070a;
}

.feed-thumb.has-cover::after {
  display: none;
}

.feed-thumb.has-cover::before {
  opacity: 0.4;
}

.feed-thumb.has-cover svg {
  width: 100%;
  height: 100%;
  opacity: 1;
}

.feed-thumb.has-cover .glyph {
  display: none;
}

.article-cover {
  margin-top: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background:
    radial-gradient(120% 130% at 84% -18%, rgba(224, 16, 48, 0.16), transparent 62%),
    #06070a;
}

.article-cover .cover-art {
  aspect-ratio: 480 / 270;
}

.marquee {
  position: relative;
  display: flex;
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: 16px;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.marquee-row {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: none;
  padding-right: 26px;
  animation: marquee-run 48s linear infinite;
}

.marquee-item {
  font-family: var(--mono);
  font-size: 0.815rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
}

.marquee-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.7;
}

@keyframes marquee-run {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

.marquee:hover .marquee-row {
  animation-play-state: paused;
}

/* ==========================================================================
   30. Reference architecture (solutions-cloud)
   ========================================================================== */

.arch-frame {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    radial-gradient(120% 120% at 88% -10%, rgba(224, 16, 48, 0.09), transparent 60%),
    #08090c;
  overflow: hidden;
}

.arch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.arch-title {
  font-family: var(--mono);
  font-size: 0.735rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.arch-modes {
  display: flex;
  gap: 6px;
}

/* No JavaScript: the full architecture stays on screen and the toggle, which
   would do nothing, is not shown. */
html:not(.js) .arch-modes {
  display: none;
}

.arch-mode {
  height: 30px;
  padding-inline: 13px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  cursor: pointer;
  transition: all var(--t-fast);
}

.arch-mode:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.arch-mode.is-on {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.arch-scroll {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
}

.arch {
  display: block;
  min-width: 820px;
  width: 100%;
  height: auto;
}

.arch .band {
  fill: rgba(255, 255, 255, 0.014);
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.arch .box {
  fill: #10131a;
  stroke: var(--line-strong);
  stroke-width: 1;
  transition: stroke var(--t-fast), fill var(--t-fast);
}

.arch .box-red {
  fill: rgba(224, 16, 48, 0.10);
  stroke: var(--red);
  stroke-width: 1.2;
}

.arch .label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  fill: var(--text-2);
}

.arch .label-sm {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  fill: var(--text-3);
}

.arch .idx {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  fill: var(--red);
}

.arch .edge {
  fill: none;
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.2;
}

.arch .edge.dash {
  stroke-dasharray: 4 4;
  stroke: var(--text-3);
}

.arch .spine {
  fill: none;
  stroke: var(--red);
  stroke-width: 1.1;
  stroke-dasharray: 3 5;
  opacity: 0.6;
}

/* Hover reads one node at a time without hiding the rest. */
.arch .n {
  cursor: help;
}

.arch .n:hover .box {
  fill: #171b24;
  stroke: var(--red);
}

.arch .n:hover .label {
  fill: var(--text);
}

/* Deferred parts: drawn dashed always, faded away in "first month" mode. */
.arch .is-extra .box {
  stroke-dasharray: 4 4;
}

.arch .is-extra {
  transition: opacity var(--t);
}

[data-arch].mode-mvp .arch .is-extra {
  opacity: 0.16;
}

.arch-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.arch-legend div {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.arch-legend .key {
  width: 30px;
  height: 0;
  border-top: 1px solid var(--line-strong);
  flex: none;
}

.arch-legend .key-dash {
  border-top-style: dashed;
}

.arch-legend .key-red {
  border-top-color: var(--red);
}

.arch-notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.arch-notes dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.arch-notes dd {
  margin: 10px 0 0;
  font-size: 0.925rem;
  color: var(--text-2);
  line-height: 1.62;
}

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

@media (max-width: 560px) {
  .arch-notes {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   31. Operations panel (solutions-reliability)
   ========================================================================== */

.tel-frame {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    radial-gradient(120% 120% at 12% -10%, rgba(224, 16, 48, 0.08), transparent 58%),
    #08090c;
  overflow: hidden;
}

.tel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.tel-title,
.tel-window {
  font-family: var(--mono);
  font-size: 0.735rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.tel-title {
  color: var(--text-2);
}

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

.tel-cell {
  min-width: 0;
  padding: 20px 18px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.tel-cell:nth-child(3n) {
  border-right: 0;
}

.tel-grid>.tel-cell:nth-child(-n + 3) {
  border-top: 0;
}

.tel-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
}

.tel-value {
  margin-top: 8px;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 640;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.tel-note {
  margin-top: 10px;
  font-size: 0.79rem;
  color: var(--text-3);
}

.tel-spark {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 12px;
  overflow: visible;
}

.tel-spark .spark-line {
  fill: none;
  stroke: var(--red);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.tel-spark .spark-dot {
  fill: var(--red-400);
}

.tel-gauge {
  position: relative;
  margin-top: 12px;
  width: 108px;
}

.tel-gauge svg {
  display: block;
  width: 100%;
  height: auto;
}

.tel-gauge .gauge-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 9;
}

.tel-gauge .gauge-fill {
  fill: none;
  stroke: var(--red);
  stroke-width: 9;
  stroke-linecap: butt;
}

.gauge-read {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-weight: 640;
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.gauge-read i {
  font-style: normal;
  font-size: 0.8rem;
  color: var(--text-3);
}

.tel-log-cell {
  grid-column: span 2;
}

.tel-log {
  margin-top: 12px;
  list-style: none;
  display: grid;
  gap: 7px;
}

.log-row {
  display: grid;
  grid-template-columns: 8px 62px minmax(0, 200px) minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.735rem;
  color: var(--text-3);
}

.log-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  transform: translateY(-2px);
}

.log-warn .log-dot {
  background: var(--red);
}

.log-info .log-dot {
  background: var(--text-3);
}

.log-src {
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-msg {
  color: var(--text-3);
}

.log-warn .log-msg {
  color: var(--text-2);
}

.tel-caret {
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tel-caret .caret {
  width: 7px;
  height: 13px;
  background: var(--red);
  animation: caret-blink 1.15s steps(2, start) infinite;
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

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

  .tel-cell:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .tel-cell:nth-child(2n) {
    border-right: 0;
  }

  .tel-grid>.tel-cell:nth-child(-n + 3) {
    border-top: 1px solid var(--line);
  }

  .tel-grid>.tel-cell:nth-child(-n + 2) {
    border-top: 0;
  }

  .tel-log-cell {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .tel-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tel-cell,
  .tel-cell:nth-child(3n) {
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .tel-grid>.tel-cell:first-child {
    border-top: 0;
  }

  .tel-log-cell {
    grid-column: span 1;
  }

  .log-row {
    grid-template-columns: 8px 58px minmax(0, 1fr);
  }

  .log-msg {
    grid-column: 2 / -1;
  }
}

/* Motion off: the ticker, the caret and the drawing transitions all stop, and
   every value stays where the markup put it. */
@media (prefers-reduced-motion: reduce) {
  .marquee-row {
    animation: none;
  }

  .tel-caret .caret {
    animation: none;
  }

  .card-art .flow,
  .cover-art .flow {
    display: none;
  }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(58% 44% at 78% 8%, rgba(224, 16, 48, 0.10), transparent 68%),
    radial-gradient(52% 40% at 8% 62%, rgba(200, 150, 60, 0.055), transparent 70%),
    radial-gradient(70% 55% at 50% 108%, rgba(224, 16, 48, 0.07), transparent 72%);
}

/* The drifting field. Decoration only: aria-hidden, injected by script, and the
   page is complete without it. */
canvas.atmo {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.62;
}

/* Per-band lighting. Alternating sides keep the scroll from settling into one
   note; the alphas are deliberately near the threshold of visibility: the job
   is to break flatness, not to decorate. */
main>.section:nth-of-type(odd) {
  background-image: radial-gradient(64% 52% at 96% 12%, rgba(224, 16, 48, 0.045), transparent 70%);
}

main>.section:nth-of-type(even) {
  background-image: radial-gradient(64% 52% at 4% 88%, rgba(200, 150, 60, 0.038), transparent 70%);
}

@media print {
  html {
    background: #fff;
  }

  body::before {
    display: none;
  }

  canvas.atmo {
    display: none;
  }

  main>.section {
    background-image: none !important;
  }
}