/* ==========================================================================
   Ardian Sinurat — portfolio design system (September 2026)
   Static site, no build step. Light/dark follow the OS; the toggle stores an
   explicit choice in localStorage and stamps data-theme on <html>.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #fafaf8;
  --bg-elev: #ffffff;
  --bg-sunk: #f2f2ee;
  --bg-inverse: #161816;
  --line: #e5e4df;
  --line-strong: #cfcdc6;
  --text: #1a1b19;
  --text-2: #4f514c;
  --text-3: #63655f;
  --accent: #0f766e;
  --accent-strong: #0b5c56;
  --accent-soft: #e3f1ef;
  --accent-line: #9fd3cc;
  --on-accent: #ffffff;
  --ok: #13702f;
  --ok-soft: #e4f4e8;
  --warn: #a15c07;
  --warn-soft: #fbf0dc;
  --crit: #b42318;
  --crit-soft: #fbe9e7;
  --info: #1d5fb8;
  --info-soft: #e5eefa;
  --neutral-soft: #efeee9;
  --paper: #ffffff;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", "Segoe UI Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.3125rem;
  --fs-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-2xl: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
  --fs-3xl: clamp(2.25rem, 1.5rem + 3.4vw, 4rem);

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 20, 0.06);
  --shadow: 0 1px 2px rgba(20, 22, 20, 0.05), 0 10px 30px -14px rgba(20, 22, 20, 0.18);
  --shadow-lg: 0 2px 4px rgba(20, 22, 20, 0.04), 0 24px 60px -24px rgba(20, 22, 20, 0.28);
  --container: 1180px;
  --measure: 70ch;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0f0e;
    --bg-elev: #151816;
    --bg-sunk: #111312;
    --bg-inverse: #f2f2ee;
    --line: #262a28;
    --line-strong: #383d3a;
    --text: #ecece8;
    --text-2: #b6b8b2;
    --text-3: #8f928b;
    --accent: #3cc7b6;
    --accent-strong: #71dccf;
    --accent-soft: rgba(60, 199, 182, 0.12);
    --accent-line: rgba(60, 199, 182, 0.45);
    --on-accent: #062522;
    --ok: #4ec27a;
    --ok-soft: rgba(78, 194, 122, 0.13);
    --warn: #e5a73a;
    --warn-soft: rgba(229, 167, 58, 0.13);
    --crit: #f07a6c;
    --crit-soft: rgba(240, 122, 108, 0.13);
    --info: #6ea8f2;
    --info-soft: rgba(110, 168, 242, 0.13);
    --neutral-soft: #1d201e;
    --paper: #f7f7f4;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 28px 64px -24px rgba(0, 0, 0, 0.8);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0f0e;
  --bg-elev: #151816;
  --bg-sunk: #111312;
  --bg-inverse: #f2f2ee;
  --line: #262a28;
  --line-strong: #383d3a;
  --text: #ecece8;
  --text-2: #b6b8b2;
  --text-3: #8f928b;
  --accent: #3cc7b6;
  --accent-strong: #71dccf;
  --accent-soft: rgba(60, 199, 182, 0.12);
  --accent-line: rgba(60, 199, 182, 0.45);
  --on-accent: #062522;
  --ok: #4ec27a;
  --ok-soft: rgba(78, 194, 122, 0.13);
  --warn: #e5a73a;
  --warn-soft: rgba(229, 167, 58, 0.13);
  --crit: #f07a6c;
  --crit-soft: rgba(240, 122, 108, 0.13);
  --info: #6ea8f2;
  --info-soft: rgba(110, 168, 242, 0.13);
  --neutral-soft: #1d201e;
  --paper: #f7f7f4;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 28px 64px -24px rgba(0, 0, 0, 0.8);
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0 0 var(--s-3);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); letter-spacing: -0.035em; }
h2 { font-size: var(--fs-2xl); letter-spacing: -0.03em; }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p { margin: 0 0 var(--s-4); text-wrap: pretty; }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25rem; }
li + li { margin-top: 0.35rem; }
strong { font-weight: 650; color: var(--text); }
small { font-size: var(--fs-sm); }
code, kbd {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-7) 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent-soft); color: var(--text); }

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--s-3); color: var(--on-accent); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.125rem, 4vw, 2rem);
}

.icon { width: 1.1em; height: 1.1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 3. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: var(--s-4); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.brand-role { color: var(--text-3); font-weight: 500; font-size: var(--fs-sm); }

.site-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 0.125rem; list-style: none; margin: 0; padding: 0; }
.nav-list li + li { margin-top: 0; }
.nav-list a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 550;
}
.nav-list a:hover { color: var(--text); background: var(--bg-sunk); }
.nav-list a[aria-current="page"], .nav-list a.is-active { color: var(--text); background: var(--bg-sunk); }

.header-tools { display: flex; align-items: center; gap: 0.35rem; }
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-width: 38px; height: 38px;
  padding: 0 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--text-2);
  font: 600 var(--fs-xs)/1 var(--font-mono);
  letter-spacing: 0.04em;
  cursor: pointer;
}
.tool-btn:hover { color: var(--text); border-color: var(--line-strong); }
.tool-btn .icon { width: 17px; height: 17px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .brand-role { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: var(--s-3) clamp(1.125rem, 4vw, 2rem) var(--s-5);
    display: none;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0.125rem; }
  .nav-list a { padding: 0.75rem 0.75rem; font-size: var(--fs-base); }
  .header-tools { margin-left: auto; }
}

/* ---------- 4. Buttons, badges, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font: 600 var(--fs-sm)/1.2 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.btn-secondary { background: var(--bg-elev); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--text-3); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); padding-inline: 0.5rem; }
.btn-ghost:hover { color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font: 600 0.6875rem/1.4 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--neutral-soft);
  color: var(--text-2);
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.badge.no-dot::before { display: none; }
.badge-live { background: var(--ok-soft); color: var(--ok); }
.badge-dev { background: var(--info-soft); color: var(--info); }
.badge-proto { background: var(--warn-soft); color: var(--warn); }
.badge-research { background: var(--accent-soft); color: var(--accent); }
.badge-internal, .badge-parked, .badge-archived { background: var(--neutral-soft); color: var(--text-2); }
.badge-oss { background: var(--info-soft); color: var(--info); }
.badge-kind { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
.badge-kind::before { display: none; }
.badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0; }
.chips li { margin: 0; }
.chip {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 7px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font: 600 var(--fs-xs)/1.3 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-4);
}
.eyebrow .num { color: var(--text-3); }

.illustrative {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font: 600 0.6875rem/1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warn);
  background: var(--warn-soft);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
}

/* ---------- 5. Sections ---------- */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-sunk); }
.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--text-2); font-size: var(--fs-md); margin: 0; }
.section-head-row { display: flex; align-items: end; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; max-width: none; }
.section-head-row > div { max-width: 760px; }

