/* Aptibit family UI kit v1.1.9: shared page components (owner review Phase 1, 15 Nov 2026).
   Type roles, one spacing rhythm, the breadcrumb, the three inner heroes, the Next chapter card, the contact form,
   the 404, author and article templates. Identical on all three sites: only the brand tokens (accent, eyebrow ink,
   frame ground) and the data differ. Every value comes from tokens.css v2.1 (fallbacks keep a site on v2.0 working).
   Motion: transform and opacity only, from motion.css; reduced motion keeps everything still. */
@layer kit.components {

/* =================== Type roles (T-K7, T-K14 to T-K17, X7) =================== */
/* No break (v1.1.8, VR-C19/VR-A20): keeps a hyphenated word ("world-class", "self-hosted") or a name ("SOC 2", "EU AI Act")
   on one line in headings, leads and captions. Geist has no U+2011, so a non-breaking hyphen would fall back to another
   font; this span keeps the real hyphen. Wrap text with nobr() from js/templates.js, or write the span by hand. */
.k-nobr { white-space: nowrap; }
.k-eyebrow { margin: 0; font: var(--weight-title-sm) var(--text-title-sm)/var(--leading-title-sm) var(--font-sans); letter-spacing: var(--tracking-title-sm); color: var(--eyebrow, var(--accent-text)); }
.k-page-title { margin: 0; max-width: var(--measure-page-title, 22ch); font: var(--weight-page-title, 600) var(--text-page-title, clamp(2rem, 1.6286rem + 1.5238vw, 3rem))/var(--leading-page-title, 1.1) var(--font-sans); letter-spacing: var(--tracking-page-title, -0.026em); text-wrap: balance; color: var(--fg); }
.k-section-title { margin: 0; max-width: var(--measure-section, 24ch); font: var(--weight-section, 600) var(--text-section, clamp(1.625rem, 1.3rem + 1.3333vw, 2.5rem))/var(--leading-section, 1.12) var(--font-sans); letter-spacing: var(--tracking-section, -0.024em); text-wrap: balance; color: var(--fg); }
.k-title { margin: 0; font: var(--weight-title) var(--text-title)/var(--leading-title) var(--font-sans); letter-spacing: var(--tracking-title); }
.k-title-sm { margin: 0; font: var(--weight-title-sm) var(--text-title-sm)/var(--leading-title-sm) var(--font-sans); letter-spacing: var(--tracking-title-sm); }
.k-lead { margin: 0; max-width: var(--measure-lead); font: var(--weight-lead) var(--text-lead)/var(--leading-lead) var(--font-sans); letter-spacing: var(--tracking-lead); color: var(--fg-2); text-wrap: pretty; }
.k-body { margin: 0; max-width: var(--measure-body); font: var(--weight-body) var(--text-body)/var(--leading-body) var(--font-sans); letter-spacing: var(--tracking-body); color: var(--fg-2); }
.k-small { font: var(--weight-small) var(--text-small)/var(--leading-small) var(--font-sans); letter-spacing: var(--tracking-small); }
.k-caption { font: var(--weight-caption) var(--text-caption)/var(--leading-caption) var(--font-sans); letter-spacing: var(--tracking-caption); }

/* =================== One rhythm (X9) =================== */
.k-wrap { max-width: var(--w-wide); margin-inline: auto; padding-inline: var(--gutter); }
.k-section { padding-block: var(--section-pad, clamp(2.5rem, 1.5714rem + 3.8095vw, 5rem)); }
.k-section.k-band { padding-block: var(--band-pad, var(--section-y-tight)); background: var(--bg-alt); }
.k-head { display: grid; justify-items: start; margin-bottom: var(--head-gap, var(--stack-lg)); }
.k-head > .k-eyebrow + * { margin-top: var(--eyebrow-gap, 12px); }
.k-head > :is(h1, h2, h3) + .k-lead, .k-hero-t > h1 + .k-lead { margin-top: var(--heading-lead-gap, 20px); }
.k-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--lead-cta-gap, 32px); }
.k-card { display: grid; align-content: start; gap: var(--card-block-gap, 24px); padding: var(--card-pad, 32px); border-radius: var(--radius-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-soft, var(--line)); }
.k-card-t + * { margin-top: calc(var(--card-title-gap, 8px) - var(--card-block-gap, 24px)); }
.k-card.k-compact { padding: var(--card-pad-compact, 16px); }
.k-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--grid-gap); }
/* Rows that line up (v1.1.8, V15): a card in a grid spans one grid row per child and takes those rows as a subgrid, so the
   title row of every card in a row is as tall as the tallest title, and the bodies start level, while titles keep
   text-wrap: balance. Cards keep their own gap (the subgrid's row gap). */
