/* ==========================================================================
   Unsent Tools — C10 Design System (Production Stylesheet)
   Charcoal hero & accent bands (#131316), warm off-white body (#F8F7F4),
   ink + lime (#D3F26A) icons and primary actions, olive (#3F6A0B) accent
   text on light surfaces for WCAG AA contrast.
   Covers both the new C10 shell and the full legacy live tool vocabulary.
   ========================================================================== */

/* ---------- Self-hosted font faces (files added separately; safe swap) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/SpaceGrotesk-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/DMSans-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  color-scheme: light dark;

  /* C10 surface & text tokens (light) */
  --canvas: #F8F7F4;
  --surface: #FFFFFF;
  --well: #F1EFEA;
  --hairline: rgba(19, 19, 22, 0.11);
  --control-line: #85857F;
  --text: #131316;
  --text-2: #5F6168;
  --bar: #D9D7D0;
  --glass: rgba(248, 247, 244, 0.86);

  /* Charcoal bands */
  --char: #131316;
  --char-2: #1B1B1F;
  --on-char: #FFFFFF;
  --on-char-2: #B4B6BC;
  --on-char-muted: #8B8D93;

  /* Lime & olive accents */
  --lime: #D3F26A;
  --lime-hover: #C4E650;
  --lime-ink: #1A2308;
  --olive: #3F6A0B;

  --primary: #D3F26A;
  --primary-hover: #C4E650;
  --primary-on: #131316;
  --link: #3F6A0B;
  --focus: #131316;
  --active: #65A30D;

  --good: #65A30D;
  --good-ink: #3F6A0B;
  --good-tint: #EEF8C8;
  --good-on-tint: #1A2308;
  --hl: rgba(211, 242, 106, 0.6);

  --bad: #B42318;
  --bad-tint: rgba(180, 35, 24, 0.09);
  --warn: #8A4B00;
  --warn-tint: rgba(138, 75, 0, 0.08);

  /* Category dots (labels, chips, section spot illustrations) */
  --c-pdf: #DB5F54;
  --c-image: #4689D0;
  --c-video: #CB7420;
  --c-creator: #D05893;
  --c-text: #66768A;
  --c-everyday: #3C9964;
  --c-ai: #8468D8;
  --cat: var(--text-2);

  /* Icon tiles: ink + lime */
  --tile-bg: #131316;
  --tile-fg: #D3F26A;

  /* Shadows */
  --shadow-1: 0 0 0 1px rgba(19, 19, 22, 0.06), 0 1px 2px rgba(19, 19, 22, 0.04), 0 8px 24px -8px rgba(19, 19, 22, 0.08);
  --shadow-2: 0 0 0 1px rgba(19, 19, 22, 0.06), 0 2px 4px rgba(19, 19, 22, 0.04), 0 12px 24px -8px rgba(19, 19, 22, 0.08), 0 32px 64px -24px rgba(19, 19, 22, 0.22);
  --shadow-hover: 0 0 0 1px rgba(19, 19, 22, 0.08), 0 2px 4px rgba(19, 19, 22, 0.04), 0 14px 28px -12px rgba(19, 19, 22, 0.14);

  /* Typography */
  --font: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-21: 1.3125rem;
  --fs-24: 1.5rem;
  --fs-32: 2rem;
  --fs-40: 2.5rem;
  --fs-64: 4rem;

  /* Radii & motion */
  --r-panel: 20px;
  --r-control: 12px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 200ms;

  /* Layout */
  --container-max: 1120px;
  --container-tool: 720px;
  --gutter: 16px;
  --section-gap: 56px;
  --header-h: 56px;

  /* Legacy variable aliases (direct values for canvas/JS getComputedStyle safety) */
  --paper: #F8F7F4;
  --ink: #131316;
  --muted: #5F6168;
  --line: rgba(19, 19, 22, 0.11);
  --blue: #3F6A0B;
  --on-blue: #FFFFFF;
  --blue-tint: #EEF8C8;
  --red: #B42318;
  --red-tint: rgba(180, 35, 24, 0.09);
  --green: #3F6A0B;
  --green-tint: #EEF8C8;
  --subtle: #F1EFEA;
  --font-sans: var(--font);
  --text-xs: var(--fs-13);
  --text-base: var(--fs-16);
  --text-md: var(--fs-18);
  --text-lg: var(--fs-24);
  --text-xl: var(--fs-32);
  --text-2xl: var(--fs-40);
  --r-envelope: 16px;
  --r-list: 0px;
  --max-w: var(--container-max);
  --measure: 72ch;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --section-gap: 96px;
    --header-h: 60px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #131316;
    --surface: #1A1A1E;
    --well: #202025;
    --hairline: rgba(255, 255, 255, 0.09);
    --control-line: #74767C;
    --text: #F4F4F2;
    --text-2: #A4A6AC;
    --bar: #3A3A40;
    --glass: rgba(19, 19, 22, 0.86);

    --link: #D3F26A;
    --focus: #D3F26A;
    --active: #D3F26A;

    --good: #D3F26A;
    --good-ink: #D3F26A;
    --good-tint: rgba(211, 242, 106, 0.14);
    --good-on-tint: #D3F26A;
    --hl: rgba(211, 242, 106, 0.28);

    --bad: #FF6961;
    --bad-tint: rgba(255, 105, 97, 0.14);
    --warn: #FFB340;
    --warn-tint: rgba(255, 179, 64, 0.14);

    --tile-bg: #2A2A30;
    --tile-fg: #D3F26A;

    --shadow-1: 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-2: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 24px 48px -16px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.16);

    --paper: #131316;
    --ink: #F4F4F2;
    --muted: #A4A6AC;
    --line: rgba(255, 255, 255, 0.09);
    --blue: #D3F26A;
    --on-blue: #131316;
    --blue-tint: rgba(211, 242, 106, 0.14);
    --red: #FF6961;
    --red-tint: rgba(255, 105, 97, 0.14);
    --green: #D3F26A;
    --green-tint: rgba(211, 242, 106, 0.14);
    --subtle: #202025;
  }
}

/* Category accent mapping */
[data-cat="pdf"], [data-category="pdf"], [data-filter="pdf"] { --cat: var(--c-pdf); }
[data-cat="image"], [data-category="image"], [data-filter="image"] { --cat: var(--c-image); }
[data-cat="video"], [data-category="video"], [data-filter="video"] { --cat: var(--c-video); }
[data-cat="creator"], [data-category="creator"], [data-filter="creator"] { --cat: var(--c-creator); }
[data-cat="text"], [data-category="text"], [data-filter="text"] { --cat: var(--c-text); }
[data-cat="everyday"], [data-category="everyday"], [data-filter="everyday"] { --cat: var(--c-everyday); }
[data-cat="ai"], [data-category="ai"], [data-filter="ai"] { --cat: var(--c-ai); }

/* ---------- Base reset & typography ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-16);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, canvas, video {
  max-width: 100%;
  height: auto;
}

svg {
  display: block;
}

h1, h2, h3, .brand, .section-title, .result-summary,
.envelope-title, .popular-name, .category-title, .route-title {
  font-family: var(--font-display);
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1, h2 {
  font-weight: 700;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(1.95rem, 4.5vw, 2.5rem);
  margin: 0 0 8px;
}

h2 {
  font-size: var(--fs-24);
  margin: 40px 0 12px;
}

h3 {
  font-size: var(--fs-18);
  margin: 18px 0 6px;
}

p {
  margin: 0 0 14px;
  max-width: var(--measure);
}

ul, ol {
  max-width: var(--measure);
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--well);
  padding: 2px 6px;
  border-radius: 6px;
}

:focus-visible,
.envelope:focus-visible,
.hero-drop-trigger:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.hero :focus-visible,
.tool-hero-copy :focus-visible,
.privacy-band :focus-visible,
.cta-band :focus-visible {
  outline-color: var(--lime);
}

.route-panel :focus-visible {
  outline-color: var(--focus);
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

/* Accessibility & utility classes */
.sr, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tnum, .tabular, .chip-count, .category-count, .section-meta,
.btn, .sent-meter, .diag-pill {
  font-variant-numeric: tabular-nums;
}

.only-touch { display: none; }

@media (max-width: 639px), (hover: none) {
  .only-fine { display: none; }
  .only-touch { display: inline; }
}

.kicker {
  margin: 0 0 10px;
  max-width: none;
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

mark.hl {
  padding: 0 2px;
  background: linear-gradient(transparent 58%, var(--hl) 58%);
  color: inherit;
}

.lede {
  color: var(--text-2);
  font-size: var(--fs-16);
  max-width: var(--measure);
  margin: 0 0 20px;
}

.muted {
  color: var(--text-2);
  font-size: var(--fs-13);
}

.live-dot, .sent-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
}

/* ---------- Layout containers ---------- */
.container, .wrap {
  width: 100%;
  max-width: calc(var(--container-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: var(--measure);
}

main.wrap {
  padding-top: 28px;
  padding-bottom: 40px;
}

main.page-home,
main.page-tool {
  padding: 0;
}

/* ---------- Header (sticky glass bar) ---------- */
header.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--hairline);
}

@media (prefers-reduced-transparency: reduce) {
  header.top {
    background: var(--canvas);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

header.top .header-inner,
header.top .wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--header-h);
}

/* Legacy header wrap allows clean wrapping on small screens */
header.top .wrap {
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text);
  font-size: var(--fs-18);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--char);
  color: var(--lime);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.brand-mark svg {
  width: 16px;
  height: 16px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--r-control);
  color: var(--text-2);
  font-size: var(--fs-14);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--fast) var(--ease);
}

.nav-link:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cat {
  display: none;
}

.nav-all {
  padding: 0 8px;
  color: var(--link);
  font-weight: 600;
}

