/* ==========================================================================
   kumulativ.com — set in the "Maison" design system the apps share:
   neutral linen/ink palette on paper, Google Sans for the interface,
   EB Garamond for display and for anything meant to be read at length,
   Space Mono for the technical layer. One accent, used sparingly.
   Hand-written CSS. No frameworks. Follows the system theme like the apps.
   ========================================================================== */

@font-face { font-family: "Google Sans Variable"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/static/fonts/google-sans-normal.woff2) format("woff2"); }
@font-face { font-family: "Google Sans Variable"; font-style: italic; font-weight: 300 700; font-display: swap; src: url(/static/fonts/google-sans-italic.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond Variable"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/static/fonts/eb-garamond-normal.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond Variable"; font-style: italic; font-weight: 400 800; font-display: swap; src: url(/static/fonts/eb-garamond-italic.woff2) format("woff2"); }
@font-face { font-family: "Space Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/space-mono-400.woff2) format("woff2"); }
@font-face { font-family: "Space Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/space-mono-700.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --font-sans: "Google Sans Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "EB Garamond Variable", ui-serif, Georgia, serif;
  --font-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  --linen-100: #f4f4f5;
  --linen-200: #e4e4e7;
  --linen-300: #c5c5c8;

  --ink-300: #adadb0;
  --ink-400: #88888a;
  --ink-500: #6a6a6c;
  --ink-600: #51514f;
  --ink-700: #38383a;
  --ink-800: #28282a;
  --ink-900: #1a1a1c;

  --paper: #f5f5f6;
  --paper-2: #efeff0;
  --card: #fbfbfc;
  --card-edge: #e2e2e5;

  --accent: #4a4a4c;
  --accent-2: #6a6a6c;
  --sage: #5a6b5d;
  --rust: #a85533;
  --gold: #b8985a;
  --plum: #6b4858;
  --iron: #4a5560;
  --good: #5a7a5d;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-float: 0 18px 40px -24px rgba(26, 26, 28, 0.35);

  --shell: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(2.75rem, 5vw, 4.5rem);
}

/* The dark palette is the apps' own; a section can opt into it with .dark. */
.dark, :root[data-theme="dark"] {
  color-scheme: dark;
  --linen-100: #1d1d1f;
  --linen-200: #2b2b2d;
  --linen-300: #38383a;
  --ink-300: #4d4d4f;
  --ink-400: #69696b;
  --ink-500: #858587;
  --ink-600: #a3a3a5;
  --ink-700: #c2c2c4;
  --ink-800: #dcdcde;
  --ink-900: #ededee;
  --paper: #131315;
  --paper-2: #18181a;
  --card: #1e1e20;
  --card-edge: #2a2a2c;
  --accent: #b8b8bb;
  --accent-2: #9a9a9d;
  --sage: #8a9a8d;
  --rust: #c97a55;
  --gold: #d4b67a;
  --plum: #a87f93;
  --iron: #8595a4;
  --good: #8aa68d;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-float: 0 18px 40px -24px rgba(0, 0, 0, 0.7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --linen-100: #1d1d1f;
    --linen-200: #2b2b2d;
    --linen-300: #38383a;
    --ink-300: #4d4d4f;
    --ink-400: #69696b;
    --ink-500: #858587;
    --ink-600: #a3a3a5;
    --ink-700: #c2c2c4;
    --ink-800: #dcdcde;
    --ink-900: #ededee;
    --paper: #131315;
    --paper-2: #18181a;
    --card: #1e1e20;
    --card-edge: #2a2a2c;
    --accent: #b8b8bb;
    --accent-2: #9a9a9d;
    --sage: #8a9a8d;
    --rust: #c97a55;
    --gold: #d4b67a;
    --plum: #a87f93;
    --iron: #8595a4;
    --good: #8aa68d;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-float: 0 18px 40px -24px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
i { font-style: normal; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── primitives ─────────────────────────────────────────── */
.kf-shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.kf-serif { font-family: var(--font-serif); }
.kf-mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em; }
.kf-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.kf-label .kf-num { color: var(--ink-600); }
.kf-eyebrow { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-400); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6em; }
.kf-num { font-family: var(--font-mono); color: var(--ink-600); }

.kf-title-xl { font-family: var(--font-serif); font-weight: 500; font-size: clamp(2.75rem, 5.6vw, 4.5rem); line-height: 1.04; letter-spacing: -0.015em; text-wrap: balance; }
.kf-title-l  { font-family: var(--font-serif); font-weight: 500; font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.1; letter-spacing: -0.012em; text-wrap: balance; }
.kf-title-m  { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
.kf-title-s  { font-family: var(--font-serif); font-weight: 500; font-size: 1.35rem; line-height: 1.25; }
.kf-dim { color: var(--ink-500); font-style: italic; font-weight: 400; }
.kf-lede { font-size: 15px; line-height: 1.65; color: var(--ink-600); max-width: 34rem; }
.kf-lede em, .kf-prose em { font-style: italic; }

/* Buttons — the app's sr-btn, verbatim in spirit: 32px, 12.5px, hairline. */
.kf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 12.5px; font-weight: 500; line-height: 1;
  color: var(--ink-800);
  background: var(--card);
  border: 1px solid var(--card-edge);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}
.kf-btn:hover { background: var(--paper-2); }
.kf-btn:active { transform: scale(0.97); }
.kf-btn-primary { background: var(--accent); border-color: transparent; color: var(--paper); }
.kf-btn-primary:hover { background: var(--accent-2); }
.kf-btn-ghost { background: transparent; border-color: transparent; color: var(--ink-600); }
.kf-btn-ghost:hover { color: var(--ink-900); background: var(--paper-2); }
.kf-btn-lg { height: 38px; padding: 0 16px; font-size: 13.5px; }
.kf-btn svg { width: 14px; height: 14px; }

/* Chips and cards. */
.kf-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: var(--radius-md);
  font-size: 11px; font-weight: 500; color: var(--ink-700);
  background: var(--paper-2);
}
.kf-chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.kf-chip-good { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.kf-card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-lg);
}