.k-grid > .k-card { grid-template-rows: subgrid; grid-row: span 1; }
.k-grid > .k-card:has(> :nth-child(2)) { grid-row: span 2; }
.k-grid > .k-card:has(> :nth-child(3)) { grid-row: span 3; }
.k-grid > .k-card:has(> :nth-child(4)) { grid-row: span 4; }
.k-grid > .k-card:has(> :nth-child(5)) { grid-row: span 5; }
/* The same for a site's own card grid: put .k-rows on the grid and --k-rows (the number of parts in a card, default 2) on
   it; each card's direct children (title, body, link...) then line up across the row. */
.k-rows > * { display: grid; grid-template-rows: subgrid; grid-row: span var(--k-rows, 2); row-gap: var(--k-rows-gap, var(--card-title-gap, 8px)); align-content: normal; }
.k-rule { height: 0; margin: 0; border: 0; border-top: 1px solid var(--line); }

/* =================== Breadcrumb (R4: the same offset on every site) =================== */
.k-crumbs { padding-top: var(--crumb-top, 24px); }
.k-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; padding: 0; list-style: none; font: var(--weight-small) var(--text-small)/var(--leading-small) var(--font-sans); color: var(--fg-3); }
.k-crumbs li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.k-crumbs li + li::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; rotate: 45deg; opacity: .7; flex: none; }
.k-crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--fg-2); text-decoration: none; }
.k-crumbs a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: .2em; }
.k-crumbs [aria-current="page"] { color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
/* phones (v1.1.8, VR-C25/VR-A22): a long trail wrapped onto a second line that began with a bare chevron. Below 600 px
   the trail is one back link to the parent ("< Blog"); the page's own H1 names the current page. */
@media (max-width: 599px) {
  .k-crumbs li { display: none; }
  .k-crumbs li:nth-last-child(2) { display: inline-flex; }
  .k-crumbs li:nth-last-child(2)::before { content: ""; width: 6px; height: 6px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; border-right: 0; border-top: 0; rotate: 45deg; opacity: .7; flex: none; }
}

/* =================== Inner heroes (X12, X13, R1, R2) =================== */
.k-hero { padding-bottom: var(--section-pad, 80px); }
.k-hero-in { padding-top: var(--crumb-gap, 32px); }
.k-hero-split .k-hero-in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.k-hero-t { display: grid; justify-items: start; align-content: start; }
.k-hero-t > .k-eyebrow + h1 { margin-top: var(--eyebrow-gap, 12px); }
.k-hero-t .k-lead { max-width: min(var(--measure-lead), 36em); }
/* Separators (K1, v1.1.6): every item carries its dot in the gap to its left (16px, the 3px dot, 16px), and the row clips
   at its own left edge, so the dot of whichever item starts a line, the first one included, is cut off. A dot shows only
   between two items on the same line: no line ever starts or ends with one, at any width or wrap. */
.k-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 35px; margin: var(--lead-cta-gap, 32px) 0 0; padding: 0; list-style: none; font: var(--weight-small) var(--text-small)/var(--leading-small) var(--font-sans); color: var(--fg-3); clip-path: inset(-12px -12px -12px 0); }
.k-hero-meta li { position: relative; display: inline-flex; align-items: center; gap: 10px; }
.k-hero-meta li::before { content: ""; position: absolute; left: -19px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%; background: currentColor; }
.k-hero-meta img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.k-hero-meta a { color: var(--fg); font-weight: 500; text-decoration: none; }
.k-hero-meta a:hover { text-decoration: underline; text-underline-offset: .2em; }
.k-hero-compact .k-hero-t { max-width: 46rem; }
/* One frame style and one visual size per site (R2): a 4:3 frame, the brand's own ground, a hairline and one shadow. */
.k-frame { position: relative; overflow: hidden; aspect-ratio: var(--k-frame-ratio, 4 / 3); border-radius: var(--k-frame-r, 24px); background: var(--k-frame-bg, var(--stage, var(--bg-alt)));
  box-shadow: inset 0 0 0 1px var(--line-soft, var(--line)), var(--elevation-2); isolation: isolate; }