@media (min-width: 960px) {
  .header-nav {
    margin-inline: auto;
  }
  .nav-cat {
    display: inline-flex;
  }
  .nav-all {
    display: none;
  }
}

/* Legacy nav links on unconverted pages */
header.top .wrap > nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 14px;
}

header.top .wrap > nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-2);
  font-size: var(--fs-14);
  font-weight: 500;
  text-decoration: none;
}

header.top .wrap > nav a:hover {
  color: var(--text);
}

/* ---------- Sent meter (Header pill + Legacy tool-head variant) ---------- */
.sent-meter {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}

.sent-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-13);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color var(--fast) var(--ease);
}

.sent-details {
  max-width: 100%;
}

.sent-details > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: -6px;
  margin-bottom: -6px;
  font-size: var(--fs-13);
  color: var(--link);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sent-details > summary::-webkit-details-marker {
  display: none;
}

.sent-panel {
  margin-top: 8px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  color: var(--text);
  text-align: left;
  width: 100%;
  max-width: 100%;
  font-size: var(--fs-13);
}

@media (min-width: 720px) {
  .sent-details[open] .sent-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: min(380px, calc(100vw - var(--gutter) * 2));
    z-index: 60;
  }
}

.sent-note {
  margin: 0 0 10px;
  font-size: var(--fs-13);
  color: var(--text-2);
  max-width: none;
}

.sent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  max-height: 260px;
  overflow-y: auto;
}

.sent-list li {
  padding: 7px 0;
  border-top: 1px solid var(--hairline);
  font-size: var(--fs-13);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.sent-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.sent-req-name {
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.sent-req-host {
  color: var(--text-2);
}

.sent-req-label {
  display: block;
  margin-top: 2px;
  color: var(--good-ink);
  font-weight: 500;
}

/* Header pill mode: makes the crisp Files sent: 0 pill itself clickable to open the live network log */
header.top .sent-meter {
  flex-direction: row;
  align-items: center;
  min-height: 44px;
  gap: 0;
  flex: none;
}

header.top .sent-status {
  pointer-events: none;
}

header.top .sent-details {
  position: static;
}

header.top .sent-details > summary {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  color: transparent;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
  border-radius: var(--r-pill);
}

header.top .sent-details > summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

header.top .sent-meter:hover .sent-status {
  border-color: var(--control-line);
}

header.top .sent-details[open] .sent-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(360px, calc(100vw - var(--gutter) * 2));
  z-index: 60;
}

/* ---------- Legacy .tool-head (unconverted pages) ---------- */
.tool-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.tool-head h1,
.tool-head .lede {
  margin: 0;
}

@media (min-width: 720px) {
  .tool-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 24px;
    row-gap: 6px;
    align-items: start;
  }

  .tool-head h1 { grid-column: 1; grid-row: 1; }
  .tool-head .lede { grid-column: 1; grid-row: 2; }
  .tool-head .sent-meter {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
    align-items: flex-end;
    text-align: right;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--lime);
  color: var(--char);
  box-shadow: inset 0 0 0 1px rgba(26, 35, 8, 0.14);
  font-family: var(--font);
  font-size: var(--fs-16);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.btn:hover:not(:disabled) {
  background: var(--lime-hover);
  text-decoration: none;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--lime);
  color: var(--char);
  box-shadow: inset 0 0 0 1px rgba(26, 35, 8, 0.14);
}

.btn--primary:hover:not(:disabled) {
  background: var(--lime-hover);
}

.btn.secondary,
.btn--secondary {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.btn.secondary:hover:not(:disabled),
.btn--secondary:hover:not(:disabled) {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--control-line);
}

.btn--ghost {
  background: transparent;
  color: var(--on-char);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52);
}

.btn.danger {
  background: var(--surface);
  color: var(--bad);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.btn.danger:hover:not(:disabled) {
  background: var(--bad-tint);
  box-shadow: inset 0 0 0 1px var(--bad);
}

.btn.small {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: var(--fs-13);
  font-weight: 600;
}

.btn--lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: 1.0625rem;
}

.btn--full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.section-action, .link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--link);
  font-size: var(--fs-14);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.section-action:hover, .link-btn:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.row.between {
  justify-content: space-between;
}

/* ---------- Icon tiles: ink + lime ---------- */
.icon-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--tile-bg);
  color: var(--tile-fg);
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.icon-tile svg {
  width: 20px;
  height: 20px;
}

.icon-tile--lg {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.icon-tile--lg svg {
  width: 22px;
  height: 22px;
}

@media (min-width: 600px) {
  .popular-card .icon-tile--lg {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }
  .popular-card .icon-tile--lg svg {
    width: 26px;
    height: 26px;
  }
}

/* ---------- Line illustrations (category spots) ---------- */
.ill {
  flex: none;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ill .p { fill: var(--surface); }
.ill .a { fill: var(--lime); }

.cat-spot { width: 44px; height: 44px; }
.cat-spot .a { fill: var(--cat); }

@media (min-width: 640px) {
  .cat-spot { width: 48px; height: 48px; }
}

/* ==========================================================================
   Home page: Hero band, dark tilted app-window mock, finder, popular, catalogue
   ========================================================================== */
.hero {
  padding: 40px 0 0;
  background:
    radial-gradient(60rem 36rem at 62% 40%, rgba(163, 230, 53, 0.14) 0, rgba(163, 230, 53, 0.04) 40%, transparent 70%),
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1.5px) 0 0 / 18px 18px,
    var(--char);
  color: var(--on-char);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
  border-radius: var(--r-panel);
}

.hero-copy.is-dragover {
  outline: 2px dashed var(--lime);
  outline-offset: 12px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  max-width: none;
  color: var(--on-char-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
}

.hero-title {
  margin: 16px 0 0;
  color: var(--on-char);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: balance;
}

.hero-lime {
  display: block;
  color: var(--lime);
}

.hero-sub {
  margin: 16px 0 0;
  color: var(--on-char-2);
  font-size: var(--fs-18);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.hero-drop-trigger {
  display: inline-flex;
  border-radius: var(--r-control);
  cursor: pointer;
}

.hero-drop-trigger.over .btn {
  box-shadow: 0 0 0 3px var(--hl);
}

.hero-note {
  margin: 16px 0 0;
  color: var(--on-char-muted);
  font-size: var(--fs-14);
}

.hero-art {
  min-width: 0;
  margin: 0;
  padding-bottom: 40px;
}

.hero-caption {
  display: block;
  max-width: 560px;
  margin: 20px 0 0 auto;
  color: var(--on-char-muted);
  font-size: var(--fs-14);
  font-style: italic;
  line-height: 1.5;
  text-align: right;
}

/* Home hero product window mock */
.win {
  max-width: 560px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: var(--char-2);
  color: #E8E8E6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 40px 80px -24px rgba(0, 0, 0, 0.7);
  font-size: var(--fs-13);
  line-height: 1.4;
  overflow: hidden;
  animation: rise 600ms var(--ease) 80ms both;
}

.win p {
  margin: 0;
  max-width: none;
}

.win-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.win-dots { position: absolute; left: 16px; display: flex; gap: 7px; }
.win-dots i { width: 10px; height: 10px; border-radius: 50%; background: #3A3A40; }

.win-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #A4A6AC;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}

.win-body { display: grid; grid-template-columns: 148px minmax(0, 1fr); }
.win-side { padding: 16px 12px; border-right: 1px solid rgba(255, 255, 255, 0.08); }

.win-cap, .win-kicker {
  overflow: hidden;
  color: var(--on-char-muted);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.win-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  margin-top: 2px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--on-char-muted);
}

.win-cap + .win-item { margin-top: 10px; }
.win-item.is-on { background: rgba(255, 255, 255, 0.07); color: #FFFFFF; }
.win-check svg, .win-pass svg { width: 12px; height: 12px; }
.win-check { color: var(--lime); }

.win-meter { margin-top: 16px; padding: 10px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; }
.win-zero { margin-top: 6px; color: #FFFFFF; font-weight: 600; }
.win-zero span { color: var(--on-char-muted); font-weight: 400; }
.win-meter-bar { display: block; height: 3px; margin-top: 8px; border-radius: 2px; background: linear-gradient(90deg, var(--lime) 6px, rgba(255, 255, 255, 0.1) 6px); }

.win-main { min-width: 0; padding: 16px; }
.win-file { margin-top: 4px; color: #FFFFFF; font-family: var(--font-display); font-size: var(--fs-16); font-weight: 600; }

.win-sizes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 12px;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: var(--fs-24);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.win-from { color: var(--on-char-muted); font-weight: 500; }

.win-badge {
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: rgba(211, 242, 106, 0.14);
  color: var(--lime);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
}

.win-bars { display: grid; gap: 6px; margin-top: 14px; }

.win-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
  color: var(--on-char-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.win-row > :last-child { color: #E8E8E6; text-align: right; }
.win-track { height: 6px; }
.win-fill { display: block; height: 100%; border-radius: 3px; background: #3A3A40; }
.win-fill--new { width: 14%; min-width: 6px; background: var(--lime); }

.win-checks { display: grid; gap: 6px; margin-top: 14px; }

.win-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.75rem;
}

.win-pass { display: inline-flex; align-items: center; gap: 4px; color: var(--lime); font-family: var(--font-mono); font-size: 0.6875rem; }

.win-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }

.win-btn {
  display: inline-grid;
  place-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  background: var(--lime);
  color: var(--char);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.win-pill { display: inline-flex; align-items: center; gap: 6px; color: var(--lime); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes win-in {
  from { opacity: 0; transform: perspective(1600px) rotateY(-9deg) rotateX(4deg) translateY(16px); }
  to { opacity: 1; transform: perspective(1600px) rotateY(-9deg) rotateX(4deg); }
}

@media (min-width: 640px) {
  .hero-title { font-size: 3rem; }
}

@media (min-width: 960px) {
  .hero { padding: 80px 0 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; }
  .hero-title { margin-top: 20px; font-size: var(--fs-64); }
  .hero-sub { margin-top: 20px; font-size: var(--fs-18); max-width: 30rem; }
  .hero-actions { margin-top: 28px; }
  .hero-art { padding-bottom: 0; }
  .win { transform: perspective(1600px) rotateY(-9deg) rotateX(4deg); transform-origin: 60% 50%; animation-name: win-in; }
}

@media (max-width: 639px) {
  .hero-art { padding-bottom: 0; }
  .hero-caption { display: none; }

  .win {
    max-height: 232px;
    margin: 0;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  }

  .win-body { grid-template-columns: 112px minmax(0, 1fr); }
  .win-side { padding: 12px 8px; }
  .win-main { padding: 12px; }
  .win-sizes { font-size: var(--fs-21); }
}

/* Home file-type router results card */
.route-panel {
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
}

.route-title {
  margin: 0 0 6px;
  color: var(--text);
  font-size: var(--fs-18);
  font-weight: 700;
}

.route-note {
  margin: 0 0 14px;
  font-size: var(--fs-14);
  color: var(--text-2);
}

.route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Home phone sticky pill */
.sticky-pill { display: none; }

@media (max-width: 639px) {
  .sticky-pill {
    position: fixed;
    right: 16px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 6px 6px 16px;
    border: 1px solid var(--hairline);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-2);
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
  }

  .sticky-pill.is-shown { transform: none; opacity: 1; pointer-events: auto; }
  .sticky-pill-text { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-14); font-weight: 600; }
  .sticky-pill .btn { min-height: 44px; padding: 0 18px; font-size: var(--fs-14); }
  .page-home ~ .site-footer { padding-bottom: 96px; }
}

/* ---------- Finder: search & category filter chips ---------- */
.finder-section { padding-top: 24px; }

@media (min-width: 640px) {
  .finder-section { padding-top: var(--section-gap); }
}

.finder-shell { display: grid; gap: 16px; }
.search-wrap { position: relative; }

.search-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 20px;
  height: 20px;
  color: var(--text-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 96px 0 48px;
  border: 1px solid var(--control-line);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-16);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.search-input::placeholder { color: var(--text-2); opacity: 1; }
.search-input::-webkit-search-cancel-button { display: none; }

.search-input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--hl);
}

.search-clear {
  position: absolute;
  top: 50%;
  right: 4px;
  min-width: 64px;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--link);
  font-size: var(--fs-14);
  font-weight: 600;
  transform: translateY(-50%);
}

.chip-rail {
  display: flex;
  gap: 8px;
  margin-inline: calc(var(--gutter) * -1);
  padding: 2px var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chip-rail::-webkit-scrollbar { display: none; }

@media (min-width: 960px) {
  .chip-rail { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; overflow: visible; }
}

.chip-rail .chip {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-14);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.chip-rail .chip[data-filter]:not([data-filter="all"])::before,
.popular-cat::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat);
}

.chip-rail .chip:hover { border-color: var(--control-line); }
.chip-count { color: var(--text-2); font-size: var(--fs-13); font-weight: 400; }

.chip-rail .chip[aria-pressed="true"] {
  border-color: var(--char);
  background: var(--char);
  color: #FFFFFF;
}

.chip-rail .chip[aria-pressed="true"] .chip-count { color: inherit; opacity: 0.72; }
.chip-rail .chip[aria-pressed="true"]:not([data-filter="all"])::before { background: var(--lime); }

@media (prefers-color-scheme: dark) {
  .chip-rail .chip[aria-pressed="true"] {
    border-color: var(--lime);
    background: var(--lime);
    color: var(--char);
  }
  .chip-rail .chip[aria-pressed="true"]:not([data-filter="all"])::before { background: var(--char); }
}

/* ---------- Shared sections ---------- */
.section-block, .tool-section {
  padding-top: var(--section-gap);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 20px;
}

.section-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.section-meta {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-14);
}

@media (min-width: 768px) {
  .section-head { margin-bottom: 32px; }
  .section-title { font-size: var(--fs-40); }
}

/* ---------- Popular row (home) ---------- */
#popular-section { padding-top: 40px; }

@media (min-width: 640px) {
  #popular-section { padding-top: 64px; }
}

.popular-grid { display: grid; gap: 10px; }

.popular-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 12px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease), border-color 240ms var(--ease), background-color 240ms var(--ease);
}

