/* ==========================================================================
   ConvoAll - design system
   Hand-written. No frameworks, no CDNs, no remote fonts.
   Order: tokens -> reset -> type -> layout -> surfaces -> controls ->
          forms -> feedback -> chrome (header/footer) -> utilities
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* brand */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-ink: #312e81;

  /* neutrals */
  --bg:           #f6f7fc;
  --bg-elevated:  #ffffff;
  --surface:      #ffffff;
  --surface-2:    #f2f4fa;
  --surface-3:    #e9ecf6;
  --surface-sunk: #f8f9fd;

  --text:       #101828;
  --text-soft:  #454f63;
  --text-muted: #667085;
  --text-faint: #98a2b3;
  --text-onbrand: #ffffff;

  --border:        #e5e8f0;
  --border-strong: #d4d9e6;
  --border-brand:  #c7d2fe;

  /* semantic */
  --success:      #067647;
  --success-soft: #e7f6ee;
  --success-line: #a9dcbf;
  --warning:      #b54708;
  --warning-soft: #fdf3e6;
  --warning-line: #f2cc94;
  --danger:       #b42318;
  --danger-soft:  #fdeceb;
  --danger-line:  #f3b7b2;
  --info-soft:    #eaf1ff;

  /* accent hook - pages and cards override this per category */
  --accent: var(--brand-600);

  /* elevation */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.07), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 10px 26px -12px rgba(16, 24, 40, 0.20), 0 2px 8px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 28px 56px -22px rgba(16, 24, 40, 0.28), 0 6px 16px rgba(16, 24, 40, 0.06);
  --shadow-brand: 0 14px 32px -14px rgba(79, 70, 229, 0.55);

  /* geometry */
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-pill: 999px;
  --radius: var(--radius-md);

  /* rhythm */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --section-y: clamp(2.75rem, 1.5rem + 4vw, 5.5rem);

  /* type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --step--2: clamp(0.72rem, 0.70rem + 0.08vw, 0.78rem);
  --step--1: clamp(0.80rem, 0.78rem + 0.10vw, 0.875rem);
  --step-0:  clamp(0.94rem, 0.92rem + 0.12vw, 1.00rem);
  --step-1:  clamp(1.05rem, 1.00rem + 0.25vw, 1.18rem);
  --step-2:  clamp(1.22rem, 1.13rem + 0.45vw, 1.45rem);
  --step-3:  clamp(1.45rem, 1.28rem + 0.85vw, 1.90rem);
  --step-4:  clamp(1.75rem, 1.42rem + 1.55vw, 2.55rem);
  --step-5:  clamp(2.10rem, 1.50rem + 2.60vw, 3.35rem);
  --step-6:  clamp(2.50rem, 1.60rem + 4.00vw, 4.25rem);

  /* chrome */
  --w-page: 1200px;
  --w-wide: 1360px;
  --w-narrow: 720px;
  --header-h: 66px;
  --z-header: 40;
  --z-panel: 60;
  --z-toast: 80;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 380ms;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg:           #080b18;
  --bg-elevated:  #0f1428;
  --surface:      #0f1428;
  --surface-2:    #161c36;
  --surface-3:    #1d2444;
  --surface-sunk: #0b1022;

  --text:       #eef1fb;
  --text-soft:  #c3cae2;
  --text-muted: #98a2c0;
  --text-faint: #717c9c;

  --border:        #232b4c;
  --border-strong: #2f3862;
  --border-brand:  #3d47a0;

  --brand-50:  #171c3d;
  --brand-100: #1d2450;
  --brand-200: #2b3472;
  --brand-ink: #dbe0ff;

  --success-soft: #0d2a20;
  --success-line: #1f5c42;
  --warning-soft: #2b1f0c;
  --warning-line: #6b4a12;
  --danger-soft:  #2d1512;
  --danger-line:  #7a3129;
  --info-soft:    #131c3c;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 14px 30px -16px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 34px 60px -26px rgba(0, 0, 0, 0.9), 0 8px 20px rgba(0, 0, 0, 0.5);
  --shadow-brand: 0 16px 36px -18px rgba(99, 102, 241, 0.75);
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { max-width: 100%; display: block; }
svg { flex: none; }

