/* SPDX-License-Identifier: Apache-2.0 */
/*
 * One stylesheet, no scripts and no inline styles: the site is served with
 * "default-src 'none'; style-src 'self'" (infrastructure/website-hosting/security-headers.json).
 */
:root {
  /* Brand palette. Logo colours: ink, cobalt and sky; violet and amber are supporting accents. */
  --brand-ink: #0b1538;
  --brand-cobalt: #2459f5;
  --brand-sky: #3ec5ff;
  --brand-violet: #7c5cff;
  --brand-amber: #ffb224;

  --bg: #f5f7fd;
  --surface: #ffffff;
  --surface-2: #edf1fc;
  --text: #0b1538;
  --muted: #47547a;
  --border: #d9e0f2;
  --border-strong: #b9c4e4;
  --accent: #2459f5;
  --accent-contrast: #ffffff;
  --accent-soft: #e8eeff;
  --ok: #17663a;
  --ok-soft: #e2f5e9;
  --warn: #8a5a00;
  --warn-soft: #fff4d6;
  --danger: #a3262a;
  --danger-soft: #fde7e7;
  --warn-bg: #fff6e0;
  --warn-border: #c9a24a;
  --code-bg: #edf1fc;
  --shadow-1: 0 1px 2px rgba(11, 21, 56, 0.06), 0 4px 14px rgba(11, 21, 56, 0.06);
  --shadow-2: 0 2px 4px rgba(11, 21, 56, 0.06), 0 24px 48px -12px rgba(36, 89, 245, 0.28);

  /* The header, hero and footer are dark in both colour schemes. */
  --night-0: #050a22;
  --night-1: #0a1647;
  --night-text: #ffffff;
  --night-muted: #c3cdf0;
  --night-line: rgba(255, 255, 255, 0.16);
  --night-glass: rgba(255, 255, 255, 0.07);

  --radius: 16px;
  --max: 72rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #050a1f;
    --surface: #0b1330;
    --surface-2: #111c44;
    --text: #e8edff;
    --muted: #a3afd6;
    --border: #202d5c;
    --border-strong: #33437c;
    --accent: #7da7ff;
    --accent-contrast: #050a1f;
    --accent-soft: #14224f;
    --ok: #7fe0a8;
    --ok-soft: #10301f;
    --warn: #ffd27a;
    --warn-soft: #3a2c0c;
    --danger: #ff9a9d;
    --danger-soft: #3d171a;
    --warn-bg: #2a2416;
    --warn-border: #8a7235;
    --code-bg: #111c44;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--brand-sky); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-contrast); padding: 8px 12px; z-index: 30; border-radius: 8px; }
.skip:focus { left: 8px; top: 8px; }
main { display: block; min-height: 60vh; }
main:focus { outline: none; }
.muted { color: var(--muted); }
.icon { flex: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(5, 10, 34, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: var(--night-text); }
.header-inner { display: flex; align-items: center; gap: 8px 28px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--night-text); text-decoration: none; }
.site-nav { margin-left: auto; }
.nav { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; padding: 0; }
.nav a, .gh-link { display: inline-flex; align-items: center; gap: 8px; color: var(--night-muted); text-decoration: none; font-weight: 550; font-size: 15px; padding: 6px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--night-text); background: rgba(255, 255, 255, 0.1); }
.gh-link.disabled { opacity: 0.7; }
.header-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent; text-decoration: none; font-weight: 650; line-height: 1.3; transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease; }
.button.large { padding: 13px 22px; font-size: 17px; }
.button.small { padding: 7px 14px; font-size: 14px; border-radius: 10px; }
.button.primary { background: linear-gradient(180deg, #3566f7, #1f4fe0); color: #ffffff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset, 0 8px 22px -6px rgba(36, 89, 245, 0.75); }
.button.primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset, 0 12px 28px -6px rgba(36, 89, 245, 0.9); }
.button.secondary { color: var(--text); background: var(--surface); border-color: var(--border-strong); }
.button.secondary:hover { border-color: var(--accent); transform: translateY(-1px); }
.button.disabled { border-color: var(--border); color: var(--muted); cursor: default; background: var(--surface-2); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.cta-note { font-weight: 500; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.text-link .icon { transition: transform 0.15s ease; }
.text-link:hover .icon { transform: translateX(3px); }
.note { font-size: 14px; color: var(--muted); }
.docs-cta { margin: 4px 0 8px; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; color: var(--night-text); text-align: center;
  background:
    radial-gradient(58rem 30rem at 88% -8%, rgba(36, 89, 245, 0.6), transparent 62%),
    radial-gradient(40rem 26rem at 4% 4%, rgba(124, 92, 255, 0.36), transparent 62%),
    radial-gradient(52rem 24rem at 50% 112%, rgba(62, 197, 255, 0.3), transparent 62%),
    linear-gradient(180deg, var(--night-0), var(--night-1)); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 10%, transparent 75%); }
.hero-inner { padding-top: 48px; padding-bottom: 72px; }
.eyebrow { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 22px; padding: 0; }
.eyebrow span { font-size: 13px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: #d7e0ff; padding: 5px 12px; border-radius: 999px; background: var(--night-glass); border: 1px solid var(--night-line); }
.hero h1 { font-size: clamp(1.5rem, 6.9vw, 3.9rem); line-height: 1.06; margin: 0; letter-spacing: -0.035em; font-weight: 780; }
.hero h1 .line { display: block; }
.hero h1 em { font-style: normal; background: linear-gradient(92deg, #6fd4ff, #9db4ff 60%, #b9a6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); margin: 20px auto 0; max-width: 46rem; color: var(--night-muted); text-wrap: balance; }
.hero .cta { justify-content: center; margin-top: 30px; }
.hero .button.secondary, .final-cta .button.secondary { color: #ffffff; background: var(--night-glass); border-color: rgba(255, 255, 255, 0.3); }
.hero .button.secondary:hover, .final-cta .button.secondary:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.55); }
.hero .button.disabled, .final-cta .button.disabled { color: var(--night-muted); background: var(--night-glass); border-color: var(--night-line); }
.hero .text-link { color: #cfe0ff; padding: 8px 6px; }

/* ---------- Hero diagram: control plane on top of your agents ---------- */
.stack { margin: 46px auto 0; max-width: 64rem; text-align: left; --cols: 6; --pad: 20px; --gap: 10px; }
.stack-acp { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 18px var(--pad); border-radius: 18px; color: #ffffff;
  background: linear-gradient(100deg, #1f4fe0 0%, #2e6bff 48%, #2fa8f5 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 0 0 1px rgba(255, 255, 255, 0.14), 0 22px 60px -14px rgba(46, 107, 255, 0.85); }
.stack-acp-name { margin: 0; font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 760; letter-spacing: -0.02em; }
.stack-caps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.stack-caps li { font-size: 13.5px; font-weight: 650; padding: 5px 12px; border-radius: 999px; background: rgba(5, 10, 34, 0.46); border: 1px solid rgba(255, 255, 255, 0.22); }
.stack-wires { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--cols), 1fr); grid-template-rows: 100%; gap: var(--gap); height: calc(30px + var(--pad)); margin-bottom: calc(-1px - var(--pad)); padding: 0 calc(var(--pad) + 1px); }
.stack-wires span { position: relative; }
.stack-wires span::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: linear-gradient(180deg, #7fd8ff, rgba(127, 216, 255, 0.25)); }
.stack-wires span::after { content: ""; position: absolute; left: 50%; top: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #bfeaff; box-shadow: 0 0 10px 2px rgba(127, 216, 255, 0.9); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .stack-wires span::after { animation: wire 3.6s ease-in-out infinite; }
  /* Every second wire runs the other way: decisions travel down, requests travel up. */
  .stack-wires span:nth-child(even)::after { animation-name: wire-up; }
  .stack-wires span:nth-child(2)::after { animation-delay: 0.6s; }
  .stack-wires span:nth-child(3)::after { animation-delay: 1.2s; }
  .stack-wires span:nth-child(4)::after { animation-delay: 1.8s; }
  .stack-wires span:nth-child(5)::after { animation-delay: 2.4s; }
  .stack-wires span:nth-child(6)::after { animation-delay: 3s; }
}
@keyframes wire { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 55% { opacity: 1; } 70%, 100% { top: 100%; opacity: 0; } }
@keyframes wire-up { 0% { top: 100%; opacity: 0; } 15% { opacity: 1; } 55% { opacity: 1; } 70%, 100% { top: 0; opacity: 0; } }
.stack-agents { padding: var(--pad) var(--pad) 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--night-line); }
.stack-agents-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; margin: 14px 0 0; font-size: 13.5px; color: var(--night-muted); }
.stack-agents-head strong { color: #ffffff; font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.stack-agent-list { list-style: none; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: var(--gap); margin: 0; padding: 0; }
.stack-agent-list li { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 11px 12px; border-radius: 12px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07)); border: 1px solid rgba(255, 255, 255, 0.2); }
.agent-name { font-weight: 650; font-size: 14.5px; line-height: 1.25; color: #ffffff; }
.agent-rt { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--night-muted); }
.agent-rt::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5fe3a1; box-shadow: 0 0 0 3px rgba(95, 227, 161, 0.2); }
.stack-agent-list li.more { background: transparent; border-style: dashed; border-color: rgba(255, 255, 255, 0.34); }
.stack-agent-list li.more .agent-name { color: var(--night-muted); }
.stack-agent-list li.more .agent-rt::before { background: transparent; box-shadow: none; border: 1.5px solid var(--night-muted); }
.stack-base { margin: 10px 0 0; padding: 9px var(--pad); border-radius: 12px; text-align: center; font-size: 13.5px; font-weight: 650; color: #dbe4ff; background: rgba(5, 10, 34, 0.5); border: 1px dashed rgba(255, 255, 255, 0.26); }
.stack-base span { font-weight: 450; color: var(--night-muted); }
.stack figcaption { margin-top: 22px; text-align: center; font-size: clamp(1rem, 2vw, 1.15rem); font-weight: 650; color: #ffffff; }
@media (max-width: 60rem) {
  .stack { --cols: 3; }
  .stack-wires span:nth-child(n + 4) { display: none; }
}
@media (max-width: 36rem) {
  .stack { --cols: 2; --pad: 14px; }
  .stack-wires span:nth-child(n + 3) { display: none; }
  .stack-acp { justify-content: center; text-align: center; }
  .stack-caps { justify-content: center; }
}

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section + .section { padding-top: 76px; }
.band { overflow: hidden; background: linear-gradient(180deg, var(--surface-2), var(--bg)); border-top: 1px solid var(--border); }
.kicker { margin: 0 0 8px; font-size: 13px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.section-title { font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.12; margin: 0 0 12px; letter-spacing: -0.03em; font-weight: 760; }
.section-lead { font-size: 1.12rem; color: var(--muted); margin: 0 0 8px; max-width: 42rem; }
.section-foot { margin: 22px 0 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 18px; margin-top: 28px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-1); transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.card h3 { font-size: 1.14rem; margin: 16px 0 6px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); }
.card-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: #ffffff; background: linear-gradient(135deg, #2459f5, #2fa8f5); box-shadow: 0 8px 18px -8px rgba(36, 89, 245, 0.8); }
.card:nth-child(3n + 2) .card-icon { background: linear-gradient(135deg, #5b4bf0, #8f6bff); box-shadow: 0 8px 18px -8px rgba(124, 92, 255, 0.8); }
.card:nth-child(3n) .card-icon { background: linear-gradient(135deg, #0e86d4, #3ec5ff); box-shadow: 0 8px 18px -8px rgba(62, 197, 255, 0.8); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.points li { display: flex; gap: 14px; align-items: flex-start; color: var(--muted); }
.points strong { display: block; color: var(--text); font-size: 1.05rem; }
.point-icon { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--accent); background: var(--accent-soft); }
.split-code { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
@media (max-width: 56rem) { .split, .split-code { grid-template-columns: minmax(0, 1fr); gap: 36px; } }

/* ---------- Agent Card illustration ---------- */
/* The bottom padding is the room the two sheets behind the card need to show below it. */
.acard-wrap { position: relative; margin: 0 auto; width: 100%; max-width: 31rem; padding-bottom: 32px; }
.acard-wrap::before, .acard-wrap::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(100% - 20px); border-radius: 22px; background: var(--surface); border: 1px solid var(--border); }
.acard-wrap::before { transform: translate(22px, 20px) rotate(2.5deg); opacity: 0.55; }
.acard-wrap::after { transform: translate(11px, 10px) rotate(1.2deg); opacity: 0.8; }
.acard { position: relative; z-index: 1; overflow: hidden; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-2); }
.acard-top { padding: 20px 22px 22px; color: #ffffff; background: radial-gradient(22rem 12rem at 100% 0%, rgba(62, 197, 255, 0.5), transparent 70%), linear-gradient(120deg, #0a1647, #1f4fe0); }
.acard-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
.acard-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #cfdcff; }
.acard-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; padding: 3px 11px; border-radius: 999px; background: rgba(5, 10, 34, 0.4); border: 1px solid rgba(255, 255, 255, 0.24); }
.acard-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5fe3a1; box-shadow: 0 0 0 3px rgba(95, 227, 161, 0.22); }
.acard-name { margin: 12px 0 0; font-size: clamp(1.5rem, 3.2vw, 1.9rem); line-height: 1.12; font-weight: 780; letter-spacing: -0.025em; }
.acard-sub { margin: 4px 0 0; font-size: 14.5px; color: #cfdcff; }
.acard-owners { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 0; padding: 0; }
.acard-owners li { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 11px; border-radius: 13px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); }
.avatar { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 13px; font-weight: 750; color: #050a22; background: linear-gradient(135deg, #7fd8ff, #3ec5ff); }
.avatar.alt { background: linear-gradient(135deg, #c9bcff, #9d86ff); }
.owner-name, .owner-role { display: block; line-height: 1.25; }
.owner-name { font-weight: 700; font-size: 15px; }
.owner-role { font-size: 12.5px; color: #cfdcff; }
.acard-body { display: grid; gap: 16px; padding: 20px 22px; }
.acard-h { margin: 0 0 5px; font-size: 11.5px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.acard-purpose { margin: 0; font-size: 15.5px; }
.acard-rows { display: grid; gap: 9px; margin: 0; }
.acard-rows > div { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 10px; align-items: baseline; }
.acard-rows dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.acard-rows dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; line-height: 1.4; padding: 2px 9px; border-radius: 999px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
.chip.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 600; }
.chip.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.chip.danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.acard-perf { padding: 18px 22px 22px; background: var(--surface-2); border-top: 1px solid var(--border); }
.acard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.acard-stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.acard-stats dt { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.acard-stats dd { margin: 0; font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 780; letter-spacing: -0.03em; line-height: 1.2; }
.acard-stats dd.good { color: var(--ok); }
.acard-budget { margin-top: 16px; }
.acard-budget p { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.acard-budget strong { color: var(--text); }
.meter { height: 9px; border-radius: 999px; background: var(--border); overflow: hidden; }
.meter span { display: block; width: 38%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2459f5, #3ec5ff); }

/* ---------- Request flow ---------- */
.flow { display: grid; grid-template-columns: minmax(0, 0.85fr) auto minmax(0, 3fr) auto minmax(0, 0.95fr); gap: 14px; align-items: stretch; margin-top: 32px; }
.flow-start { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 20px; border-radius: var(--radius); color: #ffffff; background: radial-gradient(14rem 10rem at 0% 0%, rgba(124, 92, 255, 0.55), transparent 70%), linear-gradient(160deg, #0a1647, #101f66); box-shadow: var(--shadow-1); }
.flow-start p { margin: 0; color: var(--night-muted); line-height: 1.4; }
.flow-start strong { display: block; color: #ffffff; font-size: 1.08rem; }
.flow-arrow { display: grid; place-items: center; color: var(--accent); }
.flow-checks { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 12px; border-radius: 20px; background: linear-gradient(100deg, rgba(36, 89, 245, 0.14), rgba(62, 197, 255, 0.14)); border: 1px solid var(--border); }
.flow-checks li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 16px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); }
.flow-checks strong { font-size: 1.1rem; letter-spacing: -0.01em; }
.flow-text { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.flow-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 8px; border-radius: 12px; color: #ffffff; background: linear-gradient(135deg, #2459f5, #2fa8f5); }
.flow-num { position: absolute; top: 14px; right: 14px; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12.5px; font-weight: 750; color: var(--accent); background: var(--accent-soft); }
.flow-outcomes { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; align-content: center; }
.flow-outcomes li { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-radius: 12px; font-weight: 700; border: 1px solid transparent; }
.flow-outcomes .ok { color: var(--ok); background: var(--ok-soft); }
.flow-outcomes .wait { color: var(--warn); background: var(--warn-soft); }
.flow-outcomes .no { color: var(--danger); background: var(--danger-soft); }
.flow-audit { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0; padding: 11px 16px; border-radius: 12px; font-size: 14.5px; font-weight: 650; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-strong); }
.flow-audit .icon { flex: none; }
.flow-then strong { color: var(--ok); }
@media (max-width: 62rem) {
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow-arrow { transform: rotate(90deg); }
  .flow-outcomes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .flow-checks, .flow-outcomes { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Control layers ---------- */
/* Four wide slabs, one per layer: what it is, what it does, who enforces it. */
.layers { list-style: none; display: grid; gap: 14px; margin: 30px 0 0; padding: 0; }
.layers li { position: relative; display: grid; grid-template-columns: 46px minmax(0, 16.5rem) minmax(0, 1fr) 11rem; gap: 6px 22px; align-items: center; padding: 18px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); }
/* A short rail joins each layer to the next, down the line of the icons. */
.layers li + li::before { content: ""; position: absolute; left: 44px; top: -15px; width: 2px; height: 14px; border-radius: 2px; background: var(--border-strong); }
.layer-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: #ffffff; background: linear-gradient(135deg, #2459f5, #2fa8f5); box-shadow: 0 8px 18px -8px rgba(36, 89, 245, 0.8); }
.layers li:nth-child(2) .layer-icon { background: linear-gradient(135deg, #5b4bf0, #8f6bff); box-shadow: 0 8px 18px -8px rgba(124, 92, 255, 0.8); }
.layers li:nth-child(3) .layer-icon { background: linear-gradient(135deg, #0e86d4, #3ec5ff); box-shadow: 0 8px 18px -8px rgba(62, 197, 255, 0.8); }
.layers li:nth-child(4) .layer-icon { color: var(--brand-ink); background: linear-gradient(135deg, #ffb224, #ffd166); box-shadow: 0 8px 18px -8px rgba(255, 178, 36, 0.8); }
.layer-when { margin: 0 0 3px; font-size: 12.5px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.layers h3 { margin: 0; font-size: 1.12rem; line-height: 1.3; letter-spacing: -0.01em; }
.layer-body { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; text-wrap: pretty; }
.layer-by { align-self: stretch; display: flex; flex-direction: column; justify-content: center; margin: 0; padding-left: 20px; border-left: 1px solid var(--border); font-size: 14.5px; font-weight: 650; line-height: 1.35; }
.layer-by span { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.layers-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 40px; align-items: center; margin-top: 22px; }
.layers-foot .callout { margin: 0; font-size: 15px; }
.layers-foot .callout p { margin: 0; }
.foot-links { display: grid; gap: 10px; margin: 0; }
@media (max-width: 62rem) {
  .layers li { grid-template-columns: 46px minmax(0, 1fr); gap: 8px 16px; align-items: start; padding: 18px; }
  .layers li + li::before { left: 40px; }
  .layer-icon { grid-row: 1 / span 3; }
  .layer-head, .layer-body, .layer-by { grid-column: 2; }
  .layer-by { display: block; padding: 8px 0 0; border-left: 0; border-top: 1px dashed var(--border-strong); font-size: 14px; }
  .layers-foot { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 26rem) {
  .layers li { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 12px; padding: 16px 14px; }
  .layer-icon { width: 40px; height: 40px; border-radius: 12px; }
  .layers li + li::before { left: 33px; }
}

/* ---------- Install ---------- */
.terminal-wrap { min-width: 0; }
.terminal { border-radius: 16px; overflow: hidden; background: #070d2b; border: 1px solid #1c2a66; box-shadow: var(--shadow-2); }
.terminal-bar { display: flex; align-items: center; gap: 7px; margin: 0; padding: 11px 14px; font-size: 12.5px; font-weight: 600; color: #a3afd6; background: #0c1540; border-bottom: 1px solid #1c2a66; }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: #2b3a7c; }
.terminal-bar span:nth-child(3) { margin-right: 8px; }
.terminal pre { margin: 0; padding: 18px; border: 0; border-radius: 0; background: transparent; color: #dbe4ff; font-size: 13px; line-height: 1.7; }
.terminal-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 16px 0 4px; font-weight: 650; }
.terminal-wrap .note { margin: 6px 0 0; }

/* ---------- Final call to action ---------- */
.final-cta { position: relative; overflow: hidden; padding: 56px 28px; border-radius: 28px; text-align: center; color: #ffffff;
  background: radial-gradient(34rem 18rem at 100% 0%, rgba(62, 197, 255, 0.55), transparent 65%), radial-gradient(30rem 18rem at 0% 100%, rgba(124, 92, 255, 0.6), transparent 65%), linear-gradient(120deg, #0a1647, #1f4fe0); }
.final-cta h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.03em; line-height: 1.1; }
.final-cta p { margin: 12px auto 0; max-width: 34rem; font-size: 1.12rem; color: var(--night-muted); }
.final-cta .cta { justify-content: center; margin-top: 26px; }
.final-cta .button.primary { background: #ffffff; color: #1238b8; box-shadow: 0 10px 26px -8px rgba(5, 10, 34, 0.7); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 24px; padding: 40px 0 32px; font-size: 14.5px; color: var(--night-muted); background: var(--night-0); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px 48px; }
.footer-brand p { margin: 12px 0 0; max-width: 26rem; }
.footer-nav { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin: 0; padding: 0; }
.site-footer a { color: #dbe4ff; text-decoration: none; }
.site-footer a:hover { color: #ffffff; text-decoration: underline; }
.footer-legal { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 13px; }
@media (max-width: 44rem) { .footer-inner { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Prose pages and documentation ---------- */
h2 { font-size: 1.6rem; margin: 32px 0 12px; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; margin: 24px 0 8px; }
.prose { max-width: 50rem; padding-top: 40px; padding-bottom: 40px; }
.prose h1 { font-size: clamp(2rem, 4.4vw, 2.7rem); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 16px; }
.prose section { padding: 0; }
.callout { border: 1px solid var(--warn-border); background: var(--warn-bg); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; }
.callout p { margin: 4px 0; }
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
code { background: var(--code-bg); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; overflow-wrap: normal; }
.code-label { font-size: 13px; color: var(--muted); margin: 16px 0 -8px; }
.table-wrap { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
/* Code in a table keeps its words whole: "anywhere" let a column shrink to a few letters and split a
   name in the middle (`accessPro` / `file`). A table that then needs more room scrolls sideways. */
td code, th code { overflow-wrap: normal; }
/* On a phone there is no room for columns: each row becomes a block, its first cell the title and the
   other cells below it under their column's name. The header row stays available to screen readers. */
@media (max-width: 40rem) {
  .table-wrap { overflow-x: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table-wrap tr { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; }
  .table-wrap td { border: 0; padding: 0; }
  .table-wrap td + td { margin-top: 6px; }
  .table-wrap td:first-child { font-weight: 650; }
  .table-wrap td:empty { display: none; }
  .table-wrap td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
  /* With two columns the second needs no name: it is simply what is said about the first. */
  .table-wrap .cols-2 td::before { content: none; }
  .table-wrap td code { overflow-wrap: anywhere; }
}
blockquote { margin: 16px 0; padding: 4px 16px; border-left: 4px solid var(--warn-border); background: var(--warn-bg); border-radius: 0 10px 10px 0; }

.docs-layout { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 40px; padding-top: 32px; padding-bottom: 40px; }
.docs-layout .prose { padding-top: 0; }
.docs-nav { font-size: 14.5px; }
.docs-nav h2 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 22px 0 6px; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav li a { display: block; padding: 4px 10px; margin-left: -10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.docs-nav li a:hover { background: var(--surface-2); }
.docs-nav li a[aria-current="page"] { color: var(--accent); font-weight: 650; background: var(--accent-soft); }
.source-note { font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); margin-top: 32px; padding-top: 12px; }
@media (max-width: 52rem) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { border-bottom: 1px solid var(--border); padding-bottom: 12px; }
}

.doc-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem 0;
  border-radius: 12px;
}

/* ---------- Small screens ---------- */
@media (max-width: 44rem) {
  html { scroll-padding-top: 16px; }
  .site-header { position: static; }
  .header-inner { gap: 6px 10px; }
  .brand { font-size: 15.5px; gap: 8px; }
  .site-header .button.small { padding: 7px 11px; font-size: 13.5px; }
  .header-actions { margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin-left: -9px; }
  .nav { flex-wrap: nowrap; gap: 2px; }
  .nav a, .gh-link { padding: 6px 9px; font-size: 14.5px; }
  .hero-inner { padding-top: 40px; padding-bottom: 56px; }
  .section, .section + .section { padding: 56px 0; }
  .hero .cta .button, .final-cta .cta .button { width: 100%; }
  .acard-owners { grid-template-columns: minmax(0, 1fr); }
  .acard-wrap::before { transform: translate(8px, 16px) rotate(1.6deg); }
  .acard-wrap::after { transform: translate(4px, 8px) rotate(0.8deg); }
  .final-cta { padding: 44px 20px; }
}
@media (max-width: 26rem) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .brand { font-size: 15px; }
  .site-header .brand img { width: 28px; height: 28px; }
  .site-header .button.small { padding: 6px 10px; font-size: 13px; }
  .site-header .button.small .icon { display: none; }
}
