/* Page CSS for the Kelroam site: only what sits inside a visual (the app window, the step drawings, the terminal's
   frame), the small lists the kit lacks, and the document pages (agent guide, licence, legal shells).
   Every colour, size and space comes from the kit's tokens (assets/system.css). */

/* ------------------------------------------------------------ the demo slot: the app window in the hero */
.app-win { background: color-mix(in oklab, var(--p-bg) 92%, #000); color: var(--p-ink); border-radius: var(--r-md);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--p-ink) 10%, transparent), 0 30px 70px -30px rgb(0 0 0 / .55);
  font: 400 13px/1.4 var(--font-text); overflow: hidden; text-align: left; }
:root[data-theme="light"] .app-win { background: #ffffff; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .app-win { background: #ffffff; } }
.hero--centred .hero__window > .app-win { width: min(1040px, calc(100% - 2 * var(--s-6))); }
/* the lead under the h1 is body text, so it reads in the ink (7:1), not the grey */
.hero--centred .hero__lead { color: var(--ink); }
.demo-media { display: block; width: 100%; height: auto; }
.app-win__bar { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px;
  border-bottom: 1px solid color-mix(in oklab, var(--p-ink) 8%, transparent); color: var(--p-muted); font-size: 12px; }
.app-win__dots { display: flex; gap: 6px; } .app-win__dots i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in oklab, var(--p-ink) 18%, transparent); }
.app-win__title { font-weight: 500; color: var(--p-ink); } .app-win__sp { flex: 1; }
.app-win__body { display: grid; grid-template-columns: 150px minmax(0, 1fr) 240px; }
.app-rail { display: grid; align-content: start; gap: 2px; padding: 12px 10px; border-right: 1px solid color-mix(in oklab, var(--p-ink) 8%, transparent); color: var(--p-muted); }
.app-rail span { padding: 5px 8px; border-radius: 6px; }
.app-rail .app-rail__group { padding: 10px 8px 2px; font-size: 11px; }
.app-rail .is-on { background: color-mix(in oklab, var(--p-ink) 9%, transparent); color: var(--p-ink); font-weight: 500; box-shadow: inset 2px 0 0 var(--p-accent); }
.app-main { padding: 12px 16px; min-width: 0; }
.app-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.app-head b { display: block; font: 500 17px/1.2 var(--font-display); }
.app-head span { color: var(--p-muted); font-size: 12px; }
.app-btn { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 6px; flex: none;
  background: var(--p-action); color: var(--p-action-ink); font-weight: 500; font-size: 12px; }
.kw { display: grid; }
.kw__row { display: grid; grid-template-columns: minmax(0, 1.6fr) 1fr 1.1fr 92px; align-items: center; gap: 10px; min-height: 34px; padding: 0 8px;
  border-bottom: 1px solid color-mix(in oklab, var(--p-ink) 7%, transparent); }
.kw__row--head { min-height: 30px; color: var(--p-muted); font-size: 11.5px; }
.kw__row.is-sel { background: color-mix(in oklab, var(--p-accent) 12%, transparent); border-radius: 6px; }
.kw__row b { font-weight: 500; font-variant-numeric: tabular-nums; margin-right: 6px; }
.kw__row small, .kw__miss { color: var(--p-muted); font-size: 11.5px; }
.kw__chip { justify-self: start; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; border: 1px solid color-mix(in oklab, var(--p-ink) 16%, transparent); color: var(--p-muted); }
.kw__chip--on { border-color: transparent; background: color-mix(in oklab, var(--p-accent) 22%, transparent); color: var(--p-ink); }
.app-detail { display: grid; align-content: start; gap: 12px; padding: 14px 16px; border-left: 1px solid color-mix(in oklab, var(--p-ink) 8%, transparent); }
.app-detail > b { font: 500 15px/1.2 var(--font-display); }
.app-detail__item { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid color-mix(in oklab, var(--p-ink) 8%, transparent); }
.app-detail__item span, .app-detail__item small { color: var(--p-muted); font-size: 11.5px; }
.app-detail__item b { font-weight: 500; }
@media (max-width: 1023px) { .app-win__body { grid-template-columns: 130px minmax(0, 1fr); } .app-detail { display: none; } }
@media (max-width: 639px) {
  .app-win__body { grid-template-columns: minmax(0, 1fr); } .app-rail, .app-win__ctx { display: none; }
  .kw__row { grid-template-columns: minmax(0, 1.4fr) 1fr 88px; } .kw__row > :nth-child(3) { display: none; }
  /* the phone frame shows about 190px of the body: the screen name and three phrases */
  .app-head > div > span { display: none; } .kw__row:nth-child(n+5) { display: none; } .kw__row--head { min-height: 26px; }
}

