/* kept.computer: follows docs/design.md v2 and docs/design-kept.md. One file, tokens only. */

@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  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: "Space Grotesk"; src: url("/fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap;
  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: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  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; }
/* Metric-matched fallbacks, so the swap doesn't shift the layout. */
@font-face { font-family: "Inter Fallback"; src: local("Arial"); size-adjust: 107%; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; }
@font-face { font-family: "Space Grotesk Fallback"; src: local("Arial"); size-adjust: 102%; ascent-override: 96%; descent-override: 28%; line-gap-override: 0%; }

:root {
  color-scheme: light dark;
  --bg: #FFFFFF; --surface: #F5F5F5; --border: #E5E5E5; --border-strong: #858585;
  --text: #0A0A0A; --text-2: #5C5C5C;
  /* Monochrome: primary buttons are solid black (white in dark). Blue is only for what Kept points
     to: citations, links, the mark's dot, focus. */
  --primary: #0A0A0A; --on-primary: #FAFAFA;
  --accent: #2F4BE0; --accent-ink: #FFFFFF;
  --danger: #B42318; --ok: #067647; --warn: #B54708;

  --display: "Space Grotesk", "Space Grotesk Fallback", system-ui, sans-serif;
  --sans: "Inter", "Inter Fallback", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --fs-hero: clamp(2.25rem, 1.6rem + 2.5vw, 3.5rem);
  --fs-h2: clamp(1.625rem, 1.2rem + 1vw, 2rem);
  --fs-h3: clamp(1.125rem, 1rem + 0.35vw, 1.25rem);
  --fs-body: clamp(1rem, 0.95rem + 0.15vw, 1.0625rem);
  --fs-small: 0.875rem;
  --fs-label: 0.75rem;

  --gutter: 16px;
  --header-h: 64px;
  --ease-in: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.4, 0, 1, 1);
}
:root[data-theme="dark"] {
  --bg: #0A0A0A; --surface: #141414; --border: #262626; --border-strong: #6B6B6B;
  --text: #FAFAFA; --text-2: #9A9A9A;
  --primary: #FAFAFA; --on-primary: #0A0A0A;
  --accent: #8EA2FF; --accent-ink: #0A0A0A;
  --danger: #FF8A80; --ok: #4ADE80; --warn: #FBBF24;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0A0A; --surface: #141414; --border: #262626; --border-strong: #6B6B6B;
    --text: #FAFAFA; --text-2: #9A9A9A;
    --primary: #FAFAFA; --on-primary: #0A0A0A;
    --accent: #8EA2FF; --accent-ink: #0A0A0A;
    --danger: #FF8A80; --ok: #4ADE80; --warn: #FBBF24;
  }
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-body)/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: var(--accent-ink); }
img, svg { display: block; max-width: 100%; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-hero); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.15; letter-spacing: -0.02em; }
h3 { font-size: var(--fs-h3); line-height: 1.3; }
p, li { text-wrap: pretty; }
p { margin: 0 0 1rem; max-width: 68ch; }
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
code, kbd, pre, .mono { font-family: var(--mono); }
code { font-size: 0.92em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: inherit; }

.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: var(--gutter); top: -100px; z-index: 20; padding: 12px 16px; background: var(--primary); color: var(--on-primary); border-radius: 6px; font: 500 var(--fs-small) var(--sans); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { max-width: 70rem; margin: 0 auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.narrow { max-width: 45rem; }

.label { font: 400 var(--fs-label)/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin: 0 0 1rem; }
.lede { font-size: var(--fs-body); color: var(--text-2); max-width: 60ch; }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-small); }

/* ---- Header: "Kept" at the top of the page, "[•]" once you scroll ---- */
header.site { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color 200ms var(--ease-in); }
header.site.scrolled { border-bottom-color: var(--border); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); }

.brand { position: relative; display: inline-flex; align-items: center; height: 44px; min-width: 64px; color: var(--text); text-decoration: none; }
.brand .word { font: 600 1.5rem/1 var(--display); letter-spacing: -0.02em; transform-origin: 13px 55%;
  transition: opacity 200ms var(--ease-out), transform 400ms var(--ease-in); }