/* ── header — the app's top bar ─────────────────────────── */
.kf-skip { position: absolute; left: 1rem; top: -4rem; z-index: 300; background: var(--ink-900); color: var(--paper); padding: 0.5rem 0.8rem; border-radius: var(--radius-md); font-size: 12.5px; }
.kf-skip:focus { top: 1rem; }
.kf-head {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--card-edge);
}
.kf-head-inner {
  display: flex; align-items: center; gap: 1rem;
  padding: 10px var(--gutter);
  max-width: var(--shell); margin-inline: auto;
}
.kf-wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-serif); font-size: 19px; letter-spacing: 0.02em; color: var(--ink-900);
  flex-shrink: 0; white-space: nowrap; line-height: 1;
}
.kf-wordmark svg { width: 20px; height: 20px; }
.kf-head-nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.kf-head-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: var(--radius-md);
  font-size: 12.5px; color: var(--ink-600); flex-shrink: 0; white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.kf-head-nav a:hover { background: var(--card); color: var(--ink-900); }
.kf-head-nav a[aria-current="page"] { background: var(--card); color: var(--ink-900); box-shadow: var(--shadow-card); }
.kf-head-nav a svg { width: 15px; height: 15px; opacity: 0.85; flex-shrink: 0; }
.kf-head-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.kf-head-status { display: none; align-items: center; gap: 6px; color: var(--ink-400); font-family: var(--font-mono); font-size: 10px; white-space: nowrap; }
.kf-head-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
@media (min-width: 1100px) { .kf-head-status { display: inline-flex; } }
.kf-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-md); color: var(--ink-600); transition: background 0.15s ease, color 0.15s ease; }
.kf-icon-btn:hover { background: var(--paper-2); color: var(--ink-900); }
.kf-icon-btn svg { width: 16px; height: 16px; }
.kf-icon-btn .kf-icon-sun { display: none; }
:root[data-theme="dark"] .kf-icon-btn .kf-icon-sun { display: block; }
:root[data-theme="dark"] .kf-icon-btn .kf-icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kf-icon-btn .kf-icon-sun { display: block; }
  :root:not([data-theme="light"]) .kf-icon-btn .kf-icon-moon { display: none; }
}
@media (max-width: 640px) {
  .kf-head-inner { gap: 8px; padding-inline: 12px; }
  .kf-head-nav a span.kf-nav-label { display: none; }
  .kf-head-right .kf-btn { padding: 0 10px; }
}

