/* knack.css - page CSS for Knack's own screens, inside the visuals only (the hero window, the Workstation
   Vault, the fares card, the chat avatar). Every value comes from the kit's tokens (system.css, ui/base.css). */

/* Knack's avatar in the kit's agent disc: the mascot's small drawing (assets/brand/knack-small*.svg, made for 16-32 px)
   on a round cyan tile, as on the app icon; the dark-ground drawing (brighter ball) in dark. Never animated. */
/* "html" in front: ui.js adds ui/base.css (the kit's ink disc with a spark) after this file once a fragment loads, and an
   equal selector later in the page won (owner, 2026-11-06: a black spark in light, a white disc in dark) */
html .ui-agent { background: transparent; box-shadow: none; }   /* the mascot itself, never a disc (owner, 2026-11-06) */
html .ui-agent::after {
  inset: -6%; background: url("/assets/brand/knack-turn-mark.svg") center / contain no-repeat;
  -webkit-mask: none; mask: none;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ui-agent::after { background-image: url("/assets/brand/knack-turn-mark-dark.svg"); } }
:root[data-theme="dark"] .ui-agent::after { background-image: url("/assets/brand/knack-turn-mark-dark.svg"); }

/* the lockup (mascot + "knack") in the header and the footer: 40px tall, as in the locked mockup; 34px on a phone */
.nav__logo img { height: 40px; width: auto; }
@media (max-width: 639px) { .nav__logo img { height: 34px; } }

/* ---------------------------------------------------------------- the hero window (a chat beside the inbox) */
.kw { background: var(--u-bg); color: var(--u-ink); border: 1px solid var(--u-border); border-radius: var(--u-r, 12px);
  box-shadow: var(--u-shadow); overflow: hidden; font: 400 14px/1.45 var(--font-text); text-align: left; }
.kw__bar { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--u-line); font-size: 13px; color: var(--u-muted); }
.kw__bar .sp { flex: 1; }
.kw__who { display: inline-flex; align-items: center; gap: 8px; color: var(--u-ink); }
.kw__who b { font-weight: 500; }
.kw__who .ui-agent { width: 22px; height: 22px; }
.kw__via { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; background: color-mix(in oklab, var(--u-ink) 5%, var(--u-bg)); color: var(--u-ink); }
.kw__apps { display: inline-flex; align-items: center; gap: 10px; }
.kw__body { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 420px; }
.kw__inbox { border-right: 1px solid var(--u-line); padding: 12px; display: grid; align-content: start; gap: 2px; }
.kw__label { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; margin-bottom: 4px; font-size: 13px; font-weight: 500; }
.kw__mail { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 9px 10px; border-radius: 9px; font-size: 13px; }
.kw__mail.is-on { background: color-mix(in oklab, var(--accent) 10%, var(--u-bg)); box-shadow: inset 2px 0 0 var(--accent); }
.kw__mail b { font-weight: 500; }
.kw__mail time { color: var(--u-muted); }
.kw__mail span { grid-column: 1 / -1; color: var(--u-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kw__chat { display: grid; gap: 10px; align-content: start; padding: 18px 20px; }
.kw__msg { max-width: 84%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; }
.kw__msg small { margin-left: 8px; font-size: 12px; color: var(--u-muted); white-space: nowrap; }
.kw__msg--me { justify-self: end; background: var(--u-ink); color: var(--u-bg); border-bottom-right-radius: 6px; }
.kw__msg--me small { color: color-mix(in oklab, var(--u-bg) 70%, var(--u-ink)); }
.kw__msg--bot { background: color-mix(in oklab, var(--u-ink) 5%, var(--u-bg)); border-bottom-left-radius: 6px; }
.kw__tool { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--u-muted); }
.kw__tick { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); position: relative; flex: none; }
.kw__tick::after { content: ""; position: absolute; left: 4px; top: 3px; width: 5px; height: 3px; border: solid var(--u-bg); border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg); }
.kw__acts { display: flex; gap: 8px; }
.kw__acts span { height: 30px; padding: 0 14px; border-radius: 99px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 500; background: var(--u-ink); color: var(--u-bg); }
.kw__acts span + span { background: color-mix(in oklab, var(--u-ink) 7%, var(--u-bg)); color: var(--u-ink); }
/* every part of the window at every width (owner, 2026-11-07: "elements present on the desktop are absent from the
   mobile version"): a narrower inbox on a tablet; on a phone the inbox sits over the chat and the bar wraps */
@media (max-width: 1023px) { .kw__body { grid-template-columns: 210px minmax(0, 1fr); min-height: 0; } }
@media (max-width: 639px) {
  .kw__bar { flex-wrap: wrap; height: auto; min-height: 44px; padding: 8px 12px; row-gap: 6px; gap: 6px 10px; }
  .kw__body { grid-template-columns: minmax(0, 1fr); }
  .kw__inbox { border-right: 0; border-bottom: 1px solid var(--u-line); padding: 8px; }
  .kw__chat { padding: 14px; }
  .kw__msg { max-width: 92%; }
}