/* ---------- 6. Hero ---------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%);
  opacity: 0.55;
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-bottom: var(--s-5); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { font-size: var(--fs-md); color: var(--text-2); max-width: 60ch; margin-bottom: var(--s-6); }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-5); color: var(--text-3); font-size: var(--fs-sm); }
.hero-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }

.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--bg-elev); margin-bottom: var(--s-5); }
.lang-switch button {
  border: 0; background: transparent; color: var(--text-3);
  font: 600 var(--fs-xs)/1 var(--font-mono); letter-spacing: 0.06em;
  padding: 0.45rem 0.7rem; border-radius: 7px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--bg-sunk); color: var(--text); }
[data-lang-block] [lang="id"] { display: none; }
:root.lang-id [data-lang-block] [lang="en"] { display: none; }
:root.lang-id [data-lang-block] [lang="id"] { display: revert; }

.hero-figure {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--s-5);
}
.hero-figure-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); font: 600 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.hero-figure svg { width: 100%; height: auto; }
.hero-figure-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px dashed var(--line-strong); }
.hero-figure-foot div { font-size: var(--fs-xs); color: var(--text-3); }
.hero-figure-foot b { display: block; font: 650 var(--fs-md)/1.2 var(--font-mono); color: var(--text); letter-spacing: -0.02em; }

.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: clamp(2.5rem, 5vw, 4rem); position: relative; }
.stat { background: var(--bg-elev); padding: var(--s-5); }
.stat b { display: block; font: 700 clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem)/1 var(--font-mono); letter-spacing: -0.04em; color: var(--text); margin-bottom: var(--s-2); }
.stat span { display: block; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 7. About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); }
.prose { max-width: var(--measure); color: var(--text-2); font-size: 1.0625rem; }
.prose p { margin-bottom: 1.1em; }
.prose strong { color: var(--text); }
.info-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.info-list li { display: grid; grid-template-columns: 28px 1fr; gap: var(--s-3); padding: var(--s-4) var(--s-5); margin: 0; }
.info-list li + li { border-top: 1px solid var(--line); }
.info-list .icon { width: 20px; height: 20px; color: var(--accent); margin-top: 2px; }
.info-list dt, .info-list .k { font: 600 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 0.2rem; }
.info-list .v { color: var(--text); font-weight: 550; }
.how-card { margin-top: var(--s-5); padding: var(--s-5); border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--text-2); }
.how-card h3 { font-size: var(--fs-md); display: flex; align-items: center; gap: 0.5rem; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- 8. Work cards ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter-btn {
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--text-2);
  font: 600 var(--fs-sm)/1 var(--font-sans);
  padding: 0.55rem 0.85rem; border-radius: 999px; cursor: pointer; min-height: 38px;
}
.filter-btn:hover { color: var(--text); border-color: var(--line-strong); }
.filter-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter-btn .count { font-family: var(--font-mono); opacity: 0.6; margin-left: 0.3rem; font-size: var(--fs-xs); }

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); }
.work-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.work-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.work-card[hidden] { display: none; }
.work-media { position: relative; aspect-ratio: 16 / 10; background: var(--paper); border-bottom: 1px solid var(--line); overflow: hidden; }
.work-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.5s var(--ease); }
.work-card:hover .work-media img { transform: scale(1.025); }
.work-media .media-tag { position: absolute; left: 12px; bottom: 12px; }
.media-tag { font: 600 0.625rem/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; background: rgba(20, 22, 20, 0.78); color: #fff; padding: 0.25rem 0.45rem; border-radius: 5px; }
.work-body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.work-body h3 { margin: 0; font-size: var(--fs-lg); }
.work-body h3 a { color: var(--text); text-decoration: none; }
.work-body h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.work-body p { margin: 0; color: var(--text-2); }
.work-foot { margin-top: auto; padding-top: var(--s-3); display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); color: var(--text-3); font-size: var(--fs-sm); }
.work-foot .go { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text); font-weight: 600; }
.work-card:hover .go { color: var(--accent); }
.work-num { font: 600 var(--fs-xs)/1 var(--font-mono); color: var(--text-3); letter-spacing: 0.06em; }
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } }

/* compact cards (More work) */
.group-title { display: flex; align-items: center; gap: 0.6rem; font-size: var(--fs-md); margin: var(--s-7) 0 var(--s-4); }
.group-title:first-child { margin-top: 0; }
.group-title .icon { color: var(--accent); width: 20px; height: 20px; }
.group-title small { font: 500 var(--fs-sm)/1 var(--font-sans); color: var(--text-3); margin-left: auto; letter-spacing: 0; }
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.mini-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.mini-card h4 { margin: 0; font-size: 1.0625rem; }
.mini-card p { margin: 0; color: var(--text-2); font-size: 0.9375rem; }
.mini-card .stack { margin-top: auto; font: 500 var(--fs-xs)/1.5 var(--font-mono); color: var(--text-3); }
.mini-card a.more { font-size: var(--fs-sm); font-weight: 600; display: inline-flex; gap: 0.3rem; align-items: center; }
@media (max-width: 1000px) { .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mini-grid { grid-template-columns: 1fr; } }

