/* ==========================================================================
   Flobotics website v2 — shared styles
   Brand system 2026 (v0.82): graphite structure, lab-white canvas, yellow
   marks evidence, logo blue lives only in the logo. Square corners; rounded
   pills are the one exception. Registers: corporate (default), lab, cto, ceo.
   ========================================================================== */

:root {
  --c-graphite: #15181A;
  --c-lab-white: #F4F6F5;
  --c-white: #FFFFFF;
  --c-yellow: #F2C230;
  --c-steel: #5B6568;
  --c-rule: #D5DADA;
  --c-rule-strong: #AEB6B7;
  --c-logo-blue: #325BF9; /* logo only */
  --c-paper: #FBFAF5;
  --c-pen: #23357F;
  --c-forest: #1F5641;
  --c-stone: #ECEAE4;
  --c-alarm: #F0705C;
  --c-pass: #1E8E5A;
  --c-fail: #C8402C;

  --bg: #F4F6F5;
  --surface: #FFFFFF;
  --surface-2: #EDF0EF;
  --ink: #15181A;
  --ink-2: #2A3033;
  --muted: #5B6568;
  --faint: #8A9496;
  --line: #D5DADA;
  --line-strong: #AEB6B7;
  --yellow: #F2C230;
  --on-yellow: #15181A;
  --yellow-soft: #FBEDB8;
  --forest: #1F5641;
  --pass: #1E8E5A;
  --fail: #C8402C;
  --panel: #15181A;
  --panel-2: #1F2427;
  --panel-ink: #E8ECEB;
  --panel-muted: #8E999B;
  --panel-line: #2F373A;
  --accent: var(--yellow);
  --accent-ink: var(--on-yellow);
  --focus: #15181A;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --f-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --f-head: var(--f-display);
  --head-stretch: 125%;
  --head-weight: 740;
  --head-track: -0.03em;

  --maxw: 1328px;
  --pad-x: clamp(18px, 2.6vw, 36px);
  --gutter: 28px;
  --sec-y: clamp(28px, 3vw, 44px); /* the site standard: same space above and below every section, on every page */
  --nav-h: 72px;
  --radius: 0px;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --t-fast: 120ms;
  --t-med: 220ms;

  --marker: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 18 C28 17 69 13 100 9 L100 88 C70 90 30 94 0 97 Z' fill='%23F2C230'/%3E%3C/svg%3E");
}
@media (max-width: 1024px) { :root { --gutter: 22px; } }
@media (max-width: 640px) { :root { --gutter: 16px; --nav-h: 64px; } }