h1, h2, h3, h4, h5 { margin: 0 0 0.5em; line-height: 1.18; letter-spacing: -0.018em; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li { margin-bottom: 0.35em; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-8) 0; }
strong, b { font-weight: 650; }
small { font-size: var(--step--1); }
code, kbd, samp { font-family: var(--font-mono); font-size: 0.92em; }
[hidden] { display: none !important; }

a { color: var(--brand-700); text-decoration-color: color-mix(in srgb, var(--brand-600) 40%, transparent); text-underline-offset: 2px; }
a:hover { color: var(--brand-600); text-decoration-color: currentColor; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus-ring, var(--brand-500)) 65%, transparent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
::selection { background: color-mix(in srgb, var(--brand-500) 28%, transparent); }

/* --------------------------------------------------------------------------
   3. Typography helpers
   -------------------------------------------------------------------------- */
.display { font-size: var(--step-6); letter-spacing: -0.03em; line-height: 1.05; }
.h1 { font-size: var(--step-5); letter-spacing: -0.025em; line-height: 1.1; }
.h2 { font-size: var(--step-4); }
.h3 { font-size: var(--step-3); }
.h4 { font-size: var(--step-2); }
.lede { font-size: var(--step-1); color: var(--text-soft); line-height: 1.6; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.tight { line-height: 1.35; }
.mono { font-family: var(--font-mono); font-size: var(--step--1); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--step--1); font-weight: 650; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand-600);
}
.section-title { font-size: var(--step-3); margin-bottom: var(--sp-2); }
.section-sub { color: var(--text-muted); max-width: 62ch; margin-bottom: var(--sp-8); }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.page-shell { display: flex; flex-direction: column; min-height: 100vh; }
.page-shell > main { flex: 1 0 auto; }

.container { width: 100%; max-width: var(--w-page); margin-inline: auto; padding-inline: clamp(1rem, 0.5rem + 2vw, 2rem); }
.container--wide { max-width: var(--w-wide); }
.container--narrow { max-width: var(--w-narrow); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2rem, 1rem + 3vw, 3.5rem); }
.section--sunk { background: var(--surface-sunk); border-block: 1px solid var(--border); }
.section--panel { background: var(--surface); border-block: 1px solid var(--border); }

.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.stack--sm { gap: var(--sp-2); }
.stack--lg { gap: var(--sp-6); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.cluster--between { justify-content: space-between; }
.center { text-align: center; }
.center-x { margin-inline: auto; }
.section-head { max-width: 66ch; margin-bottom: var(--sp-8); }
.section-head--center { margin-inline: auto; text-align: center; }

.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid--tools { gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr)); }
.grid--cats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid--tight { gap: var(--sp-3); }

.split { display: grid; gap: clamp(1.5rem, 1rem + 3vw, 3rem); }
@media (min-width: 1000px) {
  .split--tool { grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr); align-items: start; }
  .split--sidebar-right > :last-child { position: sticky; top: calc(var(--header-h) + 1.25rem); }
}

/* --------------------------------------------------------------------------
   5. Surfaces
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-6);
}
.card--flush { padding: 0; overflow: hidden; }
.card--sunk { background: var(--surface-2); box-shadow: none; }
.card--raised { box-shadow: var(--shadow-md); }
.card--accent { border-top: 3px solid var(--accent); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.15rem, 0.9rem + 1vw, 1.75rem);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 420px at 12% -10%, color-mix(in srgb, var(--brand-500) 22%, transparent), transparent 70%),
    radial-gradient(900px 380px at 92% 0%, color-mix(in srgb, #a855f7 18%, transparent), transparent 65%),
    var(--surface-sunk);
  border-bottom: 1px solid var(--border);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.35;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.icon-tile--sm { width: 34px; height: 34px; border-radius: var(--radius-sm); }
.icon-tile--lg { width: 58px; height: 58px; border-radius: var(--radius-lg); }
.icon-tile--solid { background: var(--accent); color: #fff; border-color: transparent; }

.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 1em; height: 1em; }
.icon--lg { width: 1.5em; height: 1.5em; }
.icon--xl { width: 2em; height: 2em; stroke-width: 1.5; }

/* --------------------------------------------------------------------------
   6. Tool card
   -------------------------------------------------------------------------- */
