/* ==========================================================================
   Batchwork design system
   Paper, graphite ink, marigold (the brand yellow) and cobalt.
   Display: Archivo at wide stretch, like the stencilled label on a crate.
   Text: Instrument Sans. Filenames and code: JetBrains Mono.
   ========================================================================== */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(/static/fonts/archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url(/static/fonts/instrument-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/static/fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  --paper: #f2f3ef;          /* page */
  --sheet: #ffffff;          /* raised surfaces */
  --sheet-2: #f8f8f5;        /* inset surfaces */
  --ink: #16181d;
  --ink-2: #474c56;
  --ink-3: #676c76;
  --rule: #dcded7;
  --rule-strong: #c3c6be;

  --marigold: #f5b700;       /* brand; fills only, ink text on top */
  --marigold-soft: #fff1c2;
  --marigold-ink: #7a5000;   /* marigold-family text on paper, AA */
  --cobalt: #2437c8;
  --cobalt-soft: #e6e9ff;
  --leaf: #0d7152;
  --leaf-soft: #dcf3e9;
  --brick: #b3261e;
  --brick-soft: #fde7e4;

  --on-marigold: #16181d;
  --on-cobalt: #ffffff;

  --font-display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --font-text: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* type scale, 1.25 minor third-ish, fluid at the top */
  --t-xs: .8125rem;
  --t-sm: .9063rem;
  --t-md: 1rem;
  --t-lg: 1.1875rem;
  --t-xl: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  --t-2xl: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --t-3xl: clamp(2.15rem, 1.3rem + 3vw, 3.9rem);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 112px;

  --gutter: 16px;
  --maxw: 1200px;
  --measure: 68ch;

  /* radius hierarchy: tray > panels > controls > chips */
  --r-tray: 22px;
  --r-panel: 14px;
  --r-ctl: 9px;
  --r-chip: 999px;

  --lift: 0 1px 0 rgba(22, 24, 29, .04), 0 8px 24px -12px rgba(22, 24, 29, .18);
  --lift-strong: 0 2px 0 rgba(22, 24, 29, .05), 0 18px 40px -18px rgba(22, 24, 29, .35);
  --focus: 0 0 0 3px var(--paper), 0 0 0 5px var(--cobalt);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 180ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121418;
    --sheet: #1b1e24;
    --sheet-2: #16191e;
    --ink: #ecede9;
    --ink-2: #b8bcc4;
    --ink-3: #9196a0;
    --rule: #2c3038;
    --rule-strong: #3d424c;

    --marigold: #f5b700;
    --marigold-soft: #3a2f10;
    --marigold-ink: #f7c843;
    --cobalt: #9aa6ff;
    --cobalt-soft: #1e2447;
    --leaf: #5fd0a4;
    --leaf-soft: #133126;
    --brick: #ff8a7e;
    --brick-soft: #3b1a17;

    --on-marigold: #16181d;
    --on-cobalt: #121418;

    --lift: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
    --lift-strong: 0 2px 0 rgba(0, 0, 0, .35), 0 22px 48px -20px rgba(0, 0, 0, .8);
  }
}

@media (min-width: 720px) {
  :root { --gutter: 28px; }
}
@media (min-width: 1100px) {
  :root { --gutter: 40px; }
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--t-md);
  line-height: 1.55;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; }
p { margin: 0 0 1em; }
a { color: var(--cobalt); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code, kbd, pre, .mono { font-family: var(--font-mono); font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--space-6) 0; }
::selection { background: var(--marigold); color: var(--on-marigold); }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r-ctl);
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: -.2em; }
.i--lg { width: 1.5em; height: 1.5em; }
.spin { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(760px + 2 * var(--gutter)); }
.section { padding-block: var(--space-8); }
.section + .section { border-top: 1px solid var(--rule); }
.stack > * + * { margin-top: var(--space-4); }

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: .98;
}
.h1 { font-family: var(--font-display); font-stretch: 118%; font-weight: 800; font-size: var(--t-2xl); letter-spacing: -.015em; line-height: 1.02; }
.h2 { font-family: var(--font-display); font-stretch: 112%; font-weight: 750; font-size: var(--t-xl); letter-spacing: -.01em; }
.h3 { font-family: var(--font-display); font-stretch: 105%; font-weight: 700; font-size: var(--t-lg); }
.lede { font-size: var(--t-lg); color: var(--ink-2); max-width: 52ch; line-height: 1.5; }
.muted { color: var(--ink-2); }
.quiet { color: var(--ink-3); font-size: var(--t-sm); }
.small { font-size: var(--t-sm); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--sheet);
  --btn-fg: var(--ink);
  --btn-bd: var(--rule-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--btn-bd); border-radius: var(--r-ctl);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: var(--t-md); line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { border-color: var(--ink-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .5; cursor: not-allowed; transform: none; }
.btn--primary {
  --btn-bg: var(--marigold); --btn-fg: var(--on-marigold); --btn-bd: var(--marigold);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14);
}
.btn--primary:hover { --btn-bg: #ffc41f; --btn-bd: #ffc41f; }
.btn--ink { --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-bd: var(--ink); }
.btn--ink:hover { --btn-bd: var(--ink); opacity: .92; }
.btn--ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn--ghost:hover { --btn-bg: var(--sheet); --btn-bd: var(--rule); }
.btn--danger { --btn-fg: var(--brick); }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: var(--t-sm); border-radius: 8px; }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: var(--t-lg); border-radius: 12px; }
.btn--block { width: 100%; }
.btn--icon { padding: 0; width: 38px; min-height: 38px; }
.btn--icon.btn--sm { width: 32px; min-height: 32px; }