/* demos teaser */
.demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.demo-card { position: relative; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.demo-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.demo-card svg.preview { width: 100%; height: auto; border-radius: 10px; background: var(--bg-sunk); border: 1px solid var(--line); }
.demo-card h3 { margin: 0; font-size: var(--fs-md); }
.demo-card h3 a { color: var(--text); text-decoration: none; }
.demo-card h3 a::after { content: ""; position: absolute; inset: 0; }
.demo-card p { margin: 0; color: var(--text-2); font-size: 0.9375rem; }
@media (max-width: 900px) { .demo-grid { grid-template-columns: 1fr; } }

/* ---------- 9. Experience timeline ---------- */
.xp-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line-strong); }
.timeline > li { position: relative; padding: 0 0 var(--s-6) 2.25rem; margin: 0; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before { content: ""; position: absolute; left: 0; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline .when { font: 600 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: 0.06em; color: var(--accent); text-transform: uppercase; }
.timeline h3 { font-size: 1.125rem; margin: 0.3rem 0 0.15rem; }
.timeline .where { color: var(--text-3); font-size: var(--fs-sm); margin-bottom: var(--s-3); }
.timeline ul { color: var(--text-2); margin: 0; font-size: 0.9375rem; }
.buildlog { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-5); position: sticky; top: calc(var(--header-h) + 24px); }
.buildlog h3 { font-size: var(--fs-md); display: flex; gap: 0.5rem; align-items: center; }
.buildlog ol { list-style: none; padding: 0; margin: 0; }
.buildlog li { display: grid; grid-template-columns: 76px 1fr; gap: var(--s-3); padding: 0.6rem 0; margin: 0; border-top: 1px dashed var(--line); font-size: var(--fs-sm); color: var(--text-2); }
.buildlog li:first-child { border-top: 0; }
.buildlog li b { font: 600 var(--fs-xs)/1.6 var(--font-mono); color: var(--text); letter-spacing: 0.02em; }
@media (max-width: 900px) { .xp-grid { grid-template-columns: 1fr; } .buildlog { position: static; } }

/* ---------- 10. Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-4); }
.skill-group { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5); }
.skill-group h3 { font-size: 1rem; display: flex; align-items: center; gap: 0.55rem; margin-bottom: var(--s-4); }
.skill-group h3 .icon { color: var(--accent); width: 19px; height: 19px; }

/* ---------- 11. Contact & footer ---------- */
.contact-panel { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 3.5rem); box-shadow: var(--shadow); }
.contact-panel h2 { margin-bottom: var(--s-4); }
.contact-panel p { color: var(--text-2); font-size: var(--fs-md); }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { margin: 0; border-top: 1px solid var(--line); }
.link-list li:first-child { border-top: 0; }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 0.9rem 0; color: var(--text); text-decoration: none; }
.link-list a span small { display: block; color: var(--text-3); font-size: var(--fs-sm); }
.link-list a:hover { color: var(--accent); }
.link-list .icon { color: var(--text-3); }
@media (max-width: 860px) { .contact-panel { grid-template-columns: 1fr; } }

.site-footer { border-top: 1px solid var(--line); padding: var(--s-6) 0; color: var(--text-3); font-size: var(--fs-sm); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); align-items: center; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.footer-inner a { color: var(--text-2); text-decoration: none; }
.footer-inner a:hover { color: var(--text); }

