:root {
  --bg: #ffffff; --surface: #f4f5fa; --ink: #14161f; --muted: #5b6074; --line: #dfe2ea; --accent: #4f5df5; --on-accent: #ffffff;
  --code-bg: #f4f5fa; --code-ink: #3d4257; --t-comment: #5b6074; --t-tag: #b0235c; --t-attr: #8a4b00; --t-string: #0b6b3a; --t-keyword: #4a3fd0; --t-fn: #0b5cad; --t-num: #9a3412;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141b; --surface: #1a1d27; --ink: #e8eaf2; --muted: #9aa0b4; --line: #2c3040; --accent: #8b95ff; --on-accent: #12141b;
    --code-bg: #0d0f15; --code-ink: #b8bdd0; --t-comment: #8d93a8; --t-tag: #ff8fb3; --t-attr: #f5b97a; --t-string: #7ee0a6; --t-keyword: #aab2ff; --t-fn: #7cc4ff; --t-num: #ffa27a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { --header: 3.5rem; scroll-padding-top: calc(var(--header) + 26px + 1rem); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
:not(pre) > code { padding: 0.1em 0.35em; border-radius: 0.3rem; background: var(--surface); font-size: 0.88em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; padding: 0.5rem 0.75rem; background: var(--bg); }
.wrap { max-width: 74rem; margin: 0 auto; padding: 0 1.25rem; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; box-sizing: border-box; height: var(--header); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1.25rem; background: #14161f; color: #f2f3f8; border-bottom: 1px solid #2c3040; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: inherit; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; text-decoration: none; }
.brand .mark { width: 1.9rem; height: 1.9rem; --accent: #8b95ff; }
.top nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.95rem; }
.top nav a { color: #f2f3f8; text-decoration: none; }
.top nav a:hover { color: #8b95ff; }

/* Hero (dark in both colour schemes) */
.hero { --code-bg: #0d0f15; --code-ink: #b8bdd0; --t-comment: #8d93a8; --t-tag: #ff8fb3; --t-attr: #f5b97a; --t-string: #7ee0a6; --t-keyword: #aab2ff; --t-fn: #7cc4ff; --t-num: #ffa27a; --accent: #8b95ff; --on-accent: #12141b; --surface: #232738; --line: #2c3040; --muted: #a8aec2;
  background: #14161f; color: #f2f3f8; padding: 4.5rem 0 4rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: center; }
@media (min-width: 62rem) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; } }
.kicker { margin: 0 0 1rem; color: var(--accent); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.hero h1 { margin: 0 0 1.25rem; font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; }
.lede { margin: 0 0 1.75rem; max-width: 40rem; color: var(--muted); font-size: 1.15rem; }
.install { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; max-width: 30rem; margin-bottom: 1.25rem; padding: 0.7rem 0.8rem 0.7rem 1rem; border: 1px solid var(--line); border-radius: 0.7rem; background: #0d0f15; }
.install code { flex: 1; min-width: 0; padding: 0; background: none; color: #f2f3f8; font-size: 1rem; overflow-wrap: anywhere; }
.copy { padding: 0.35rem 0.8rem; border: 1px solid #3a3f55; border-radius: 0.45rem; background: #232738; color: #f2f3f8; font: inherit; font-size: 0.85rem; cursor: pointer; }
/* Until the element is live the button would do nothing, so the command stays and the button waits. */
copy-button:not(:state(hydrated)) .copy { display: none; }
.copy:hover { border-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }
.button { display: inline-block; padding: 0.65rem 1.1rem; border: 1px solid var(--line); border-radius: 0.6rem; color: inherit; font-weight: 700; text-decoration: none; }
.button:hover { border-color: var(--accent); }
.button.primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.hero-code { margin: 0; border: 1px solid var(--line); border-radius: 0.9rem; background: var(--code-bg); overflow: hidden; }
.hero-code figcaption { display: flex; justify-content: space-between; padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font: 0.85rem ui-monospace, monospace; }
.hero-code .code { margin: 0; border: 0; border-radius: 0; font-size: 0.76rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* The zebra band */
/* Scrolls with the page until it meets the header, then stays under it as part of the header. */
.stripes { position: sticky; top: var(--header); z-index: 9; height: 26px; background: repeating-linear-gradient(-45deg, #14161f 0 13px, #8b95ff 13px 26px); }

/* Sections */
section { padding: 4.5rem 0; }
section.wrap { padding-left: 1.25rem; padding-right: 1.25rem; }
.band { background: var(--surface); }
section h2 { margin: 0 0 0.75rem; font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; }
.section-lede { max-width: 44rem; margin: 0 0 2.25rem; color: var(--muted); font-size: 1.1rem; }
.more { margin: 2rem 0 0; max-width: 44rem; }
.note { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.92rem; }

/* Code */
.code { margin: 0; padding: 1rem 1.1rem; overflow: auto; border: 1px solid var(--line); border-radius: 0.7rem; background: var(--code-bg); color: var(--code-ink); font-size: 0.82rem; line-height: 1.55; }
.code code { padding: 0; background: none; font-size: inherit; }
.token.comment, .token.prolog, .token.doctype { color: var(--t-comment); }
.token.tag, .token.selector, .token.deleted { color: var(--t-tag); }
.token.attr-name, .token.property, .token.constant, .token.symbol { color: var(--t-attr); }
.token.string, .token.attr-value, .token.template-string, .token.char, .token.inserted { color: var(--t-string); }
.token.keyword, .token.boolean, .token.atrule { color: var(--t-keyword); }
.token.function, .token.class-name, .token.builtin { color: var(--t-fn); }
.token.number, .token.regex { color: var(--t-num); }
.token.punctuation, .token.operator { color: var(--code-ink); }

/* The compiler's output */
.pipeline { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 70rem) { .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { min-width: 0; }
.step h3 { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.5rem; font-size: 1.15rem; }
.step .n { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 0.9rem; }
.step > p:nth-of-type(1) { margin: 0 0 0.6rem; font-size: 0.85rem; color: var(--muted); }
.step .code { max-height: 26rem; }

/* By hand */
.versus { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.versus > *, .uses > *, .start-steps > * { min-width: 0; }
@media (min-width: 60rem) { .versus { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; } }
.versus .count { margin: 0 0 0.6rem; color: var(--muted); }
.versus .count strong { color: var(--ink); font-size: 2rem; letter-spacing: -0.03em; }
.versus .code { max-height: 36rem; }
/* The Zubra source is short and its comments run long: wrap them like the hero does rather than make a reader scroll sideways to finish a sentence. */
.versus .side:last-child .code { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Anywhere and start */
.uses { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 52rem) { .uses { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.uses h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.start-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 1.5rem 0 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 52rem) { .start-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.start-steps li { counter-increment: step; display: flex; flex-direction: column; gap: 0.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 0.8rem; font-weight: 700; }
.start-steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 0.9rem; }
.start-steps li span { color: var(--muted); font-size: 0.95rem; font-weight: 400; }
.start-steps li code { align-self: flex-start; }

/* The gallery */
.group { margin: 2.5rem 0 1rem; font-size: 1.1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--bg); }
.shot { display: block; aspect-ratio: 16 / 10; border-bottom: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.2s; }
.card:hover .shot img { transform: scale(1.02); }
.placeholder { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(-45deg, transparent 0 14px, var(--line) 14px 28px); opacity: 0.6; }
.card .body { display: flex; flex-direction: column; flex: 1; padding: 0.9rem 1rem 1rem; }
.card .body p { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.95rem; }
.card .body h4 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.card .body h4 a { color: var(--ink); text-decoration: none; }
.card .body h4 a:hover { color: var(--accent); }
.card .stack { color: var(--accent) !important; font-size: 0.8rem !important; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.card .links { display: flex; flex-wrap: wrap; gap: 1rem; margin: auto 0 0 !important; font-size: 0.9rem !important; }
.server { color: var(--muted); }

.foot { padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.foot p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 40rem) { section { padding: 3rem 0; } .hero { padding: 3rem 0; } .top nav a:nth-child(n+3):not(:last-child) { display: none; } }
