/* Kwebby core.css: tokens, base, chrome (header, rail, footer, hire widget) and shared components. Owned by phase 1. Area styles go in <area>.css. */
/* Kwebby redesign, direction: Studio
   One stylesheet for index.html, work/index.html and services/index.html.
   Every color is a token. Light values in :root, dark values in the two dark blocks. */

:root {
  --bg: #FFFFFF;
  --panel: #F3F2F0;
  --panel-2: #EAE8E5;
  --fg: #131315;
  --muted: #5D5D63;
  --line: #E4E2DF;
  --accent: #EF572C;
  --accent-ink: #B93A16;
  --accent-soft: #FFE6DC;
  /* #FFFFFF on #EF572C is 3.5:1, below AA for button text. Dark ink is 5.7:1. */
  --on-accent: #140803;
  --charcoal: #3B3D42;
  --logo-accent: #EF572C;
  --bezel: #1C1C1F;
  --shade: #131315;
  --scrim: rgba(19, 19, 21, .46);
  --shadow-c: rgba(19, 19, 21, .07);
  --shadow-c2: rgba(19, 19, 21, .16);
  --glow-mix: 15%;
  --glow-strength: 42%;
  --sw-plate: #F7F5F1;
  --sw-plate-2: #ECE8E1;
  --sw-line: #D9D4CB;
  --sw-bevel-hi: #FFFFFF;
  --sw-bevel-lo: #DDD8CF;
  --sw-shadow: rgba(40, 30, 20, .20);
  --sw-screw: #BDB7AC;
  --sw-screw-hi: #FFFFFF;
  --sw-frame: #E6E2DA;
  --sw-frame-shadow: rgba(40, 30, 20, .22);
  --sw-rock-hi: #FFFFFF;
  --sw-rock-mid: #F2EFE9;
  --sw-rock-lo: #CFC9BF;
  --sw-rock-shadow: rgba(40, 30, 20, .32);
  --rail: #111113;
  --rail-fg: #F3F3F1;
  --rail-muted: #A1A1A8;
  --rail-line: #26262B;
  --rail-hover: #1F1F23;
  --tip-bg: #131315;
  --tip-fg: #FFFFFF;
  --ok: #2F7A3B;
  --warn: #9A6400;
  --bad: #B42318;
  --code-bg: #F7F6F4;
  --tok-tag: #B93A16;
  --tok-attr: #1F5F8B;
  --tok-val: #2F6B2F;
  --tok-com: #6E6E74;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --max: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
  --rail-w: 0px;
  --rail-open: 64px;
  --vw: calc((100vw - var(--rail-w)) / 100);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D0D0F;
    --panel: #17171A;
    --panel-2: #202024;
    --fg: #F3F3F1;
    --muted: #A1A1A8;
    --line: #29292E;
    --accent: #FF6B40;
    --accent-ink: #FF8A66;
    --accent-soft: #3A1B10;
    --on-accent: #140803;
    --charcoal: #D9D9DC;
    --logo-accent: #FF6B40;
    --bezel: #2A2A30;
    --shade: #000000;
    --scrim: rgba(0, 0, 0, .64);
    --shadow-c: rgba(0, 0, 0, .35);
    --shadow-c2: rgba(0, 0, 0, .62);
    --glow-mix: 20%;
    --glow-strength: 50%;
    --sw-plate: #2C2C32;
    --sw-plate-2: #232328;
    --sw-line: #3B3B43;
    --sw-bevel-hi: #4C4C55;
    --sw-bevel-lo: #18181C;
    --sw-shadow: rgba(0, 0, 0, .55);
    --sw-screw: #5A5A64;
    --sw-screw-hi: #7A7A85;
    --sw-frame: #1E1E22;
    --sw-frame-shadow: rgba(0, 0, 0, .6);
    --sw-rock-hi: #4A4A53;
    --sw-rock-mid: #38383F;
    --sw-rock-lo: #25252A;
    --sw-rock-shadow: rgba(0, 0, 0, .65);
    --rail: #141417;
    --rail-fg: #F3F3F1;
    --rail-muted: #A1A1A8;
    --rail-line: #29292E;
    --rail-hover: #222227;
    --tip-bg: #F3F3F1;
    --tip-fg: #0D0D0F;
    --ok: #7BCB86;
    --warn: #E7B04A;
    --bad: #FF7A6B;
    --code-bg: #121215;
    --tok-tag: #FF8A66;
    --tok-attr: #7FB8E6;
    --tok-val: #9BD28F;
    --tok-com: #8D8D95;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0D0D0F;
  --panel: #17171A;
  --panel-2: #202024;
  --fg: #F3F3F1;
  --muted: #A1A1A8;
  --line: #29292E;
  --accent: #FF6B40;
  --accent-ink: #FF8A66;
  --accent-soft: #3A1B10;
  --on-accent: #140803;
  --charcoal: #D9D9DC;
  --logo-accent: #FF6B40;
  --bezel: #2A2A30;
  --shade: #000000;
  --scrim: rgba(0, 0, 0, .64);
  --shadow-c: rgba(0, 0, 0, .35);
  --shadow-c2: rgba(0, 0, 0, .62);
  --glow-mix: 20%;
  --glow-strength: 50%;
  --sw-plate: #2C2C32;
  --sw-plate-2: #232328;
  --sw-line: #3B3B43;
  --sw-bevel-hi: #4C4C55;
  --sw-bevel-lo: #18181C;
  --sw-shadow: rgba(0, 0, 0, .55);
  --sw-screw: #5A5A64;
  --sw-screw-hi: #7A7A85;
  --sw-frame: #1E1E22;
  --sw-frame-shadow: rgba(0, 0, 0, .6);
  --sw-rock-hi: #4A4A53;
  --sw-rock-mid: #38383F;
  --sw-rock-lo: #25252A;
  --sw-rock-shadow: rgba(0, 0, 0, .65);
  --rail: #141417;
  --rail-fg: #F3F3F1;
  --rail-muted: #A1A1A8;
  --rail-line: #29292E;
  --rail-hover: #222227;
  --tip-bg: #F3F3F1;
  --tip-fg: #0D0D0F;
  --ok: #7BCB86;
  --warn: #E7B04A;
  --bad: #FF7A6B;
  --code-bg: #121215;
  --tok-tag: #FF8A66;
  --tok-attr: #7FB8E6;
  --tok-val: #9BD28F;
  --tok-com: #8D8D95;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html.is-locked { overflow: hidden; }
html.is-locked body { padding-right: var(--sbw, 0px); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 640;
  letter-spacing: -.03em;
  line-height: 1.04;
  text-wrap: balance;
  font-optical-sizing: auto;
}
p, ul, ol, dl, dd, figure { margin: 0; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--accent-soft); color: var(--fg); }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
.ic { width: 20px; height: 20px; flex: none; }
.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.mono { font-family: var(--font-mono); }
.skip-link {
  position: fixed; left: calc(var(--rail-w) + 16px); top: -80px; z-index: 200;
  padding: 12px 18px; border-radius: 999px; background: var(--fg); color: var(--bg);
  font-weight: 600; text-decoration: none; transition: top .2s var(--ease);
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sec { padding-block: clamp(72px, 9vw, 136px); position: relative; }
.sec-tight { padding-block: clamp(48px, 6vw, 88px); }
.sec-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head > * { min-width: 0; }
@media (min-width: 900px) {
  .sec-head.split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; column-gap: 64px; }
  .sec-head.split .eyebrow { grid-column: 1 / -1; }
}
.eyebrow {
  font: 500 .75rem/1.3 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.h2 { font-size: clamp(2.25rem, 1.05rem + 4.1vw, 4.75rem); line-height: .98; letter-spacing: -.042em; font-weight: 650; }
.h3 { font-size: clamp(1.375rem, 1.05rem + 1vw, 1.875rem); letter-spacing: -.028em; }
.lede { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); color: var(--muted); max-width: 40rem; }
.muted { color: var(--muted); }