/* ---------- 12. Case study pages ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: var(--fs-sm); color: var(--text-3); margin-bottom: var(--s-5); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs .icon { width: 14px; height: 14px; }

.case-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); }
.case-hero h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem); margin: var(--s-4) 0; max-width: 20ch; }
.case-hero .lede { font-size: var(--fs-md); color: var(--text-2); max-width: 64ch; }
.case-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: var(--s-6); }
.case-facts > div { background: var(--bg-elev); padding: var(--s-4) var(--s-5); }
.case-facts dt { font: 600 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 0.3rem; }
.case-facts dd { margin: 0; color: var(--text); font-size: 0.9375rem; line-height: 1.5; }
.case-facts dd a { font-weight: 600; }
@media (max-width: 900px) { .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .case-facts { grid-template-columns: 1fr; } }

.case-cover { margin: 0 0 clamp(2rem, 5vw, 3.5rem); }

.case-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; padding-bottom: var(--s-8); }
.toc { position: sticky; top: calc(var(--header-h) + 28px); font-size: var(--fs-sm); }
.toc p { font: 600 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s-3); }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 0.35rem 0 0.35rem 0.9rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-3); text-decoration: none; }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--text); border-left-color: var(--accent); font-weight: 600; }
@media (max-width: 960px) { .case-layout { grid-template-columns: 1fr; } .toc { display: none; } }

.case-body { min-width: 0; }
.case-section { padding-top: var(--s-2); margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.case-section > h2 { font-size: var(--fs-xl); display: flex; align-items: baseline; gap: 0.75rem; }
.case-section > h2 .n { font: 600 var(--fs-sm)/1 var(--font-mono); color: var(--accent); letter-spacing: 0; }
.case-section .prose { max-width: 72ch; }
.case-section .prose ul { padding-left: 1.1rem; }
.case-section .prose li::marker { color: var(--accent); }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 var(--s-5); display: grid; gap: var(--s-3); max-width: 76ch; }
.steps li { counter-increment: step; position: relative; margin: 0; padding: var(--s-4) var(--s-5) var(--s-4) 3.4rem; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text-2); }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: var(--s-4); top: calc(var(--s-4) + 2px); font: 600 var(--fs-xs)/1.6 var(--font-mono); color: var(--accent); }
.steps li strong { color: var(--text); }

.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s-3); margin-bottom: var(--s-5); }
.result { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5); }
.result b { display: block; font: 700 clamp(1.625rem, 1.2rem + 1.2vw, 2.125rem)/1.05 var(--font-mono); letter-spacing: -0.04em; margin-bottom: var(--s-2); }
.result span { font-size: var(--fs-sm); color: var(--text-2); display: block; line-height: 1.45; }

.callout { border: 1px solid var(--line-strong); border-left: 3px solid var(--warn); background: var(--bg-elev); border-radius: var(--radius-sm); padding: var(--s-4) var(--s-5); color: var(--text-2); margin: var(--s-5) 0; max-width: 76ch; }
.callout strong { color: var(--text); }
.callout.info { border-left-color: var(--accent); }

.figure { margin: var(--s-5) 0; }
.figure-frame { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.figure-frame.paper { background: var(--paper); }
.figure-frame.pad { padding: clamp(0.75rem, 2vw, 1.5rem); }
.figure-frame.scroll { overflow-x: auto; }
.figure-frame.scroll > svg { min-width: 760px; }
.figure-frame img { width: 100%; }
.figure figcaption { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: baseline; margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--text-3); max-width: 80ch; }
.zoomable { cursor: zoom-in; position: relative; }
.zoom-hint { position: absolute; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 0.3rem; background: rgba(20, 22, 20, 0.72); color: #fff; font: 600 0.6875rem/1 var(--font-mono); letter-spacing: 0.04em; padding: 0.35rem 0.5rem; border-radius: 6px; pointer-events: none; }
.zoom-hint .icon { width: 13px; height: 13px; }
.swap-note { font: 600 0.6875rem/1.3 var(--font-mono); letter-spacing: 0.04em; color: var(--text-3); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-3); list-style: none; padding: 0; margin: 0; }
.gallery li { margin: 0; }
.gallery button { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; cursor: zoom-in; text-align: left; }
.gallery button:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top center; }
.gallery .cap { display: block; padding: 0.55rem 0.75rem; font-size: var(--fs-xs); color: var(--text-2); background: var(--bg-elev); border-top: 1px solid var(--line); line-height: 1.45; }

.links-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.next-case { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-5); padding: clamp(1.5rem, 3vw, 2.25rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-elev); text-decoration: none; color: var(--text); transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.next-case:hover { color: var(--text); border-color: var(--accent-line); box-shadow: var(--shadow); }
.next-case small { font: 600 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.next-case strong { display: block; font-size: var(--fs-xl); letter-spacing: -0.02em; margin: 0.25rem 0; }
.next-case span.d { color: var(--text-2); }
.next-case .arrow { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); }
.next-case:hover .arrow { background: var(--accent); color: var(--on-accent); }

.verify-note { font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- 13. Diagrams authored for the site ---------- */
.dia text { font-family: var(--font-sans); }
.dia .t { fill: var(--text); font-size: 14px; font-weight: 650; }
.dia .t2 { fill: var(--text-2); font-size: 12px; }
.dia .t3 { fill: var(--text-3); font-size: 11px; font-family: var(--font-mono); letter-spacing: 0.04em; }
.dia .box { fill: var(--bg-elev); stroke: var(--line-strong); stroke-width: 1.2; }
.dia .box-soft { fill: var(--bg-sunk); stroke: var(--line); stroke-width: 1.2; }
.dia .box-acc { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.4; }
.dia .box-crit { fill: var(--crit-soft); stroke: var(--crit); stroke-width: 1.4; }
.dia .box-ok { fill: var(--ok-soft); stroke: var(--ok); stroke-width: 1.4; }
.dia .box-warn { fill: var(--warn-soft); stroke: var(--warn); stroke-width: 1.4; }
.dia .ln { fill: none; stroke: var(--text-3); stroke-width: 1.5; }
.dia .ln-d { fill: none; stroke: var(--text-3); stroke-width: 1.3; stroke-dasharray: 4 4; }
.dia .ln-acc { fill: none; stroke: var(--accent); stroke-width: 2; }
.dia .ln-crit { fill: none; stroke: var(--crit); stroke-width: 1.6; }
.dia .ah { fill: var(--text-3); }
.dia .ah-acc { fill: var(--accent); }
.dia .fill-acc { fill: var(--accent); }
.dia .fill-crit { fill: var(--crit); }
.dia .fill-ok { fill: var(--ok); }
.dia .fill-warn { fill: var(--warn); }
.dia .fill-text { fill: var(--text); }
.dia .fill-bg { fill: var(--bg-elev); }
.dia .on-acc { fill: var(--on-accent); font-weight: 700; font-size: 11px; font-family: var(--font-mono); }
.dia .grid { stroke: var(--line); stroke-width: 1; }
.dia .ground { fill: none; stroke: var(--text); stroke-width: 2; }
.dia .design { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.dia .water { fill: var(--info-soft); stroke: var(--info); stroke-width: 1.4; }
.dia .waterline { stroke: var(--info); stroke-width: 1.5; stroke-dasharray: 6 4; }
.dia .cut { fill: var(--warn); opacity: 0.22; }
.dia .fillz { fill: var(--ok); opacity: 0.22; }

/* ATLAS board mock-up (HTML) */
.board { font-size: var(--fs-sm); background: var(--bg-sunk); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-4); }
.board-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-3); font: 600 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.board-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.board-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px; padding: var(--s-3) var(--s-4); }
.board-card h5, .board-card .bc-title { margin: 0 0 0.2rem; font-size: 0.9rem; display: flex; justify-content: space-between; gap: 0.5rem; }
.board-card .muted { color: var(--text-3); font-size: var(--fs-xs); }
.board-card .claim { margin-top: 0.5rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-2); background: var(--bg-sunk); border-radius: 6px; padding: 0.3rem 0.45rem; word-break: break-all; }
.board-card.refused { border-color: var(--crit); }
.board-card.refused .claim { background: var(--crit-soft); color: var(--crit); }
.board-log { margin-top: var(--s-3); font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-2); background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px; padding: var(--s-3) var(--s-4); line-height: 1.7; overflow-x: auto; white-space: pre; }
.board-log .e { color: var(--crit); font-weight: 700; }
.board-log .o { color: var(--ok); font-weight: 700; }
@media (max-width: 720px) { .board-cols { grid-template-columns: 1fr; } }