.tool-card {
  position: relative;
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  color: inherit;
  text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tool-card::before {
  content: "";
  position: absolute; inset-inline: var(--sp-5); top: 0; height: 3px;
  border-radius: 0 0 var(--radius-pill) var(--radius-pill);
  background: var(--accent);
  opacity: 0; transform: scaleX(0.4);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tool-card:hover, .tool-card:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  box-shadow: var(--shadow-md);
  color: inherit;
}
.tool-card:hover::before, .tool-card:focus-visible::before { opacity: 1; transform: scaleX(1); }
.tool-card__title { font-size: var(--step-1); font-weight: 660; margin: 0; color: var(--text); }
.tool-card__tagline { margin: 0; color: var(--text-muted); font-size: var(--step--1); line-height: 1.55; }
.tool-card__meta { margin-top: auto; display: flex; align-items: center; gap: 0.4rem; font-size: var(--step--2); color: var(--text-faint); }
.tool-card__arrow { margin-left: auto; color: var(--accent); opacity: 0; transform: translateX(-4px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.tool-card:hover .tool-card__arrow, .tool-card:focus-visible .tool-card__arrow { opacity: 1; transform: translateX(0); }

.category-card {
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--surface)) 0%, var(--surface) 62%);
  color: inherit; text-decoration: none;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.category-card:hover, .category-card:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.category-card__label { font-weight: 660; font-size: var(--step-1); }
.category-card__blurb { color: var(--text-muted); font-size: var(--step--1); margin: 0; }
.category-card__count { font-size: var(--step--2); color: var(--accent); font-weight: 650; letter-spacing: 0.02em; }

/* --------------------------------------------------------------------------
   7. Buttons, badges, chips
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--brand-600);
  --btn-fg: var(--text-onbrand);
  --btn-border: transparent;
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.62rem 1.05rem;
  font: inherit; font-weight: 600; font-size: var(--step-0);
  line-height: 1.2;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), filter var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover { filter: brightness(1.06); color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; filter: none; transform: none; }

.btn--lg { padding: 0.85rem 1.6rem; font-size: var(--step-1); border-radius: var(--radius-pill); }
.btn--xl { padding: 1rem 2rem; font-size: var(--step-1); font-weight: 680; }
.btn--sm { padding: 0.42rem 0.8rem; font-size: var(--step--1); }
.btn--block { width: 100%; }
.btn--primary { box-shadow: var(--shadow-brand); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text-soft); --btn-border: var(--border-strong); }
.btn--ghost:hover { --btn-fg: var(--text); background: var(--surface-2); filter: none; }
.btn--soft { --btn-bg: var(--brand-50); --btn-fg: var(--brand-700); --btn-border: transparent; }
[data-theme="dark"] .btn--soft { --btn-fg: #c7d2fe; }
.btn--soft:hover { --btn-bg: var(--brand-100); filter: none; }
.btn--danger { --btn-bg: var(--danger); --btn-fg: #fff; }
.btn--danger-ghost { --btn-bg: transparent; --btn-fg: var(--danger); --btn-border: var(--danger-line); }
.btn--danger-ghost:hover { background: var(--danger-soft); filter: none; }
.btn--surface { --btn-bg: var(--surface); --btn-fg: var(--text); --btn-border: var(--border-strong); }
.btn--surface:hover { background: var(--surface-2); filter: none; }
.btn--icon { padding: 0.5rem; border-radius: var(--radius-sm); }

.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  font-size: var(--step--2); font-weight: 640; letter-spacing: 0.01em;
  border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--text-soft);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge--accent { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
.badge--success { background: var(--success-soft); color: var(--success); border-color: var(--success-line); }
.badge--danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.badge--warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-line); }
.badge--brand { background: var(--brand-50); color: var(--brand-700); border-color: var(--border-brand); }
[data-theme="dark"] .badge--brand { color: #c7d2fe; }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-soft); text-decoration: none;
  font-size: var(--step--1); font-weight: 550;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-2); }
.chip--active { background: var(--brand-600); border-color: transparent; color: #fff; }

.pill-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* --------------------------------------------------------------------------
   8. Forms
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field__label { font-weight: 600; font-size: var(--step--1); color: var(--text); display: flex; align-items: center; gap: 0.4rem; }
.field__help { font-size: var(--step--2); color: var(--text-muted); margin: 0; }
.field__error { font-size: var(--step--2); color: var(--danger); margin: 0; }
.field__row { display: flex; gap: 0.6rem; align-items: center; }
.match-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.match-row > .select { flex: 1 1 18rem; min-width: 0; }
.match-row > .btn { flex: 0 0 auto; }
.field--required .field__label::after { content: "*"; color: var(--danger); font-weight: 700; }

.input, .select, .textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font: inherit; font-size: var(--step-0);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--brand-400) 55%, var(--border-strong)); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-500) 22%, transparent);
}
.textarea { min-height: 6.5rem; resize: vertical; }
.select { appearance: none; padding-right: 2.25rem; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' 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 0.7rem center; background-size: 1.05rem;
}
[data-theme="dark"] .select { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2c0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }

.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* switch */
.switch { display: flex; align-items: flex-start; gap: 0.7rem; cursor: pointer; padding: 0.15rem 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
  position: relative; flex: none;
  width: 42px; height: 24px; margin-top: 1px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.switch__track::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease);
}
.switch input:checked + .switch__track { background: var(--brand-600); border-color: var(--brand-600); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 3px solid color-mix(in srgb, var(--brand-500) 55%, transparent); outline-offset: 2px; }
.switch__text { display: flex; flex-direction: column; gap: 0.1rem; }
.switch__label { font-weight: 600; font-size: var(--step--1); }
.switch:hover .switch__track { border-color: var(--brand-400); }