.k-frame > :is(img, video, picture, canvas) { display: block; width: 100%; height: 100%; object-fit: cover; }
.k-frame > picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* the themed hero (v1.1.5): hidden until the boot script gives it a src; with JavaScript off, the <noscript> image shows */
img[data-kit-theme-img]:not([src]) { display: none; }
.k-frame > noscript img { display: block; width: 100%; height: 100%; object-fit: cover; }
.k-frame > .k-frame-in { position: absolute; inset: 0; }
[data-brand="visylix"] .k-frame { --k-frame-r: 20px; --k-frame-bg: #000; }
[data-brand="cognilox"] .k-frame { --k-frame-r: 28px; }
.k-hero-post .k-frame { --k-frame-ratio: 16 / 10; }
@media (max-width: 899px) {
  .k-hero-split .k-hero-in { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .k-hero-split .k-frame { max-width: 640px; width: 100%; }
}

/* =================== Next chapter (X5) =================== */
.k-next { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: var(--card-pad, 32px);
  border-radius: var(--radius-2xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-soft, var(--line)); color: var(--fg); text-decoration: none; isolation: isolate; }
.k-next-t { display: grid; justify-items: start; gap: 0; }
.k-next-t .k-section-title { margin-top: var(--eyebrow-gap, 12px); }
.k-next-t .k-body { margin-top: var(--heading-lead-gap, 20px); }
/* the call to action: "Continue" and the round arrow on one row in the text column, clear of the preview (v1.1.8) */
.k-next-cta { display: inline-flex; align-items: center; gap: 16px; margin-top: var(--lead-cta-gap, 32px); }
.k-next-cta .kit-arrowlink { font-size: var(--text-body); }
.k-next-p { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--radius-xl); background: var(--k-frame-bg, var(--stage, var(--bg-alt))); box-shadow: inset 0 0 0 1px var(--line-soft, var(--line)); isolation: isolate; }
.k-next-p > :is(img, video, picture) { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale var(--kit-open) var(--kit-ease-settle); }
.k-next-p > picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.k-next-p > .k-frame-in { position: absolute; inset: 0; transition: scale var(--kit-open) var(--kit-ease-settle); }
.k-next-go { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--kit-primary, var(--accent-fill)); color: var(--kit-on-primary, var(--on-accent)); box-shadow: 0 6px 20px rgb(0 0 0 / .18); transition: translate var(--kit-micro) var(--kit-ease-settle), scale var(--kit-press) var(--kit-ease-standard); }
.k-next-go .kit-i { width: 20px; height: 20px; }
.k-next:hover .k-next-go { translate: 2px 0; }
.k-next:hover .k-next-p > :is(img, video, picture, .k-frame-in) { scale: 1.02; }
.k-next:active .k-next-go { scale: var(--kit-press-scale); }
.k-next:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; box-shadow: inset 0 0 0 1px var(--line-soft, var(--line)), 0 0 0 8px var(--focus-halo); }
[data-brand="visylix"] .k-next-p { --k-frame-bg: #000; }
@media (max-width: 767px) { .k-next { grid-template-columns: minmax(0, 1fr); padding: var(--card-pad, 24px); } .k-next-p { order: -1; } }

/* =================== Contact form (X14, R7) =================== */
.k-contact { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.k-form { display: grid; gap: 20px; padding: var(--card-pad, 32px); border-radius: var(--radius-xl); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-soft, var(--line)); }
.k-form[hidden], .k-sent[hidden], .k-errsum[hidden], .k-ferr[hidden], .k-neterr[hidden] { display: none; }
.k-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.k-field { display: grid; gap: 8px; min-width: 0; }
.k-label { font: 500 var(--text-small)/var(--leading-small) var(--font-sans); letter-spacing: var(--tracking-small); color: var(--fg); }
.k-label .k-opt { font-weight: 400; color: var(--fg-3); }
.k-field .kit-input { width: 100%; }
.k-ferr { margin: 0; display: flex; align-items: flex-start; gap: 6px; font: 500 var(--text-small)/var(--leading-small) var(--font-sans); color: var(--error); }
.k-ferr .kit-i { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.k-topics { min-width: 0; margin: 0; padding: 0; border: 0; }
.k-topics legend { padding: 0; margin-bottom: 8px; }
.k-topics-l { display: flex; flex-wrap: wrap; gap: 8px; }
.k-topic { position: relative; display: inline-flex; }
.k-topic input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.k-topic span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--radius-pill); background: var(--field, rgb(0 0 0 / .035)); box-shadow: inset 0 0 0 1px var(--line);
  font: 500 var(--text-small)/1 var(--font-sans); color: var(--fg); pointer-events: none; transition: scale var(--kit-press) var(--kit-ease-standard); }