/* ---------------------------------------------------------------- the app frame: a job's emoji as its avatar, the reaction, the fares */
.kp-emo { font-size: 15px; line-height: 1; }
.ui-msg--me { position: relative; }
.kp-react { position: absolute; right: 10px; bottom: -14px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--u-bg); box-shadow: 0 0 0 1px var(--u-line), 0 2px 6px -2px rgb(0 0 0 / .2); font-size: 14px; line-height: 1; }
.ui-msg--me[data-chat-q] { margin-bottom: 14px; }
.kp-fares { display: grid; gap: 0; width: min(100%, 320px); border: 1px solid var(--u-line); border-radius: 12px; overflow: hidden; background: var(--u-bg); font-size: 13px; }
.kp-fares__head { padding: 9px 12px; color: var(--u-muted); border-bottom: 1px solid var(--u-line); }
.kp-fare { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 9px 12px; border-top: 1px solid var(--u-line); }
.kp-fares__head + .kp-fare { border-top: 0; }
.kp-fare b { font-weight: 500; }
.kp-fare span { color: var(--u-muted); grid-column: 1; }
.kp-fare em { font-style: normal; font-weight: 500; grid-column: 2; grid-row: 1 / span 2; align-self: center; font-variant-numeric: tabular-nums; }
.kp-fare.is-on { box-shadow: inset 2px 0 0 var(--accent); background: color-mix(in oklab, var(--accent) 9%, var(--u-bg)); }
.kp-crumb { width: 18px; height: 18px; display: inline-block; vertical-align: -4px; margin-right: 6px; }

/* ---------------------------------------------------------------- the Workstation Vault (index tabs, the nav card, wepanel.html) */
.kv { width: 520px; background: var(--u-bg); color: var(--u-ink); border: 1px solid var(--u-border); border-radius: var(--u-r, 12px); box-shadow: var(--u-shadow); font: 400 14px/1.4 var(--font-text); padding-bottom: 8px; }
.kv__bar { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--u-line); font-size: 13px; color: var(--u-muted); }
.kv__bar b { color: var(--u-ink); font-weight: 500; }
.kv__bar i { font-style: normal; opacity: .6; }
.kv__group { padding: 14px 16px 6px; font-size: 13px; font-weight: 500; color: var(--u-muted); }
.kv__row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 16px; }
.kv__row + .kv__row { border-top: 1px solid var(--u-line); }
.kv__tile { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in oklab, var(--u-ink) 5%, var(--u-bg)); color: var(--u-ink); }
.kv__tile svg { width: 18px; height: 18px; }
.kv__tile--logo { background: #fff; box-shadow: inset 0 0 0 1px var(--u-line); }
.kv__tile--logo img { width: 24px; height: auto; }
.kv__main { display: grid; min-width: 0; }
.kv__main b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv__main span { font-size: 13px; color: var(--u-muted); }
.kv__state { font-size: 13px; color: var(--u-muted); display: inline-flex; align-items: center; gap: 6px; }
.kv__state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in oklab, var(--u-ink) 35%, var(--u-bg)); }
.kv__state.is-on::before { background: var(--accent); }
.kv--mini { width: 300px; padding-bottom: 4px; }
.kv--mini .kv__row { padding: 8px 12px; }

/* the tab texts under the tabs (tabs-tour) */
.kp-tabtext { margin-top: var(--s-6); max-width: 46ch; }
.kp-tabtext p { margin: 0 0 var(--s-4); font-size: var(--t-lead); line-height: 1.5; }

/* the apps grid's frame (integrations-grid: a frame on span-12, 48px padding) */
.kp-apps { padding: var(--s-7); }
@media (max-width: 639px) { .kp-apps { padding: var(--s-5); } }

