/* OPERATION SOVEREIGN BORDER — BORN BETWEEN GENERALS, LLC
   Static stylesheet. No build step. */

:root {
  --teal: #0B5A55;
  --teal-deep: #073F3B;
  --teal-lift: #0E7A72;
  --sand: #C9A46B;
  --sand-soft: #E3CDA4;
  --north: #7E97AB;
  --north-soft: #A9BECD;

  --font-display: 'Cabinet Grotesk', 'Satoshi', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Inter', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --maxw: 1160px;
  --gutter: clamp(1.1rem, 4vw, 3rem);
  --radius: 4px;

  --text-xs: 0.78rem;
  --text-sm: 0.9rem;
  --text-base: 1.0625rem;
  --text-lg: 1.2rem;
  --text-xl: 1.6rem;
  --text-2xl: clamp(1.9rem, 4.2vw, 2.9rem);
  --text-hero: clamp(2.5rem, 9vw, 6rem);
}

/* dark is default */
html[data-theme='dark'], :root {
  --bg: #0B0D0E;
  --bg-2: #0F1213;
  --surface: #14181A;
  --surface-2: #1A1F21;
  --line: #262D2F;
  --line-soft: #1E2426;
  --fg: #E9EDED;
  --fg-muted: #A2ACAE;
  --fg-faint: #788385;
  --link: #58C0B4;
  --link-hover: #85D6CC;
  --accent: #0B5A55;
  --accent-fg: #F2FFFD;
  --chip: rgba(11, 90, 85, 0.22);
  --hatch: rgba(233, 237, 237, 0.16);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

html[data-theme='light'] {
  --bg: #F4F2EC;
  --bg-2: #EDEAE2;
  --surface: #FFFFFF;
  --surface-2: #F8F6F1;
  --line: #D8D3C8;
  --line-soft: #E6E2D9;
  --fg: #14191A;
  --fg-muted: #4E5658;
  --fg-faint: #757D7F;
  --link: #075D57;
  --link-hover: #0B5A55;
  --accent: #0B5A55;
  --accent-fg: #FFFFFF;
  --chip: rgba(11, 90, 85, 0.1);
  --hatch: rgba(20, 25, 26, 0.18);
  --shadow: 0 16px 40px rgba(20, 25, 26, 0.12);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.62;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

img, svg, video { max-width: 100%; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; margin: 0; font-weight: 700; }

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

/* ---------- top rail: OPERATION ANGELS umbrella lockup ---------- */
.rail {
  background: var(--teal);
  color: #EAFFFB;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 7px 0;
  position: relative;
  z-index: 40;
}
.rail .wrap { display: flex; align-items: center; gap: 0.7rem; justify-content: space-between; }
.rail-lockup { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.rail-lockup svg { flex: none; }
.rail-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-org { color: rgba(234, 255, 251, 0.72); letter-spacing: 0.16em; white-space: nowrap; }
@media (max-width: 640px) { .rail-org { display: none; } }

/* ---------- header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.masthead .wrap { display: flex; align-items: center; gap: 1rem; justify-content: space-between; padding-block: 0.7rem; }
.product-lockup { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.product-name {
  font-family: var(--font-display);
  font-size: clamp(0.98rem, 2.7vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.product-sub {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.mast-tools { display: flex; align-items: center; gap: 0.4rem; }
.navlinks { display: none; gap: 1.1rem; font-size: var(--text-sm); }
.navlinks a { color: var(--fg-muted); text-decoration: none; }
.navlinks a:hover { color: var(--link); }
@media (min-width: 940px) { .navlinks { display: flex; } }

.toggle {
  font: inherit; font-size: var(--text-xs);
  font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase;
  background: transparent; color: var(--fg-muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.45rem 0.7rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
}
.toggle:hover { color: var(--fg); border-color: var(--link); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 8% 0%, rgba(201, 164, 107, 0.16), transparent 60%),
    radial-gradient(110% 85% at 95% 12%, rgba(126, 151, 171, 0.18), transparent 62%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 78%);
}
.hero-bg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 1; padding-block: clamp(3.4rem, 11vw, 8rem) clamp(2.6rem, 7vw, 5rem); }
.eyebrow {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--fg-faint); margin-bottom: 1.1rem;
}
.eyebrow b { color: var(--link); font-weight: 500; }
h1.hero-title {
  font-size: var(--text-hero);
  letter-spacing: -0.035em;
  max-width: 20ch;
  margin-bottom: 1.1rem;
}
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.35rem); color: var(--fg-muted); max-width: 46ch; margin: 0 0 2rem; }
.hero-sub strong { color: var(--fg); font-weight: 600; }
.btnrow { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.01em;
  padding: 0.85rem 1.35rem; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--teal); color: #F2FFFD; }
.btn-primary:hover { background: var(--teal-lift); color: #F2FFFD; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--link); color: var(--link); transform: translateY(-1px); }
.pdfnote { font-size: var(--text-xs); color: var(--fg-faint); margin-top: 0.9rem; max-width: 52ch; }

.hero-stats {
  position: relative; display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  background: var(--line-soft); border-top: 1px solid var(--line);
}
.hero-stats div { background: var(--bg); padding: 1.1rem var(--gutter); }
.hero-stats .n { font-family: var(--font-mono); font-size: clamp(1.15rem, 3vw, 1.6rem); font-weight: 600; display: block; letter-spacing: -0.02em; }
.hero-stats .l { font-size: var(--text-xs); color: var(--fg-faint); text-transform: uppercase; letter-spacing: 0.14em; }
.hero-stats .s .n { color: var(--sand); }
.hero-stats .n2 { color: var(--north-soft); }

/* ---------- sections ---------- */
section { padding-block: clamp(3rem, 8vw, 6rem); border-bottom: 1px solid var(--line-soft); }
section.alt { background: var(--bg-2); }
.sec-head { margin-bottom: 2.2rem; max-width: 62ch; }
.sec-num {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--link); display: block; margin-bottom: 0.7rem;
}
h2 { font-size: var(--text-2xl); letter-spacing: -0.03em; }
.sec-head p { color: var(--fg-muted); margin: 0.9rem 0 0; }
h3 { font-size: var(--text-lg); letter-spacing: -0.01em; }
p { margin: 0 0 1.05rem; }
p:last-child { margin-bottom: 0; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.55; }
.lede strong { color: var(--fg); }
.muted { color: var(--fg-muted); }
.src { font-size: 0.86em; white-space: nowrap; }

/* cards */
.grid { display: grid; gap: 1rem; }
.two { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.1rem, 2.6vw, 1.7rem);
}
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: var(--text-sm); color: var(--fg-muted); }
.tag {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-faint); display: block; margin-bottom: 0.55rem;
}

