/* =====================================================================
   WiseFinance design system  ·  wf.css
   One shared stylesheet for every page: tokens (light + dark), base,
   and reusable components. Page sheets (home.css, auth.css, bank.css,
   app.css) only add layout on top of these tokens.

   Theme: light by default, dark follows prefers-color-scheme unless the
   user picked one (theme.js sets <html data-theme="light|dark">).
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* type */
  --font-sans: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-display: "Rubik", "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-2xs: 0.6875rem;  /* 11 */
  --fs-xs: 0.75rem;     /* 12 */
  --fs-sm: 0.875rem;    /* 14 */
  --fs-md: 1rem;        /* 16 */
  --fs-lg: 1.125rem;    /* 18 */
  --fs-xl: 1.375rem;    /* 22 */
  --fs-2xl: 1.75rem;    /* 28 */
  --fs-3xl: 2.25rem;    /* 36 */
  --fs-hero: clamp(2.25rem, 1.55rem + 2.9vw, 3.75rem);
  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-body: 1.6;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* spacing (4px grid) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

  /* radius */
  --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* layers */
  --z-header: 50; --z-dropdown: 60; --z-overlay: 80; --z-modal: 90; --z-toast: 100;

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-1: 120ms; --dur-2: 200ms; --dur-3: 320ms;

  --container: 1200px;
  --header-h: 64px;

  /* ---- color: light ---- */
  color-scheme: light;
  --bg: #F4F6F7;
  --surface: #FFFFFF;
  --surface-2: #EEF2F3;
  --surface-3: #E4E9EB;
  --surface-raised: #FFFFFF;
  --border: #DFE5E7;
  --border-strong: #C5CED2;
  --text: #111A1F;
  --text-2: #36424A;
  --text-muted: #55616A;
  --brand: #0E6E7E;          /* text, icons, links */
  --brand-solid: #0E6E7E;    /* filled buttons */
  --brand-solid-hover: #0A5866;
  --on-brand: #FFFFFF;
  --brand-soft: #E3F1F3;
  --brand-softer: #F0F7F8;
  --brand-ring: rgba(14, 110, 126, 0.35);
  --positive: #0B7A4B;
  --positive-soft: #E5F4EC;
  --danger: #B42318;
  --danger-soft: #FDECEA;
  --danger-border: #F2C3BE;
  --warning: #8A5300;
  --warning-soft: #FBF1E2;
  --chart-income: #0E6E7E;
  --chart-expense: #D08A3A;
  --chart-grid: rgba(17, 26, 31, 0.08);
  --logo-tile: #FFFFFF;
  --scrim: rgba(10, 18, 22, 0.5);
  --shadow-xs: 0 1px 2px rgba(17, 26, 31, 0.05);
  --shadow-sm: 0 1px 2px rgba(17, 26, 31, 0.04), 0 2px 8px rgba(17, 26, 31, 0.05);
  --shadow-md: 0 2px 6px rgba(17, 26, 31, 0.05), 0 12px 32px rgba(17, 26, 31, 0.08);
  --shadow-lg: 0 4px 12px rgba(17, 26, 31, 0.06), 0 28px 64px rgba(17, 26, 31, 0.14);
  --focus-ring: 0 0 0 3px var(--brand-ring);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0C1214;
    --surface: #131A1D;
    --surface-2: #1A2226;
    --surface-3: #222C31;
    --surface-raised: #182024;
    --border: #253035;
    --border-strong: #34424A;
    --text: #E9EEF0;
    --text-2: #C0CACE;
    --text-muted: #9DA9AF;
    --brand: #6CCFDC;
    --brand-solid: #5CC8D6;
    --brand-solid-hover: #7DD5E0;
    --on-brand: #062228;
    --brand-soft: rgba(92, 200, 214, 0.14);
    --brand-softer: rgba(92, 200, 214, 0.07);
    --brand-ring: rgba(108, 207, 220, 0.45);
    --positive: #4CC38A;
    --positive-soft: rgba(76, 195, 138, 0.14);
    --danger: #F97066;
    --danger-soft: rgba(249, 112, 102, 0.13);
    --danger-border: rgba(249, 112, 102, 0.38);
    --warning: #F2B552;
    --warning-soft: rgba(242, 181, 82, 0.13);
    --chart-income: #5CC8D6;
    --chart-expense: #E9A75A;
    --chart-grid: rgba(233, 238, 240, 0.08);
    --logo-tile: #FFFFFF;
    --scrim: rgba(0, 0, 0, 0.62);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.35), 0 28px 64px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0C1214;
  --surface: #131A1D;
  --surface-2: #1A2226;
  --surface-3: #222C31;
  --surface-raised: #182024;
  --border: #253035;
  --border-strong: #34424A;
  --text: #E9EEF0;
  --text-2: #C0CACE;
  --text-muted: #9DA9AF;
  --brand: #6CCFDC;
  --brand-solid: #5CC8D6;
  --brand-solid-hover: #7DD5E0;
  --on-brand: #062228;
  --brand-soft: rgba(92, 200, 214, 0.14);
  --brand-softer: rgba(92, 200, 214, 0.07);
  --brand-ring: rgba(108, 207, 220, 0.45);
  --positive: #4CC38A;
  --positive-soft: rgba(76, 195, 138, 0.14);
  --danger: #F97066;
  --danger-soft: rgba(249, 112, 102, 0.13);
  --danger-border: rgba(249, 112, 102, 0.38);
  --warning: #F2B552;
  --warning-soft: rgba(242, 181, 82, 0.13);
  --chart-income: #5CC8D6;
  --chart-expense: #E9A75A;
  --chart-grid: rgba(233, 238, 240, 0.08);
  --logo-tile: #FFFFFF;
  --scrim: rgba(0, 0, 0, 0.62);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.35), 0 28px 64px rgba(0, 0, 0, 0.5);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--text);
}
p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-6) 0; }
::selection { background: var(--brand-soft); color: var(--text); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

.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; inset-inline-start: var(--sp-4); top: -60px;
  z-index: var(--z-toast);
  background: var(--brand-solid); color: var(--on-brand);
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-sm);
  font-weight: var(--fw-semibold); text-decoration: none;
}
.skip-link:focus { top: var(--sp-3); }