/* Links with an underline sweep */
.link {
  color: inherit; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat right bottom / 0 1px;
  transition: background-size .45s var(--ease);
  padding-bottom: 2px;
}
.link:hover, .link:focus-visible { background-size: 100% 1px; background-position: left bottom; }
.link-u {
  background: linear-gradient(currentColor, currentColor) no-repeat right bottom / 0 1px;
  transition: background-size .45s var(--ease); padding-bottom: 2px;
}
a:hover > .link-u, a:focus-visible > .link-u { background-size: 100% 1px; background-position: left bottom; }
.text-link { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- Buttons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  border: 1px solid transparent; background: none;
  font: 600 1rem/1.1 var(--font-body); letter-spacing: -.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transform: translate3d(var(--mx), var(--my), 0);
  transition: transform .4s var(--ease), background-color .25s, color .25s, border-color .25s, box-shadow .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn .ic { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.btn .ic-diag { transition: transform .35s var(--ease); }
.btn:hover .ic-diag { transform: translate(2px, -2px); }
.btn:active { transform: translate3d(var(--mx), var(--my), 0) scale(.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { box-shadow: 0 14px 34px -14px color-mix(in srgb, var(--accent) 80%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--on-accent) 14%, transparent); }
.btn-ghost { border-color: var(--line); color: var(--fg); background: var(--bg); }
.btn-ghost:hover { border-color: var(--fg); background: var(--panel); }
.btn-ink { background: var(--on-accent); color: var(--accent); }
.btn-ink:hover { box-shadow: 0 14px 30px -14px var(--shadow-c2); }
.btn-outline-ink { border-color: color-mix(in srgb, var(--on-accent) 55%, transparent); color: var(--on-accent); }
.btn-outline-ink:hover { background: color-mix(in srgb, var(--on-accent) 10%, transparent); border-color: var(--on-accent); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: .9375rem; }
.btn:focus-visible { outline-offset: 4px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--fg);
  cursor: pointer; transition: background-color .2s, border-color .2s, transform .3s var(--ease);
}
.icon-btn:hover { background: var(--panel); border-color: var(--muted); }
.icon-btn .ic { width: 19px; height: 19px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-in { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--charcoal); flex: none; border-radius: 8px; }
.brand .logo { width: 108px; height: auto; }
.nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-list a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border-radius: 999px; text-decoration: none; font-weight: 500; font-size: .9375rem; color: var(--fg);
  transition: background-color .2s, color .2s;
}
.nav-list a:hover { background: var(--panel); }
.nav-list a[aria-current="page"] { background: var(--panel); }
.nav-list .ic { width: 14px; height: 14px; color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.theme-btn .ic-moon { display: none; }
.theme-btn[aria-pressed="true"] .ic-sun { display: none; }
.theme-btn[aria-pressed="true"] .ic-moon { display: block; }
.menu-btn { display: none; }
.menu-btn .ic-x { display: none; }
.menu-btn[aria-expanded="true"] .ic-x { display: block; }
.menu-btn[aria-expanded="true"] .ic-menu { display: none; }

@media (max-width: 1023px) {
  :root { --header-h: 64px; }
  .header-in { gap: 12px; }
  .brand .logo { width: 96px; }
  .js .menu-btn { display: inline-grid; }
  .js .nav { display: none; }
  html:not(.js) .header-in { flex-wrap: wrap; padding-block: 8px; }
  html:not(.js) .nav { order: 3; width: 100%; }
  html:not(.js) .nav-list { flex-wrap: wrap; }
}
@media (max-width: 400px) {
  .header-actions { gap: 6px; }
  .header-hire { padding: 0 14px; }
}

/* ---------- Page decoration: column lines (page heads and hero) ---------- */
.hero-cols {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  display: grid; grid-template-columns: repeat(6, 1fr);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}
.hero-cols span { border-left: 1px solid var(--line); opacity: .7; }
.hero-cols span:last-child { border-right: 1px solid var(--line); }
@media (max-width: 759px) {
  .hero-cols { grid-template-columns: repeat(3, 1fr); }
  .hero-cols span:nth-child(n+4) { display: none; }
  .hero-cols span:nth-child(3) { border-right: 1px solid var(--line); }
}
/* ---------- Device mockups (decorative) ---------- */
.dv { display: block; position: relative; }
.dv i, .dv b { display: block; font-style: normal; }
.dv-frame {
  display: block; position: relative; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line);
  box-shadow: 0 .2em .5em var(--shadow-c), 0 2.6em 5em -1.8em var(--shadow-c2);
  transition: box-shadow .6s var(--ease), border-color .6s var(--ease);
}
.device.is-active .dv-frame {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  box-shadow: 0 0 0 .14em color-mix(in srgb, var(--accent) 35%, transparent), 0 2.8em 6.4em -1.2em color-mix(in srgb, var(--accent) var(--glow-strength), transparent), 0 .2em .5em var(--shadow-c);
}
.dv-bar { display: flex; align-items: center; gap: .8em; height: 2.2em; padding: 0 .9em; background: var(--panel); border-bottom: 1px solid var(--line); }
.dv-dots { display: flex; gap: .38em; flex: none; }
.dv-dots i { width: .62em; height: .62em; border-radius: 50%; background: var(--line); }
.dv-dots i:first-child { background: var(--accent); }
.dv-url { flex: 1; max-width: 17em; margin-inline: auto; height: 1.35em; border-radius: 999px; background: var(--bg); display: grid; place-items: center; overflow: hidden; }
.dv-url span, .dv-title span { font: 500 .7em/1 var(--font-mono); color: var(--muted); white-space: nowrap; }
.dv-title { margin-inline: auto; transform: translateX(-1.7em); }

/* Browser + mini website */
.dv-browser { width: 38em; }
.dv-browser .dv-frame { border-radius: 1em; }
.dv-site { display: grid; gap: 1.25em; align-content: start; height: 22em; padding: 1.2em 1.6em 1.6em; }
.s-nav { display: flex; align-items: center; gap: 1em; }
.s-logo { width: 2.8em; height: .85em; border-radius: .3em; background: var(--fg); }
.s-links { display: flex; gap: .8em; margin-left: auto; }
.s-links i { width: 2.2em; height: .42em; border-radius: 1em; background: var(--panel-2); }
.s-cta { display: grid; place-items: center; height: 1.7em; padding: 0 .9em; border-radius: 999px; background: var(--accent); }
.s-cta span { font: 600 .62em/1 var(--font-body); color: var(--on-accent); white-space: nowrap; }
.s-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.3em; align-items: center; }
.s-copy { display: grid; gap: .55em; }
.s-h { height: 1.2em; border-radius: .3em; background: var(--fg); }
.s-h.short { width: 74%; }
.s-p { height: .42em; border-radius: 1em; background: var(--panel-2); width: 92%; }
.s-p.short { width: 66%; }
.s-btns { display: flex; gap: .5em; margin-top: .5em; }
.s-btn { width: 4.8em; height: 1.6em; border-radius: 999px; background: var(--accent); }
.s-btn.ghost { background: transparent; border: 1px solid var(--line); }
.s-img { position: relative; aspect-ratio: 4 / 3; border-radius: .8em; overflow: hidden; background: linear-gradient(165deg, var(--accent-soft), var(--panel-2)); }
.s-img::before { content: ""; position: absolute; width: 2.3em; height: 2.3em; border-radius: 50%; right: 1.3em; top: 1.1em; background: var(--accent); }
.s-img::after { content: ""; position: absolute; left: -12%; right: -12%; bottom: -34%; height: 72%; border-radius: 50% 50% 0 0; background: var(--panel); }
.s-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8em; }
.s-card { display: grid; gap: .45em; padding: .75em; border-radius: .7em; background: var(--panel); }
.s-card i { width: 1.5em; height: 1.5em; border-radius: .45em; background: var(--accent-soft); }
.s-card b { height: .45em; border-radius: 1em; background: var(--panel-2); width: 82%; }
.s-card b + b { width: 56%; }

/* Phone + mini app */
.dv-phone { width: 13em; }
.dv-phone .dv-frame { border-radius: 2.3em; padding: .45em; background: var(--bezel); border-color: var(--bezel); }
.p-screen { position: relative; display: flex; flex-direction: column; gap: .75em; height: 26.2em; padding: .75em .9em .6em; border-radius: 1.9em; background: var(--bg); overflow: hidden; }
.p-status { display: flex; align-items: center; justify-content: space-between; height: 1.3em; padding: 0 .35em; }
.p-time { font: 600 .62em/1 var(--font-body); color: var(--fg); }
.p-island { position: absolute; left: 50%; top: .62em; width: 3.7em; height: 1.1em; border-radius: 1em; background: var(--bezel); transform: translateX(-50%); }
.p-sig { display: flex; align-items: flex-end; gap: .16em; }
.p-sig i { width: .24em; border-radius: .1em; background: var(--fg); height: .32em; }
.p-sig i:nth-child(2) { height: .48em; }
.p-sig i:nth-child(3) { height: .64em; }
.p-head { display: flex; align-items: center; justify-content: space-between; margin-top: .3em; }
.p-title { font: 700 1.3em/1 var(--font-display); letter-spacing: -.03em; color: var(--fg); }
.p-avatar { width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--accent-soft); border: .16em solid var(--accent); }
.p-card { display: grid; gap: .4em; padding: .85em .9em; border-radius: 1em; background: var(--accent); }
.p-k { font: 500 .56em/1.2 var(--font-mono); color: var(--on-accent); }
.p-v { font: 700 1.5em/1 var(--font-display); letter-spacing: -.03em; color: var(--on-accent); }
.p-meter { position: relative; height: .36em; border-radius: 1em; background: color-mix(in srgb, var(--on-accent) 22%, transparent); overflow: hidden; }
.p-meter::after { content: ""; position: absolute; inset: 0 38% 0 0; border-radius: inherit; background: var(--on-accent); }
.p-list { display: grid; gap: .5em; }
.p-row { display: flex; align-items: center; gap: .6em; padding: .55em; border-radius: .85em; background: var(--panel); }
.p-dot { width: 1.6em; height: 1.6em; border-radius: .55em; background: var(--panel-2); flex: none; }
.p-row:first-child .p-dot { background: var(--accent-soft); }
.p-lines { display: grid; gap: .32em; flex: 1; }
.p-lines i { height: .42em; border-radius: 1em; background: var(--panel-2); }
.p-lines i + i { width: 58%; }
.p-tabs { display: flex; justify-content: space-around; margin-top: auto; padding: .6em .3em .1em; border-top: 1px solid var(--line); }
.p-tabs i { width: 1.15em; height: 1.15em; border-radius: .38em; background: var(--panel-2); }
.p-tabs i.on { background: var(--accent); }
.p-home { width: 4.2em; height: .26em; margin: .25em auto 0; border-radius: 1em; background: var(--muted); }