.link-btn { background: none; border: 0; padding: 0; color: var(--cobalt); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.site-head.is-scrolled { border-bottom-color: var(--rule); }
.site-head__bar { display: flex; align-items: center; gap: var(--space-4); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__word { font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.nav { display: none; align-items: center; gap: 2px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 550; padding: 8px 12px; border-radius: 8px; font-size: var(--t-sm); }
.nav a:hover { color: var(--ink); background: var(--sheet); }
.nav a[aria-current='page'] { color: var(--ink); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
.head-actions { display: none; align-items: center; gap: var(--space-2); }
.credit-pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); padding: 6px 10px; border: 1px solid var(--rule); border-radius: var(--r-chip); text-decoration: none; }
.credit-pill b { color: var(--ink); }
.pro-pill { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pro-pill b { color: var(--marigold); }
.menu-btn { display: inline-flex; }
.mobile-nav {
  display: none; border-top: 1px solid var(--rule); background: var(--paper);
  padding: var(--space-3) var(--gutter) var(--space-5);
}
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: flex; align-items: center; gap: 10px; padding: 12px 4px; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--rule); }
.mobile-nav .btn { margin-top: var(--space-4); }
@media (min-width: 900px) {
  .nav, .head-actions { display: flex; }
  .menu-btn, .mobile-nav, .mobile-nav.is-open { display: none; }
  .brand { margin-right: var(--space-5); }
  .nav { margin-right: auto; }
}

/* ---------- Flash ---------- */
.flashes { padding-top: var(--space-4); display: grid; gap: var(--space-2); }
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--sheet); border: 1px solid var(--rule); font-weight: 500; }
.flash--success { border-color: color-mix(in srgb, var(--leaf) 40%, var(--rule)); background: var(--leaf-soft); }
.flash--error { border-color: color-mix(in srgb, var(--brick) 40%, var(--rule)); background: var(--brick-soft); }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--rule); margin-top: var(--space-8); padding-block: var(--space-7) var(--space-6); color: var(--ink-2); font-size: var(--t-sm); }
.foot-grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
.foot-grid h2 { font-size: var(--t-sm); font-family: var(--font-text); font-weight: 650; color: var(--ink); margin-bottom: var(--space-3); }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot-grid a { color: var(--ink-2); text-decoration: none; }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
.foot-grid .link-btn { color: var(--ink-2); text-decoration: none; font: inherit; text-align: left; }
.foot-grid .link-btn:hover { color: var(--ink); text-decoration: underline; }
.foot-base { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); justify-content: space-between; margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--rule); color: var(--ink-3); }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }

/* ---------- Cookie consent ---------- */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  max-width: 600px; margin-inline: auto;
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto;
  display: grid; gap: var(--space-3);
  padding: 16px 18px; border-radius: var(--r-panel);
  background: var(--ink); color: var(--paper); box-shadow: var(--lift-strong);
  font-size: var(--t-sm); line-height: 1.5;
}
.consent[hidden] { display: none; }
.consent:focus { outline: none; }
.consent__title { margin: 0; font-family: var(--font-display); font-stretch: 112%; font-weight: 750; font-size: var(--t-md); letter-spacing: -.01em; }
.consent p { margin: 0; }
.consent a { color: inherit; text-underline-offset: .18em; }
.consent__prefs { display: grid; gap: var(--space-2); margin: 0; padding: 0; border: 0; }
.consent__prefs[hidden] { display: none; }
.consent__opt {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start;
  padding: 10px 12px; border-radius: var(--r-ctl);
  background: color-mix(in srgb, var(--paper) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--paper) 16%, transparent);
  cursor: pointer;
}
.consent__opt input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--marigold); cursor: pointer; }
.consent__opt input:disabled { cursor: not-allowed; }
.consent__opt input:focus-visible { outline: 2px solid var(--marigold); outline-offset: 2px; }
.consent__opt b { display: block; font-weight: 650; }
.consent__opt small { display: block; opacity: .82; font-size: var(--t-xs); }
.consent__opt .ext { font-size: .72rem; background: transparent; color: inherit; border-color: color-mix(in srgb, var(--paper) 30%, transparent); }
.consent__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.consent__actions .btn { min-height: 40px; flex: 1 1 auto; }
.consent .btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--marigold); }
.consent .btn--ghost { color: var(--paper); }
.consent .btn--ghost:hover { --btn-bg: color-mix(in srgb, var(--paper) 12%, transparent); --btn-bd: transparent; }
@media (min-width: 560px) { .consent__actions .btn { flex: 0 0 auto; } }

/* ---------- Chips / badges / tags ---------- */
.ext {
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500; letter-spacing: 0;
  padding: 2px 7px; border-radius: 6px; background: var(--sheet-2); color: var(--ink-2);
  border: 1px solid var(--rule); white-space: nowrap;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); font-weight: 650; line-height: 1;
  padding: 7px 10px; border-radius: var(--r-chip);
  border: 1px solid transparent; white-space: nowrap;
}
.badge--local { color: var(--leaf); background: var(--leaf-soft); border-color: color-mix(in srgb, var(--leaf) 30%, transparent); }
.badge--server { color: var(--cobalt); background: var(--cobalt-soft); border-color: color-mix(in srgb, var(--cobalt) 30%, transparent); }
.badge--mixed { color: var(--ink-2); background: var(--sheet); border-color: var(--rule); }
.badge--pro { color: var(--on-marigold); background: var(--marigold); }
.badge--quiet { color: var(--ink-2); background: var(--sheet); border-color: var(--rule); }