.popular-card:hover { text-decoration: none; }
.popular-card-top { display: contents; }
.popular-card .icon-tile { grid-row: 1 / span 2; }
.popular-card .popular-cat { grid-column: 2; grid-row: 1; }
.popular-card > div:last-child { grid-column: 2; grid-row: 2; }

.popular-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: var(--fs-13);
}

.popular-cat::before { width: 6px; height: 6px; }
.popular-name { margin: 0; font-size: var(--fs-16); font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.popular-tag { margin: 2px 0 0; color: var(--text-2); font-size: var(--fs-14); }

@media (hover: hover) {
  .popular-card:hover {
    border-color: transparent;
    background: color-mix(in srgb, var(--cat) 6%, var(--surface));
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
  }
}

@media (min-width: 600px) {
  .popular-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .popular-card { display: flex; flex-direction: column; align-items: stretch; gap: 28px; padding: 24px; }
  .popular-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .popular-name { font-size: var(--fs-18); letter-spacing: -0.02em; }
  .popular-tag { margin-top: 4px; }
}

@media (min-width: 960px) {
  .popular-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Catalogue (home) ---------- */
.catalogue-stack { display: grid; gap: 16px; }

.category-panel {
  padding: 0 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  background: var(--surface);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 8px 8px;
}

.category-title {
  margin: 0;
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  min-width: 0;
  font-size: var(--fs-18);
  font-weight: 700;
}

.category-count { flex: none; color: var(--text-2); font-size: var(--fs-14); white-space: nowrap; }

.category-panel .section-note {
  margin: 0 8px 12px;
  color: var(--text-2);
  font-size: var(--fs-14);
  max-width: var(--measure);
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}

.tool-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 60px;
  padding: 10px 8px;
  border-radius: var(--r-control);
  color: var(--text);
  text-decoration: none;
  transition: background-color var(--fast) var(--ease);
}

.tool-item:hover {
  background: var(--well);
  text-decoration: none;
}

.tool-copy { flex: 1; min-width: 0; }
.tool-name { display: block; margin: 0; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; color: var(--text); }
.tool-tag { display: block; margin: 2px 0 0; color: var(--text-2); font-size: var(--fs-13); line-height: 1.45; }

.category-footer { display: none; padding: 8px; }

@media (max-width: 639px) {
  .category-panel.is-collapsed .tool-item:nth-child(n + 7) { display: none; }
  .category-panel.has-overflow .category-footer { display: block; }
}

.show-all-btn {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--well);
  color: var(--text);
  font-size: var(--fs-14);
  font-weight: 600;
}

.show-all-btn:hover {
  background: var(--bar);
}

@media (min-width: 640px) {
  .category-panel { padding: 0 16px 16px; }
  .category-header { padding: 24px 8px 12px; }
  .category-title { font-size: var(--fs-21); }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
}

@media (min-width: 960px) {
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.empty-results {
  padding: 48px 24px;
  border: 1px dashed var(--control-line);
  border-radius: var(--r-panel);
  text-align: center;
}

.empty-results h3 { margin: 0; font-size: var(--fs-21); }
.empty-results p { margin: 8px auto 24px; color: var(--text-2); }

/* Legacy home plain grouped tool index (if referenced on secondary pages) */
.tool-index {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  border-top: 1px solid var(--hairline);
}

.tool-index li { border-bottom: 1px solid var(--hairline); }

.tool-index a, .tool-index .tool-soon {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 44px;
  padding: 12px 0;
  text-decoration: none;
  color: inherit;
}

@media (min-width: 640px) {
  .tool-index a, .tool-index .tool-soon {
    flex-direction: row;
    align-items: baseline;
    gap: 16px;
  }
  .tool-index .tool-name { flex: 0 0 260px; }
}

.tool-index .tool-name { font-weight: 700; color: var(--link); }
.tool-index a:hover .tool-name { text-decoration: underline; }
.tool-index .tool-desc { color: var(--text-2); font-size: var(--fs-16); }

/* Home "How we prove it" proof grid */
.proof-head { margin-bottom: 32px; }
.proof-sub { margin: 12px 0 0; color: var(--text-2); font-size: var(--fs-18); }
.proof-grid { display: grid; gap: 24px; }

.proof-item {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: 16px;
}

.proof-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  grid-row: 1 / span 3;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(101, 163, 13, 0.35);
  border-radius: 50%;
  background: var(--good-tint);
  color: var(--good-on-tint);
}

@media (prefers-color-scheme: dark) {
  .proof-icon { background: #232B14; }
}

.proof-icon svg { width: 24px; height: 24px; }
.proof-item > :not(.proof-icon) { grid-column: 2; }
.proof-item h3 { margin: 0; font-size: var(--fs-18); }
.proof-item p { margin: 8px 0 0; color: var(--text-2); }

@media (min-width: 768px) {
  .proof-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .proof-item { display: block; text-align: center; }
  .proof-icon { margin: 0 auto 20px; }
  .proof-item p { margin-inline: auto; }
  .proof-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 28px;
    left: calc(50% + 40px);
    width: calc(100% + 32px - 80px);
    height: 1px;
    background: var(--control-line);
    opacity: 0.45;
  }
}

/* ==========================================================================
   Tool page: Charcoal hero band + App Window (.tool-window)
   ========================================================================== */
.tool-hero {
  position: relative;
  z-index: 1;
  padding: 16px 0 20px;
}