/* Desktop app window */
.dv-desktop { width: 34em; }
.dv-desktop .dv-frame { border-radius: .95em; }
.d-body { display: grid; grid-template-columns: 8.2em minmax(0, 1fr); height: 19em; }
.d-side { display: flex; flex-direction: column; gap: .3em; padding: .9em .7em; background: var(--panel); border-right: 1px solid var(--line); }
.d-brand { display: flex; align-items: center; gap: .45em; margin: 0 .3em .7em; }
.d-brand i { width: 1.35em; height: 1.35em; border-radius: .42em; background: var(--accent); }
.d-brand b { width: 3.2em; height: .46em; border-radius: 1em; background: var(--fg); }
.d-item { display: flex; align-items: center; gap: .55em; padding: .5em .6em; border-radius: .5em; }
.d-item::before { content: ""; width: .75em; height: .75em; border-radius: .22em; background: var(--panel-2); flex: none; }
.d-item span { font: 500 .64em/1 var(--font-body); color: var(--muted); white-space: nowrap; }
.d-item.on { background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.d-item.on::before { background: var(--accent); }
.d-item.on span { color: var(--fg); font-weight: 600; }
.d-main { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: .85em; padding: .95em 1.05em; min-width: 0; }
.d-top { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.d-h { font: 700 1.15em/1 var(--font-display); letter-spacing: -.03em; color: var(--fg); }
.d-search { width: 7.5em; height: 1.4em; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.d-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6em; }
.d-tile { display: grid; gap: .45em; padding: .75em; border-radius: .65em; border: 1px solid var(--line); }
.d-tile:first-child { background: var(--accent-soft); border-color: transparent; }
.d-tile i { height: .4em; width: 60%; border-radius: 1em; background: var(--panel-2); }
.d-tile b { height: 1.05em; width: 72%; border-radius: .3em; background: var(--fg); }
.d-tile:first-child i { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.d-chart { display: grid; grid-template-columns: minmax(0, 1fr) 7em; gap: .8em; min-height: 0; }
.d-graph { border-radius: .65em; border: 1px solid var(--line); padding: .6em; min-height: 0; }
.d-graph svg { width: 100%; height: 100%; }
.d-graph .ln { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.d-graph .ar { fill: var(--accent-soft); }
.d-graph .gd { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.d-rows { display: grid; gap: .45em; align-content: start; }
.d-rows i { height: 1.35em; border-radius: .4em; background: var(--panel); }

/* Static device showcase used in cards and sections */
.dv-show {
  position: relative; container-type: inline-size; overflow: hidden;
  display: grid; place-items: center; min-height: 280px; height: 100%;
  background: var(--panel-2); border-radius: var(--r-lg);
  perspective: 1400px;
}
.dv-show::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 60% at 60% 45%, color-mix(in srgb, var(--accent) var(--glow-mix), transparent), transparent 70%);
}
.dv-show .dv { transform: rotateX(7deg) rotateY(-13deg) rotateZ(1deg); }
.dv-show--web .dv { font-size: 2.05cqi; }
.dv-show--desk .dv { font-size: 2.3cqi; }
.dv-show--app { grid-auto-flow: column; gap: 5cqi; }
.dv-show--app .dv { font-size: 2.5cqi; }
.dv-show--app .dv:nth-child(2) { transform: rotateX(7deg) rotateY(-13deg) translateY(8cqi); }
.dv-show .dv-frame { box-shadow: 0 .2em .5em var(--shadow-c), 0 2.6em 5em -1.6em var(--shadow-c2); }

/* ---------- Proof strip ---------- */
.proof { border-block: 1px solid var(--line); }
.proof-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px 0; }
.claims { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.claim { display: grid; gap: 8px; align-content: start; padding: 28px 20px 30px 0; min-width: 0; }
.claim-v { font: 650 clamp(1.75rem, 1.2rem + 1.6vw, 2.6rem)/1 var(--font-display); letter-spacing: -.04em; }
.claim-v .acc { color: var(--accent-ink); }
.claim-k { font-size: .9375rem; color: var(--muted); max-width: 18rem; }
.claims .claim:last-child { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .claims { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .claims .claim:last-child { grid-column: auto; }
  .claim { padding: 32px 24px 34px; border-left: 1px solid var(--line); }
  .claim:first-child { border-left: 0; padding-left: 0; }
}
.marquee { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-block: 14px; }
.marquee-k { font: 500 .75rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); flex: none; }
.marquee-view {
  position: relative; flex: 1; min-width: 0; overflow: hidden; border-radius: 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-list { display: flex; flex: none; }
.marquee-list li { display: flex; align-items: center; padding: 8px 0; font: 600 1.125rem/1.2 var(--font-display); letter-spacing: -.02em; white-space: nowrap; }
.marquee-list li::after { content: ""; width: 6px; height: 6px; margin-inline: 22px; border-radius: 50%; background: var(--accent); }
.marquee:hover .marquee-track, .marquee-view:focus-within .marquee-track, .marquee-view:focus .marquee-track, .marquee.is-paused .marquee-track { animation-play-state: paused; }
.marquee-toggle .ic-play { display: none; }
.marquee-toggle[aria-pressed="true"] .ic-play { display: block; }
.marquee-toggle[aria-pressed="true"] .ic-pause { display: none; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* ---------- Statement (scroll-lit words) ---------- */
.statement {
  font: 520 clamp(1.625rem, .95rem + 2.6vw, 3.25rem)/1.16 var(--font-display);
  letter-spacing: -.028em; max-width: 58rem; color: var(--fg);
}
.statement .em { color: var(--accent-ink); }
.statement.is-live .sw { color: var(--muted); transition: color .4s ease; }
.statement.is-live .sw.is-lit { color: var(--fg); }
.statement.is-live .em .sw.is-lit { color: var(--accent-ink); }

/* ---------- Stacked service cards ---------- */
.stack { position: relative; }
.stack-item { --i: 0; position: sticky; top: calc(var(--header-h) + 24px + var(--i) * 16px); margin-bottom: clamp(48px, 9vh, 104px); }
.stack-item:last-child { margin-bottom: 0; }
.stack-card {
  --p: 0;
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(20px, 3vw, 40px);
  min-height: min(620px, calc(100svh - var(--header-h) - 88px));
  padding: clamp(16px, 1.6vw, 22px);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: calc(var(--r-xl) + var(--p) * 14px);
  transform-origin: 50% 0;
  transform: translate3d(0, calc(var(--p) * -10px), 0) scale(calc(1 - var(--p) * .07));
  box-shadow: 0 -18px 40px -32px var(--shadow-c2);
}
.stack-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: var(--shade); opacity: calc(var(--p) * .4);
}
.sc-body { display: flex; flex-direction: column; gap: 20px; padding: clamp(12px, 2.4vw, 36px); min-width: 0; }
.sc-plat { font: 500 .8125rem/1.4 var(--font-mono); color: var(--muted); }
.sc-title { font-size: clamp(2.1rem, 1.2rem + var(--vw) * 3, 4rem); letter-spacing: -.045em; line-height: .96; }
.sc-pitch { font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); color: var(--muted); max-width: 30rem; }
.sc-facts { display: flex; flex-wrap: wrap; gap: 12px 36px; }
.sc-facts div { display: grid; gap: 4px; }
.sc-facts dt { font: 500 .75rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sc-facts dd { font: 650 1.5rem/1.1 var(--font-display); letter-spacing: -.03em; }
.sc-facts dd.price { color: var(--accent-ink); }
.sc-children { display: grid; border-top: 1px solid var(--line); }
.sc-children li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sc-children .n { font-weight: 600; }
.sc-children .p { font: 500 .875rem/1.6 var(--font-mono); color: var(--fg); text-align: right; }
.sc-children .d { grid-column: 1 / -1; font-size: .9375rem; color: var(--muted); }
.sc-link { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; text-decoration: none; }
.sc-link .ic { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.sc-link:hover .ic, .sc-link:focus-visible .ic { transform: translate(3px, -3px); }
.sc-visual { min-width: 0; }
@media (max-width: 899px) {
  .stack-item { top: calc(var(--header-h) + 12px + var(--i) * 10px); margin-bottom: 40px; }
  .stack-card { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 4px; padding: 10px; border-radius: calc(var(--r-lg) + var(--p) * 10px); }
  .sc-visual { order: -1; }
  .sc-visual .dv-show { min-height: 0; height: clamp(150px, 34vw, 240px); place-items: start center; padding-top: 26px; }
  .sc-body { gap: 14px; padding: 14px 12px 8px; }
  .sc-pitch { font-size: 1rem; }
  .sc-facts dd { font-size: 1.25rem; }
  .sc-children li { padding: 9px 0; }
  .sc-children .d { font-size: .875rem; }
}
@media (max-height: 520px) and (max-width: 1023px) {
  .stack-item { position: relative; top: auto !important; }
  .stack-card { transform: none; }
  .stack-card::after { opacity: 0; }
}

/* ---------- Work cards (home) ---------- */
.work-grid { display: grid; gap: clamp(40px, 5vw, 56px) clamp(24px, 3vw, 40px); }
@media (min-width: 900px) {
  .work-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .work-grid > :nth-child(4n+1) { grid-column: 1 / span 7; }
  .work-grid > :nth-child(4n+2) { grid-column: 8 / span 5; margin-top: 120px; }
  .work-grid > :nth-child(4n+3) { grid-column: 1 / span 5; }
  .work-grid > :nth-child(4n+4) { grid-column: 6 / span 7; margin-top: 120px; }
}
.work-card { display: grid; gap: 18px; min-width: 0; color: inherit; text-decoration: none; border-radius: var(--r-xl); }
.work-card:focus-visible { outline: none; }
.work-card:focus-visible .frame { outline: 3px solid var(--accent-ink); outline-offset: 5px; }
.media { position: relative; }
.frame { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--r-xl); background: var(--panel); isolation: isolate; }
.frame-par { position: absolute; left: 0; right: 0; top: -8%; height: 116%; will-change: transform; }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 1.1s var(--ease); }
.work-card:hover .frame img, .work-card:focus-visible .frame img, .case:hover .frame img, .case:focus-within .frame img { transform: scale(1.065); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font: 500 .75rem/1.3 var(--font-mono); color: var(--fg); }
@media (hover: hover) and (pointer: fine) {
  .media .chips { position: absolute; left: 14px; right: 14px; bottom: 14px; margin: 0; pointer-events: none; }
  .media .chip { transform: translate3d(0, calc(100% + 60px), 0); transition: transform .55s var(--ease); transition-delay: calc(var(--ci, 0) * 60ms); box-shadow: 0 10px 24px -14px var(--shadow-c2); border-color: transparent; }
  .media .chips { clip-path: inset(-40px -4px -4px -4px); }
  .work-card:hover .chip, .work-card:focus-visible .chip { transform: none; }
}
.wc-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; align-items: start; }
.wc-tag { grid-column: 1 / -1; font: 500 .75rem/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wc-title { font-size: clamp(1.4rem, 1.1rem + .9vw, 2rem); letter-spacing: -.03em; }
.wc-line { grid-column: 1 / -1; color: var(--muted); max-width: 36rem; }
.wc-arrow { grid-row: 2; grid-column: 2; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); transition: transform .55s var(--ease), background-color .3s, color .3s, border-color .3s; }
.wc-arrow .ic { width: 20px; height: 20px; }
.work-card:hover .wc-arrow, .work-card:focus-visible .wc-arrow { transform: rotate(45deg); background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sec-foot { display: flex; justify-content: flex-start; margin-top: clamp(40px, 5vw, 64px); }

/* ---------- Process + milestone visual ---------- */
.sec-band { padding-block: clamp(16px, 2vw, 32px); }
.band-in { padding-block: clamp(64px, 8vw, 120px); }
.ms-panels { min-width: 0; }
.band { background: var(--panel); border-radius: clamp(0px, 3vw, 40px); margin-inline: clamp(0px, 1.4vw, 20px); }
.steps { display: grid; gap: 0; counter-reset: step; margin-bottom: clamp(40px, 5vw, 64px); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }
.step { position: relative; display: grid; gap: 12px; padding: 28px 0; align-content: start; min-width: 0; }
.step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--fg); transform-origin: 0 50%; }
.step-n { font: 500 .875rem/1 var(--font-mono); color: var(--accent-ink); }
.step h3 { font-size: clamp(1.375rem, 1.1rem + .8vw, 1.75rem); }
.step p { color: var(--muted); }

.ms { display: grid; gap: 28px; padding: clamp(20px, 3.4vw, 40px); border-radius: var(--r-xl); background: var(--bg); border: 1px solid var(--line); }
@media (min-width: 900px) { .ms { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: 48px; } }
.ms-intro { display: grid; gap: 10px; }
.ms-intro p { color: var(--muted); }
.ms-bar { display: flex; gap: 6px; margin-top: 18px; }
.ms-seg {
  flex: var(--w) 1 0; min-width: 76px; min-height: 104px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  padding: 14px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel);
  text-align: left; cursor: pointer; color: var(--fg);
  transition: background-color .3s, color .3s, border-color .3s, transform .35s var(--ease);
}
.ms-seg:hover { transform: translateY(-3px); border-color: var(--muted); }
.ms-seg.is-paid { background: var(--accent-soft); border-color: transparent; }
.ms-seg.is-on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); transform: translateY(-3px); }
.ms-pct { font: 650 clamp(1.5rem, 1rem + 1.6vw, 2.25rem)/1 var(--font-display); letter-spacing: -.04em; }
.ms-name { font: 500 .75rem/1.25 var(--font-mono); }
.ms-scale { display: flex; justify-content: space-between; margin-top: 10px; font: 500 .75rem/1 var(--font-mono); color: var(--muted); }
.ms-detail { display: grid; gap: 16px; }
.ms-detail h4 { font-size: 1.375rem; letter-spacing: -.02em; }
.ms-dl { display: grid; gap: 0; border-top: 1px solid var(--line); }
.ms-dl div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ms-dl dt { font: 500 .75rem/1.6 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ms-dl dd { font-weight: 500; min-width: 0; }
@media (max-width: 480px) { .ms-dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.ms-hint { font: 500 .75rem/1.4 var(--font-mono); color: var(--muted); }

/* ---------- Pricing ---------- */
.price-grid { display: grid; gap: 20px; }
@media (min-width: 1280px) { .price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .95fr); } }
@media (min-width: 680px) and (max-width: 1279.98px) { .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) and (max-width: 1439.98px) { :root[data-rail="expanded"] .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.price-col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.price-col h3 { font-size: 1.25rem; padding-bottom: 12px; border-bottom: 1px solid var(--fg); }
.price-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pr-name { font-weight: 600; }
.pr-price { font: 500 .9375rem/1.5 var(--font-mono); text-align: right; color: var(--accent-ink); white-space: nowrap; }
.pr-time { grid-column: 1 / -1; font: 400 .8125rem/1.5 var(--font-mono); color: var(--muted); }
.offer {
  display: grid; gap: 14px; align-content: start; padding: 26px; border-radius: var(--r-xl);
  background: var(--accent); color: var(--on-accent); min-width: 0;
}
.offer-k { font: 500 .75rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.offer h3 { font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.4rem); letter-spacing: -.04em; }
.offer .btn { justify-self: start; margin-top: 6px; }
.fine { font-size: .9375rem; color: var(--muted); max-width: 46rem; margin-top: 28px; }
.price-after { display: grid; gap: 20px; margin-top: 24px; align-items: center; }
.price-after .fine { margin-top: 0; }
@media (min-width: 900px) { .price-after { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; } }

/* ---------- Industries ---------- */
.ind-list { border-top: 1px solid var(--fg); }
.ind {
  position: relative; display: grid; gap: 6px 32px; padding: 26px 0; border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .ind { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .8fr); align-items: baseline; padding: 34px 0; }
}
.ind h3 { font-size: clamp(1.75rem, 1.2rem + 2vw, 3rem); letter-spacing: -.045em; }
.ind p { color: var(--muted); }
.ind-meta { font: 500 .875rem/1.5 var(--font-mono); color: var(--fg); }
@media (min-width: 900px) { .ind-meta { text-align: right; } }
.ind-meta b { color: var(--accent-ink); font-weight: 500; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: 32px; }
@media (min-width: 1024px) { .faq-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 64px; } .faq-grid .sec-head { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; } }
.faq { border-top: 1px solid var(--fg); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding: 18px 0;
  cursor: pointer; list-style: none; font: 600 clamp(1.125rem, 1rem + .4vw, 1.375rem)/1.3 var(--font-display); letter-spacing: -.02em;
  border-radius: 6px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-ink); }