/* Secondary bar — the app's TopBar: breadcrumb over a serif title. */
.kf-topbar { border-bottom: 1px solid var(--card-edge); background: var(--paper); }
.kf-topbar-inner { max-width: var(--shell); margin-inline: auto; padding: 12px var(--gutter); display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.kf-crumb { font-size: 11px; color: var(--ink-400); display: flex; gap: 6px; align-items: center; }
.kf-crumb b { font-weight: 400; color: var(--ink-600); }
.kf-topbar-title { font-family: var(--font-serif); font-size: 20px; font-weight: 500; line-height: 1.2; display: flex; align-items: baseline; gap: 10px; }
.kf-topbar-title small { font-family: var(--font-sans); font-size: 12px; color: var(--ink-400); font-weight: 400; }

/* ── home ───────────────────────────────────────────────── */
.kf-hero { padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.kf-hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 3rem; align-items: center; }
@media (max-width: 900px) { .kf-hero-grid { grid-template-columns: 1fr; } }
.kf-hero-title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(2.9rem, 6vw, 5rem); line-height: 1.02; letter-spacing: -0.015em; text-wrap: balance; }
.kf-hero-sub { margin-top: 1.5rem; font-size: 15.5px; line-height: 1.65; color: var(--ink-600); max-width: 34rem; }
.kf-hero-cta { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kf-hero-meta { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 8px; }
.kf-hero-shot { position: relative; }
.kf-hero-shot .kf-shot img { box-shadow: var(--shadow-float); }

/* A screenshot in a window: the app's card edge, a soft float. */
.kf-shot { margin: 0; }
.kf-shot img {
  width: 100%; height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-edge);
  background: var(--card);
}
.kf-shot figcaption { margin-top: 8px; font-size: 11.5px; color: var(--ink-400); }

/* Three promises, three apps: rows of sr-cards. */
.kf-section { padding-block: var(--section); }
.kf-section-tint { background: var(--paper-2); border-top: 1px solid var(--card-edge); border-bottom: 1px solid var(--card-edge); }
.kf-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2.5rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.kf-section-head .kf-eyebrow { margin-bottom: 0.6rem; }
.kf-section-head .kf-lede { margin-top: 0; }
.kf-cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .kf-cards-3 { grid-template-columns: 1fr; } }
.kf-promise { padding: 18px 18px 20px; }
.kf-promise h3 { font-family: var(--font-serif); font-size: 19px; font-weight: 500; margin: 10px 0 6px; }
.kf-promise p { font-size: 13px; line-height: 1.6; color: var(--ink-600); }

.kf-app-card { display: flex; flex-direction: column; padding: 12px; transition: border-color 0.15s ease, transform 0.2s ease; }
.kf-app-card:hover { border-color: var(--linen-300); transform: translateY(-2px); }
.kf-app-card-shot { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--card-edge); background: var(--paper); aspect-ratio: 16 / 10; }
.kf-app-card-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.kf-app-card-body { padding: 14px 6px 6px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.kf-app-card-name { display: flex; align-items: center; gap: 8px; font-family: var(--font-serif); font-size: 20px; font-weight: 500; }
.kf-app-card-name svg { width: 18px; height: 18px; }
.kf-app-card-tag { font-family: var(--font-serif); font-style: italic; font-size: 15.5px; color: var(--ink-700); }
.kf-app-card-lede { font-size: 12.5px; line-height: 1.6; color: var(--ink-500); }
.kf-app-card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kf-app-card-foot .kf-mono { color: var(--ink-400); font-size: 10px; }

/* The runtime: segmented tabs like the study panel's. */
.kf-tabs { margin-top: 2rem; }
.kf-tablist { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-lg); background: var(--paper-2); border: 1px solid var(--card-edge); }
.kf-section-tint .kf-tablist { background: var(--paper); }
.kf-tab { padding: 6px 14px; border-radius: var(--radius-md); font-size: 12.5px; color: var(--ink-500); transition: background 0.15s ease, color 0.15s ease; }
.kf-tab:hover { color: var(--ink-900); }
.kf-tab.is-active { background: var(--card); color: var(--ink-900); box-shadow: var(--shadow-card); }
.kf-tabpanels { margin-top: 1rem; }
.kf-tabpanel { display: none; }
.kf-tabpanel.is-active { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
@media (max-width: 780px) { .kf-tabpanel.is-active { grid-template-columns: 1fr; } }
.kf-spec { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: 12px 0; border-top: 1px solid var(--card-edge); }
.kf-spec > span { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-400); padding-top: 3px; }
.kf-spec p { font-size: 13px; line-height: 1.6; color: var(--ink-700); }
.kf-spec code { font-family: var(--font-mono); font-size: 11px; background: var(--paper-2); border: 1px solid var(--card-edge); border-radius: var(--radius-sm); padding: 0 4px; }