.brand .mark { position: absolute; left: 0; top: 50%; width: 30px; height: 30px; margin-top: -15px; color: var(--text); overflow: visible; }
.brand .mark .dot { fill: var(--accent); }
.brand .mark .l, .brand .mark .r, .brand .mark .dot { transition: transform 400ms var(--ease-in), opacity 200ms var(--ease-in); transform-box: fill-box; transform-origin: center; }
.brand .mark .l { transform: translateX(-10px); opacity: 0; }
.brand .mark .r { transform: translateX(10px); opacity: 0; }
.brand .mark .dot { transform: scale(0); opacity: 0; }
.compact .brand .word { opacity: 0; transform: scale(0.35); }
.compact .brand .mark .l, .compact .brand .mark .r { transform: none; opacity: 1; }
.compact .brand .mark .dot { transform: none; opacity: 1; transition-delay: 80ms; }

nav.site { display: flex; align-items: center; gap: 0.25rem; }
nav.site a, .theme-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.75rem; color: var(--text-2);
  font: 400 var(--fs-small)/1 var(--mono); text-decoration: none; border-radius: 6px; }
nav.site a:hover, .theme-toggle:hover { color: var(--text); }
nav.site a[aria-current="page"] { color: var(--text); }
nav.site a[aria-current="page"]::before { content: "→ "; white-space: pre; color: var(--text); }
nav.site .cta { color: var(--accent); }
.theme-toggle { background: none; border: 0; cursor: pointer; }
@media (max-width: 719px) { nav.site .optional { display: none; } }
@media (max-width: 399px) { nav.site a, .theme-toggle { padding: 0 0.5rem; } }

/* ---- Buttons ---- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 12px 16px; border-radius: 6px;
  font: 500 1rem/1.25 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text); outline: 1px solid transparent;
  transition: background-color 120ms var(--ease-in), border-color 120ms var(--ease-in); }
.button:hover { border-color: var(--text); text-decoration: none; }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.button.primary:hover { background: color-mix(in oklab, var(--primary), var(--bg) 14%); border-color: color-mix(in oklab, var(--primary), var(--bg) 14%); }
.button[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin: 2rem 0 1rem; }

/* ---- Sections: hairlines, not boxes ---- */
main section { border-top: 1px solid var(--border); padding-block: 4rem; }
@media (min-width: 1024px) { main section { padding-block: 6rem; } }
.section-head { display: grid; gap: 0.75rem; margin-bottom: 3rem; max-width: 45rem; }
.section-head .label { margin: 0; }
.section-head p { margin: 0; }

/* ---- Pricing ---- */
.pricing { display: grid; gap: 3rem; }
.pricing { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .pricing { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4rem; align-items: start; } }
.price-card { background: var(--surface); border-radius: 12px; padding: 2rem; outline: 1px solid transparent; }

.price { font: 600 3rem/1 var(--display); letter-spacing: -0.02em; margin: 0; font-variant-numeric: tabular-nums; }
.price span { font: 400 var(--fs-small) var(--sans); letter-spacing: 0; color: var(--text-2); }
.price-alt { margin: 0.5rem 0 1.5rem; color: var(--text-2); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.price-card li { padding: 0.5rem 0; border-top: 1px solid var(--border); font-size: var(--fs-small); }
.plans { display: grid; gap: 0.75rem; }
.plans .button { width: 100%; }

details { border-top: 1px solid var(--border); }
details:last-of-type { border-bottom: 1px solid var(--border); }
summary { cursor: pointer; padding: 1rem 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--text-2); }
details[open] summary::after { content: "−"; }
details p { color: var(--text-2); }

/* ---- Inner pages ---- */
.page { padding-block: 4rem 6rem; }
.page h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); margin-bottom: 1rem; }
.page h2 { font-size: var(--fs-h3); margin: 3rem 0 0.75rem; }
.page ol, .page ul { padding-left: 1.25rem; max-width: 68ch; }
.page li { margin: 0.35rem 0; }
.legal h2 { margin-top: 2.5rem; }
.stack { display: grid; gap: 0.75rem; max-width: 32rem; margin: 1.5rem 0; }
label { font-weight: 500; font-size: var(--fs-small); }
input[type="text"], input[type="email"] { font: 400 1rem/1.25 var(--mono); padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 6px;
  background: var(--bg); color: var(--text); width: 100%; }