.faq-x { position: relative; width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid var(--line); transition: transform .4s var(--ease), background-color .3s, border-color .3s; }
.faq-x::before, .faq-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px; background: currentColor; border-radius: 2px; transition: transform .4s var(--ease); }
.faq-x::after { transform: rotate(90deg); }
.faq details[open] .faq-x { transform: rotate(180deg); background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.faq details[open] .faq-x::after { transform: rotate(0deg); }
.faq-a { padding: 0 56px 24px 0; color: var(--muted); max-width: 46rem; }

/* ---------- Final CTA ---------- */
.cta {
  position: relative; overflow: hidden; display: grid; gap: 28px;
  padding: clamp(32px, 6vw, 88px); border-radius: clamp(24px, 3vw, 40px);
  background: var(--accent); color: var(--on-accent);
}
.cta .eyebrow { color: var(--on-accent); }
.cta h2 { font-size: clamp(2.5rem, 1rem + 6vw, 6.5rem); line-height: .92; letter-spacing: -.055em; max-width: 14ch; }
.cta p { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); max-width: 38rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-hours { font: 500 .8125rem/1.5 var(--font-mono); }
.cta::after {
  content: ""; position: absolute; right: -6%; bottom: -40%; width: 46%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--on-accent) 22%, transparent);
  box-shadow: 0 0 0 40px color-mix(in srgb, var(--on-accent) 4%, transparent), 0 0 0 80px color-mix(in srgb, var(--on-accent) 3%, transparent);
  pointer-events: none;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(48px, 6vw, 80px) calc(32px + env(safe-area-inset-bottom, 0px)); }
.foot-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 28px; } }
.foot-brand { display: grid; gap: 16px; align-content: start; max-width: 26rem; }
.foot-brand .brand .logo { width: 120px; }
.foot-brand p { color: var(--muted); font-size: .9375rem; }
.foot-col h2 { font: 500 .75rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.foot-col ul { display: grid; gap: 2px; }
.foot-col a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; font-size: .9375rem; }
@media (pointer: coarse) { .foot-col a { min-height: 44px; } }
.foot-cols { display: contents; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font: 500 .8125rem/1.5 var(--font-mono); color: var(--muted); }
@media (max-width: 639px) { .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } .foot-col.tools-col { grid-column: 1 / -1; } .foot-col.tools-col ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; } }

/* ---------- Floating controls ---------- */
.launcher {
  position: fixed; z-index: 70;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 18px 40px -16px color-mix(in srgb, var(--accent) 70%, transparent), 0 4px 10px var(--shadow-c);
  transition: transform .4s var(--ease), opacity .3s, box-shadow .3s;
}
html.hire-open .launcher, html.drawer-open .launcher, html.launcher-tuck .launcher { opacity: 0; pointer-events: none; transform: translateY(12px) scale(.92); visibility: hidden; transition: transform .4s var(--ease), opacity .3s, visibility 0s linear .4s; }
/* Below 768px the header already has Hire us, so the launcher is not rendered (display none: not focusable). */
@media (max-width: 767.98px) { .launcher { display: none !important; } }
/* ---------- Hire drawer ---------- */
.hire {
  position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; border: 0;
  width: min(540px, 100%); max-width: 100%; height: 100%; max-height: 100%;
  background: var(--bg); color: var(--fg);
  box-shadow: -30px 0 80px -30px var(--shadow-c2);
  transform: translate3d(104%, 0, 0); transition: transform .5s var(--ease);
  overscroll-behavior: contain;
}
.hire.is-open { transform: none; }
.hire::backdrop { background: var(--scrim, rgba(19, 19, 21, .5)); opacity: 0; transition: opacity .35s ease; }
.hire.is-open::backdrop { opacity: 1; }
.hire-panel { display: flex; flex-direction: column; height: 100%; }
.hire-progress { height: 3px; background: var(--line); flex: none; }
.hire-progress span { display: block; height: 100%; width: calc(var(--step, 1) / 3 * 100%); background: var(--accent); transition: width .55s var(--ease); }
.hire-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: start; padding: calc(20px + env(safe-area-inset-top, 0px)) 24px 16px; flex: none; }
.hire-step-label { font: 500 .75rem/1.4 var(--font-mono); letter-spacing: .04em; color: var(--muted); }
.hire-head h2 { grid-column: 1; font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); letter-spacing: -.04em; }
.hire-close { grid-column: 2; grid-row: 1 / span 2; }
.hire-offer { margin: 0 24px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--fg); font-size: .875rem; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; flex: none; }
.hire-offer b { color: var(--accent-ink); font-weight: 700; }
.hire-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.hire-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 24px 28px; }
.hire-step { display: grid; gap: 18px; border: 0; margin: 0; padding: 0; min-width: 0; }
.hire-step[hidden] { display: none; }
.hire-q { font: 650 1.25rem/1.25 var(--font-display); letter-spacing: -.02em; padding: 0; margin-bottom: 4px; }
fieldset.group { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 12px; }
fieldset.group + fieldset.group { margin-top: 10px; }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opts.one { grid-template-columns: minmax(0, 1fr); }
.opt { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg); cursor: pointer; transition: border-color .2s, background-color .2s; }
.opt:hover { border-color: var(--muted); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.opt-mark { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid var(--muted); display: grid; place-items: center; transition: border-color .2s; }
.opt-mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .25s var(--ease); }
.opt-t { font-weight: 500; font-size: .9375rem; line-height: 1.3; }
.opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 60%, var(--bg)); }
.opt input:checked + .opt-mark { border-color: var(--accent); }
.opt input:checked + .opt-mark::after { transform: scale(1); }
.opt:has(input:focus-visible) { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.hire-live { min-height: 48px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--panel); font: 500 .8125rem/1.5 var(--font-mono); color: var(--fg); }
.hire-note { font-size: .875rem; color: var(--muted); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .9375rem; }
.field label .opt-l { font-weight: 400; color: var(--muted); }
.field input:where(:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file])), .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: 400 1rem/1.4 var(--font-body);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 112px; resize: vertical; }
.field input:where(:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]))::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .85; }
.field input:where(:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file])):hover, .field textarea:hover { border-color: var(--muted); }
.field input:where(:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file])):focus, .field textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.field [aria-invalid="true"] { border-color: var(--accent-ink); }
.err { font-size: .875rem; color: var(--accent-ink); font-weight: 500; }
.err[hidden] { display: none; }
.hire-foot { display: flex; align-items: center; gap: 10px; padding: 14px 24px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg); flex: none; }
.hire-foot .btn-primary { margin-left: auto; }
.hire-foot[hidden] { display: none; }
.hire-done { display: grid; gap: 18px; }
.hire-done[hidden] { display: none; }
.done-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.done-ic .ic { width: 26px; height: 26px; }
.hire-done h3 { font-size: 1.75rem; letter-spacing: -.035em; }
.hire-done h3:focus { outline: none; }
.summary { display: grid; border-top: 1px solid var(--line); }
.summary div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.summary dt { font: 500 .75rem/1.6 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.summary dd { overflow-wrap: anywhere; }
.preview-note { padding: 14px 16px; border-radius: var(--r-sm); border: 1px dashed var(--muted); font-weight: 600; }
.done-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 420px) { .opts { grid-template-columns: minmax(0, 1fr); } .hire-head, .hire-scroll, .hire-foot { padding-inline: 18px; } .hire-offer { margin-inline: 18px; } .summary div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---------- Subpages ---------- */
.page-head { padding-block: clamp(28px, 4vw, 56px) clamp(40px, 6vw, 80px); position: relative; overflow: clip; isolation: isolate; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; font: 500 .8125rem/1 var(--font-mono); color: var(--muted); margin-bottom: clamp(28px, 4vw, 48px); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--line); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--fg); }
.crumbs [aria-current="page"] { color: var(--muted); }
/* H1 scale. Default: page scale for content pages. Opt in to the large display face with .h1-display
   (index heroes such as /services/ and /work/), .h1-display.long for long display titles, .h1-post for blog posts.
   Tool pages use .tool-title. */
.page-title { font-size: clamp(2.25rem, calc(var(--vw) * 4.2), 3.75rem); line-height: 1.04; letter-spacing: -.032em; font-weight: 700; max-width: 26ch; }
.page-title.h1-display { font-size: clamp(2.75rem, 1rem + 7vw, 7.5rem); line-height: .92; letter-spacing: -.055em; max-width: 16ch; }
.page-title.h1-display.long { font-size: clamp(2.4rem, 1rem + 5vw, 5.75rem); max-width: 20ch; }
.page-title.h1-post { font-size: clamp(2rem, calc(var(--vw) * 3.4), 3.25rem); line-height: 1.08; letter-spacing: -.028em; max-width: 22ch; }
.page-title.tool-title { font-size: clamp(2rem, calc(var(--vw) * 3.6), 3.25rem); line-height: 1.05; letter-spacing: -.035em; max-width: none; }
.page-intro { margin-top: 24px; font-size: clamp(1.0625rem, 1rem + .4vw, 1.3125rem); color: var(--muted); max-width: 44rem; }
.page-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.jump a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: .9375rem; transition: border-color .2s, background-color .2s; }
.jump a:hover { border-color: var(--fg); background: var(--panel); }
.jump .ic { width: 14px; height: 14px; color: var(--muted); }

