/* UnderMB — local marketing site. No CDNs, no trackers, no web fonts.
   Design system: "measured paper". Warm paper ground, graphite ink, one ink-blue
   accent taken from the app icon's cap. System SF type; mono only for
   measurements. Hairline rules, a ruler-tick motif, 4px spacing grid. */

@property --pos {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 50%;
}

:root {
  color-scheme: light dark;

  /* Surfaces: paper, not screen-white */
  --bg: #f6f5f1;
  --bg-2: #efeee8;
  --surface: #fffefb;
  --surface-2: #faf9f5;
  --ink: #1b1b19;
  --ink-2: #3d3c38;
  --muted: #696862;
  --line: rgba(27, 27, 25, 0.1);
  --line-strong: rgba(27, 27, 25, 0.18);
  --fill: rgba(27, 27, 25, 0.045);
  --fill-2: rgba(27, 27, 25, 0.08);

  /* One accent: actions, current state, the measured value */
  --accent: #1f5fcc;
  --accent-hover: #194fad;
  --accent-ink: #ffffff;
  --accent-soft: rgba(31, 95, 204, 0.08);
  --accent-line: rgba(31, 95, 204, 0.3);

  /* Semantic status */
  --ok: #1d7a3a;
  --ok-soft: rgba(29, 122, 58, 0.09);
  --warn: #8f5600;
  --warn-soft: rgba(176, 106, 0, 0.1);
  --danger: #b8281f;
  --danger-soft: rgba(184, 40, 31, 0.08);

  /* macOS window chrome */
  --win-bg: #f3f2ee;
  --win-content: #fffefb;
  --paper: #ffffff;
  --paper-ink: #1d1d1f;
  --header-bg: rgba(246, 245, 241, 0.8);

  /* Depth: offset + soft blur, warm-tinted */
  --shadow-1: 0 1px 2px rgba(40, 36, 28, 0.06);
  --shadow-2: 0 1px 2px rgba(40, 36, 28, 0.05), 0 10px 28px -8px rgba(40, 36, 28, 0.1);
  --shadow-win: 0 0 0 0.5px rgba(40, 36, 28, 0.16), 0 2px 6px rgba(40, 36, 28, 0.05), 0 32px 72px -18px rgba(40, 36, 28, 0.28);
  --btn-sheen: inset 0 1px 0 rgba(255, 255, 255, 0.2);

  /* Type */
  --font: "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, "Cascadia Mono", monospace;
  --t-xs: 0.75rem;     /* 12 */
  --t-cap: 0.8125rem;  /* 13 */
  --t-sm: 0.9375rem;   /* 15 */
  --t-body: 1.0625rem; /* 17 */
  --t-lede: clamp(1.125rem, 1.02rem + 0.4vw, 1.3125rem); /* 18–21 */
  --t-h3: 1.1875rem;   /* 19 */
  --t-h2: clamp(1.875rem, 1.3rem + 1.9vw, 2.75rem);   /* 30–44 */
  --t-h1: clamp(2.375rem, 1.5rem + 3.3vw, 4.25rem);   /* 38–68 */

  /* Spacing: 4 8 12 16 24 32 48 64 96 128 */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4rem; --s9: 6rem; --s10: 8rem;
  --section-y: clamp(4.5rem, 3rem + 5vw, 8rem);

  --r-xs: 6px;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --header-h: 3.25rem;
  --measure: 66ch;
  --content: 74rem;

  /* Motion tokens (transitions.dev scale) */
  --duration-micro: 80ms;
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --duration-slow: 400ms;
  --duration-very-slow: 560ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-move: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --focus-ring: 2px solid var(--accent);
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 38%, transparent);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --bg-2: #181817;
    --surface: #1d1d1b;
    --surface-2: #232321;
    --ink: #f1f0eb;
    --ink-2: #cfcdc6;
    --muted: #9b9991;
    --line: rgba(241, 240, 235, 0.1);
    --line-strong: rgba(241, 240, 235, 0.18);
    --fill: rgba(241, 240, 235, 0.055);
    --fill-2: rgba(241, 240, 235, 0.1);
    --accent: #72a9ff;
    --accent-hover: #93bcff;
    --accent-ink: #071730;
    --accent-soft: rgba(114, 169, 255, 0.12);
    --accent-line: rgba(114, 169, 255, 0.42);
    --ok: #4cc970;
    --ok-soft: rgba(76, 201, 112, 0.12);
    --warn: #f0b04a;
    --warn-soft: rgba(240, 176, 74, 0.12);
    --danger: #ff7a70;
    --danger-soft: rgba(255, 122, 112, 0.12);
    --win-bg: #262624;
    --win-content: #1c1c1a;
    --paper: #f4f3ee;
    --paper-ink: #1d1d1f;
    --header-bg: rgba(18, 18, 17, 0.78);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -8px rgba(0, 0, 0, 0.5);
    --shadow-win: 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 2px 6px rgba(0, 0, 0, 0.4), 0 32px 72px -18px rgba(0, 0, 0, 0.75);
    --btn-sheen: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s5));
  scrollbar-color: color-mix(in srgb, var(--ink) 22%, transparent) transparent;
  accent-color: var(--accent);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.55;
  letter-spacing: -0.003em;
  overflow-x: hidden;
  caret-color: var(--accent);
}
img, svg { display: block; max-width: 100%; }
a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.2em;
  text-decoration-thickness: from-font;
  transition: color var(--duration-quick) ease, text-decoration-color var(--duration-quick) ease;
}
a:hover { text-decoration: underline; }
p, ul, ol { margin: 0 0 var(--s4); }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--font-display); text-wrap: balance; }
h1 { font-size: var(--t-h1); line-height: 1.04; letter-spacing: -0.032em; font-weight: 650; }
h2 { font-size: var(--t-h2); line-height: 1.1; letter-spacing: -0.026em; font-weight: 650; }
h3 { font-size: var(--t-h3); line-height: 1.3; letter-spacing: -0.014em; font-weight: 600; }
p { text-wrap: pretty; }
strong { font-weight: 600; }
code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.08em 0.36em;
  overflow-wrap: anywhere;
}
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; }
:focus-visible { outline: var(--focus-ring); outline-offset: 2px; border-radius: 4px; }