/* Steps: the chapter list, numbered in mono. */
.kf-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .kf-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kf-steps { grid-template-columns: 1fr; } }
.kf-step { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.kf-step .kf-num { font-size: 10.5px; color: var(--ink-400); }
.kf-step h3 { font-family: var(--font-serif); font-size: 18px; font-weight: 500; }
.kf-step p { font-size: 12.5px; line-height: 1.6; color: var(--ink-600); }

/* Download cards. */
.kf-download-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 2rem; }
@media (max-width: 900px) { .kf-download-apps { grid-template-columns: 1fr; } }
.kf-download-app { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.kf-download-app .kf-app-card-name { font-size: 18px; }
.kf-download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.kf-download-app .kf-download-grid { grid-template-columns: 1fr; }
.kf-dl-card {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-md);
  background: var(--paper-2); border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.kf-dl-card:hover { background: var(--card); border-color: var(--card-edge); }
.kf-dl-os { font-size: 13.5px; font-weight: 500; }
.kf-dl-file, .kf-dl-meta { font-family: var(--font-mono); font-size: 10px; color: var(--ink-400); }
.kf-dl-go { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-800); }
.kf-dl-go i { transition: transform 0.15s ease; }
.kf-dl-card:hover .kf-dl-go i { transform: translateX(3px); }
.kf-download-note { margin-top: 1.25rem; color: var(--ink-400); }

/* ── footer ─────────────────────────────────────────────── */
.kf-foot { border-top: 1px solid var(--card-edge); background: var(--paper-2); padding: 2.5rem 0 2rem; }
.kf-foot-top { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: flex-start; }
.kf-foot-line { font-family: var(--font-serif); font-size: 22px; font-weight: 500; line-height: 1.25; }
.kf-foot-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-600); }
.kf-foot-nav a:hover { color: var(--ink-900); }
.kf-foot-fine { margin-top: 2rem; color: var(--ink-400); font-size: 10.5px; }

/* ── product page ───────────────────────────────────────── */
.kf-app-hero { padding: clamp(2.25rem, 4.5vw, 3.75rem) 0 var(--section); }
.kf-app-hero-title { max-width: 16ch; }
.kf-app-hero-sub { margin-top: 1.25rem; max-width: 42rem; }
.kf-app-hero-cta { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 8px; }
.kf-shot-hero { margin-top: 2.5rem; }
.kf-shot-hero img { box-shadow: var(--shadow-float); }
.kf-app-lede { max-width: 48rem; font-family: var(--font-serif); font-size: 20px; line-height: 1.5; color: var(--ink-800); }

.kf-feature { padding-block: clamp(2.5rem, 4.5vw, 4rem); }
.kf-feature-tint { background: var(--paper-2); border-top: 1px solid var(--card-edge); border-bottom: 1px solid var(--card-edge); }
.kf-feature-dark { background: var(--paper); border-top: 1px solid var(--card-edge); border-bottom: 1px solid var(--card-edge); color: var(--ink-900); color-scheme: dark; }
.kf-feature-dark .kf-eyebrow { color: var(--ink-500); }
.kf-feature-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: center; }
.kf-feature:nth-child(even) .kf-feature-inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.kf-feature:nth-child(even) .kf-feature-copy { order: 2; }
@media (max-width: 900px) {
  .kf-feature-inner, .kf-feature:nth-child(even) .kf-feature-inner { grid-template-columns: 1fr; }
  .kf-feature:nth-child(even) .kf-feature-copy { order: 0; }
}
.kf-feature-copy .kf-lede { margin-top: 1rem; }
.kf-points { margin-top: 1.25rem; display: flex; flex-direction: column; }
.kf-points li { padding: 10px 0; border-top: 1px solid var(--card-edge); font-size: 13px; line-height: 1.6; color: var(--ink-600); }
.kf-points li:last-child { border-bottom: 1px solid var(--card-edge); }
.kf-points b { display: block; font-weight: 500; color: var(--ink-900); font-size: 13.5px; }
.kf-feature-dark .kf-shot img { box-shadow: var(--shadow-float); }