/* Empty state */
.empty {
  display: grid; justify-items: start; gap: 18px; padding: clamp(28px, 5vw, 64px); border-radius: var(--r-xl);
  border: 1px dashed var(--muted); background: var(--panel);
}
.empty[hidden] { display: none; }
.empty-art { display: flex; gap: 10px; }
.empty-art i { display: block; width: 72px; height: 54px; border-radius: 12px; border: 1px dashed var(--muted); background: var(--bg); }
.empty-art i:nth-child(2) { transform: translateY(-10px); border-color: var(--accent); background: var(--accent-soft); }
.empty h3 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); letter-spacing: -.035em; max-width: 26ch; }
.empty p { color: var(--muted); max-width: 40rem; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Sidebar rail (desktop) / drawer (mobile): one DOM ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.rail ul { display: grid; gap: 2px; }
.rail-btn {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 12px; background: none; color: inherit; text-align: left; text-decoration: none;
  font: 500 .9375rem/1.2 var(--font-body); white-space: nowrap; overflow: hidden; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.rail-btn .ic { width: 20px; height: 20px; flex: none; }
.rail-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rail-count { font: 500 .6875rem/1 var(--font-mono); flex: none; }
.rail-btn .rail-chev { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.rail-m { display: none; }
.rail-div { position: relative; min-height: 28px; margin: 8px 0 2px; }
.rail-div .rail-label { display: block; font: 500 .6875rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.fly-list a { display: flex; align-items: center; min-height: 40px; padding: 8px 10px; border-radius: 10px; color: var(--fg); text-decoration: none; font-size: .9375rem; line-height: 1.3; }
.fly-list a:hover { background: var(--panel); }
.fly-list a[aria-current="page"] { background: var(--accent-soft); color: var(--fg); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.fly-filter { position: relative; }
.fly-filter .ic { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.fly-filter input { width: 100%; min-height: 44px; padding: 8px 12px 8px 36px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: 400 .9375rem/1.3 var(--font-body); }
.fly-filter input:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.fly-empty { padding: 12px 10px; font-size: .875rem; color: var(--muted); }
.fly-all { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 18px; font-weight: 600; text-decoration: none; color: var(--accent-ink); border-top: 1px solid var(--line); flex: none; }
.fly-all .ic { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.fly-all:hover .ic { transform: translateX(3px); }
.rail-tip {
  position: fixed; z-index: 95; left: 0; top: 0; padding: 7px 11px; border-radius: 8px;
  background: var(--tip-bg); color: var(--tip-fg); font: 500 .8125rem/1.2 var(--font-body); white-space: nowrap;
  pointer-events: none; opacity: 0; transform: translate(-4px, -50%); transition: opacity .15s, transform .2s var(--ease);
  box-shadow: 0 10px 24px -10px var(--shadow-c2);
}
.rail-tip.is-on { opacity: 1; transform: translate(0, -50%); }
.rail-tip::before { content: ""; position: absolute; left: -4px; top: 50%; width: 8px; height: 8px; margin-top: -4px; background: inherit; border-radius: 2px; transform: rotate(45deg); }

@media (min-width: 1024px) {
  :root { --rail-w: 64px; }
  :root.rail-wide { --rail-open: 264px; }
  .rail-btn { font-size: .875rem; }
  .rail-btn .rail-label { opacity: 0; transition: opacity .15s; }
  :root.rail-wide .rail-btn .rail-label { opacity: 1; transition-delay: .08s; }
  body { padding-left: var(--rail-w); transition: padding-left .32s var(--ease); }
  .rail {
    position: fixed; z-index: 80; left: 0; top: 0; bottom: 0; width: var(--rail-open);
    display: flex; flex-direction: column; overflow: hidden;
    padding: max(10px, env(safe-area-inset-top, 0px)) 0 max(10px, env(safe-area-inset-bottom, 0px));
    background: var(--rail); color: var(--rail-muted); border-right: 1px solid var(--rail-line);
    transition: width .32s var(--ease), box-shadow .3s;
  }
  :root.rail-peek .rail { box-shadow: 40px 0 80px -40px var(--shadow-c2); }
  .rail-top { flex: none; padding: 0 10px 10px; margin-bottom: 8px; border-bottom: 1px solid var(--rail-line); }
  .rail-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 0 10px; scrollbar-width: none; }
  .rail-scroll::-webkit-scrollbar { display: none; }
  .rail-bottom { flex: none; display: grid; gap: 2px; padding: 10px 10px 0; margin-top: 8px; border-top: 1px solid var(--rail-line); }
  .rail-btn:hover, .rail-btn:focus-visible, .rail-btn[aria-expanded="true"][data-hub] { background: var(--rail-hover); color: var(--rail-fg); }
  .rail-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .rail-btn[aria-current="page"], .rail-btn.is-current { background: var(--rail-hover); color: var(--rail-fg); }
  .rail-btn[aria-current="page"] > .ic:first-child, .rail-btn.is-current > .ic:first-child { color: var(--accent); }
  .rail-btn[aria-current="page"]::before, .rail-btn.is-current::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 3px; background: var(--accent); }
  .rail-count, .rail-btn .rail-chev { opacity: 0; transition: opacity .2s; }
  :root.rail-wide .rail-count, :root.rail-wide .rail-btn .rail-chev { opacity: .7; }
  .rail-toggle .ic { transition: transform .32s var(--ease); }
  :root.rail-wide .rail-toggle .ic { transform: scaleX(-1); }
  .rail-div::before { content: ""; position: absolute; left: 10px; top: 50%; width: 24px; height: 1px; background: var(--rail-line); transition: opacity .2s; }
  .rail-div .rail-label { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: 0; transition: opacity .2s; }
  :root.rail-wide .rail-div::before { opacity: 0; }
  :root.rail-wide .rail-div .rail-label { opacity: 1; }
  .fly {
    position: fixed; z-index: 79; top: 0; bottom: 0; left: var(--rail-open); width: 300px;
    display: flex; flex-direction: column; padding-top: max(18px, env(safe-area-inset-top, 0px));
    background: var(--bg); color: var(--fg); border-right: 1px solid var(--line);
    box-shadow: 40px 0 80px -44px var(--shadow-c2); white-space: normal; cursor: auto;
  }
  .fly-head { display: flex; align-items: center; gap: 10px; padding: 0 14px 0 18px; flex: none; }
  .fly-h { font: 650 1.25rem/1.1 var(--font-display); letter-spacing: -.025em; color: var(--fg); }
  .fly-count { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font: 500 .6875rem/1 var(--font-mono); }
  .fly-close { margin-left: auto; width: 40px; height: 40px; }
  .fly-filter { margin: 14px 18px 8px; flex: none; }
  .fly-list { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 12px; overscroll-behavior: contain; }
}
@media (min-width: 1024px) and (pointer: coarse) { .fly-list a { min-height: 44px; } }
@media (min-width: 1280px) { :root[data-rail="expanded"] { --rail-w: 264px; } }

@media (max-width: 1023.98px) {
  .rail {
    position: fixed; z-index: 58; left: 0; right: 0; bottom: 0; top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    overflow-y: auto; overscroll-behavior: contain; background: var(--bg); color: var(--fg);
    padding: 6px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
  }
  .rail.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .25s var(--ease), transform .3s var(--ease); }
  .rail-top { display: none; }
  .rail-m { display: block; }
  .rail ul { gap: 0; }
  .rail-btn { min-height: 56px; padding: 0 2px; border-radius: 0; border-bottom: 1px solid var(--line); font: 600 1.3125rem/1.1 var(--font-display); letter-spacing: -.02em; }
  .rail-btn .ic { color: var(--muted); }
  .rail-btn:hover { color: var(--accent-ink); }
  .rail-btn[aria-current="page"], .rail-btn.is-current { color: var(--accent-ink); }
  .rail-btn[aria-current="page"] > .ic:first-child, .rail-btn.is-current > .ic:first-child { color: var(--accent-ink); }
  .rail-hub .rail-btn, .rail-all { font: 600 1.0625rem/1.2 var(--font-body) !important; letter-spacing: 0 !important; min-height: 52px !important; }
  .rail-count { color: var(--muted); font-size: .75rem; }
  .rail-btn .rail-chev { transform: rotate(90deg); color: var(--muted); }
  .rail-btn[aria-expanded="true"] .rail-chev { transform: rotate(-90deg); }
  .rail-div { margin: 28px 0 4px; min-height: 0; }
  .rail-div .rail-label { color: var(--muted); }
  .fly { padding: 10px 0 16px 34px; border-bottom: 1px solid var(--line); }
  .fly-head { display: none; }
  .fly-filter { margin-bottom: 8px; }
  .fly-list a { min-height: 44px; padding: 8px 6px; }
  .fly-all { border-top: 0; padding: 0 6px; min-height: 44px; justify-content: flex-start; }
  .rail-bottom { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
  .rail-bottom .rail-btn { width: auto; min-height: 48px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; font: 600 1rem/1 var(--font-body); letter-spacing: 0; }
  .rail-bottom .rail-btn .ic { color: inherit; }
  .rail-tip { display: none; }
}

/* ---------- Cross-sell band ---------- */
.xsell { display: grid; gap: 22px; margin-top: clamp(40px, 5vw, 64px); padding: clamp(24px, 4vw, 44px); border-radius: var(--r-xl); background: var(--fg); color: var(--bg); }
@media (min-width: 900px) { .xsell { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; } }
.xsell .eyebrow { color: color-mix(in srgb, var(--bg) 70%, var(--fg)); }
.xsell h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 3rem); letter-spacing: -.045em; margin: 8px 0 14px; }
.xsell .trust { color: color-mix(in srgb, var(--bg) 78%, var(--fg)); }
.xsell-side { display: grid; gap: 14px; justify-items: start; }
.xsell-offer { font-size: 1.0625rem; }
.xsell-offer b { color: var(--accent); font-weight: 700; }
/* ---------- Tool page head, side card, tabs, fields, code ---------- */
.tool-sub { margin-top: 8px; font: 400 1.125rem/1.5 var(--font-body); color: var(--muted); max-width: 48rem; }
.side-card { display: grid; gap: 14px; padding: 24px; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--panel); }
.side-card h2 { font-size: 1.375rem; letter-spacing: -.025em; }
.side-card ul { display: grid; gap: 0; border-top: 1px solid var(--line); }
.side-card li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.side-card li .ic { width: 16px; height: 16px; margin-top: 3px; color: var(--accent-ink); }
.side-card .btn { justify-self: start; }
/* Text-like inputs only: .field input rules skip checkbox, radio, range, color and file inputs (chips, segmented, toggles). */
/* Badge base (sample result, sample portal, labels); variants follow */
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 10px; border-radius: 999px; font: 500 .6875rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; background: var(--panel-2); color: var(--fg); }
.badge-accent { background: var(--accent); color: var(--on-accent); }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--panel); overflow-x: auto; }
.tab { flex: 1 0 auto; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 600 .9375rem/1 var(--font-body); cursor: pointer; white-space: nowrap; transition: background-color .2s, color .2s, box-shadow .2s; }
.tab:hover { color: var(--fg); }
@media (max-width: 480px) { .tab { padding: 0 8px; font-size: .875rem; } }
.tab[aria-selected="true"] { background: var(--bg); color: var(--fg); box-shadow: 0 1px 2px var(--shadow-c), 0 0 0 1px var(--line); }
.panel-note { font-size: .875rem; color: var(--muted); }
.field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hint { font-size: .8125rem; color: var(--muted); }
.count { font: 500 .75rem/1.3 var(--font-mono); color: var(--muted); white-space: nowrap; }
.count[data-state="short"] { color: var(--warn); }
.count[data-state="ideal"] { color: var(--ok); }
.count[data-state="long"] { color: var(--bad); }
.select { position: relative; }
.select select { width: 100%; min-height: 50px; padding: 12px 42px 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: 400 1rem/1.3 var(--font-body); -webkit-appearance: none; appearance: none; cursor: pointer; }
.select select:hover { border-color: var(--muted); }
.select select:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.select .ic { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.copy-btn .ic-done { display: none; }
.copy-btn.is-copied .ic-done { display: block; }
.copy-btn.is-copied .ic-copy { display: none; }
.copy-msg { font-size: .875rem; color: var(--muted); min-height: 1.4em; }
.code {
  margin: 0; max-height: 340px; overflow: auto; padding: 16px 18px; border-radius: var(--r-md);
  background: var(--code-bg); border: 1px solid var(--line); color: var(--fg);
  font: 400 .8125rem/1.7 var(--font-mono); white-space: pre; tab-size: 2;
}
.code code { font: inherit; }
.t-tag { color: var(--tok-tag); }
.t-attr { color: var(--tok-attr); }
.t-val { color: var(--tok-val); }
.t-com { color: var(--tok-com); font-style: italic; }
/* ---------- Footer additions ---------- */
.foot-social { display: flex; gap: 8px; margin-top: 4px; }
.foot-social .icon-btn .ic { width: 18px; height: 18px; }
.foot-bottom a { text-decoration: none; }
@media (min-width: 640px) and (max-width: 899px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }

/* ---------- Generic: head grid, cards, stats, tabs, links in lists ---------- */
.head-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 1024px) { .head-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; } }
.head-main { min-width: 0; }
.ind-link, .child-link { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.ind-link .ic, .child-link .ic { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.ind-link:hover .ic, .child-link:hover .ic { transform: translate(2px, -2px); }
.child-link { font-weight: 600; font-size: .9375rem; margin-top: 4px; }
.card-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.card { position: relative; display: grid; gap: 8px; align-content: start; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg); color: var(--fg); text-decoration: none; min-width: 0; transition: transform .3s var(--ease), border-color .2s, box-shadow .3s var(--ease); }
a.card:hover, a.card:focus-visible { transform: translateY(-3px); border-color: var(--fg); box-shadow: 0 16px 30px -22px var(--shadow-c2); }
.card-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.card-ic .ic { width: 22px; height: 22px; }
.card-t { font-size: 1.25rem; letter-spacing: -.02em; padding-right: 28px; }
.card-p { color: var(--muted); font-size: .9375rem; }
.card-meta { font: 500 .75rem/1.4 var(--font-mono); color: var(--muted); }
.card-go { position: absolute; right: 18px; top: 20px; color: var(--muted); transition: transform .3s var(--ease), color .2s; }
.card-go .ic { width: 18px; height: 18px; }
a.card:hover .card-go { transform: translate(2px, -2px); color: var(--fg); }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); border-block: 1px solid var(--line); }
.stat-strip li { display: grid; gap: 4px; padding: 18px 16px 18px 0; min-width: 0; }
.stat-strip li + li { padding-left: 16px; border-left: 1px solid var(--line); }
.stat-strip b { font: 650 clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem)/1 var(--font-display); letter-spacing: -.04em; color: var(--accent-ink); }
.stat-strip span { font-size: .875rem; color: var(--muted); }
.tabs-wrap { display: grid; gap: 16px; }
.js .tab-panel:not(.is-active) { display: none; }
.tab-panel:focus-visible { outline-offset: 4px; border-radius: 8px; }