/* range */
.range { display: flex; align-items: center; gap: 0.75rem; }
.range input[type="range"] {
  flex: 1; appearance: none; height: 6px; border-radius: var(--radius-pill);
  background: linear-gradient(to right, var(--brand-500) var(--range-progress, 50%), var(--surface-3) var(--range-progress, 50%));
  border: 1px solid var(--border);
}
.range input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand-600); box-shadow: var(--shadow-sm); cursor: grab;
}
.range input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand-600); cursor: grab;
}
.range output {
  min-width: 3.6rem; text-align: center;
  font-family: var(--font-mono); font-size: var(--step--1);
  padding: 0.2rem 0.5rem; border-radius: var(--radius-xs);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft);
}

/* colour */
.color-input { display: flex; align-items: center; gap: 0.6rem; }
.color-input input[type="color"] {
  appearance: none; width: 44px; height: 34px; padding: 2px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-xs); cursor: pointer;
}
.color-input input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-input input[type="color"]::-webkit-color-swatch { border: none; border-radius: 5px; }

/* segmented radio group */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.25rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-pill); }
.segmented label { position: relative; display: inline-flex; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { padding: 0.35rem 0.8rem; border-radius: var(--radius-pill); font-size: var(--step--1); font-weight: 600; color: var(--text-muted); }
.segmented input:checked + span { background: var(--surface); color: var(--brand-700); box-shadow: var(--shadow-xs); }
[data-theme="dark"] .segmented input:checked + span { color: #c7d2fe; }
.segmented input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand-500) 55%, transparent); }
/* --------------------------------------------------------------------------
   9. Drop zone
   -------------------------------------------------------------------------- */
.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-3);
  padding: clamp(1.75rem, 1rem + 3vw, 3rem);
  text-align: center;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  border: 2px dashed color-mix(in srgb, var(--accent) 38%, var(--border-strong));
  border-radius: var(--radius-xl);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.dropzone__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 62px; height: 62px; border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
}
.dropzone__title { font-size: var(--step-2); font-weight: 680; margin: 0; }
.dropzone__hint { margin: 0; color: var(--text-muted); font-size: var(--step--1); }
.dropzone__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: var(--sp-1); }
.dropzone--compact { padding: clamp(1.15rem, 0.8rem + 1.6vw, 1.75rem); border-radius: var(--radius-lg); }
.dropzone--compact .dropzone__icon { width: 46px; height: 46px; }
.dropzone--compact .dropzone__title { font-size: var(--step-1); }
.dropzone.is-dragging {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border-color: var(--accent);
  transform: scale(1.006);
}
.dropzone.is-dragging .dropzone__icon { animation: float-y 1.4s var(--ease) infinite; }
.dropzone.is-disabled { opacity: 0.6; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* file list */
.filelist { list-style: none; margin: var(--sp-4) 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.filelist__item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  animation: pop-in var(--dur) var(--ease);
}
.filelist__name { font-weight: 600; font-size: var(--step--1); overflow-wrap: anywhere; }
.filelist__meta { color: var(--text-faint); font-size: var(--step--2); }
.filelist__grow { flex: 1; min-width: 0; }
.filelist__item.is-invalid { border-color: var(--danger-line); background: var(--danger-soft); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   10. Progress
   -------------------------------------------------------------------------- */
.progress { display: flex; flex-direction: column; gap: 0.5rem; }
.progress__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.progress__label { font-weight: 620; font-size: var(--step--1); }
.progress__value { font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-muted); }
.progress__track {
  position: relative; height: 10px; border-radius: var(--radius-pill);
  background: var(--surface-3); overflow: hidden;
  border: 1px solid var(--border);
}
.progress__bar {
  height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-600) 55%, #8b5cf6);
  transition: width var(--dur-slow) var(--ease);
}
.progress__track--indeterminate .progress__bar { width: 35% !important; animation: slide 1.6s var(--ease) infinite; }
.progress__shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%);
  animation: shimmer 1.9s linear infinite;
  pointer-events: none;
}
.progress__bar::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.4) 50%, transparent 80%);
  animation: shimmer 2.1s linear infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }

