/* Krate website, new design: one stylesheet for every page.
   Tokens first, then the header and footer every page shares, then the
   parts pages are built from. Light by default, dark under
   [data-theme="dark"]; the choice is kept in localStorage 'krate-theme'.
   Font: Geist, variable, served from /fonts/. Moved in from the design
   handoff of 2026-10-04 (krate-redesign/preview/experiments/site/kit). */
@font-face { font-family: "Geist"; src: url("/fonts/geist-var-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #fbfbfd; --soft: #f5f5f7; --s1: #fff; --s2: #f5f5f7; --s3: #ececf0;
  --ink: #1c1c1e; --ink-2: #52525b; --ink-3: #8a8a92; --ink-4: #b4b4bb; --mute: #6b6b72;
  --line: #ececee; --line-2: #e2e2e6; --hair: rgba(24,24,27,.07);
  --accent: #3d6df0; --accent-soft: #edf2fe; --violet: #7c5ce8; --orange: #e8873f; --pink: #d6578f;
  --green: #22a35a; --green-soft: #e8f8ee; --danger: #e5484d; --danger-soft: #fdecec; --warn: #b7791f; --warn-soft: #fdf3e2;
  --btn: #0d0d0d; --btn-h: #2b2b2b; --btn-ink: #fff;
  --sh-1: 0 0 0 1px var(--hair), 0 1px 2px rgba(24,24,27,.04), 0 8px 24px -14px rgba(24,24,27,.14);
  --sh-2: 0 0 0 1px var(--hair), 0 24px 50px -28px rgba(24,24,27,.28);
  --ease: cubic-bezier(.22,1,.36,1); --spring: cubic-bezier(.34,1.56,.64,1);
  --w: 1040px; --w-n: 720px; --hd: 68px;
}
:root[data-theme="dark"] { color-scheme: dark;
  --bg: #08080a; --soft: #111113; --s1: #18181b; --s2: #202024; --s3: #2a2a2f;
  --ink: #f4f4f5; --ink-2: #a1a1aa; --ink-3: #7c7c85; --ink-4: #4e4e56; --mute: #8e8e96;
  --line: #232327; --line-2: #2c2c31; --hair: rgba(255,255,255,.08);
  --accent: #6f94ff; --accent-soft: rgba(111,148,255,.13); --violet: #a38dff; --orange: #f39c5b; --pink: #ee7cad;
  --green: #4ade80; --green-soft: rgba(74,222,128,.12); --danger: #ff6b6f; --danger-soft: rgba(255,107,111,.12); --warn: #f0b860; --warn-soft: rgba(240,184,96,.12);
  --btn: #f4f4f5; --btn-h: #fff; --btn-ink: #08080a;
  --sh-1: 0 0 0 1px var(--hair), 0 10px 30px -16px rgba(0,0,0,.7);
  --sh-2: 0 0 0 1px var(--hair), 0 30px 70px -30px rgba(0,0,0,.85);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hd) + 16px); }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.55 Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.006em; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background .4s var(--ease), color .4s var(--ease); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
svg, img, video { display: block; max-width: 100%; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; } /* scripts hide and show with the attribute; no component may override it */