/* ---------- Tool cards (directory, hubs, related tools) ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.tool-grid > li { min-width: 0; }
.tcard {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; height: 100%;
  padding: 16px 16px 16px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg); color: var(--fg); text-decoration: none;
  transition: transform .3s var(--ease), border-color .2s, box-shadow .3s var(--ease);
}
.tcard-ic { width: 40px !important; height: 40px !important; padding: 9px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-ink); }
.tcard-body { display: grid; gap: 4px; min-width: 0; }
.tcard-n { font: 600 1rem/1.25 var(--font-body); letter-spacing: 0; }
.tcard-p { font-size: .8125rem; line-height: 1.45; color: var(--muted); }
/* arrow drawn with a CSS mask (Lucide arrow-up-right) so 170 cards do not repeat an SVG */
.tcard::after { content: ""; width: 18px; height: 18px; margin-top: 2px; background: var(--muted); transition: transform .3s var(--ease), background-color .2s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat; }
.tcard:has(.tool-badge)::after { display: none; }
.tcard:hover, .tcard:focus-visible { transform: translateY(-2px); border-color: var(--fg); box-shadow: 0 14px 28px -20px var(--shadow-c2); }
.tcard:hover::after, .tcard:focus-visible::after { transform: translate(2px, -2px); background: var(--fg); }
.tcard mark { background: var(--accent-soft); color: var(--fg); border-radius: 3px; padding: 0 1px; box-shadow: inset 0 -2px 0 var(--accent); }
.tool-badge { flex: none; align-self: start; font: 500 .6875rem/1 var(--font-mono); padding: 5px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }

/* ---------- Prose (ported articles) with sticky table of contents ---------- */
.prose-wrap { display: grid; gap: 32px; }
@media (min-width: 1024px) { .prose-wrap { grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 56px; align-items: start; } .prose-wrap.no-toc { grid-template-columns: minmax(0, 1fr); } }
.toc { border-top: 1px solid var(--fg); padding-top: 14px; font-size: .875rem; }
@media (min-width: 1024px) { .toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100svh - var(--header-h) - 48px); overflow-y: auto; } }
@media (max-width: 1023px) { .toc { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); } }
.toc-h { font: 500 .75rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc ol { display: grid; gap: 2px; }
.toc ol ol { margin: 2px 0 6px 12px; padding-left: 10px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; line-height: 1.35; transition: color .2s; }
.toc a:hover { color: var(--fg); }
.toc a[aria-current="true"] { color: var(--accent-ink); font-weight: 600; }
.prose { max-width: 46rem; min-width: 0; font-size: 1.0625rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.12; letter-spacing: -.035em; margin-top: 2em; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h3 { font-size: clamp(1.25rem, 1.05rem + .6vw, 1.5rem); line-height: 1.2; letter-spacing: -.02em; margin-top: 1.6em; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h4 { font-size: 1.125rem; margin-top: 1.4em; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent-ink); }
.prose blockquote { padding: 14px 20px; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.prose code { font: 500 .9em/1.4 var(--font-mono); padding: 2px 6px; border-radius: 6px; background: var(--panel); }
.prose pre { padding: 16px 18px; border-radius: var(--r-md); background: var(--code-bg); border: 1px solid var(--line); overflow-x: auto; }
.prose pre code { padding: 0; background: none; }
.prose img { border-radius: var(--r-md); height: auto; }
.prose figure figcaption { font-size: .875rem; color: var(--muted); margin-top: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); -webkit-overflow-scrolling: touch; }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.table-scroll th, .table-scroll td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-scroll thead th { font: 500 .75rem/1.3 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--panel); white-space: nowrap; }
.table-scroll tbody tr:last-child > * { border-bottom: 0; }
.prose .table-scroll table { min-width: 520px; }

/* ---------- Tool page shell ---------- */
.tool-top { position: relative; overflow: clip; isolation: isolate; padding-block: clamp(12px, 1.6vw, 22px) clamp(36px, 4vw, 56px); }
.tool-shell { display: grid; gap: 14px 32px; grid-template-areas: "head" "tool" "side"; }
@media (min-width: 1024px) {
  .tool-shell { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); grid-template-areas: "head side" "tool tool"; align-items: end; }
}
.ts-head { grid-area: head; min-width: 0; }
.ts-head .crumbs ol { margin-bottom: 8px; }
@media (pointer: fine) { .ts-head .crumbs a { min-height: 28px; } }
.ts-tool { grid-area: tool; min-width: 0; margin-top: 4px; }
.ts-side { grid-area: side; min-width: 0; }
/* Compact hire card (tool pages): title, two short lines and a small button, so it never sets the header height */
.side-card--compact { gap: 4px; padding: 14px 16px; border-radius: var(--r-lg); }
.side-card--compact h2 { font-size: 1rem; letter-spacing: -.01em; }
.side-card--compact .scc-line { font-size: .8125rem; line-height: 1.45; color: var(--muted); }
.side-card--compact .scc-offer { font-size: .8125rem; line-height: 1.45; }
.side-card--compact .scc-offer b { color: var(--accent-ink); }
.side-card--compact .btn { margin-top: 6px; }
@media (pointer: fine) { .side-card--compact .btn { min-height: 36px; padding: 0 14px; } }
.ts-hub { display: inline-flex; align-items: center; gap: 8px; font: 500 .75rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ts-hub .ic { width: 14px; height: 14px; color: var(--accent-ink); }
.page-title.tool-title { display: flex; align-items: center; gap: .3em; flex-wrap: wrap; }
.ts-ic { display: inline-grid; place-items: center; width: 1.05em; height: 1.05em; border-radius: .26em; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.ts-ic .ic { width: .58em; height: .58em; }

/* ---------- Toolkit: tool app, states, preview switch ---------- */
.kt { border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg); box-shadow: 0 30px 60px -48px var(--shadow-c2); }
.kt-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel); border-radius: var(--r-xl) var(--r-xl) 0 0; }
.kt-kind { display: inline-flex; align-items: center; gap: 8px; font: 500 .8125rem/1.3 var(--font-mono); color: var(--muted); }
.kt-kind .ic { width: 16px; height: 16px; color: var(--accent-ink); }
.kt-preview { display: inline-flex; flex-wrap: wrap; align-items: center; max-width: 100%; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg); border: 1px dashed var(--muted); }
.kt-preview-k { font: 500 .6875rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 8px 0 10px; }
.kt-preview button { min-height: 32px; padding: 0 11px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 600 .75rem/1 var(--font-body); cursor: pointer; }
@media (pointer: coarse) { .kt-preview button { min-height: 40px; } }
.kt-preview button:hover { color: var(--fg); }
.kt-preview button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.kt-preview::-webkit-scrollbar { display: none; }
.kt-preview button { flex: none; white-space: nowrap; }
@media (max-width: 639px) {
  .kt-bar { padding: 10px 12px; gap: 8px; }
  .kt-preview { gap: 0; padding: 2px; }
  .kt-preview-k { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .kt-preview button { padding: 0 9px; font-size: .6875rem; }
}
.kt-body { display: grid; gap: 0; }
.kt-form { display: grid; gap: 18px; align-content: start; padding: clamp(18px, 2.6vw, 28px); min-width: 0; }
.kt-out { padding: clamp(18px, 2.6vw, 28px); border-top: 1px solid var(--line); min-width: 0; }
@media (min-width: 1024px) {
  .kt--split .kt-body { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .kt--split .kt-out { border-top: 0; border-left: 1px solid var(--line); }
}
.kt-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.kt-note { font-size: .8125rem; color: var(--muted); }
.kt-state[hidden] { display: none !important; }
.kt-state { display: grid; gap: 16px; align-content: start; }
.kt-empty { justify-items: center; text-align: center; padding: clamp(18px, 4vw, 40px) 12px; border: 1px dashed var(--line); border-radius: var(--r-lg); background: color-mix(in srgb, var(--panel) 55%, var(--bg)); }
.kt-empty-art { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-ink); }
.kt-empty-art .ic { width: 28px; height: 28px; }
.kt-empty h3, .kt-error h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.kt-empty p, .kt-error p { color: var(--muted); max-width: 34rem; }
.kt-result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.kt-rt { font-size: 1.375rem; letter-spacing: -.025em; }
.kt-rt:focus { outline: none; }
.badge-sample { background: var(--accent-soft); color: var(--accent-ink); border: 1px dashed var(--accent); }
.kt-sample-note { font-size: .8125rem; color: var(--muted); margin-top: -8px; }
.kt-result-body { display: grid; gap: 18px; min-width: 0; }
.kt-sub { font: 600 1rem/1.3 var(--font-body); letter-spacing: 0; margin-bottom: 8px; }
.kt-cols { display: grid; gap: 18px; }
@media (min-width: 760px) { .kt-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kt-error { justify-items: start; padding: 20px; border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 7%, var(--bg)); }
.kt-err-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--bad) 14%, var(--bg)); color: var(--bad); }
.kt-err-ic .ic { width: 22px; height: 22px; }
.kt-err-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kt-inert-msg { font-size: .8125rem; color: var(--muted); }