.spinner { width: 1.1em; height: 1.1em; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   11. Feedback: toast, alert, empty state
   -------------------------------------------------------------------------- */
.toast-region {
  position: fixed; z-index: var(--z-toast);
  inset-inline-end: max(1rem, env(safe-area-inset-right));
  inset-block-end: max(1rem, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 0.6rem;
  width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; gap: 0.65rem; align-items: flex-start;
  padding: 0.8rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-600);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: toast-in var(--dur) var(--ease);
}
.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--warning); }
.toast--info { border-left-color: var(--brand-500); }
.toast__icon { color: var(--text-muted); margin-top: 1px; }
.toast--success .toast__icon { color: var(--success); }
.toast--error .toast__icon { color: var(--danger); }
.toast--warning .toast__icon { color: var(--warning); }
.toast__body { flex: 1; font-size: var(--step--1); color: var(--text-soft); }
.toast__title { display: block; font-weight: 640; color: var(--text); margin-bottom: 0.1rem; }
.toast.is-leaving { animation: toast-out var(--dur) var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(0.98); } }

.alert {
  display: flex; gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: var(--step--1);
}
.alert__icon { color: var(--text-muted); }
.alert__body { flex: 1; }
.alert__title { font-weight: 640; margin: 0 0 0.15rem; }
.alert p { margin: 0; color: var(--text-muted); }
.alert--error { background: var(--danger-soft); border-color: var(--danger-line); }
.alert--error .alert__icon, .alert--error .alert__title { color: var(--danger); }
.alert--success { background: var(--success-soft); border-color: var(--success-line); }
.alert--success .alert__icon, .alert--success .alert__title { color: var(--success); }
.alert--warning { background: var(--warning-soft); border-color: var(--warning-line); }
.alert--warning .alert__icon, .alert--warning .alert__title { color: var(--warning); }
.alert--info { background: var(--info-soft); border-color: var(--border-brand); }
.alert--info .alert__icon, .alert--info .alert__title { color: var(--brand-700); }
[data-theme="dark"] .alert--info .alert__icon, [data-theme="dark"] .alert--info .alert__title { color: #c7d2fe; }

.empty-state { text-align: center; padding: clamp(2rem, 1rem + 4vw, 3.5rem) 1rem; }
.empty-state__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 66px; height: 66px; margin-bottom: var(--sp-4);
  border-radius: var(--radius-xl);
  background: var(--surface-2); color: var(--text-faint);
  border: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   12. Accordion
   -------------------------------------------------------------------------- */
.accordion { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-xs); }
.accordion + .accordion { margin-top: 0.65rem; }
.accordion summary {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.15rem;
  font-weight: 620; font-size: var(--step-0);
  cursor: pointer; list-style: none;
  transition: background-color var(--dur) var(--ease);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { background: var(--surface-2); }
.accordion summary .icon-chevron { margin-left: auto; color: var(--text-faint); transition: transform var(--dur) var(--ease); }
.accordion[open] summary .icon-chevron { transform: rotate(180deg); }
.accordion[open] summary { border-bottom: 1px solid var(--border); }
.accordion__body { padding: 1rem 1.15rem 1.15rem; color: var(--text-soft); font-size: var(--step--1); }
.accordion__body > :last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   13. Header
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute; left: 0.75rem; top: -100px; z-index: 100;
  padding: 0.6rem 1rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--brand-600); color: #fff; font-weight: 600; text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; gap: var(--sp-4);
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: var(--step-1); color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.brand__mark { width: 34px; height: 34px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.brand__name { display: flex; flex-direction: column; line-height: 1.05; }
.brand__tag { font-size: var(--step--2); font-weight: 500; color: var(--text-faint); letter-spacing: 0; }

.site-nav { display: none; }
.site-nav__list { display: flex; align-items: center; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.site-nav__link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 0.7rem; border-radius: var(--radius-sm);
  color: var(--text-soft); text-decoration: none; font-weight: 560; font-size: var(--step--1);
  background: none; border: 0; font-family: inherit; cursor: pointer;
}
.site-nav__link:hover { background: var(--surface-2); color: var(--text); }

.mega {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(100% + 0.4rem);
  width: min(940px, calc(100vw - 2rem));
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: var(--z-panel);
  max-height: min(72vh, 620px); overflow: auto;
}
details[data-mega][open] > .mega { display: block; animation: pop-in var(--dur) var(--ease); }
details[data-mega] { position: relative; }
details[data-mega] > summary { list-style: none; }
details[data-mega] > summary::-webkit-details-marker { display: none; }
details[data-mega] > summary .icon-chevron { transition: transform var(--dur) var(--ease); }
details[data-mega][open] > summary { background: var(--surface-2); color: var(--text); }
details[data-mega][open] > summary .icon-chevron { transform: rotate(180deg); }
.mega__grid { display: grid; gap: 0.35rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); }
.mega__item { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.55rem 0.6rem; border-radius: var(--radius-sm); text-decoration: none; color: inherit; }
.mega__item:hover { background: var(--surface-2); }
.mega__item .icon { color: var(--accent, var(--brand-600)); margin-top: 0.15rem; }
.mega__label { font-weight: 600; font-size: var(--step--1); display: block; }
.mega__blurb { font-size: var(--step--2); color: var(--text-muted); display: block; }
.mega__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--border); }