/* ---------------------------------------------------------------- header (same on every page) */
.hd { position: sticky; top: 0; z-index: 50; height: var(--hd); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 32px; background: color-mix(in srgb, var(--bg) 80%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); transition: box-shadow .3s; }
.hd.scrolled { box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 9px; min-height: 40px; font-weight: 600; font-size: 17px; letter-spacing: -.035em; justify-self: start; }
.brand img { width: 26px; height: 26px; }
.menu { display: flex; gap: 2px; position: relative; }
.mi { height: 32px; padding: 0 12px; border-radius: 9px; display: inline-flex; align-items: center; font-size: 14px; color: var(--ink-2); transition: background .2s, color .2s; }
.mi:hover, .mi.open, .mi[aria-current="page"] { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); }
.hr { justify-self: end; display: flex; align-items: center; gap: 6px; }
.thm, .burger { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); transition: background .2s, color .2s; }
.thm:hover, .burger:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.thm .moon { display: none; } :root[data-theme="dark"] .thm .sun { display: none; } :root[data-theme="dark"] .thm .moon { display: block; }
.signin { height: 38px; padding: 0 12px; display: inline-flex; align-items: center; font-size: 14px; color: var(--ink-2); border-radius: 999px; transition: color .2s, background .2s; }
.signin:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.cta { height: 38px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 500; color: var(--btn-ink); background: var(--btn); transition: background .2s; }
.cta:hover { background: var(--btn-h); }
.burger { display: none; }
.drawer { position: absolute; top: 44px; left: 0; width: 220px; border-radius: 16px; padding: 10px 8px; background: color-mix(in srgb, var(--s1) 92%, transparent); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: 0 0 0 1px var(--hair), 0 18px 40px -12px rgba(0,0,0,.2); overflow: hidden; opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: 50% 0; pointer-events: none; transition: opacity .2s var(--ease), transform .3s var(--ease), left .35s var(--ease), height .35s var(--ease), width .35s var(--ease); }
.drawer.on { opacity: 1; transform: none; pointer-events: auto; }
.drawer .set { display: none; } .drawer .set.on { display: block; animation: setIn .32s var(--ease); }
@keyframes setIn { from { opacity: 0; transform: translateY(4px); } }
.drawer a { display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13.5px; color: var(--ink); white-space: nowrap; transition: background .15s; }
.drawer a:hover { background: var(--s2); }
.ext { opacity: .5; font-size: .9em; }
/* the menu on a phone */
.mnav { position: fixed; inset: var(--hd) 0 0; z-index: 49; padding: 12px 20px 40px; background: var(--bg); overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s var(--ease), transform .35s var(--ease), visibility 0s .25s; }
.mnav.on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mnav h6 { margin: 18px 0 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.mnav a { display: block; padding: 9px 0; font-size: 19px; letter-spacing: -.02em; border-bottom: 1px solid var(--line); }
@media (max-width: 1060px) { .menu { display: none; } .hd { grid-template-columns: 1fr auto; padding: 0 16px 0 20px; } .burger { display: grid; } .signin { display: none; } }

/* ---------------------------------------------------------------- layout */
.wrap { width: min(var(--w), 100% - 48px); margin: 0 auto; }
.wrap.n { width: min(var(--w-n), 100% - 48px); }
.sec { padding: 96px 0 0; }
.sec.t { padding-top: 64px; }
.center { text-align: center; }
.grow { flex: 1; }

/* page openers */
.ph { padding: 84px 0 0; text-align: center; }
.ph.l { text-align: left; }
.eye { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 5px; border-radius: 99px; font-size: 13px; color: var(--ink-2); background: var(--s1); box-shadow: var(--sh-1); }
.pill img { width: 20px; height: 20px; } .pill b { font-weight: 600; color: var(--ink); }
h1, .h1 { margin-top: 14px; font-size: clamp(36px, 4.4vw, 58px); line-height: 1.05; font-weight: 500; letter-spacing: -.048em; text-wrap: balance; }
.ph.sm h1 { font-size: clamp(32px, 3.6vw, 46px); }
.lede { margin: 18px auto 0; max-width: 560px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: var(--mute); letter-spacing: -.015em; text-wrap: pretty; }
.ph.l .lede { margin-left: 0; }
.acts { margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 22px; }
.ph.l .acts { justify-content: flex-start; }
.meta { margin-top: 14px; font-size: 13px; color: var(--ink-3); }
h2, .h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; font-weight: 500; letter-spacing: -.04em; text-wrap: balance; }
h3 { font-size: 19px; line-height: 1.3; font-weight: 500; letter-spacing: -.02em; }
.sh { max-width: 640px; }
.sh.center { margin: 0 auto; }
.sh p { margin-top: 12px; font-size: 16.5px; color: var(--mute); }