/* precedent cards */
.prec { align-items: stretch; }
.prec .card { position: relative; overflow: hidden; }
.prec .card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; }
.prec-south::before { background: var(--sand); }
.prec-north::before { background: var(--north); }
.prec-north {
  border-color: color-mix(in srgb, var(--north) 45%, var(--line));
  box-shadow: var(--shadow);
}
.prec .stat-line { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--fg); }
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.3rem 0.6rem; border-radius: 999px; margin-bottom: 0.8rem;
}
.badge-south { background: color-mix(in srgb, var(--sand) 22%, transparent); color: var(--sand); border: 1px solid color-mix(in srgb, var(--sand) 40%, transparent); }
.badge-north { background: color-mix(in srgb, var(--north) 24%, transparent); color: var(--north-soft); border: 1px solid color-mix(in srgb, var(--north) 50%, transparent); }
html[data-theme='light'] .badge-north { color: #3D5568; }
html[data-theme='light'] .badge-south { color: #6E5322; }
html[data-theme='light'] .hero-stats .n2 { color: #3D5568; }
html[data-theme='light'] .hero-stats .s .n { color: #6E5322; }
html[data-theme='light'] .prec .card p.quote { color: var(--fg); }

blockquote.quote, p.quote {
  margin: 1rem 0 0; padding-left: 1rem; border-left: 2px solid var(--line);
  font-size: var(--text-sm); color: var(--fg-muted); font-style: italic;
}

/* corridor diagram */
.diagram-shell {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(0.8rem, 2.4vw, 1.6rem); overflow: hidden;
}
#corridor { width: 100%; height: auto; display: block; }
.diagram-legend { display: grid; gap: 0.55rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 1.2rem; }
.legend-item { display: flex; gap: 0.6rem; align-items: flex-start; font-size: var(--text-sm); color: var(--fg-muted); }
.legend-item .sw { flex: none; width: 26px; height: 12px; margin-top: 5px; border-radius: 2px; border: 1px solid var(--line); }
.sw-1 { background: var(--teal); border-color: var(--teal); }
.sw-2 { background: repeating-linear-gradient(45deg, var(--hatch) 0 3px, transparent 3px 6px); }
.sw-3 { background: var(--sand); border-color: var(--sand); }
.sw-4 { background: transparent; border: 1px dashed var(--link); }
.legend-item b { color: var(--fg); font-weight: 600; }
.replay {
  margin-top: 1rem; font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em;
  text-transform: uppercase; background: transparent; color: var(--fg-muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.5rem 0.85rem; cursor: pointer;
}
.replay:hover { color: var(--link); border-color: var(--link); }

/* tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 640px; }
caption { text-align: left; padding: 0.9rem 1rem 0; color: var(--fg-faint); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.14em; }
th, td { padding: 0.72rem 1rem; text-align: right; border-bottom: 1px solid var(--line-soft); }
th:first-child, td:first-child { text-align: left; }
thead th { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-faint); font-weight: 600; }
tbody td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
tbody td:first-child { font-family: var(--font-body); }
tbody tr:last-child td { border-bottom: none; font-weight: 700; color: var(--fg); background: var(--surface-2); }
.scroll-hint { font-size: var(--text-xs); color: var(--fg-faint); margin-top: 0.6rem; }
@media (min-width: 720px) { .scroll-hint { display: none; } }

/* numbered lists */
ol.numbered { list-style: none; counter-reset: n; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
ol.numbered li { counter-increment: n; position: relative; padding-left: 3rem; }
ol.numbered li::before {
  content: counter(n, decimal-leading-zero);
  position: absolute; left: 0; top: 0.05rem;
  font-family: var(--font-mono); font-size: var(--text-sm); color: var(--link);
  border: 1px solid var(--line); border-radius: 999px; width: 2.15rem; height: 2.15rem;
  display: grid; place-items: center;
}
ol.numbered li strong { color: var(--fg); }
ol.numbered li p { font-size: var(--text-sm); color: var(--fg-muted); margin: 0.35rem 0 0; }

/* callout */
.callout {
  border: 1px solid color-mix(in srgb, var(--teal) 55%, var(--line));
  border-left: 4px solid var(--teal);
  background: linear-gradient(135deg, var(--chip), transparent 70%), var(--surface);
  border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2rem); margin-top: 1.6rem;
}
.callout h3 { font-size: var(--text-xl); margin-bottom: 0.7rem; }
.callout ul { margin: 0.9rem 0 0; padding-left: 1.1rem; color: var(--fg-muted); font-size: var(--text-sm); }
.callout li { margin-bottom: 0.5rem; }

/* layers */
.layers { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.layer { position: relative; display: flex; flex-direction: column; gap: 0.45rem; }
.layer .ln {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em;
  color: var(--fg-faint);
}
.layer h3 { font-size: 1.05rem; }
.layer p { font-size: var(--text-sm); margin: 0; }
.layer .sys { margin-top: auto; padding-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.layer .sys span, .layer .sys a {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em;
  padding: 0.25rem 0.5rem; border-radius: 3px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--fg-muted); text-decoration: none;
}
.layer .sys a:hover { color: var(--link); border-color: var(--link); }
.layer.emph {
  border-color: color-mix(in srgb, var(--teal) 60%, var(--line));
  background: linear-gradient(160deg, var(--chip), transparent 60%), var(--surface);
  box-shadow: var(--shadow);
}
.layer.emph .ln { color: var(--link); }
.emph-flag {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--link);
}

/* timeline */
.timeline-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.6rem; }
.timeline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 0; min-width: 100%; }
.phase { position: relative; padding: 1.9rem 1.1rem 1.3rem; border-left: 1px solid var(--line); }
.phase:first-child { border-left: none; }
.phase::before {
  content: ''; position: absolute; top: 0.72rem; left: -5px; width: 9px; height: 9px;
  border-radius: 999px; background: var(--line); border: 2px solid var(--bg);
}
.phase:first-child::before { left: 0; }
.phase .pn { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.16em; color: var(--fg-faint); display: block; }
.phase h3 { font-size: 1rem; margin: 0.35rem 0 0.15rem; }
.phase .win { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--link); }
.phase p { font-size: var(--text-sm); color: var(--fg-muted); margin: 0.6rem 0 0; }
.phase.first { background: linear-gradient(180deg, var(--chip), transparent 85%); }
.phase.first::before { background: var(--teal); }
.phase.first h3 { color: var(--fg); }
.first-flag {
  display: inline-block; margin-top: 0.7rem;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--teal); color: #F2FFFD; padding: 0.28rem 0.5rem; border-radius: 3px;
}

/* limits panel */
.limits {
  background: var(--surface-2); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2.2rem); color: var(--fg-muted);
}
.limits p { font-size: var(--text-sm); }
.limits strong { color: var(--fg); }