/* ---------- Brand mark (inline SVG uses these) ---------- */
.mark-back { fill: none; stroke: currentColor; stroke-width: 2; opacity: .45; }
.mark-mid { fill: var(--paper); stroke: currentColor; stroke-width: 2; }
.mark-front { fill: var(--marigold); stroke: currentColor; stroke-width: 2; }
.mark-tick { fill: none; stroke: var(--on-marigold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   The tray: the drop zone used on home, tool pages and the pipeline builder
   ========================================================================== */
.tray {
  position: relative;
  border-radius: var(--r-tray);
  background: var(--sheet);
  box-shadow: var(--lift), inset 0 0 0 1px var(--rule);
  isolation: isolate;
}
.tray__zone {
  position: relative;
  display: grid; place-items: center; align-content: center; text-align: center;
  gap: var(--space-3);
  min-height: 240px;
  margin: 10px;
  padding: var(--space-6) var(--space-4);
  border-radius: calc(var(--r-tray) - 8px);
  border: 2px dashed var(--rule-strong);
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1.4px) 0 0 / 14px 14px,
    var(--sheet-2);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.tray__zone:hover { border-color: var(--ink-3); }
.tray__zone:focus-visible { border-color: var(--cobalt); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cobalt) 35%, transparent); border-radius: calc(var(--r-tray) - 8px); }
.tray.is-over .tray__zone { border-color: var(--marigold); border-style: solid; background-color: var(--marigold-soft); }
.tray__title { font-family: var(--font-display); font-stretch: 112%; font-weight: 750; font-size: var(--t-xl); letter-spacing: -.01em; }
.tray__hint { color: var(--ink-2); font-size: var(--t-sm); max-width: 44ch; margin: 0; }
.tray__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.tray__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tray--compact .tray__zone { min-height: 170px; padding: var(--space-5) var(--space-4); }
@media (min-width: 980px) { .tray--compact .tray__zone { min-height: 260px; } }
.tray:has(.files:not(:empty)) .tray__zone { min-height: 150px; }
.tray--compact .tray__title { font-size: var(--t-lg); }

/* the stack of sheets: the page's one illustration, built from type */
.sheets { position: relative; width: 210px; height: 108px; margin-bottom: 4px; }
.sheet {
  position: absolute; left: 50%; bottom: 0;
  width: 74px; height: 92px; margin-left: -37px;
  border-radius: 7px; background: var(--sheet);
  box-shadow: 0 0 0 1.5px var(--ink), 0 6px 14px -8px rgba(0, 0, 0, .35);
  display: flex; align-items: flex-end; justify-content: flex-start; padding: 7px;
  transform-origin: 50% 120%;
  transition: transform 320ms var(--ease);
}
.sheet::before {
  content: ''; position: absolute; left: 9px; right: 18px; top: 12px; height: 34px;
  background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--ink) 16%, transparent) 0 2px, transparent 2px 8px);
  border-radius: 2px;
}
.sheet span { position: relative; font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 1px 5px; border-radius: 4px; background: var(--ink); color: var(--paper); }
.sheet:nth-child(1) { transform: translateX(-66px) rotate(-10deg); }
.sheet:nth-child(2) { transform: translateX(-22px) rotate(-3.5deg); }
.sheet:nth-child(3) { transform: translateX(22px) rotate(3.5deg); }
.sheet:nth-child(4) { transform: translateX(66px) rotate(10deg); background: var(--marigold); }
.sheet:nth-child(4) span { background: var(--on-marigold); color: var(--marigold); }
.tray.is-over .sheet:nth-child(1) { transform: translate(-80px, -10px) rotate(-16deg); }
.tray.is-over .sheet:nth-child(2) { transform: translate(-27px, -18px) rotate(-6deg); }
.tray.is-over .sheet:nth-child(3) { transform: translate(27px, -18px) rotate(6deg); }
.tray.is-over .sheet:nth-child(4) { transform: translate(80px, -10px) rotate(16deg); }

/* ---------- Home hero ---------- */
.hero { padding-top: var(--space-7); padding-bottom: var(--space-7); }
.hero__grid { display: grid; gap: var(--space-6); }
.hero__title { font-size: var(--t-3xl); max-width: 17ch; }
.hero__title .line { display: block; }
.hero__title .line--muted { color: var(--ink-3); }
.hero__sub { margin-top: var(--space-4); }
.hero__facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin: var(--space-5) 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: var(--t-sm); }
.hero__facts li { display: inline-flex; align-items: center; gap: 6px; }
.hero__facts .i { color: var(--leaf); }
@media (min-width: 980px) {
  .hero { padding-top: var(--space-8); }
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--space-7); }
  .hero .tray__zone { min-height: 340px; }
}

/* matches panel after a drop on the home tray */
.matches { padding: 4px 18px 18px; }
.matches[hidden] { display: none; }
.matches__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); padding: 10px 2px 12px; border-bottom: 1px solid var(--rule); margin-bottom: 12px; }
.matches__head strong { font-family: var(--font-display); font-stretch: 110%; font-size: var(--t-lg); }
.matches__list { display: grid; gap: 6px; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 560px) { .matches__list { grid-template-columns: 1fr 1fr; } }
.match {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--sheet);
  color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 600; font-size: var(--t-sm);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.match:hover { border-color: var(--ink); text-decoration: none; }
.match .i { color: var(--ink-3); }
.match__where { margin-left: auto; color: var(--ink-3); display: inline-flex; }
.match__where.is-local { color: var(--leaf); }