.k-topic span .kit-i { display: none; width: 14px; height: 14px; }
.k-topic input:hover + span { background: var(--field-hover, rgb(0 0 0 / .05)); box-shadow: inset 0 0 0 1px var(--line-hover); }
/* a chip is named by its own text, so its edge stays a hairline (WCAG 1.4.11 needs no boundary there); the chosen chip
   is shown by a solid fill and a tick, never by colour alone */
.k-topic input:checked + span { background: var(--fg); color: var(--bg); box-shadow: inset 0 0 0 1px var(--fg); }
.k-topic input:checked + span .kit-i { display: block; }
.k-topic input:active + span { scale: var(--kit-press-scale); }
.k-topic input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; box-shadow: inset 0 0 0 1px var(--line-hover), 0 0 0 6px var(--focus-halo); }
.k-topics[aria-invalid="true"] .k-topic span { box-shadow: inset 0 0 0 1px var(--error); }
/* Cloudflare Turnstile (v1.1.2): takes room only when the check asks the visitor to interact */
.k-turnstile { min-height: 0; }
.k-turnstile:empty { display: none; }
.k-form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.k-consent { margin: 0; max-width: 46ch; font: var(--weight-caption) var(--text-caption)/var(--leading-caption) var(--font-sans); letter-spacing: var(--tracking-caption); color: var(--fg-3); }
.k-consent a { color: var(--fg-2); }
.k-errsum { display: grid; gap: 6px; padding: 16px 18px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--error) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--error) 40%, transparent); }
.k-errsum:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.k-errsum-t { margin: 0; font: 600 var(--text-small)/var(--leading-small) var(--font-sans); color: var(--fg); }
.k-errsum ul { margin: 0; padding-left: 18px; font: 500 var(--text-small)/var(--leading-small) var(--font-sans); }
.k-errsum a { color: var(--error); }
.k-neterr { margin: 0; padding: 14px 16px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--error) 8%, transparent); font: 500 var(--text-small)/var(--leading-small) var(--font-sans); color: var(--fg); }
.k-neterr a { color: var(--fg); text-decoration: underline; text-underline-offset: .2em; }
.k-sent { display: grid; justify-items: start; gap: 12px; padding: var(--card-pad, 32px); border-radius: var(--radius-xl); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-soft, var(--line)); }
.k-sent:focus { outline: none; }
.k-sent:not([hidden]) { animation: kit-rise var(--kit-open) var(--kit-ease-settle) both; }
.k-sent-i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.k-sent-i .kit-i { width: 24px; height: 24px; animation: kit-tick var(--kit-open) var(--kit-ease-settle) 120ms both; }
.k-reply { display: grid; gap: 16px; padding: var(--card-pad, 32px); border-radius: var(--radius-xl); background: var(--bg-alt); box-shadow: inset 0 0 0 1px var(--line-soft, var(--line)); }
.k-reply-t { display: flex; align-items: center; gap: 10px; }
.k-reply-t .kit-i { width: 20px; height: 20px; color: var(--fg-2); }
.k-reply ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; font: var(--weight-small) var(--text-small)/var(--leading-small) var(--font-sans); color: var(--fg-2); }
.k-reply li { display: flex; align-items: flex-start; gap: 10px; }
.k-reply li .kit-i { width: 18px; height: 18px; margin-top: 1px; color: var(--fg-3); flex: none; }
.k-reply a { color: var(--fg); text-decoration: none; font-weight: 500; }
.k-reply a:hover { text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 899px) { .k-contact { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 559px) { .k-form-row { grid-template-columns: minmax(0, 1fr); } .k-form-foot .kit-btn { width: 100%; } .k-form { padding: var(--card-pad, 24px); } }

/* =================== 404 (R6): the compact hero, a search and the most useful pages =================== */
.k-404-code { font: 500 var(--text-caption)/var(--leading-caption) var(--font-mono); letter-spacing: .08em; color: var(--fg-3); }
.k-404-search { display: flex; align-items: center; gap: 12px; width: min(100%, 480px); min-height: 52px; margin-top: var(--lead-cta-gap, 32px); padding: 0 var(--kit-field-pad, 14px); border: 0; border-radius: 16px;
  background: var(--field, rgb(0 0 0 / .035)); box-shadow: inset 0 0 0 1px var(--line), inset 0 -1px 0 0 var(--line-strong); color: var(--fg-3); font: 400 var(--text-body)/1 var(--font-sans); text-align: left; cursor: pointer; }
.k-404-search:hover { background: var(--field-hover, rgb(0 0 0 / .05)); box-shadow: inset 0 0 0 1px var(--line-hover), inset 0 -1px 0 0 var(--line-strong); }
.k-404-search .kit-kbd { margin-left: auto; }
.k-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--grid-gap); margin: 0; padding: 0; list-style: none; }
.k-linkcard { display: grid; gap: var(--card-title-gap, 8px); height: 100%; padding: var(--card-pad-compact, 16px) 20px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-soft, var(--line)); color: var(--fg); text-decoration: none; transition: translate var(--kit-micro) var(--kit-ease-settle); }
.k-linkcard:hover { translate: 0 var(--kit-lift); box-shadow: inset 0 0 0 1px var(--line-hover); }
.k-linkcard b { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: var(--weight-title-sm) var(--text-title-sm)/var(--leading-title-sm) var(--font-sans); letter-spacing: var(--tracking-title-sm); }
.k-linkcard b .kit-i { width: 16px; height: 16px; color: var(--fg-3); }
.k-linkcard span { font: var(--weight-small) var(--text-small)/var(--leading-small) var(--font-sans); color: var(--fg-2); }

