/* k9x.ai site styles (2026-11 redesign). Light, quiet, one accent.
   Used by index.html; other pages still use styles.css until they move over. */

:root {
  /* Palette after the APQC process-frameworks page Ravi liked: white page, institutional blue,
     pale blue-grey lines and bands, a small lime underline on links. Not their red or logo. */
  --bg:        #ffffff;
  --bg-2:      #f3f6fa;   /* alternate band */
  --surface:   #ffffff;
  --ink:       #1f2633;   /* headings */
  --text:      #363c46;   /* body */
  --text-2:    #5a6270;   /* secondary */
  --text-3:    #8790a0;   /* captions */
  --line:      #e3e8f0;
  --line-2:    #cfd9ea;
  --accent:    #2f55a4;   /* blue: links, primary button, card titles */
  --accent-hi: #24458a;
  --accent-bg: #e8eef8;
  --band:      #4a72c4;   /* menu band: lighter than --accent, white text still readable */
  --lime:      #a2c037;   /* link underline only */
  --code-bg:   #15181c;
  --code-text: #d8dde3;
  --code-dim:  #8a939e;
  --code-ok:   #8fd0a6;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --nav-h: 56px;
  --wrap: 1120px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-2); padding: .1em .35em; border-radius: 4px; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.wrap--narrow { max-width: 760px; }

h1, h2, h3 { color: var(--ink); font-weight: 600; }
h1 { font-family: var(--sans); font-size: clamp(38px, 4.2vw, 54px); font-weight: 650; line-height: 1.12; letter-spacing: -.035em; }
h2 { font-family: var(--sans); font-size: clamp(27px, 3vw, 34px); font-weight: 650; line-height: 1.2; letter-spacing: -.03em; }
h3 { font-size: 17px; line-height: 1.35; letter-spacing: -.005em; }

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 500; color: var(--accent);
  background: var(--accent-bg); padding: 5px 12px; border-radius: 99px; margin-bottom: 16px;
}
.lede { font-size: 20px; line-height: 1.6; color: var(--text-2); max-width: 640px; }

/* ── Utility strip ───────────────────────────────────────── */
.util { border-bottom: 1px solid var(--line); background: var(--bg); }
.util-inner { max-width: 1320px; margin: 0 auto; padding: 0 32px; height: 76px; display: flex; align-items: center; justify-content: space-between; }
.util-social { display: flex; gap: 16px; align-items: center; }
.util-right { display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand-dog { height: 48px; width: auto; }
.foot .brand { font-size: 19px; }
.foot .brand-dog { height: 40px; }
.util-social a { color: var(--accent); display: inline-flex; }
.util-social a:hover { color: var(--accent-hi); }
.util-links { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--text-3); }
.util-links a { color: var(--text); }
.util-links a:hover { color: var(--accent); }