a, button, summary, [role="button"], [role="slider"], input, textarea, label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(100% - 2.5rem, var(--content)); margin-inline: auto; }
@media (min-width: 720px) { .wrap { width: min(100% - 4rem, var(--content)); } }
.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: var(--s2) var(--s4); border-radius: var(--r-sm);
  font-size: var(--t-sm); font-weight: 600;
}
.skip-link:focus { top: var(--s3); text-decoration: none; }

/* ---------- Buttons: step on hover, press on click ---------- */
.btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 2.5rem;
  padding: 0 1.05rem;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: -0.006em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--btn-sheen), 0 1px 2px rgba(20, 30, 60, 0.18), 0 2px 6px -2px rgba(31, 95, 204, 0.3);
  transition:
    background-color var(--duration-quick) ease,
    transform var(--duration-quick) var(--ease-out),
    box-shadow var(--duration-quick) ease;
}
.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--btn-sheen), 0 2px 4px rgba(20, 30, 60, 0.18), 0 8px 18px -6px rgba(31, 95, 204, 0.42);
}
.btn:active { transform: translateY(0) scale(0.97); transition-duration: var(--duration-micro); }
.btn:disabled { opacity: 0.55; cursor: progress; transform: none; }
.btn-lg { min-height: 3rem; padding: 0 1.35rem; font-size: 1rem; border-radius: 11px; }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-1);
}
.btn-ghost:hover { background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent), var(--shadow-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: var(--header-h); }
.logo {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--ink); font-family: var(--font-display); font-weight: 650; font-size: 1.0625rem; letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 1.625rem; height: 1.625rem; flex: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
  transition: transform var(--duration-fast) var(--spring);
}
.logo:hover .logo-mark { transform: rotate(-6deg) scale(1.04); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a:not(.btn) {
  position: relative;
  color: var(--ink-2); font-size: var(--t-cap); padding: var(--s2) var(--s3); border-radius: var(--r-sm);
  transition: color var(--duration-quick) ease, background-color var(--duration-quick) ease;
}
.nav a:not(.btn):hover { color: var(--ink); background: var(--fill); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"]:not(.logo)::after {
  content: ""; position: absolute; left: var(--s3); right: var(--s3); bottom: 2px; height: 1.5px;
  border-radius: 1px; background: var(--accent);
}
.nav .btn { min-height: 2rem; padding: 0 var(--s3); font-size: var(--t-cap); margin-left: var(--s2); border-radius: 8px; }
@media (max-width: 1040px) { .nav-guides { display: none; } }
@media (max-width: 540px) { .nav-tool { display: none; } }

/* ---------- Section rhythm ---------- */
main > section { padding-block: var(--section-y); }
main > section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 44rem; margin-bottom: var(--s7); }
.section-head p:last-child { margin-bottom: 0; }
.section-head h2 + p { margin-top: var(--s4); font-size: var(--t-lede); line-height: 1.45; color: var(--ink-2); }
.section-kicker { /* retired: headings carry their own weight */
  margin-bottom: var(--s3); color: var(--muted); font-size: var(--t-cap); font-weight: 500;
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) var(--section-y); overflow: clip; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s7);
  align-items: center;
}
@media (min-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr); gap: var(--s8); }
}
.hero h1 { font-size: clamp(2.375rem, 1.5rem + 3vw, 4rem); max-width: 15ch; }
.lede {
  margin-top: var(--s5); font-size: var(--t-lede); line-height: 1.48; color: var(--ink-2);
  max-width: 34rem; letter-spacing: -0.008em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.hero-status, .eyebrow {
  display: flex; align-items: center; gap: var(--s2);
  margin: var(--s5) 0 0;
  color: var(--ink-2); font-size: var(--t-cap); font-weight: 500;
}
.hero-status::before, .eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
  animation: status-pulse 2.8s var(--ease-move) infinite;
}
@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--ok-soft); }
  50% { box-shadow: 0 0 0 5px transparent; }
}
.trust-row {
  display: flex; flex-wrap: wrap; gap: var(--s1) 0;
  list-style: none; padding: var(--s4) 0 0; margin: var(--s4) 0 0;
  border-top: 1px solid var(--line);
  max-width: 34rem;
  color: var(--muted); font-size: var(--t-cap);
}
.trust-row li { display: inline-flex; align-items: center; white-space: nowrap; }
.trust-row li + li::before {
  content: ""; width: 3px; height: 3px; margin-inline: 0.7rem; border-radius: 50%;
  background: currentColor; opacity: 0.6;
}