.tool-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 310px;
  z-index: -1;
  background:
    radial-gradient(56rem 32rem at 68% 34%, rgba(163, 230, 53, 0.14) 0, rgba(163, 230, 53, 0.04) 42%, transparent 72%),
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1.5px) 0 0 / 18px 18px,
    var(--char);
}

.tool-hero-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.tool-hero-copy {
  min-width: 0;
  color: var(--on-char);
}

.tool-hero-copy .eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
}

.crumbs {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  margin-bottom: 10px;
  color: var(--on-char-muted);
  font-size: var(--fs-13);
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-char-2);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--on-char);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tool-heading-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

/* Tool hero icon: lime tile with dark ink symbol */
.tool-title-icon {
  background: var(--lime);
  color: var(--char);
}

.tool-title-icon.icon-tile--lg {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.tool-title-icon.icon-tile--lg svg {
  width: 22px;
  height: 22px;
}

.tool-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  color: var(--on-char);
}

.tool-title .hero-lime {
  display: block;
  color: var(--lime);
}

.tool-hero-copy .lede {
  margin: 10px 0 0;
  color: var(--on-char-2);
  font-size: var(--fs-14);
  line-height: 1.5;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  max-width: none;
}

.hero-trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-char-2);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.hero-trust-chip svg {
  width: 13px;
  height: 13px;
  color: var(--lime);
}

@media (min-width: 640px) {
  .tool-hero { padding: 16px 0 24px; }
  .tool-hero::before { height: 370px; }
  .crumbs { display: flex; }
  .tool-hero-copy .eyebrow { font-size: 0.75rem; letter-spacing: 0.16em; }
  .tool-heading-row { gap: 16px; margin-top: 14px; }
  .tool-title-icon.icon-tile--lg { width: 52px; height: 52px; border-radius: 14px; }
  .tool-title-icon.icon-tile--lg svg { width: 26px; height: 26px; }
  .tool-title { font-size: 2.35rem; }
  .tool-hero-copy .lede { margin-top: 12px; font-size: var(--fs-16); }
  .hero-trust { gap: 8px; margin-top: 16px; }
  .hero-trust-chip { height: 32px; padding: 0 12px; font-size: var(--fs-13); }
  .tool-hero-grid { gap: 24px; }
}

@media (min-width: 960px) {
  .tool-hero { padding: 40px 0 64px; }
  .tool-hero::before { height: 100%; }

  .tool-hero-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 48px;
    align-items: start;
  }

  .tool-hero-copy {
    padding-top: 12px;
  }

  .tool-heading-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-top: 20px;
  }

  .tool-title-icon.icon-tile--lg { width: 54px; height: 54px; border-radius: 14px; }
  .tool-title-icon.icon-tile--lg svg { width: 27px; height: 27px; }
  .tool-title { font-size: clamp(2.5rem, 3.8vw, 3.35rem); line-height: 1.05; }
  .tool-hero-copy .lede { margin-top: 16px; max-width: 26rem; font-size: var(--fs-18); line-height: 1.55; }
  .hero-trust { margin-top: 22px; }
}

@media (prefers-color-scheme: dark) and (min-width: 960px) {
  .tool-hero { border-bottom: 1px solid var(--hairline); }
}

/* ---------- App Window (.tool-window) ---------- */
.tool-window {
  position: relative;
  min-width: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-2);
}

@media (min-width: 960px) {
  .tool-window {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22), 0 36px 72px -24px rgba(0, 0, 0, 0.6);
  }
}

.tool-window-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-bottom: 1px solid var(--hairline);
  border-radius: calc(var(--r-panel) - 1px) calc(var(--r-panel) - 1px) 0 0;
  background: var(--well);
}

.tool-window-dots {
  position: absolute;
  left: 14px;
  display: flex;
  gap: 6px;
}

.tool-window-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bar);
}

.tool-window-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 22px;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}

.tool-window-tag .live-dot {
  width: 6px;
  height: 6px;
}

.tool-window-body {
  padding: 16px;
  min-width: 0;
}

@media (min-width: 640px) {
  .tool-window-bar { height: 42px; }
  .tool-window-dots { left: 16px; gap: 7px; }
  .tool-window-dots i { width: 10px; height: 10px; }
  .tool-window-body { padding: 24px 26px 26px; }
}

/* ==========================================================================
   Live Tool Interactive Controls (Drop zone, text envelope, results, options)
   ========================================================================== */

/* ---------- Drop zone (.drop-bar, .envelope) ---------- */
.drop-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}

.envelope {
  flex: 1 1 220px;
  min-width: 0;
  border: 1.5px dashed var(--control-line);
  border-radius: 16px;
  background: var(--well);
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background-color var(--fast) var(--ease);
}

.envelope:hover,
.envelope.over {
  border-color: var(--active);
  box-shadow: 0 0 0 3px var(--hl);
}

.envelope-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 20px;
  min-height: 164px;
  text-align: center;
  transition: padding var(--fast) var(--ease), min-height var(--fast) var(--ease);
}

.envelope-title {
  font-size: var(--fs-18);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
  max-width: none;
}

.envelope-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.envelope-row .btn {
  min-width: 180px;
  min-height: 48px;
}

.envelope-hint {
  font-size: var(--fs-13);
  color: var(--text-2);
}

.envelope-compact-label {
  display: none;
  font-weight: 600;
  font-size: var(--fs-14);
  color: var(--link);
}

.envelope-compact-hint {
  display: none;
  font-size: var(--fs-13);
  color: var(--text-2);
}

/* Collapsed slim bar after files are loaded */
.envelope.is-compact {
  border-style: solid;
  border-color: var(--hairline);
  border-radius: var(--r-control);
}

.envelope.is-compact:hover,
.envelope.is-compact.over {
  border-color: var(--active);
}

.envelope.is-compact .envelope-inner {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 10px 14px;
  min-height: 44px;
  text-align: left;
}

.envelope.is-compact .envelope-title,
.envelope.is-compact .envelope-row {
  display: none;
}

.envelope.is-compact .envelope-compact-label,
.envelope.is-compact .envelope-compact-hint {
  display: inline;
}

.clear-btn {
  align-self: stretch;
}

/* ---------- Text tool envelope (.text-envelope) ---------- */
.text-envelope {
  border: 1.5px dashed var(--control-line);
  border-radius: 16px;
  background: var(--well);
  padding: 4px;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.text-envelope.over {
  border-color: var(--active);
  box-shadow: 0 0 0 3px var(--hl);
}

.text-envelope-inner {
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 14px 14px;
}

.text-envelope-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.text-envelope-bar label {
  margin: 0;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text-2);
}

.text-envelope-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.file-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--good-ink);
  font-weight: 600;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-input {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

/* ---------- Messages (.msg) ---------- */
.msg {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: var(--r-control);
  border: 1px solid var(--hairline);
  background: var(--well);
  color: var(--text);
  font-size: var(--fs-14);
  line-height: 1.5;
  max-width: none;
}

.msg.note {
  border-left: 3px solid var(--active);
}

.msg.warn {
  border-left: 3px solid var(--warn);
  background: var(--warn-tint);
}

.msg.ok {
  border-left: 3px solid var(--good);
  background: var(--good-tint);
  color: var(--good-on-tint);
}

.msg.err {
  border-color: var(--bad);
  border-left: 3px solid var(--bad);
  background: var(--bad-tint);
  color: var(--bad);
}

.msg a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

/* ---------- Result panel ---------- */
.result-panel {
  margin-top: 18px;
}

.result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.result-summary {
  margin: 0;
  font-size: var(--fs-18);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  max-width: none;
}

.result-summary .ok-mark {
  color: var(--good-ink);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Progress bar */
.progress-track {
  width: 100%;
  height: 10px;
  margin: 12px 0 0;
  padding: 2px;
  border-radius: var(--r-pill);
  background: var(--char-2);
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .progress-track { background: #2A2A30; }
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--r-pill);
  background: var(--lime);
  transition: width 120ms linear;
}

/* File list */
.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
}

.file-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}

.file-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--well);
  border: 1px solid var(--hairline);
  flex-shrink: 0;
}

.pdf-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--tile-bg);
  color: var(--tile-fg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  text-align: center;
}

.pdf-badge span {
  font-weight: 500;
  font-size: 0.6875rem;
  color: var(--on-char-2);
}

.file-info {
  flex: 1 1 180px;
  min-width: 0;
}

.file-name {
  font-weight: 600;
  font-size: var(--fs-16);
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.file-sub {
  font-size: var(--fs-13);
  color: var(--text-2);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.file-detail {
  font-size: var(--fs-13);
  color: var(--text-2);
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.file-detail.is-clean { color: var(--good-ink); font-weight: 600; }
.file-detail.is-error { color: var(--bad); font-weight: 600; }

.file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.status-tag {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--good-ink);
}

.status-tag.err { color: var(--bad); }

/* Reorderable page items */
.page-item { cursor: grab; }
.page-item.dragging { opacity: 0.45; }
.page-item.drop-target { background: var(--good-tint); border-radius: 10px; }

.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--well);
  border: 1px solid var(--hairline);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ---------- Collapsible Options (details.options) ---------- */
.options {
  margin-top: 16px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--well);
}

.options > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-height: 44px;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-16);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.options > summary::-webkit-details-marker { display: none; }

.options > summary::after {
  content: "";
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 1.75px solid var(--text-2);
  border-bottom: 1.75px solid var(--text-2);
  transform: rotate(45deg);
  transition: transform var(--fast) var(--ease);
}

.options[open] > summary::after {
  transform: rotate(-135deg);
}

.opt-summary {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-2);
}

.options-body {
  padding: 16px;
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: 0 0 13px 13px;
}

/* ---------- Forms, grids & tool preset chips ---------- */
.grid {
  display: grid;
  gap: 14px;
}

.grid > * { min-width: 0; }

@media (min-width: 640px) {
  .grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.field-row > * { min-width: 0; }

label {
  display: block;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text-2);
  margin: 12px 0 6px;
}