/* money & numbers: LTR digits, tabular */
.num, .money {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}
.muted { color: var(--text-muted); }
.text-positive { color: var(--positive); }
.text-danger { color: var(--danger); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
@media (max-width: 640px) { .container { padding-inline: var(--sp-4); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  color: var(--brand);
}

/* ---------- 3. Logo ---------- */
.wf-logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  direction: ltr; /* wordmark is Latin */
}
.wf-logo-mark {
  width: 32px; height: 32px; flex: none;
  border-radius: 9px;
  background: var(--brand-solid);
  color: var(--on-brand);
  display: grid; place-items: center;
}
.wf-logo-mark svg { width: 20px; height: 20px; }
.wf-logo-word {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
  line-height: 1;
}
.wf-logo-word b { font-weight: var(--fw-semibold); color: var(--brand); }
.wf-logo--lg .wf-logo-mark { width: 40px; height: 40px; border-radius: 11px; }
.wf-logo--lg .wf-logo-mark svg { width: 24px; height: 24px; }
.wf-logo--lg .wf-logo-word { font-size: 1.5rem; }

/* ---------- 4. Buttons ---------- */
.btn {
  --btn-h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--btn-h);
  padding: 0 var(--sp-5);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease),
              color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: var(--brand-solid); color: var(--on-brand); box-shadow: var(--shadow-xs); }
.btn--primary:hover { background: var(--brand-solid-hover); }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--secondary:hover { background: var(--surface-2); }
.btn--ghost { background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--danger { background: var(--surface); color: var(--danger); border-color: var(--danger-border); }
.btn--danger:hover { background: var(--danger-soft); }
.btn--sm { --btn-h: 36px; padding: 0 var(--sp-3); border-radius: var(--r-sm); }
.btn--lg { --btn-h: 52px; padding: 0 var(--sp-6); font-size: var(--fs-md); }
.btn--block { width: 100%; }

.icon-btn {
  width: 40px; height: 40px; flex: none;
  display: inline-grid; place-items: center;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.icon-btn svg { width: 18px; height: 18px; }

/* theme toggle (header) – shows the icon of the theme you'd switch to */
.theme-toggle-btn .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle-btn .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle-btn .icon-moon { display: none; }

/* spinner */
.spinner {
  width: 18px; height: 18px; flex: none;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  animation: wf-spin 0.8s linear infinite;
}
@keyframes wf-spin { to { transform: rotate(360deg); } }

/* ---------- 5. Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text); }
.label .opt { color: var(--text-muted); font-weight: var(--fw-regular); }
.hint { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.5; }

.input, .select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-md); /* 16px: no iOS zoom */
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.input::placeholder { color: var(--text-muted); opacity: 0.75; }
.input:hover, .select:hover { border-color: var(--text-muted); }
.input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus-ring); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input--ltr { direction: ltr; text-align: start; }
.input--ltr::placeholder { text-align: right; }

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2355616A' 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: left 12px center;
}

.input-wrap { position: relative; }
.input-wrap .input { padding-inline-end: 48px; }
.input-wrap .input-action {
  position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 38px; border: 0; background: transparent;
  border-radius: var(--r-sm); color: var(--text-muted);
  display: grid; place-items: center;
}
.input-wrap .input-action:hover { color: var(--text); background: var(--surface-2); }
.input-wrap .input-action:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.input-wrap .input-action svg { width: 18px; height: 18px; }