/* Hero entrance: once, on load, from an already-legible start */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lede, .hero .hero-actions, .hero .hero-status, .hero .trust-row {
    animation: rise-in var(--duration-very-slow) var(--ease-out) both;
  }
  .hero .lede { animation-delay: 60ms; }
  .hero .hero-actions { animation-delay: 120ms; }
  .hero .hero-status, .hero .trust-row { animation-delay: 180ms; }
  .hero .mac-window { animation: window-in 800ms var(--ease-out) 140ms both; }
  .article-hero h1, .article-hero .lede { animation: rise-in var(--duration-very-slow) var(--ease-out) both; }
  .article-hero .lede { animation-delay: 60ms; }
}
@keyframes rise-in {
  from { opacity: 0.001; transform: translateY(10px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes window-in {
  from { opacity: 0.001; transform: translateY(22px) scale(0.985); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ---------- macOS window ---------- */
.mac-window {
  margin: 0;
  background: var(--win-bg);
  border-radius: 13px;
  box-shadow: var(--shadow-win);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.mac-window::after { /* light catching the top edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
@media (prefers-color-scheme: dark) { .mac-window::after { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); } }
.mac-toolbar {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 3.25rem;
  padding: var(--s2) var(--s3) var(--s2) var(--s4);
  border-bottom: 1px solid var(--line);
}
.mac-lights { display: flex; gap: 8px; flex: none; }
.mac-lights span {
  width: 12px; height: 12px; border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2);
}
.mac-lights .close { background: #ff5f57; }
.mac-lights .min { background: #febc2e; }
.mac-lights .zoom { background: #28c840; }
.mac-title { display: flex; align-items: center; gap: var(--s2); min-width: 0; flex: 1; margin-left: var(--s2); }
.mac-title svg { width: 20px; height: 20px; flex: none; }
.mac-title-text { min-width: 0; line-height: 1.25; }
.mac-title-text strong { display: block; font-size: var(--t-cap); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mac-title-text span { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mac-body { background: var(--win-content); padding: var(--s5); }
.mac-statusbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-top: 1px solid var(--line);
  font-size: var(--t-xs); color: var(--muted);
}
.mac-statusbar .btn { min-height: 1.75rem; font-size: var(--t-cap); border-radius: 7px; padding: 0 var(--s3); }
.mac-statusbar .btn:hover { transform: none; }

/* Segmented control with a sliding thumb */
.segmented {
  --thumb-x: 0px; --thumb-w: 0px;
  position: relative;
  display: inline-flex;
  flex: none;
  padding: 2px;
  border-radius: 9px;
  background: var(--fill-2);
  isolation: isolate;
}
.segmented::before {
  content: "";
  position: absolute; z-index: -1; top: 2px; bottom: 2px; left: 0;
  width: var(--thumb-w);
  transform: translateX(var(--thumb-x));
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 340ms var(--spring), width 340ms var(--spring);
}
@media (prefers-color-scheme: dark) { .segmented::before { background: #5d5c58; } }
.segmented.no-anim::before { transition: none; }
.segmented button {
  -webkit-appearance: none; appearance: none;
  position: relative;
  min-height: 1.875rem;
  padding: 0 var(--s4);
  border: 0; border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font: inherit; font-size: var(--t-cap); font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--duration-quick) ease, transform var(--duration-micro) var(--ease-out);
}
.segmented button:hover { color: var(--ink); }
.segmented button:active { transform: scale(0.96); }
.segmented button.is-active { color: var(--ink); font-weight: 600; }
.segmented:not(.is-ready) button.is-active { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
.segmented button:focus-visible { outline-offset: 0; }

/* File row + readout */
.mac-file { display: flex; align-items: center; gap: var(--s3); }
.file-icon { width: 34px; height: 42px; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08)); }
.file-name { font-size: var(--t-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: var(--t-xs); color: var(--muted); }
.mac-file > div:nth-child(2) { min-width: 0; flex: 1; }
.file-size { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.readout { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2) var(--s4); margin-top: var(--s5); }
.result-delta {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 1.15rem + 1.5vw, 2.25rem);
  font-weight: 650; letter-spacing: -0.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.result-delta .from { color: var(--muted); font-weight: 500; text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--muted) 55%, transparent); }
.result-delta .arrow { color: var(--muted); font-weight: 400; margin-inline: 0.18em; }
.readout-side { display: flex; align-items: center; gap: var(--s3); }
.result-save { font-size: var(--t-cap); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: var(--r-xs);
  background: var(--fill);
  color: var(--ink-2);
  font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.005em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-ok::before {
  content: ""; width: 10px; height: 10px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%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 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Size meter: output vs original, with a cap tick, over a ruler */
.meter {
  position: relative; margin-top: var(--s4); height: 8px; border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), color-mix(in srgb, var(--ink) 12%, transparent) calc(10% - 1px) 10%),
    var(--fill-2);
}
.meter-fill {
  position: absolute; inset: 0 auto 0 0;
  width: var(--fill-w, 24%);
  border-radius: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, #fff), var(--accent));
  transition: width 560ms var(--spring);
}
.meter-cap {
  position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px;
  left: var(--cap-x, 26%);
  border-radius: 1px; background: var(--ink);
  transition: left 560ms var(--spring);
}
.meter-legend { display: flex; justify-content: space-between; margin-top: var(--s2); font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Before/After sharpness slider ---------- */
.sharpness {
  --pos: 50%;
  position: relative;
  margin-top: var(--s5);
  height: clamp(15rem, 12rem + 8vw, 18.5rem);
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  cursor: ew-resize;
  touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
  transition: --pos 300ms var(--ease-smooth-out);
}
.sharpness.is-dragging { transition: none; }
.sharp-layer { position: absolute; inset: 0; padding: 3.5rem var(--s5) 0; }
.sharp-layer.is-after { clip-path: inset(0 0 0 var(--pos)); }
.sheet {
  height: 100%;
  margin-inline: auto;
  max-width: 30rem;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 6px 18px rgba(40, 36, 28, 0.1);
  padding: var(--s5) var(--s5) 0;
  font-family: "Times New Roman", Georgia, "Iowan Old Style", serif;
  font-size: 11px;
  line-height: 1.45;
  overflow: hidden;
}
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5px solid #1d1d1f; padding-bottom: 6px; margin-bottom: 8px; }
.sheet-head b { font-family: var(--font); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.sheet-head span { font-family: var(--font); font-size: 9px; color: #555; font-variant-numeric: tabular-nums; }
.sheet h4 { margin: 0 0 4px; font-size: 12px; font-weight: 700; font-family: inherit; }
.sheet p { margin: 0 0 8px; text-wrap: auto; }
.sheet table { width: 100%; border-collapse: collapse; font-family: var(--font); font-size: 9.5px; font-variant-numeric: tabular-nums; }
.sheet td { padding: 4px 0; border-top: 0.5px solid #9a9a9a; }
.sheet td:last-child { text-align: right; font-weight: 600; }
.sheet tr:last-child td { border-bottom: 0.5px solid #9a9a9a; }
.sheet .fine { margin-top: 8px; font-size: 8px; line-height: 1.4; color: #3a3a3a; }

.is-before .sheet {
  filter: blur(1.15px) contrast(0.9) saturate(0.6);
  color: #3b3934;
  background-color: #f3f1ea;
  background-image:
    repeating-linear-gradient(0deg, rgba(110, 100, 80, 0.07) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(110, 100, 80, 0.06) 0 1px, transparent 1px 8px);
}
.is-before .sheet-head { border-bottom-color: #6b675d; }
.is-before .sheet td { border-color: #b9b3a5; }

.sharp-chip {
  position: absolute; top: var(--s3); z-index: 2;
  display: grid; gap: 1px;
  padding: 0.35rem 0.6rem;
  border-radius: 7px;
  background: rgba(27, 27, 25, 0.82);
  color: #fff;
  font-size: 11px; line-height: 1.25; font-weight: 600; letter-spacing: 0.005em;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  transition: opacity var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out);
}
.sharp-chip small { font-size: 10px; font-weight: 500; color: rgba(255, 255, 255, 0.75); }
.sharp-chip.before { left: var(--s3); }
.sharp-chip.after { right: var(--s3); text-align: right; justify-items: end; background: #1a55b8; }
.sharp-chip.after small { color: rgba(255, 255, 255, 0.85); font-variant-numeric: tabular-nums; }
.sharpness[data-side="after"] .sharp-chip.before,
.sharpness[data-side="before"] .sharp-chip.after { opacity: 0.35; transform: scale(0.97); }

.sharp-handle {
  position: absolute; top: 0; bottom: 0; z-index: 3;
  left: var(--pos);
  width: 44px; margin-left: -22px; /* 44px hit area */
  display: grid; place-items: center;
  cursor: ew-resize;
  touch-action: none;
}
.sharp-handle::before { /* the divider line */
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.18), 0 0 8px rgba(0, 0, 0, 0.18);
}
.sharp-grip {
  position: relative;
  width: 32px; height: 32px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.22);
  display: grid; place-items: center;
  transition: transform var(--duration-quick) var(--ease-out), box-shadow var(--duration-quick) ease;
}
.sharp-grip svg { width: 18px; height: 18px; color: #1d1d1f; }
.sharp-handle:hover .sharp-grip { transform: scale(1.08); box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.26); }
.sharpness.is-dragging .sharp-grip { transform: scale(0.94); }
.sharp-handle:focus-visible { outline: none; }
.sharp-handle:focus-visible .sharp-grip { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent), 0 2px 8px rgba(0, 0, 0, 0.22); }
.sharp-caption { margin: var(--s3) 0 0; font-size: var(--t-xs); color: var(--muted); }

@media (max-width: 560px) {
  .hero h1 { max-width: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .mac-toolbar { flex-wrap: wrap; row-gap: var(--s2); padding-inline: var(--s3); }
  .mac-toolbar .segmented { width: 100%; }
  .mac-toolbar .segmented button { flex: 1; }
  .mac-body { padding: var(--s4); }
  .sharp-layer { padding: 3.25rem var(--s3) 0; }
  .sheet { padding: var(--s4) var(--s4) 0; }
  .mac-statusbar span { display: none; }
  .mac-statusbar { justify-content: flex-end; }
}

/* ---------- Why: an editorial list, heading beside rows ---------- */
.card-grid { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s5);
}
.card h3 { margin-bottom: var(--s2); }
.card p { color: var(--ink-2); font-size: var(--t-sm); line-height: 1.6; }
.card p:last-child { margin-bottom: 0; }
.card-num { display: none; }
.card-grid.five { border-top: 1px solid var(--line-strong); }
.card-grid.five .card {
  padding: var(--s5) 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none; box-shadow: none; border-radius: 0;
}
@media (min-width: 720px) {
  .card-grid.five .card { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: var(--s5); align-items: baseline; }
  .card-grid.five .card h3 { margin: 0; }
  .card-grid.five .card p { font-size: var(--t-body); }
}
@media (min-width: 1080px) {
  #why .wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s8); align-items: start; }
  #why .section-head { position: sticky; top: calc(var(--header-h) + var(--s7)); margin-bottom: 0; }
}

/* ---------- Tool promo ---------- */
#bloat-check-promo { background: var(--bg-2); }
.tool-promo { display: grid; gap: var(--s7); align-items: center; }
@media (min-width: 960px) { .tool-promo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s8); } }
.tool-promo h2 { margin-bottom: var(--s4); }
.tool-promo p { color: var(--ink-2); font-size: var(--t-lede); line-height: 1.48; max-width: 34rem; }
.tool-promo .btn { margin-top: var(--s3); }
.mini-caps {
  display: grid;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.mini-caps .cap-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s4) var(--s5);
  border: 0; border-radius: 0; background: none;
}
.mini-caps .cap-card + .cap-card { border-top: 1px solid var(--line); }
.tool-promo .mini-caps .cap-label { margin: 0; font-size: var(--t-sm); font-weight: 500; font-variant-numeric: tabular-nums; max-width: none; color: var(--ink); }
.tool-promo .mini-caps .cap-status { margin: 0; font-size: var(--t-cap); max-width: none; }

/* ---------- Cap status cards (shared with Bloat Check) ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: var(--s5); }
@media (min-width: 720px) { .cap-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cap-grid .cap-card { background: var(--surface); padding: var(--s4); }
.cap-label { margin: 0 0 var(--s2); font-size: var(--t-cap); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.cap-status {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin: 0;
  font-size: var(--t-cap); font-weight: 600;
}
.cap-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cap-detail { margin: var(--s2) 0 0; font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.cap-card.is-pass .cap-status { color: var(--ok); }
.cap-card.is-tight .cap-status { color: var(--warn); }
.cap-card.is-fail .cap-status { color: var(--danger); }
.cap-grid .cap-card { animation: cap-in 380ms var(--ease-out) both; }
.cap-grid .cap-card:nth-child(2) { animation-delay: 40ms; }
.cap-grid .cap-card:nth-child(3) { animation-delay: 80ms; }
.cap-grid .cap-card:nth-child(4) { animation-delay: 120ms; }
@keyframes cap-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Pricing ---------- */
.pricing-panel { display: grid; gap: var(--s6); }
@media (min-width: 960px) { .pricing-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s8); align-items: start; } }
.price-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
  box-shadow: var(--shadow-2);
}
.price-card .badge { margin: 0 0 var(--s4); background: var(--accent-soft); color: var(--accent); }
.amount { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.amount strong { font-family: var(--font-display); font-size: clamp(3.25rem, 2.6rem + 2vw, 4.5rem); font-weight: 650; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.amount span { color: var(--muted); font-size: var(--t-body); }
.price-note { margin-top: var(--s3); color: var(--muted); font-size: var(--t-sm); }
.price-list { list-style: none; padding: 0; margin: var(--s5) 0 var(--s6); border-top: 1px solid var(--line); }
.price-list li { position: relative; padding: var(--s3) 0 var(--s3) 1.75rem; border-bottom: 1px solid var(--line); font-size: var(--t-sm); color: var(--ink-2); }
.price-list li::before {
  content: ""; position: absolute; left: 0; top: 0.95rem; width: 14px; height: 14px; background: var(--ok);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%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 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.price-card .btn { width: 100%; }
.price-aside { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
.price-aside .card { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: var(--s5) 0; }
.price-aside .card h3 { font-size: 1.0625rem; }
.price-aside .card a { text-decoration: underline; text-decoration-color: var(--accent-line); }
.price-aside .card a:hover { text-decoration-color: currentColor; }

/* ---------- Non-goals: a plain list with drawn crosses ---------- */
.nongoals .card { max-width: 46rem; padding: 0; background: none; border: 0; }
.nongoals ul { list-style: none; padding: 0; margin: var(--s5) 0; border-top: 1px solid var(--line); }
.nongoals .card p, .nongoals li { font-size: var(--t-body); color: var(--ink-2); }
.nongoals li { position: relative; margin: 0; padding: var(--s3) 0 var(--s3) 1.75rem; border-bottom: 1px solid var(--line); }
.nongoals li::before {
  content: ""; position: absolute; left: 0; top: 1.2rem; width: 12px; height: 12px; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 3l6 6M9 3l-6 6' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%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 12 12'%3E%3Cpath d='M3 3l6 6M9 3l-6 6' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.nongoals .nongoals-close { margin: 0; color: var(--ink); font-weight: 500; }

/* ---------- Waitlist + forms ---------- */
.waitlist { background: var(--bg-2); }
.waitlist-panel {
  display: grid; gap: var(--s6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  box-shadow: var(--shadow-2);
}
@media (min-width: 960px) { .waitlist-panel { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s8); } }
.waitlist-icon { width: 4rem; height: 4rem; margin-bottom: var(--s5); filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18)); }
.waitlist-panel h2 { margin-bottom: var(--s4); }
.waitlist-panel p { color: var(--ink-2); }
.form-fields { display: grid; gap: var(--s4); }
.form label { display: grid; gap: var(--s2); font-size: var(--t-cap); font-weight: 600; color: var(--ink); }
.hint { display: block; font-size: var(--t-xs); font-weight: 400; color: var(--muted); line-height: 1.45; }
input[type="email"], input[type="number"], input[type="text"], input[type="search"], textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem; /* 16px: no iOS zoom */
  font-weight: 400;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 0.7rem 0.85rem;
  box-shadow: inset 0 1px 1px rgba(40, 36, 28, 0.04);
  transition: border-color var(--duration-quick) ease, box-shadow var(--duration-quick) ease, background-color var(--duration-quick) ease;
}
@media (prefers-color-scheme: dark) { input[type="email"], input[type="number"], input[type="text"], input[type="search"], textarea { background: var(--surface-2); } }
input:hover, textarea:hover { border-color: color-mix(in srgb, var(--ink) 28%, transparent); }
textarea { resize: vertical; min-height: 6rem; line-height: 1.45; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.85; }
.form-actions { display: grid; gap: var(--s3); margin-top: var(--s5); justify-items: start; }
.privacy-note { margin: 0; font-size: var(--t-xs); color: var(--muted); max-width: 40rem; }
.form-status {
  display: flex; gap: var(--s2); align-items: flex-start;
  margin: var(--s4) 0 0; padding: var(--s3) var(--s4);
  border-radius: 10px; font-size: var(--t-sm);
  animation: status-in 320ms var(--ease-out);
}
.form-status::before {
  content: ""; flex: none; width: 16px; height: 16px; margin-top: 0.15em; background: currentColor;
}
.form-status.is-ok { background: var(--ok-soft); color: var(--ok); }
.form-status.is-ok::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='1.4'/%3E%3Cpath d='M4.8 8.2l2.2 2.2 4.2-4.6' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%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 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='1.4'/%3E%3Cpath d='M4.8 8.2l2.2 2.2 4.2-4.6' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.form-status.is-error { background: var(--danger-soft); color: var(--danger); animation: status-in 320ms var(--ease-out), nudge 300ms var(--ease-move) 60ms; }
.form-status.is-error::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='1.4'/%3E%3Cpath d='M8 4.6v4.2' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.3' r='1' fill='black'/%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 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='1.4'/%3E%3Cpath d='M8 4.6v4.2' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.3' r='1' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes status-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes nudge { 0%, 100% { translate: 0; } 25% { translate: -4px; } 50% { translate: 3px; } 75% { translate: -2px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: var(--s8) 0 var(--s6); font-size: var(--t-cap); color: var(--muted); }
.footer-grid { display: grid; gap: var(--s6); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-grid p { max-width: 22rem; margin-top: var(--s3); }
.site-footer h2 { font-family: var(--font); font-size: var(--t-cap); font-weight: 600; letter-spacing: 0; color: var(--ink); margin-bottom: var(--s3); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.site-footer a:not(.logo) { color: var(--muted); }
.site-footer a:not(.logo):hover { color: var(--ink); }
.legal { margin: var(--s7) 0 0; padding-top: var(--s5); border-top: 1px solid var(--line); font-size: var(--t-xs); }

/* ---------- Guides: hero, layout, TOC ---------- */
.article-hero { padding: clamp(3rem, 2rem + 3vw, 4.5rem) 0 var(--s7); border-bottom: 1px solid var(--line); }
.article-hero .wrap { max-width: 52rem; margin-inline: auto; }
.crumbs { margin-bottom: var(--s5); font-size: var(--t-cap); color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.meta-line { margin-bottom: var(--s3); font-size: var(--t-cap); color: var(--muted); font-variant-numeric: tabular-nums; }
.article-hero h1 { font-size: clamp(2.125rem, 1.5rem + 2.4vw, 3.375rem); line-height: 1.07; letter-spacing: -0.03em; max-width: 22ch; }
.article-hero .lede { max-width: var(--measure); }
.article { padding: var(--s7) 0 var(--s9); }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
@media (min-width: 1120px) {
  .article-layout { grid-template-columns: 13.5rem minmax(0, var(--measure)); justify-content: center; gap: var(--s8); }
  .article-hero:has(+ .article .article-layout) .wrap { max-width: calc(13.5rem + var(--measure) + 4rem); padding-left: calc(13.5rem + 4rem); }
}
.toc { font-size: var(--t-cap); }
.toc p { margin: 0 0 var(--s3); font-weight: 600; color: var(--ink); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 0.3rem 0 0.3rem var(--s4); margin-left: -1px;
  border-left: 1.5px solid transparent;
  color: var(--muted); line-height: 1.35;
  transition: color var(--duration-quick) ease, border-color var(--duration-fast) ease;
}
.toc a:hover { color: var(--ink); text-decoration: none; }
.toc a.is-current { color: var(--ink); border-left-color: var(--accent); font-weight: 500; }
@media (min-width: 1120px) { .toc { position: sticky; top: calc(var(--header-h) + var(--s6)); align-self: start; max-height: calc(100vh - var(--header-h) - 4rem); overflow: auto; } }
@media (max-width: 1119px) {
  .toc { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4) var(--s5); background: var(--surface); max-width: var(--measure); }
  .toc ol { border-left: 0; }
  .toc a { padding-left: 0; border-left: 0; }
}

/* ---------- Prose ---------- */
.prose { max-width: var(--measure); min-width: 0; }
.prose > h2 { margin: var(--s8) 0 var(--s4); font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); letter-spacing: -0.022em; line-height: 1.18; scroll-margin-top: calc(var(--header-h) + var(--s5)); }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin: var(--s6) 0 var(--s3); font-size: 1.1875rem; }
.prose p, .prose li { color: var(--ink-2); line-height: 1.65; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: var(--s2); }
.prose li::marker { color: var(--muted); }
.prose a { text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 0.2em; text-decoration-thickness: from-font; }
.prose a:hover { text-decoration-color: currentColor; }
.prose a.btn { text-decoration: none; color: var(--accent-ink); }

/* Steps: an unboxed numbered rail */
ol.steps { list-style: none; padding: 0; margin: var(--s5) 0 var(--s6); counter-reset: step; display: grid; gap: 0; border-top: 1px solid var(--line); }
ol.steps > li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: var(--s4) 0 var(--s4) 2.75rem;
  border-bottom: 1px solid var(--line);
}
ol.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: calc(var(--s4) + 0.1rem);
  width: 1.625rem; height: 1.625rem; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-1);
  font-family: var(--font-mono); font-size: var(--t-xs); font-weight: 600; font-variant-numeric: tabular-nums;
}
ol.steps > li strong:first-child { display: block; margin-bottom: 2px; }

/* Callouts: full border + tint */
.callout {
  margin: var(--s5) 0;
  padding: var(--s4) var(--s5);
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
}
.callout p:last-child { margin-bottom: 0; }
.callout p { font-size: var(--t-sm); }
.callout .k { display: block; margin-bottom: var(--s1); color: var(--ink); font-size: var(--t-sm); }
.callout-info { background: var(--accent-soft); border-color: var(--accent-line); }
.callout-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 26%, transparent); }
.callout-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }

/* Tables */
.table-wrap {
  position: relative;
  margin: var(--s5) 0 var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow-x: auto;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.table-wrap table { width: 100%; min-width: 40rem; border-collapse: separate; border-spacing: 0; font-size: var(--t-cap); line-height: 1.45; font-variant-numeric: tabular-nums; }
.table-wrap th, .table-wrap td { padding: var(--s3) var(--s4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.table-wrap thead th { background: var(--bg-2); color: var(--ink); font-weight: 600; font-size: var(--t-xs); letter-spacing: 0.01em; white-space: nowrap; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody td { transition: background-color var(--duration-quick) ease; }
.table-wrap tbody tr:hover td { background: color-mix(in srgb, var(--fill) 70%, var(--surface)); }
.table-wrap td:first-child, .table-wrap th:first-child {
  position: sticky; left: 0; z-index: 1;
  background: var(--surface); color: var(--ink); font-weight: 600;
  min-width: 9.5rem;
  box-shadow: inset -1px 0 0 var(--line);
}
.table-wrap thead th:first-child { background: var(--bg-2); }
.table-wrap tbody tr:last-child td:last-child { font-weight: 500; }

/* Vendor sections */
.vendor { padding-top: var(--s5); margin-top: var(--s6); border-top: 1px solid var(--line); }
.vendor h3 { margin-top: 0; }
.vendor-meta { font-size: var(--t-cap) !important; color: var(--muted) !important; font-variant-numeric: tabular-nums; }

/* FAQ accordion */
.faq { margin: var(--s4) 0 var(--s6); border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); interpolate-size: allow-keywords; }
.faq summary {
  position: relative;
  list-style: none;
  padding: var(--s4) 2.5rem var(--s4) 0;
  cursor: pointer;
  font-weight: 600; color: var(--ink); line-height: 1.4;
  transition: color var(--duration-quick) ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary:focus-visible { outline-offset: 4px; }
.faq summary::after {
  content: ""; position: absolute; right: var(--s2); top: 50%;
  width: 8px; height: 8px; margin-top: -6px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform var(--duration-fast) var(--spring), margin-top var(--duration-fast) var(--spring);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details::details-content {
  block-size: 0; overflow: hidden; opacity: 0;
  transition: block-size var(--duration-fast) var(--ease-smooth-out), opacity var(--duration-fast) ease, content-visibility var(--duration-fast) allow-discrete;
}
.faq details[open]::details-content { block-size: auto; opacity: 1; }
.faq details p { margin: 0; padding: 0 2.5rem var(--s5) 0; color: var(--ink-2); }

/* In-article CTA */
.cta-banner {
  margin: var(--s8) 0 var(--s6);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}
.cta-banner h2 { font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem); margin: 0 0 var(--s3); letter-spacing: -0.022em; }
.cta-banner > p { color: var(--ink-2); }

.related-guides, .sources { margin-top: var(--s7); }
.related-guides h2, .sources h2 { font-family: var(--font); font-size: var(--t-cap); font-weight: 600; letter-spacing: 0; color: var(--muted); margin: 0 0 var(--s3); }
.related-guides ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.related-guides li { margin: 0; border-bottom: 1px solid var(--line); }
.related-guides a {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s4);
  padding: var(--s3) 0; color: var(--ink); text-decoration: none; font-weight: 500;
}
.related-guides a::after {
  content: ""; flex: none; width: 14px; height: 14px; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 7h9.5M7.5 3l4 4-4 4' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%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 14 14'%3E%3Cpath d='M2 7h9.5M7.5 3l4 4-4 4' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--duration-fast) var(--ease-out), background-color var(--duration-quick) ease;
}
.related-guides a:hover { color: var(--accent); }
.related-guides a:hover::after { transform: translateX(4px); background: var(--accent); }
.sources ol { padding-left: 1.25rem; }
.sources li, .sources p { font-size: var(--t-cap); color: var(--muted); }
.sources a { color: var(--ink-2); }

/* ---------- PDF Bloat Check ---------- */
.tool-layout { display: grid; gap: var(--s7); }
.tool-layout > .prose { margin-inline: auto; width: 100%; }
.tool-window { max-width: 60rem; width: 100%; margin-inline: auto; }
.tool-window .mac-body { padding: clamp(1rem, 0.6rem + 1.6vw, 1.75rem); }
.dropzone {
  position: relative;
  display: grid; justify-items: center; text-align: center; gap: var(--s2);
  padding: var(--s7) var(--s5);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color var(--duration-quick) ease, background-color var(--duration-quick) ease, transform var(--duration-fast) var(--spring), box-shadow var(--duration-quick) ease;
}
@media (prefers-color-scheme: dark) { .dropzone { background: rgba(255, 255, 255, 0.02); } }
.dropzone:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.dropzone:hover .drop-icon { transform: translateY(-2px); }
.dropzone:active { transform: scale(0.995); }
.dropzone.is-dragover { border-color: var(--accent); border-style: solid; background: var(--accent-soft); transform: scale(1.01); box-shadow: 0 0 0 4px var(--accent-soft); }
.dropzone:focus-visible { outline-offset: 3px; border-radius: var(--r); }
.drop-icon { width: 3rem; height: 3.5rem; margin-bottom: var(--s2); transition: transform var(--duration-fast) var(--spring); }
.dropzone.is-dragover .drop-icon { transform: translateY(-5px) scale(1.04); }
.dropzone strong { font-size: var(--t-body); }
.dropzone .hint { font-size: var(--t-cap); }
.privacy-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin: var(--s2) 0 0;
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-xs);
  background: var(--ok-soft); color: var(--ok);
  font-size: var(--t-xs); font-weight: 600;
}
.privacy-pill::before {
  content: ""; width: 11px; height: 11px; background: currentColor; flex: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Crect x='2.5' y='5.5' width='7' height='5' rx='1.2' fill='black'/%3E%3Cpath d='M4 5.5V4a2 2 0 014 0v1.5' fill='none' stroke='black' stroke-width='1.3'/%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 12 12'%3E%3Crect x='2.5' y='5.5' width='7' height='5' rx='1.2' fill='black'/%3E%3Cpath d='M4 5.5V4a2 2 0 014 0v1.5' fill='none' stroke='black' stroke-width='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.estimator-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--s5); }
.preset-label { margin: 0 0 var(--s2); font-size: var(--t-cap); font-weight: 600; }
.bloat-error { margin: var(--s4) 0 0; padding: var(--s3) var(--s4); border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: var(--t-sm); animation: status-in 320ms var(--ease-out); }
.bloat-results { margin-top: var(--s6); padding-top: var(--s6); border-top: 1px solid var(--line); animation: status-in 360ms var(--ease-out); }
.result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s5); }
.result-head h2 { font-size: var(--t-h3); letter-spacing: -0.015em; overflow-wrap: anywhere; }
.result-head .privacy-pill { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-card { background: var(--surface); padding: var(--s4); min-width: 0; }
.stat-card.span-2 { grid-column: 1 / -1; }
.stat-label { margin: 0 0 var(--s1); font-size: var(--t-xs); font-weight: 600; color: var(--muted); }
.stat-value { margin: 0; font-family: var(--font-display); font-size: 1.625rem; font-weight: 650; letter-spacing: -0.028em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-sub { margin: var(--s1) 0 0; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.stat-card.span-2 .stat-value { font-size: 1.25rem; }
.breakdown { margin-top: var(--s3); }
.breakdown-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--fill-2); }
.breakdown-bar .seg-img { width: var(--share, 0%); background: var(--accent); transition: width 640ms var(--spring); }
.breakdown-bar .seg-rest { flex: 1; background: color-mix(in srgb, var(--ink) 14%, transparent); }
.breakdown-legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s2); font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.breakdown-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.breakdown-legend span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.breakdown-legend span + span::before { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.diagnosis { margin-top: var(--s5); padding: var(--s4) var(--s5); border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.diagnosis p { margin: 0; color: var(--ink-2); font-size: var(--t-sm); }
.diagnosis .diagnosis-cta { margin-top: var(--s4); }

/* ---------- PDF Size Limits cheat sheet ---------- */
.limits-window { max-width: 72rem; width: 100%; margin-inline: auto; }
.limits-intro { max-width: 72rem; margin-inline: auto; width: 100%; }
.limits-window .mac-body { padding: clamp(1rem, 0.6rem + 1.4vw, 1.5rem); }
.limits-toolbar {
  display: flex; flex-wrap: wrap; gap: var(--s4) var(--s5);
  align-items: flex-end; margin-bottom: var(--s5);
}
.limits-search { flex: 1 1 16rem; min-width: 0; }
.limits-search label {
  display: block; margin: 0 0 var(--s2);
  font-size: var(--t-cap); font-weight: 600; color: var(--ink);
}
.limits-search input { width: 100%; }
.limits-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.limits-pills-label { width: 100%; margin: 0; font-size: var(--t-cap); font-weight: 600; color: var(--ink); }
.limits-pills button {
  appearance: none; margin: 0; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: var(--t-xs); font-weight: 500;
  min-height: 2rem;
  padding: 0.35rem 0.75rem; border-radius: 8px; cursor: pointer;
  transition: background-color var(--duration-quick) ease, color var(--duration-quick) ease, border-color var(--duration-quick) ease, transform var(--duration-micro) var(--ease-out);
}
.limits-pills button:hover { color: var(--ink); background: var(--fill); text-decoration: none; }
.limits-pills button:active { transform: scale(0.96); }
.limits-pills button.is-active {
  background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600;
}
.limits-count { margin: 0 0 var(--s3); font-size: var(--t-cap); color: var(--muted); font-variant-numeric: tabular-nums; }
.limits-grid { display: grid; gap: var(--s5); }
@media (min-width: 1040px) {
  .limits-grid { grid-template-columns: minmax(0, 1fr) 21.5rem; align-items: start; }
  .limits-rec { position: sticky; top: calc(var(--header-h) + var(--s5)); }
}
.limits-table-wrap { margin: 0; }
.limits-table { min-width: 36rem; }
.limits-table tbody tr { cursor: pointer; }
.limits-table tbody tr:hover td { background: var(--accent-soft); }
.limits-table tbody tr.is-selected td,
.limits-table tbody tr.is-selected td:first-child,
.limits-table tbody tr:hover td:first-child { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--ink); }
.limits-table tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--accent), inset -1px 0 0 var(--line); }
.limits-table tbody tr:focus-visible { outline: none; }
.limits-table tbody tr:focus-visible td { box-shadow: inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.limits-table tbody tr.is-selected:focus-visible td:first-child {
  box-shadow: inset 3px 0 0 var(--accent), inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent);
}
.limits-table td:last-child a { white-space: nowrap; }
.limits-table td.limits-limit { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.limits-cat {
  display: inline-block; font-size: 11px; font-weight: 500;
  padding: 0.12rem 0.45rem; border-radius: 5px;
  background: var(--fill); color: var(--ink-2); white-space: nowrap;
}
.limits-empty {
  display: none; margin: 0; padding: var(--s6) var(--s4);
  text-align: center; color: var(--muted); font-size: var(--t-sm);
}
.limits-empty.is-visible { display: block; }
.limits-rec {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-2);
  padding: var(--s5);
  min-width: 0;
}
.limits-rec-kicker { margin: 0 0 var(--s2); font-size: var(--t-cap); font-weight: 600; color: var(--muted); }
.limits-rec-service { margin: 0 0 var(--s1); font-size: var(--t-h3); letter-spacing: -0.02em; }
.limits-rec-cap {
  margin: var(--s3) 0 var(--s2);
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.6rem + 1.2vw, 2.625rem);
  font-weight: 650; letter-spacing: -0.035em; line-height: 1;
  font-variant-numeric: tabular-nums;
  animation: status-in 300ms var(--ease-out);
}
.limits-rec-cap-sub { margin: 0 0 var(--s4); font-size: var(--t-cap); color: var(--muted); }
.limits-rec dl { margin: 0; display: grid; gap: var(--s3); }
.limits-rec dt { margin: 0; font-size: var(--t-xs); font-weight: 600; color: var(--muted); }
.limits-rec dd { margin: 0.15rem 0 0; font-size: var(--t-sm); color: var(--ink-2); }
.limits-rec-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.limits-rec-actions .btn { text-decoration: none; }
.limits-rec-placeholder { color: var(--ink-2); font-size: var(--t-sm); }
.limits-rec-placeholder p { margin: 0; }
.article-hero:has(+ .article .tool-layout .limits-window) .wrap { max-width: 72rem; }
@media (max-width: 1039px) {
  .limits-rec { order: -1; }
  .limits-grid { display: flex; flex-direction: column; }
}