/* ------------------------------------------------------------ the four steps: small drawings of each screen */
#how .panel { --p-h: 236px; }
@media (max-width: 639px) { #how .panel { --p-h: 176px; } }
#how .card--open .step-num { margin-bottom: var(--s-3); }
.step-panel { display: grid; place-items: center; padding: var(--s-5); background: color-mix(in oklab, var(--surface) 70%, var(--bg)); }
.mini { width: min(100%, 460px); background: color-mix(in oklab, var(--p-bg) 92%, #000); color: var(--p-ink); border-radius: var(--r-sm);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--p-ink) 10%, transparent); padding: 10px 14px; font: 400 13px/1.4 var(--font-text); }
:root[data-theme="light"] .mini { background: #fff; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .mini { background: #fff; } }
.mini__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 34px; border-bottom: 1px solid color-mix(in oklab, var(--p-ink) 7%, transparent); }
.mini__row:last-child { border-bottom: 0; }
.mini__row--head { min-height: 26px; color: var(--p-muted); font-size: 12px; }
.tag { padding: 2px 8px; border-radius: 999px; font-size: 12px; background: color-mix(in oklab, var(--p-accent) 18%, transparent); }
.mini--form { display: grid; gap: 10px; padding: 14px; }
.field-mock { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 8px 10px; border-radius: 6px; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--p-ink) 14%, transparent); }
.field-mock__label { grid-column: 1 / -1; color: var(--p-muted); font-size: 11.5px; }
.field-mock__value { font-family: var(--font-mono); font-size: 12.5px; overflow-wrap: anywhere; min-width: 0; }
.field-mock__count { color: var(--p-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.locales { display: flex; flex-wrap: wrap; gap: 6px; }
.locales span { padding: 3px 9px; border-radius: 999px; font-size: 12px; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--p-ink) 14%, transparent); color: var(--p-muted); }
.locales .is-on { background: var(--p-ink); color: var(--p-bg); box-shadow: none; }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 104px)); gap: 14px; justify-content: center; }
.shot { aspect-ratio: 9 / 19.5; border-radius: 12px; padding: 10px 8px; display: grid; grid-template-rows: auto 1fr; gap: 8px;
  background: color-mix(in oklab, var(--p-accent) 88%, var(--p-bg)); color: var(--p-bg); }
.shot b { font: 500 12px/1.2 var(--font-display); text-align: center; }
.shot i { border-radius: 8px; background: color-mix(in oklab, var(--p-bg) 85%, transparent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--p-bg) 60%, transparent); }
@media (max-width: 639px) { .shots { grid-template-columns: repeat(3, minmax(0, 80px)); gap: 10px; } .shot b { font-size: 11px; } }
.mini--plan { display: grid; gap: 10px; padding: 14px; }
.diff { display: grid; gap: 3px; font-family: var(--font-mono); font-size: 12px; }
.diff__label { font-family: var(--font-text); color: var(--p-muted); font-size: 11.5px; }
.diff__old { padding: 2px 6px; border-radius: 4px; background: rgb(220 90 70 / .16); text-decoration: line-through; text-decoration-color: rgb(220 90 70 / .7); }
.diff__new { padding: 2px 6px; border-radius: 4px; background: color-mix(in oklab, var(--p-accent) 22%, transparent); }
.plan-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--p-muted); font-size: 12px; padding-top: 4px; }

/* ------------------------------------------------------------ agents and AI */
.agent-list, .os-list, .plan-includes, .plain-list, .set-list, .end-list { list-style: none; margin: 0; padding: 0; }
.agent-list, .os-list { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); }
.agent-list li, .os-list li { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; font-weight: 500; }
.agent-list .ic, .os-list .ic { flex: none; }
/* a name under each icon: the first name starts on the container's left, the others share no line */
.icon-row li { flex-direction: column; align-items: flex-start; gap: var(--s-2); min-height: 0; }

