:root {
  --bg: #08100d;
  --bg-elevated: #0d1713;
  --panel: #111d18;
  --panel-strong: #16251e;
  --line: rgba(222, 244, 232, 0.14);
  --line-strong: rgba(222, 244, 232, 0.28);
  --text: #eef8f2;
  --text-soft: #c7d8ce;
  --muted: #90a79a;
  --accent: #a6f483;
  --accent-strong: #75dc58;
  --cyan: #73d9ff;
  --amber: #f2c66f;
  --red: #ff8f86;
  --violet: #c1a8ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --max: 1180px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 8%, rgba(115, 217, 255, 0.1), transparent 30rem),
    radial-gradient(circle at 15% 22%, rgba(166, 244, 131, 0.09), transparent 28rem),
    linear-gradient(180deg, #08100d 0%, #09120f 55%, #070d0b 100%);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(222, 244, 232, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(222, 244, 232, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 88%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

::selection {
  background: rgba(166, 244, 131, 0.3);
  color: #fff;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  transform: translateY(-180%);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #07100b;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(222, 244, 232, 0.08);
  background: rgba(8, 16, 13, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(calc(100% - 2rem), var(--max));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-weight: 850;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(166, 244, 131, 0.18), rgba(115, 217, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.site-nav a {
  padding: 0.58rem 0.72rem;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(222, 244, 232, 0.065);
  color: var(--text);
}

.site-nav .nav-live {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  width: 18px;
  height: 2px;
  display: block;
  border-radius: 10px;
  background: currentColor;
  content: "";
  transition: transform 180ms ease;
}

.nav-toggle span::before {
  transform: translateY(-6px);
}

.nav-toggle span::after {
  transform: translateY(4px);
}

main {
  overflow: clip;
}

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.narrow {
  width: min(calc(100% - 2rem), 860px);
  margin-inline: auto;
}

.hero {
  position: relative;
  padding: clamp(5.5rem, 11vw, 9.5rem) 0 4.5rem;
}

.hero::after {
  position: absolute;
  right: -12rem;
  top: 3rem;
  width: 34rem;
  height: 34rem;
  border: 1px solid rgba(166, 244, 131, 0.09);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 5rem rgba(115, 217, 255, 0.02),
    0 0 0 10rem rgba(166, 244, 131, 0.018);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.6fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
}

.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  color: var(--text);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 950px;
  margin-bottom: 1.4rem;
  font-size: clamp(3.1rem, 8.4vw, 7.4rem);
  font-weight: 900;
}

.page-hero h1 {
  max-width: 980px;
  font-size: clamp(2.8rem, 6.6vw, 6rem);
}

h2 {
  margin-bottom: 1.1rem;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 860;
}

h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.25rem, 2.1vw, 1.72rem);
  font-weight: 820;
}

h4 {
  margin-bottom: 0.55rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.hero-copy {
  max-width: 790px;
  margin: 0 0 2rem;
  color: var(--text-soft);
  font-size: clamp(1.12rem, 2vw, 1.42rem);
  line-height: 1.58;
}

.hero-side {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(150deg, rgba(22, 37, 30, 0.86), rgba(13, 23, 19, 0.82));
  box-shadow: var(--shadow);
}

.hero-side .status-line + .status-line {
  border-top: 1px solid var(--line);
}

.status-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.9rem 0.1rem;
  align-items: center;
}

.status-line span:first-child {
  color: var(--muted);
  font-size: 0.83rem;
}

.status-line strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: right;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.04rem;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(222, 244, 232, 0.055);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(166, 244, 131, 0.55);
  background: rgba(166, 244, 131, 0.1);
  color: var(--text);
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #07110b;
}

.button-primary:hover {
  border-color: #c3ffa9;
  background: #bcff9e;
  color: #07110b;
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.button-small {
  min-height: 38px;
  padding: 0.55rem 0.8rem;
  font-size: 0.78rem;
}

.proof-strip {
  position: relative;
  z-index: 2;
  padding: 1rem 0 4.5rem;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.proof-item {
  min-height: 138px;
  padding: 1.25rem;
  border-right: 1px solid var(--line);
}

.proof-item:last-child {
  border-right: 0;
}

.proof-value {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.055em;
}

.proof-label {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.proof-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: right;
}

.section {
  padding: clamp(4.5rem, 8vw, 8rem) 0;
  border-top: 1px solid rgba(222, 244, 232, 0.07);
}

.section-compact {
  padding: 3rem 0;
}

.section-header {
  max-width: 880px;
  margin-bottom: 2.25rem;
}

.section-header p,
.lead {
  color: var(--text-soft);
  font-size: clamp(1.03rem, 1.7vw, 1.24rem);
}

.section-header p:last-child,
.lead:last-child {
  margin-bottom: 0;
}

.kicker {
  margin: 0 0 0.8rem;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 1rem;
}

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

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

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

.card {
  position: relative;
  min-width: 0;
  padding: clamp(1.2rem, 3vw, 1.65rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(17, 29, 24, 0.9), rgba(12, 21, 17, 0.88));
  overflow: hidden;
}

.card::after {
  position: absolute;
  right: -3rem;
  bottom: -3rem;
  width: 9rem;
  height: 9rem;
  border: 1px solid rgba(166, 244, 131, 0.08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.card p {
  color: var(--text-soft);
}

.card p:last-child,
.card ul:last-child,
.card dl:last-child {
  margin-bottom: 0;
}

.card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.card-link:hover {
  transform: translateY(-4px);
  border-color: rgba(166, 244, 131, 0.42);
  background: linear-gradient(145deg, rgba(22, 39, 31, 0.96), rgba(13, 25, 20, 0.94));
  color: inherit;
}

.card-number {
  margin-bottom: 1.15rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.34rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.25;
  text-transform: uppercase;
}

.status-pill::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  box-shadow: 0 0 14px currentColor;
}

.status-provisional {
  color: var(--amber);
}

.status-bounded {
  color: var(--cyan);
}

.status-closed {
  color: var(--accent);
}

.status-held {
  color: var(--red);
}

.status-historical {
  color: var(--violet);
}

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
}

.inline-link::after {
  content: "->";
  font-family: var(--font-mono);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: start;
}

.split-reverse {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.sticky-copy {
  position: sticky;
  top: 112px;
}

.callout {
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border: 1px solid rgba(166, 244, 131, 0.33);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(115, 217, 255, 0.1), transparent 18rem),
    linear-gradient(145deg, rgba(166, 244, 131, 0.09), rgba(13, 23, 19, 0.86));
}

.callout blockquote {
  max-width: 980px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.5rem, 3.3vw, 2.8rem);
  font-weight: 820;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.callout p {
  color: var(--text-soft);
}

.clean-list,
.check-list,
.meta-list,
.endpoint-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.clean-list li,
.check-list li {
  position: relative;
  padding: 0.78rem 0 0.78rem 1.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
}

.clean-list li:last-child,
.check-list li:last-child {
  border-bottom: 0;
}

.clean-list li::before {
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  content: ">";
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0.86rem;
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  content: "";
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.38rem 0.58rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(222, 244, 232, 0.035);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.code-panel {
  position: relative;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #060b09;
  overflow-x: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.code-panel pre,
pre {
  margin: 0;
  color: #d7e9dd;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

code {
  padding: 0.1em 0.3em;
  border: 1px solid rgba(222, 244, 232, 0.1);
  border-radius: 5px;
  background: rgba(222, 244, 232, 0.06);
  color: #e9fff0;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: inherit;
}

.diagram {
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(17, 29, 24, 0.88), rgba(8, 16, 13, 0.9));
  overflow-x: auto;
}

.flow {
  min-width: 820px;
  display: grid;
  grid-template-columns: repeat(7, minmax(100px, 1fr));
  gap: 0.65rem;
  align-items: center;
}

.flow-node {
  position: relative;
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(22, 37, 30, 0.86);
  text-align: center;
}

.flow-node strong {
  color: var(--text);
  font-size: 0.8rem;
}

.flow-node span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.63rem;
}

.flow-node:not(:last-child)::after {
  position: absolute;
  right: -0.64rem;
  top: 50%;
  z-index: 2;
  transform: translate(50%, -50%);
  padding: 0.1rem;
  background: var(--bg-elevated);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  content: ">";
}

.flow-node.current {
  border-color: rgba(115, 217, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(115, 217, 255, 0.08);
}

.flow-node.target {
  border-style: dashed;
  border-color: rgba(242, 198, 111, 0.7);
}

.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 1.5rem;
  list-style: none;
}

.timeline::before {
  position: absolute;
  left: 5px;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.timeline li {
  position: relative;
  padding: 0 0 1.8rem 1rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  position: absolute;
  left: -1.52rem;
  top: 0.42rem;
  width: 11px;
  height: 11px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  content: "";
  box-shadow: 0 0 0 1px var(--line-strong);
}

.timeline time {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
}

.timeline p {
  margin: 0;
  color: var(--text-soft);
}

.case-study {
  padding: clamp(2rem, 5vw, 3.8rem) 0;
  border-top: 1px solid var(--line);
}

.case-study:first-child {
  border-top: 0;
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.37fr) minmax(0, 0.63fr);
  gap: clamp(2rem, 6vw, 5rem);
}

.case-meta {
  position: sticky;
  top: 108px;
  align-self: start;
}

.case-body > *:first-child {
  margin-top: 0;
}

.case-body p,
.prose p,
.prose li {
  color: var(--text-soft);
}

.case-body h3,
.prose h2,
.prose h3 {
  margin-top: 2.2rem;
}

.case-body h3:first-child,
.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.fact-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(13, 23, 19, 0.7);
}

.fact-table th,
.fact-table td {
  padding: 0.82rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.fact-table tr:last-child th,
.fact-table tr:last-child td {
  border-bottom: 0;
}

.fact-table th {
  width: 34%;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.fact-table td {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.fact-table code {
  word-break: break-all;
}

.live-shell {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: #030705;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.live-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-strong);
}

.live-bar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.live-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 15px rgba(166, 244, 131, 0.85);
}

.live-url {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-frame-wrap {
  position: relative;
  min-height: 620px;
  background: #020503;
}

.live-frame-wrap iframe {
  width: 100%;
  min-height: 620px;
  display: block;
  border: 0;
  background: #050907;
}

.frame-note {
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--line);
  background: rgba(13, 23, 19, 0.92);
  color: var(--muted);
  font-size: 0.76rem;
}

.endpoint-list {
  display: grid;
  gap: 0.75rem;
}

.endpoint {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(13, 23, 19, 0.7);
}

.endpoint code {
  color: var(--accent);
  font-size: 0.74rem;
  word-break: break-word;
}

.endpoint p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.copy-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.copy-button:hover {
  border-color: var(--accent);
  color: var(--text);
}

.cv-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(260px, 0.28fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.cv-sidebar {
  position: sticky;
  top: 106px;
}

.cv-section {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.cv-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.meta-list li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.7rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.meta-list li:last-child {
  border-bottom: 0;
}

.meta-list span {
  color: var(--muted);
  font-size: 0.75rem;
}

.meta-list strong,
.meta-list a {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.notice {
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(242, 198, 111, 0.07);
  color: var(--text-soft);
  font-size: 0.86rem;
}

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

.notice-danger {
  border-left-color: var(--red);
  background: rgba(255, 143, 134, 0.07);
}

.notice-success {
  border-left-color: var(--accent);
  background: rgba(166, 244, 131, 0.07);
}

.quote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.4rem;
  border-left: 3px solid var(--accent);
  background: rgba(166, 244, 131, 0.055);
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 720;
}

.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--line);
  background: rgba(5, 10, 8, 0.68);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 2rem;
}

.footer-brand p {
  max-width: 430px;
  color: var(--muted);
  font-size: 0.83rem;
}

.footer-nav h2 {
  margin-bottom: 0.7rem;
  color: var(--text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-nav a {
  display: block;
  margin: 0.45rem 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

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

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

.cyan {
  color: var(--cyan);
}

.amber {
  color: var(--amber);
}

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

.mono {
  font-family: var(--font-mono);
}

.no-margin {
  margin: 0;
}

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

@media (max-width: 980px) {
  .hero-grid,
  .split,
  .split-reverse,
  .case-layout,
  .cv-layout {
    grid-template-columns: 1fr;
  }

  .hero-side,
  .case-meta,
  .cv-sidebar,
  .sticky-copy {
    position: static;
  }

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

  .proof-item:nth-child(2) {
    border-right: 0;
  }

  .proof-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.7rem;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: rgba(8, 16, 13, 0.98);
    box-shadow: var(--shadow);
  }

  .site-nav[data-open="true"] {
    display: flex;
  }

  .site-nav a {
    padding: 0.8rem 0.85rem;
  }

  .hero {
    padding-top: 4.8rem;
  }

  .hero::after {
    display: none;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 5rem);
  }

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

  .proof-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof-item:last-child {
    border-bottom: 0;
  }

  .endpoint {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .live-frame-wrap,
  .live-frame-wrap iframe {
    min-height: 520px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .container,
  .narrow,
  .header-inner {
    width: min(calc(100% - 1.25rem), var(--max));
  }

  .hero-copy {
    font-size: 1.05rem;
  }

  .actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .card,
  .callout {
    border-radius: 16px;
  }

  .fact-table th,
  .fact-table td {
    display: block;
    width: 100%;
  }

  .fact-table th {
    padding-bottom: 0.2rem;
    border-bottom: 0;
  }

  .fact-table td {
    padding-top: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  :root {
    --bg: #fff;
    --panel: #fff;
    --text: #111;
    --text-soft: #222;
    --muted: #555;
    --line: #ccc;
    --line-strong: #aaa;
  }

  body {
    background: #fff;
    color: #111;
    font-size: 10.5pt;
  }

  body::before,
  .site-header,
  .site-footer,
  .actions,
  .no-print,
  .live-shell {
    display: none !important;
  }

  .hero,
  .section {
    padding: 1rem 0;
    border: 0;
  }

  .container,
  .narrow {
    width: 100%;
  }

  h1 {
    font-size: 28pt;
  }

  h2 {
    font-size: 18pt;
  }

  h3 {
    font-size: 13pt;
  }

  .card,
  .callout,
  .code-panel,
  .diagram {
    break-inside: avoid;
    border: 1px solid #bbb;
    background: #fff;
    box-shadow: none;
  }

  a {
    color: #111;
    text-decoration: none;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    word-break: break-all;
  }
}


/* v3 — deterministic motion and compute-topology layer */
:root {
  --accent-qwen: #9cf57a;
  --accent-grok: #c2a5ff;
  --accent-evoke: #62dcff;
  --accent-sage: #f7fbf8;
  --spot-x: 50%;
  --spot-y: 30%;
}

.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-2px) rotate(-45deg); }

.page-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: 2px;
  pointer-events: none;
}

.page-progress > span {
  width: var(--page-progress, 0%);
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--accent), var(--cyan), var(--violet));
  box-shadow: 0 0 20px rgba(115, 217, 255, 0.55);
  transition: width 80ms linear;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(38rem 38rem at var(--spot-x) var(--spot-y), rgba(115, 217, 255, 0.065), transparent 68%),
    radial-gradient(30rem 30rem at calc(var(--spot-x) + 15%) calc(var(--spot-y) + 20%), rgba(193, 168, 255, 0.04), transparent 70%);
  transition: background 120ms linear;
}

.hero-home {
  min-height: min(900px, calc(100svh - 72px));
  display: grid;
  align-items: center;
}

.hero-home .hero-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(370px, 0.92fr);
  align-items: center;
}

.hero-command {
  position: relative;
  min-height: 590px;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)),
    rgba(8, 16, 13, 0.72);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-command::before {
  position: absolute;
  inset: -45%;
  z-index: -1;
  content: "";
  background: conic-gradient(from 70deg, rgba(115,217,255,.08), transparent 19%, rgba(166,244,131,.08), transparent 47%, rgba(193,168,255,.08), transparent 73%);
  animation: orbit-rotate 24s linear infinite;
}

.system-orbit {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 430px;
  border-radius: 22px;
  background:
    radial-gradient(circle at center, rgba(166, 244, 131, 0.07), transparent 38%),
    linear-gradient(rgba(222,244,232,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(222,244,232,.025) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
}

.orbit-svg {
  width: min(100%, 520px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 20px 35px rgba(0,0,0,.28));
}

.orbit-ring {
  fill: none;
  stroke: rgba(222,244,232,.12);
  stroke-width: 1;
  stroke-dasharray: 6 10;
  transform-origin: 260px 260px;
  animation: orbit-rotate 32s linear infinite;
}

.orbit-ring.ring-2 {
  animation-direction: reverse;
  animation-duration: 42s;
}

.orbit-path {
  fill: none;
  stroke: url(#flowGradient);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 2 15;
  animation: flow-dash 5s linear infinite;
  opacity: .86;
}

.orbit-path.external { stroke: url(#externalGradient); animation-duration: 7s; }
.orbit-path.visual { stroke: url(#visualGradient); animation-duration: 6s; }

.orbit-node circle {
  stroke-width: 1.5;
  transition: transform 220ms ease, filter 220ms ease;
}

.orbit-node:hover circle { transform: scale(1.055); filter: brightness(1.2); }
.orbit-node text { pointer-events: none; }
.orbit-node .node-label { fill: #eff9f3; font: 800 15px var(--font-sans); letter-spacing: -.02em; }
.orbit-node .node-role { fill: #90a79a; font: 700 9px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.orbit-node.sage circle { fill: rgba(166,244,131,.12); stroke: var(--accent-qwen); }
.orbit-node.qwen circle { fill: rgba(156,245,122,.08); stroke: var(--accent-qwen); }
.orbit-node.grok circle { fill: rgba(194,165,255,.09); stroke: var(--accent-grok); }
.orbit-node.evoke circle { fill: rgba(98,220,255,.09); stroke: var(--accent-evoke); }
.orbit-node.operator circle { fill: rgba(242,198,111,.08); stroke: var(--amber); }

.orbit-core-pulse {
  fill: none;
  stroke: rgba(166,244,131,.35);
  transform-origin: 260px 260px;
  animation: core-pulse 3.8s ease-out infinite;
}

.compute-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .65rem;
  margin-top: .8rem;
}

.compute-legend > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .75rem .85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8,16,13,.58);
  color: var(--muted);
  font-size: .75rem;
}

.compute-legend strong { color: var(--text); font-size: .76rem; }
.legend-dot { width: .55rem; height: .55rem; flex: 0 0 auto; border-radius: 50%; box-shadow: 0 0 13px currentColor; }
.legend-qwen { color: var(--accent-qwen); }
.legend-grok { color: var(--accent-grok); }
.legend-evoke { color: var(--accent-evoke); }
.legend-sage { color: var(--accent-sage); }

.role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1rem;
}

.role-card {
  position: relative;
  min-height: 260px;
  padding: 1.35rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(255,255,255,.035), rgba(255,255,255,.008));
}

.role-card::after {
  position: absolute;
  width: 8rem;
  height: 8rem;
  right: -3rem;
  bottom: -3rem;
  border-radius: 50%;
  content: "";
  background: currentColor;
  filter: blur(50px);
  opacity: .1;
}

.role-card .role-index { font: 800 .74rem var(--font-mono); letter-spacing: .13em; text-transform: uppercase; }
.role-card h3 { margin-top: 2rem; }
.role-card.qwen { color: var(--accent-qwen); }
.role-card.grok { color: var(--accent-grok); }
.role-card.evoke { color: var(--accent-evoke); }
.role-card.sage { color: var(--accent-sage); }
.role-card p, .role-card li { color: var(--text-soft); }

.compute-spec {
  display: grid;
  grid-template-columns: minmax(0,1.08fr) minmax(320px,.92fr);
  gap: 1rem;
  align-items: stretch;
}

.metric-matrix {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .75rem;
}

.metric-block {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8,16,13,.56);
}
.metric-block span { display:block; color:var(--muted); font:700 .69rem var(--font-mono); text-transform:uppercase; letter-spacing:.1em; }
.metric-block strong { display:block; margin-top:.4rem; color:var(--text); font-size:1.25rem; letter-spacing:-.03em; }
.metric-block small { color:var(--muted); }

.execution-ladder { counter-reset: step; display:grid; gap:.6rem; }
.execution-ladder li {
  counter-increment: step;
  display:grid;
  grid-template-columns: 2.25rem 1fr;
  gap:.8rem;
  align-items:start;
  padding:.85rem 1rem;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(8,16,13,.45);
  color:var(--text-soft);
}
.execution-ladder li::before {
  content: counter(step, decimal-leading-zero);
  color:var(--accent);
  font:800 .76rem var(--font-mono);
}

.motion-note {
  display:flex;
  gap:1rem;
  align-items:flex-start;
  padding:1rem 1.1rem;
  border-left:3px solid var(--cyan);
  background:rgba(115,217,255,.055);
  color:var(--text-soft);
}

[data-reveal] { opacity: 1; transform: none; }
.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms cubic-bezier(.2,.75,.25,1), transform 700ms cubic-bezier(.2,.75,.25,1);
}
.motion-ready [data-reveal].is-visible { opacity: 1; transform: translateY(0); }

.card[data-spotlight], .role-card[data-spotlight], .hero-command[data-spotlight] { --card-x: 50%; --card-y: 50%; }
.card[data-spotlight]::before, .role-card[data-spotlight]::before {
  position:absolute;
  inset:0;
  z-index:0;
  content:"";
  pointer-events:none;
  background:radial-gradient(18rem 18rem at var(--card-x) var(--card-y), rgba(115,217,255,.08), transparent 68%);
  opacity:0;
  transition:opacity 180ms ease;
}
.card[data-spotlight]:hover::before, .role-card[data-spotlight]:hover::before { opacity:1; }
.card[data-spotlight] > *, .role-card[data-spotlight] > * { position:relative; z-index:1; }

@keyframes orbit-rotate { to { transform: rotate(360deg); } }
@keyframes flow-dash { to { stroke-dashoffset: -68; } }
@keyframes core-pulse { 0% { transform:scale(.72); opacity:.75; } 75%,100% { transform:scale(1.42); opacity:0; } }

@media (max-width: 1040px) {
  .hero-home .hero-grid { grid-template-columns: 1fr; }
  .hero-command { min-height: auto; }
  .system-orbit { min-height: 390px; }
  .role-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .compute-spec { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .hero-home { min-height: auto; }
  .hero-command { padding:.55rem; }
  .system-orbit { min-height: 330px; }
  .compute-legend, .role-grid, .metric-matrix { grid-template-columns: 1fr; }
  .orbit-node .node-label { font-size: 13px; }
  .orbit-node .node-role { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
  .motion-ready [data-reveal] { opacity:1 !important; transform:none !important; }
  .page-progress { display:none; }
}