/* the hero window's own surface: white UI on the lit frame */
:is(.kw, .kv) { --fx-bg: #ffffff; --fx-surface: #f4f6f7; --fx-ink: #0c1114; --fx-muted: #5b6064; --fx-accent: #0891b2; --fx-accent-ink: #0c1114; }

/* ---------------------------------------------------------------- sign-in (/start) and the save page (/app/save)
   One step a screen: the words and the form on the left (span-5), a lit frame on the right (span-6 from col 7) holding
   one true thing: the code message, the first lines of Knack's welcome, or the ways to reach Knack. The step is an
   app screen, not a page section: it grows with its content (never cut), at least one screen tall. */
.ks-page main > section.ks { height: auto; min-height: 100svh; padding-top: calc(var(--nav) + var(--s-8)); padding-bottom: var(--s-9); }
.ks-page main { min-height: 100svh; }
.ks .wrap > .grid { align-items: start; }
.ks__col { display: grid; gap: var(--s-5); align-content: start; }
.ks h1 { margin: 0; font-size: clamp(38px, 2.6vw + 18px, 60px); line-height: 1.04; }
.ks__lead { margin: 0; max-width: 40ch; }
.ks__num { white-space: nowrap; }
.ks__form { display: grid; gap: var(--s-5); margin-top: var(--s-3); max-width: 460px; }
.ks__field { display: grid; gap: var(--s-2); min-width: 0; }
.ks__label { font-size: var(--t-label); font-weight: 500; color: var(--ink); }
.ks__row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.ks__send { justify-self: start; }
.ks__fine { margin: 0; font-size: var(--t-small); line-height: 1.6; color: var(--muted); max-width: 46ch; }
.ks__links { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); margin: 0; }
.ks__who { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5); margin: var(--s-3) 0 0; font-size: var(--t-small); color: var(--muted); }
/* the one text-link look on these screens (a button or a link): ink, a faint underline that darkens on hover */
.ks__a { padding: 0; border: 0; background: none; font: 500 var(--t-small)/1.5 var(--font-text); color: var(--ink); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; transition: text-decoration-color var(--dur) var(--ease); }
.ks__a:hover { text-decoration-color: currentColor; }
.me-phone:empty { display: none; }
.ks__a:disabled { color: var(--muted); cursor: default; text-decoration-color: var(--line); }
.ks__fine .ks__a { font-weight: 400; }
.err { margin: 0; color: var(--kp-bad); font-size: var(--t-small); line-height: 1.5; }
.err:empty { display: none; }
.btn.is-busy { opacity: .6; pointer-events: none; }