.header-search { display: none; margin-left: auto; }
.header-search .input-group { width: min(320px, 30vw); }
.header-actions { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; }
.header-search + .header-actions { margin-left: var(--sp-3); }

.search-form { position: relative; }
.search-form .icon-search { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.search-form .input { padding-left: 2.15rem; border-radius: var(--radius-pill); background: var(--surface-2); border-color: transparent; }
.search-form .input:focus { background: var(--surface); }

.mobile-nav { display: block; }
.mobile-nav > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.7rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-weight: 600; font-size: var(--step--1); color: var(--text-soft);
}
.mobile-nav > summary::-webkit-details-marker { display: none; }
.mobile-nav__panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-4) clamp(1rem, 0.5rem + 2vw, 2rem) var(--sp-6);
  max-height: calc(100vh - var(--header-h)); overflow: auto;
  z-index: var(--z-panel);
}
.mobile-nav__links { display: flex; flex-direction: column; gap: 0.15rem; margin: 0 0 var(--sp-4); padding: 0; list-style: none; }
.mobile-nav__links .site-nav__link { width: 100%; justify-content: flex-start; padding: 0.65rem 0.7rem; font-size: var(--step-0); }
.m-nav { position: relative; }
.m-nav__group { margin-top: var(--sp-4); }
.m-nav__group-title { display: flex; align-items: center; gap: 0.5rem; font-size: var(--step--2); font-weight: 680; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 0.4rem; }

@media (min-width: 980px) {
  .site-nav { display: block; }
  .header-search { display: block; }
  .mobile-nav { display: none; }
}

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--surface-sunk); border-top: 1px solid var(--border); margin-top: var(--sp-16); }
.site-footer__top { display: grid; gap: var(--sp-8); padding-block: var(--sp-12); grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.site-footer__brand { display: flex; flex-direction: column; gap: var(--sp-3); }
.site-footer__brand p { color: var(--text-muted); font-size: var(--step--1); margin: 0; max-width: 34ch; }
.site-footer__heading { font-size: var(--step--1); font-weight: 680; margin: 0 0 0.6rem; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.site-footer__links a { color: var(--text-muted); text-decoration: none; font-size: var(--step--1); }
.site-footer__links a:hover { color: var(--brand-600); text-decoration: underline; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5);
  align-items: center; justify-content: space-between;
  padding-block: var(--sp-5); border-top: 1px solid var(--border);
  color: var(--text-faint); font-size: var(--step--1);
}
.site-footer__promise { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text-muted); }
.site-footer__cats { display: flex; flex-wrap: wrap; gap: 0.35rem; padding-block: var(--sp-4); border-top: 1px solid var(--border); }