/* =================== Author (R8) =================== */
.k-author { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; padding-top: var(--crumb-gap, 32px); }
.k-author-p { width: clamp(96px, 12vw, 144px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: var(--sunk); box-shadow: 0 0 0 1px var(--line-soft, var(--line)); }
.k-author-t { display: grid; justify-items: start; }
.k-author-t > .k-eyebrow + h1 { margin-top: var(--eyebrow-gap, 12px); }
.k-author-role { margin: 8px 0 0; font: 500 var(--text-body)/var(--leading-body) var(--font-sans); color: var(--fg-2); }
.k-author-t .k-body { margin-top: var(--heading-lead-gap, 20px); }
.k-author-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 24px 0 0; padding: 0; list-style: none; }
.k-author-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font: 500 var(--text-small)/1 var(--font-sans); color: var(--accent-text); text-decoration: none; }
.k-author-links a:hover { text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 559px) { .k-author { grid-template-columns: minmax(0, 1fr); } }
.k-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--grid-gap); margin: 0; padding: 0; list-style: none; }
/* post cards share rows the same way: picture, title, date (V15); the date line starts level across a row */
.k-posts > li { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; }
.k-post { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; overflow: hidden; border-radius: var(--radius-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-soft, var(--line)); color: var(--fg); text-decoration: none; }
.k-post-m { aspect-ratio: 16 / 9; overflow: hidden; background: var(--k-frame-bg, var(--stage, var(--bg-alt))); }
.k-post-m img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale var(--kit-open) var(--kit-ease-settle); }
.k-post:hover .k-post-m img { scale: 1.02; }
.k-post-t { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: var(--card-title-gap, 8px); padding: 20px 24px 24px; }
.k-post-t b { font: var(--weight-title-sm) var(--text-title-sm)/var(--leading-title-sm) var(--font-sans); letter-spacing: var(--tracking-title-sm); }
.k-post-t span { font: var(--weight-caption) var(--text-caption)/var(--leading-caption) var(--font-sans); letter-spacing: var(--tracking-caption); color: var(--fg-3); }