/* video */
.videos { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.vframe { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(140deg, var(--bg-2), var(--surface-2)); }
.vframe video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.vfallback {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 0.5rem; text-align: center;
  padding: 1.2rem; font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-faint);
  background: repeating-linear-gradient(135deg, var(--line-soft) 0 10px, transparent 10px 20px);
}
.vcard-body { padding: 1rem 1.2rem 1.3rem; }
.vcard-body h3 { font-size: 1.05rem; }
.vcard-body p { font-size: var(--text-sm); color: var(--fg-muted); margin: 0.4rem 0 0; }

/* footer */
footer { padding-block: clamp(2.6rem, 6vw, 4rem); background: var(--bg-2); border-top: 1px solid var(--line); }
.foot-grid { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
footer .legal { font-family: var(--font-display); font-size: var(--text-lg); letter-spacing: -0.01em; }
footer p, footer li { font-size: var(--text-sm); color: var(--fg-muted); }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.foot-rule { height: 1px; background: var(--line); margin: 2rem 0 1.2rem; }
.foot-note { font-size: var(--text-xs); color: var(--fg-faint); }
.foot-mono { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-faint); }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--teal); color: #fff;
  padding: 0.7rem 1rem; z-index: 100;
}
.skip:focus { left: 0.6rem; top: 0.6rem; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- corridor diagram animation ---------- */
#corridor { color: var(--fg); }
#corridor g { transform-box: fill-box; }
#corridor.play .c-boundary { transform-origin: top center; animation: growY 0.55s cubic-bezier(.2,.7,.2,1) both; }
#corridor.play .c-axis { animation: fadeIn 0.5s ease 0.25s both; }
#corridor.play .c-t1 { transform-origin: left center; animation: growX 0.6s cubic-bezier(.2,.7,.2,1) 0.45s both; }
#corridor.play .c-t2 { transform-origin: left center; animation: growX 0.75s cubic-bezier(.2,.7,.2,1) 0.85s both; }
#corridor.play .c-t3 { transform-origin: bottom center; animation: dropIn 0.5s cubic-bezier(.2,.7,.2,1) 1.3s both; }
#corridor.play .c-t4 { transform-origin: left center; animation: growX 0.8s cubic-bezier(.2,.7,.2,1) 1.55s both; }
#corridor.play .c-labels { animation: fadeIn 0.6s ease 1.9s both; }
#corridor.play .c-detail { animation: fadeIn 0.5s ease 2.2s both; }
#corridor.play .c-60 { transform-origin: left center; animation: growX 0.5s ease 2.4s both; }
#corridor.play .c-660 { transform-origin: left center; animation: growX 0.7s ease 2.65s both; }
#corridor.play .c-human { animation: fadeIn 0.4s ease 2.3s both; }

@keyframes growX { from { transform: scaleX(0); opacity: 0.25; } to { transform: scaleX(1); opacity: 1; } }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dropIn { from { transform: translateY(10px) scaleY(0.6); opacity: 0; } to { transform: none; opacity: 1; } }

.hero-bg .trace { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.6s ease-out 0.2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero-bg .trace { stroke-dashoffset: 0; animation: none; }
}

/* ---------- long-token safety ---------- */
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--fg);
}
p, li, td, th, h1, h2, h3, a, .stat-line { overflow-wrap: break-word; }
.layer .sys span, .layer .sys a, .callout li code, .vcard-body code { overflow-wrap: anywhere; }

/* ---------- diagram horizontal scroller (keeps SVG label type legible on phones) ---------- */
.diagram-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#corridor { min-width: 1000px; }
.diagram-hint { margin-top: 0.5rem; }
@media (min-width: 1100px) { .diagram-hint { display: none; } }

/* ---------- final responsive polish ---------- */
section, .hero { scroll-margin-top: 92px; }
tbody td, thead th { white-space: nowrap; }
tbody td:first-child, thead th:first-child { white-space: normal; }
@media (max-width: 620px) {
  .product-sub { display: none; }
  .product-name { font-size: 1rem; letter-spacing: 0; }
  .hero-stats div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 400px) {
  .rail { letter-spacing: 0.16em; }
  .btn { padding: 0.8rem 1.1rem; }
}

/* theme-aware accents inside the corridor diagram */
#corridor .aStroke { stroke: var(--link); }
#corridor .aFill { fill: var(--link); }
html[data-theme='light'] .hero-bg::before {
  background:
    radial-gradient(120% 80% at 8% 0%, rgba(201, 164, 107, 0.20), transparent 55%),
    radial-gradient(110% 85% at 95% 12%, rgba(126, 151, 171, 0.16), transparent 58%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 70%);
}