.kf-screens-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; margin-top: 2rem; }
@media (max-width: 900px) { .kf-screens-grid { grid-template-columns: 1fr; } }

/* The demo: a card with the app's own window bar. */
.kf-demo-head { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: end; }
@media (max-width: 900px) { .kf-demo-head { grid-template-columns: 1fr; } }
.kf-demo-frame { margin-top: 2rem; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--card-edge); background: var(--card); box-shadow: var(--shadow-float); }
.kf-demo-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--card-edge); color: var(--ink-400); font-family: var(--font-mono); font-size: 10px; }
.kf-demo-bar span:first-child { display: inline-flex; gap: 6px; }
.kf-demo-bar span:first-child i { width: 9px; height: 9px; border-radius: 50%; background: var(--linen-200); display: inline-block; }
.kf-demo-bar a { color: var(--ink-600); }
.kf-demo-bar a:hover { color: var(--ink-900); text-decoration: underline; }
.kf-demo-frame iframe { display: block; width: 100%; aspect-ratio: 16 / 10; min-height: 560px; border: 0; background: var(--paper); }

.kf-specs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; margin-top: 2rem; }
@media (max-width: 900px) { .kf-specs-grid { grid-template-columns: 1fr; } }
.kf-app-docs-link { margin-top: 2rem; max-width: 44rem; }
.kf-app-docs-link a { color: var(--ink-900); text-decoration: underline; text-decoration-color: var(--linen-300); text-underline-offset: 3px; }
.kf-app-docs-link a:hover { text-decoration-color: var(--ink-900); }

/* ── documentation — the reading column ─────────────────── */
.kf-docs-shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; align-items: start; padding-top: 1.75rem; padding-bottom: var(--section); }
@media (max-width: 900px) { .kf-docs-shell { grid-template-columns: 1fr; gap: 2rem; } }
.kf-docs-side { position: sticky; top: 4.5rem; display: flex; flex-direction: column; }
@media (max-width: 900px) { .kf-docs-side { position: static; } }
.kf-docs-nav, .kf-docs-toc { display: flex; flex-direction: column; }
.kf-docs-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-md);
  font-size: 12.5px; color: var(--ink-600);
}
.kf-docs-nav a:hover { background: var(--card); color: var(--ink-900); }
.kf-docs-nav a[aria-current="page"] { background: var(--card); color: var(--ink-900); box-shadow: var(--shadow-card); }
.kf-docs-nav a svg { width: 14px; height: 14px; opacity: 0.85; }
.kf-docs-toc-label { margin-top: 1.75rem; margin-bottom: 0.5rem; padding-left: 10px; }
.kf-docs-toc a { padding: 4px 10px; font-size: 12px; color: var(--ink-500); border-left: 2px solid transparent; margin-left: 0; }
.kf-docs-toc a:hover { color: var(--ink-900); }
.kf-docs-toc a.is-current { color: var(--ink-900); border-left-color: var(--ink-900); }
.kf-docs-toc a.l3 { padding-left: 22px; }

