/* Self-hosted variable fonts (SIL Open Font License, see /fonts/OFL-*.txt), the same as michaelhradek.cz. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/fonts/newsreader-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/fonts/newsreader-latin.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --bg: #f6f3ee;
  --bg-alt: #ece7df;
  --surface: #fffdf9;
  --ink: #14181f;
  --ink-soft: #4a5260;
  --line: #d9d2c6;
  --accent: #a8401d;
  --accent-ink: #ffffff;
  --code-bg: #fffdf9;
  --tok-comment: #6b7280;
  --tok-annotation: #a8401d;
  --tok-keyword: #1d4ed8;
  --tok-string: #15803d;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1120px;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101319;
    --bg-alt: #161a22;
    --surface: #1a1f28;
    --ink: #ece8e1;
    --ink-soft: #a7adb8;
    --line: #2a303b;
    --accent: #f08a5d;
    --accent-ink: #15110e;
    --code-bg: #0c0f14;
    --tok-comment: #8b93a1;
    --tok-annotation: #f08a5d;
    --tok-keyword: #7aa2f7;
    --tok-string: #8bd49c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

section[id] { scroll-margin-top: 72px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code { font: 0.88em/1.5 var(--mono); }
p code, li code, figcaption code { background: var(--bg-alt); padding: 0.1em 0.35em; border-radius: 5px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 21px/1 var(--serif); letter-spacing: -0.01em; }
nav { display: flex; align-items: center; gap: 24px; font-size: 15px; }
nav a { text-decoration: none; color: var(--ink-soft); }
nav a:hover { color: var(--ink); }
@media (max-width: 720px) {
  nav { gap: 4px; font-size: 14px; }
  nav a:not(.btn) { padding: 10px 7px; }
  nav .btn { margin-left: 6px; }
}
@media (max-width: 460px) { nav a[href="#features"] { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--accent);
  text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1;
}
.btn:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); filter: none; }
nav .btn-small, nav .btn-small:hover { padding: 8px 14px; font-size: 14px; color: var(--accent-ink); }

/* Hero */
.hero { padding: 72px 24px 64px; }
.eyebrow { margin: 0 0 16px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
h1 { font: 500 clamp(40px, 6.4vw, 72px)/1.05 var(--serif); letter-spacing: -0.02em; margin: 0; max-width: 16ch; }
h1 em { font-style: italic; color: var(--accent); }
.lede { font-size: 19px; color: var(--ink-soft); max-width: 62ch; margin: 24px 0 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.release { margin: 20px 0 0; font-size: 14px; color: var(--ink-soft); }
.release strong { color: var(--ink); font-weight: 600; }

/* Pipeline */
.pipeline { margin: 56px 0 0; }
.pipeline ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.pipeline li {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 14px; text-align: center; display: flex; flex-direction: column; gap: 4px; justify-content: center;
}
.pipeline li strong { font-size: 15px; font-weight: 600; }
.pipeline li span { font: 12.5px/1.4 var(--mono); color: var(--ink-soft); }
.pipeline li.hl { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.pipeline li + li::before {
  content: "→"; position: absolute; left: -24px; top: 50%; transform: translateY(-50%);
  width: 20px; text-align: center; color: var(--ink-soft); font-size: 18px;
}
.pipeline figcaption { margin-top: 16px; font-size: 14px; color: var(--ink-soft); }
@media (max-width: 860px) {
  .pipeline ol { grid-template-columns: 1fr; gap: 22px; max-width: 360px; }
  .pipeline li + li::before { content: "↓"; left: 50%; top: -21px; transform: translateX(-50%); }
}

/* Sections */
.band { background: var(--bg-alt); padding: 72px 0; }
.section-title { font: 500 clamp(28px, 3.6vw, 38px)/1.15 var(--serif); letter-spacing: -0.01em; margin: 0 0 32px; }
.intro { color: var(--ink-soft); max-width: 70ch; margin: -12px 0 28px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.features article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.features h3 { font: 600 20px/1.25 var(--serif); margin: 0 0 8px; }
.features p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

.steps { padding: 72px 24px; }
@media (max-width: 600px) { .steps { padding: 56px 16px; } }
.step + .step { margin-top: 40px; }
.step h3 { display: flex; align-items: center; gap: 12px; font: 600 21px/1.3 var(--serif); margin: 0 0 14px; }
.num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font: 600 15px/1 var(--sans); flex: none;
}
.step > p, .note { color: var(--ink-soft); max-width: 75ch; }
.note { font-size: 15px; margin: 12px 0 0; }

/* Code */
pre {
  position: relative; margin: 0; background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.6; tab-size: 4;
}
pre code { font-size: inherit; line-height: inherit; }
.file { margin: 0 0 8px; font: 13px/1.4 var(--mono); color: var(--ink-soft); }
.tok-comment { color: var(--tok-comment); font-style: italic; }
.tok-annotation { color: var(--tok-annotation); }
.tok-keyword { color: var(--tok-keyword); }
.tok-string { color: var(--tok-string); }
.copy {
  position: absolute; top: 10px; right: 10px; font: 600 12px/1 var(--sans); padding: 7px 10px; border-radius: 8px;
  background: var(--surface); color: var(--ink-soft); border: 1px solid var(--line); cursor: pointer; opacity: 0; transition: opacity .15s;
}
pre:hover .copy, .copy:focus-visible { opacity: 1; }
@media (hover: none) { .copy { opacity: 1; } }

.tablist { display: flex; gap: 6px; margin-bottom: 14px; }
.tablist button {
  font: 600 14px/1 var(--sans); padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink-soft); border: 1px solid var(--line);
}
.tablist button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.panel + .panel { margin-top: 24px; }
.tabs.js .panel + .panel { margin-top: 0; }
.tabs:not(.js) .tablist { display: none; }

.compare { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }
.compare > div { min-width: 0; }
.compare pre { font-size: 13px; }
@media (max-width: 900px) { .compare { grid-template-columns: 1fr; } }

/* Links */
.resources { padding: 72px 24px; }
@media (max-width: 600px) { .resources { padding: 56px 16px; } }
.links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 700px) { .links { grid-template-columns: 1fr; } }
.links a {
  display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 16px 20px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.links a:hover { border-color: var(--accent); color: inherit; }
.links strong { font-weight: 600; }
.links a:hover strong { color: var(--accent); }
.links span { font-size: 14.5px; color: var(--ink-soft); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--ink-soft); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-inner p { margin: 0; }

/* 404 */
.notfound { padding: 120px 24px; text-align: center; }
.notfound h1 { margin: 0 auto; }
.notfound p { color: var(--ink-soft); }