/* ── Top nav ─────────────────────────────────────────────── */
.top-nav {
  position: sticky; top: 0; z-index: 800; height: var(--nav-h);
  background: var(--band); border-bottom: 1px solid #4069b9;
}
.top-nav.scrolled { box-shadow: 0 2px 10px rgba(31,38,51,.12) !important; }
.top-nav:not(.scrolled) { box-shadow: none !important; } /* app.js adds a dark-theme shadow on scroll */
.nav-inner { max-width: 1320px; margin: 0 auto; padding: 0 32px; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-left { display: flex; align-items: center; gap: 14px; }
.hamburger { display: none !important; }
@media (max-width: 820px) { .hamburger { display: flex !important; } }
.hamburger { width: 36px; height: 36px; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px; border-radius: 6px; }
.hamburger span { display: block; height: 1.5px; background: #fff; border-radius: 2px; }
.hamburger:hover { background: rgba(255,255,255,.12); }
.nav-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.top-nav .nav-brand:hover { color: #fff; }
.nav-logo { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.nav-links { display: flex; align-items: center; gap: 18px; flex: 1; margin-left: -14px; }
.nav-link { color: #fff; font-size: 16px; padding: 8px 14px; border-radius: 6px; }
.nav-link:hover, .nav-link--toggle[aria-expanded="true"], .nav-has-sub:hover .nav-link--toggle { color: #fff; background: rgba(255,255,255,.14); }

/* ── Nav dropdown (Resources) ─ app.js toggles .open on click; hover opens on desktop */
.nav-has-sub { position: relative; }
.nav-has-sub::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.nav-link--toggle { background: none; border: 0; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.chev { width: 12px; height: 12px; color: rgba(255,255,255,.8); transition: transform .15s; }
.nav-link--toggle[aria-expanded="true"] .chev, .nav-has-sub:hover .chev { transform: rotate(180deg); }
.nav-dropdown { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: 6px; box-shadow: 0 12px 28px -12px rgba(31,38,51,.25); z-index: 850; }
.nav-dropdown.open, .nav-has-sub:hover .nav-dropdown, .nav-has-sub:focus-within .nav-dropdown { display: block; }
.nav-dropdown--2col { min-width: 440px; }
.nav-dropdown--2col.open, .nav-has-sub:hover .nav-dropdown--2col, .nav-has-sub:focus-within .nav-dropdown--2col { display: grid; grid-template-columns: 1fr 1fr; }
.nav-dropdown-link { display: block; padding: 8px 12px; border-radius: 4px; font-size: 14.5px; color: var(--text); }
.nav-dropdown-link:hover { background: var(--bg-2); color: var(--accent); }

/* ── Side panel (full menu) ──────────────────────────────── */
.side-overlay { display: none; position: fixed; inset: 0; background: rgba(23,25,28,.28); z-index: 900; }
.side-overlay.active { display: block; }
.side-panel {
  position: fixed; top: 0; left: 0; width: 300px; max-width: 86vw; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--line); z-index: 1000;
  transform: translateX(-100%); transition: transform .25s ease; display: flex; flex-direction: column;
}
.side-panel.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.12); }
.side-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 12px; }
.side-panel-logo { font-weight: 700; color: var(--ink); }
.side-close { border: 0; background: none; font-size: 18px; color: var(--text-2); cursor: pointer; padding: 4px 8px; }
.side-nav { list-style: none; padding: 4px 0 20px; flex: 1; }
.side-section-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--text-3); padding: 18px 24px 6px; }
.side-link { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 7px 24px; font-size: 15px; color: var(--text); background: none; border: 0; text-align: left; font-family: inherit; cursor: pointer; }
.side-link:hover, .side-link.active { color: var(--accent); background: var(--bg); }
.side-caret { font-size: 11px; color: var(--text-3); transition: transform .2s; }
.side-link--toggle[aria-expanded="true"] .side-caret { transform: rotate(180deg); }
.side-sub { list-style: none; display: none; padding-bottom: 6px; }
.side-sub.open { display: block; }
.side-sub-link { display: block; padding: 5px 24px 5px 40px; font-size: 14px; color: var(--text-2); }
.side-sub-link:hover { color: var(--accent); }
.side-sub-label { font-size: 12px; color: var(--text-3); padding: 10px 24px 2px 40px; list-style: none; }
.side-sub-divider { list-style: none; height: 1px; background: var(--line); margin: 8px 24px 4px 40px; }
.side-divider { list-style: none; height: 1px; background: var(--line); margin: 14px 24px; }
.side-panel-footer { padding: 16px 24px 24px; display: grid; gap: 6px; }
.side-install { font-size: 13px; display: block; }

/* ── Buttons, install box ────────────────────────────────── */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px;
  border-radius: 8px; font-size: 16px; font-weight: 600; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hi); color: #fff; }
.btn--ghost { color: var(--ink); border-color: var(--line-2); background: var(--surface); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }

.install {
  display: inline-flex; align-items: center; gap: 12px; height: 46px; padding: 0 8px 0 16px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px;
  font-family: var(--mono); font-size: 14.5px; color: var(--ink);
}
.install .prompt { color: var(--text-3); user-select: none; }
.install button {
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--text-2);
  background: var(--bg-2); border: 0; border-radius: 6px; padding: 6px 10px; cursor: pointer;
}
.install button:hover { color: var(--ink); }

.textlink { font-weight: 600; font-size: 16px; }
.btn--blue-ghost { color: var(--accent); border-color: var(--accent); background: var(--surface); }
.btn--blue-ghost:hover { background: var(--accent-bg); color: var(--accent-hi); }