/* phone frame for screenshots */
.phone { width: min(300px, 80%); margin: 0 auto; border: 10px solid #1b1d1c; border-radius: 34px; overflow: hidden; box-shadow: var(--shadow-lg); background: #1b1d1c; }
.phone img { border-radius: 22px; }
.duo { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: var(--s-5); align-items: center; }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } }

/* PDF gate counters */
.gate { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.gate div { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-4) var(--s-5); }
.gate b { display: flex; align-items: center; gap: 0.5rem; font: 700 2.25rem/1 var(--font-mono); color: var(--ok); }
.gate b .icon { width: 22px; height: 22px; }
.gate span { font-size: var(--fs-sm); color: var(--text-2); display: block; margin-top: 0.4rem; }
@media (max-width: 600px) { .gate { grid-template-columns: 1fr; } }

/* ---------- 14. Interactive demos ---------- */
.demo { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1rem, 3vw, 1.75rem); box-shadow: var(--shadow-sm); margin: var(--s-5) 0; }
.demo-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: var(--s-3); margin-bottom: var(--s-4); }
.demo-head h3 { margin: 0 0 0.25rem; font-size: var(--fs-md); }
.demo-head p { margin: 0; color: var(--text-2); font-size: var(--fs-sm); max-width: 62ch; }
.demo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin: var(--s-3) 0 var(--s-4); font-size: var(--fs-sm); color: var(--text-2); }
.demo-controls label { display: inline-flex; align-items: center; gap: 0.5rem; }
.demo-controls input[type="range"] { width: min(320px, 60vw); accent-color: var(--accent); }
.demo-controls output { font-family: var(--font-mono); color: var(--text); font-weight: 600; min-width: 5ch; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 3px; background: var(--bg-sunk); }
.seg button { border: 0; background: transparent; color: var(--text-2); font: 600 var(--fs-xs)/1 var(--font-mono); padding: 0.5rem 0.65rem; border-radius: 6px; cursor: pointer; min-height: 32px; }
.seg button[aria-pressed="true"] { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
.check { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font-sans); font-size: 12px; fill: var(--text-3); }
.chart .axis { stroke: var(--line-strong); }
.chart .gridl { stroke: var(--line); }
.chart .plan { fill: none; stroke: var(--text-3); stroke-width: 2; stroke-dasharray: 6 5; }
.chart .actual { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linejoin: round; }
.chart .dot { fill: var(--bg-elev); stroke: var(--accent); stroke-width: 2.4; }
.chart .bar-neg { fill: var(--crit); opacity: 0.85; }
.chart .bar-warn { fill: var(--warn); opacity: 0.85; }
.chart .bar-ok { fill: var(--ok); opacity: 0.85; }
.chart .marker { stroke: var(--text); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .lbl { fill: var(--text); font-weight: 600; }
.chart .event { fill: var(--warn); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: var(--s-4); }
.kpis div { background: var(--bg-elev); padding: var(--s-3) var(--s-4); }
.kpis small { display: block; font: 600 0.6875rem/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.kpis b { font: 700 1.25rem/1.4 var(--font-mono); letter-spacing: -0.02em; }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.status-pill { display: inline-block; font: 700 0.75rem/1 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; padding: 0.35rem 0.5rem; border-radius: 6px; }
.status-pill.on_track { background: var(--ok-soft); color: var(--ok); }
.status-pill.behind { background: var(--warn-soft); color: var(--warn); }
.status-pill.critical { background: var(--crit-soft); color: var(--crit); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--fs-xs); color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; background: var(--text-3); }
.legend i.acc { background: var(--accent); }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--text-3) 0 5px, transparent 5px 9px); }
.legend i.info { background: var(--info); }
.legend i.sq { width: 12px; height: 12px; border-radius: 3px; }
.legend i.warn { background: var(--warn); opacity: 0.5; }
.legend i.ok { background: var(--ok); opacity: 0.5; }
.legend i.text { background: var(--text); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.data-table th, .data-table td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { font: 600 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); background: var(--bg-sunk); white-space: nowrap; }
.data-table td.num, .data-table th.num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.data-table tr.grp td { background: var(--bg-sunk); font-weight: 650; color: var(--text); }
.data-table tr.tot td { font-weight: 700; color: var(--text); background: var(--bg-sunk); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table input { width: 7.5em; font: 600 var(--fs-sm)/1.2 var(--font-mono); text-align: right; padding: 0.3rem 0.4rem; border: 1px solid var(--accent-line); border-radius: 6px; background: var(--bg-elev); color: var(--text); }
.data-table .src { display: block; color: var(--text-3); font-size: var(--fs-xs); }
.wbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--bg-sunk); margin: var(--s-3) 0; }
.wbar span { display: block; height: 100%; }
.demo-foot { margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--text-3); }
.noscript { padding: var(--s-4); color: var(--text-2); }

/* ---------- 15. Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto 1fr auto; background: rgba(10, 11, 10, 0.92); color: #f2f2ee; padding: var(--s-4); }
.lightbox[hidden] { display: none; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); font: 600 var(--fs-xs)/1 var(--font-mono); letter-spacing: 0.06em; }
.lightbox-bar button, .lightbox-nav button { border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); color: #fff; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.lightbox-bar button:hover, .lightbox-nav button:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox-stage { display: grid; place-items: center; min-height: 0; padding: var(--s-4) 0; overflow: auto; }
.lightbox-stage img, .lightbox-stage .lb-svg { max-width: min(1400px, 100%); max-height: 100%; object-fit: contain; background: #fff; border-radius: 8px; }
.lightbox-stage .lb-svg { width: min(1400px, 100%); padding: 12px; overflow: auto; }
.lightbox-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }
.lightbox-foot p { margin: 0; font-size: var(--fs-sm); color: #d6d6d0; }
.lightbox-nav { display: flex; gap: var(--s-2); }

/* ---------- 16. Reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 17. Research page ---------- */
.research-body { max-width: 820px; }
.research-body h2 { font-size: var(--fs-xl); margin-top: var(--s-7); }
.research-body h2:first-child { margin-top: 0; }
.research-body h3 { font-size: 1.125rem; margin-top: var(--s-6); }
.research-body p, .research-body li { color: var(--text-2); }
.research-body .results { margin: var(--s-4) 0 var(--s-5); }
.takeaway { border-left: 3px solid var(--accent); padding-left: var(--s-4); }
.component-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin: var(--s-5) 0; }
.component { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5); }
.component h4, .component h3 { font-size: 1rem; }
.component p { font-size: 0.9375rem; margin: 0; }
@media (max-width: 700px) { .component-grid { grid-template-columns: 1fr; } }
.small-note { font-size: var(--fs-sm); color: var(--text-3) !important; margin-top: var(--s-3); }