.kf-prose { max-width: 42rem; font-family: var(--font-serif); font-size: 17px; line-height: 1.7; color: var(--ink-800); }
.kf-prose h1 { font-size: clamp(2.2rem, 3.6vw, 2.8rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.012em; margin-bottom: 1.25rem; }
.kf-prose h2 { font-size: 1.7rem; font-weight: 500; line-height: 1.2; margin: 2.75rem 0 0.9rem; padding-top: 1.25rem; border-top: 1px solid var(--card-edge); }
.kf-prose h3 { font-size: 1.3rem; font-weight: 500; margin: 1.9rem 0 0.6rem; }
.kf-prose h4 { font-family: var(--font-sans); font-size: 13.5px; font-weight: 500; margin: 1.4rem 0 0.4rem; }
.kf-prose p { margin: 0 0 1rem; }
.kf-prose ul, .kf-prose ol { padding-left: 1.3rem; margin: 0 0 1.1rem; list-style: disc; }
.kf-prose ol { list-style: decimal; }
.kf-prose li { margin: 0.3rem 0; }
.kf-prose li p { margin: 0; }
.kf-prose a { color: var(--ink-900); text-decoration: underline; text-decoration-color: var(--linen-300); text-underline-offset: 3px; }
.kf-prose a:hover { text-decoration-color: var(--ink-900); }
.kf-prose strong { font-weight: 600; }
.kf-prose code { font-family: var(--font-mono); font-size: 0.72em; background: var(--paper-2); border: 1px solid var(--card-edge); border-radius: var(--radius-sm); padding: 0.1em 0.35em; color: var(--ink-800); }
.kf-prose pre { margin: 0 0 1.25rem; padding: 12px 14px; overflow-x: auto; background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 11.5px; line-height: 1.6; color: var(--ink-800); }
.kf-prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.kf-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-family: var(--font-sans); font-size: 12.5px; display: block; overflow-x: auto; }
.kf-prose th, .kf-prose td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--card-edge); line-height: 1.5; }
.kf-prose th { font-family: var(--font-mono); font-weight: 400; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-400); }
.kf-prose td code { font-size: 10.5px; }
.kf-prose blockquote { margin: 0 0 1.1rem; padding: 4px 0 4px 14px; border-left: 2px solid var(--linen-300); color: var(--ink-600); font-style: italic; }
.kf-prose hr { border: 0; border-top: 1px solid var(--card-edge); margin: 2rem 0; }
.kf-prose img { border-radius: var(--radius-md); border: 1px solid var(--card-edge); }

/* ── motion: a quiet reveal, nothing more ───────────────── */
/* Hidden only once scripts run, so a page without them is never blank. */
html.kf-js .kf-reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.55s ease, transform 0.55s ease; }
html.kf-js .kf-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.kf-js .kf-reveal { opacity: 1; transform: none; transition: none; } }

/* A Markdown divider straight before a heading would double the rule. */
.kf-prose hr + h2 { border-top: 0; padding-top: 0; margin-top: 0; }

/* ── motion & the runtime diagram ───────────────────────── */
.kf-head { transition: box-shadow 0.2s ease; }
.kf-head.is-scrolled { box-shadow: var(--shadow-card); }
.kf-feature-shot img, .kf-shot-hero img, .kf-hero-shot img { will-change: transform; }

.kf-runtime-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem; align-items: center; }
@media (max-width: 900px) { .kf-runtime-grid { grid-template-columns: 1fr; } }
.kf-runtime-diagram { margin: 0; }
.kf-runtime-diagram svg { width: 100%; height: auto; display: block; font-family: var(--font-mono); }
.kf-rt-links path, .kf-rt-store-link { fill: none; stroke: var(--linen-300); stroke-width: 1; stroke-dasharray: 3 4; }
.kf-rt-app rect, .kf-rt-server rect, .kf-rt-store rect { fill: var(--card); stroke: var(--card-edge); stroke-width: 1; transition: stroke 0.2s ease; }
.kf-rt-app { cursor: pointer; outline: none; }
.kf-rt-app:hover rect, .kf-rt-app:focus rect, .kf-rt-app.is-asking rect { stroke: var(--ink-500); }
.kf-rt-name { font-family: var(--font-serif); font-size: 14px; fill: var(--ink-900); }
.kf-rt-state { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; fill: var(--ink-400); }
.kf-rt-server.is-awake rect { stroke: var(--good); }
.kf-rt-server.is-awake .kf-rt-state { fill: var(--good); }
.kf-rt-pulse { fill: none; stroke: var(--good); stroke-width: 1; }
.kf-rt-dot { fill: var(--ink-900); }
.kf-rt-caption { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em; fill: var(--ink-400); }