/* ---------- Tool index (home) ---------- */
.index-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.group { display: grid; gap: var(--space-4); padding-block: var(--space-5); border-top: 1px solid var(--rule); }
.group:last-child { border-bottom: 1px solid var(--rule); }
.group__head { display: flex; align-items: baseline; gap: 10px; }
.group__head h3 { font-family: var(--font-display); font-stretch: 115%; font-weight: 750; font-size: var(--t-lg); }
.group__count { color: var(--ink-3); font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.group__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 2px 20px; }
@media (min-width: 620px) { .group__list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) {
  .group { grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-6); }
  .group__head { flex-direction: column; gap: 4px; position: sticky; top: 84px; align-self: start; }
  .group__list { grid-template-columns: 1fr 1fr 1fr; }
}
.tl {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 9px 10px; margin-inline: -10px; border-radius: 10px;
  color: var(--ink); text-decoration: none;
}
.tl:hover { background: var(--sheet); text-decoration: none; box-shadow: inset 0 0 0 1px var(--rule); }
.tl__icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); }
.tl:hover .tl__icon { background: var(--marigold); color: var(--on-marigold); box-shadow: none; }
.tl__name { font-weight: 600; line-height: 1.25; }
.tl__desc { display: block; font-weight: 400; color: var(--ink-3); font-size: var(--t-xs); line-height: 1.35; margin-top: 2px; }
.tl__where { color: var(--ink-3); }
.tl__where.is-local { color: var(--leaf); }

/* ---------- Pipeline pitch ---------- */
.pitch { display: grid; gap: var(--space-6); }
@media (min-width: 980px) { .pitch { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: var(--space-8); } }
.chain { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.chain li {
  position: relative; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px; background: var(--sheet); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--rule);
}
.chain li + li { margin-top: 18px; }
.chain li + li::before {
  content: ''; position: absolute; left: 33px; top: -19px; height: 20px; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--ink-3) 0 3px, transparent 3px 6px);
}
.chain__n { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--ink); color: var(--paper); font-family: var(--font-display); font-weight: 800; font-stretch: 120%; }
.chain__t { font-weight: 650; }
.chain__p { display: block; color: var(--ink-3); font-size: var(--t-xs); font-family: var(--font-mono); }
.chain__out { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; padding: 14px; border-radius: 12px; background: var(--marigold); color: var(--on-marigold); font-weight: 650; align-items: center; }
.chain__out .ext { background: rgba(255, 255, 255, .55); color: var(--on-marigold); border-color: transparent; }

.presets { display: grid; gap: var(--space-3); grid-template-columns: 1fr; margin-top: var(--space-6); }
@media (min-width: 620px) { .presets { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .presets { grid-template-columns: 1fr 1fr 1fr; } }
.preset {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 18px 18px 16px; border-radius: var(--r-panel);
  background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule);
  color: var(--ink); text-decoration: none;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.preset::after { /* ticket notch */
  content: ''; position: absolute; right: 18px; top: -1px; width: 22px; height: 11px;
  border-radius: 0 0 11px 11px; background: var(--paper); box-shadow: inset 0 -1px 0 var(--rule), inset 1px 0 0 var(--rule), inset -1px 0 0 var(--rule);
}
.preset:hover { box-shadow: inset 0 0 0 1.5px var(--ink); text-decoration: none; }
.preset h3 { font-family: var(--font-display); font-stretch: 112%; font-weight: 750; font-size: var(--t-lg); }
.preset p { margin: 0; color: var(--ink-2); font-size: var(--t-sm); }
.steps-mini { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: auto; padding-top: 6px; }
.steps-mini span { font-size: var(--t-xs); font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--sheet-2); box-shadow: inset 0 0 0 1px var(--rule); }
.steps-mini .i { width: 12px; height: 12px; color: var(--ink-3); }

/* ---------- Privacy strip ---------- */
.privacy { background: var(--ink); color: var(--paper); }
.privacy .wrap { display: grid; gap: var(--space-5); padding-block: var(--space-7); }
.privacy h2 { color: var(--paper); }
.privacy p { color: color-mix(in srgb, var(--paper) 78%, transparent); margin: 0; max-width: 58ch; }
.privacy__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.privacy__list li { display: flex; gap: 10px; align-items: flex-start; }
.privacy__list .i { color: var(--marigold); margin-top: 3px; }
@media (min-width: 900px) { .privacy .wrap { grid-template-columns: 1fr 1fr; align-items: center; gap: var(--space-8); } }
@media (prefers-color-scheme: dark) { .privacy { background: #0b0c0f; border-block: 1px solid var(--rule); } }

/* ---------- Pricing (teaser + page) ---------- */
.plans { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 860px) { .plans { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }
.plan {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-5); border-radius: var(--r-panel);
  background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule);
}
.plan--pro { box-shadow: inset 0 0 0 2px var(--ink), var(--lift); }
.plan__name { font-family: var(--font-display); font-stretch: 115%; font-weight: 800; font-size: var(--t-xl); }
.plan__price { font-family: var(--font-display); font-stretch: 100%; font-weight: 800; font-size: var(--t-2xl); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan__price small { font-family: var(--font-text); font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); letter-spacing: 0; margin-left: 4px; }
.plan__note { color: var(--ink-3); font-size: var(--t-sm); min-height: 1.5em; margin: 0; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--t-sm); }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; }
.plan li .i { margin-top: 2px; color: var(--leaf); width: 16px; height: 16px; }
.plan li.is-no { color: var(--ink-3); }
.plan li.is-no .i { color: var(--ink-3); }
.plan .btn { margin-top: auto; }
.plan form { margin-top: auto; }

.toggle { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); gap: 2px; }
.toggle button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 600; cursor: pointer; color: var(--ink-2); font-size: var(--t-sm); }
.toggle button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.save-note { color: var(--leaf); font-weight: 650; font-size: var(--t-xs); margin-left: 4px; }