input::placeholder { color: var(--text-2); }
.key { font: 500 clamp(1rem, 0.85rem + 0.8vw, 1.375rem)/1.4 var(--mono); padding: 1.25rem 1.5rem; background: var(--surface); border-radius: 12px; margin: 1.5rem 0; word-break: break-all; }
.notice { background: var(--surface); border-radius: 12px; padding: 1rem 1.25rem; max-width: 68ch; }
.error { color: var(--danger); font-weight: 500; }
.error::before { content: "⚠ "; }
.ok-text { color: var(--ok); font-weight: 500; }
.ok-text::before { content: "✓ "; }

/* ---- Footer ---- */
footer.site { border-top: 1px solid var(--border); padding-block: 2rem; color: var(--text-2); font-size: var(--fs-small); }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
footer.site a { color: var(--text-2); }
footer.site a:hover { color: var(--text); }

@media (forced-colors: active) { .button, .answer, .price-card, pre.code { border: 1px solid CanvasText; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}

.top-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 48px; pointer-events: none; }
.spaced { margin-top: 1rem; }

/* =====================================================================
   Home page. One idea: everything happens inside the brackets.
   ===================================================================== */
.home main section { border-top: 0; }
nav.site .nav-cta { margin-left: 0.5rem; min-height: 40px; padding: 0 14px; font: 500 var(--fs-small)/1 var(--sans); color: var(--on-primary); }
nav.site .nav-cta:hover { color: var(--on-primary); }
@media (max-width: 419px) { nav.site .nav-cta { display: none; } }

/* Footnote markers: the page cites its sources the way Kept cites answers. */
.fn { font: 500 0.62em/1 var(--mono); vertical-align: 0.55em; margin-left: 0.2em; text-decoration: none; color: var(--accent); }
.fn:hover { text-decoration: underline; }

/* ---- The stage: hero, then the example inside the brackets ---- */
.stage { position: relative; overflow-x: clip; padding: 4rem 0 5rem !important;
  --bw: clamp(28px, 7vw, 112px); --l0: max(10px, 50vw - 44rem); --dw: min(100vw - 2 * var(--bw) - 7rem, 56rem);
  --tx: calc(50vw - var(--dw) / 2 - 1.25rem - var(--l0) - var(--bw)); }
.stage-inner { position: relative; max-width: 62rem; margin: 0 auto; padding: 3rem clamp(44px, 8vw, 104px); text-align: center; }
/* Static brackets around the hero (narrow screens, reduced motion, browsers without scroll-driven animation). */
.stage-inner::before, .stage-inner::after { content: ""; position: absolute; top: 0; bottom: 0; width: clamp(20px, 5vw, 64px); border: clamp(4px, 0.7vw, 9px) solid var(--text); }
.stage-inner::before { left: max(0px, calc(var(--gutter) - 12px)); border-right: 0; }
.stage-inner::after { right: max(0px, calc(var(--gutter) - 12px)); border-left: 0; }
.big-bracket { display: none; position: absolute; top: 7%; height: 86%; width: var(--bw); overflow: visible; }
.big-bracket path { fill: none; stroke: var(--text); stroke-width: clamp(5px, 0.9vw, 12px); stroke-linecap: square; }
.big-bracket.left { left: var(--l0); }
.big-bracket.right { right: var(--l0); }
.stage-inner .label { margin-bottom: 1.5rem; }
.stage h1 { margin: 0 auto 1.5rem; }
.stage h1 .line { display: block; }
.stage h1 .line > span { display: inline-block; transition: transform 380ms var(--ease-in); }
.stage .bk { color: var(--text); }
.stage .lede { margin: 0 auto; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); }
.stage .actions { justify-content: center; }
.stage .meta { margin: 0 auto; font-size: var(--fs-small); color: var(--text-2); }
/* The one control for the moving word (anything moving over 5 seconds needs one). */
.motion { margin-top: 1.25rem; min-height: 32px; padding: 0 0.5rem; border: 0; background: none; cursor: pointer;
  font: 400 var(--fs-label)/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); border-radius: 6px; }