/* ---------- 18. 404 ---------- */
.nf { min-height: calc(100vh - var(--header-h) - 90px); display: grid; place-items: center; text-align: center; padding: var(--s-8) 0; }
.nf .code { font: 700 clamp(4rem, 12vw, 8rem)/1 var(--font-mono); letter-spacing: -0.06em; color: var(--accent); }

/* ---------- 19. Print ---------- */
@media print {
  .site-header, .toc, .lightbox, .filter-bar, .theme-toggle, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 20. Refinements (round 2) ---------- */
.lang-switch { display: flex; width: max-content; }
.hero-figure .hero-xs .t3 { font-size: 15px; }
.hero-figure .hero-xs .t2 { font-size: 16px; }
@media (max-width: 1180px) and (min-width: 961px) { .brand-role { display: none; } }
.timeline ul { list-style: disc; }
[hidden] { display: none !important; }
.icon { display: inline-block; vertical-align: -0.15em; }
.work-foot { flex-wrap: wrap; }
.work-foot .go, .mini-card .more { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.35rem; }
@media (min-width: 961px) {
  .case-hero:has(.case-facts) .container { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: clamp(2rem, 5vw, 4.5rem); align-items: end; }
  .case-hero:has(.case-facts) .container > * { grid-column: 1; }
  .case-hero:has(.case-facts) .case-facts { grid-column: 2; grid-row: 1 / span 4; align-self: end; margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; }
  .case-hero:has(.case-facts) .case-facts > div:nth-child(2), .case-hero:has(.case-facts) .case-facts > div:nth-child(4) { grid-column: span 2; }
}
.chart .cut { fill: var(--warn); opacity: 0.25; }
.chart .fillz { fill: var(--ok); opacity: 0.25; }
.chart .water { fill: var(--info); opacity: 0.16; }
.chart .waterline { stroke: var(--info); stroke-width: 1.5; stroke-dasharray: 6 4; }
.demo .chart { max-width: 980px; margin: 0 auto; }
.footer-note { margin: 0.25rem 0 0; font-size: var(--fs-xs); color: var(--text-3); max-width: 60ch; }
.hero-figure-link { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: var(--s-4); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.hero-figure-link:hover { text-decoration: underline; }
.hero-figure .hero-figure-link svg { width: 16px; height: 16px; }
.scroll-hint { display: none; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--accent); }
@media (max-width: 800px) { .scroll-hint { display: inline; } }
.duo { grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr); }
.duo .phone { width: min(250px, 100%); border-width: 8px; border-radius: 30px; }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } .duo .phone { width: min(240px, 70%); } }
.mini-card { position: relative; transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.mini-card.is-case { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), var(--bg-elev) 55%); }
.mini-card.is-case h4 a { color: var(--text); text-decoration: none; }
.mini-card.is-case h4 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.mini-card.is-case:hover { box-shadow: var(--shadow); }
.mini-card.is-case .more { color: var(--accent); }
.group-title small { font-family: var(--font-mono); font-size: var(--fs-xs); }