/* ---------------- Reset and base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--yellow); color: var(--on-yellow); }
.sr-only, .u-sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.migration-skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 14px; font-weight: 600; }
.migration-skip:focus { top: 12px; }
main:focus { outline: none; }

/* ---------------- Layout ---------------- */
.container { max-width: calc(var(--maxw) + var(--pad-x) * 2); margin: 0 auto; padding-inline: var(--pad-x); }
.container.narrow { max-width: calc(880px + var(--pad-x) * 2); }
/* The Lab page keeps its own, roomier rhythm (as do CTO and CEO Notes, in notes.css). */
body[data-register="lab"] main { --sec-y: clamp(56px, 6vw, 88px); }
.section { padding-block: var(--sec-y); }
.section.tight { padding-block: var(--sec-y); }
.section.flush-top { padding-top: 0; }
.band { background: var(--band, #E8EBEA); border-block: 1px solid var(--line); }
/* Cards and panels inside a band are white with a visible edge: never white on white or gray on gray. */
.band .card, .band .quote, .band .proof, .band .member, .band .panel { background: var(--surface); border-color: var(--line-strong); }
.dark { background: var(--panel); color: var(--panel-ink); --ink: #E8ECEB; --ink-2: #C9D0D0; --muted: #98A2A4; --line: #2F373A; --line-strong: #46525A; --surface: #1C2124; --surface-2: #22292C; --bg: #15181A; --focus: #F2C230; }
.yellow { background: var(--c-yellow); color: #15181A; --ink: #15181A; --ink-2: #2A3033; --muted: #4A4636; --line: rgba(21, 24, 26, .28); --line-strong: #15181A; --bg: #FFFFFF; --surface: #FFFFFF; }
.grid { display: grid; gap: var(--gutter); grid-template-columns: minmax(0, 1fr); }
.grid-2 { display: grid; gap: var(--gutter); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: var(--gutter); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: var(--gutter); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-s { gap: 16px; }
@media (max-width: 1080px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.split.top { align-items: start; }
.split.wide-left { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
@media (max-width: 900px) { .split, .split.wide-left { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stack > * + * { margin-top: 16px; }
.center { text-align: center; }
.mt-s { margin-top: 16px; } .mt-m { margin-top: 32px; } .mt-l { margin-top: 56px; }

/* ---------------- Type ---------------- */
.label { font-family: var(--f-display); font-weight: 650; font-size: 14px; letter-spacing: .01em; line-height: 1.3; color: var(--ink); display: flex; width: fit-content; align-items: flex-start; gap: 10px; }
.label::before { content: ""; width: 18px; height: 8px; background: var(--yellow); display: inline-block; transform: skewX(-12deg) rotate(-1.5deg); flex: none; margin-top: .33em; }
.eyebrow, .meta { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11.5px; font-weight: 500; line-height: 1.5; letter-spacing: .06em; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; }
.mono { font-family: var(--f-mono); font-stretch: 87.5%; }
.num { font-variant-numeric: tabular-nums; }
.h-hero, .h-big, .h1, .h2 { font-family: var(--f-head); font-stretch: var(--head-stretch); font-weight: var(--head-weight); letter-spacing: var(--head-track); }
.h-hero { font-size: clamp(44px, 7.4vw, 112px); line-height: .92; font-weight: 800; letter-spacing: -.045em; }
.h-big { font-size: clamp(34px, 5vw, 64px); line-height: 1; letter-spacing: -.035em; max-width: 20ch; }
.h1 { font-size: clamp(36px, 5vw, 68px); line-height: 1.0; letter-spacing: -.035em; max-width: 22ch; }
.h1.long { font-size: clamp(32px, 4.2vw, 54px); line-height: 1.05; max-width: 26ch; }
.h2 { font-size: clamp(27px, 3.3vw, 42px); line-height: 1.08; max-width: 24ch; }
.h3 { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.22; letter-spacing: -.012em; }
.h4 { font-family: var(--f-display); font-stretch: 106%; font-weight: 650; font-size: 17px; line-height: 1.35; }
.lead { font-size: clamp(18px, 1.55vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 58ch; }
.body-s { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.muted { color: var(--muted); }
.mark { background-image: var(--marker); background-repeat: no-repeat; background-size: 100% 100%; color: var(--on-yellow); padding-inline: .08em; margin-inline: -.02em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hl { background-image: var(--marker); background-repeat: no-repeat; background-size: 100% 100%; color: var(--on-yellow); padding: 0 .15em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* Section header: label on top, headline left, lead right */
.intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.intro > .label, .intro > .eyebrow { grid-column: 1 / -1; }
.intro .lead { max-width: 46ch; }
.intro.solo { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .intro { grid-template-columns: minmax(0, 1fr); } }

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--f-display); font-stretch: 106%; font-weight: 600; font-size: 15px; letter-spacing: .01em; line-height: 1.1; padding: 14px 18px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--bg); cursor: pointer; text-align: left; transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn .arr { transition: transform var(--t-fast) var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
.btn.sm { padding: 10px 14px; font-size: 14px; }
.btn.yellow { background: var(--c-yellow); border-color: var(--c-yellow); color: #15181A; }
.yellow .btn { background: #15181A; color: #F2C230; border-color: #15181A; }
.yellow .btn.ghost { background: transparent; color: #15181A; }
.dark .btn { background: #F2C230; color: #15181A; border-color: #F2C230; }
.dark .btn.ghost { background: transparent; color: #E8ECEB; border-color: #E8ECEB; }
.btn-text { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 15px; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; line-height: 1.3; }
.btn-text .arr { transition: transform var(--t-fast) var(--ease); }
.btn-text:hover .arr, a:hover .btn-text .arr { transform: translateX(3px); }
.link, .prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; background-image: linear-gradient(var(--yellow), var(--yellow)); background-size: 0% 100%; background-repeat: no-repeat; transition: background-size var(--t-fast) var(--ease); }
.link:hover, .prose a:hover { background-size: 100% 100%; color: var(--on-yellow); }

/* ---------------- Pills, tags, chips ---------------- */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 12.5px; line-height: 1.4; padding: 4px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); white-space: nowrap; }
a.pill:hover { border-color: var(--ink); color: var(--ink); }
.tag { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border: 1px solid var(--line-strong); color: var(--ink-2); display: inline-block; line-height: 1.3; }
.tag.solid { background: var(--yellow); border-color: var(--yellow); color: #15181A; }
.chip-btn { font-size: 14px; font-weight: 550; padding: 8px 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: 999px; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.chip-btn:hover { border-color: var(--ink); }
.chip-btn[aria-pressed="true"], .chip-btn.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------------- Global navigation ---------------- */
.gnav { position: sticky; top: 0; z-index: 60; background: var(--bg); border-bottom: 1px solid var(--line-strong); }
.gnav-in { height: var(--nav-h); display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex: none; line-height: 0; }
.brand img { display: block; width: 186px; height: auto; }
.brand .brand-mark { display: none; width: 52px; }
.gnav-links { flex: 1; min-width: 0; }
.gnav-list { list-style: none; display: flex; align-items: center; gap: 2px; }
.gnav-item { position: relative; }
.gnav-top { display: inline-flex; align-items: center; gap: 6px; padding: 10px 10px; font-size: 14.5px; font-weight: 550; color: var(--ink-2); background: none; border: 0; cursor: pointer; white-space: nowrap; line-height: 1.2; }
.gnav-top:hover, .gnav-item.open > .gnav-top, .gnav-item:focus-within > .gnav-top { color: var(--ink); }
.gnav-top[aria-current="page"], .gnav-item.current > .gnav-top { color: var(--ink); }
/* Underline = the expanded menu, or the item under the pointer on desktop. Only ever one. */
.gnav-item.open > .gnav-top { box-shadow: inset 0 -2px 0 var(--ink); }
@media (hover: hover) and (min-width: 1191px) { .gnav-item:hover > .gnav-top { box-shadow: inset 0 -2px 0 var(--ink); } }
.gnav-top .caret { width: 9px; height: 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--t-fast) var(--ease); }
.gnav-item.open > .gnav-top .caret { transform: translateY(1px) rotate(-135deg); }
.gnav-top .lab-dot { width: 7px; height: 7px; background: var(--yellow); border: 1px solid #15181A; display: inline-block; }
/* Dropdowns: a full-width graphite index band under the nav. Numbered lines, the marker sweeps on hover,
   one real proof point on the right. */
.gnav-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: 70; display: none; background: var(--panel); color: var(--panel-ink); --focus: #F2C230; }
.gnav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }
.gnav-item.open > .gnav-menu { display: block; }
@media (hover: hover) and (min-width: 1191px) { .gnav-item.has-menu:hover > .gnav-menu { display: block; } }
.menu-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); grid-template-areas: "index proof" "more more"; gap: 28px 64px; padding-block: 36px 30px; }
.menu-index { grid-area: index; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--panel-line); }
.menu-index a { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 13px 0 12px; border-bottom: 1px solid var(--panel-line); }
.menu-n { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11.5px; letter-spacing: .06em; color: var(--panel-muted); }
.menu-t { justify-self: start; font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: clamp(22px, 2.1vw, 30px); line-height: 1.15; letter-spacing: -.025em; color: var(--panel-ink); padding-inline: .12em; margin-inline: -.12em; background-image: var(--marker); background-repeat: no-repeat; background-position: 0 50%; background-size: 0% 100%; transition: background-size 320ms var(--ease), color 160ms var(--ease); }
.menu-index a:hover .menu-t, .menu-index a:focus-visible .menu-t { background-size: 100% 100%; color: #15181A; }
.menu-index a:hover .menu-n, .menu-index a:focus-visible .menu-n { color: #F2C230; }
.menu-proof { grid-area: proof; align-self: start; display: grid; gap: 10px; padding-left: 28px; border-left: 1px solid var(--panel-line); color: var(--panel-ink); }
.menu-proof-k { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--panel-muted); }
.menu-proof strong { font-family: var(--f-display); font-stretch: 118%; font-weight: 780; font-size: clamp(22px, 1.9vw, 28px); line-height: 1.08; letter-spacing: -.03em; }
.menu-proof-s { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 12px; color: var(--panel-muted); }
.menu-proof-go { justify-self: start; margin-top: 6px; font-weight: 600; font-size: 14px; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.menu-proof:hover .menu-proof-go, .menu-proof:focus-visible .menu-proof-go { color: #F2C230; }
.menu-more { grid-area: more; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; font-size: 13.5px; color: var(--panel-muted); }
.menu-more > span { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.menu-more a { color: var(--panel-ink); }
.menu-more a:hover { color: #F2C230; }
.menu-more .menu-all { margin-left: auto; font-weight: 600; }
.gnav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.gnav-cta { white-space: nowrap; height: 40px; padding-block: 0; }
.icon-btn { width: 40px; height: 40px; border: 1px solid var(--line-strong); background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.menu-btn { display: none; }
@media (max-width: 1280px) { .gnav-top { padding: 10px 8px; font-size: 14px; } .gnav-in { gap: 16px; } }
@media (min-width: 1191px) { .gnav-top .caret { display: none; } .gnav-item { position: static; } }
@media (max-width: 1190px) {
  .menu-btn { display: grid; }
  .gnav-links { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; background: var(--bg); overflow-y: auto; padding: 8px var(--pad-x) 40px; border-top: 1px solid var(--line); }
  .gnav.open .gnav-links { display: block; }
  .gnav-list { display: grid; gap: 0; }
  .gnav-item { border-bottom: 1px solid var(--line); }
  .gnav-top { width: 100%; justify-content: space-between; padding: 16px 2px; font-size: 18px; font-weight: 650; color: var(--ink); box-shadow: none !important; }
  .gnav-menu { position: static; background: transparent; color: inherit; padding: 0 0 14px; }
  .gnav-menu::before { display: none; }
  .menu-band { display: block; padding: 0; }
  .menu-index { border-top: 0; }
  .menu-index a { grid-template-columns: 30px minmax(0, 1fr); padding: 9px 0; border-bottom: 0; }
  .menu-n { color: var(--muted); }
  .menu-t { font-stretch: 100%; font-weight: 600; font-size: 17px; letter-spacing: -.01em; color: var(--ink); }
  .menu-proof { display: none; }
  .menu-more { padding: 8px 0 0 42px; color: var(--muted); }
  .menu-more a { color: var(--ink); }
  .menu-more .menu-all { margin-left: 0; }
}
@media (max-width: 620px) { .brand .brand-full { display: none; } .brand .brand-mark { display: block; } .gnav-cta { padding: 10px 12px; } }
html.nav-open { overflow: hidden; }

/* ---------------- Breadcrumbs ---------------- */
.crumbs { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11.5px; letter-spacing: .04em; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs span[aria-hidden] { color: var(--line-strong); }

/* ---------------- Page hero ---------------- */
.phero { padding-block: var(--sec-y); border-bottom: 1px solid var(--line); }
.phero .crumbs { margin-bottom: 28px; }
.phero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: end; }
.phero-grid.center-y { align-items: center; }
.phero h1 { margin-top: 18px; }
.phero .label + h1 { margin-top: 18px; }
.phero .lead { margin-top: 22px; }
.phero .row { margin-top: 28px; }
.phero-aside { display: grid; gap: 16px; }
.phero-aside img { width: 100%; display: block; border: 1px solid var(--line); background: var(--surface); }
.phero.dark { border-bottom: 0; }
@media (max-width: 900px) { .phero-grid { grid-template-columns: minmax(0, 1fr); } }

/* Proof strip under a hero */
.proof-strip { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 32px; }
.proof-strip strong { color: var(--ink); font-weight: 650; }
.proof-strip img { height: 26px; width: auto; vertical-align: middle; }

/* ---------------- Cards ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); padding: 24px; display: grid; gap: 12px; align-content: start; position: relative; transition: border-color var(--t-fast) var(--ease); min-width: 0; }
a.card:hover { border-color: var(--ink); }
.card.flag::before { content: ""; position: absolute; top: -1px; left: -1px; width: 14px; height: 14px; background: var(--yellow); }
.card h3 { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: 20px; line-height: 1.25; letter-spacing: -.01em; }
.card p { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.card .btn-text { justify-self: start; margin-top: 4px; }
.card .num-big { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: clamp(34px, 3.6vw, 50px); line-height: .95; letter-spacing: -.045em; }

/* Post card (blog, news, notes) */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px var(--gutter); }
@media (max-width: 1000px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: minmax(0, 1fr); } }
.post-card { display: grid; gap: 14px; align-content: start; min-width: 0; }
.post-card .pc-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.post-card .pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--t-med) var(--ease); }
.post-card:hover .pc-img img { transform: scale(1.02); }
.post-card .pc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.post-card h3 { font-family: var(--f-display); font-stretch: 106%; font-weight: 680; font-size: 20px; line-height: 1.25; letter-spacing: -.01em; }
.post-card:hover h3 { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.post-card p { font-size: 15px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .pc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.post-card.reg-cto .pc-meta::before { content: "CTO Notes"; color: var(--ink); font-weight: 600; }
.post-card.reg-ceo .pc-meta::before { content: "CEO Notes"; color: var(--forest); font-weight: 600; }
/* While CTO/CEO Notes are parked (site.config.mjs hiddenPages), article cards drop the series label. */
html[data-parked~="cto-notes"] .post-card.reg-cto .pc-meta::before, html[data-parked~="ceo-notes"] .post-card.reg-ceo .pc-meta::before { content: none; }
.post-card.featured { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.post-card.featured h3 { font-stretch: 118%; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.1; letter-spacing: -.025em; }
@media (max-width: 800px) { .post-card.featured { grid-template-columns: minmax(0, 1fr); } }

/* Case card: a paper sheet (same paper as the hero fax), slightly tilted, with the client logo and workflow tag on
   top, the result number on a yellow marker with one line of context, then the title. Used on every page. */
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
@media (max-width: 860px) { .case-grid { grid-template-columns: minmax(0, 1fr); } }
.case-card { --paper: #FBFAF5; --type: #1E2022; --faint-type: #6D6F68; --ink: #1E2022; --ink-2: #3A3D3A; --muted: #6D6F68; --line: #DCD8CB; position: relative; display: grid; grid-template-rows: auto 1fr; min-width: 0; background: var(--paper); color: var(--type); box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 18px 34px -20px rgba(21, 24, 26, .5); transform: rotate(-.8deg); transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); isolation: isolate; }
.case-card:nth-child(even) { transform: rotate(.7deg); }
.case-card:hover, .case-card:focus-visible { transform: rotate(0deg) translateY(-2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 24px 40px -20px rgba(21, 24, 26, .55); }
.case-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3; background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .028) 0 1px, transparent 1px 3px); }
.case-card .cc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px dashed #C9C4B5; min-height: 64px; }
.case-card .cc-top .eyebrow { color: var(--faint-type); white-space: nowrap; }
.case-card .cc-logo { height: 28px; width: auto; max-width: 150px; object-fit: contain; object-position: left center; }
.case-card .tag { background: none; border-color: var(--type); color: var(--type); }
.case-card .cc-body { padding: 22px; display: grid; gap: 14px; align-content: start; }
.case-card .cc-stat { display: grid; gap: 4px; border-bottom: 1px dashed #C9C4B5; padding-bottom: 16px; }
.case-card .cc-stat strong { justify-self: start; padding: 0 .08em; font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: clamp(40px, 4.4vw, 64px); line-height: .92; letter-spacing: -.05em; background: linear-gradient(transparent 52%, var(--yellow) 52%, var(--yellow) 92%, transparent 92%); color: var(--type); }
.case-card .cc-stat span { font-size: 14.5px; line-height: 1.45; color: var(--faint-type); }
.case-card h2, .case-card h3 { font-family: var(--f-display); font-stretch: 106%; font-weight: 680; font-size: 18.5px; line-height: 1.3; }
.case-card p { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.case-card .cc-sum { margin-top: -6px; color: var(--faint-type); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.case-card .btn-text { justify-self: start; color: var(--type); }
/* Narrower grids (three or four across) get a smaller number. */
.post-grid .case-card .cc-stat strong, .brief-cases .case-card .cc-stat strong { font-size: clamp(34px, 3.2vw, 48px); }
.post-grid.four .case-card .cc-stat strong { font-size: clamp(30px, 2.5vw, 38px); }
.post-grid.four .case-card .cc-top, .post-grid.four .case-card .cc-body { padding-inline: 18px; }
@media (prefers-reduced-motion: reduce) { .case-card, .case-card:nth-child(even), .case-card:hover { transform: none; } }

/* Big numbers */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 24px 24px 4px 0; display: grid; gap: 8px; align-content: start; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat strong { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: clamp(36px, 4.2vw, 60px); line-height: .92; letter-spacing: -.045em; }
.stat span { font-size: 15px; line-height: 1.45; color: var(--ink-2); max-width: 28ch; }
.stat .src { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; color: var(--muted); }
@media (max-width: 900px) { .stats, .stats.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat:nth-child(3) { padding-left: 0; border-left: 0; } }
@media (max-width: 520px) { .stats, .stats.three { grid-template-columns: minmax(0, 1fr); } .stat, .stat + .stat { padding: 20px 0 0; border-left: 0; } }

/* Logo wall */
.logos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.logos > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; place-items: center; padding: 22px 18px; min-height: 92px; background: var(--surface); }
.logos img { max-height: 34px; max-width: 132px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter var(--t-fast), opacity var(--t-fast); }
.logos > *:hover img { filter: none; opacity: 1; }
@media (max-width: 900px) { .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Quotes */
.quote { background: var(--surface); border: 1px solid var(--line); padding: 28px; display: grid; gap: 18px; align-content: space-between; min-width: 0; }
.quote blockquote { font-family: var(--f-display); font-stretch: 106%; font-weight: 520; font-size: 18px; line-height: 1.5; }
.quote blockquote::before { content: "“"; display: block; font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 56px; line-height: .6; color: var(--yellow); margin-bottom: 6px; }
.quote footer { display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; }
.quote footer img { width: 44px; height: 44px; object-fit: cover; filter: grayscale(1); }
.quote footer strong { display: block; font-size: 15px; font-weight: 650; }
.quote footer span { display: block; font-size: 13.5px; color: var(--muted); }
.quote .q-logo { height: 26px; width: auto; max-width: 120px; object-fit: contain; object-position: left; }

/* Checklist and steps */
.checklist { list-style: none; display: grid; gap: 10px; }
.checklist li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.checklist li::before { content: ""; width: 10px; height: 10px; background: var(--yellow); border: 1px solid var(--ink); margin-top: 7px; }
.steps { list-style: none; display: grid; border-top: 2px solid var(--ink); counter-reset: step; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.steps > li::before { content: counter(step, decimal-leading-zero); font-family: var(--f-mono); font-stretch: 87.5%; font-size: 13px; font-weight: 600; padding-top: 4px; }
.steps h3 { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: 20px; line-height: 1.25; }
.steps p { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); margin-top: 6px; max-width: 62ch; }
.steps.cols { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); border-top: 0; gap: var(--gutter); }
.steps.cols > li { grid-template-columns: minmax(0, 1fr); border-top: 2px solid var(--ink); border-bottom: 0; padding-top: 16px; }
@media (max-width: 860px) { .steps.cols { grid-template-columns: minmax(0, 1fr); } }

/* Feature rows (service list) */
.rows { display: grid; border-top: 1px solid var(--ink); }
.rows > a, .rows > div { display: grid; grid-template-columns: minmax(140px, .5fr) minmax(0, 1.4fr) auto; gap: 18px 28px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.rows .r-k { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rows h3 { font-family: var(--f-display); font-stretch: 106%; font-weight: 680; font-size: 20px; line-height: 1.25; }
.rows p { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin-top: 4px; }
.rows .arr { font-size: 18px; transition: transform var(--t-fast); }
.rows > a:hover .arr { transform: translateX(4px); }
.rows > a:hover h3 { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }
@media (max-width: 760px) { .rows > a, .rows > div { grid-template-columns: minmax(0, 1fr) auto; } .rows .r-k { grid-column: 1 / -1; } }

/* FAQ */
.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 16px; padding: 20px 0; font-family: var(--f-display); font-stretch: 106%; font-weight: 650; font-size: 18px; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); font-size: 22px; line-height: 1; text-align: center; transition: transform var(--t-fast); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 44px 22px 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.faq .faq-a > * + * { margin-top: .8em; }
.faq .faq-a a { text-decoration: underline; text-underline-offset: 3px; }

/* CTA band */
.cta-band { padding-block: var(--sec-y); }
.cta-band .cta-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.cta-band h2 { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: clamp(40px, 6vw, 88px); line-height: .92; letter-spacing: -.05em; }
.cta-band .lead { margin-top: 20px; }
.cta-person { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: center; background: #FFFFFF; color: #15181A; border: 1.5px solid #15181A; box-shadow: 8px 8px 0 #15181A; padding: 18px; }
.cta-person img { width: 96px; height: 96px; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.cta-person strong { display: block; font-size: 17px; font-weight: 700; }
.cta-person span { display: block; font-size: 14px; color: #5B6568; }
.cta-person .btn { margin-top: 12px; }
@media (max-width: 860px) { .cta-band .cta-grid { grid-template-columns: minmax(0, 1fr); } }

/* Media */
.media { border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.media img { display: block; width: 100%; height: auto; }
.media.crop { aspect-ratio: var(--ar, 16 / 10); }
.media.crop img { height: 100%; object-fit: cover; }
.media figcaption, figure.media > .cap { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; color: var(--muted); padding: 10px 12px; border-top: 1px solid var(--line); }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table.t, .prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.t th, .t td, .prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t th, .prose th { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface-2); }

/* ---------------- Article (blog, case study, news) ---------------- */
.post-hero { padding-block: clamp(32px, 5vw, 64px) 32px; }
.post-hero .crumbs { margin-bottom: 28px; }
.post-hero .pc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.post-hero h1 { font-family: var(--f-head); font-stretch: var(--head-stretch); font-weight: var(--head-weight); letter-spacing: -.03em; font-size: clamp(32px, 4.4vw, 58px); line-height: 1.04; max-width: 24ch; }
.post-hero .lead { margin-top: 20px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.byline .who { display: flex; gap: 12px; align-items: center; }
.byline img { width: 44px; height: 44px; object-fit: cover; border-radius: 50%; filter: grayscale(1); }
.byline strong { display: block; font-size: 15px; font-weight: 650; line-height: 1.3; }
.byline .who span { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; }
.byline .dates { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11.5px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.post-cover { margin-top: 8px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.post-cover img { display: block; width: 100%; height: auto; max-height: 640px; object-fit: cover; }
.post-layout { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); padding-block: 48px var(--sec-y); align-items: start; }
.post-layout.no-aside { grid-template-columns: minmax(0, 1fr); }
.post-aside { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 24px; max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; scrollbar-width: thin; }
.toc { border-top: 2px solid var(--ink); padding-top: 12px; }
.toc p { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; display: grid; gap: 2px; }
.toc a { display: block; font-size: 14px; line-height: 1.35; padding: 6px 0 6px 12px; border-left: 2px solid var(--line); color: var(--ink-2); }
.toc a.sub { padding-left: 24px; font-size: 13px; color: var(--muted); }
.toc a:hover { border-left-color: var(--ink-2); color: var(--ink); }
.toc a.is-current { border-left-color: var(--yellow); color: var(--ink); font-weight: 600; }
.aside-cta { background: var(--panel); color: var(--panel-ink); padding: 20px; display: grid; gap: 10px; }
.aside-cta strong { font-size: 16px; line-height: 1.3; }
.aside-cta p { font-size: 13.5px; line-height: 1.45; color: var(--panel-muted); }
.aside-cta .btn { background: #F2C230; color: #15181A; border-color: #F2C230; justify-self: start; }
.share { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.share p { width: 100%; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.share a, .share button { width: 36px; height: 36px; border: 1px solid var(--line-strong); display: grid; place-items: center; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.share a:hover, .share button:hover { border-color: var(--ink); background: var(--yellow); }
.share svg { width: 16px; height: 16px; fill: currentColor; }
@media (max-width: 960px) { .post-layout { grid-template-columns: minmax(0, 1fr); } .post-aside { position: static; max-height: none; order: 2; } .post-aside .toc { display: none; } }

/* Prose: migrated rich text */
.prose { max-width: 72ch; color: var(--ink-2); font-size: 17.5px; line-height: 1.7; min-width: 0; }
.prose > * + * { margin-top: 1.05em; }
.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { color: var(--ink); font-family: var(--f-head); scroll-margin-top: calc(var(--nav-h) + 24px); }
.prose h2 { font-stretch: var(--head-stretch); font-weight: var(--head-weight); font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; letter-spacing: -.025em; margin-top: 2.2em; padding-top: 18px; border-top: 2px solid var(--ink); }
.prose h3 { font-stretch: 112%; font-weight: 700; font-size: clamp(20px, 1.9vw, 24px); line-height: 1.25; letter-spacing: -.012em; margin-top: 1.8em; }
.prose h4, .prose h5, .prose h6 { font-stretch: 106%; font-weight: 680; font-size: 18.5px; line-height: 1.35; margin-top: 1.5em; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose strong, .prose b { color: var(--ink); font-weight: 650; }
.prose ul, .prose ol { padding-left: 0; list-style: none; display: grid; gap: .5em; }
.prose ul > li { position: relative; padding-left: 26px; }
.prose ul > li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 9px; height: 9px; background: var(--yellow); border: 1px solid var(--ink); }
.prose ol { counter-reset: li; }
.prose ol > li { position: relative; padding-left: 36px; counter-increment: li; }
.prose ol > li::before { content: counter(li, decimal-leading-zero); position: absolute; left: 0; top: .28em; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 12px; font-weight: 600; color: var(--ink); }
.prose li > ul, .prose li > ol { margin-top: .5em; }
.prose blockquote { border-left: 3px solid var(--yellow); padding: 4px 0 4px 20px; font-family: var(--f-display); font-stretch: 106%; font-weight: 520; font-size: 1.08em; color: var(--ink); }
.prose figure { margin-block: 1.8em; max-width: 100%; }
.prose figure img, .prose > img { display: block; width: auto; max-width: 100%; height: auto; margin-inline: auto; border: 1px solid var(--line); background: var(--surface); }
.prose figure > div { display: block; }
.prose figcaption { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11.5px; color: var(--muted); margin-top: 8px; text-align: center; }
.prose .w-richtext-align-fullwidth, .prose .w-richtext-align-center { text-align: center; }
.prose .w-richtext-align-floatleft { float: left; margin: .4em 1.4em 1em 0; max-width: 45%; }
.prose .w-embed-youtubevideo, .prose .w-richtext-figure-type-video > div { position: relative; padding-top: 56.25%; }
.prose .w-embed-youtubevideo iframe, .prose .w-richtext-figure-type-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose table { display: block; overflow-x: auto; font-size: 15px; line-height: 1.5; border: 1px solid var(--line); background: var(--surface); }
.prose code { font-family: var(--f-mono); font-stretch: 87.5%; font-size: .86em; background: var(--surface-2); padding: .1em .35em; }
.prose pre { background: var(--panel); color: var(--panel-ink); padding: 16px 18px; overflow-x: auto; font-size: 13.5px; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.prose::after { content: ""; display: table; clear: both; }
.prose .embed-cta { margin-block: 2em; }

/* Inline CTA inside articles */
.embed-cta { background: var(--panel); color: var(--panel-ink); padding: clamp(22px, 3vw, 32px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: center; }
.embed-cta strong { font-family: var(--f-display); font-stretch: 118%; font-weight: 740; font-size: clamp(20px, 2vw, 26px); line-height: 1.12; letter-spacing: -.02em; color: #E8ECEB; display: block; }
.embed-cta p { color: #98A2A4; font-size: 15px; margin-top: 8px !important; }
.embed-cta .btn { background: #F2C230; color: #15181A; border-color: #F2C230; }
.embed-cta a.btn:hover { background: #F2C230; color: #15181A; }
@media (max-width: 640px) { .embed-cta { grid-template-columns: minmax(0, 1fr); } }

/* Key takeaways / summary box */
.keybox { background: var(--surface); border: 1.5px solid var(--ink); padding: 24px 26px; position: relative; }
.keybox::before { content: ""; position: absolute; top: -1.5px; left: -1.5px; width: 14px; height: 14px; background: var(--yellow); }
.keybox .eyebrow { display: block; margin-bottom: 10px; }

/* Case study specifics */
.cs-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.cs-facts > div { padding: 14px 18px; border-right: 1px solid var(--line); display: grid; gap: 4px; }
.cs-facts > div:last-child { border-right: 0; }
.cs-facts b { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cs-facts span { font-weight: 600; font-size: 15px; }
.cs-facts img { height: 26px; width: auto; max-width: 130px; object-fit: contain; object-position: left; }
.cs-stat-hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-top: 24px; }
.cs-stat-hero strong { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: clamp(56px, 8vw, 120px); line-height: .88; letter-spacing: -.055em; }
.cs-stat-hero span { font-size: 18px; line-height: 1.45; max-width: 36ch; color: var(--ink-2); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; border-top: 2px solid var(--ink); margin-block: 1.6em; }
.kpis > div { padding: 18px 18px 4px 0; display: grid; gap: 6px; }
.kpis strong { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 34px; line-height: .95; letter-spacing: -.04em; color: var(--ink); }
.kpis span { font-size: 14.5px; line-height: 1.45; }

/* Author box */
.author-box { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 18px; align-items: start; border-top: 2px solid var(--ink); padding-top: 22px; margin-top: 48px; max-width: 72ch; }
.author-box img { width: 72px; height: 72px; object-fit: cover; filter: grayscale(1); }
.author-box strong { font-size: 17px; font-weight: 700; display: block; }
.author-box p { font-size: 15px; color: var(--ink-2); margin-top: 4px; }
.author-box a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- Listing controls ---------------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 32px; }
.filters .search { flex: 1 1 260px; max-width: 360px; margin-left: auto; }
.search input { background: var(--surface); }
.pager, .migration-pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 56px; }
.pager a, .pager span, .migration-pagination a, .migration-pagination span { min-width: 44px; height: 44px; padding: 0 12px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); font-family: var(--f-mono); font-stretch: 87.5%; font-size: 13px; background: var(--surface); }
.pager a:hover, .migration-pagination a:hover { border-color: var(--ink); }
.pager [aria-current="page"], .migration-pagination [aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.migration-filter-status { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.empty { border: 1px dashed var(--line-strong); padding: 32px; text-align: center; color: var(--muted); }

/* Glossary */
.gloss-az { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 32px; }
.gloss-az a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-strong); font-family: var(--f-mono); font-stretch: 87.5%; font-size: 13px; background: var(--surface); }
.gloss-az a:hover { background: var(--yellow); border-color: var(--ink); }
.gloss-list { display: grid; border-top: 2px solid var(--ink); }
.gloss-item { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: 12px 40px; padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 20px); }
.gloss-item h3 { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: 20px; line-height: 1.25; }
.gloss-item .tag { justify-self: start; margin-top: 8px; }
.gloss-item p { color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.gloss-item .btn-text { margin-top: 10px; font-size: 14px; }
@media (max-width: 760px) { .gloss-item { grid-template-columns: minmax(0, 1fr); } }

/* Forms */
.form { background: var(--surface); border: 1.5px solid var(--ink); padding: clamp(20px, 3vw, 32px); display: grid; gap: 16px; box-shadow: 8px 8px 0 var(--ink); color: var(--ink); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 6px; }
label, .field > span { font-size: 13.5px; font-weight: 600; color: var(--ink); }
input, select, textarea { width: 100%; font: inherit; font-size: 15.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 0; padding: 12px 13px; transition: border-color var(--t-fast); }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
textarea { resize: vertical; min-height: 140px; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; padding: 0; accent-color: #15181A; flex: none; margin-top: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14px; line-height: 1.45; }
.check a { text-decoration: underline; text-underline-offset: 3px; }
.form .btn { justify-self: start; }
.form-note { font-size: 13px; color: var(--muted); }
.migration-form-notice { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 12px; line-height: 1.5; padding: 10px 12px; background: var(--yellow-soft); border: 1px solid var(--ink); color: #15181A; }
.migration-honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.migration-search-results { display: grid; gap: 0; margin-top: 24px; border-top: 2px solid var(--ink); }
.migration-search-results a { display: grid; gap: 4px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.migration-search-results h2 { font-family: var(--f-display); font-stretch: 106%; font-weight: 680; font-size: 19px; line-height: 1.3; }
.migration-search-results p { font-size: 15px; color: var(--ink-2); }
.migration-search-results a:hover h2 { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }

/* ---------------- Footer ---------------- */
.gfoot { background: var(--panel); color: var(--panel-ink); --ink: #E8ECEB; --ink-2: #C9D0D0; --muted: #8E999B; --line: #2F373A; --focus: #F2C230; }
.gfoot a:hover { color: #F2C230; }
.gfoot-cta { border-bottom: 1px solid var(--panel-line); }
.gfoot-cta .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding-block: 40px; }
.gfoot-cta strong { font-family: var(--f-display); font-stretch: 125%; font-weight: 780; font-size: clamp(28px, 3.4vw, 44px); line-height: 1; letter-spacing: -.035em; max-width: 20ch; }
.gfoot-cta .btn { background: #F2C230; color: #15181A; border-color: #F2C230; }
.gfoot-main { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 32px; padding-block: 56px; }
.gfoot-main h2 { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--panel-muted); margin-bottom: 14px; }
.gfoot-main ul { list-style: none; display: grid; gap: 9px; font-size: 15px; }
.gfoot-brand img { width: 170px; height: auto; display: block; filter: brightness(0) invert(1); }
.gfoot-brand p { font-size: 15px; line-height: 1.55; color: var(--panel-muted); max-width: 36ch; margin-top: 16px; }
.gfoot-brand .contact { display: grid; gap: 4px; margin-top: 18px; font-size: 15px; }
.gfoot-badges { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.gfoot-badges img { height: 40px; width: auto; background: #FFFFFF; padding: 4px 6px; }
.gfoot-social { display: flex; gap: 8px; margin-top: 18px; }
.gfoot-social a { width: 36px; height: 36px; border: 1px solid var(--panel-line); display: grid; place-items: center; }
.gfoot-social a:hover { border-color: #F2C230; }
.gfoot-social svg { width: 16px; height: 16px; fill: currentColor; }
.gfoot-base { border-top: 1px solid var(--panel-line); }
.gfoot-base .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 18px; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; color: var(--panel-muted); }
.gfoot-base nav { display: flex; gap: 18px; flex-wrap: wrap; }
@media (max-width: 1000px) { .gfoot-main { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gfoot-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .gfoot-main { grid-template-columns: minmax(0, 1fr); } }

/* ---------------- Registers ---------------- */
/* Lab: graph paper, yellow-led */
body[data-register="lab"] { --bg: #EEF1EF; }
.graph { --grid-minor: rgba(21, 24, 26, .045); --grid-major: rgba(21, 24, 26, .09); background-image: linear-gradient(var(--grid-major) 1px, transparent 1px), linear-gradient(90deg, var(--grid-major) 1px, transparent 1px), linear-gradient(var(--grid-minor) 1px, transparent 1px), linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px); background-size: 64px 64px, 64px 64px, 8px 8px, 8px 8px; }
.lab-lock { display: inline-flex; font-family: var(--f-mono); font-stretch: 100%; font-weight: 600; font-size: 12px; letter-spacing: .1em; border: 1.5px solid var(--ink); line-height: 1; white-space: nowrap; }
.lab-lock span { padding: 6px 9px; }
.lab-lock .lab { background: var(--yellow); color: #15181A; border-left: 1.5px solid var(--ink); }
.lab-lock.big { font-size: 15px; } .lab-lock.big span { padding: 8px 12px; }

/* CTO Notes: night shift by default, bone text, yellow marker, alarm red */
body[data-register="cto"] {
  color-scheme: dark;
  --bg: #0B0E0F; --surface: #13171A; --surface-2: #1A1F22; --ink: #ECEBE4; --ink-2: #C9CBC5; --muted: #8F9794; --faint: #5E6765; --line: #242A2D; --line-strong: #3A4346; --yellow-soft: #3A3217; --fail: #F0705C; --pass: #45BE85; --panel: #050707; --panel-2: #101415; --panel-line: #242A2D; --focus: #F2C230;
}
:root[data-theme="light"] body[data-register="cto"] {
  color-scheme: light;
  --bg: #F6F7F4; --surface: #FFFFFF; --surface-2: #ECEEEA; --ink: #121517; --ink-2: #2A3033; --muted: #5B6568; --faint: #8A9496; --line: #DADDD8; --line-strong: #AEB6B7; --yellow-soft: #FBEDB8; --fail: #C8402C; --panel: #15181A; --panel-2: #1F2427; --panel-line: #2F373A; --focus: #15181A;
}
.brand .logo-dark { display: none; }
body[data-register="cto"] .btn { background: var(--ink); color: var(--bg); border-color: var(--ink); }
body[data-register="cto"] .btn.ghost { background: transparent; color: var(--ink); }
body[data-register="cto"] .post-hero h1 { font-stretch: 125%; }
body[data-register="cto"] .prose h2 { border-top-color: var(--yellow); }
body[data-register="cto"] .post-cover, body[data-register="cto"] .prose figure img { border-color: var(--line); }
body[data-register="cto"] .yellow { color: #15181A; }
.reg-note { display: inline-flex; gap: 10px; align-items: center; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.reg-note i { width: 8px; height: 8px; background: var(--yellow); display: inline-block; }

/* CEO Notes: stone room, serif voice, forest accent */
body[data-register="ceo"] {
  --bg: #ECEAE4; --surface: #F6F5F1; --surface-2: #E3E0D8; --ink: #1E211F; --ink-2: #353834; --muted: #5E605A; --faint: #8C8C84; --line: #D6D3CB; --line-strong: #B5B1A6; --accent: var(--forest); --accent-ink: #FFFFFF;
  --f-head: var(--f-serif); --head-stretch: 100%; --head-weight: 480; --head-track: -0.015em;
}
body[data-register="ceo"] .post-hero h1, body[data-register="ceo"] .phero h1 { font-weight: 460; letter-spacing: -.02em; }
body[data-register="ceo"] .prose { font-family: var(--f-serif); font-size: 19.5px; line-height: 1.65; }
body[data-register="ceo"] .prose h2 { font-weight: 520; border-top: 1px solid var(--forest); letter-spacing: -.01em; }
body[data-register="ceo"] .prose h3, body[data-register="ceo"] .prose h4 { font-family: var(--f-serif); font-stretch: 100%; font-weight: 600; }
body[data-register="ceo"] .prose ul > li::before { background: var(--forest); border-color: var(--forest); border-radius: 50%; width: 7px; height: 7px; top: .72em; }
body[data-register="ceo"] .prose blockquote { border-left-color: var(--forest); font-family: var(--f-serif); font-style: italic; }
body[data-register="ceo"] .label::before { background: var(--forest); }
body[data-register="ceo"] .toc a.is-current { border-left-color: var(--forest); }
body[data-register="ceo"] .byline img, body[data-register="ceo"] .author-box img { filter: sepia(.25) grayscale(.6); }

/* ---------------- Motion ---------------- */
.rot { display: inline-grid; vertical-align: bottom; }
.rot > span { grid-area: 1 / 1; transition: opacity 360ms var(--ease), transform 360ms var(--ease); }
.rot > span[aria-hidden="true"] { opacity: 0; transform: translateY(.3em); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------------- Preview toolbar (review builds only) ---------------- */
.migration-toolbar { position: fixed; left: 12px; bottom: 12px; z-index: 120; display: flex; gap: 8px; align-items: center; background: #15181A; color: #E8ECEB; border: 1px solid #F2C230; padding: 6px 10px; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; letter-spacing: .06em; }
.migration-toolbar label, .migration-toolbar #advisor-switch, .migration-toolbar #motion-switch { display: none; }
.migration-toolbar button { background: none; border: 1px solid #3A4448; color: #E8ECEB; cursor: pointer; padding: 2px 8px; }

/* ---------------- Fixes after first review ---------------- */
.gfoot-cta .btn.ghost { background: transparent; color: #E8ECEB; border-color: #E8ECEB; }
.gfoot-cta .btn.ghost:hover { background: #E8ECEB; color: #15181A; }
.gfoot-badges img { background: none; padding: 0; filter: brightness(0) invert(1); opacity: .75; }
body[data-template="index"] .gfoot-cta { display: none; }
.phero + .section { padding-top: var(--sec-y); }
/* Lab badge in the navigation: experiments currently running */
/* "Our promise": last nav item, a tilted yellow tag in the same style as the Lab "running" count. */
.gnav-item[data-section="promise"] { display: flex; align-items: center; margin-left: 6px; }
.gnav-item[data-section="promise"] > .gnav-top { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; font-weight: 600; letter-spacing: .04em; line-height: 1.2; padding: 5px 9px; background: var(--c-yellow); color: #15181A; transform: rotate(-2deg); box-shadow: none !important; transition: transform var(--t-fast) var(--ease); }
.gnav-item[data-section="promise"] > .gnav-top:hover, .gnav-item[data-section="promise"] > .gnav-top:focus-visible { transform: rotate(0deg); }
@media (max-width: 1190px) { .gnav-item[data-section="promise"] { margin-left: 0; padding-block: 16px; } .gnav-item[data-section="promise"] > .gnav-top { width: auto; padding: 7px 11px; font-size: 13px; color: #15181A; } }
.lab-count { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10px; font-weight: 600; letter-spacing: .04em; background: var(--c-yellow); color: #15181A; padding: 3px 6px; display: inline-flex; align-items: center; gap: 5px; line-height: 1.2; white-space: nowrap; }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (max-width: 1190px) { .gnav-top .lab-count { margin-left: auto; margin-right: 0; } .gnav-item[data-section="lab"] .gnav-top { justify-content: flex-start; gap: 10px; } }
/* Pages with their own closing CTA band do not repeat the footer CTA. */
body:has(main > .cta-band:last-child) .gfoot-cta, body:has(main > article + .cta-band) .gfoot-cta { display: none; }

/* ==========================================================================
   Dark theme (all registers). Designed, not inverted. Paper documents,
   client logos and yellow bands stay as they are.
   ========================================================================== */
:root[data-theme="dark"] { --band: #1B2023;
  color-scheme: dark;
  --bg: #0F1213; --surface: #171B1D; --surface-2: #1C2124; --ink: #E8ECEB; --ink-2: #C9D0D0; --muted: #98A2A4; --faint: #6E787A;
  --line: #2A3134; --line-strong: #46525A; --yellow-soft: #3A3217; --forest: #7DBF9C; --pass: #45BE85; --fail: #F0705C;
  --panel: #1A1F22; --panel-2: #22292C; --panel-line: #343D41; --focus: #F2C230;
}
:root[data-theme="dark"] body[data-register="ceo"] {
  --bg: #191A17; --surface: #21221E; --surface-2: #282924; --ink: #ECE8E0; --ink-2: #D5D1C8; --muted: #A8A49A; --faint: #7A776F; --line: #34332D; --line-strong: #4C4A42; --accent-ink: #191A17;
}
:root[data-theme="dark"] body[data-register="lab"] { --bg: #0D1011; }
:root[data-theme="dark"] .graph { --grid-minor: rgba(232, 236, 235, .035); --grid-major: rgba(232, 236, 235, .07); }
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark.brand-full { display: block; filter: brightness(0) invert(1); }
@media (max-width: 620px) {
  :root[data-theme="dark"] .brand .logo-dark.brand-full { display: none; }
  :root[data-theme="dark"] .brand .logo-dark.brand-mark { display: block; filter: brightness(0) invert(1); }
}
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .btn { background: var(--ink); color: var(--bg); border-color: var(--ink); }
:root[data-theme="dark"] .btn.ghost { background: transparent; color: var(--ink); }
:root[data-theme="dark"] .btn.ghost:hover { background: var(--ink); color: var(--bg); }
:root[data-theme="dark"] .yellow .btn { background: #15181A; color: #F2C230; border-color: #15181A; }
:root[data-theme="dark"] .yellow .btn.ghost { background: transparent; color: #15181A; border-color: #15181A; }
:root[data-theme="dark"] .gfoot .btn, :root[data-theme="dark"] .embed-cta .btn, :root[data-theme="dark"] .aside-cta .btn { background: #F2C230; color: #15181A; border-color: #F2C230; }
:root[data-theme="dark"] .gfoot-cta .btn.ghost { background: transparent; color: #E8ECEB; border-color: #E8ECEB; }
:root[data-theme="dark"] .clients, :root[data-theme="dark"] .logos > * { background: #F4F6F5; color: #15181A; --ink: #15181A; --ink-2: #2A3033; --muted: #5B6568; --line-strong: #AEB6B7; }
:root[data-theme="dark"] .proof-strip img { filter: brightness(0) invert(1); opacity: .8; }
:root[data-theme="dark"] .form { box-shadow: 8px 8px 0 #000; }
:root[data-theme="dark"] .migration-form-notice { color: #15181A; }
.ceo-card { background: #ECEAE4; color: #1E211F; --ink: #1E211F; --ink-2: #353834; --muted: #5E605A; --line: #D6D3CB; }

/* Old-site pictures in our style: other companies' logos in one colour, and the few article SVGs that could
   not be recoloured as files shown in grey to match the restyled article images. */
.clients img, .case-card .cc-logo, .quote .q-logo { filter: grayscale(1); }

/* Talk to us: closing call block on every page (Karl's note, Book a call with Karl). Replaces the yellow CTA bands. */
.uc-talk { padding-block: var(--sec-y); background: var(--band, #E8EBEA); border-block: 1px solid var(--line); }
/* Never two sections of the same color in a row: alternateSections() in render.mjs adds tone-light when the block follows a gray band. */
.uc-talk.tone-light { background: transparent; border-block: 0; }
.uc-talk .uc-note { --paper: #FFFFFF; }
/* This section is the page's contact block, so the footer's own call-to-action row is not repeated. */
body:has(.uc-talk) .gfoot-cta { display: none; }
.uc-talk-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.uc-talk .h2 { margin-top: 16px; max-width: 18ch; font-size: clamp(30px, 3.8vw, 52px); line-height: 1.02; }
.uc-talk .lead { margin-top: 18px; max-width: 46ch; }
.uc-talk .row { margin-top: 28px; }
.uc-note { --paper: #FFFFFF; --type: #1E2022; justify-self: end; width: min(100%, 440px); background: var(--paper); color: var(--type); border: 1px solid #C9D0D0; box-shadow: 8px 8px 0 #DDE2E1; padding: 22px 24px 22px; transform: rotate(-1.2deg); }
.uc-note-top { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: end; padding-bottom: 16px; border-bottom: 1px solid #E3E7E6; }
.uc-note-top img { width: 112px; height: 112px; object-fit: cover; object-position: 50% 8%; background: #EDF0EF; }
.uc-note-head { display: block; margin-bottom: 8px; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #5B6568; }
.uc-note-top strong { display: block; font-size: 19px; font-weight: 700; }
.uc-note-top div > span:last-child { display: block; font-size: 14.5px; color: #5B6568; }
.uc-note-text { margin-top: 16px; font-size: 16.5px; line-height: 1.5; }
.uc-note-pen { margin-top: 10px; font-family: var(--f-serif); font-style: italic; font-size: 24px; line-height: 1.35; color: var(--c-pen, #23357F); transform: rotate(-2deg); transform-origin: left; }
:root[data-theme="dark"] .uc-note { box-shadow: 8px 8px 0 #000; border-color: #000; }
@media (max-width: 900px) { .uc-talk-grid { grid-template-columns: minmax(0, 1fr); } .uc-note { justify-self: start; } }
@media (max-width: 480px) { .uc-note { transform: rotate(-.8deg); box-shadow: 6px 6px 0 #DDE2E1; padding: 18px 18px 20px; } .uc-note-top { grid-template-columns: 92px minmax(0, 1fr); } .uc-note-top img { width: 92px; height: 92px; } }

/* Four case cards across. */
.post-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } @media (max-width: 1180px) { .post-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } } @media (max-width: 640px) { .post-grid.four { grid-template-columns: minmax(0, 1fr); } }

/* Pricing: pointer to the 30-day promise under "How our process works". */
.pricing-promise { margin-top: 28px; font-size: 16px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; }

/* Karl's signature (K. Mielnicki): the pen line is an alpha mask, so each page sets its ink color. */
.sig-km { display: inline-block; flex: none; aspect-ratio: 1100 / 242; background-color: #23357F; -webkit-mask: url(/images/signature-k-mielnicki.png) center / contain no-repeat; mask: url(/images/signature-k-mielnicki.png) center / contain no-repeat; }