.motion:hover { color: var(--text); }
/* A quiet dot grid inside the brackets: a repeating pattern, no gradient. */
.stage-inner { isolation: isolate; }
.stage-dots { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--border-strong); opacity: 0.28;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='11' cy='11' r='1.1'/%3E%3C/svg%3E") 0 0 / 22px 22px repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='11' cy='11' r='1.1'/%3E%3C/svg%3E") 0 0 / 22px 22px repeat; }
@media (max-width: 639px) { .stage h1 .line > span:first-child { display: block; } }

/* The word inside the brackets. All words share one cell; JS sets the width and slides the line. */
.rotor { display: inline-grid !important; vertical-align: bottom; text-align: left; overflow: clip; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.rotor > span { grid-area: 1 / 1; justify-self: start; white-space: nowrap; opacity: 0; transform: translateY(105%);
  transition: transform 380ms var(--ease-in), opacity 200ms var(--ease-in); }
.rotor > span.is-on { opacity: 1; transform: none; }
.rotor > span.is-off { opacity: 0; transform: translateY(-105%); transition: transform 300ms var(--ease-out), opacity 160ms var(--ease-out); }

.demo { position: relative; margin: 4rem auto 0; max-width: 70rem; padding-inline: max(var(--gutter), env(safe-area-inset-left)); }
.try-anchor { position: absolute; top: calc(-1 * var(--header-h)); }
.demo-caption { margin: 0.75rem 0 0; font-size: var(--fs-small); color: var(--text-2); max-width: 72ch; }

/* The sequence: wide screens with support and no reduced-motion preference. The stage sticks while its
   wrapper scrolls by: the hero lifts away, the brackets close in, the example rises between them. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 960px) and (min-height: 680px) {
    .stage-wrap { --sequenced: 1; height: 220svh; view-timeline: --stage block; view-timeline-inset: 0px; }
    .stage { position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); overflow: hidden;
      display: grid; place-items: center; padding: 0 !important; }
    .stage-inner, .demo { grid-area: 1 / 1; }
    .stage-inner::before, .stage-inner::after { display: none; }
    .big-bracket { display: block; }
    .demo { width: var(--dw); max-width: none; margin: 0; padding: 0; }
    .stage-inner { z-index: 0; position: static; }
    .stage-dots { top: 7%; bottom: 7%; left: calc(var(--l0) + var(--bw) + 1.5rem); right: calc(var(--l0) + var(--bw) + 1.5rem); }
    .stage-wrap .stage-veil { display: block; z-index: 1; animation: veil linear both; animation-timeline: --stage; animation-range: contain 0% contain 15%; }
    .demo, .big-bracket { z-index: 2; }
    .demo { animation: rise linear both; animation-timeline: --stage; animation-range: contain 15% contain 52%; }
    .big-bracket.left { animation: close-l linear both; animation-timeline: --stage; animation-range: contain 8% contain 52%; }
    .big-bracket.right { animation: close-r linear both; animation-timeline: --stage; animation-range: contain 8% contain 52%; }
  }
}
/* A plain background fades in over the hero text, so the text itself (with its switching word) is never
   inside a scroll-animated layer. Hidden at the start, so it never blocks the hero's links. */
.stage-veil { display: none; position: absolute; inset: 0; background: var(--bg); pointer-events: auto; }
@keyframes veil { 0% { opacity: 0; visibility: hidden; } 1% { visibility: visible; } to { opacity: 1; visibility: visible; } }
@keyframes rise { 0% { opacity: 0; transform: translateY(22vh) scale(0.97); visibility: hidden; } 1% { visibility: visible; } to { opacity: 1; transform: none; visibility: visible; } }
@keyframes close-l { to { transform: translateX(var(--tx)); } }
@keyframes close-r { to { transform: translateX(calc(-1 * var(--tx))); } }

/* ---- The example, drawn like the Kept app ---- */
.k { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--border); border-radius: 12px; background: var(--bg); overflow: hidden; text-align: left; }
@media (min-width: 760px) { .k { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
@media (min-width: 1100px) { .k { grid-template-columns: 12.5rem minmax(0, 1.3fr) minmax(0, 1fr); } }
.k-side { display: none; padding: 1.25rem; background: var(--surface); border-right: 1px solid var(--border); flex-direction: column; gap: 0.25rem; }
@media (min-width: 1100px) { .k-side { display: flex; } }
.k-brand { display: grid; grid-template-columns: auto 1fr; column-gap: 0.4rem; align-items: center; margin: 0 0 1rem; }
.k-brand svg { width: 16px; height: 19px; color: var(--text); }
.k-brand svg circle { fill: var(--accent); }
.k-brand b { font: 600 1.0625rem/1 var(--display); }
.k-brand span { grid-column: 1 / -1; font-size: var(--fs-label); color: var(--text-2); margin-top: 0.35rem; }
.k-nav { display: grid; gap: 0.15rem; margin: 0 0 1.25rem; font: 400 var(--fs-small)/1.6 var(--mono); color: var(--text-2); }
.k-nav span { padding-left: 1rem; } .k-nav .on { padding-left: 0; color: var(--text); }
.k-side .label { margin: 0 0 0.5rem; }
.k-sources { list-style: none; margin: 0; padding: 0; font-size: var(--fs-small); }
.k-sources li { padding: 0.3rem 0 0.3rem 0.6rem; border-left: 2px solid transparent; transition: border-color 200ms var(--ease-in); }
.k-sources li.cited { border-left-color: var(--accent); }
.k-line { margin: auto 0 0; padding-top: 1rem; border-top: 1px solid var(--border); font: 400 var(--fs-label)/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.k-main { padding: 1.5rem; min-width: 0; }
.k-try { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
.chip { font: 400 var(--fs-small)/1.3 var(--sans); padding: 7px 11px; min-height: 34px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text); cursor: pointer; text-align: left; transition: border-color 120ms var(--ease-in), background-color 120ms var(--ease-in); }
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.k-entry { border-top: 1px solid var(--border); padding-top: 1.25rem; }
.k-entry .label { margin-bottom: 0.4rem; }
.k-q { font: 600 clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem)/1.25 var(--display); letter-spacing: -0.01em; margin-bottom: 0.75rem; text-wrap: balance; }
.k-a { margin-bottom: 1.25rem; }
.k-a.fresh, .k-cites.fresh { animation: fade-up 400ms var(--ease-in) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }
.k-status { margin: 0; font: 400 var(--fs-label)/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.cite { font: 500 0.9em var(--mono); }
.cite.on { background: var(--accent); color: var(--accent-ink); text-decoration: none; border-radius: 3px; padding: 0 2px; }
.k-cites { list-style: none; margin: 0; padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); }
@media (min-width: 760px) { .k-cites { border-top: 0; border-left: 1px solid var(--border); } }
.k-cites li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); column-gap: 0.5rem; padding: 0.9rem 0 0.9rem 0.75rem; border-top: 1px solid var(--border); box-shadow: inset 2px 0 0 transparent; transition: box-shadow 200ms var(--ease-in); }
.k-cites li:first-child { border-top: 0; }
.k-cites li.on { box-shadow: inset 2px 0 0 var(--accent); }
.k-cites li > :not(.n) { grid-column: 2; }
.k-cites .n { font: 400 var(--fs-small)/1.5 var(--mono); color: var(--text-2); }
.k-cites li.on .n { color: var(--accent); }
.k-cites .t { font-weight: 600; font-size: var(--fs-small); }
.k-cites .m { font: 400 var(--fs-label)/1.5 var(--mono); color: var(--text-2); overflow-wrap: anywhere; }
.k-cites q { display: block; margin: 0.4rem 0; font-size: var(--fs-small); color: var(--text-2); }
.k-cites .open { font-size: var(--fs-small); }
.k-cites .none { grid-template-columns: 1fr; padding-left: 0; color: var(--text-2); font-size: var(--fs-small); }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 0.5rem; vertical-align: 0.1em; }
.dot.warn { background: var(--warn); }

