:root {
  --bg: #faf8f4;
  --bg-alt: #f1ede5;
  --surface: #ffffff;
  --text: #2b2724;
  --muted: #6b635b;
  --line: #e0d9cd;
  --accent: #4f8a1d;
  --accent-strong: #3d6d14;
  --accent-soft: #e6f2d3;
  --on-accent: #ffffff;
  --code-bg: #26221f;
  --code-text: #ece6dc;
  --code-comment: #9c9488;
  --shadow: 0 1px 2px rgba(43, 39, 36, .06), 0 12px 32px rgba(43, 39, 36, .10);
  --radius: 14px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1917;
    --bg-alt: #221f1c;
    --surface: #2a2623;
    --text: #ece6dc;
    --muted: #a69d92;
    --line: #3a3531;
    --accent: #a3d468;
    --accent-strong: #b9e283;
    --accent-soft: #2c3a1c;
    --on-accent: #1b2410;
    --code-bg: #141210;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--sans); }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code { font: .9em var(--mono); background: var(--bg-alt); border: 1px solid var(--line); border-radius: 5px; padding: .08em .35em; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); font-weight: 750; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 720; margin-bottom: .6em; }
h3 { font-size: 1.08rem; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 720; font-size: 1.12rem; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.top nav a:hover { color: var(--text); }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: .68em 1.15em; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; transition: transform .12s, border-color .12s, background .12s; }
.btn:hover { border-color: var(--muted); color: var(--text); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn.small { padding: .42em .9em; font-size: .93rem; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 92px) 0 clamp(40px, 6vw, 72px); background: radial-gradient(1100px 460px at 50% -8%, var(--accent-soft), transparent 70%); text-align: center; }
.eyebrow { color: var(--accent); font-weight: 650; font-size: .86rem; letter-spacing: .07em; text-transform: uppercase; margin-bottom: .9em; }
.lead { font-size: clamp(1.08rem, 1.7vw, 1.26rem); color: var(--muted); max-width: 44em; margin: 1.1em auto 1.6em; text-wrap: pretty; }
.hero h1 { max-width: 15em; margin-inline: auto; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.protocols { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; margin: 26px 0 0; }
.protocols li { font: 600 .82rem var(--mono); color: var(--muted); border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .32em .85em; }

/* Framed screen */
.screen { margin: clamp(32px, 5vw, 56px) auto 0; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; text-align: left; }
.screen video, .screen img { width: 100%; background: #111; }
.chrome { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.chrome i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.chrome span { margin-left: 10px; font: .76rem var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
figure { margin: 0; }
figcaption { font-size: .9rem; color: var(--muted); padding: 12px 16px; border-top: 1px solid var(--line); }
.hero .screen { max-width: 1040px; }
.shot img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.shot figcaption { border: 0; padding: 10px 2px 0; }

/* Numbers */
.numbers { border-block: 1px solid var(--line); background: var(--surface); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.grid4 > div { padding: 30px 24px; border-left: 1px solid var(--line); }
.grid4 > div:first-child { border-left: 0; padding-left: 0; }
.grid4 b { display: block; font-size: clamp(1.25rem, 2.2vw, 1.7rem); letter-spacing: -.02em; line-height: 1.2; margin-bottom: .35em; }
.grid4 span { color: var(--muted); font-size: .93rem; line-height: 1.45; display: block; }

/* Bands */
.band { padding: clamp(56px, 8vw, 104px) 0; }
.band.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.split.reverse { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.split.align-start { align-items: start; }
.split .screen { margin-top: 0; }
.split p:not(.eyebrow) { color: var(--muted); }
.narrow { max-width: 46em; color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 1.3em 0 0; display: grid; gap: .8em; }
.checks li { position: relative; padding-left: 1.7em; color: var(--muted); }
.checks li b { color: var(--text); font-weight: 650; }
.checks li::before { content: ""; position: absolute; left: .15em; top: .5em; width: .85em; height: .48em; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.cards article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.cards h3 { margin-bottom: .5em; }
.cards p { color: var(--muted); font-size: .96rem; margin: 0; }

/* Gallery */
.gallery { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 18px; }
.gallery button { font: 600 .93rem var(--sans); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: .45em 1em; cursor: pointer; }
.gallery button:hover { color: var(--text); border-color: var(--muted); }
.gallery button[aria-selected="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.screen.wide { margin-top: 0; }

/* Architecture */
.flow { display: grid; grid-template-columns: 1fr auto 1.2fr auto 1fr auto 1fr; align-items: center; gap: 10px; margin: 30px 0 34px; }
.flow > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px; text-align: center; height: 100%; display: grid; align-content: center; }
.flow b { display: block; font: 650 .93rem var(--mono); margin-bottom: .3em; }
.flow span { color: var(--muted); font-size: .84rem; line-height: 1.4; }
.flow > i { font: normal .72rem var(--mono); color: var(--muted); text-align: center; position: relative; padding: 0 4px 12px; white-space: nowrap; }
.flow > i::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 2px; background: var(--accent); border-radius: 2px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .95rem; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td:nth-child(n+2) { color: var(--muted); }
td code { white-space: nowrap; }

/* Code */
.code { position: relative; background: var(--code-bg); color: var(--code-text); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.code pre { margin: 0; padding: 22px; overflow-x: auto; font: .86rem/1.65 var(--mono); }
.code code { background: none; border: 0; padding: 0; font: inherit; color: inherit; }
.code .c { color: var(--code-comment); }
.copy { position: absolute; top: 10px; right: 10px; font: 600 .78rem var(--sans); color: var(--code-text); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 7px; padding: .35em .8em; cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, .16); }
.links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 1.4em; }
.links a { font-weight: 600; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 44px 0 56px; background: var(--bg-alt); }
.foot { display: grid; gap: 8px; }
.foot p { margin: 0; color: var(--muted); max-width: 60em; }
.foot .brand { margin-bottom: 6px; }
.fine { font-size: .85rem; }

@media (max-width: 980px) {
  .top nav { display: none; }
  .top .btn { margin-left: auto; }
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse > .screen { order: 2; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .grid4 > div { padding: 22px 18px; }
  .grid4 > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .grid4 > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .flow { grid-template-columns: 1fr; }
  .flow > i { padding: 4px 0 4px; }
  .flow > i::after { left: 50%; right: auto; top: 100%; bottom: auto; width: 2px; height: 8px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .chrome span { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