/* =================== Article (R9): the post hero, then one reading column on the page grid =================== */
.k-article { display: grid; grid-template-columns: minmax(0, var(--w-prose, 68ch)) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.k-toc { position: sticky; top: calc(var(--kit-isl-h, 56px) + var(--kit-isl-top, 12px) + 24px); display: grid; gap: 10px; padding-left: 20px; border-left: 1px solid var(--line); }
.k-toc-t { margin: 0; font: 600 var(--text-small)/var(--leading-small) var(--font-sans); color: var(--fg); }
.k-toc ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font: var(--weight-small) var(--text-small)/var(--leading-small) var(--font-sans); }
.k-toc a { color: var(--fg-2); text-decoration: none; }
.k-toc a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 1023px) { .k-article { grid-template-columns: minmax(0, 1fr); } .k-toc { display: none; } }
.k-prose { min-width: 0; font: var(--weight-body) var(--text-body)/var(--leading-prose, 1.6) var(--font-sans); letter-spacing: var(--tracking-body); color: var(--fg-2); }
.k-prose > * { margin: 0; }
.k-prose > * + * { margin-top: 1.25em; }
.k-prose :is(h2, h3) { color: var(--fg); scroll-margin-top: 96px; text-wrap: balance; }
.k-prose h2 { margin-top: 2.4em; font: var(--weight-title) var(--text-title)/var(--leading-title) var(--font-sans); letter-spacing: var(--tracking-title); }
.k-prose h3 { margin-top: 2em; font: var(--weight-title-sm) var(--text-title-sm)/var(--leading-title-sm) var(--font-sans); letter-spacing: var(--tracking-title-sm); }
.k-prose :is(h2, h3) + * { margin-top: .75em; }
.k-prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.k-prose strong { color: var(--fg); font-weight: 600; }
.k-prose :is(ul, ol) { padding-left: 1.25em; }
.k-prose li + li { margin-top: .5em; }
.k-prose blockquote { padding-left: 20px; border-left: 2px solid var(--line-strong); color: var(--fg); font-size: var(--text-title-sm); line-height: var(--leading-title-sm); }
.k-prose figure img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line-soft, var(--line)); }
.k-prose figcaption { margin-top: 10px; font: var(--weight-caption) var(--text-caption)/var(--leading-caption) var(--font-sans); letter-spacing: var(--tracking-caption); color: var(--fg-3); }
.k-prose code { padding: .1em .35em; border-radius: 6px; background: var(--sunk); color: var(--fg); font: 500 .9em/1 var(--font-mono); }
.k-prose pre { overflow-x: auto; padding: 16px 20px; border-radius: var(--radius-md); background: var(--sunk); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-soft, var(--line)); }
.k-prose pre code { padding: 0; background: none; font: 400 var(--text-mono)/1.6 var(--font-mono); }
/* Tables (v1.1.8, VR-C17/VR-A25): one outer frame, every cell padded (the first column is no longer flush on the frame),
   row rules; in dark the frame and the rules reach 3:1. Below 600 px a wide table scrolls inside its frame, with a sticky
   first column and a fade on the side that has more, so nothing is squeezed or cut. */
