@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-var.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

/* Trail-map system: map paper, ink, and the three colours of a Swiss hiking trail. */
:root {
  --paper: #f4f1e8;
  --paper-2: #eae5d8;        /* code panels, table heads */
  --ink: #14213d;            /* text, rules, borders */
  --ink-soft: #4f5768;       /* secondary text, 6.4:1 on paper */
  --rule-soft: #cfc8b6;      /* hairlines inside panels */
  --teal: #256b78;           /* links and eyebrows, 5.4:1 on paper */
  --teal-bar: #2f7f8f;       /* chart fill only */
  --grey-bar: #8e887a;       /* chart fill only, 3.1:1 on paper */
  --red: #d7263d;            /* waypoints and badges */
  --yellow: #f2c200;         /* signpost blades, call to action */
  --yellow-tint: #f7e7a1;    /* the default row of a table */
  --syn-tag: #14213d;
  --syn-attr: #256b78;
  --syn-str: #43701f;
  --syn-key: #7a2e8c;
  --syn-comment: #5a6273;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 4px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans); font-size: 17px; font-weight: 400; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; color: var(--ink); }
p { margin: 0; }
code, pre { font-family: var(--mono); font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 16px;
  background: var(--ink); color: var(--paper); border-radius: var(--radius); font-weight: 600;
}
.skip:focus { top: 12px; }

.container { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* Syntax highlighting */
.t { color: var(--syn-tag); }
.a { color: var(--syn-attr); }
.s { color: var(--syn-str); }
.k { color: var(--syn-key); }
.c { color: var(--syn-comment); font-style: italic; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 22px; border-radius: var(--radius);
  font-weight: 650; font-size: 17px; white-space: nowrap; cursor: pointer;
  border: 1.5px solid var(--ink);
  transition: background-color .15s, color .15s;
}
.btn-sm { height: 42px; padding: 0 18px; font-size: 16px; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #24345a; border-color: #24345a; }
.btn-secondary { color: var(--ink); background: transparent; }
.btn-secondary:hover { background: rgba(20, 33, 61, .07); }
.btn:active { transform: translateY(1px); }

/* Navigation */
.nav { border-bottom: 1.5px solid var(--ink); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: inline-flex; align-items: center; font-weight: 750; font-size: 25px; letter-spacing: -0.02em; }
.nav nav { display: flex; align-items: center; gap: 34px; }
.nav nav a:not(.btn) { font-size: 17px; font-weight: 500; transition: color .15s; }
.nav nav a:not(.btn):hover { color: var(--teal); }

/* Shared section header */
.eyebrow { color: var(--teal); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; }
.section-head { margin-bottom: 32px; max-width: 860px; }
.section-head h2 { margin-top: 8px; font-size: 48px; line-height: 1.04; font-weight: 800; letter-spacing: -0.03em; }
.sub { margin-top: 12px; color: var(--ink-soft); font-size: 19px; line-height: 1.5; }

/* Hero */
.hero { padding: 72px 0 0; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: 40px; align-items: center; }
.hero h1 { margin: 18px 0 24px; font-size: 60px; line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; }
.hero-lede { max-width: 590px; color: var(--ink-soft); font-size: 20px; line-height: 1.55; }
.hero-lede code, .panel p code, .footnote code, .panel-note code {
  font-size: .86em; color: var(--ink); background: transparent;
  border: 1px solid rgba(20, 33, 61, .45); border-radius: 3px; padding: 0 5px;
}
.chip {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 560px; height: 54px; margin-top: 30px; padding: 0 8px 0 18px;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: rgba(255, 255, 255, .35);
}
.chip code { font-size: 16px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.prompt { color: var(--teal); }
.copy {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; flex: none;
  background: none; border: 0; border-radius: var(--radius); color: var(--ink); cursor: pointer;
}
.copy svg { width: 20px; height: 20px; }
.copy:hover { background: rgba(20, 33, 61, .08); }
.copy.done { color: var(--teal); }
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }

/* Hero trail map */
.trailmap {
  margin: 0; position: relative;
  background: url("contours.svg") center / 120% auto no-repeat;
}
.trailmap svg { display: block; width: 100%; height: auto; overflow: visible; }
.trailmap .ridge, .trailmap .trees { stroke: var(--ink); stroke-width: 1.8; }
.trailmap .trees { stroke-width: 1.5; }
.trailmap .trail { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 7 6; stroke-linecap: round; }
.trailmap .pole { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.trailmap .blade { fill: var(--yellow); stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.trailmap text { font-family: var(--mono); font-size: 16px; font-weight: 600; fill: var(--ink); }
.trailmap .post text { font-size: 16.5px; }
.trailmap .points circle { fill: var(--paper); stroke: var(--red); stroke-width: 3.5; }
.trailmap .points .junction { fill: var(--red); stroke: var(--ink); stroke-width: 2; }
.trailmap .labels text { paint-order: stroke; stroke: var(--paper); stroke-width: 6px; stroke-linejoin: round; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 64px 0 0; padding: 28px 0 30px;
  border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
}
.stats div { padding: 0 24px; }
.stats div:first-child { padding-left: 0; }
.stats div + div { border-left: 1.5px solid var(--ink); }
.stats dt { font-size: 54px; font-weight: 800; line-height: 1; letter-spacing: -0.035em; }
.stats dd { margin: 10px 0 0; color: var(--ink-soft); font-size: 17px; line-height: 1.4; }

/* Sections */
.section { padding: 112px 0 0; }

/* Features: entries in a trail guide */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.panel {
  position: relative; padding: 24px 26px 28px;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: rgba(255, 255, 255, .22);
}
.badge {
  position: absolute; top: 20px; left: 22px;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--red); color: #fff; font: 700 14px/1 var(--mono);
}
.panel .icon { display: block; width: 56px; height: 56px; margin: 0 0 18px 52px; color: var(--ink); }
.panel h3 { font-size: 24px; line-height: 1.2; font-weight: 750; letter-spacing: -0.015em; }
.panel h3 code.h { font-size: .88em; font-weight: 600; }
.panel p { margin-top: 10px; color: var(--ink-soft); font-size: 16.5px; line-height: 1.6; }
.panel p code { font-size: 14px; }
.footnote code, .panel-note code { white-space: nowrap; }

/* Live demo */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 24px; align-items: stretch; }
.browser {
  display: flex; flex-direction: column; min-height: 460px; overflow: hidden;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--paper);
}
.browser-bar { display: flex; align-items: center; gap: 16px; height: 52px; padding: 0 14px; border-bottom: 1.5px solid var(--ink); }
.dots3 { display: flex; gap: 7px; flex: none; }
.dots3 i { width: 12px; height: 12px; border: 1.5px solid var(--ink); border-radius: 50%; }
.address {
  flex: 1; min-width: 0; height: 32px; padding: 0 12px; display: flex; align-items: center;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: #fff;
  font-family: var(--mono); font-size: 14.5px; line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser iframe { flex: 1; display: block; width: 100%; border: 0; background: var(--paper); }
.code {
  margin: 0; padding: 20px 22px; background: var(--paper-2);
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  font-size: 14px; line-height: 1.6; white-space: pre; overflow-x: auto;
}

/* Bar chart drawn like a trail-distance table */
.chart { margin: 0; padding: 20px 0 22px; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.bars { --max: 7000; width: 100%; border-collapse: collapse; }
.bars th[scope=row] {
  width: 230px; height: 40px; padding: 0 16px 0 0; text-align: left; white-space: nowrap;
  font: 500 16px/1 var(--mono);
}
.bars td { padding: 0; }
.track { position: relative; }
.track > span { position: absolute; top: 50%; transform: translateY(-50%); }
.bar { left: 0; height: 22px; width: calc(var(--v) / var(--max) * 100%); background: var(--grey-bar); }
.bar.ours { background: var(--teal-bar); }
.val { left: calc(var(--v) / var(--max) * 100% + 12px); font: 600 16px/1 var(--mono); font-variant-numeric: tabular-nums; }
.footnote { margin-top: 16px; max-width: 860px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.footnote a, .panel-note a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.footnote a:hover, .panel-note a:hover { color: var(--ink); }

/* History modes table */
.modes-wrap { overflow-x: auto; border: 1.5px solid var(--ink); border-radius: var(--radius); }
.modes { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 17px; }
.modes th, .modes td { padding: 14px 18px; text-align: left; font-weight: 400; border-right: 1.5px solid var(--ink); }
.modes th:last-child, .modes td:last-child { border-right: 0; }
.modes thead th { font-weight: 750; background: var(--paper-2); border-bottom: 1.5px solid var(--ink); }
.modes tbody tr + tr > * { border-top: 1.5px solid var(--ink); }
.modes tr.default > * { background: var(--yellow-tint); }
.modes code { font-size: 15.5px; }

/* Get started */
.code-panel { position: relative; border: 1.5px solid var(--ink); border-radius: var(--radius); background: rgba(255, 255, 255, .3); }
.tabs { display: flex; height: 52px; padding: 0 8px; border-bottom: 1.5px solid var(--ink); }
.tabs [role=tab] {
  min-width: 64px; padding: 0 16px; margin-bottom: -1.5px; cursor: pointer;
  background: none; border: 0; border-bottom: 3px solid transparent;
  font-size: 17px; font-weight: 600; color: var(--ink-soft);
}
.tabs [role=tab]:hover { color: var(--ink); }
.tabs [role=tab][aria-selected=true] { color: var(--teal); border-bottom-color: var(--teal); }
.copy-text {
  position: absolute; right: 14px; top: 66px; width: auto; height: 38px; padding: 0 12px; gap: 6px;
  display: inline-flex; align-items: center; border: 1.5px solid var(--ink); background: var(--paper);
  font-size: 15px; font-weight: 600;
}
.copy-text svg { width: 18px; height: 18px; }
.pane { padding: 24px 120px 26px 22px; min-height: 104px; }
.pane pre { margin: 0; font-size: 14.5px; line-height: 1.7; overflow-x: auto; }
.panel-note { margin-top: 12px; color: var(--ink-soft); font-size: 15px; }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.card { border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 0 22px 22px; background: rgba(255, 255, 255, .22); }
.card-head { display: flex; align-items: center; gap: 14px; margin: 0 -22px 18px; padding: 16px 22px; border-bottom: 1.5px solid var(--ink); }
.card-icon { width: 30px; height: 30px; flex: none; color: var(--ink); }
.card h3 { font-size: 22px; line-height: 1.25; font-weight: 750; letter-spacing: -0.01em; }
.card > p { color: var(--ink-soft); font-size: 16.5px; }
.snippet { margin: 0; font-size: 14.5px; line-height: 1.7; overflow-x: auto; }
.link { display: inline-block; margin-top: 14px; color: var(--teal); font-weight: 650; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.list { margin: 12px 0 0; padding-left: 20px; font-size: 16.5px; line-height: 1.8; }
.list li::marker { color: var(--red); }

/* Call to action: a trailhead sign */
.trailhead { padding: 96px 0 0; }
.cta {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px;
  padding: 26px 30px; background: var(--yellow); border: 1.5px solid var(--ink); border-radius: var(--radius);
}
.cta-icon { width: 56px; height: 56px; color: var(--ink); }
.cta h2 { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.cta .actions { margin: 0; flex-wrap: nowrap; }

/* Footer */
.footer { padding: 72px 0 64px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; padding-top: 32px; border-top: 1.5px solid var(--ink); }
.footer .brand { font-size: 23px; }
.footer-brand p { margin-top: 10px; color: var(--ink-soft); font-size: 16px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 170px); }
.footer-cols div { display: flex; flex-direction: column; gap: 6px; }
.footer-cols p { margin-bottom: 4px; font-size: 14px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.footer-cols a { color: var(--teal); font-size: 16px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.footer-cols a:hover { color: var(--ink); }

/* Narrow screens */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .trailmap { max-width: 560px; }
  .demo { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .stats div:nth-child(3) { border-left: 0; padding-left: 0; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .cta { grid-template-columns: minmax(0, 1fr); }
  .cta-icon { display: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 18px; }
  body { font-size: 16px; }
  .nav nav a:not(.btn) { display: none; }
  .nav-inner { height: 64px; }
  .brand { font-size: 21px; }
  .hero { padding-top: 40px; }
  .hero h1 { font-size: 40px; }
  .hero h1 br, .section-head h2 br { display: none; }
  .hero-lede { font-size: 17.5px; }
  .chip code { font-size: 13.5px; }
  .stats dt { font-size: 40px; }
  .stats dd { font-size: 15px; }
  .stats div { padding: 0 14px; }
  .section { padding-top: 80px; }
  .section-head h2 { font-size: 34px; }
  .sub { font-size: 17px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .browser { min-height: 480px; }
  .code { font-size: 12.5px; padding: 16px; }
  .bars th[scope=row] { width: 150px; font-size: 13px; padding-right: 10px; }
  .bars { --max: 8800; }
  .val { font-size: 13.5px; left: calc(var(--v) / var(--max) * 100% + 8px); }
  .modes { min-width: 0; font-size: 14px; }
  .modes th, .modes td { padding: 10px 8px; }
  .modes code { font-size: 13px; }
  .pane { padding: 70px 18px 22px; }
  .copy-text { top: 64px; right: 10px; }
  .pane pre { font-size: 12.5px; }
  .cta h2 { font-size: 24px; }
  .cta .actions { flex-wrap: wrap; }
  .footer-inner { flex-direction: column; }
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