/* ── Hero: framework and ecosystem side by side ─────────── */
.k9x-box { margin: 4px 0 24px; }
.duo-band { display: flex; align-items: center; gap: 14px; line-height: 16px; }
.duo-band::before, .duo-band::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.duo-band span { font-size: 10.5px; font-weight: 600; letter-spacing: .24em; color: #8da2cf; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; }
.duo-col { padding: 20px 40px 4px 0; }
.duo-col + .duo-col { padding: 20px 0 4px 40px; border-left: 1px solid var(--line); }
.duo-k { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--text-3); margin-bottom: 4px; }
.duo-h { font-family: var(--sans); font-size: 26px; font-weight: 700; color: var(--accent); letter-spacing: -.01em; margin-bottom: 12px; }
.duo-col > p:not(.duo-k) { color: var(--text-2); font-size: 16.5px; margin-bottom: 18px; }
.textlink::after { content: " \2192"; }

/* ── Sections ────────────────────────────────────────────── */
section { padding: 112px 0; }
.band { background: var(--bg-2); }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head h2 { margin-bottom: 18px; }
.section-head p { font-size: 18px; color: var(--text-2); }
.kicker, .section-head .kicker { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--accent); margin-bottom: 14px; }

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding: 40px 0 0; }
.hero + section { padding-top: 72px; }
.hero .hero-top .lede { margin-bottom: 0; }
.hero-top + .k9x-box { margin-top: 28px; }
.hero h1 { max-width: 820px; margin-bottom: 20px; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: end; margin-bottom: 8px; }

.qs { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-width: 0;
      box-shadow: 0 12px 40px -12px rgba(31,38,51,.12); }