/* ---- Bands below: one framed column, hairlines, big headings ---- */
.band { border-top: 1px solid var(--border); padding: 0 !important; }
.frame { border-inline: 1px solid var(--border); padding-block: clamp(4rem, 3rem + 4vw, 7rem); }
@media (min-width: 640px) { .frame { padding-inline: clamp(24px, 4vw, 64px); } }
.band:last-of-type { border-bottom: 1px solid var(--border); }
.head { display: grid; gap: 1rem; max-width: 44rem; margin-bottom: 3rem; align-content: start; }
.head p { margin: 0; }
.head h2, .end h2 { font-size: clamp(1.875rem, 1.3rem + 2vw, 3rem); line-height: 1.08; letter-spacing: -0.03em; }
.split { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 4rem; align-items: start; } .split .head { margin-bottom: 0; } }

pre.code { margin: 0; padding: 1.5rem; background: var(--surface); border-radius: 12px; overflow-x: auto; outline: 1px solid transparent;
  font: 400 var(--fs-small)/1.75 var(--mono); color: var(--text); white-space: pre; }
pre.code .c { color: var(--text-2); }
.check { margin-top: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: grid; gap: 0.75rem; }
.check-title { font-weight: 600; }
.check pre.code { padding: 1rem 1.25rem; border-radius: 6px; }