/* every card row and split runs to its screen's foot (the kit's .fill), growing from its content, never squeezed */
main > .section > .wrap > .grid.fill, main > .section > .wrap > .plans-fill { flex: 1 0 auto; }
.plans-fill { display: flex; flex-direction: column; } .plans-fill > .plans { flex: 1 1 auto; }
.faq-side { align-self: stretch; display: flex; flex-direction: column; }
.faq-side > .side-panel { --p-h: 300px; flex: 1 0 auto; margin-top: var(--s-3); }
/* a phone: the heading and its line, the questions, then the drawing last, taking what the two screens leave */
@media (max-width: 639px) {
  .grid.fill:has(> .faq-side) { grid-template-rows: auto auto auto 1fr; row-gap: var(--s-5); }
  .faq-side { display: contents; }
  .faq-side > * { grid-column: 1 / -1; }
  .faq-side > h2 { grid-row: 1; } .faq-side > p { grid-row: 2; }
  .grid.fill:has(> .faq-side) > .faq { grid-row: 3; }
  .faq-side > .side-panel { --p-h: 260px; grid-row: 4; align-self: stretch; margin-top: 0; }
}
.set-list--paths li { grid-template-columns: 16px 20px minmax(0, 1fr) auto; }
.set-list--paths span { font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.set-list li.is-off { color: var(--p-muted); }
.set-list li.is-off span { text-decoration: line-through; }
.agents-visual, .ai-visual { align-self: stretch; }
.term-frame { position: relative; height: 100%; min-height: 440px; border-radius: var(--r-lg); background: var(--ground-bg); overflow: hidden; }
.term-frame > .at-center { position: absolute; width: min(620px, calc(100% - 48px)); }
.term-frame .ui-term { width: 100%; }

/* the app's settings and trial-ended screens, drawn small on a lit ground */
.set-frame { display: grid; place-items: center; padding: var(--s-6); border-radius: var(--r-lg); }
.set-frame { height: 100%; min-height: 480px; }
.set-win { width: min(100%, 420px); background: color-mix(in oklab, var(--p-bg) 92%, #000); color: var(--p-ink); border-radius: var(--r-md);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--p-ink) 10%, transparent), 0 24px 50px -28px rgb(0 0 0 / .5);
  font: 400 13px/1.4 var(--font-text); padding: 14px; display: grid; gap: 10px; text-align: left; }
:root[data-theme="light"] .set-win { background: #fff; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .set-win { background: #fff; } }
.set-win__head { display: grid; gap: 2px; }
.set-win__head b { font: 500 16px/1.2 var(--font-display); }
.set-win__head span { color: var(--p-muted); font-size: 12px; }
.set-list { display: grid; gap: 4px; }
.set-list li { display: grid; grid-template-columns: 16px 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: 6px; }
.set-list li.is-on { background: color-mix(in oklab, var(--p-accent) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--p-accent) 45%, transparent); }
.set-list small { color: var(--p-muted); font-size: 12px; }
.set-list .ic { width: 20px; height: 20px; object-fit: contain; color: var(--p-ink); }
.radio { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--p-ink) 35%, transparent); }
.is-on .radio { box-shadow: inset 0 0 0 4px var(--p-accent); }
.set-pause { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px;
  border-radius: 6px; background: color-mix(in oklab, var(--p-ink) 6%, transparent); font-size: 12.5px; }
.set-pause__acts { display: flex; gap: 6px; }
.app-btn--ghost { background: none; color: var(--p-ink); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--p-ink) 22%, transparent); }
.end-panel { --p-h: 300px; }
.end-list { display: grid; gap: 2px; }
.end-list li { display: flex; align-items: center; gap: 8px; min-height: 32px; color: var(--p-muted); }
.end-list li::before { content: ""; width: 16px; flex: none; }
.end-list li.is-ok { color: var(--p-ink); }
.end-list li.is-ok::before { display: none; }
.end-list svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--p-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 639px) { .term-frame { min-height: 380px; } .set-frame { min-height: 0; padding: var(--s-4); } .end-panel { --p-h: 280px; } }

/* ------------------------------------------------------------ why Kelroam: the small screens in its cards */
.why .card > .panel { --p-h: 230px; }
.mini__row b { font-weight: 500; font-variant-numeric: tabular-nums; }
.muted-p { color: var(--p-muted); }
.st { display: inline-flex; align-items: center; gap: 8px; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: color-mix(in oklab, var(--p-ink) 30%, transparent); }
.st--ok::before { background: var(--p-accent); }
.st--warn::before { background: rgb(230 170 60); }
.st--bad::before { background: rgb(220 90 70); }
.outs s { text-decoration-color: rgb(220 90 70); color: var(--p-ink); }
.bar { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 30px; font-size: 12px; }
.bar i { display: block; height: 10px; width: var(--w); border-radius: 3px; background: color-mix(in oklab, var(--p-accent) 75%, var(--p-bg)); }
.feed { display: inline-flex; align-items: center; gap: 10px; }
.feed i { width: 22px; height: 22px; border-radius: 6px; flex: none; background: oklch(0.7 0.11 var(--h)); }
.locales .is-out { text-decoration: line-through; color: var(--p-ink); box-shadow: inset 0 0 0 1px rgb(220 90 70 / .55); }
.mini__warn { margin: 0; padding: 6px 10px; border-radius: 6px; font-size: 12.5px; background: rgb(220 90 70 / .14); }