/* ---------- Tool page hero sizing ---------- */
.article-hero:has(+ .article .tool-layout) .wrap { max-width: 60rem; }
.article-hero:has(+ .article .tool-layout) h1 { max-width: 28ch; }
.article-hero:has(+ .article .tool-layout .limits-window) h1 { max-width: 32ch; }
.article-hero:has(+ .article .tool-layout) { padding: var(--s7) 0 var(--s5); border-bottom: 0; }
.article-hero:has(+ .article .tool-layout) .lede { margin-bottom: 0; }
.article-hero:has(+ .article .tool-layout) + .article { padding-top: var(--s5); }
.tool-layout:has(.limits-window) { gap: var(--s5); }

@media (max-width: 720px) {
  .article-hero { padding: var(--s7) 0 var(--s6); }
  .article { padding-top: var(--s6); }
  .article-hero:has(+ .article .tool-layout) { padding: var(--s5) 0 var(--s4); }
  .article-hero:has(+ .article .tool-layout) + .article { padding-top: var(--s4); }
}

/* ---------- Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .sharpness { transition: none; }
  .btn:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: light) {
  :root { --line: rgba(0, 0, 0, 0.35); --line-strong: rgba(0, 0, 0, 0.55); --muted: #45443f; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --line: rgba(255, 255, 255, 0.35); --line-strong: rgba(255, 255, 255, 0.55); --muted: #c4c2bb; }
}
@media (forced-colors: active) {
  .btn, .segmented button.is-active { border: 1px solid ButtonText; }
  .meter-fill, .meter-cap { background: Highlight; forced-color-adjust: none; }
}
@media print {
  .site-header, .waitlist, .cta-banner, .toc { display: none; }
  body { background: #fff; }
}