/* buttons */
.btn { height: 44px; padding: 0 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s, transform .2s var(--ease); }
.btn svg { width: 14px; height: 14px; flex: none; }
.btn.dark { color: var(--btn-ink); background: var(--btn); } .btn.dark:hover { background: var(--btn-h); }
.btn.ghost { color: var(--ink); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line-2); } .btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--ink-4); }
.btn.blue { color: #fff; background: var(--accent); } .btn.blue:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.link { padding: 0 4px; color: var(--ink); } .btn.link svg { transition: transform .25s var(--ease); } .btn.link:hover svg { transform: translateX(3px); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn[disabled], .btn.off { opacity: .45; pointer-events: none; }
.btn:active { transform: scale(.97); }

/* cards and grids */
.g2, .g3, .g4 { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; border-radius: 22px; padding: 26px; background: var(--s1); box-shadow: var(--sh-1); }
.card.soft { background: var(--soft); box-shadow: none; }
.card.link { transition: box-shadow .3s, transform .45s var(--ease); } .card.link:hover { box-shadow: var(--sh-2); transform: translateY(-3px); }
.card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; color: var(--accent); background: var(--accent-soft); }
.card .ic svg { width: 20px; height: 20px; }
.card h3 + p, .card p { margin-top: 8px; font-size: 14.5px; line-height: 1.6; color: var(--mute); }
.card .more { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--accent); }
.shot { border-radius: 20px; padding: 7px; background: color-mix(in srgb, var(--s1) 72%, transparent); box-shadow: var(--sh-2); }
.shot > img, .shot > video { width: 100%; border-radius: 14px; box-shadow: 0 0 0 1px var(--hair); }
/* numbers */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stat { padding: 22px 22px 20px; border-radius: 20px; background: var(--soft); }
.stat b { display: block; font-size: clamp(30px, 3vw, 42px); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.stat span { display: block; margin-top: 8px; font-size: 13.5px; color: var(--mute); }

/* a page with a table of contents on the side (legal, long reads) */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: calc(var(--hd) + 24px); }
.toc h6 { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-bottom: 10px; }
.toc a { display: block; padding: 5px 0 5px 12px; font-size: 13.5px; color: var(--ink-3); border-left: 1.5px solid var(--line); transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); } .toc a.on { color: var(--ink); border-left-color: var(--ink); }
/* long text */
.prose { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: 52px; font-size: 26px; color: var(--ink); line-height: 1.2; }
.prose h3 { margin-top: 32px; font-size: 18px; color: var(--ink); }
.prose h2 + *, .prose h3 + * { margin-top: 10px; }
.prose strong, .prose b { font-weight: 600; color: var(--ink); }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 22px; } .prose li + li { margin-top: 6px; } .prose li::marker { color: var(--ink-4); }
.prose code, code.k { font: 500 .88em ui-monospace, "SF Mono", Menlo, monospace; padding: 2px 6px; border-radius: 6px; background: var(--s2); color: var(--ink); }
.prose pre, pre.k { padding: 16px 18px; border-radius: 14px; background: #0d0d10; color: #d4d4dc; font: 13px/1.65 ui-monospace, "SF Mono", Menlo, monospace; overflow-x: auto; }
.prose pre code { padding: 0; background: none; color: inherit; }
.prose blockquote { padding: 4px 0 4px 18px; border-left: 2px solid var(--line-2); color: var(--mute); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.updated { font-size: 13px; color: var(--ink-3); }
/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.tbl td:first-child { color: var(--ink); font-weight: 500; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tblw { border-radius: 18px; background: var(--s1); box-shadow: var(--sh-1); overflow-x: auto; }
/* notes */
.call { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); background: var(--soft); }
.call .ci { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--accent); }
.call.ok { background: var(--green-soft); } .call.ok .ci { color: var(--green); }
.call.warn { background: var(--warn-soft); } .call.warn .ci { color: var(--warn); }
.call.bad { background: var(--danger-soft); } .call.bad .ci { color: var(--danger); }
/* questions */
.qa { border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 20px 2px; font-size: 17px; font-weight: 500; letter-spacing: -.02em; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; flex: none; margin-left: auto; width: 12px; height: 12px; background: linear-gradient(currentColor 0 0) center / 12px 1.6px no-repeat, linear-gradient(currentColor 0 0) center / 1.6px 12px no-repeat; color: var(--ink-3); transition: transform .35s var(--ease); }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa .ans { padding: 0 2px 22px; max-width: 680px; font-size: 15.5px; line-height: 1.7; color: var(--mute); }
.qa .ans > * + * { margin-top: 10px; }
.qa .ans a { color: var(--accent); }
/* forms */
.form { display: grid; gap: 16px; }
.fld { display: grid; gap: 7px; }
.fld > span, .fld label { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.fld small { font-size: 12.5px; color: var(--ink-3); }
.inp, .form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .form select, .form textarea { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 0; outline: 0; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 15px; transition: box-shadow .2s; }
.form textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.inp:focus, .form input:focus, .form select:focus, .form textarea:focus { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.chk { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-2); }
.chk input { margin-top: 3px; accent-color: var(--accent); }
/* a small centered panel (sign in, done screens) */
.panel { width: min(420px, 100% - 32px); margin: 72px auto 0; padding: 36px 32px 32px; border-radius: 26px; background: var(--s1); box-shadow: var(--sh-2); text-align: center; }
.panel .mk { width: 52px; height: 52px; margin: 0 auto 18px; }
.panel h1 { margin-top: 0; font-size: 28px; letter-spacing: -.035em; }
.panel p { margin-top: 8px; font-size: 15px; color: var(--mute); }
.panel .stack { display: grid; gap: 10px; margin-top: 24px; }
.panel .stack .btn { width: 100%; }
.panel .fine { margin-top: 18px; font-size: 12.5px; color: var(--ink-3); }
.or { display: flex; align-items: center; gap: 12px; margin: 6px 0; font-size: 12.5px; color: var(--ink-3); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* tags */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--s2); }
.tag.ok { color: var(--green); background: var(--green-soft); } .tag.blue { color: var(--accent); background: var(--accent-soft); } .tag.warn { color: var(--warn); background: var(--warn-soft); }
.kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; font: 500 12px Geist, sans-serif; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 0 var(--line-2); }
/* closing band and footer */
.band { width: min(1240px, 100% - 48px); margin: 110px auto 0; border-radius: 26px; background: var(--soft); padding: 56px 100px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.band h2 { font-size: 26px; letter-spacing: -.03em; }
.band p { margin-top: 6px; font-size: 15px; color: var(--mute); }
.foot { margin: 110px 0 0; border-top: 1px solid var(--line); padding: 50px 32px 70px; display: grid; grid-template-columns: 1fr repeat(5, 160px); gap: 30px; }
.foot .fm img { width: 30px; height: 30px; }
.foot h5 { font-size: 13.5px; font-weight: 400; color: var(--ink-3); margin-bottom: 16px; }
.foot a { display: block; font-size: 13.5px; margin-bottom: 11px; color: var(--ink-2); transition: color .2s; }
.foot a:hover { color: var(--ink); }
.copy { grid-column: 1 / -1; margin-top: 26px; display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
/* arrival */
/* gated on .js (set by the head script) so a reader without scripts sees everything */
.js .rv { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform 1s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }
.ph > *, .panel { animation: up .9s var(--ease) both; }
.ph > :nth-child(2) { animation-delay: .05s; } .ph > :nth-child(3) { animation-delay: .1s; } .ph > :nth-child(4) { animation-delay: .15s; } .ph > :nth-child(n+5) { animation-delay: .2s; }
@keyframes up { from { opacity: 0; transform: translateY(18px); } }

@media (max-width: 960px) { .g3, .g4, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .doc { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } .foot { grid-template-columns: 1fr 1fr; } .foot .fm { grid-column: 1 / -1; } }
@media (max-width: 680px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .band { flex-direction: column; align-items: flex-start; padding: 40px 28px; } .ph { padding-top: 56px; } .sec { padding-top: 72px; } .card { padding: 22px; } }
/* phones: a thumb needs 44px. Pages on this kit skip the generic block that
   scripts/ensure-touch-targets.py adds at deploy, so the kit carries its own,
   sized to its own parts: stacked footer links stay stacked. */
@media (pointer: coarse) {
  .mi, .signin, .cta, .btn, .btn.sm, .thm, .burger, .drawer a, .toc a { min-height: 44px; }
  .thm, .burger { width: 44px; height: 44px; }
  .mnav a { min-height: 48px; display: flex; align-items: center; padding: 0; }
  .foot a { min-height: 44px; display: flex; align-items: center; margin-bottom: 0; }
  .qa summary { min-height: 48px; }
  .chk { min-height: 44px; align-items: center; }
  .chk input { margin-top: 0; width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .js .rv { opacity: 1; transform: none; } }