/* ------------------------------------------------------------ pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.plans .card--plan { padding: var(--s-6); }
.plan__name { margin: 0; }
.plan__note { color: var(--ink); }
.plan__state { color: var(--muted); font-size: var(--t-small); margin-top: auto; }
.plans .card--plan > .btn { align-self: flex-start; }
.plans .card--plan > .plan__note + .btn { margin-top: auto; }
.plans .price { margin: 0; } .plans .price .t-stat { margin: 0; font-size: clamp(28px, 1.6vw + 22px, 52px); }
.plan-includes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); margin-top: var(--s-7); }
.plan-includes li { padding-top: var(--s-3); border-top: 1px solid var(--line); }
.plan-more { margin-top: var(--s-5); }
@media (max-width: 1023px) { .plans { grid-template-columns: minmax(0, 1fr); } .plan-includes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .plan-includes { grid-template-columns: minmax(0, 1fr); margin-top: var(--s-6); } }

/* ------------------------------------------------------------ the footer */
.footer__marks { color: var(--muted); }
.theme-switch { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ document pages (pricing, download, support, licence,
   agent guide, legal shells): read top to bottom, so their sections take the height of what they hold */
main.doc > section.section { height: auto; min-height: 0; }
main.doc > section.doc-head { padding-top: calc(var(--nav) + var(--s-9)); padding-bottom: var(--s-7); }
main.doc > section.doc-part { padding-top: var(--s-8); padding-bottom: var(--s-8); }
main.doc > section.doc-part:last-child { padding-bottom: var(--s-10); }
.doc-head h1 { font-size: var(--t-h2); max-width: 22ch; }
.doc-head .t-lead { max-width: 60ch; color: var(--muted); margin-top: var(--s-4); }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { font-size: var(--t-h3); margin-top: var(--s-7); }
.prose h3 { font-size: var(--t-card); margin-top: var(--s-6); font-family: var(--font-text); font-weight: 500; }
.prose ol, .prose ul { padding-left: 1.25em; display: grid; gap: var(--s-2); }
.prose code, .tools code, .code { font-family: var(--font-mono); font-size: 0.9em; }
.prose code { padding: 1px 5px; border-radius: 4px; background: color-mix(in oklab, var(--ink) 8%, transparent); overflow-wrap: anywhere; }
pre.code { margin: 0; padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: color-mix(in oklab, var(--p-bg) 88%, #000); color: var(--p-ink);
  overflow-x: auto; font-size: 13.5px; line-height: 1.6; box-shadow: 0 0 0 1px var(--line); max-width: 100%; }
:root[data-theme="light"] pre.code { background: #fff; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) pre.code { background: #fff; } }
.note { padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--surface); max-width: 68ch; }
.toc { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-5); }
.toc a { min-height: 44px; display: inline-flex; align-items: center; }
.agent-head { display: flex; align-items: center; gap: var(--s-3); }
.agent-head .ic { flex: none; }

/* the tool list */
.tools { display: grid; gap: var(--s-7); }
.tools__group h3 { font: 500 var(--t-card)/1.3 var(--font-text); margin: 0 0 var(--s-3); }
.tools__group h3 .muted { font-size: var(--t-small); margin-left: var(--s-2); }
.tools table { width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.tools th, .tools td { text-align: left; vertical-align: top; padding: var(--s-3) var(--s-4) var(--s-3) 0; border-bottom: 1px solid var(--line); }
.tools th { color: var(--muted); font-weight: 500; }
.tools td:first-child { white-space: nowrap; }
.tools td:last-child { color: var(--muted); white-space: nowrap; }
@media (max-width: 639px) {
  .tools table, .tools tbody, .tools tr, .tools td { display: block; } .tools thead { display: none; }
  .tools tr { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); } .tools td { border: 0; padding: 2px 0; white-space: normal; }
}

/* download cards, the requirement lists */
.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.downloads .card { padding: var(--s-6); gap: var(--s-4); }
.downloads .card h2 { font-size: var(--t-h3); display: flex; align-items: center; gap: var(--s-3); }
.plain-list { display: grid; }
.plain-list li { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
@media (max-width: 639px) { .downloads { grid-template-columns: minmax(0, 1fr); } }

/* the licence page */
.lic { display: grid; gap: var(--s-6); max-width: 720px; }
.lic [hidden] { display: none !important; }
.lic .lic-form { display: grid; gap: var(--s-4); max-width: 480px; }
.lic-list { display: grid; gap: var(--s-5); }
.lic-card { display: grid; gap: var(--s-4); padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.lic-card h3 { font: 500 var(--t-card)/1.3 var(--font-text); margin: 0; }
.lic-card dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-2) var(--s-5); margin: 0; }
.lic-card dt { color: var(--muted); } .lic-card dd { margin: 0; }
.lic-computers { list-style: none; margin: 0; padding: 0; display: grid; }
.lic-computers li { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: 56px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.lic-computers small { display: block; color: var(--muted); }
.lic-status { min-height: 1.5em; }
.lic-status[data-kind="error"] { color: var(--ink); font-weight: 500; }