.packs { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 720px) { .packs { grid-template-columns: repeat(3, 1fr); } }
.pack { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 16px 18px; border-radius: var(--r-panel); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
.pack__n { font-family: var(--font-display); font-weight: 800; font-stretch: 110%; font-size: var(--t-xl); line-height: 1; font-variant-numeric: tabular-nums; }
.pack__per { color: var(--ink-3); font-size: var(--t-xs); }

.cmp { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.cmp th, .cmp td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.cmp thead th { font-family: var(--font-display); font-stretch: 110%; font-size: var(--t-md); position: sticky; top: 64px; background: var(--paper); }
.cmp tbody th { font-weight: 600; color: var(--ink); width: 34%; }
.cmp td { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-panel); }

/* ==========================================================================
   Tool page
   ========================================================================== */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--t-sm); color: var(--ink-3); padding-top: var(--space-5); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .i { width: 14px; height: 14px; }
.tool-head { display: grid; gap: var(--space-3); padding-block: var(--space-4) var(--space-5); }
.tool-head h1 { font-size: var(--t-2xl); }
.tool-head .lede { font-size: var(--t-md); }
.tool-head__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: var(--space-4); padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a {
  flex: none; border: 0; background: transparent; color: var(--ink-2); padding: 9px 13px; border-radius: 9px;
  font-weight: 600; font-size: var(--t-sm); cursor: pointer; text-decoration: none; box-shadow: inset 0 0 0 1px var(--rule);
}
.tabs [aria-selected='true'] { background: var(--ink); color: var(--paper); box-shadow: none; }

.bench { display: grid; gap: var(--space-4); align-items: start; }
@media (min-width: 980px) {
  .bench { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--space-5); }
  .bench__side { position: sticky; top: 84px; }
}
.panel { background: var(--sheet); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--rule); padding: var(--space-4); }
.panel + .panel { margin-top: var(--space-3); }
.panel__title { font-family: var(--font-display); font-stretch: 110%; font-weight: 750; font-size: var(--t-md); margin-bottom: var(--space-3); display: flex; align-items: center; gap: 8px; }

/* file list */
.files { list-style: none; margin: 0; padding: 0; }
.files:empty { display: none; }
.files__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 12px 18px 8px; }
.files__bar[hidden] { display: none; }
.files__sum { font-size: var(--t-sm); color: var(--ink-2); }
.files__sum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.file {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 12px;
  padding: 10px 18px; border-top: 1px solid var(--rule);
  transition: background-color var(--dur) var(--ease);
}
.file:last-child { border-radius: 0 0 var(--r-tray) var(--r-tray); }
.file[draggable='true'] { cursor: grab; }
.file.is-dragging { opacity: .45; }
.file.is-drop-before { box-shadow: inset 0 3px 0 var(--marigold); }
.file__grip { color: var(--ink-3); display: none; }
.files.is-sortable .file { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.files.is-sortable .file__grip { display: inline-flex; }
.file__icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--sheet-2); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); overflow: hidden; }
.file__icon img { width: 100%; height: 100%; object-fit: cover; }
.file__name { font-family: var(--font-mono); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; }
.file__meta .where { display: inline-flex; align-items: center; gap: 4px; }
.file__meta .where.is-local { color: var(--leaf); }
.file__meta .where.is-server { color: var(--cobalt); }
.file__err { color: var(--brick); font-size: var(--t-xs); margin-top: 3px; font-weight: 500; }
.file__end { display: flex; align-items: center; gap: 6px; }
.file__status { font-size: var(--t-xs); font-weight: 650; color: var(--ink-3); display: inline-flex; align-items: center; gap: 5px; }
.file__status.is-done { color: var(--leaf); }
.file__status.is-error { color: var(--brick); }
.file__bar { position: absolute; left: 0; bottom: -1px; height: 2px; background: var(--marigold); width: 0; transition: width 300ms var(--ease); }
.file.is-error { background: color-mix(in srgb, var(--brick-soft) 55%, transparent); }
.outs { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.files.is-sortable .outs { grid-column: 3 / -1; }
.out {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 6px 10px; border-radius: 8px; font-size: var(--t-xs); font-weight: 600;
  background: var(--leaf-soft); color: var(--leaf); text-decoration: none; border: 1px solid color-mix(in srgb, var(--leaf) 30%, transparent);
}
.out:hover { text-decoration: none; border-color: var(--leaf); }
.out span { font-family: var(--font-mono); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }
.out em { font-style: normal; opacity: .8; font-variant-numeric: tabular-nums; }
.out--more { background: var(--sheet-2); color: var(--ink-2); border-color: var(--rule); }

/* options form */
.opts { display: grid; gap: var(--space-4); }
.field { display: grid; gap: 6px; }
.field > label, .field > .field__label { font-weight: 600; font-size: var(--t-sm); }
.field__help { font-size: var(--t-xs); color: var(--ink-3); margin: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--r-ctl);
  font-size: var(--t-md); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input:hover, .select:hover { border-color: var(--ink-3); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { border-color: var(--cobalt); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cobalt) 25%, transparent); border-radius: var(--r-ctl); }