/* ---------- Toolkit: form controls ---------- */
.kt-form .field label, .kt-form legend { font-weight: 600; font-size: .9375rem; }
.kt-form .field input:where(:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file])), .kt-form .field textarea, .kt-form .field select { font-size: 1rem; }
.kt-form .field textarea { min-height: 140px; }
.kt-form textarea.mono, .kt-form input.mono { font: 400 .875rem/1.6 var(--font-mono); }
.field [aria-invalid="true"] { border-color: var(--bad) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent); }
.kt-form .err { color: var(--bad); }
.input-ic { position: relative; }
.input-ic > .ic { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-ic input { padding-left: 42px !important; }
.input-unit { position: relative; display: flex; }
.input-unit input { padding-right: 56px !important; }
.input-unit .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font: 500 .8125rem/1 var(--font-mono); color: var(--muted); pointer-events: none; }
.input-color { display: flex; align-items: center; gap: 12px; }
.input-color input[type="color"] { width: 56px; height: 48px; padding: 4px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); cursor: pointer; }
.input-range { display: flex; align-items: center; gap: 14px; }
.input-range input[type="range"] { flex: 1; accent-color: var(--accent); min-height: 44px; }
.input-range output { min-width: 4.5em; text-align: right; font-size: .875rem; }
.field-row { display: grid; gap: 14px; }
@media (min-width: 640px) { .field-row { grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); } }
.check-row { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 0; cursor: pointer; font-size: .9375rem; }
.check-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box { display: grid; place-items: center; width: 20px; height: 20px; flex: none; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--muted); color: transparent; transition: background-color .2s, border-color .2s; }
.check-box .ic { width: 14px; height: 14px; }
.check-row input:checked + .check-box { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.check-row input:focus-visible + .check-box { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.check-t { display: grid; gap: 2px; }
.chips-field, .seg-field { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.chip-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt input, .seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-opt span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: .875rem; font-weight: 500; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
@media (pointer: coarse) { .chip-opt span { min-height: 44px; } }
.chip-opt span:hover { border-color: var(--fg); }
.chip-opt input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip-opt input:focus-visible + span, .seg-opt input:focus-visible + span { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.seg-opts { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 999px; background: var(--panel); justify-self: start; }
.seg-opt span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; color: var(--muted); font: 600 .8125rem/1 var(--font-body); cursor: pointer; }
.seg-opt input:checked + span { background: var(--bg); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.drop { position: relative; display: grid; justify-items: center; gap: 8px; padding: 28px 18px; border-radius: var(--r-lg); border: 1.5px dashed var(--muted); background: color-mix(in srgb, var(--panel) 60%, var(--bg)); text-align: center; transition: border-color .2s, background-color .2s; }
.drop.is-over, .drop:focus-within { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 50%, var(--bg)); }
.drop-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--bg); color: var(--accent-ink); box-shadow: 0 0 0 1px var(--line); }
.drop-ic .ic { width: 24px; height: 24px; }
.drop-t { font-size: .9375rem; }
.drop-formats { font: 500 .75rem/1.4 var(--font-mono); color: var(--muted); }
.drop-list { display: grid; gap: 6px; width: 100%; max-width: 420px; }
.drop-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--line); font-size: .875rem; text-align: left; }
.drop-list li span:last-child { font-family: var(--font-mono); color: var(--muted); white-space: nowrap; }
.drop.has-error { border-color: var(--bad); }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: -6px; }
.ex-k { font: 500 .75rem/1 var(--font-mono); color: var(--muted); margin-right: 4px; }
.ex-btn { min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: 500 .8125rem/1 var(--font-mono); cursor: pointer; }
@media (pointer: coarse) { .ex-btn { min-height: 44px; } }
.ex-btn:hover { border-color: var(--fg); }