.options-body > label:first-child,
.grid > div > label:first-child,
.field-row > div > label:first-child {
  margin-top: 0;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="email"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: var(--fs-16);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--hl);
}

input[type="range"] {
  width: 100%;
  min-height: 44px;
  accent-color: var(--active);
  cursor: pointer;
}

.chk {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 2px 0;
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.chk input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--active);
  flex-shrink: 0;
}

/* Tool preset chips (inside .chips) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 14px;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--well);
}

.chips .chip {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: var(--fs-14);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.chips .chip:hover {
  color: var(--text);
  background: rgba(19, 19, 22, 0.05);
}

@media (prefers-color-scheme: dark) {
  .chips .chip:hover { background: rgba(255, 255, 255, 0.06); }
}

.chips .chip[aria-pressed="true"] {
  border-color: rgba(26, 35, 8, 0.16);
  background: var(--lime);
  color: var(--char);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(19, 19, 22, 0.12);
}

/* ---------- Tool-specific shared classes across all 73 tools ---------- */
.tool-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0 12px;
}

.tool-bar .spacer { flex: 1 1 auto; }

/* Preview grids & boxes */
.preview-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 640px) {
  .preview-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.preview-label {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text-2);
  margin: 0 0 6px;
}

.preview-box {
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: repeating-conic-gradient(var(--well) 0 25%, var(--surface) 0 50%) 0 0 / 20px 20px;
  padding: 12px;
  text-align: center;
  overflow: hidden;
}

.preview-box img {
  display: block;
  margin: 0 auto;
  max-height: 360px;
  object-fit: contain;
}

/* Safe zone stage */
.stage-wrap { margin-top: 16px; }

.stage {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-control);
  overflow: hidden;
  background: repeating-conic-gradient(var(--well) 0 25%, var(--surface) 0 50%) 0 0 / 24px 24px;
  border: 1px solid var(--hairline);
}

.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 10px 0 0;
  font-size: var(--fs-13);
  color: var(--text-2);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sw {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

/* Thumbnail grid (Split PDF, Rotate PDF, Organize PDF) */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

@media (min-width: 520px) {
  .thumb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 760px) {
  .thumb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.thumb-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  padding: 8px;
  gap: 8px;
  min-width: 0;
}

.thumb-card.is-selected {
  border-color: var(--active);
  background: var(--good-tint);
}

.thumb-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.thumb-frame {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--well);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.thumb-frame img {
  max-width: 92%;
  max-height: 92%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 150ms ease;
}

.thumb-placeholder {
  font-size: var(--fs-13);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.thumb-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
  font-size: var(--fs-13);
  font-variant-numeric: tabular-nums;
}

.thumb-page-label { font-weight: 700; color: var(--text); }
.thumb-state { color: var(--good-ink); font-weight: 700; }

.thumb-actions {
  display: flex;
  gap: 6px;
  width: 100%;
}

.thumb-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 8px;
}

/* Password box, range bar, redaction stage */
.password-box,
.range-bar {
  margin-top: 14px;
  padding: 16px;
  background: var(--well);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
}

.range-bar label { margin-top: 0; }

.password-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  margin-top: 6px;
}

.password-row input { flex: 1 1 200px; min-width: 0; }

.redact-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0 10px;
}

.redact-page-info {
  font-size: var(--fs-16);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
}

.redact-stage-wrap {
  margin-top: 8px;
  padding: 12px;
  background: var(--well);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  overflow: hidden;
}

.redact-stage {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--hairline);
  background: #FFFFFF;
  user-select: none;
  -webkit-user-select: none;
}

.redact-stage canvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
  touch-action: none;
}

.method-note {
  margin: 10px 0 0;
  font-size: var(--fs-13);
  color: var(--text-2);
}

/* Output boxes & code blocks */
.output-box,
.code-box {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: var(--well);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: var(--surface);
}

table.specs {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-14);
  font-variant-numeric: tabular-nums;
}

table.specs th,
table.specs td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
}

table.specs tr:last-child td { border-bottom: 0; }

table.specs th {
  color: var(--text-2);
  font-weight: 600;
  font-size: var(--fs-13);
  background: var(--well);
}

/* Video preview & trim controls */
.main-control { margin-bottom: 14px; }

.range-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.range-top label { margin: 0 0 5px; }

.trim-panel,
.video-preview-wrap {
  margin-top: 14px;
  padding: 14px;
  background: var(--well);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
}

.trim-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: 10px;
}

.trim-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-16);
  margin: 0;
}

.trim-dur {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.preview-player {
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.preview-player video,
.video-preview-wrap video {
  display: block;
  width: 100%;
  max-height: 340px;
  margin: 0 auto;
  border-radius: 8px;
  background: #000;
}

.scrubber-wrap {
  position: relative;
  width: 100%;
  height: 76px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  overflow: hidden;
  background: var(--char-2);
  touch-action: none;
  user-select: none;
  cursor: ew-resize;
}

.scrubber-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.nudge-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.nudge-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.nudge-label {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text-2);
  margin-right: 2px;
}

.plan-note {
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* Text stats (Word counter, etc.) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.stat-box {
  padding: 12px 14px;
  background: var(--well);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  min-width: 0;
}

.stat-val {
  font-family: var(--font-display);
  font-size: var(--fs-24);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-lbl {
  margin-top: 4px;
  font-size: var(--fs-13);
  color: var(--text-2);
}

.time-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--well);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  font-size: var(--fs-14);
  font-variant-numeric: tabular-nums;
}

.time-item strong { color: var(--text); }
.time-item span { color: var(--text-2); font-size: var(--fs-13); margin-left: 4px; }

.kw-section { margin-top: 18px; }
.kw-section h3 { margin: 0 0 8px; font-size: var(--fs-16); }

.kw-bar-wrap { display: flex; align-items: center; gap: 8px; }
.kw-bar {
  flex: 1 1 70px;
  max-width: 140px;
  height: 7px;
  background: var(--bar);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.kw-bar-fill { height: 100%; background: var(--active); border-radius: var(--r-pill); }

/* Plain prose panel (e.g. About, Privacy, Advertise) */
.plain-section {
  padding: 20px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin: 24px 0;
}

.plain-section h2:first-child { margin-top: 0; }
.section-note { margin: -4px 0 12px; color: var(--text-2); font-size: var(--fs-14); max-width: var(--measure); }

/* ==========================================================================
   Below-the-tool Sections: Steps, Privacy Band, FAQ, Related Tools, Sponsor, CTA
   ========================================================================== */

/* ---------- How it works: lime-circle step row (ol.steps) ---------- */
ol.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  display: grid;
  gap: 24px;
  counter-reset: step;
}

ol.steps li {
  counter-increment: step;
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: 16px;
}

ol.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(101, 163, 13, 0.35);
  border-radius: 50%;
  background: var(--good-tint);
  color: var(--good-on-tint);
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

@media (prefers-color-scheme: dark) {
  ol.steps li::before { background: #232B14; }
}

ol.steps li > h3 {
  grid-column: 2;
  grid-row: 1;
  margin: 4px 0 0;
  font-size: var(--fs-18);
  font-weight: 700;
}

ol.steps li > p {
  grid-column: 2;
  grid-row: 2;
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: var(--fs-14);
  line-height: 1.55;
}

@media (min-width: 768px) {
  ol.steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }

  ol.steps li {
    display: block;
    text-align: center;
  }

  ol.steps li::before {
    margin: 0 auto 18px;
  }

  ol.steps li > h3 { margin-top: 0; }
  ol.steps li > p { margin-inline: auto; font-size: var(--fs-16); }

  ol.steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 28px;
    left: calc(50% + 40px);
    width: calc(100% + 32px - 80px);
    height: 1px;
    background: var(--control-line);
    opacity: 0.45;
  }
}

/* ---------- Privacy band (dark charcoal section) ---------- */
.privacy-band {
  margin-top: var(--section-gap);
  padding: 56px 0;
  background:
    radial-gradient(54rem 30rem at 78% 18%, rgba(163, 230, 53, 0.12) 0, rgba(163, 230, 53, 0.03) 45%, transparent 72%),
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1.5px) 0 0 / 18px 18px,
    var(--char);
  color: var(--on-char);
}

@media (min-width: 768px) {
  .privacy-band { padding: 80px 0; }
}

@media (prefers-color-scheme: dark) {
  .privacy-band {
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
  }
}

.privacy-head { max-width: 40rem; }
.privacy-head .section-title { margin-top: 12px; color: var(--on-char); }
.privacy-head .hero-lime { display: inline; }
.privacy-sub { margin: 14px 0 0; color: var(--on-char-2); font-size: var(--fs-16); line-height: 1.55; }

@media (min-width: 768px) {
  .privacy-sub { font-size: var(--fs-18); }
}

/* Visual 0-bytes diagram: Device -> 0 bytes -> Crossed-out server */
.privacy-diagram {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-panel);
  background: var(--char-2);
}

.diag-node {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.diag-node--device {
  border-color: rgba(211, 242, 106, 0.35);
  background: rgba(211, 242, 106, 0.06);
}

.diag-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.diag-node--device .diag-icon {
  background: var(--lime);
  color: var(--char);
}

.diag-node--cloud .diag-icon {
  background: rgba(255, 255, 255, 0.07);
  color: var(--on-char-muted);
}

.diag-icon svg { width: 24px; height: 24px; }
.diag-title { margin: 0; font-family: var(--font-display); font-size: var(--fs-16); font-weight: 700; color: var(--on-char); }
.diag-node--cloud .diag-title { color: var(--on-char-2); }
.diag-meta { margin: 2px 0 0; color: var(--on-char-2); font-size: var(--fs-13); }
.diag-node--cloud .diag-meta { color: var(--on-char-muted); }

.diag-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
}