.input[aria-invalid='true'] { border-color: var(--brick); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.input--mono { font-family: var(--font-mono); font-size: .9rem; }
.num-row { display: grid; grid-template-columns: 1fr 88px; gap: 10px; align-items: center; }
input[type='range'] { width: 100%; accent-color: var(--ink); height: 28px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 11px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.seg label { position: relative; flex: 1 1 auto; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 7px 10px; border-radius: 8px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { box-shadow: var(--focus); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-weight: 600; font-size: var(--t-sm); }
.switch input { appearance: none; flex: none; width: 42px; height: 24px; border-radius: 99px; background: var(--rule-strong); position: relative; cursor: pointer; transition: background-color var(--dur) var(--ease); margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--sheet); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform var(--dur) var(--ease); }
.switch input:checked { background: var(--leaf); }
.switch input:checked::after { transform: translateX(18px); }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type='color'] { width: 42px; height: 42px; padding: 3px; border-radius: var(--r-ctl); border: 1px solid var(--rule-strong); background: var(--paper); cursor: pointer; }

.run { display: grid; gap: var(--space-3); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--rule); }
.run__where { display: flex; gap: 8px; align-items: flex-start; font-size: var(--t-xs); color: var(--ink-2); }
.run__where .i { margin-top: 1px; }
.run__where.is-local .i { color: var(--leaf); }
.run__where.is-server .i { color: var(--cobalt); }
.run__cost { font-size: var(--t-sm); font-weight: 600; }

/* notices (402/413 upgrade prompts, errors) */
.notice { display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; font-size: var(--t-sm); background: var(--sheet-2); box-shadow: inset 0 0 0 1px var(--rule); }
.notice[hidden] { display: none; }
.notice p { margin: 0; }
.notice__title { font-weight: 700; display: flex; gap: 8px; align-items: center; }
.notice__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.notice--upgrade { background: var(--marigold-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--marigold) 60%, transparent); }
.notice--error { background: var(--brick-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brick) 35%, transparent); }
.notice--error .notice__title { color: var(--brick); }
.notice--ok { background: var(--leaf-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--leaf) 35%, transparent); }

.results-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--rule); background: var(--sheet-2); border-radius: 0 0 var(--r-tray) var(--r-tray); }
.results-bar[hidden] { display: none; }

.siblings { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-5); }
.siblings a { font-size: var(--t-sm); padding: 6px 11px; border-radius: 8px; color: var(--ink-2); text-decoration: none; box-shadow: inset 0 0 0 1px var(--rule); }
.siblings a:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }

.ad-slot { margin-block: var(--space-5); min-height: 0; }

/* ---------- Guide ---------- */
.guide { display: grid; gap: var(--space-6); padding-top: var(--space-8); }
@media (min-width: 980px) { .guide { grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-8); } }
.toc { font-size: var(--t-sm); }
.toc__title { font-weight: 700; margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--marigold); font-weight: 600; }
@media (min-width: 980px) { .toc { position: sticky; top: 88px; align-self: start; } }
@media (max-width: 979px) { .toc { padding: 14px 16px; background: var(--sheet); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--rule); } }

.prose { max-width: var(--measure); font-size: 1.0625rem; line-height: 1.7; }
.prose > * { margin-bottom: 0; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-family: var(--font-display); font-stretch: 110%; font-weight: 750; font-size: var(--t-xl); letter-spacing: -.01em; margin-top: 2em; margin-bottom: 0; }
.prose h2 + * { margin-top: .6em; }
.prose h3 { font-weight: 700; font-size: var(--t-lg); margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0; }
.prose li + li { margin-top: .35em; }
.prose ol { counter-reset: li; list-style: none; padding-left: 0; }
.prose ol > li { counter-increment: li; position: relative; padding-left: 2.4em; }
.prose ol > li::before { content: counter(li); position: absolute; left: 0; top: .1em; width: 1.7em; height: 1.7em; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font-weight: 700; font-size: .8em; }
.prose code { background: var(--sheet); padding: .1em .35em; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--rule); font-size: .85em; }
.prose table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 8px 10px; text-align: left; }
.prose blockquote { margin: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--marigold); color: var(--ink-2); }
.prose a { word-break: break-word; }

.faq { margin-top: 2.2em; }
.faq h2 { margin-bottom: .6em; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 2px; font-weight: 650; font-size: var(--t-md); line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--ink-3); transition: transform var(--dur) var(--ease); }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq summary:focus-visible { border-radius: 6px; }
.faq__a { padding: 0 2px 18px; color: var(--ink-2); }
.faq__a > * + * { margin-top: .8em; }

/* ==========================================================================
   Pipeline builder
   ========================================================================== */
.pb { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 1040px) { .pb { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--space-6); } .pb__side { position: sticky; top: 84px; } }
.pb-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.step {
  position: relative; background: var(--sheet); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--rule);
  transition: box-shadow var(--dur) var(--ease), transform 220ms var(--ease);
}
.step + .step { margin-top: 26px; }
.step + .step::before {
  content: ''; position: absolute; left: 35px; top: -27px; height: 28px; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--ink-3) 0 3px, transparent 3px 6px);
}
.step.is-invalid { box-shadow: inset 0 0 0 1.5px var(--brick); }
.step__head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 14px 12px; }
.step__n { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; background: var(--ink); color: var(--paper); font-family: var(--font-display); font-weight: 800; font-stretch: 120%; font-size: var(--t-lg); }
.step__pick { display: grid; gap: 6px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .step__pick { grid-template-columns: 1fr 1fr; } }
.step__tools { display: flex; gap: 2px; }
.step__body { padding: 4px 14px 16px 70px; }
@media (max-width: 619px) { .step__body { padding-left: 14px; } }
.step__body .opts { grid-template-columns: 1fr; }
@media (min-width: 720px) { .step__body .opts { grid-template-columns: 1fr 1fr; } }
.step__warn { font-size: var(--t-xs); color: var(--brick); padding: 0 14px 12px 70px; margin: 0; }
.step-add { margin-top: 26px; position: relative; }
.step-add::before { content: ''; position: absolute; left: 35px; top: -27px; height: 28px; width: 2px; background: repeating-linear-gradient(to bottom, var(--rule-strong) 0 3px, transparent 3px 6px); }
.step-add .btn { border-style: dashed; }