.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--text); }
.ledger li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.25rem; padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
@media (min-width: 560px) { .ledger li { grid-template-columns: 9.5rem minmax(0, 1fr); column-gap: 1.5rem; } .ledger li > :not(.when) { grid-column: 2; } }
.ledger .when { font: 400 var(--fs-label)/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.ledger b { font-weight: 600; }
.ledger .what { font-size: var(--fs-small); color: var(--text-2); }
.ledger .payload { margin: 0.5rem 0 0; padding: 0.75rem 1rem; background: var(--surface); border-radius: 6px; overflow-x: auto;
  font: 400 var(--fs-label)/1.7 var(--mono); color: var(--text); white-space: pre; }
.ledger .never { border-bottom: 1px solid var(--text); }
.ledger .never .when { color: var(--ok); }
.ledger .never .when::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 0.5rem; vertical-align: 0.1em; }

.faq { margin-top: 1rem; }
.home .price-card { background: transparent; border: 1px solid var(--text); border-radius: 12px; padding: 2rem; }
.home .price { font-size: clamp(3rem, 2.4rem + 2vw, 4.5rem); }
.home .price span { font-size: var(--fs-body); }

.end .frame { text-align: center; }
.end h2 { max-width: 18ch; margin: 0 auto 1rem; }
.end .lede { margin: 0 auto; }
.end .actions { justify-content: center; }

/* Sources for the page, in the same shape as Kept's citation rows. */
.sources-band .frame { padding-block: 3rem 4rem; }
.sources-band h2.label { margin: 0 0 1.25rem; font-family: var(--mono); font-weight: 400; letter-spacing: 0.08em; }
.sources { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 2.5rem; }
@media (min-width: 860px) { .sources { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sources li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); column-gap: 0.5rem; padding: 1rem 0; border-top: 1px solid var(--border); font-size: var(--fs-small); scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.sources li > :not(.n) { grid-column: 2; }
.sources .n { font-family: var(--mono); color: var(--text-2); }
.sources .t { font-weight: 600; }
.sources q { display: block; margin: 0.35rem 0; color: var(--text-2); }
.sources li:target { box-shadow: inset 2px 0 0 var(--accent); padding-left: 0.5rem; }

/* ---- Docs pages ---- */
.docs h1 { margin-top: 0.25rem; }
.docs h3 { font-size: var(--fs-body); margin: 0 0 0.75rem; }
.docs :not(pre) > code { font-size: 0.88em; padding: 0.1em 0.35em; border-radius: 4px; background: var(--surface); }
.docs pre.code { margin: 0; }
.table-scroll { overflow-x: auto; }
table.docs-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
table.docs-table th, table.docs-table td { text-align: left; vertical-align: top; padding: 0.75rem 1rem 0.75rem 0; border-bottom: 1px solid var(--border); }
table.docs-table th { font: 400 var(--fs-label)/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); border-bottom-color: var(--text); }
table.docs-table td:first-child { white-space: nowrap; }