.diag-line {
  width: 1px;
  height: 16px;
  border-left: 1.5px dashed rgba(255, 255, 255, 0.22);
}

.diag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(211, 242, 106, 0.45);
  border-radius: var(--r-pill);
  background: rgba(211, 242, 106, 0.12);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.diag-caption {
  color: var(--on-char-muted);
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  .privacy-diagram {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 20px;
    padding: 28px;
  }

  .diag-link {
    flex-direction: row;
    min-width: 200px;
    padding: 0;
  }

  .diag-line {
    flex: 1;
    width: auto;
    height: 1px;
    border-left: 0;
    border-top: 1.5px dashed rgba(255, 255, 255, 0.22);
  }

  .diag-caption {
    position: absolute;
    top: calc(100% + 8px);
    white-space: nowrap;
  }
}

/* Three proof cards inside the dark privacy band */
.priv-cards {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.priv-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: var(--char-2);
}

.priv-card-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(211, 242, 106, 0.12);
  color: var(--lime);
}

.priv-card-icon svg { width: 20px; height: 20px; }

.priv-card h3 {
  margin: 14px 0 0;
  color: var(--on-char);
  font-size: var(--fs-18);
  font-weight: 700;
}

.priv-card p {
  margin: 8px 0 0;
  color: var(--on-char-2);
  font-size: var(--fs-14);
  line-height: 1.55;
}

@media (min-width: 768px) {
  .priv-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .priv-card { padding: 24px; }
}

/* ---------- FAQ accordion (both C10 .faq-layout and legacy section.faq) ---------- */
.faq-layout {
  display: grid;
  gap: 24px;
}

.faq-intro-note {
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: var(--fs-16);
  max-width: 24rem;
}

.faq-panel {
  padding: 4px 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  background: var(--surface);
}

.faq-panel details + details {
  border-top: 1px solid var(--hairline);
}

.faq-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 14px 0;
  font-family: var(--font-display);
  font-size: var(--fs-16);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.faq-panel summary::-webkit-details-marker { display: none; }

.faq-chevron {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--text-2);
  transition: transform var(--fast) var(--ease);
}

.faq-panel details[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-panel details p {
  margin: 0;
  padding: 0 28px 18px 0;
  color: var(--text-2);
  font-size: var(--fs-14);
  line-height: 1.6;
  max-width: none;
}

@media (min-width: 768px) {
  .faq-panel { padding: 8px 28px; }
  .faq-panel summary { font-size: var(--fs-18); }
  .faq-panel details p { font-size: var(--fs-16); }
}

@media (min-width: 960px) {
  .faq-layout {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: 48px;
    align-items: start;
  }
}

/* Legacy unconverted section.faq > details */
.faq > details {
  padding: 4px 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-top: 0;
}

.faq > details:first-of-type {
  border-top: 1px solid var(--hairline);
  border-radius: 16px 16px 0 0;
}

.faq > details:last-of-type {
  border-radius: 0 0 16px 16px;
}

.faq > details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 12px 0;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq > details > summary::-webkit-details-marker { display: none; }

.faq > details > summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 1.75px solid var(--text-2);
  border-bottom: 1.75px solid var(--text-2);
  transform: rotate(45deg);
  transition: transform var(--fast) var(--ease);
}

.faq > details[open] > summary::after {
  transform: rotate(-135deg);
}

.faq > details > p {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: var(--fs-14);
}

/* ---------- Related tools (C10 icon cards + legacy ul.related-list) ---------- */
ul.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  display: grid;
  gap: 12px;
}

@media (min-width: 600px) {
  ul.related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 960px) {
  ul.related-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

ul.related-list li {
  display: flex;
}

ul.related-list a,
.related-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 70px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--fs-16);
  font-weight: 700;
  text-decoration: none;
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease), border-color 240ms var(--ease);
}

@media (hover: hover) {
  ul.related-list a:hover,
  .related-card:hover {
    border-color: var(--control-line);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    text-decoration: none;
  }
}

.related-card .tool-name {
  font-family: var(--font-display);
  font-size: var(--fs-16);
  font-weight: 700;
}

/* ---------- Sponsor pill (both C10 .sponsor-slot--pill and legacy aside.sponsor) ---------- */
.sponsor,
.sponsor-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 14px 20px;
  border: 1px solid var(--hairline);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

main.wrap .sponsor {
  margin-top: 28px;
}

.sponsor-left {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 14px;
  min-width: 0;
}

.sponsor-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--well);
  color: var(--text-2);
}

.sponsor-mark svg { width: 20px; height: 20px; }

.sponsor-label {
  display: block;
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sponsor-copy {
  margin: 2px 0 0;
  color: var(--text);
  font-size: var(--fs-14);
  line-height: 1.4;
  max-width: none;
}

.sponsor-cta,
aside.sponsor > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: var(--well);
  color: var(--text);
  font-size: var(--fs-14);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}

.sponsor-cta:hover,
aside.sponsor > a:hover {
  border-color: var(--control-line);
  text-decoration: none;
}

@media (min-width: 768px) {
  .sponsor-slot--pill {
    padding: 14px 16px 14px 20px;
    border-radius: var(--r-pill);
  }
  .sponsor-copy { font-size: var(--fs-16); }
}

@media (max-width: 639px) {
  .sponsor-slot { flex-wrap: wrap; gap: 10px 16px; }
  .sponsor-left { flex-basis: 100%; }
  .sponsor-slot .sponsor-cta { margin-left: 58px; }
}

/* ---------- Closing charcoal CTA band ---------- */
.cta-band {
  margin-top: var(--section-gap);
  padding: 56px 0;
  background:
    radial-gradient(52rem 28rem at 50% 0%, rgba(163, 230, 53, 0.14) 0, rgba(163, 230, 53, 0.04) 44%, transparent 72%),
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1.5px) 0 0 / 18px 18px,
    var(--char);
  color: var(--on-char);
}

@media (prefers-color-scheme: dark) {
  .cta-band { border-top: 1px solid var(--hairline); }
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.cta-copy { max-width: 38rem; }
.cta-copy .section-title { margin-top: 12px; color: var(--on-char); }
.cta-sub { margin: 12px 0 0; color: var(--on-char-2); font-size: var(--fs-16); }

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (min-width: 768px) {
  .cta-band { padding: 72px 0; }
  .cta-sub { font-size: var(--fs-18); }
}

@media (min-width: 960px) {
  .cta-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .cta-actions { flex: none; }
}

/* ---------- Footer (C10 .site-footer + legacy footer) ---------- */
footer,
.site-footer {
  margin-top: var(--section-gap);
  padding: 24px 0 36px;
  border-top: 1px solid var(--hairline);
  color: var(--text-2);
  font-size: var(--fs-13);
}

main:has(.cta-band) + footer,
.cta-band + .site-footer {
  margin-top: 0;
}

.footer-inner,
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-note {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-13);
}

.footer-links,
footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 20px;
}

.footer-link,
footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-2);
  font-size: var(--fs-13);
  text-decoration: none;
}

.footer-link:hover,
footer nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Tool-specific additions (phase 3) */

/* Standalone toggle chips placed outside .chips / .chip-rail (e.g. .transport-row, .color-row, .flag-bar) */
.tool-window :not(.chips):not(.chip-rail) > .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--well);
  color: var(--text-2);
  font-family: inherit;
  font-size: var(--fs-14);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.tool-window :not(.chips):not(.chip-rail) > .chip:hover {
  color: var(--text);
  border-color: var(--control-line);
}

.tool-window :not(.chips):not(.chip-rail) > .chip[aria-pressed="true"] {
  border-color: rgba(26, 35, 8, 0.16);
  background: var(--lime);
  color: var(--char);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(19, 19, 22, 0.12);
}

/* Desktop .tool-window (~560px inner width): cap .thumb-grid at 3 columns so card actions fit cleanly */
@media (min-width: 960px) {
  .tool-window .thumb-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Info & 404 pages: compact charcoal hero + prose sections ---------- */
main.page-info {
  padding: 0;
}

.info-hero {
  padding: 36px 0 40px;
  background:
    radial-gradient(56rem 32rem at 68% 34%, rgba(163, 230, 53, 0.14) 0, rgba(163, 230, 53, 0.04) 42%, transparent 72%),
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1.5px) 0 0 / 18px 18px,
    var(--char);
  color: var(--on-char);
}

.info-hero-inner {
  max-width: var(--measure);
}

.info-hero .crumbs {
  display: flex;
}

.info-hero .hero-title {
  margin: 14px 0 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.06;
}

.info-hero .lede {
  margin: 14px 0 0;
  color: var(--on-char-2);
  font-size: var(--fs-16);
  line-height: 1.55;
}

.info-hero .lede a {
  color: var(--lime);
}

.info-hero .hero-actions {
  margin-top: 22px;
}

@media (min-width: 768px) {
  .info-hero {
    padding: 52px 0 56px;
  }
  .info-hero .lede {
    font-size: var(--fs-18);
  }
}

@media (prefers-color-scheme: dark) {
  .info-hero {
    border-bottom: 1px solid var(--hairline);
  }
}

.info-hero :focus-visible {
  outline-color: var(--lime);
}

.info-prose {
  max-width: var(--measure);
}

.info-prose h2 {
  margin: 32px 0 12px;
  font-size: var(--fs-24);
}

.info-prose h2:first-child {
  margin-top: 0;
}

.info-prose ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.info-prose li {
  margin: 8px 0;
}

.info-card {
  padding: 22px 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  background: var(--surface);
  max-width: var(--measure);
}

.info-card h2:first-child {
  margin-top: 0;
}

.info-card ul {
  margin: 0 0 18px;
  padding-left: 20px;
}

.info-card ul:last-child,
.info-card p:last-child {
  margin-bottom: 0;
}

.info-card li {
  margin: 8px 0;
}