.rename-ex { font-family: var(--font-mono); font-size: .82rem; color: var(--ink-2); background: var(--sheet-2); border-radius: 8px; padding: 8px 10px; box-shadow: inset 0 0 0 1px var(--rule); overflow-wrap: anywhere; }
.rename-ex b { color: var(--ink); font-weight: 600; }
.tokens { display: flex; flex-wrap: wrap; gap: 4px; }
.tokens button { font-family: var(--font-mono); font-size: .78rem; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--rule); background: var(--sheet-2); cursor: pointer; color: var(--ink-2); }
.tokens button:hover { color: var(--ink); border-color: var(--ink-3); }

.preset-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.preset-list button, .preset-list .pl-row {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 9px 10px; border-radius: 9px; border: 1px solid var(--rule); background: var(--paper); cursor: pointer; font-weight: 600; font-size: var(--t-sm);
}
.preset-list button:hover { border-color: var(--ink); }
.preset-list small { display: block; font-weight: 400; color: var(--ink-3); font-size: var(--t-xs); }
.preview { display: grid; gap: 8px; }
.preview[hidden] { display: none; }
.preview__img { border-radius: 10px; background: repeating-conic-gradient(var(--sheet-2) 0 25%, var(--sheet) 0 50%) 0 0 / 16px 16px; box-shadow: inset 0 0 0 1px var(--rule); max-height: 220px; width: 100%; object-fit: contain; }

/* ==========================================================================
   Docs
   ========================================================================== */
.docs { display: grid; gap: var(--space-6); padding-top: var(--space-6); }
@media (min-width: 1000px) { .docs { grid-template-columns: 250px minmax(0, 1fr); gap: var(--space-7); } }
.docs-nav { font-size: var(--t-sm); }
@media (min-width: 1000px) { .docs-nav { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 8px; } }
@media (max-width: 999px) { .docs-nav { background: var(--sheet); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--rule); padding: 8px 14px; } .docs-nav > details > summary { cursor: pointer; font-weight: 700; padding: 8px 0; } }
.docs-nav ol, .docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: 4px 8px; margin-left: -8px; border-radius: 6px; color: var(--ink-2); text-decoration: none; }
.docs-nav a:hover { color: var(--ink); background: var(--sheet); }
.docs-nav .dn-group { font-weight: 700; color: var(--ink); margin-top: 14px; display: block; padding: 4px 0; }
.docs-nav .dn-sub a { padding-left: 16px; font-size: var(--t-xs); }
.docs-main { min-width: 0; }
.docs-main > section { padding-bottom: var(--space-6); }
.docs-main h2 { margin: var(--space-6) 0 var(--space-3); }
.endpoint { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.verb { font-family: var(--font-mono); font-size: .75rem; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--cobalt-soft); color: var(--cobalt); }
.verb--post { background: var(--marigold-soft); color: var(--marigold-ink); }
.endpoint code { overflow-wrap: anywhere; }
.endpoint p { grid-column: 2; margin: 0; color: var(--ink-2); font-size: var(--t-sm); }
.act { padding: var(--space-5) 0; border-top: 1px solid var(--rule); }
.act h4 { font-size: var(--t-lg); font-family: var(--font-display); font-stretch: 108%; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; }
.act h4 code { font-family: var(--font-mono); font-size: .8rem; font-weight: 500; color: var(--ink-2); }
.act > p { color: var(--ink-2); margin: 6px 0 12px; }
.ptable { width: 100%; border-collapse: collapse; font-size: var(--t-sm); margin-bottom: var(--space-4); }
.ptable th, .ptable td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ptable th { font-weight: 650; color: var(--ink-2); font-size: var(--t-xs); }
.ptable td code { font-size: .8rem; }
.code { position: relative; border-radius: 12px; background: #16181d; color: #e8e9e4; overflow: hidden; }
@media (prefers-color-scheme: dark) { .code { background: #0c0d10; box-shadow: inset 0 0 0 1px var(--rule); } }
.code__tabs { display: flex; gap: 2px; padding: 6px 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.code__tabs button { background: transparent; border: 0; color: rgba(255, 255, 255, .6); padding: 8px 12px; font-size: var(--t-xs); font-weight: 600; cursor: pointer; border-radius: 7px 7px 0 0; }
.code__tabs button[aria-selected='true'] { color: #fff; background: rgba(255, 255, 255, .08); box-shadow: inset 0 -2px 0 var(--marigold); }
.code__tabs .copy { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-size: .8rem; line-height: 1.6; tab-size: 4; }
.code pre[hidden] { display: none; }
.docs-intro { display: grid; gap: var(--space-4); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: var(--t-sm); margin: 0; }
.kv dt { font-weight: 650; }
.kv dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }

/* ==========================================================================
   Account
   ========================================================================== */
.acct { display: grid; gap: var(--space-5); padding-top: var(--space-5); }
@media (min-width: 980px) { .acct { grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-7); } }
.acct-nav { font-size: var(--t-sm); }
@media (min-width: 980px) { .acct-nav { position: sticky; top: 84px; align-self: start; } }
.acct-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; }
@media (min-width: 980px) { .acct-nav ul { display: grid; } }
.acct-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; white-space: nowrap; font-weight: 600; }
.acct-nav a:hover { background: var(--sheet); color: var(--ink); }
.acct-main > section { padding: var(--space-5) 0; border-top: 1px solid var(--rule); }
.acct-main > section:first-child { border-top: 0; padding-top: 0; }
.acct-main h2 { margin-bottom: var(--space-4); }
.who { display: flex; gap: 14px; align-items: center; }
.who img { width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 0 0 2px var(--sheet), 0 0 0 3px var(--rule); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 14px 16px; border-radius: 12px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
.stat__v { font-family: var(--font-display); font-weight: 800; font-stretch: 105%; font-size: var(--t-xl); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat__l { font-size: var(--t-xs); color: var(--ink-3); margin-top: 4px; }
.meter { height: 6px; border-radius: 99px; background: var(--rule); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: inherit; }
.rows { list-style: none; margin: 0; padding: 0; border-radius: var(--r-panel); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; align-items: center; border-top: 1px solid var(--rule); font-size: var(--t-sm); }
.rows li:first-child { border-top: 0; }
.rows .sub { color: var(--ink-3); font-size: var(--t-xs); }
.rows .plus { color: var(--leaf); font-weight: 700; font-variant-numeric: tabular-nums; }
.rows .minus { color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.rows .empty { display: block; color: var(--ink-3); }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--t-xs); }
.status-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.status-dot.is-done::before { background: var(--leaf); }
.status-dot.is-error::before { background: var(--brick); }
.status-dot.is-running::before { background: var(--marigold); }
.keybox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.keybox code { flex: 1 1 260px; padding: 10px 12px; border-radius: 9px; background: var(--sheet-2); box-shadow: inset 0 0 0 1px var(--rule); overflow-wrap: anywhere; font-size: .8rem; }
.form-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 860px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-card { padding: var(--space-5); border-radius: var(--r-panel); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); display: grid; gap: var(--space-3); align-content: start; }
.form-card h3 { font-size: var(--t-md); font-weight: 700; }
.form-card--danger { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brick) 45%, var(--rule)); }