/* ---------- 21. Audit loop (15 Sep 2026) ---------- */
.board-card .bc-title { font-weight: 650; color: var(--text); }
.figure-frame.scroll[role="region"]:focus-visible, .table-wrap[role="region"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.research-body .component h3 { margin-top: 0; font-size: 1rem; }
/* Case study: key numbers in the hero ("At a glance") */
.glance { margin-top: var(--s-6); }
.glance-label { font: 600 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 var(--s-3); }
.glance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.glance-item { background: var(--bg-elev); padding: var(--s-4) var(--s-5); }
.glance-item b { display: block; font: 700 clamp(1.5rem, 1.1rem + 1.1vw, 2.125rem)/1.05 var(--font-mono); letter-spacing: -0.04em; color: var(--text); margin-bottom: var(--s-2); }
.glance-item span { display: block; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; }
@media (min-width: 961px) { .case-hero:has(.case-facts) .glance { grid-column: 1 / -1; grid-row: 5; } .glance-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
@media (max-width: 400px) { .glance-item { padding: var(--s-3) var(--s-4); } }
/* Home hero: tighter first fold so the numbers show at 1440x900 */
.hero { padding-top: clamp(2rem, 4.5vw, 3.75rem); }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-4); }
.hero-top .eyebrow { margin: 0; }
.hero-top .lang-switch { margin: 0; }
.stat-strip { margin-top: clamp(2rem, 4vw, 3rem); }
/* More work: folded experiments */
.more-details { margin-top: var(--s-3); }
.more-details > summary { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; list-style: none; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); border: 1px solid var(--line-strong); background: var(--bg-elev); border-radius: 999px; padding: 0.45rem 0.9rem; }
.more-details > summary::-webkit-details-marker { display: none; }
.more-details > summary:hover { color: var(--text); border-color: var(--text-3); }
.more-details > summary .icon { transition: transform 0.2s var(--ease); }
.more-details[open] > summary .icon { transform: rotate(90deg); }
.more-details[open] > summary { margin-bottom: var(--s-4); }
/* Services */
#services .section-head-row { align-items: end; }
.svc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 1.5rem); }
.svc-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 2.5vw, 1.75rem); display: flex; flex-direction: column; gap: var(--s-3); }
.svc-card h3 { margin: 0; font-size: var(--fs-lg); }
.svc-card p { margin: 0; color: var(--text-2); }
.svc-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); }
.svc-icon .icon { width: 21px; height: 21px; }
.svc-proof { margin-top: auto !important; padding-top: var(--s-3); border-top: 1px dashed var(--line-strong); font-size: var(--fs-sm); }
.svc-proof .k { font: 600 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-right: 0.4rem; }
.svc-proof a { font-weight: 600; }
.svc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); margin-top: clamp(1.5rem, 3vw, 2rem); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-sunk); }
.svc-foot p { margin: 0; color: var(--text-2); max-width: 70ch; }
.isi { display: inline-block; font: 600 var(--fs-xs)/1.4 var(--font-mono); color: var(--warn); background: var(--warn-soft); border: 1px dashed var(--warn); border-radius: 6px; padding: 0.1rem 0.45rem; }
@media (max-width: 760px) { .svc-grid { grid-template-columns: 1fr; } }
/* Now */
.now-wrap { max-width: 860px; padding-bottom: clamp(3rem, 6vw, 5rem); }
.now-list { list-style: none; margin: 0 0 var(--s-6); padding: 0; counter-reset: now; }
.now-item { position: relative; margin: 0; padding: var(--s-5) 0 var(--s-5) 3.25rem; border-top: 1px solid var(--line); counter-increment: now; }
.now-item::before { content: counter(now, decimal-leading-zero); position: absolute; left: 0; top: calc(var(--s-5) + 0.2rem); font: 600 var(--fs-sm)/1 var(--font-mono); color: var(--accent); }
.now-item h2 { font-size: var(--fs-lg); margin: 0 0 var(--s-2); }
.now-item h2 a { color: var(--text); text-decoration: none; }
.now-item h2 a:hover { color: var(--accent); text-decoration: underline; }
.now-item p { margin: 0; color: var(--text-2); max-width: 65ch; }
/* CV */
.cv-main { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 5rem); }
.cv-actions { max-width: 860px; margin: 0 auto var(--s-5); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.cv-actions .crumbs { margin: 0; }
.cv { max-width: 860px; margin: 0 auto; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 4vw, 3rem); box-shadow: var(--shadow); font-size: 0.9375rem; }
.cv-head { border-bottom: 2px solid var(--text); padding-bottom: var(--s-4); margin-bottom: var(--s-4); }
.cv h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); margin: 0; }
.cv-role { margin: 0.25rem 0 0; font-weight: 600; color: var(--accent); }
.cv-contact { margin: 0.25rem 0 0; color: var(--text-2); font-size: var(--fs-sm); }
.cv-sec { margin-top: var(--s-5); }
.cv-sec h2 { font: 700 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line); padding-bottom: 0.35rem; margin: 0 0 var(--s-3); }
.cv-sec p { color: var(--text-2); margin: 0 0 0.35rem; }
.cv-work, .cv-xp { list-style: none; margin: 0; padding: 0; }
.cv-work > li, .cv-xp > li { margin: 0 0 var(--s-3); break-inside: avoid; }
.cv-line { color: var(--text); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 var(--s-3); }
.cv-when { font: 500 var(--fs-xs)/1.6 var(--font-mono); color: var(--text-3); white-space: nowrap; }
.cv-key { color: var(--text-2); }
.cv-key b { color: var(--text); }
.cv-xp ul { margin: 0.2rem 0 0; padding-left: 1.1rem; color: var(--text-2); }
.cv-xp ul li + li { margin-top: 0.15rem; }
.cv-skills { margin: 0; display: grid; gap: 0.35rem; }
.cv-skills div { display: grid; grid-template-columns: 11rem 1fr; gap: var(--s-3); }
.cv-skills dt { font-weight: 650; color: var(--text); }
.cv-skills dd { margin: 0; color: var(--text-2); }
.cv-foot { margin: var(--s-5) 0 0; padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--text-3); }
@media (max-width: 600px) { .cv-when { white-space: normal; } .cv-skills div { grid-template-columns: 1fr; gap: 0; } }
@media print {
  @page { size: A4; margin: 14mm 14mm 14mm 14mm; }
  .no-print, .site-footer, .skip-link { display: none !important; }
  .cv-main { padding: 0; }
  .cv-main .container { max-width: none; padding: 0; }
  .cv { max-width: none; border: 0; box-shadow: none; padding: 0; background: #fff; font-size: 9.6pt; line-height: 1.38; color: #111; }
  .cv h1 { font-size: 20pt; color: #111; }
  .cv-role { color: #0f5f58; }
  .cv-head { border-bottom-color: #111; padding-bottom: 6pt; margin-bottom: 6pt; }
  .cv-sec { margin-top: 9pt; }
  .cv-sec h2 { color: #444; border-bottom-color: #bbb; margin-bottom: 5pt; }
  .cv-sec p, .cv-xp ul, .cv-skills dd, .cv-contact { color: #222; }
  .cv-work > li, .cv-xp > li { margin-bottom: 5pt; }
  .cv-when, .cv-foot { color: #555; }
  .cv p, .cv li, .cv dd, .cv dt, .cv-key, .cv-contact { font-size: 9.2pt; }
  .cv-when { font-size: 7.8pt; }
  .cv-foot { font-size: 7.5pt; }
  .cv-sec h2 { font-size: 8pt; break-after: avoid-page; page-break-after: avoid; }
  .cv-work > li:first-child, .cv-xp > li:first-child { break-before: avoid-page; }
  .cv-sec p { margin-bottom: 1pt; }
  .cv-skills { gap: 1.5pt; }
  .cv-skills div { grid-template-columns: 38mm 1fr; }
  .cv a { color: #111; text-decoration: none; }
}
.footer-note { max-width: 78ch; }
/* Mobile: demo charts and the BoQ table scroll sideways at a readable size; gallery in two columns */
.demo-hint { margin: 0 0 0.35rem; }
@media (max-width: 700px) {
  .chart-scroll { overflow-x: auto; margin: 0 calc(-1 * clamp(1rem, 3vw, 1.75rem)); padding: 0 clamp(1rem, 3vw, 1.75rem); }
  .chart-scroll > svg.chart { min-width: 640px; }
  .boq-wrap .data-table { min-width: 720px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
  .gallery .cap { font-size: 0.72rem; padding: 0.45rem 0.55rem; }
}
.chart-scroll[role="region"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* More work: case studies of a group as one link row (the cards are already in Featured work) */
.group-cases { margin: calc(-1 * var(--s-2)) 0 var(--s-4); font-size: var(--fs-sm); color: var(--text-2); }
.group-cases .k { font: 600 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-right: 0.35rem; }
.group-cases a { font-weight: 600; }
.mini-grid:empty { display: none; }
/* Home hero on tablets and phones: numbers before the illustration */
@media (max-width: 960px) {
  .hero .container { display: flex; flex-direction: column; }
  .hero-grid { display: contents; }
  .hero-grid > [data-lang-block] { order: 1; }
  .hero .stat-strip { order: 2; margin-top: var(--s-6); }
  .hero-figure { order: 3; margin-top: var(--s-6); }
}
/* Indonesian page */
.id-hero { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.id-hero .hero-top .btn-ghost { font-size: var(--fs-sm); }
.id-work { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) clamp(1rem, 3vw, 2rem); }
.id-work-item { margin: 0; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: var(--s-4); align-items: start; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.id-work-media img { width: 132px; height: 83px; object-fit: cover; object-position: top center; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); }
.id-work-item h3 { margin: 0.15rem 0 0.1rem; font-size: var(--fs-md); }
.id-work-item h3 a { color: var(--text); text-decoration: none; }
.id-work-item h3 a:hover { color: var(--accent); text-decoration: underline; }
.id-work-meta { margin: 0; font: 600 var(--fs-xs)/1.4 var(--font-mono); letter-spacing: 0.04em; color: var(--text-3); text-transform: uppercase; }
.id-work-sub { margin: 0 0 0.35rem; font-weight: 600; color: var(--text); font-size: var(--fs-sm); }
.id-work-item p:last-child { margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
@media (max-width: 900px) { .id-work { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .id-work-item { grid-template-columns: 1fr; } .id-work-media img { width: 100%; height: auto; aspect-ratio: 16 / 10; } }
/* Header: CV shortcut for recruiters (visible on every width) */
.tool-btn.cv-link { text-decoration: none; }
.tool-btn.cv-link[aria-current="page"] { color: var(--text); border-color: var(--line-strong); background: var(--bg-sunk); }
/* Reflow at 320 CSS px (WCAG 1.4.10): long tokens and link buttons wrap */
code { overflow-wrap: anywhere; }
.btn { max-width: 100%; }
.links-row .btn, .btn-row .btn { white-space: normal; overflow-wrap: anywhere; }
/* Windows high-contrast (forced colors): keep shapes that rely on backgrounds */
@media (forced-colors: active) {
  .brand-mark, .svc-icon, .isi, .illustrative, .media-tag, .status-pill { border: 1px solid CanvasText; }
  .badge::before { forced-color-adjust: none; background: CanvasText; }
  .toc a.is-active { border-left-color: Highlight; }
}
/* Language-specific buttons keep their button layout when shown */
:root.lang-id [data-lang-block] .btn[lang="id"] { display: inline-flex; }
/* Print: case studies and pages read well on paper (interactive parts hidden, links spelled out) */
@media print {
  section#try, .demo, .next-case, .zoom-hint, .scroll-hint, .filter-bar, .lang-switch, .tool-btn, .toc, .hero-figure-link, .more-details > summary { display: none !important; }
  .case-layout { display: block !important; }
  .figure, .result, .glance, .case-facts, .svc-card, .mini-card, .work-card, .now-item { break-inside: avoid; }
  .figure-frame.scroll { overflow: visible !important; }
  .figure-frame.scroll > svg { min-width: 0 !important; }
  .case-hero, .section { padding: 12pt 0 !important; }
  .case-body a[href^="http"]::after, .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
  .more-details:not([open]) > .mini-grid { display: grid !important; }
}
@media print {
  figcaption a[data-lightbox] { display: none !important; }
  h2, h3 { break-after: avoid-page; }
}
/* Case study: service call-to-action before "Next case study" */
.case-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); margin: clamp(2rem, 5vw, 3rem) 0 var(--s-5); padding: clamp(1.25rem, 3vw, 1.75rem); border: 1px solid var(--accent-line); border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--accent-soft), var(--bg-elev) 70%); }
.case-cta > div:first-child { max-width: 60ch; }
.case-cta h2 { font-size: var(--fs-lg); margin: 0.25rem 0 0.35rem; }
.case-cta p { margin: 0; color: var(--text-2); }
.case-cta .eyebrow { margin: 0; }
@media print { .case-cta { display: none !important; } }
/* Stat strip adapts when some numbers are hidden (e.g. [data-verify] hidden): flex instead of a fixed 4-column grid */
.stat-strip { display: flex; flex-wrap: wrap; }
.stat-strip > .stat { flex: 1 1 220px; }
@media (max-width: 960px) { .stat-strip > .stat { flex-basis: 40%; } }
/* Without JavaScript: controls that cannot work are invisible but keep their space (no layout shift when site.js removes .no-js) */
.no-js .nav-toggle, .no-js .theme-toggle, .no-js .lang-switch, .no-js .filter-bar { visibility: hidden; }
/* PDF gate counters stay in one row on phones */
@media (max-width: 600px) {
  .gate { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
  .gate div { padding: var(--s-3); }
  .gate b { font-size: 1.6rem; gap: 0.3rem; }
  .gate b .icon { width: 16px; height: 16px; }
  .gate span { font-size: 0.75rem; line-height: 1.35; }
}