.qs-bar { display: flex; gap: 5px; align-items: center; padding: 8px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.qs-bar i { width: 8px; height: 8px; border-radius: 50%; background: #d3d9e3; }
.qs-body { margin: 0; padding: 14px 16px 16px; font-family: var(--mono); font-size: 11.5px; line-height: 1.6; color: #3d424b;
           white-space: pre; overflow-x: auto; }
.qs-body .k { color: var(--accent); font-weight: 500; }
.qs-body .p { color: #3d424b; }
.qs-body .c { color: var(--text-3); }
.qs-body .ok { color: #3d424b; }
.hero .lede { margin-bottom: 24px; max-width: 560px; font-size: 18.5px; line-height: 1.55; }
.hero .actions { margin-bottom: 22px; }
.hero-meta { font-size: 15px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 8px 28px; }
.hero-meta a { font-weight: 500; }
.hero-works { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--text-3); max-width: 640px; }

.shot {
  margin-top: 72px; border-radius: 12px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 24px 60px -20px rgba(23,25,28,.28);
}
.shot img { width: 100%; height: auto; }
.caption { font-size: 14px; color: var(--text-3); margin-top: 14px; }
.hero-shot-wrap { padding-bottom: 112px; }

/* ── Execution path ──────────────────────────────────────── */
.path { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); position: relative; }
.path-step { padding: 26px 22px 24px; border-right: 1px solid var(--line); position: relative; }
.path-step:last-child { border-right: 0; background: var(--bg-2); border-radius: 0 var(--radius) var(--radius) 0; }
.path-step { cursor: default; transition: background .15s; outline: none; }
.path-step:hover, .path-step:focus-visible { background: var(--accent-bg); }
.path-step:hover h3, .path-step:focus-visible h3 { color: var(--accent); }
.path-step .more {
  display: none; position: absolute; top: calc(100% + 10px); left: -1px; width: 320px; z-index: 20;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--line-2); border-top: 3px solid var(--accent);
  border-radius: 6px; box-shadow: 0 16px 34px -14px rgba(31,38,51,.3);
  font-size: 14.5px; line-height: 1.55; color: var(--text);
}
.path-step:nth-child(n+4) .more { left: auto; right: -1px; }
.path-step:hover .more, .path-step:focus-visible .more, .path-step:focus-within .more { display: block; }
.path-step .n { font-family: var(--mono); font-size: 12px; color: var(--text-3); display: block; margin-bottom: 14px; }
.path-step h3 { margin-bottom: 6px; }
.path-step p { font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.path-step:not(:last-child)::after {
  content: ""; position: absolute; right: -6px; top: 34px; width: 10px; height: 10px;
  background: var(--surface); border-top: 1px solid var(--line-2); border-right: 1px solid var(--line-2);
  transform: rotate(45deg); z-index: 1;
}
.path-under { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--text-2); padding: 14px 22px; border: 1px dashed var(--line-2); border-radius: var(--radius); }
.path-under strong { color: var(--ink); font-weight: 600; margin-right: 4px; }
.path-note { margin-top: 40px; max-width: 700px; color: var(--text-2); }

/* ── Story ───────────────────────────────────────────────── */
.story { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: start; }
.story-text p { margin-bottom: 18px; }
.story-text p.first { font-weight: 600; font-size: 22px; letter-spacing: -.015em; line-height: 1.45; color: var(--ink); }
.points { display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.point { padding: 26px 0; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 150px 1fr; gap: 24px; }
.point h3 { font-size: 16px; }
.point p { font-size: 16px; color: var(--text-2); }
.pull { margin-top: 64px; font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }

/* the closing line of the 2 a.m. story, with a small train on its track */
.whistle-row { display: flex; align-items: flex-end; gap: 22px; margin-top: 14px; }
.whistle { font-size: 17px; font-style: italic; color: var(--text-2); padding-bottom: 6px; }
.rail { position: relative; flex: none; width: 320px; height: 56px; overflow: hidden; color: var(--accent); }
.rail::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 4px;
  border-top: 1.5px solid var(--line-2); border-bottom: 1.5px solid var(--line-2);
  background: repeating-linear-gradient(90deg, transparent 0 9px, var(--line-2) 9px 11px); }
.train { position: absolute; left: 0; bottom: 1px; animation: chug 14s linear infinite; }
.puff { opacity: 0; animation: puff 1.6s ease-out infinite; }
.puff.p2 { animation-delay: .5s; } .puff.p3 { animation-delay: 1s; }
@keyframes chug { from { transform: translateX(-165px); } to { transform: translateX(330px); } }
@keyframes puff { 0% { opacity: 0; transform: translate(0,0); } 30% { opacity: .7; } 100% { opacity: 0; transform: translate(8px,-4px); } }
@media (prefers-reduced-motion: reduce) { .train { animation: none; transform: translateX(80px); } .puff { animation: none; opacity: .5; } }

/* ── Stack table ─────────────────────────────────────────── */
.stack { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 16px; }
.stack th, .stack td { text-align: left; vertical-align: top; padding: 18px 0; border-bottom: 1px solid var(--line-2); }
.stack th { width: 220px; font-weight: 600; color: var(--ink); padding-right: 24px; }
.stack td { color: var(--text-2); }

/* ── Try it ──────────────────────────────────────────────── */
.try { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.try-col { min-width: 0; }
.try-col h3 { font-size: 19px; margin-bottom: 6px; }
.try-col > p { color: var(--text-2); font-size: 16px; margin-bottom: 18px; min-height: 52px; }
.term {
  background: var(--code-bg); color: var(--code-text); border-radius: var(--radius);
  font-family: var(--mono); font-size: 14px; line-height: 1.75; padding: 22px 24px; overflow-x: auto;
}
.term .c { color: var(--code-dim); }
.term .p { color: var(--code-dim); user-select: none; }
.term .ok { color: var(--code-ok); }
.try-col .after { margin-top: 16px; font-size: 15px; }

/* ── Studio steps ────────────────────────────────────────── */
.steps { display: grid; gap: 96px; }
.step { display: grid; grid-template-columns: 0.8fr 1.5fr; gap: 56px; align-items: center; }
.step--flip { grid-template-columns: 1.5fr 0.8fr; }
.step--flip .step-text { order: 2; }
.step .n { font-family: var(--mono); font-size: 13px; color: var(--accent); display: block; margin-bottom: 12px; }
.step h3 { font-size: 24px; line-height: 1.25; margin-bottom: 14px; font-weight: 600; }
.step p { color: var(--text-2); margin-bottom: 12px; }
.step .shot { margin-top: 0; }

/* ── Studio: heading row, full-width screenshot, four points in a row ── */
.studio-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 20px; }
#studio { padding: 80px 0; }
.studio-top .studio-lede { max-width: 620px; margin-bottom: 0; }
.studio-top .studio-cta { flex: none; margin: 0; }
.studio-wide .app-card { margin: 0; }
.points-n.points-row { grid-template-columns: repeat(4, 1fr); gap: 24px; max-width: none; margin: 22px 0 0; }

/* ── Studio split (text left, framed app shot right) ────── */
.studio-split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; align-items: center; }
.studio-split h2 { margin-bottom: 16px; }
.studio-lede { font-size: 16.5px; color: var(--text-2); margin-bottom: 26px; max-width: 480px; }
.points-n { list-style: none; display: grid; gap: 14px; margin-bottom: 28px; max-width: 480px; }
.points-n li { display: flex; gap: 14px; }
.points-n b { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); font-size: 13px; display: grid; place-items: center; }
.points-n h3 { font-size: 15px; margin-bottom: 2px; }
.points-n p { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.studio-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.install--sm { height: 46px; }
.app-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 34px -12px rgba(31,38,51,.14); }
.app-bar { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-2); padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.app-card img { width: 100%; height: auto; }