/* ---- The grid: the frame's two column lines run the whole page, through the hero, and a small
   cross marks where each band's rule meets them. Figure labels are bracketed, like the mark. ---- */
.home main { position: relative; overflow-x: clip; }
.home main::before { content: ""; position: absolute; inset: 0; max-width: 70rem; margin-inline: auto; pointer-events: none;
  border-inline: 1px solid var(--border); }
.home .band > .frame { position: relative; }
.home .band > .frame::before, .home .band > .frame::after { content: ""; position: absolute; top: -6px; width: 11px; height: 11px; pointer-events: none;
  background: linear-gradient(var(--border-strong), var(--border-strong)) center / 1px 100% no-repeat,
              linear-gradient(var(--border-strong), var(--border-strong)) center / 100% 1px no-repeat; }
.home .band > .frame::before { left: -6px; }
.home .band > .frame::after { right: -6px; }
.fig { font: 400 var(--fs-label)/1.4 var(--mono); letter-spacing: 0.04em; color: var(--text-2); margin: 0 0 1rem; }
.figure { min-width: 0; }

/* ---- Works with: a hairline grid of names, no logos ---- */
.works-band .frame { padding-block: 2.5rem 3rem; }
.works { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--border); }
.works-kind { margin: 0; padding: 1rem 0 0.5rem; font: 400 var(--fs-label)/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.works-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.works-row li { display: flex; flex-direction: column; gap: 0.15rem; padding: 1rem; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  font: 500 var(--fs-small)/1.3 var(--sans); }
.works-row li:nth-child(2n) { border-right: 0; }
.works-row li:last-child:nth-child(odd) { grid-column: span 2; border-right: 0; }
.works-row li span { font: 400 var(--fs-label)/1.3 var(--mono); color: var(--text-2); }
@media (min-width: 760px) {
  .works { grid-template-columns: 7.5rem minmax(0, 1fr); }
  .works-kind { padding: 1.25rem 1rem 0 0; border-bottom: 1px solid var(--border); }
  .works-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .works-row li { padding: 1.25rem 1rem; }
  .works-row li:nth-child(2n) { border-right: 1px solid var(--border); }
  .works-row li:last-child:nth-child(odd) { grid-column: auto; }
  .works-row li:last-child { border-right: 0; }
}

/* ---- The terminal ---- */
.term { margin: 0; min-width: 0; }
.term-window { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 1rem; padding: 0 0.75rem; border-bottom: 1px solid var(--border); min-height: 44px; }
.term-lights { display: flex; gap: 6px; }
.term-lights i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--border-strong); }
.term-tabs { display: flex; gap: 0.25rem; overflow-x: auto; }
.term-tabs button { appearance: none; border: 0; background: none; color: var(--text-2); min-height: 44px; padding: 0 0.75rem; cursor: pointer;
  font: 400 var(--fs-label)/1 var(--mono); letter-spacing: 0.04em; box-shadow: inset 0 -1px 0 transparent; }
.term-tabs button:hover { color: var(--text); }
.term-tabs button[aria-selected="true"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--text); }
.term-body { margin: 0; padding: 1.25rem 1.5rem 1.5rem; overflow-x: auto; font: 400 var(--fs-small)/1.75 var(--mono); color: var(--text); white-space: pre; }
.term-body + .term-body { border-top: 1px solid var(--border); }
.term-body .c { color: var(--text-2); }
.term-body .p { color: var(--text-2); user-select: none; }
.term-body[hidden] { display: none; }
.term figcaption { margin-top: 0.75rem; }
@media (forced-colors: active) { .term-tabs button[aria-selected="true"] { border-bottom: 2px solid CanvasText; } }

/* The tools band: the words on top, the terminal full width underneath, so replies don't wrap. */
.tools .head { margin-bottom: 2.5rem; }
@media (min-width: 960px) { .tools .head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 4rem; max-width: none; }
  .tools .head h2 { grid-row: span 3; } }