/* --------------------------------------------------------------------------
   15. Misc: stats, steps, features, noscript
   -------------------------------------------------------------------------- */
.stat-band { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); text-align: center; }
.stat__value { font-size: var(--step-4); font-weight: 720; letter-spacing: -0.03em; color: var(--brand-600); }
[data-theme="dark"] .stat__value { color: #a5b4fc; }
.stat__label { font-size: var(--step--1); color: var(--text-muted); }

.feature { display: flex; gap: 0.9rem; align-items: flex-start; }
.feature__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--brand-500) 12%, var(--surface)); color: var(--brand-600); border: 1px solid color-mix(in srgb, var(--brand-500) 22%, transparent); }
[data-theme="dark"] .feature__icon { color: #a5b4fc; }
.feature__title { font-size: var(--step-0); font-weight: 650; margin: 0 0 0.15rem; }
.feature__body { margin: 0; color: var(--text-muted); font-size: var(--step--1); }

.steps { counter-reset: step; display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); list-style: none; padding: 0; margin: 0; }
.step { position: relative; padding-left: 3.35rem; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--brand-600); color: #fff; font-weight: 700; font-size: var(--step--1);
  box-shadow: var(--shadow-brand);
}
.step__title { font-weight: 650; margin: 0.35rem 0 0.2rem; }
.step__body { margin: 0; color: var(--text-muted); font-size: var(--step--1); }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; font-size: var(--step--1); color: var(--text-faint); padding: 0; margin: 0; list-style: none; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand-600); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 600; }

.noscript {
  background: var(--warning-soft); border-bottom: 1px solid var(--warning-line);
  color: var(--warning); padding: 0.7rem 1rem; text-align: center; font-size: var(--step--1);
}
.noscript a { color: inherit; text-decoration: underline; }

.prose { color: var(--text-soft); }
.prose h2 { font-size: var(--step-2); color: var(--text); margin-top: var(--sp-8); }
.prose h3 { font-size: var(--step-1); color: var(--text); margin-top: var(--sp-6); }
.prose a { font-weight: 550; }

/* --------------------------------------------------------------------------
   16. Utilities
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.text-balance { text-wrap: balance; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--sp-2) !important; }
.mb-4 { margin-bottom: var(--sp-4) !important; }
.mb-6 { margin-bottom: var(--sp-6) !important; }
.mb-8 { margin-bottom: var(--sp-8) !important; }
.mt-4 { margin-top: var(--sp-4) !important; }
.mt-6 { margin-top: var(--sp-6) !important; }
.mt-8 { margin-top: var(--sp-8) !important; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.divider { height: 1px; background: var(--border); border: 0; margin: var(--sp-6) 0; }
.scroll-x { overflow-x: auto; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .tool-card:hover, .category-card:hover, .dropzone.is-dragging { transform: none; }
}

@media print {
  .site-header, .site-footer, .dropzone, .toast-region { display: none !important; }
  body { background: #fff; }
}
/* --------------------------------------------------------------------------
   17. Theme toggle + small component fixes
   -------------------------------------------------------------------------- */
.theme-toggle [data-theme-icon] { display: inline-flex; }
.theme-toggle [data-theme-icon][hidden] { display: none; }
.theme-toggle[aria-pressed="true"] { background: var(--surface-2); }

.opt-group__body > .opt:last-child { margin-bottom: 0; }
.filelist__grow { flex: 1; min-width: 0; }
.filelist__item .btn--icon { padding: 0.35rem; }
.btn[aria-busy="true"] { opacity: 0.55; pointer-events: none; }
.share-file .btn[aria-busy="true"] { opacity: 0.55; pointer-events: none; }
.dropzone .btn[hidden] { display: none; }

/* --------------------------------------------------------------------------
   18. Page-level hooks
   -------------------------------------------------------------------------- */
.page { background: var(--bg); }
.page--tool .site-footer { margin-top: 0; }
.page--home .hero { border-bottom-color: transparent; }
.page--share .section { padding-block: clamp(2rem, 1.2rem + 3vw, 4rem); }
