:root {
  --ink: #1c1c1e;
  --muted: #595d63;
  --line: #e7e7e5;
  --paper: #ffffff;
  --paper-soft: #f5f6f7;
  --paper-warm: #f7f6f2;
  --accent: #b74c1b;
  --gutter: clamp(20px, 6vw, 28px);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code { font: 0.92em var(--mono); }

.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.center { text-align: center; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgb(255 255 255 / 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 19px; letter-spacing: -0.03em; text-decoration: none; }
.brand--small { font-size: 15px; gap: 7px; }
.nav__links { display: flex; gap: 22px; margin: 0 auto; }
.nav__links a { white-space: nowrap; font-size: 14px; font-weight: 450; color: var(--muted); text-decoration: none; transition: color .15s; }
.nav__links a:hover { color: var(--ink); }

/* Language switch: two round flags, the current language in full colour */
.lang { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 3px; border-radius: 99px; background: var(--paper-soft); }
.lang button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; transition: background .15s; }
.lang .flag { display: block; border-radius: 50%; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08); filter: grayscale(1); opacity: .45; transition: filter .15s, opacity .15s; }
.lang button:hover .flag { filter: none; opacity: .8; }
.lang button[aria-pressed="true"] { background: var(--paper); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
.lang button[aria-pressed="true"] .flag { filter: none; opacity: 1; }
.lang button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav__links + .lang { margin-left: 0; }

/* Beta pill and notes */
.beta { margin-left: 2px; padding: 2px 7px; border-radius: 99px; background: rgb(183 76 27 / 0.1); color: var(--accent); font-size: 11px; font-weight: 650; letter-spacing: .02em; }
.note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
.compat__title { margin: clamp(48px, 7vw, 72px) 0 0; font-size: 22px; letter-spacing: -0.03em; }
.compat { margin-top: 24px; }
.compat .col h3 { display: block; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 12px;
  font: 550 15px var(--font); letter-spacing: -0.01em; text-decoration: none;
  transition: transform .15s, background .15s, border-color .15s;
}
.btn:active { transform: scale(0.98); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--line { border: 1px solid var(--line); color: var(--ink); background: var(--paper); }
.btn--line:hover { border-color: #cfcfcc; }
.btn--small { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.gh { width: 16px; height: 16px; fill: currentColor; }

/* Type */
.eyebrow { margin: 0 0 14px; color: var(--accent); font-size: 13px; font-weight: 550; letter-spacing: -0.005em; }
.display {
  margin: 0;
  font-size: clamp(42px, 7.2vw, 80px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.display--md { font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.04em; line-height: 1.04; }
.lede { margin: 22px auto 0; max-width: 620px; color: var(--muted); font-size: clamp(17px, 2vw, 19px); line-height: 1.55; letter-spacing: -0.01em; }
.lede--narrow { max-width: 560px; }
.lede--side { margin: 0; max-width: 440px; }
h3 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.3; }

/* Hero */
.hero { padding: clamp(56px, 10vw, 104px) 0 0; text-align: center; overflow: hidden; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.textlink { display: inline-block; margin-top: 22px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
.textlink:hover { color: var(--ink); }

.stage { position: relative; margin: clamp(48px, 7vw, 76px) auto 0; max-width: 1040px; padding-bottom: clamp(56px, 8vw, 96px); }
.stage__app {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.06), 0 30px 80px -20px rgb(28 28 30 / 0.28), 0 12px 24px -12px rgb(28 28 30 / 0.12);
}
.stage__term {
  position: absolute; right: -2%; bottom: 0;
  width: min(560px, 58%);
  border-radius: 14px;
  box-shadow: 0 30px 70px -18px rgb(0 0 0 / 0.45);
}

/* Bands */
.band { padding: clamp(80px, 11vw, 136px) 0; }
.band--soft { background: var(--paper-soft); }
.band--warm { background: var(--paper-warm); }

.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.split--top { align-items: end; grid-template-columns: 1fr 1fr; }
.split__media { margin: 0; }
.split__media img { width: 100%; border-radius: 14px; box-shadow: 0 24px 60px -24px rgb(0 0 0 / 0.4); }
/* A transparent animation that draws its own card and shadow */
.split__media--detail img { box-shadow: none; border-radius: 0; }
.split__media figcaption { margin-top: 18px; font-size: 13px; color: var(--muted); text-align: center; }
.split__media.is-photo img { border-radius: 14px; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.06), 0 24px 60px -24px rgb(28 28 30 / 0.3); }

/* Tabs */
.tabs { display: flex; gap: 22px; margin: 34px 0 30px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button {
  flex: none; padding: 0 0 12px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: none;
  font: 500 15px var(--font); color: var(--muted); cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.panel h3 { margin-bottom: 12px; }
.panel p { margin: 0; color: var(--muted); line-height: 1.75; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 22px !important; font-size: 14px; }
.check::before {
  content: ""; flex: none; width: 14px; height: 14px;
  background: var(--muted);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2 8.5l4 4 8-9" fill="none" stroke="black" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2 8.5l4 4 8-9" fill="none" stroke="black" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg>') center / contain no-repeat;
}

/* How it works */
.diagram { width: 100%; max-width: 960px; margin: clamp(48px, 7vw, 72px) auto 0; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: clamp(56px, 8vw, 88px); }
.col, .cell { border-top: 1px solid var(--line); padding-top: 30px; }
.col p, .cell p { margin: 12px 0 0; color: var(--muted); line-height: 1.75; font-size: 15.5px; }
.col h3 { display: inline; }
.col .icon { margin-right: 10px; vertical-align: -4px; }
.icon { width: 24px; height: 24px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cell .icon { display: block; margin-bottom: 16px; }

/* Performance */
.bars { margin: clamp(48px, 7vw, 72px) 0 0; display: grid; gap: 18px; }
.bar { display: grid; grid-template-columns: 210px 1fr 80px; align-items: center; gap: 20px; font-size: 15px; }
.bar__label { font-weight: 550; letter-spacing: -0.01em; }
.bar__track { height: 14px; border-radius: 99px; background: rgb(28 28 30 / 0.06); overflow: hidden; }
.bar__fill { display: block; height: 100%; width: calc(var(--v) / 3 * 100%); border-radius: inherit; background: #b9b8b2; }
.bar__fill--accent { background: var(--accent); }
.bar__value { font: 500 14px var(--mono); color: var(--muted); text-align: right; }
.bars figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* Comparison */
.compare { margin-top: clamp(44px, 6vw, 64px); overflow-x: auto; border-radius: 18px; box-shadow: 0 0 0 1px var(--line); }
.compare:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.compare table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.compare th, .compare td { padding: 18px 22px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.compare thead th, .compare thead td { border-top: 0; padding-top: 22px; padding-bottom: 18px; }
.compare thead th { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; }
.compare tbody th { width: 22%; font-weight: 550; letter-spacing: -0.01em; }
.compare td { width: 26%; color: var(--muted); }
.compare .us { background: rgb(183 76 27 / 0.045); color: var(--ink); }
.compare thead .us { border-radius: 0; }
.who { display: inline-flex; align-items: center; gap: 12px; }
.who .logo { width: 36px; height: 36px; border-radius: 9px; }
.yes, .no { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; }
.yes { background: var(--accent); -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat; }
.compare td:not(.us) .yes { background: var(--muted); }
.no { position: relative; }
.no::before { content: ""; position: absolute; left: 3px; right: 3px; top: 8px; height: 2px; border-radius: 2px; background: #c4c4c0; }
:root { --tick: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2 8.5l4 4 8-9" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'); }

/* Advanced */
.adv__lede { margin-top: 22px; }

/* Feature grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 36px; margin-top: 44px; }
.cell h3 { font-size: 17px; }
.cell p { font-size: 15px; }

/* Open source */
.stack { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 34px; margin: 44px 0 0; padding: 0; list-style: none; }
.stack li { font-size: 21px; font-weight: 600; letter-spacing: -0.03em; color: #3a3a3e; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 30px 0 40px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.footer p { margin: 0; font-size: 13px; color: var(--muted); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* Fewer section links as the bar narrows, so none ever wraps onto two lines. The GitHub button
   stands in for Open source, and Performance sits right under How it works. */
@media (max-width: 1180px) { .nav__links a[href="#open-source"] { display: none; } }
@media (max-width: 1060px) { .nav__links a[href="#performance"] { display: none; } }
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__inner { justify-content: flex-start; gap: 16px; }
  .nav__links + .lang { margin-left: auto; }
  .split, .split--top { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr; gap: 28px; }
  .stage__term { position: relative; right: auto; width: 100%; margin-top: -12%; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .bar__track { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