/* the fields: 48px, the system's small radius, the action colour on focus */
.ks-input, .ks-phone { width: 100%; height: 48px; padding: 0 var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--kp-elev); color: var(--ink); font: 400 var(--t-body)/1.4 var(--font-text); -webkit-appearance: none; appearance: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.ks-input::placeholder, .ks-phone input::placeholder { color: var(--muted); }
.ks-input:focus, .ks-phone:focus-within { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px color-mix(in oklab, var(--action) 22%, transparent); }
.ks-input.bad, .ks-phone.bad { border-color: var(--kp-bad); }
.ks-wrap { position: relative; display: block; }
.ks-select select { padding-right: 40px; cursor: pointer; }
.ks-select .ks-chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ks-input[type="date"] { min-width: 0; }
.ks-input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.ks-phone { display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-3) 0 0; }
.ks-phone input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font: 400 17px/1 var(--font-text); letter-spacing: .01em; }
.ks-cc { position: relative; display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 var(--s-3); border-right: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.ks-cc__flag { font-size: 20px; line-height: 1; }
.ks-cc select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.ks-cc:focus-within { box-shadow: inset 0 0 0 2px var(--action); border-radius: var(--r-sm) 0 0 var(--r-sm); }
.ks-cc__dial { font-size: 17px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* the six code boxes (start.js makes them) */
.ks-otp { display: grid; grid-template-columns: repeat(6, 56px); gap: var(--s-3); }
.ks-otp input { width: 56px; height: 64px; padding: 0; text-align: center; font: 500 28px/1 var(--font-display); color: var(--ink); caret-color: var(--action);
  background: var(--kp-elev); border: 1px solid var(--line-strong); border-radius: var(--r-sm); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.ks-otp input:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px color-mix(in oklab, var(--action) 22%, transparent); }
.ks-otp input.filled { border-color: color-mix(in oklab, var(--ink) 40%, transparent); }
.ks-otp.bad input { border-color: var(--kp-bad); }
.ks-otp.is-busy { opacity: .55; pointer-events: none; }

/* the frame and the chat card in it */
.ks__frame { --ratio: 78%; }
.ks__phonecard { --fx-bg: var(--kp-elev); --fx-ink: var(--kp-elev-ink); width: min(400px, 100%); background: var(--kp-elev); color: var(--kp-elev-ink); border-radius: var(--r-md);
  border: 1px solid var(--u-border); box-shadow: var(--u-shadow); padding: var(--s-4); display: grid; gap: 14px; text-align: left; }
.ks__chathead { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ks__chathead b { font-weight: 500; flex: 1; }
.ks__via { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 13px; background: color-mix(in oklab, var(--kp-elev-ink) 6%, var(--kp-elev)); }
.ks__bubble { background: color-mix(in oklab, var(--kp-elev-ink) 6%, var(--kp-elev)); border-radius: 14px; border-bottom-left-radius: 6px; padding: 12px 14px; font-size: 15px; line-height: 1.5; }
.ks__bubble small { display: block; margin-top: 6px; font-size: 13px; color: color-mix(in oklab, var(--kp-elev-ink) 62%, var(--kp-elev)); text-align: right; }
.ks__otp { font-family: var(--font-mono); font-weight: 500; letter-spacing: .04em; background: color-mix(in oklab, #0891b2 20%, var(--kp-elev)); padding: 1px 6px; border-radius: 6px; }
.ks__mark { width: min(160px, 44%); height: auto; }

/* the ways to reach Knack, in the frame: the QR on a white tile (a code reads only dark on light), the number to copy */
.ks-panel { --action: var(--p-action); --action-ink: var(--p-action-ink); --ink: var(--kp-elev-ink); --muted: color-mix(in oklab, var(--kp-elev-ink) 64%, var(--kp-elev)); --line: color-mix(in oklab, var(--kp-elev-ink) 11%, transparent); --line-strong: color-mix(in oklab, var(--kp-elev-ink) 22%, transparent);
  width: min(400px, 100%); background: var(--kp-elev); color: var(--kp-elev-ink); border-radius: var(--r-md); border: 1px solid var(--u-border);
  box-shadow: var(--u-shadow); padding: var(--s-6) var(--s-5); text-align: center; }
.ks-live, .ks-soon { display: grid; justify-items: center; gap: var(--s-4); }
.ks-qr { display: block; padding: var(--s-4); background: #ffffff; border: 1px solid var(--line); border-radius: var(--r-md); line-height: 0; }
.ks-qr img { width: 168px; height: 168px; }
.ks-hint { margin: 0; color: var(--muted); font-size: var(--t-small); line-height: 1.55; max-width: 34ch; }
.ks-open { display: none; width: 100%; }
.ks-number { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; gap: var(--s-3); min-height: 48px; padding: 0 var(--s-5);
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font: 500 17px/1.3 var(--font-text); color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
.ks-number:hover { border-color: color-mix(in oklab, var(--ink) 40%, transparent); }
.ks-number svg { color: var(--muted); flex: none; }
.ks-copied { position: absolute; right: 12px; font-size: var(--t-label); font-weight: 500; color: var(--ink); background: var(--kp-elev); padding-left: 6px; }
.ks-copied:empty { display: none; }
.ks-soon__title { margin: 0; font: var(--display-weight) 24px/1.2 var(--font-display); letter-spacing: -.02em; }
@media (pointer: coarse) { .ks-open { display: inline-flex; } .ks-qr { display: none; } }
.ks-live.personal .ks-qr { display: none; }
.ks-live.personal .ks-open { display: inline-flex; }
.ks-live.no-address .ks-open, .ks-live.no-address .ks-number { display: none; }
/* the channel tabs: the homepage's tab look (a line under the chosen one) */
.ks-tabs { display: flex; gap: var(--s-5); border-bottom: 1px solid var(--line); }
.ks-tabs [role="tab"] { display: inline-flex; align-items: center; gap: var(--s-2); height: 48px; margin-bottom: -1px; padding: 0; border: 0; border-bottom: 2px solid transparent;
  background: none; color: var(--muted); font: 500 var(--t-body)/1 var(--font-text); cursor: pointer; white-space: nowrap; }
.ks-tabs [role="tab"]:hover { color: var(--ink); }
.ks-tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }

/* the save page (/app/save): one column, the site's tile over its name */
.ks__one { max-width: 460px; }
.ks__field:has(> input[hidden]) { display: none; }
.ks-tile { display: grid; place-items: center; width: 72px; height: 72px; border-radius: var(--r-md); background: color-mix(in oklab, var(--ink) 6%, var(--kp-elev)); color: var(--ink); font: 500 32px/1 var(--font-display); overflow: hidden; }
.ks-tile--logo { background: #ffffff; box-shadow: inset 0 0 0 1px var(--line); color: #0c1114; }
.ks-tile--logo img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; }
.ks-tile--ok { background: color-mix(in oklab, var(--accent) 18%, var(--kp-elev)); color: var(--ink); }
.ks__site { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin: 0; }
.ks-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 var(--s-3); border-radius: var(--r-sm); background: color-mix(in oklab, var(--ink) 6%, var(--kp-elev)); font: 400 14px/1 var(--font-mono); }
.ks-mono { font-family: var(--font-mono); letter-spacing: .02em; }
.ks-pw { position: relative; }
.ks-pw .ks-input { padding-right: 52px; }
.ks-eye { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer; }
.ks-eye:hover { color: var(--ink); }
@media (max-width: 639px) { .ks__row2.ks__row2--keep { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* the mascot's Hop while a returning visitor's session is checked (the inline .km svg; motion in theme.css) */
.kp-loader { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 5; }
.kp-loader svg { display: block; width: 96px; height: auto; }

.ks__foot { padding: 0 0 var(--s-6); border-top: 0; }
.ks__foot .footer__legal { margin-top: 0; }
.ks-page .nav__actions { margin-left: auto; }
@media (max-width: 1023px) { .ks .grid > .ks__frame { margin-top: var(--s-7); } .ks .grid > * { grid-column: 1 / -1; } }
@media (max-width: 639px) {
  .ks-page main > section.ks { padding-top: calc(var(--nav) + var(--s-6)); padding-bottom: var(--s-8); }
  .ks__frame { --ratio: 0px; }
  .ks-otp { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-2); }
  .ks-otp input { width: 100%; height: 56px; font-size: 24px; }
  .ks__send, .ks-soon .btn { justify-self: stretch; width: 100%; }
  .ks__row2 { grid-template-columns: minmax(0, 1fr); }
  .ks-tabs { gap: var(--s-4); }
  .ks-tabs [role="tab"] { font-size: 15px; }
}

/* the hero's lead and the tabs, read at 7:1 (ink); the selected tab marked by a line under it, not a filled button */
.hero--centred .hero__lead { color: var(--ink); }
#workstation .tab { background: transparent; border-color: transparent; border-radius: 0; padding-inline: 0; margin-right: var(--s-5); box-shadow: inset 0 -2px 0 transparent; color: var(--muted); }
#workstation .tab[aria-selected="true"] { background: transparent; color: var(--ink); border-color: transparent; }
#workstation .m-tab-ind { height: 2px; top: calc(var(--h, 0px) - 2px); border-radius: 0; background: var(--accent); }
#workstation .tab:hover { color: var(--ink); }
#screen-1 .kv { width: 100%; }

.kp-tabtext { min-height: 10.5em; }
/* the apps grid on a phone: three across, icon over name */
@media (max-width: 639px) {
  .kp-apps { padding: var(--s-3); }
  .kp-apps .ic-grid--mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kp-apps .ic-cell { padding: var(--s-3); gap: var(--s-2); }
  .kp-apps .ic-cell .ic-tile { --tile: 36px; }
  .kp-apps .ic-cell__name { font-size: var(--t-label); line-height: 1.3; }
}

/* ---------------------------------------------------------------- the public sub-pages: privacy, terms, status, 404
   The homepage's header and footer directory; the text on the left line in one readable column. */
.kp-docmain { padding: calc(var(--nav) + var(--s-8)) 0 var(--s-9); min-height: 70svh; }
.kp-doc { max-width: 720px; }
.kp-doc h1 { font-size: clamp(38px, 2.6vw + 18px, 60px); line-height: 1.04; margin: 0 0 var(--s-4); }
.kp-doc .updated { margin: 0 0 var(--s-7); font-size: var(--t-small); color: var(--muted); }
.kp-doc h2 { font-size: clamp(22px, .8vw + 16px, 28px); line-height: 1.2; margin: var(--s-8) 0 var(--s-3); scroll-margin-top: calc(var(--nav) + var(--s-5)); }
.kp-doc p, .kp-doc li { font-size: 17px; line-height: 1.7; color: var(--ink); }
.kp-doc p { margin: 0 0 var(--s-4); }
.kp-doc ul, .kp-doc ol { margin: 0 0 var(--s-4); padding-left: 1.3em; display: grid; gap: var(--s-2); }
.kp-doc ul { list-style: disc; } .kp-doc ol { list-style: decimal; }
.kp-doc li::marker { color: var(--muted); }
.kp-doc b { font-weight: 500; }
.kp-doc a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; overflow-wrap: anywhere; }
.kp-doc a:hover { text-decoration-color: currentColor; }
.kp-subfoot { padding-block: var(--s-8) var(--s-6); }
.kp-subfoot .footer__legal { margin-top: var(--s-8); }

/* status: one row a part, a dot for its state (green, amber, red read with the words beside them, never alone) */
.kp-status__overall { font-size: var(--t-lead); margin: 0 0 var(--s-6); }
.kp-status__list { display: grid; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.kp-status__list li { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.kp-status__list b { display: block; font-weight: 500; }
.kp-status__list small { font-size: var(--t-small); color: var(--muted); }
.kp-status .dot { width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.kp-status .dot.operational { background: #1f9d55; } .kp-status .dot.degraded { background: #d99a00; } .kp-status .dot.down { background: #d64545; }
.kp-status .inc { margin: 0; padding: var(--s-3) 0; border-top: 1px solid var(--line); font-size: var(--t-body); }
.kp-status .inc time { color: var(--muted); margin-right: var(--s-2); }
.kp-status__foot { font-size: var(--t-small) !important; color: var(--muted) !important; margin-top: var(--s-5) !important; }

/* 404 */
.kp-lost__box { display: grid; justify-items: start; gap: var(--s-5); max-width: 640px; }
.kp-lost__mark { width: 120px; height: auto; }
.kp-lost__box h1 { margin: 0; }
.kp-lost__box p { margin: 0; }
@media (max-width: 639px) { .kp-docmain { padding-top: calc(var(--nav) + var(--s-6)); } .kp-doc p, .kp-doc li { font-size: 16px; } .kp-lost .btn { width: 100%; } }

/* the bar on a phone: the main action's label is too long to sit beside the logo and the menu button under 480px; it
   stays on the first screen (the hero) and in the menu sheet. The sign-in and save screens have no menu: their switch
   and Workstation link stay in the bar at every width. */
@media (max-width: 479px) { .nav:not(.is-open) .nav__actions > .btn--primary { display: none; } }
@media (max-width: 1023px) {
  .ks-page .nav .nav__actions > .kp-theme { display: inline-grid; }
  .ks-page .nav .nav__actions > .nav__link { display: inline-flex; }
}

/* ---------------------------------------------------------------- a chat window (2026-11-06), drawn in the kit's UI
   tokens (--u-*), so it takes the ground it sits on and dark mode (theme.css :is(.kw, .kv, .ui)): the WhatsApp message
   for a question that waits (#waiting), and people's initials (the trusted-people tab). The task chats, the shared chat
   and Workstation's day view that also used it were removed with those features (owner, 2026-11-12).
   .kt--lit: the white surface on a lit frame or a card's panel. */
.kt { --kt-bubble: color-mix(in oklab, var(--u-ink) 7%, var(--u-bg)); --kt-sel: color-mix(in oklab, var(--u-ink) 6%, var(--u-bg));
  color: var(--u-ink); font: 400 14px/1.45 var(--font-text); text-align: left; }
.kt--lit { --fx-bg: #ffffff; --fx-surface: #f4f6f7; --fx-ink: #0c1114; --fx-muted: #5b6064; --fx-accent: #0891b2; --fx-accent-ink: #0c1114; }
.kt svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.kt .ui-agent { flex: none; }
/* people: initials in a soft accent disc */
.kt-face { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in oklab, var(--u-accent) 22%, var(--u-bg));
  color: var(--u-ink); font: 500 11px/1 var(--font-text); box-shadow: 0 0 0 2px var(--u-bg); }
/* a chat */
.kt-chathead { display: flex; align-items: center; gap: 12px; flex: none; height: 60px; padding: 0 24px; border-bottom: 1px solid var(--u-line); }
.kt-who { display: grid; flex: 1; min-width: 0; }
.kt-who b { font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kt-who span { font-size: 12px; color: var(--u-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kt-via { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--u-muted); white-space: nowrap; }
.kt-via::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--u-accent); }
.kt-body { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; flex: 1; min-height: 0; overflow: hidden; padding: 20px 24px; }
.kt-body--top { justify-content: flex-start; }
.kt-msg { display: flex; gap: 10px; align-items: flex-start; flex: none; max-width: min(88%, 560px); }
.kt-msg .ui-agent { width: 26px; height: 26px; }
.kt-msg > div { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.kt-txt { display: block; padding: 9px 13px; border-radius: 16px; border-bottom-left-radius: 6px; background: var(--kt-bubble); overflow-wrap: anywhere; }
.kt-txt b { font-weight: 500; }
.kt-msg--me { position: relative; align-self: flex-end; flex-direction: column; align-items: flex-end; gap: 4px; max-width: min(78%, 460px); }
.kt-msg--me .kt-txt { background: var(--u-ink); color: var(--u-bg); border-radius: 16px; border-bottom-right-radius: 6px; }
.kt-msg--me time { font-size: 12px; color: var(--u-muted); }
/* a chat window on a lit frame or panel: one box, the kit's line and shadow */
.kt-win { display: flex; flex-direction: column; background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r, 12px); box-shadow: var(--u-shadow); overflow: hidden; }
.kt-win .kt-chathead { padding: 0 18px; }
.kt-win .kt-body { padding: 16px 18px; }
@media (max-width: 639px) {
  .kt-chathead, .kt-win .kt-chathead { padding: 0 14px; gap: 10px; }
  .kt-body, .kt-win .kt-body { padding: 14px; }
  .kt-msg { max-width: 94%; }
  .kt-msg--me { max-width: 80%; }
}
/* the WhatsApp message for a question that waits: the chat's own bar, then Knack's message */
.kt-wa .kt-chathead { height: 52px; }
.kt-wa .kt-chathead img { width: 18px; height: 18px; }
.kt-wa .kt-txt { white-space: pre-line; }
.kt-wa .kt-txt small { display: block; margin-top: 4px; text-align: right; font-size: 12px; color: var(--u-muted); }

/* the trusted people list (the Workstation tab): a face in the row's tile, Accept as the row's one button */
.kv__tile.kt-face { width: 36px; height: 36px; border-radius: 50%; font-size: 13px; box-shadow: none; }
.kv__btn { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 99px; background: var(--u-ink); color: var(--u-bg); font-size: 13px; font-weight: 500; }

/* ---------------------------------------------------------------- one page at every width (owner, 2026-11-07: "many
   elements present on the desktop version are absent from the mobile version, and spacing is very irregular because
   of that. I want those missing elements present, and the spacing regular everywhere"). This replaces the phone
   declutter of 2026-11-06: the tablet and the phone show every section, card, message, app, question and footer
   column the desktop shows, in the desktop's words, adapted to the width.

   One vertical rhythm, as tokens per breakpoint (the desktop, 1024 and up, keeps its one-screen sections, 120 / 72):
                          tablet 640-1023   phone 639 and under
     --padt / --padb       80 / 80           56 / 56      a section's padding, top and foot (the same both ends)
     --head-gap            40                32           a section's words to its visual
     --card-gap            32                32           between cards, between a card row and the next
     --s-4                 16                16           a heading to its line (section-head, cards)
   Below 1024 a section is as tall as its content (never a forced screen), so the gap between two sections is always
   --padb + --padt (160 / 112) and never the ground a short section leaves under a screen-tall box; inside a section no
   gap is larger than --padt (tools/test_website.py measures every one). */
@media (max-width: 1023px) {
  :root { --padt: 80px; --padb: 80px; --head-gap: 40px; --card-gap: 32px; }
  /* a heading block that is a grid's first row (#questions): the grid's row gap plus its margin make --head-gap */
  main .grid > .section-head { margin-bottom: calc(var(--head-gap) - var(--card-gap)); }
  main > :is(section, .section):not(.hero, .section--hero), footer.closing {
    height: auto; min-height: 0; display: block; padding: var(--padt) 0 calc(var(--padb) + var(--bar));
  }
  main > :is(section, .section) > :is(.wrap, .container), footer.closing > .wrap { height: auto; min-height: 0; }
  main > :is(section, .section):not(.hero, .section--hero) > :is(.wrap, .container):not(.grid) { display: flex; flex-direction: column; }
  /* a two-screen section is one column of its parts, card rows --card-gap apart (html and :not(.kp-none) lift it over
     system.css's phone rule for .g2, which sets its row gap to 0) */
  html main > :is(section, .section):is(.g2, .g2m):not(.kp-none) > :is(.wrap, .container), html footer.closing.g2 > .wrap {
    display: flex; flex-direction: column; row-gap: var(--card-gap); grid-template-rows: none;
  }
  .grid:has(> .card--open) { row-gap: var(--card-gap); }
  main > :is(section, .section).g2 > :is(.wrap, .container) > * { align-self: stretch; }
  main > :is(section, .section) > .wrap > .fill, .group > .fill { flex: none; }
  /* the grounds (backgrounds.css) would stretch a band to 88% of a screen and pad it by their own band size */
  main > .section:is(.bg-band, .bg-field, .bg-grain, .bg-dusk, .bg-horizon, .bg-deep, .bg-mist, .bg-halo, .bg-ruled, .bg-dots, .bg-liquid):not(.section--hero) {
    min-height: 0; display: block; padding-block: var(--padt) calc(var(--padb) + var(--bar)); }
  main > section.section:is(.bg-band, .bg-field, .bg-grain, .bg-deep, .bg-photo):not(.section--hero):last-of-type { padding-bottom: calc(var(--padb) + var(--bar)) !important; }

  /* the hero: as tall as its content, its window in the flow and whole (the inbox, the apps, every step) */
  main > :is(.hero, .section--hero).hero--centred { height: auto; min-height: 0; padding-bottom: var(--padb); }
  .hero--centred > .wrap { height: auto; }
  .hero--centred .hero__window { flex: none; min-height: 0; padding: var(--s-6) var(--s-6) var(--s-8);
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--s-7)), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - var(--s-7)), transparent); }
  .hero--centred .hero__window > .ly-piece { position: relative; left: auto; top: auto; width: 100%; max-width: 880px; margin-inline: auto; transform: none; }

  /* the Workstation tabs: 44px to tap */
  #workstation .tab { height: 44px; }

  /* the bar: the theme switch beside the menu button on every page */
  .nav:not(.is-open) .nav__actions > .kp-theme { display: inline-grid; }

  /* the product's screens read at 13px and up */
  .kt-who span, .kt-via, .kt-msg--me time, .kw__msg small, .kw__mail, .kv__main span, .kv__state, .kt-wa .kt-txt small { font-size: 13px; }
  .kt-face { font-size: 13px; }
  #meetings .dg-cap__l { font-size: 13px; }
  .kp-react { font-size: 14px; }

  /* the questions: every one, the same air between them */
  #questions .faq > .faq__item { padding-block: var(--s-6); }
  #questions .faq > .faq__item:first-child { padding-top: 0; }

  /* the close and the footer: every column, the lede and the invite line */
  .closing__links .grid { row-gap: var(--s-6); }
}
@media (max-width: 639px) {
  :root { --padt: 56px; --padb: 56px; --head-gap: 32px; --card-gap: 32px; }

  /* the hero: the chat at the phone's reading size */
  .hero--centred .hero__window { padding: var(--s-4) var(--s-4) var(--s-7); }
  .kw__chat { font-size: 15px; gap: 12px; }
  .kw__tool { font-size: 14px; }

  /* the jobs: four cards, each its title, its line and its picture */
  #jobs > .wrap > .grid, #jobs > .wrap > .group > .grid { margin-top: 0; }

  /* the product's screens: larger type */
  .kt-txt { font-size: 15px; }

  #workstation .tabs { row-gap: 0; }

  /* the apps: three across, every app with its name */
  .kp-apps .ic-cell { padding: var(--s-5) var(--s-2); }
  .kp-apps .ic-cell .ic-tile { --tile: 44px; }
  .kp-apps .ic-cell__name { font-size: 14px; }
  .kp-apps .ic-cell__meta { font-size: 13px; }

  /* the questions */
  #questions .faq .faq__item > h3 { font-size: 20px; line-height: 1.3; }
  #questions .faq .faq__item > p { font-size: 17px; line-height: 1.55; }

  .closing__cta > .btn--xl { flex: none; }
}

/* ---------------------------------------------------------------- the landing page, decluttered (owner, 2026-11-06:
   "alignment and spacing issues … make it a little spacious") */
/* the hero: the tagline alone under the title */
.hero__tag { font: 500 clamp(20px, 2.4vw, 28px)/1.3 var(--font-display); letter-spacing: -.01em; color: var(--muted) !important; }
/* the report's sources: a whole three by two grid, nothing cut at the edge */
.kp-files .ui-files { width: 100%; min-width: 0; max-width: none; }
.kp-files .ui-files__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 639px) { .kp-files .ui-files__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* the closing: one ordinary button under the words */
.closing__cta > .kp-close-btn { align-self: flex-start; }
/* the jobs' two rows of cards: less ground between them (owner, 2026-11-06) */
@media (min-width: 1024px) { #jobs > .wrap { row-gap: 104px; } }

/* ---------------------------------------------------------------- the phone, balanced (owner, 2026-11-07: "very
   cluttered … find a balance between looking cluttered and crucial information missing, with no awkward gaps").
   Everything the desktop shows stays on the phone (the 2026-11-07 parity rule, tools/test_website.py). What changes
   is the room each visual takes: every window is shown whole and as tall as itself, with an even 16px of ground
   round it (no fixed box with empty ground under it, no fade cutting it); list rows are tighter; the footer's columns
   sit side by side. Nothing scrolls sideways on the phone (owner, 2026-11-07: no swipe rows). */
@media (max-width: 639px) {
  /* every visual on a card, and the split frame: the window whole, 16px of ground round it */
  html body main .card > .panel, html body #workstation .frame { --p-h: 0px; --ratio: 0px; min-height: 0; height: auto; flex: none; }
  html body main .card > .panel > .stage, html body #workstation .frame > .stage {
    position: relative; inset: auto; padding: 16px; -webkit-mask: none; mask: none; }
  html body main .card > .panel > .stage > *, html body #workstation .frame > .stage > * {
    position: relative; left: auto; top: auto; right: auto; bottom: auto; translate: none; width: 100%; max-width: 100%; margin-inline: auto; }
  html body #workstation .frame > .stage > [hidden] { display: none; }
  html body main .card > .panel > .dg { padding: 16px 8px; }
  /* a card's visual sits under its words with the card's own inset, not run off its edge */
  html body main .card > .panel { margin-top: var(--s-5); }

  /* the hero: the inbox as a short list above the chat */
  .kw__inbox { padding: 6px; }
  .kw__mail { padding: 6px 10px; }
  .kw__chat { padding: 14px 14px 18px; }

  /* the jobs: the report's six sources three across */
  .kp-files .ui-files__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .kp-files .ui-file { padding: 10px 8px; }
  .kp-files .ui-file__icon { width: 36px; height: 36px; margin-bottom: 8px; }


  /* the apps: the grid's frame closer round its cells */
  .kp-apps { padding: var(--s-3); }
  .kp-apps .ic-cell { padding: var(--s-4) var(--s-2); }

  /* the footer: Knack, Account and Help side by side under the logo */
  .footer .closing__links .grid > .footer__col { grid-column: auto / span 4; min-width: 0; }
}