/* ── Link lists (deeper, ecosystem) ──────────────────────── */
.links { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 56px; border-top: 1px solid var(--line-2); }
.links a { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 22px 0; border-bottom: 1px solid var(--line-2); color: var(--text); }
.links a:hover .t { color: var(--accent); }
.links .t { font-weight: 600; color: var(--ink); font-size: 17px; }
.links .d { grid-column: 1 / -1; color: var(--text-2); font-size: 15.5px; line-height: 1.55; }
.links .tag { font-size: 12px; color: var(--text-3); font-weight: 500; align-self: center; }
.fine { margin-top: 28px; font-size: 14px; color: var(--text-3); }

/* ── Where it fits: layer stack with the ecosystem alongside ─ */
.fit { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 14px; }
.fit-stack { display: grid; gap: 8px; }
.fit-row { display: grid; grid-template-columns: 190px 1fr; gap: 24px; align-items: center; padding: 16px 22px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; }
.fit-name { font-weight: 650; color: var(--ink); font-size: 16px; }
.fit-what { color: var(--text-2); font-size: 15px; line-height: 1.5; }
.fit-row--k9 { background: var(--accent); border-color: var(--accent); padding: 22px; box-shadow: 0 10px 26px -14px rgba(47,85,164,.6); }
.fit-row--k9 .fit-name { color: #fff; font-size: 19px; }
.fit-row--k9 .fit-what { color: rgba(255,255,255,.9); }
.fit-side { display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; border: 1px solid var(--line-2); border-top: 4px solid var(--lime); border-radius: 6px; background: var(--bg-2); }
.fit-side-k { font-weight: 700; color: var(--accent); font-size: 16px; }
.fit-side-sub { font-size: 13px; color: var(--text-2); line-height: 1.4; margin-bottom: 6px; }
.fit-side a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; font-size: 14px; color: var(--ink); }
.fit-side a b { color: var(--text-2); font-weight: 500; }
.fit-side a:hover { border-color: var(--accent); color: var(--accent); }
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 56px; border-top: 1px solid var(--line-2); }
.path-card { padding: 26px 40px 8px 0; }
.path-card + .path-card { padding: 26px 0 8px 40px; border-left: 1px solid var(--line); }
.ex-links { font-size: 14.5px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.ex-links a { font-weight: 600; }
.link-row { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.path-card h3 { font-size: 19px; color: var(--accent); margin-bottom: 12px; }
.path-card p { font-size: 15.5px; color: var(--text); margin-bottom: 12px; }
.path-card p b { color: var(--ink); }
.adds { width: 100%; border-collapse: collapse; margin-top: 40px; font-size: 15.5px; }
.adds th { text-align: left; padding: 12px 18px; background: var(--bg-2); border-bottom: 2px solid var(--line-2); color: var(--ink); font-size: 15px; }
.adds th:last-child, .adds td:last-child { background: var(--accent-bg); }
.adds td { vertical-align: top; padding: 14px 18px; border-bottom: 1px solid var(--line-2); width: 50%; }
.adds ul { list-style: none; display: grid; gap: 9px; }
.adds li { padding-left: 18px; position: relative; color: var(--text); }
.adds li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.adds td:last-child li::before { background: var(--accent); }

/* ── Start here cards (outlined, title in blue, underlined link) ── */
.start { padding-top: 0; }
.light-h { margin-bottom: 36px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  display: flex; flex-direction: column; gap: 14px; padding: 30px 30px 28px;
  background: var(--surface); border: 2px solid var(--line-2); border-radius: 4px;
  box-shadow: 0 6px 18px -10px rgba(31,38,51,.18);
}
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.card .n { font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.card h3 { font-size: 21px; color: var(--accent); font-weight: 700; letter-spacing: -.01em; }
.card p { font-size: 15.5px; color: var(--text); line-height: 1.6; }
.card .fact { font-size: 14px; color: var(--text-2); }
.card .ul { margin-top: auto; align-self: flex-start; }
.ul { font-size: 15px; font-weight: 600; color: var(--accent); padding-bottom: 3px; border-bottom: 3px solid var(--lime); }
.ul:hover { color: var(--accent-hi); }

/* ── Quote (How K9-AIF started) ── */
.kicker-plain { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.quote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); }
.quote p { font-size: 20px; line-height: 1.5; color: var(--ink); margin-bottom: 8px; }
.quote p.cite { font-size: 15px; color: var(--text-2); margin: 0; }
.rtable.journey td.rt-l { width: 170px; }

/* ── Essay (The architecture that endures) ── */
.page-head .meta { margin-top: 14px; font-size: 14px; color: var(--text-3); }
.essay { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.essay-side { position: sticky; top: 76px; }
.essay-side img, .figure img, .pair img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.figure { margin: 32px 0; }
.specs { width: 100%; border-collapse: collapse; margin-top: 22px; font-size: 14.5px; }
.specs th { text-align: left; font-weight: 650; color: var(--ink); padding: 8px 0; border-bottom: 2px solid var(--line-2); }
.specs td { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.specs td:last-child { text-align: right; color: var(--ink); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0 36px; }
.pair img { aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.pair figure:last-child img { object-fit: contain; background: #fff; padding: 10px; }
.maptable { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.maptable th { text-align: left; padding: 10px 14px 10px 0; border-bottom: 2px solid var(--line-2); color: var(--ink); width: 50%; }
.maptable td { vertical-align: top; padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.maptable .sub { display: block; margin-top: 4px; color: var(--text-2); line-height: 1.55; }
ul.plain { list-style: none; display: grid; gap: 10px; padding: 0; }
ul.plain li { padding-left: 18px; position: relative; color: var(--text); }
ul.plain li::before { content: ""; position: absolute; left: 0; top: .65em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ── Start here guide: page list left, text right ── */
.guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.guide-nav { position: sticky; top: 76px; }
.guide-nav-h { font-size: 13px; font-weight: 650; color: var(--ink); margin-bottom: 10px; }
.guide-nav ul { list-style: none; padding: 0 0 0 12px; border-left: 1px solid var(--line-2); display: grid; gap: 2px; }
.guide-nav a { display: block; padding: 5px 0 5px 11px; margin-left: -13px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.35; color: var(--text-2); }
.guide-nav a:hover { color: var(--ink); }
.guide-nav a.on { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.guide > .prose { min-width: 0; }
.guide .prose h2 { font-size: 26px; margin: 40px 0 12px; }
.guide .prose h3 { font-size: 18px; margin: 26px 0 8px; }
.guide .rtable td.rt-l { width: 175px; }
.guide .rtable td.rt-go { width: 80px; }
.guide-next { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-2); }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 22px; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.prose pre { background: #f3f6fa; border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; overflow-x: auto; margin: 0 0 18px; font-size: 13.5px; }
.prose pre code { background: none; padding: 0; }

/* ── Examples: search + one table ── */
.ex-search { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.ex-search input { flex: 1; max-width: 560px; height: 46px; padding: 0 16px; font: 16px var(--sans); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); }
.ex-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
#ex-count { font-size: 14px; color: var(--text-3); }
.extable { width: 100%; border-collapse: collapse; font-size: 15px; }
.extable thead th { text-align: left; font-size: 13px; font-weight: 600; color: var(--text-3); padding: 10px 14px 10px 0; border-bottom: 2px solid var(--line-2); }
.extable .grp-row th { text-align: left; padding: 26px 0 8px; border-bottom: 1px solid var(--line-2); font-size: 16px; font-weight: 650; color: var(--accent); }
.extable .grp-row th span { display: block; margin-top: 3px; font-size: 14px; font-weight: 400; color: var(--text-2); }
.extable td { padding: 14px 18px 14px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; color: var(--text-2); line-height: 1.55; }
.extable td.nm { width: 210px; font-weight: 650; color: var(--ink); }
.extable td.fw { width: 150px; color: var(--ink); white-space: nowrap; }
.extable td.lk { width: 170px; }
.extable td.lk a { display: block; font-weight: 600; }
.extable tr.ex:target td { background: var(--accent-bg); }
.ex-none { margin-top: 20px; color: var(--text-2); }
.steps-list { margin: 0 0 0 20px; display: grid; gap: 8px; color: var(--text); }
.ex-pre { background: #f3f6fa; border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin: 8px 0 14px; font-size: 13.5px; overflow-x: auto; }

/* ── Row table: label | what it is | link (used instead of card grids) ── */
.rtable { width: 100%; border-collapse: collapse; border-top: 2px solid var(--line-2); font-size: 16px; }
.rtable td { padding: 16px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; color: var(--text-2); line-height: 1.55; }
.rtable td.rt-l { width: 240px; font-weight: 650; color: var(--ink); padding-left: 0; }
.rtable td.rt-go { width: 210px; text-align: right; white-space: nowrap; padding-right: 0; }
.rtable td.rt-go a { color: var(--accent); font-weight: 600; }
.rtable .fact { display: block; margin-top: 6px; font-size: 14px; color: var(--text-3); }
.rtable tr:hover td { background: #f8fafd; }

/* ── Who builds it ───────────────────────────────────────── */
.who { display: grid; grid-template-columns: 0.8fr 1.6fr; gap: 56px; align-items: start; }
.who .light-h { margin: 0; }
.who-name { font-weight: 700; color: var(--ink); font-size: 18px; margin-bottom: 12px; }
.who-body > p { margin-bottom: 18px; max-width: 680px; }
.who-links { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 8px; }

/* ── Closing ─────────────────────────────────────────────── */
.closing { text-align: center; padding: 128px 0; }
.closing h2 { margin-bottom: 36px; }
.closing .actions { justify-content: center; }
.closing .after { margin-top: 24px; font-size: 15px; color: var(--text-2); }

/* ── Video (click to load) ───────────────────────────────── */
.video-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.video-link .tri { width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent currentColor; }
.video-modal { position: fixed; inset: 0; z-index: 1100; background: rgba(10,12,14,.82); display: none; align-items: center; justify-content: center; padding: 24px; }
.video-modal.open { display: flex; }
.video-modal .frame { width: min(1040px, 100%); aspect-ratio: 16/9; background: #000; border-radius: 10px; overflow: hidden; }
.video-modal iframe { width: 100%; height: 100%; border: 0; }
.video-modal .close { position: absolute; top: 18px; right: 22px; color: #fff; background: none; border: 0; font-size: 26px; cursor: pointer; }

/* ── Footer ──────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line-2); padding: 64px 0 48px; font-size: 15px; }
.foot { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 32px; }
.foot h4 { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--text-3); margin-bottom: 14px; }
.foot ul { list-style: none; display: grid; gap: 7px; font-size: 14.5px; }
.foot a { color: var(--text); }
.foot a:hover { color: var(--accent); }
.brand-col p { color: var(--text-2); margin-top: 14px; max-width: 260px; font-size: 14.5px; }
.foot-base { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; color: var(--text-3); font-size: 14px; }

/* ── Inner pages: breadcrumbs, page head, prose ───────────── */
.crumbs { max-width: var(--wrap); margin: 0 auto; padding: 22px 32px 0; font-size: 13.5px; color: var(--text-3); }
.crumbs a { color: var(--accent); }
.crumbs .sep { margin: 0 8px; }
.page-head { padding: 40px 0 56px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(34px, 3.8vw, 46px); margin-bottom: 18px; }
.page-head .lede { max-width: 720px; }
/* text follows the title closely; the full section gap is for the homepage */
.page-head { padding-bottom: 36px; }
.page-head + section { padding-top: 44px; }
.prose { max-width: 760px; }
.prose p { margin-bottom: 18px; }
.prose h2 { margin: 48px 0 16px; }
.prose h3 { margin: 32px 0 10px; font-size: 19px; }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose li { margin-bottom: 6px; }
.prose .byline { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-2); }
.prose .byline strong { color: var(--ink); }
.link-stack { display: grid; gap: 14px; justify-items: start; margin: 8px 0 24px; }

/* wide tables on inner pages scroll inside their own box on small screens */
@media (max-width: 820px) { .page table { display: block; overflow-x: auto; } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1000px) {
  .path { grid-template-columns: repeat(3, 1fr); }
  .path-step:nth-child(3) { border-right: 0; }
  .path-step:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .path-step:nth-child(3)::after { display: none; }
  .story { grid-template-columns: 1fr; gap: 48px; }
  .step, .step--flip { grid-template-columns: 1fr; gap: 28px; }
  .step--flip .step-text { order: 0; }
  .foot { grid-template-columns: 1fr 1fr 1fr; }
  .brand-col { grid-column: 1 / -1; }
  .cards { grid-template-columns: 1fr; gap: 20px; }
  .studio-split { grid-template-columns: 1fr; gap: 36px; }
  .essay, .pair, .guide { grid-template-columns: 1fr; }
  .extable thead { display: none; }
  .extable, .extable tbody, .extable tr, .extable td { display: block; width: auto !important; }
  .extable td { border: 0; padding: 2px 0; }
  .extable tr.ex { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
  .extable td.lk a { display: inline-block; margin-right: 14px; }
  .guide-nav { position: static; }
  .essay-side { position: static; }
  .studio-top { flex-direction: column; align-items: flex-start; }
  .points-n.points-row { grid-template-columns: 1fr 1fr; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: auto !important; }
  .rtable td { border: 0; padding: 2px 0; text-align: left !important; }
  .rtable tr { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
  .fit { grid-template-columns: 1fr; }
  .fit-row { grid-template-columns: 1fr; gap: 4px; }
  .paths { grid-template-columns: 1fr; }
  .path-card, .path-card + .path-card { padding: 22px 0 16px; border-left: 0; }
  .path-card + .path-card { border-top: 1px solid var(--line); }
  .adds, .adds tbody, .adds tr, .adds td, .adds thead { display: block; width: auto; }
  .adds thead { display: none; }
  .adds td:first-child::before { content: 'Your agent framework handles'; display: block; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
  .adds td:last-child::before { content: 'K9-AIF adds around it'; display: block; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
  .duo { grid-template-columns: 1fr; }
  .hero-top { grid-template-columns: 1fr; gap: 28px; }
  .qs-body { white-space: pre-wrap; word-break: break-word; }
  .duo-col, .duo-col + .duo-col { padding: 22px 0 16px; border-left: 0; }
  .duo-col + .duo-col { border-top: 1px solid var(--line); }
  .who { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 820px) {
  .nav-has-sub { display: none; }
  .nav-links { margin-left: 0; }
  .try { grid-template-columns: 1fr; gap: 48px; }
  .try-col > p { min-height: 0; }
  .links { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap, .nav-inner, .util-inner { padding: 0 16px; }
  .crumbs { padding: 16px 16px 0; }
  .util-inner { height: 64px; }
  .util-links { display: none; }
  .brand-dog { height: 40px; }
  section { padding: 76px 0; }
  .hero { padding-top: 56px; }
  .hero-shot-wrap { padding-bottom: 76px; }
  .shot { margin-top: 48px; }
  .lede { font-size: 18px; }
  .path { grid-template-columns: 1fr; }
  .path-step { border-right: 0; border-bottom: 1px solid var(--line); }
  .path-step::after { display: none; }
  .path-step .more, .path-step:hover .more { display: block; position: static; width: auto; margin-top: 12px; padding: 0; border: 0; box-shadow: none; background: none; color: var(--text-2); }
  .point { grid-template-columns: 1fr; gap: 6px; }
  .points-n.points-row { grid-template-columns: 1fr; }
  .whistle-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .rail { width: 100%; }
  .stack th { width: auto; display: block; padding-bottom: 4px; border-bottom: 0; }
  .stack td { display: block; padding-top: 0; }
  .stack tr { display: block; border-bottom: 1px solid var(--line-2); padding: 14px 0; }
  .stack th, .stack td { border-bottom: 0; padding-left: 0; }
  .install { font-size: 13.5px; }
  .foot { grid-template-columns: 1fr 1fr; }
}