/* ==========================================================================
   Auth
   ========================================================================== */
.auth { display: grid; place-items: start center; padding-block: var(--space-7); }
.auth-card { width: 100%; max-width: 420px; padding: var(--space-6) var(--space-5); border-radius: var(--r-tray); background: var(--sheet); box-shadow: var(--lift), inset 0 0 0 1px var(--rule); display: grid; gap: var(--space-4); }
.auth-card h1 { font-size: var(--t-2xl); }
.auth-card form { display: grid; gap: var(--space-4); }
.btn-google { --btn-bg: var(--paper); gap: 10px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: var(--t-xs); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
.auth-foot { text-align: center; font-size: var(--t-sm); color: var(--ink-2); margin: 0; }
.errors { padding: 12px 14px; border-radius: var(--r-ctl); background: var(--brick-soft); color: var(--brick); font-size: var(--t-sm); font-weight: 500; }
.errors p { margin: 0; }
.errors p + p { margin-top: 4px; }

/* ---------- Legal / 404 ---------- */
.legal { padding-block: var(--space-6); }
.legal h1 { font-size: var(--t-2xl); margin-bottom: var(--space-3); }
.legal h2 { font-family: var(--font-display); font-stretch: 108%; font-size: var(--t-lg); margin-top: 2em; }
.legal .updated { color: var(--ink-3); font-size: var(--t-sm); }
.lost { padding-block: var(--space-9); display: grid; gap: var(--space-4); justify-items: start; }
.lost__code { font-family: var(--font-display); font-stretch: 125%; font-weight: 900; font-size: clamp(5rem, 3rem + 10vw, 11rem); line-height: .85; letter-spacing: -.04em; -webkit-text-stroke: 2px var(--ink); color: transparent; }

/* ---------- Utilities ---------- */
.row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.row--between { justify-content: space-between; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-0 { margin-bottom: 0; }
[hidden] { display: none !important; }

/* ---------- Motion ---------- */
@keyframes deal {
  from { opacity: 0; transform: translateY(-14px) rotate(-2deg); }
  to { opacity: 1; transform: none; }
}
.file.is-new { animation: deal 360ms var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes pop { 0% { transform: scale(.96); opacity: 0; } 100% { transform: none; opacity: 1; } }
.out { animation: pop 220ms var(--ease) both; }
.notice:not([hidden]) { animation: pop 200ms var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .spin { animation: none !important; }
}

@media print {
  .site-head, .site-foot, .consent, .tray, .bench__side { display: none !important; }
  body { background: #fff; color: #000; }
}

/* phones: the tool index shows names only */
@media (max-width: 619px) {
  .tl__desc { display: none; }
  .tl { padding-block: 8px; }
  .group__list { grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .tl { gap: 8px; margin-inline: -6px; padding-inline: 6px; }
  .tl .tl__where .i { width: 14px; height: 14px; }
  .tl__icon { width: 28px; height: 28px; }
  .tl__name { font-size: var(--t-sm); }
}
.tray__title { margin: 0; }
@media (max-width: 619px) {
  .hero { padding-top: var(--space-5); }
  .hero .lede { font-size: var(--t-md); }
  .hero__facts { gap: 4px 14px; margin-top: var(--space-4); }
  .hero__grid { gap: var(--space-5); }
  .tray__zone { min-height: 200px; }
}
.btn--ink[disabled] { background: var(--rule-strong); border-color: var(--rule-strong); color: var(--ink-2); opacity: 1; }
.plan p, .pack p, .preset p, .stat p { margin: 0; }
.docs-nav a.dn-group { margin-left: 0; padding-left: 0; }
.docs-nav .dn-group:hover { background: none; }
.docs-main h2 { margin-top: var(--space-4); }
.docs-main > section + section { border-top: 1px solid var(--rule); padding-top: var(--space-5); }
.who h1 { overflow-wrap: anywhere; }

/* Legal and docs tables */
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th, .table td { text-align: left; vertical-align: top; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
.table th { font-family: var(--font-display); font-stretch: 108%; font-weight: 600; color: var(--ink-2); }
.table code { font-family: var(--font-mono); font-size: .85em; }