@media (min-width: 768px) {
  .info-card {
    padding: 28px 32px;
  }
}

/* Phone: keep long window tags clear of the three dots (post-swarm QA fix) */
@media (max-width: 639px) {
  .tool-window-bar { padding: 0 12px 0 60px; }
  .tool-window-tag { max-width: 100%; overflow: hidden; white-space: nowrap; }
}
@media (max-width: 419px) {
  .tool-window-dots { display: none; }
  .tool-window-bar { padding: 0 12px; }
}

/* Verify page: code blocks and table inside info cards */
.info-prose ol { padding-left: 1.25em; }
.info-prose ol li { margin: 0 0 10px; }
.info-prose .code-block {
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--well);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.info-prose .code-block code { background: none; padding: 0; font-size: inherit; }
.info-prose .table-wrap { overflow-x: auto; margin: 12px 0 16px; border: 1px solid var(--hairline); border-radius: 10px; }
.info-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.info-table th, .info-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hairline); }
.info-table th { background: var(--well); font-weight: 600; }
.info-table tr:last-child td { border-bottom: 0; }
@media (max-width: 639px) {
  .info-table, .info-table tbody, .info-table tr, .info-table td { display: block; width: 100%; box-sizing: border-box; }
  .info-table thead { display: none; }
  .info-table tr { padding: 10px 0; border-bottom: 1px solid var(--hairline); }
  .info-table tr:last-child { border-bottom: 0; }
  .info-table td { border: 0; padding: 2px 14px; }
  .info-table td:first-child { font-weight: 600; }
}

/* Device-aware model picker */
.device-pick-note {
  margin: 0 0 8px;
  font-size: var(--fs-13);
  color: var(--text-2);
  line-height: 1.4;
  max-width: var(--measure);
}

.chips .chip.chip--model {
  flex-direction: column;
  gap: 3px;
  padding: 8px 12px;
  line-height: 1.25;
}

.chip-main {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.chip-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.chip-badge--rec {
  background: var(--good-tint);
  color: var(--good-on-tint);
  border: 1px solid rgba(63, 106, 11, 0.22);
}

.chip-badge--heavy {
  background: var(--warn-tint);
  color: var(--warn);
  border: 1px solid rgba(138, 75, 0, 0.24);
}

@media (prefers-color-scheme: dark) {
  .chip-badge--rec {
    border-color: rgba(211, 242, 106, 0.3);
  }
  .chip-badge--heavy {
    border-color: rgba(255, 179, 64, 0.34);
  }
}

.chips .chip[aria-pressed="true"] .chip-badge--rec,
.chips .chip[aria-pressed="true"] .chip-badge--heavy {
  background: rgba(19, 19, 22, 0.12);
  color: var(--char);
  border-color: rgba(19, 19, 22, 0.2);
}

.chip-reason {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  color: inherit;
  opacity: 0.92;
}

.chips .chip.is-heavy[aria-disabled="true"] {
  opacity: 0.58;
  border: 1px dashed var(--hairline);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}

.chips .chip.is-heavy[aria-disabled="true"]:hover {
  opacity: 0.8;
  border-color: var(--control-line);
  color: var(--text);
}

.chips .chip.is-heavy[aria-disabled="true"]:focus-visible {
  opacity: 1;
}

.model-heavy-warn {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-top: 10px;
}

.model-heavy-text {
  flex: 1 1 220px;
  min-width: 0;
}

.model-heavy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.model-heavy-actions .btn {
  min-height: 44px;
}

/* ---------- Light privacy + closing bands (2026-11-23): only the hero stays charcoal ---------- */
.privacy-band,
.cta-band {
  --band-accent: var(--olive);
  background: var(--well);
  color: var(--text);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
@media (prefers-color-scheme: dark) {
  .privacy-band,
  .cta-band { --band-accent: var(--lime); }
}
.privacy-band :focus-visible,
.cta-band :focus-visible { outline-color: var(--focus); }
.privacy-band .eyebrow,
.cta-band .eyebrow { color: var(--text-2); }
.privacy-band .eyebrow-dot,
.cta-band .eyebrow-dot { background: var(--band-accent); }
.privacy-head .section-title,
.cta-copy .section-title { color: var(--text); }
.privacy-band .hero-lime,
.cta-band .hero-lime { color: var(--band-accent); }
.privacy-sub,
.cta-sub { color: var(--text-2); }

.privacy-diagram { background: var(--surface); border-color: var(--hairline); }
.diag-node { border-color: var(--hairline); background: var(--paper); }
.diag-node--device { border-color: rgba(63, 106, 11, 0.35); background: rgba(211, 242, 106, 0.2); }
.diag-node--device .diag-icon { background: var(--char); color: var(--lime); }
.diag-node--cloud .diag-icon { background: var(--well); color: var(--text-2); }
.diag-title { color: var(--text); }
.diag-node--cloud .diag-title,
.diag-meta,
.diag-node--cloud .diag-meta,
.diag-caption { color: var(--text-2); }
.diag-line { border-color: rgba(19, 19, 22, 0.28); }
.diag-pill { border-color: rgba(63, 106, 11, 0.4); background: rgba(211, 242, 106, 0.3); color: var(--band-accent); }

.priv-card { background: var(--surface); border-color: var(--hairline); }
.priv-card-icon { background: var(--char); color: var(--lime); }
.priv-card h3 { color: var(--text); }
.priv-card p { color: var(--text-2); }

@media (prefers-color-scheme: dark) {
  .diag-node--device { border-color: rgba(211, 242, 106, 0.35); background: rgba(211, 242, 106, 0.06); }
  .diag-line { border-color: rgba(255, 255, 255, 0.22); }
  .diag-pill { border-color: rgba(211, 242, 106, 0.45); background: rgba(211, 242, 106, 0.12); }
  .diag-node--device .diag-icon { background: var(--lime); color: var(--char); }
  .priv-card-icon { background: rgba(211, 242, 106, 0.12); }
}

/* Progress bar: moving shine while work is running */
.progress-track.is-busy .progress-fill {
  min-width: 8%;
  background-image: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: progress-shine 1.1s linear infinite;
}
@keyframes progress-shine {
  from { background-position: 150% 0; }
  to { background-position: -50% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .progress-track.is-busy .progress-fill { animation: none; }
}

/* ---------- Dropdowns (2026-11-23) ---------- */
/* Closed state, every browser: custom chevron, no OS arrow */
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F6168' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}
select:hover { border-color: var(--text-2); }
@media (prefers-color-scheme: dark) {
  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A4A6AC' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
}
select[multiple] { background-image: none; padding-right: 12px; }

/* Open menu, browsers with customizable <select> (Chrome/Edge 135+). Others keep the system menu. */
@supports (appearance: base-select) {
  select:not([multiple]),
  select:not([multiple])::picker(select) {
    appearance: base-select;
  }
  select:not([multiple]) {
    display: block;
    padding-right: 46px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  select:not([multiple])::picker-icon { display: none; }
  select:not([multiple]):open {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px var(--hl);
  }
  select:not([multiple])::picker(select) {
    margin-top: 6px;
    padding: 6px;
    max-height: min(360px, 60vh);
    overflow-y: auto;
    border: 1px solid var(--hairline);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 2px 6px rgba(19, 19, 22, 0.06), 0 18px 40px -12px rgba(19, 19, 22, 0.28);
  }
  select:not([multiple]) option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: var(--fs-15, 0.9375rem);
    line-height: 1.35;
    white-space: normal;
    cursor: pointer;
  }
  select:not([multiple]) option:hover,
  select:not([multiple]) option:focus-visible {
    background: var(--well);
    outline: none;
  }
  select:not([multiple]) option:checked {
    background: rgba(211, 242, 106, 0.38);
    font-weight: 600;
  }
  select:not([multiple]) option::checkmark {
    order: 1;
    margin-left: auto;
    color: var(--olive);
    font-weight: 700;
  }
  select:not([multiple]) option:disabled { opacity: 0.45; cursor: default; }
  select:not([multiple]) optgroup {
    padding: 6px 0 2px;
    color: var(--text-2);
    font-size: var(--fs-13);
    font-weight: 600;
  }
  @media (prefers-color-scheme: dark) {
    select:not([multiple])::picker(select) {
      box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7);
    }
    select:not([multiple]) option:checked { background: rgba(211, 242, 106, 0.14); }
    select:not([multiple]) option::checkmark { color: var(--lime); }
  }
}

/* ---------- Sponsor slot in the tool hero (2026-11-23): visible without scrolling ---------- */
.sponsor-slot--hero {
  margin-top: 16px;
  min-height: 0;
  padding: 8px 8px 8px 12px;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}
.sponsor-slot--hero .sponsor-left { gap: 10px; }
.sponsor-slot--hero .sponsor-mark {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--on-char-muted);
}
.sponsor-slot--hero .sponsor-mark svg { width: 15px; height: 15px; }
.sponsor-slot--hero .sponsor-label { color: var(--on-char-muted); font-size: 0.6875rem; }
.sponsor-slot--hero .sponsor-copy { display: none; color: var(--on-char-2); font-size: var(--fs-13); }
.sponsor-slot--hero .sponsor-cta {
  min-height: 44px;
  padding: 0 14px;
  border-color: rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--on-char);
  font-size: var(--fs-13);
}
.sponsor-slot--hero .sponsor-cta:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.06); }
.sponsor-slot--hero :focus-visible { outline-color: var(--lime); }

/* Phone: one slim row (override the generic wrapping rules) */
@media (max-width: 639px) {
  .sponsor-slot.sponsor-slot--hero { flex-wrap: nowrap; }
  .sponsor-slot--hero .sponsor-left { flex-basis: auto; }
  .sponsor-slot.sponsor-slot--hero .sponsor-cta { margin-left: 0; min-height: 44px; }
}