/* ---------- 6. Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: var(--sp-6); }
.card-title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.card-sub { font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------- 7. Badge / tag ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 24px; padding: 2px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  background: var(--surface-2); color: var(--text-2);
  white-space: nowrap;
}
.badge svg { width: 14px; height: 14px; }
.badge--brand { background: var(--brand-soft); color: var(--brand); }
.badge--positive { background: var(--positive-soft); color: var(--positive); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- 8. Alert ---------- */
.alert {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.alert > svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.alert-title { font-weight: var(--fw-semibold); }
.alert--info { background: var(--brand-softer); border-color: var(--brand-soft); }
.alert--info > svg { color: var(--brand); }
.alert--success { background: var(--positive-soft); border-color: transparent; }
.alert--success > svg { color: var(--positive); }
.alert--warning { background: var(--warning-soft); border-color: transparent; }
.alert--warning > svg { color: var(--warning); }
.alert--danger { background: var(--danger-soft); border-color: var(--danger-border); }
.alert--danger > svg { color: var(--danger); }
.alert:empty { display: none; }

/* ---------- 9. Tabs (underline) & segmented ---------- */
.tabbar {
  display: flex; gap: var(--sp-1);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }
.tabbar-item {
  position: relative;
  border: 0; background: transparent;
  padding: var(--sp-3) var(--sp-3);
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  color: var(--text-muted);
  white-space: nowrap;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.tabbar-item:hover { color: var(--text); }
.tabbar-item[aria-selected="true"], .tabbar-item.active { color: var(--text); font-weight: var(--fw-semibold); }
.tabbar-item[aria-selected="true"]::after, .tabbar-item.active::after {
  content: ""; position: absolute; inset-inline: var(--sp-3); bottom: -1px; height: 2px;
  border-radius: 2px; background: var(--brand);
}
.segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border);
}
.segmented > * {
  border: 0; background: transparent; padding: 6px 14px;
  border-radius: 9px; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-muted);
}
.segmented > [aria-pressed="true"], .segmented > .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }

/* ---------- 10. Table ---------- */
.table-wf { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table-wf th {
  text-align: start; font-weight: var(--fw-semibold); font-size: var(--fs-xs);
  color: var(--text-muted); padding: 10px 12px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.table-wf td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.table-wf tr:last-child td { border-bottom: 0; }
.table-wf tbody tr:hover td { background: var(--brand-softer); }
.table-wf td.num, .table-wf th.num { text-align: end; }

/* ---------- 11. Modal ---------- */
.modal-scrim {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: var(--scrim);
  display: grid; place-items: center; padding: var(--sp-4);
}
.modal {
  width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: var(--sp-6);
}

/* ---------- 12. Toast ---------- */
.toast-region {
  position: fixed; z-index: var(--z-toast);
  inset-inline-start: var(--sp-4); bottom: var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.toast {
  display: flex; align-items: center; gap: var(--sp-3);
  min-width: 260px; max-width: 380px;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--text); color: var(--bg);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
}

/* ---------- 13. Skeleton / progress ---------- */
.skeleton {
  display: block;
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: wf-shimmer 1.4s ease-in-out infinite;
  min-height: 12px;
}
@keyframes wf-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.progress {
  position: relative; height: 6px; border-radius: var(--r-pill);
  background: var(--surface-3); overflow: hidden;
}
.progress > span {
  position: absolute; inset-block: 0; inset-inline-start: 0;
  border-radius: inherit; background: var(--brand-solid);
  transition: width var(--dur-3) var(--ease);
}
.progress--indeterminate > span {
  width: 35%;
  animation: wf-indeterminate 1.6s var(--ease) infinite;
}
@keyframes wf-indeterminate {
  from { inset-inline-start: -35%; }
  to { inset-inline-start: 100%; }
}

/* ---------- 14. Provider logo tile ---------- */
/* Bank logos ship in very different shapes (full-bleed icons, wordmarks,
   padded squares). One tile normalizes them: same size, same radius,
   per-provider fit. */
.provider-logo {
  --size: 44px;
  width: var(--size); height: var(--size); flex: none;
  border-radius: calc(var(--size) * 0.26);
  overflow: hidden;
  background: var(--logo-tile);
  box-shadow: inset 0 0 0 1px rgba(17, 26, 31, 0.08);
  display: grid; place-items: center;
  position: relative;
}
.provider-logo img { width: 100%; height: 100%; object-fit: cover; }
.provider-logo[data-provider="isracard"] img,
.provider-logo[data-provider="max"] img { object-fit: contain; padding: 3px; }
.provider-logo[data-provider="mizrahi"] img { transform: scale(1.75); }
.provider-logo[data-provider="benleumi"] { background: #142A60; }
.provider-logo[data-provider="benleumi"] img { object-fit: contain; transform: scale(1.5); }
.provider-logo[data-provider="hapoalim"] img { transform: scale(1.15); }
.provider-logo--sm { --size: 32px; }
.provider-logo--lg { --size: 56px; }

/* ---------- 15. Site header (marketing / auth / bank) ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.site-header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: var(--sp-6);
}
.site-nav { display: flex; align-items: center; gap: var(--sp-1); }
.site-nav a {
  padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-size: var(--fs-sm); font-weight: var(--fw-medium);
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--sp-2); }

/* ---------- 16. Reduced motion ---------- */
@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;
  }
  .spinner, .progress--indeterminate > span { animation: none !important; }
  .progress--indeterminate > span { width: 100%; opacity: 0.5; inset-inline-start: 0; }
}