.k-prose :is(table, .k-table-scroll) { --k-rule: var(--line); --k-frame: var(--line-strong); --k-fade: rgb(0 0 0 / .14); }
:root[data-theme="dark"] .k-prose :is(table, .k-table-scroll) { --k-rule: var(--line-strong); --k-fade: rgb(255 255 255 / .22); }
.k-prose .k-table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; box-shadow: 0 0 0 6px var(--focus-halo); border-radius: var(--radius-md); }
.k-prose table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--k-frame); border-radius: var(--radius-md);
  font: var(--weight-small) var(--text-small)/var(--leading-small) var(--font-sans); }
.k-prose :is(th, td) { padding: 12px 14px; border-bottom: 1px solid var(--k-rule); text-align: left; vertical-align: top; }
.k-prose tr:last-child > :is(th, td) { border-bottom: 0; }
.k-prose th { color: var(--fg); font-weight: 600; }
.k-prose td { color: var(--fg-2); }
@media (max-width: 599px) {
  /* the scroller is the kit's wrapper (v1.1.9, focusable and named while it overflows); a table not yet wrapped (before
     the kit script runs) scrolls by itself as before */
  .k-prose .k-table-scroll > table { border: 0; border-radius: 0; }
  .k-prose .k-table-scroll, .k-prose table:not(.k-table-scroll > table) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
    border: 1px solid var(--k-frame); border-radius: var(--radius-md);
    /* scroll shadows: a fade on whichever side has more columns (the local layers hide it at the ends) */
    background: linear-gradient(to right, var(--bg), var(--bg)) left / 24px 100% no-repeat local, linear-gradient(to left, var(--bg), var(--bg)) right / 24px 100% no-repeat local,
      linear-gradient(to right, var(--k-fade), transparent) left / 16px 100% no-repeat scroll, linear-gradient(to left, var(--k-fade), transparent) right / 16px 100% no-repeat scroll; }
  .k-prose :is(th, td) { min-width: 9rem; max-width: 16rem; }
  .k-prose tr > :first-child { position: sticky; left: 0; z-index: 1; min-width: 7rem; background: var(--bg); box-shadow: 1px 0 0 var(--k-rule); }
}
.k-prose hr { border: 0; border-top: 1px solid var(--line); }
/* The short answer (K4, v1.1.6): the one summary box at the top of a post, the same box and label on all three sites */
.k-prose .k-short { padding: var(--card-pad, 24px); border-radius: var(--radius-lg); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-soft, var(--line)); color: var(--fg); scroll-margin-top: 96px; }
.k-prose .k-short > * { margin: 0; }
.k-prose .k-short > * + * { margin-top: .75em; }
.k-prose .k-short-t { margin: 0; font: var(--weight-title-sm) var(--text-title-sm)/var(--leading-title-sm) var(--font-sans); letter-spacing: var(--tracking-title-sm); color: var(--eyebrow, var(--accent-text)); }
.k-prose .k-short > .k-short-t + * { margin-top: var(--eyebrow-gap, 12px); }
.k-byline { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; margin-top: var(--head-gap, 40px); padding-top: var(--card-block-gap, 24px); border-top: 1px solid var(--line); }
.k-byline img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.k-byline b { display: block; font: var(--weight-title-sm) var(--text-title-sm)/var(--leading-title-sm) var(--font-sans); color: var(--fg); }
.k-byline b a { color: inherit; text-decoration: none; }
.k-byline b a:hover { text-decoration: underline; text-underline-offset: .2em; }
.k-byline p { margin: 6px 0 0; font: var(--weight-small) var(--text-small)/var(--leading-small) var(--font-sans); color: var(--fg-2); }

/* reduced motion: nothing moves (opacity fades only) */
@media (prefers-reduced-motion: reduce) {
  .k-next-go, .k-next-p > *, .k-linkcard, .k-post-m img, .k-topic span { transition: none !important; }
  .k-next:hover .k-next-go, .k-linkcard:hover { translate: none; }
  .k-next:hover .k-next-p > *, .k-post:hover .k-post-m img { scale: none; }
}
:root[data-kit-motion="reduce"] :is(.k-next-go, .k-next-p > *, .k-linkcard, .k-post-m img) { transition: none !important; translate: none !important; scale: none !important; }
}