/* Desktop: a fuller card in the empty space under the trust chips */
@media (min-width: 960px) {
  .sponsor-slot--hero {
    margin-top: 28px;
    max-width: 30rem;
    padding: 14px 14px 14px 16px;
    border-radius: 16px;
  }
  .sponsor-slot--hero .sponsor-mark { width: 36px; height: 36px; }
  .sponsor-slot--hero .sponsor-mark svg { width: 18px; height: 18px; }
  .sponsor-slot--hero .sponsor-copy { display: block; margin-top: 2px; }
}

/* ---------- Compact Popular cards (2026-11-23) ---------- */
@media (min-width: 600px) {
  .popular-grid { gap: 12px; }
  .popular-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 2px 14px;
    padding: 16px 18px;
  }
  .popular-card-top { display: contents; }
  .popular-card .icon-tile { grid-column: 1; grid-row: 1 / span 2; }
  .popular-card .icon-tile--lg { width: 44px; height: 44px; border-radius: 12px; }
  .popular-card .icon-tile--lg svg { width: 22px; height: 22px; }
  .popular-card > div:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .popular-card .popular-cat { display: none; }
  .popular-name { font-size: var(--fs-16); letter-spacing: -0.01em; }
  .popular-tag { margin-top: 2px; font-size: var(--fs-14); }
}
.popular-card .popular-cat { display: none; }
.popular-card > div:last-child { grid-row: 1 / span 2; }

/* ==========================================================================
   Home review fixes (2026-11-23)
   Scoped to the home page unless the rule fixes a shared one-off value.
   ========================================================================== */

/* Header: solid on home. The glass bar turned muddy grey over the charcoal hero. */
body:has(> main.page-home) header.top {
  background: var(--canvas);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* The nav carries the full category names on every page, so tighten it where space is short. */
@media (min-width: 960px) and (max-width: 1199px) {
  .header-nav .nav-link { padding: 0 7px; }
}

/* Hero: shorter on desktop so search shows on first paint; no one-off italic. */
@media (min-width: 960px) {
  .page-home .hero { padding: 56px 0 48px; }
}
.hero-caption { font-style: normal; }
.btn--lg { font-size: var(--fs-16); }
.win-btn, .win-meter { border-radius: 8px; }

/* Finder: sits directly under the hero and stays with the catalogue on desktop. */
.page-home .finder-section { padding-top: 20px; }

.search-count {
  position: absolute;
  top: 50%;
  right: 76px;
  color: var(--text-2);
  font-size: var(--fs-13);
  white-space: nowrap;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-kbd {
  position: absolute;
  top: 50%;
  right: 14px;
  display: none;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--well);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

@media (max-width: 639px) {
  .search-count { display: none; }
}

@media (min-width: 640px) {
  .page-home .search-input { padding-right: 176px; }
}

@media (hover: hover) and (min-width: 960px) {
  .search-kbd:not([hidden]) { display: grid; }
  .search-input:focus ~ .search-kbd { display: none; }
}

@media (min-width: 960px) {
  .page-home .finder-section {
    position: sticky;
    top: calc(var(--header-h) + 1px);
    z-index: 40;
    padding: 14px 0 12px;
    border-bottom: 1px solid transparent;
    background: var(--canvas);
    transition: border-color var(--fast) var(--ease);
  }
  .page-home .finder-section.is-stuck { border-bottom-color: var(--hairline); }
  .page-home .finder-shell { gap: 10px; }
  .page-home .search-input { height: 48px; }
  .page-home .chip-rail .chip { min-height: 36px; padding: 0 14px; }
  .page-home #popular-section { padding-top: 40px; }
  /* Anchors land below the header plus the sticky finder */
  .page-home .browse [id] { scroll-margin-top: calc(var(--header-h) + 136px); }
}

@media (min-width: 960px) and (max-width: 1199px) {
  .page-home .chip-rail {
    flex-wrap: nowrap;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
  }
}

/* A selected chip keeps its category colour instead of turning lime. */
@media (prefers-color-scheme: light) {
  .chip-rail .chip[aria-pressed="true"]:not([data-filter="all"])::before { background: var(--cat); }
}

/* One category selected: the page heading names it, so the panel header would repeat it. */
.catalogue-stack.is-single .category-header { display: none; }
.catalogue-stack.is-single .category-panel { padding-top: 12px; }
.catalogue-stack.is-single .category-panel .section-note { margin-top: 8px; }

/* Type: a tool name is one style everywhere on the page, on the token scale. */
.page-home .tool-name { font-size: var(--fs-16); }
.page-home .tool-tag { font-size: var(--fs-14); }
.page-home .tool-item { align-items: center; }
.popular-name { font-family: var(--font); font-weight: 600; }

/* Proof: left-aligned like the rest of the page; the items are not a sequence. */
@media (min-width: 768px) {
  .page-home .proof-item { text-align: left; }
  .page-home .proof-icon { margin: 0 0 20px; }
  .page-home .proof-item p { margin-inline: 0; }
  .page-home .proof-item:not(:last-child)::after { content: none; }
}

/* FAQ: focus ring sits inside the row, clear of the text and the dividers. */
.faq-panel summary {
  margin-inline: -12px;
  padding-inline: 12px;
  border-radius: 8px;
}
.faq-panel summary:focus-visible { outline-offset: -4px; }

/* Sponsor: same card and control radii as everything else on the page. */
.page-home .sponsor-slot { border-radius: var(--r-panel); }
.page-home .sponsor-cta { border-radius: var(--r-control); }

/* While filtering, Popular is hidden: results start close to the finder. */
@media (min-width: 768px) {
  .page-home #popular-section[hidden] ~ .section-block { padding-top: 48px; }
}

/* ==========================================================================
   Tool page review fixes (2026-11-23)
   ========================================================================== */

/* Files-sent panel: max-width 100% resolved against the 117px header pill,
   so the panel opened as an unreadable sliver. */
header.top .sent-details[open] .sent-panel { max-width: none; }

/* No blank strip between the hero and the privacy band on desktop. */
@media (min-width: 960px) {
  .tool-hero + .privacy-band { margin-top: 0; }
}

/* Phones and tablets: the tool comes before the sponsor slot. The copy column's
   children join the hero grid so the slot can sit after the tool window. */
@media (max-width: 959px) {
  .tool-hero-grid { gap: 0; }
  .tool-hero-copy { display: contents; color: var(--on-char); }
  .tool-hero-grid > .tool-window { order: 2; margin-top: 18px; }
  .tool-hero-copy > .sponsor-slot--hero {
    order: 3;
    margin-top: 16px;
    border-color: var(--hairline);
    background: var(--surface);
  }
  .tool-hero-copy > .sponsor-slot--hero .sponsor-mark { background: var(--well); color: var(--text-2); }
  .tool-hero-copy > .sponsor-slot--hero .sponsor-label { color: var(--text-2); }
  .tool-hero-copy > .sponsor-slot--hero .sponsor-copy { color: var(--text); }
  .tool-hero-copy > .sponsor-slot--hero .sponsor-cta { border-color: var(--hairline); background: var(--well); color: var(--text); }
  .tool-hero-copy > .sponsor-slot--hero :focus-visible { outline-color: var(--focus); }
}

/* Type: page title on the scale (was a fluid 53.6px), section headings step
   down below the title on phones, and no 11px one-offs. */
@media (min-width: 960px) {
  .tool-title { font-size: 3rem; }
}
@media (max-width: 639px) {
  .page-tool .section-title { font-size: var(--fs-24); }
}
.tool-hero-copy .eyebrow,
.sponsor-slot--hero .sponsor-label,
.tool-window-tag { font-size: 0.75rem; }

/* The breadcrumb already names the category from 640px up. */
@media (min-width: 640px) {
  .tool-hero-copy .eyebrow { display: none; }
  .tool-hero-copy .tool-heading-row { margin-top: 8px; }
}

/* A tool name is one style everywhere: catalogue, Popular and related cards. */
.tool-name,
.related-card .tool-name { font-family: var(--font); font-size: var(--fs-16); font-weight: 600; }
.related-card .tool-tag { font-family: var(--font); font-size: var(--fs-14); font-weight: 400; }
.related-card { align-items: center; }

/* One emphasis style for headings: the lime marker used on the home page. */
.privacy-band .section-title .hero-lime,
.cta-band .section-title .hero-lime {
  width: fit-content;
  padding: 0 2px;
  background: linear-gradient(transparent 58%, var(--hl) 58%);
  color: inherit;
}

/* Radii and control sizes on the shared steps (8 / 12 / 16 / 20). */
.options,
.chips,
.sponsor-slot--hero { border-radius: var(--r-control); }
.chips .chip { border-radius: 8px; }
@media (min-width: 640px) {
  .tool-title-icon.icon-tile--lg { border-radius: var(--r-control); }
}
.envelope-row .btn { min-height: 52px; }
.sponsor-cta,
aside.sponsor > a { border-radius: var(--r-control); }

/* The window tag carries the "on-device" idea; fake traffic lights do not. */
.tool-window-dots { display: none; }

/* Home proof icons use the same ink-and-lime tile as the tool pages. */
.page-home .proof-icon {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--tile-bg);
  color: var(--tile-fg);
}
.page-home .proof-icon svg { width: 22px; height: 22px; }

/* Phones: the privacy diagram is one compact row per node, not a full screen. */
@media (max-width: 767px) {
  .privacy-diagram { gap: 8px; padding: 14px; }
  .diag-link { flex-direction: row; gap: 8px; padding: 2px 0; }
  .diag-link .diag-line { display: none; }
}

/* Error text can link straight to the tool it recommends. */
.msg.err a, .msg.warn a { color: inherit; font-weight: 600; }

/* Short guidance under a control group. */
.opt-hint { margin: -6px 0 14px; color: var(--text-2); font-size: var(--fs-13); max-width: none; }