/* ---------- Toolkit: result blocks ---------- */
.rs { display: flex; align-items: center; gap: 18px; padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); }
.rs--ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: color-mix(in srgb, var(--ok) 7%, var(--bg)); }
.rs--warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn) 8%, var(--bg)); }
.rs--bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 7%, var(--bg)); }
.rs-text { display: grid; gap: 4px; min-width: 0; }
.rs-title { font: 650 clamp(1.125rem, 1rem + .6vw, 1.5rem)/1.2 var(--font-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.rs-sub { color: var(--muted); font-size: .9375rem; }
.ring { --v: 0; --tone: var(--ok); position: relative; display: grid; place-content: center; justify-items: center; width: 88px; height: 88px; flex: none; border-radius: 50%;
  background: radial-gradient(closest-side, var(--bg) 78%, transparent 79% 100%), conic-gradient(var(--tone) calc(var(--v) * 1%), var(--panel-2) 0); }
.ring--warn { --tone: var(--warn); }
.ring--bad { --tone: var(--bad); }
.ring--neutral { --tone: var(--accent); }
.ring-v { font: 700 1.5rem/1 var(--font-display); letter-spacing: -.03em; }
.ring-k { font: 500 .625rem/1.1 var(--font-mono); color: var(--muted); text-align: center; max-width: 60px; }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
@media (max-width: 759px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg); min-width: 0; }
.tile-k { font: 500 .6875rem/1.3 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tile-v { font: 650 clamp(1.25rem, 1rem + .8vw, 1.75rem)/1.1 var(--font-display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.tile-sub { font-size: .8125rem; color: var(--muted); }
.tile--ok .tile-v { color: var(--ok); }
.tile--warn .tile-v { color: var(--warn); }
.tile--bad .tile-v { color: var(--bad); }
.kv th { width: 38%; font-weight: 600; color: var(--muted); font-size: .875rem; }
.kv td { overflow-wrap: anywhere; }
.kv code, .dt code { font: 500 .8125rem/1.4 var(--font-mono); }
.dt .num, .dt th.num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.codebox { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.codebox-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.codebox-k { font: 500 .75rem/1 var(--font-mono); color: var(--muted); }
.codebox .code { border: 0; border-radius: 0; max-height: 360px; }
.copy-btn.is-copied { border-color: var(--ok); color: var(--ok); }
.fcard { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg); flex-wrap: wrap; }
.fcard-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.fcard-ic .ic { width: 22px; height: 22px; }
.fcard-t { flex: 1; min-width: 140px; }
.fcard-n { font-weight: 600; overflow-wrap: anywhere; }
.fcard-m { font: 500 .8125rem/1.4 var(--font-mono); color: var(--muted); }
.status-list { display: grid; border-top: 1px solid var(--line); }
.st { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.st .ic { width: 18px; height: 18px; margin-top: 2px; }
.st--ok .ic { color: var(--ok); }
.st--warn .ic { color: var(--warn); }
.st--bad .ic { color: var(--bad); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list li { padding: 6px 10px; border-radius: 8px; background: var(--panel); font: 500 .8125rem/1.2 var(--font-mono); overflow-wrap: anywhere; }
.pimg { display: grid; gap: 8px; margin: 0; }
.pimg-box { display: grid; place-items: center; border-radius: var(--r-md); border: 1px solid var(--line); color: var(--muted); font: 500 .8125rem/1 var(--font-mono);
  background: repeating-linear-gradient(135deg, var(--panel) 0 14px, var(--panel-2) 14px 15px); }
.pimg figcaption { font: 500 .75rem/1.4 var(--font-mono); color: var(--muted); }
.ba { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Toolkit: loading skeletons ---------- */
.sk-wrap { display: grid; gap: 16px; }
.sk { display: block; border-radius: 10px; background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 40%, var(--panel) 80%); background-size: 300% 100%; animation: sk 1.4s ease-in-out infinite; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk-tiles { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 759px) { .sk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sk-tile { height: 84px; border-radius: var(--r-md); }
.sk-table { display: grid; gap: 8px; }
.sk-row { height: 40px; }
.sk-code, .sk-lines, .sk-flines { display: grid; gap: 10px; }
.sk-line { height: 14px; width: var(--w, 80%); }
.sk-cards { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sk-card { height: 120px; border-radius: var(--r-md); }
.sk-file { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); }
.sk-fic { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.sk-flines { flex: 1; }
.sk-fbtn { width: 120px; height: 44px; border-radius: 999px; }
.sk-image { aspect-ratio: 16 / 9; border-radius: var(--r-md); }
.sk-ringrow { display: flex; align-items: center; gap: 18px; }
.sk-ring { width: 88px; height: 88px; border-radius: 50%; flex: none; }

/* ---------- Flowing border on the current nav item (header nav and rail) ---------- */
@property --kw-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes kw-flow { to { --kw-angle: 360deg; } }
.nav-list a[aria-current="page"] { position: relative; }
.nav-list a[aria-current="page"]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--kw-angle), color-mix(in srgb, var(--accent) 18%, transparent) 0deg 200deg, color-mix(in srgb, var(--accent) 70%, transparent) 270deg, var(--accent) 310deg, color-mix(in srgb, var(--accent) 18%, transparent) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: kw-flow 3s linear infinite;
}
@media (min-width: 1024px) {
  .rail-btn[aria-current="page"]::before, .rail-btn.is-current::before { display: none; }
  .rail-btn[aria-current="page"]::after, .rail-btn.is-current::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
    background: conic-gradient(from var(--kw-angle), color-mix(in srgb, var(--accent) 22%, transparent) 0deg 200deg, color-mix(in srgb, var(--accent) 75%, transparent) 270deg, var(--accent) 310deg, color-mix(in srgb, var(--accent) 22%, transparent) 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
    animation: kw-flow 3s linear infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-list a[aria-current="page"]::after, .rail-btn[aria-current="page"]::after, .rail-btn.is-current::after { animation: none !important; background: color-mix(in srgb, var(--accent) 75%, transparent); }
}

/* ---------- Light-mode switch (header and rail): ON = light, OFF = dark ---------- */
.tswitch { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 2px; border: 0; border-radius: 999px; background: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tswitch:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
/* Wall light switch: plate, recessed frame, screws and a rocker that tilts in 3D.
   ON (light): top half pressed in. OFF (dark): bottom half pressed in. State follows the effective theme. */
.wsw { display: block; flex: none; width: 40px; height: 40px; }
.wsw-plate { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; perspective: 90px;
  background: linear-gradient(180deg, var(--sw-plate), var(--sw-plate-2)); border: 1px solid var(--sw-line);
  box-shadow: 0 1px 2px var(--sw-shadow), 0 3px 7px -3px var(--sw-shadow), inset 0 1px 0 var(--sw-bevel-hi), inset 0 -1px 0 var(--sw-bevel-lo);
  transition: box-shadow .2s ease, transform .2s ease; }
.wsw-screw { position: absolute; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%; background: var(--sw-screw); box-shadow: inset 0 .5px 0 var(--sw-screw-hi); }
.wsw-screw--l { left: 4px; }
.wsw-screw--r { right: 4px; }
.wsw-frame { display: grid; place-items: center; width: 24px; height: 31px; border-radius: 6px; background: var(--sw-frame);
  box-shadow: inset 0 1px 2px var(--sw-frame-shadow), inset 0 -1px 0 var(--sw-bevel-hi); transform-style: preserve-3d; }
.wsw-rocker { position: relative; display: block; width: 20px; height: 26px; border-radius: 5px; transform-origin: 50% 50%;
  background: linear-gradient(180deg, var(--sw-rock-lo) 0%, var(--sw-rock-mid) 46%, var(--sw-rock-hi) 100%);
  box-shadow: 0 2px 2px -1px var(--sw-rock-shadow), inset 0 -1px 0 var(--sw-bevel-hi), inset 0 1px 1px var(--sw-rock-shadow);
  transform: translateZ(5px) rotateX(16deg);
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), scale .12s ease, box-shadow .22s ease, background .22s ease; }
.wsw-ic { position: absolute; left: 50%; top: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; transition: opacity .2s ease, transform .22s cubic-bezier(.34, 1.56, .64, 1); }
.wsw-sun { opacity: 1; transform: scale(1); }
.wsw-moon { opacity: 0; transform: scale(.6) rotate(-30deg); }
.wsw-off { display: none; }
:root[data-theme="dark"] .wsw-rocker { transform: translateZ(5px) rotateX(-16deg);
  background: linear-gradient(180deg, var(--sw-rock-hi) 0%, var(--sw-rock-mid) 54%, var(--sw-rock-lo) 100%);
  box-shadow: 0 -1px 2px -1px var(--sw-rock-shadow), inset 0 1px 0 var(--sw-bevel-hi), inset 0 -1px 1px var(--sw-rock-shadow); }
:root[data-theme="dark"] .wsw-sun { opacity: 0; transform: scale(.6) rotate(30deg); }
:root[data-theme="dark"] .wsw-moon { opacity: 1; transform: none; }
:root[data-theme="dark"] .wsw-on { display: none; }
:root[data-theme="dark"] .wsw-off { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wsw-rocker { transform: translateZ(5px) rotateX(-16deg);
    background: linear-gradient(180deg, var(--sw-rock-hi) 0%, var(--sw-rock-mid) 54%, var(--sw-rock-lo) 100%);
    box-shadow: 0 -1px 2px -1px var(--sw-rock-shadow), inset 0 1px 0 var(--sw-bevel-hi), inset 0 -1px 1px var(--sw-rock-shadow); }
  :root:not([data-theme="light"]) .wsw-sun { opacity: 0; transform: scale(.6) rotate(30deg); }
  :root:not([data-theme="light"]) .wsw-moon { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) .wsw-on { display: none; }
  :root:not([data-theme="light"]) .wsw-off { display: inline; }
}
.tswitch:active .wsw-rocker, .rail-theme:active .wsw-rocker { scale: .93; }
.tswitch:hover .wsw-plate, .rail-theme:hover .wsw-plate { transform: translateY(-1px);
  box-shadow: 0 2px 4px var(--sw-shadow), 0 6px 12px -4px var(--sw-shadow), inset 0 1px 0 var(--sw-bevel-hi), inset 0 -1px 0 var(--sw-bevel-lo); }
.tswitch:focus-visible, .rail-theme:focus-visible { outline: none; }
.tswitch:focus-visible .wsw-plate, .rail-theme:focus-visible .wsw-plate {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-ink), 0 1px 2px var(--sw-shadow), inset 0 1px 0 var(--sw-bevel-hi); }
.rail-theme:focus-visible { background: var(--rail-hover); }
@media (prefers-reduced-motion: reduce) {
  .wsw-plate, .wsw-rocker, .wsw-ic { transition: none !important; }
}
.rail-theme { padding: 0 2px; gap: 14px; }
.rail-theme .wsw-on, .rail-theme .wsw-off { white-space: nowrap; }
.rail-bottom .rail-theme { padding: 0 2px; }
@media (max-width: 1023.98px) { .rail-bottom .rail-btn.rail-theme { padding: 0 16px 0 6px; } }

/* ---------- Share block (blog post) and the sticky TOC column ---------- */
.share-block { display: grid; gap: 10px; }
.share-h { font: 500 .75rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.share-list { display: flex; flex-wrap: wrap; gap: 6px; }
.share-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; text-decoration: none; transition: border-color .2s, background-color .2s, color .2s, transform .25s var(--ease); }
@media (pointer: coarse) { .share-btn { width: 44px; height: 44px; } }
.share-btn:hover, .share-btn:focus-visible { border-color: var(--fg); transform: translateY(-1px); }
.share-btn .ic { width: 17px; height: 17px; }
.share-btn.is-copied { border-color: var(--ok); color: var(--ok); }
.share-url { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: 500 .8125rem/1.3 var(--font-mono); }
.share-block--end { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (min-width: 1024px) {
  .toc-col { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 22px; align-content: start; max-height: calc(100svh - var(--header-h) - 48px); overflow-y: auto; scrollbar-width: thin; }
  .toc-col .toc { position: static; max-height: none; overflow: visible; }
  .share-block--end { display: none; }
}
@media (max-width: 1023.98px) { .share-block--toc { display: none; } }

/* ---------- Floating buttons: share (left, beside the rail) and table of contents (right) ---------- */
.fab { position: fixed; z-index: 66; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); box-shadow: 0 12px 28px -14px var(--shadow-c2), 0 2px 6px var(--shadow-c); cursor: pointer;
  transition: left .32s var(--ease), opacity .25s, transform .3s var(--ease), border-color .2s, background-color .2s, color .2s, visibility 0s; -webkit-tap-highlight-color: transparent; }
.fab .ic { width: 20px; height: 20px; }
.fab:hover { border-color: var(--fg); }
.fab[aria-expanded="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.fab-share { left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.fab-toc { right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.fab-panel { position: fixed; z-index: 67; width: min(300px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain;
  padding: 12px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg); color: var(--fg); box-shadow: 0 28px 60px -26px var(--shadow-c2); }
.fab-panel--share { width: min(240px, calc(100vw - 32px)); left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.fab-panel--toc { right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 768px) {
  .fab-toc { width: 36px; height: 36px; right: max(2px, env(safe-area-inset-right, 0px)); top: 50%; bottom: auto; transform: translateY(-50%); }
  .fab-toc .ic { width: 17px; height: 17px; }
  .fab-panel--toc { right: max(46px, env(safe-area-inset-right, 0px)); top: 50%; bottom: auto; transform: translateY(-50%); }
}
@media (min-width: 1024px) {
  .fab-share { width: 36px; height: 36px; left: calc(var(--rail-open) + 2px); top: 50%; bottom: auto; transform: translateY(-50%); }
  .fab-share .ic { width: 17px; height: 17px; }
  .fab-panel--share { left: calc(var(--rail-open) + 46px); top: 50%; bottom: auto; transform: translateY(-50%); transition: left .32s var(--ease); }
}
.fab-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 6px 6px; }
.fab-title { font: 500 .75rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fab-close { width: 36px; height: 36px; }
.fab-close .ic { width: 16px; height: 16px; }
@media (pointer: coarse) { .fab-close { width: 44px; height: 44px; } }
.fab-toc-list { display: grid; gap: 2px; }
.fab-toc-list a { display: block; padding: 9px 10px; border-radius: 10px; color: var(--fg); text-decoration: none; font-size: .9375rem; line-height: 1.35; }
.fab-toc-list a:hover { background: var(--panel); }
.fab-toc-list a[aria-current="true"] { background: var(--accent-soft); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.share-menu { display: grid; gap: 2px; }
.share-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--fg); font: 500 .9375rem/1.2 var(--font-body); text-align: left; text-decoration: none; cursor: pointer; }
.share-item:hover, .share-item:focus-visible { background: var(--panel); }
.share-item .ic { width: 18px; height: 18px; flex: none; }
.share-item.is-copied { color: var(--ok); }
.fab-panel .share-url { margin-top: 8px; }
html.hire-open .fab, html.drawer-open .fab, html.drawer-open .fab-panel { visibility: hidden; opacity: 0; pointer-events: none; }
/* Below 1024px the buttons step aside while a tool's form or result is on screen */
@media (max-width: 1023.98px) { html.tool-in-view .fab, html.tool-in-view .fab-panel { visibility: hidden; opacity: 0; pointer-events: none; } }

/* ---------- Scroll reveal (pre-state is added by JS to below-the-fold elements only) ---------- */
.rv-run { transition: opacity .9s var(--ease), transform 1s var(--ease), clip-path 1.1s var(--ease) !important; transition-delay: var(--rd, 0ms) !important; }
.rv-pre[data-reveal="rise"] { opacity: .35; transform: translate3d(0, 34px, 0); }
.rv-pre[data-reveal="slide"] { opacity: .35; transform: translate3d(-28px, 0, 0); }
.rv-pre[data-reveal="scale"] { opacity: .4; transform: scale(.94); }
.rv-pre[data-reveal="clip"] { clip-path: inset(9% 7% 9% 7% round 28px); }
.rv-pre[data-reveal="clip"] img { transform: scale(1.14); }
.rv-run[data-reveal="clip"] img { transition: transform 1.3s var(--ease); }
.rv-pre[data-reveal="draw"]::before { transform: scaleX(0); }
.rv-run[data-reveal="draw"]::before { transition: transform 1.1s var(--ease); transition-delay: var(--rd, 0ms); }
.rv-pre[data-reveal="draw"] > * { opacity: .35; transform: translate3d(0, 16px, 0); }
.rv-run[data-reveal="draw"] > * { transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--rd, 0ms) + 120ms); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0ms !important; }
  .marquee-track { animation: none !important; width: auto; }
  .marquee-list[aria-hidden="true"] { display: none; }
  .marquee-list { flex-wrap: wrap; flex: 1; }
  .marquee-view { -webkit-mask-image: none; mask-image: none; }
  .marquee-toggle { display: none; }
  .stack-card { transform: none !important; border-radius: var(--r-xl) !important; }
  .stack-card::after { opacity: 0 !important; }
  .frame-par { transform: none !important; }
  .sk { animation: none !important; }
  .device { transform: translate3d(0, 0, calc(var(--z) + var(--lift) * 9em)) !important; }
  .btn { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 899px) {
  .stack-card { border-radius: var(--r-lg) !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .launcher, .rail, .hire, .hero-stage, .marquee, .fab, .fab-panel, .share-block { display: none !important; }
  body { padding-left: 0 !important; }
  .stack-item { position: static; }
}
