/* =====================================================================
   SOWP UI — the design system of Sowp's own pages
   ---------------------------------------------------------------------
   One set of tokens, light and dark, and the components every page is
   built from. Loaded LAST on every page (after the page's own <style>,
   ui-responsive.css and brand.css), so:

     * the legacy --ui-* variables each page still declares inline are
       redefined here from the tokens -- which is what gives every page
       dark mode without rewriting every rule that reads them;
     * a component class here wins a tie with an older page rule.

   Brand (SOWP brand book): Magician in the result, Caregiver in the
   experience. "Powerful behind the scenes. Simple in your hands."
   Visually: calm, premium, quiet surfaces; cobalt and indigo carry the
   brand; pumpkin is kept for the moments that matter (the one action,
   something new, something done). No emoji: icons are ui_icons.py.

   Dark mode: automatic from the system, overridable per visitor --
   static/sowp-theme.js sets <html data-theme="light|dark"> before the
   first paint when the visitor has chosen.
   ===================================================================== */

:root {
  /* brand */
  --s-cobalt: #16207F;
  --s-indigo: #4260E6;
  --s-pumpkin: #FE7524;
  --s-snow: #FAFAFA;
  --s-onyx: #0D0D0D;

  /* surfaces */
  --s-bg: #F6F7FB;
  --s-bg-grad: radial-gradient(1100px 520px at 88% -8%, rgba(66, 96, 230, .07), transparent 60%),
               radial-gradient(900px 480px at 0% 0%, rgba(254, 117, 36, .045), transparent 55%);
  --s-surface: #FFFFFF;
  --s-surface-2: #F2F4FA;
  --s-surface-3: #E9ECF6;
  --s-overlay: rgba(12, 15, 38, .45);
  --s-border: #E3E6F0;
  --s-border-strong: #CDD2E4;

  /* text */
  --s-text: #0F1222;
  --s-text-2: #545B78;
  --s-text-3: #8A90A8;
  --s-heading: #0F1222;
  --s-on-primary: #FFFFFF;

  /* roles */
  --s-primary: #4260E6;
  --s-primary-hover: #3450D4;
  --s-primary-strong: #16207F;
  --s-primary-soft: #EEF1FD;
  --s-primary-line: #C9D3FA;
  --s-accent: #FE7524;
  --s-accent-hover: #EE6415;
  --s-accent-soft: #FFF1E7;
  --s-success: #13875A;
  --s-success-soft: #E7F6EF;
  --s-warning: #B45309;
  --s-warning-soft: #FEF4E2;
  --s-danger: #D12E2E;
  --s-danger-soft: #FDECEC;

  /* shape */
  --s-r-xs: 6px;
  --s-r-sm: 10px;
  --s-r: 14px;
  --s-r-lg: 20px;
  --s-r-xl: 28px;
  --s-r-pill: 999px;

  /* depth: soft, cool, never grey mud */
  --s-shadow-xs: 0 1px 2px rgba(16, 24, 64, .06);
  --s-shadow-sm: 0 1px 2px rgba(16, 24, 64, .05), 0 2px 8px -2px rgba(16, 24, 64, .08);
  --s-shadow: 0 1px 2px rgba(16, 24, 64, .04), 0 12px 32px -12px rgba(22, 32, 127, .18);
  --s-shadow-lg: 0 2px 4px rgba(16, 24, 64, .04), 0 28px 64px -24px rgba(22, 32, 127, .30);
  --s-ring: 0 0 0 4px rgba(66, 96, 230, .20);

  /* motion */
  --s-ease: cubic-bezier(.2, .8, .2, 1);
  --s-ease-out: cubic-bezier(.16, 1, .3, 1);
  --s-fast: .15s;
  --s-med: .28s;

  /* type */
  --s-font: 'Bon Digits', 'Raleway', 'Bon', 'Vazirmatn', Tahoma, sans-serif;
  --s-font-latin: 'Raleway', 'Bon', 'Vazirmatn', Tahoma, sans-serif;

  color-scheme: light;
}

/* ---------- Dark ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --s-bg: #0A0C1A;
    --s-bg-grad: radial-gradient(1100px 520px at 88% -8%, rgba(66, 96, 230, .16), transparent 60%),
                 radial-gradient(900px 480px at 0% 0%, rgba(254, 117, 36, .06), transparent 55%);
    --s-surface: #11142A;
    --s-surface-2: #171B36;
    --s-surface-3: #1F2443;
    --s-overlay: rgba(2, 3, 12, .6);
    --s-border: #242A4B;
    --s-border-strong: #333A63;
    --s-text: #ECEEF8;
    --s-text-2: #A6ACC8;
    --s-text-3: #767D9E;
    --s-heading: #F4F5FC;
    --s-primary: #6F87FF;
    --s-primary-hover: #8599FF;
    --s-primary-strong: #A9B7FF;
    --s-primary-soft: rgba(111, 135, 255, .13);
    --s-primary-line: rgba(111, 135, 255, .35);
    --s-accent: #FF8A45;
    --s-accent-hover: #FF9A5C;
    --s-accent-soft: rgba(255, 138, 69, .13);
    --s-success: #3CCB8B;
    --s-success-soft: rgba(60, 203, 139, .12);
    --s-warning: #F2B35B;
    --s-warning-soft: rgba(242, 179, 91, .12);
    --s-danger: #FF6B6B;
    --s-danger-soft: rgba(255, 107, 107, .12);
    --s-shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --s-shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 8px -2px rgba(0, 0, 0, .45);
    --s-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 36px -14px rgba(0, 0, 0, .6);
    --s-shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 30px 70px -24px rgba(0, 0, 0, .7);
    --s-ring: 0 0 0 4px rgba(111, 135, 255, .28);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --s-bg: #0A0C1A;
  --s-bg-grad: radial-gradient(1100px 520px at 88% -8%, rgba(66, 96, 230, .16), transparent 60%),
               radial-gradient(900px 480px at 0% 0%, rgba(254, 117, 36, .06), transparent 55%);
  --s-surface: #11142A;
  --s-surface-2: #171B36;
  --s-surface-3: #1F2443;
  --s-overlay: rgba(2, 3, 12, .6);
  --s-border: #242A4B;
  --s-border-strong: #333A63;
  --s-text: #ECEEF8;
  --s-text-2: #A6ACC8;
  --s-text-3: #767D9E;
  --s-heading: #F4F5FC;
  --s-primary: #6F87FF;
  --s-primary-hover: #8599FF;
  --s-primary-strong: #A9B7FF;
  --s-primary-soft: rgba(111, 135, 255, .13);
  --s-primary-line: rgba(111, 135, 255, .35);
  --s-accent: #FF8A45;
  --s-accent-hover: #FF9A5C;
  --s-accent-soft: rgba(255, 138, 69, .13);
  --s-success: #3CCB8B;
  --s-success-soft: rgba(60, 203, 139, .12);
  --s-warning: #F2B35B;
  --s-warning-soft: rgba(242, 179, 91, .12);
  --s-danger: #FF6B6B;
  --s-danger-soft: rgba(255, 107, 107, .12);
  --s-shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --s-shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 8px -2px rgba(0, 0, 0, .45);
  --s-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 36px -14px rgba(0, 0, 0, .6);
  --s-shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 30px 70px -24px rgba(0, 0, 0, .7);
  --s-ring: 0 0 0 4px rgba(111, 135, 255, .28);
  color-scheme: dark;
}

/* ---------- The legacy page variables, from the tokens ----------
   Every page still declares --ui-* in its own <style>. Redefined here
   (this file comes later) they follow the theme, light or dark. */
:root, :root[data-theme] {
  --ui-bg: var(--s-bg);
  --ui-surface: var(--s-surface);
  --ui-surface-alt: var(--s-surface-2);
  --ui-primary: var(--s-primary);
  --ui-primary-dark: var(--s-primary-strong);
  --ui-primary-tint: var(--s-primary-soft);
  --ui-accent: var(--s-accent);
  --ui-accent-tint: var(--s-accent-soft);
  --ui-text: var(--s-text);
  --ui-text-muted: var(--s-text-2);
  --ui-border: var(--s-border);
  --ui-danger: var(--s-danger);
  --ui-danger-tint: var(--s-danger-soft);
  --ui-border-soft: var(--s-surface-3);
  --ui-error-text: var(--s-danger);
  --ui-error-bg: var(--s-danger-soft);
  --ui-success-text: var(--s-success);
  --ui-success-bg: var(--s-success-soft);
  --brand-font: var(--s-font);
}

/* ---------- Base ---------- */
html { background: var(--s-bg); }
body {
  background: var(--s-bg-grad), var(--s-bg);
  background-attachment: fixed;
  color: var(--s-text);
  font-family: var(--s-font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--s-med) var(--s-ease), color var(--s-med) var(--s-ease);
}
h1, h2, h3, h4 { color: var(--s-heading); letter-spacing: -0.015em; }
a { color: inherit; }
::selection { background: color-mix(in srgb, var(--s-primary) 24%, transparent); }
:focus-visible { outline: none; box-shadow: var(--s-ring); }
hr { border: 0; border-top: 1px solid var(--s-border); }

.s-icon { display: inline-block; flex: none; vertical-align: -0.2em; }
.s-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.s-muted { color: var(--s-text-2); }
.s-faint { color: var(--s-text-3); }
.s-text-success { color: var(--s-success); }
.s-text-danger { color: var(--s-danger); }
.s-text-accent { color: var(--s-accent); }
.s-text-primary { color: var(--s-primary); }

/* ---------- Page shell ---------- */
.s-container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); box-sizing: border-box; }
.s-container.narrow { max-width: 720px; }
.s-stack { display: flex; flex-direction: column; gap: 16px; }
.s-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.s-spacer { flex: 1; }

/* ---------- Buttons ---------- */
.s-btn {
  --b-bg: var(--s-surface); --b-fg: var(--s-text); --b-line: var(--s-border-strong); --b-bg-h: var(--s-surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; box-sizing: border-box;
  font: inherit; font-size: .92rem; font-weight: 700; line-height: 1; white-space: nowrap;
  color: var(--b-fg); background: var(--b-bg); border: 1px solid var(--b-line); border-radius: var(--s-r-sm);
  text-decoration: none; cursor: pointer; user-select: none;
  transition: background var(--s-fast) var(--s-ease), border-color var(--s-fast) var(--s-ease),
              color var(--s-fast) var(--s-ease), box-shadow var(--s-fast) var(--s-ease), transform var(--s-fast) var(--s-ease);
}
.s-btn:hover { background: var(--b-bg-h); }
.s-btn:active { transform: translateY(1px); }
.s-btn[disabled], .s-btn.is-busy { opacity: .6; pointer-events: none; }
.s-btn--primary { --b-bg: var(--s-primary); --b-fg: var(--s-on-primary); --b-line: transparent; --b-bg-h: var(--s-primary-hover);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 20px -10px color-mix(in srgb, var(--s-primary) 70%, transparent); }
.s-btn--primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 12px 26px -10px color-mix(in srgb, var(--s-primary) 80%, transparent); }
.s-btn--accent { --b-bg: var(--s-accent); --b-fg: #fff; --b-line: transparent; --b-bg-h: var(--s-accent-hover);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--s-accent) 80%, transparent); }
.s-btn--ink { --b-bg: var(--s-primary-strong); --b-fg: #fff; --b-line: transparent; --b-bg-h: #0f1766; }
:root[data-theme="dark"] .s-btn--ink { --b-bg: #EEF0FF; --b-fg: #0E1230; --b-bg-h: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .s-btn--ink { --b-bg: #EEF0FF; --b-fg: #0E1230; --b-bg-h: #fff; } }
.s-btn--soft { --b-bg: var(--s-primary-soft); --b-fg: var(--s-primary); --b-line: transparent; --b-bg-h: color-mix(in srgb, var(--s-primary) 16%, transparent); }
.s-btn--ghost { --b-bg: transparent; --b-line: transparent; --b-fg: var(--s-text-2); --b-bg-h: var(--s-surface-2); }
.s-btn--ghost:hover { color: var(--s-text); }
.s-btn--danger { --b-bg: transparent; --b-fg: var(--s-danger); --b-line: color-mix(in srgb, var(--s-danger) 35%, transparent); --b-bg-h: var(--s-danger-soft); }
.s-btn--sm { min-height: 34px; padding: 0 12px; font-size: .84rem; border-radius: var(--s-r-xs); gap: 6px; }
.s-btn--lg { min-height: 48px; padding: 0 22px; font-size: .95rem; border-radius: var(--s-r); }
.s-btn--block { width: 100%; }
.s-btn--icon { padding: 0; width: 42px; }
.s-btn--sm.s-btn--icon { width: 34px; }

/* ---------- Fields ---------- */
.s-field { display: grid; gap: 7px; }
.s-label { font-size: .84rem; font-weight: 700; color: var(--s-text); }
.s-label small, .s-help { font-weight: 500; font-size: .8rem; color: var(--s-text-3); }
.s-input, .s-select, .s-textarea {
  width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 14px;
  font: inherit; font-size: .95rem; color: var(--s-text); background: var(--s-surface);
  border: 1px solid var(--s-border-strong); border-radius: var(--s-r-sm);
  transition: border-color var(--s-fast) var(--s-ease), box-shadow var(--s-fast) var(--s-ease), background var(--s-fast);
}
.s-textarea { min-height: 110px; line-height: 1.8; resize: vertical; }
.s-input::placeholder, .s-textarea::placeholder { color: var(--s-text-3); }
.s-input:hover, .s-select:hover, .s-textarea:hover { border-color: color-mix(in srgb, var(--s-primary) 40%, var(--s-border-strong)); }
.s-input:focus, .s-select:focus, .s-textarea:focus { outline: none; border-color: var(--s-primary); box-shadow: var(--s-ring); }

/* The switch: a checkbox that looks like what it is. */
.s-switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 700; }
.s-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.s-switch .track { width: 44px; height: 26px; border-radius: 99px; background: var(--s-surface-3); border: 1px solid var(--s-border-strong);
  position: relative; transition: background var(--s-med) var(--s-ease), border-color var(--s-med); flex: none; }
.s-switch .track::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: var(--s-shadow-sm); transition: inset-inline-start var(--s-med) var(--s-ease-out); }
.s-switch input:checked + .track { background: var(--s-primary); border-color: var(--s-primary); }
.s-switch input:checked + .track::after { inset-inline-start: 20px; }
.s-switch input:focus-visible + .track { box-shadow: var(--s-ring); }

/* ---------- Cards ---------- */
.s-card { background: var(--s-surface); border: 1px solid var(--s-border); border-radius: var(--s-r-lg); box-shadow: var(--s-shadow-sm); padding: clamp(18px, 2.4vw, 26px); }
.s-card--flat { box-shadow: none; }
.s-card--raised { box-shadow: var(--s-shadow); }
.s-card__head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.s-card__title { margin: 0; font-size: 1.06rem; font-weight: 800; }
.s-card__desc { margin: 4px 0 0; font-size: .88rem; line-height: 1.8; color: var(--s-text-2); }
.s-card__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--s-primary-soft); color: var(--s-primary); }
.s-card__icon.accent { background: var(--s-accent-soft); color: var(--s-accent); }

/* ---------- Badges, chips ---------- */
.s-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px;
  font-size: .72rem; font-weight: 800; line-height: 1; background: var(--s-surface-2); color: var(--s-text-2); white-space: nowrap; }
.s-badge--primary { background: var(--s-primary-soft); color: var(--s-primary); }
.s-badge--accent { background: var(--s-accent); color: #fff; }
.s-badge--success { background: var(--s-success-soft); color: var(--s-success); }
.s-badge--warning { background: var(--s-warning-soft); color: var(--s-warning); }
.s-badge--danger { background: var(--s-danger-soft); color: var(--s-danger); }
.s-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- Alerts ---------- */
.s-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--s-r);
  border: 1px solid var(--s-primary-line); background: var(--s-primary-soft); color: var(--s-text); font-size: .9rem; line-height: 1.8; }
.s-alert > .s-icon { color: var(--s-primary); margin-top: 3px; }
.s-alert b, .s-alert strong { display: block; font-weight: 800; }
.s-alert--success { border-color: color-mix(in srgb, var(--s-success) 30%, transparent); background: var(--s-success-soft); }
.s-alert--success > .s-icon { color: var(--s-success); }
.s-alert--warning { border-color: color-mix(in srgb, var(--s-warning) 30%, transparent); background: var(--s-warning-soft); }
.s-alert--warning > .s-icon { color: var(--s-warning); }
.s-alert--danger { border-color: color-mix(in srgb, var(--s-danger) 30%, transparent); background: var(--s-danger-soft); }
.s-alert--danger > .s-icon { color: var(--s-danger); }

/* ---------- Empty state ---------- */
.s-empty { text-align: center; padding: 34px 16px; color: var(--s-text-2); font-size: .9rem; }
.s-empty .s-empty__icon { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center;
  background: var(--s-surface-2); color: var(--s-text-3); }
.s-empty b { display: block; color: var(--s-text); font-size: 1rem; margin-bottom: 4px; }

/* ---------- App header (panel, dashboard, funnel) ---------- */
.s-appbar { position: sticky; top: 0; z-index: 40; backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--s-bg) 78%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--s-border) 70%, transparent); }
.s-appbar__inner { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.s-appbar .brand-logo { height: 26px; }
.s-appbar__nav { display: flex; align-items: center; gap: 4px; }
.s-appbar__link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: var(--s-r-sm);
  font-size: .88rem; font-weight: 700; color: var(--s-text-2); text-decoration: none; transition: background var(--s-fast), color var(--s-fast); }
.s-appbar__link:hover { background: var(--s-surface-2); color: var(--s-text); }
.s-appbar__link.is-active { color: var(--s-text); background: var(--s-surface-2); }
.s-user { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--s-text-2); }
.s-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem;
  background: linear-gradient(135deg, var(--s-primary), var(--s-primary-strong)); color: #fff; flex: none; }

/* The theme switch: sun in the dark, moon in the light. */
.s-theme-toggle { position: relative; }
.s-theme-toggle .when-dark { display: none; }
:root[data-theme="dark"] .s-theme-toggle .when-dark { display: inline-block; }
:root[data-theme="dark"] .s-theme-toggle .when-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .s-theme-toggle .when-dark { display: inline-block; }
  :root:not([data-theme="light"]) .s-theme-toggle .when-light { display: none; }
}

/* ---------- Tabs (the panel's sections) ---------- */
.s-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--s-border); margin-bottom: 24px; }
.s-tabs::-webkit-scrollbar { display: none; }
.s-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; white-space: nowrap;
  font-size: .9rem; font-weight: 700; color: var(--s-text-2); text-decoration: none; border-radius: var(--s-r-sm) var(--s-r-sm) 0 0;
  transition: color var(--s-fast), background var(--s-fast); }
.s-tab:hover { color: var(--s-text); background: var(--s-surface-2); }
.s-tab.is-active { color: var(--s-primary); }
.s-tab.is-active::after { content: ""; position: absolute; inset-inline: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--s-primary); }
.s-tab .s-badge { height: 19px; padding: 0 7px; }

/* ---------- Page heading ---------- */
.s-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 28px 0 22px; }
.s-pagehead h1 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 900; }
.s-pagehead p { margin: 6px 0 0; color: var(--s-text-2); font-size: .92rem; }
.s-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 800; color: var(--s-primary);
  letter-spacing: .02em; }

/* ---------- Tiles (a grid of places to go) ---------- */
.s-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.s-tile { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--s-r); text-decoration: none;
  background: var(--s-surface); border: 1px solid var(--s-border); transition: border-color var(--s-fast), box-shadow var(--s-med) var(--s-ease), transform var(--s-med) var(--s-ease); }
.s-tile:hover { border-color: var(--s-primary-line); box-shadow: var(--s-shadow); transform: translateY(-2px); }
.s-tile .s-card__icon { width: 38px; height: 38px; }
.s-tile b { font-size: .98rem; color: var(--s-text); display: flex; align-items: center; gap: 8px; }
.s-tile span.d { font-size: .84rem; color: var(--s-text-2); line-height: 1.75; }

/* ---------- Skeleton & spinner ---------- */
.s-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: sSpin .7s linear infinite; display: inline-block; }
@keyframes sSpin { to { transform: rotate(360deg); } }

/* ---------- Motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Things older pages draw, in the new language ----------
   The legacy class names the funnel and panel still use, restyled so a
   page that has not been rewritten yet still looks like this system. */
.brand-footer { background: var(--s-surface); color: var(--s-text-2); border-top: 1px solid var(--s-border); }
.brand-footer a { color: var(--s-text); }
.brand-footer a:hover { color: var(--s-primary); }
.brand-footer .bl-ink { fill: var(--s-heading) !important; }
:root[data-theme="dark"] .brand-logo .bl-ink, :root[data-theme="dark"] .brand-lockup .bl-ink { fill: #F4F5FC; }
:root[data-theme="dark"] .brand-logo .bl-mark, :root[data-theme="dark"] .brand-lockup .bl-mark { fill: #7F95FF; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo .bl-ink, :root:not([data-theme="light"]) .brand-lockup .bl-ink { fill: #F4F5FC; }
  :root:not([data-theme="light"]) .brand-logo .bl-mark, :root:not([data-theme="light"]) .brand-lockup .bl-mark { fill: #7F95FF; }
}

/* ---------- Funnel header & step bar (partials/brand.html) ---------- */
.brand-topbar { max-width: 1160px; padding: 16px clamp(16px, 4vw, 32px) 0; }
.brand-topbar .tb-links { gap: 4px; }
.brand-topbar .tb-links a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 8px 12px; border-radius: var(--s-r-sm);
  color: var(--s-text-2); font-weight: 700; font-size: .86rem; }
.brand-topbar .tb-links a:hover { background: var(--s-surface-2); color: var(--s-text); }
.brand-steps li { color: var(--s-text-3); font-weight: 700; }
.brand-steps li::before { background: var(--s-surface); border-color: var(--s-border-strong); color: var(--s-text-3); box-shadow: var(--s-shadow-xs); }
.brand-steps li + li::after { background: var(--s-border); }
.brand-steps li.done::before { background: var(--s-primary-fill); border-color: var(--s-primary-fill); color: #fff; }
.brand-steps li.done + li::after, .brand-steps li.done::after { background: var(--s-primary); }
.brand-steps li.current { color: var(--s-heading); }
.brand-steps li.current::before { background: var(--s-primary-strong); border-color: var(--s-primary-strong); color: #fff;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--s-primary) 16%, transparent); }
:root[data-theme="dark"] .brand-steps li.current::before { background: var(--s-primary-fill); border-color: var(--s-primary-fill); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-steps li.current::before { background: var(--s-primary-fill); border-color: var(--s-primary-fill); } }

/* ---------- Footer ---------- */
.brand-footer { margin-top: 72px; padding: 40px clamp(16px, 4vw, 32px) 28px; text-align: start; font-size: .86rem; }
.brand-footer .bf-inner { max-width: 1160px; margin: 0 auto 26px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.brand-footer .bf-brand p { margin: 12px 0 0; color: var(--s-text-2); line-height: 1.9; }
.brand-footer .bf-brand .brand-logo { height: 28px; }
.brand-footer .bf-links { margin: 0; gap: 4px 18px; justify-content: flex-start; }
.brand-footer .bf-links a { color: var(--s-text-2); font-weight: 700; padding: 6px 2px; }
.brand-footer .bf-links a:hover { color: var(--s-primary); }
.brand-footer small { display: block; max-width: 1160px; margin: 0 auto; padding-top: 18px; border-top: 1px solid var(--s-border); color: var(--s-text-3); opacity: 1; }

/* ---------- The single-card pages of the funnel (login, create, details ...) ---------- */
.brand-main > .box, .box { background: var(--s-surface) !important; border: 1px solid var(--s-border) !important;
  box-shadow: var(--s-shadow-lg) !important; border-radius: var(--s-r-xl) !important; color: var(--s-text); }
.box h1 { color: var(--s-heading) !important; letter-spacing: -0.02em; }
.box p.hint, .box .hint { color: var(--s-text-2) !important; }
.box label { color: var(--s-text) !important; }
.box input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .box textarea, .box select {
  background: var(--s-surface) !important; color: var(--s-text) !important; border: 1px solid var(--s-border-strong) !important;
  border-radius: var(--s-r-sm) !important; }
.box input:focus, .box textarea:focus, .box select:focus { border-color: var(--s-primary) !important; box-shadow: var(--s-ring) !important; }
.box button[type="submit"], .box .btn-primary { background: var(--s-primary-fill) !important; color: #fff !important; border: 0 !important;
  border-radius: var(--s-r) !important; box-shadow: 0 12px 28px -14px color-mix(in srgb, var(--s-primary) 90%, transparent) !important; }
.box button[type="submit"]:hover { background: var(--s-primary-fill-hover) !important; transform: translateY(-1px) !important; }

/* The header's own buttons are not the page's buttons: older pages
   style every <button> as a big primary block. */
.brand-topbar .s-btn, .nav-actions .s-theme-toggle, .auth-top .s-theme-toggle, .s-appbar .s-theme-toggle {
  margin: 0 !important; width: 40px !important; min-height: 40px !important; height: 40px; padding: 0 !important;
  background: transparent !important; color: var(--s-text-2) !important; box-shadow: none !important; border: 0 !important;
  transform: none !important; border-radius: var(--s-r-sm) !important; }
.brand-topbar .s-btn:hover, .nav-actions .s-theme-toggle:hover, .auth-top .s-theme-toggle:hover, .s-appbar .s-theme-toggle:hover {
  background: var(--s-surface-2) !important; color: var(--s-text) !important; }

/* ---------- App bar extras: crumb and the account menu ---------- */
.s-appbar__sep { color: var(--s-text-3); font-weight: 300; }
.s-appbar__crumb { font-weight: 800; font-size: .92rem; color: var(--s-text); text-decoration: none; max-width: 36vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-appbar__crumb:hover { color: var(--s-primary); }
.s-usermenu { position: relative; }
.s-usermenu summary { list-style: none; cursor: pointer; border-radius: 50%; display: block; }
.s-usermenu summary::-webkit-details-marker { display: none; }
.s-usermenu summary:focus-visible { box-shadow: var(--s-ring); }
.s-usermenu__panel { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); width: 250px; padding: 8px; z-index: 60;
  background: var(--s-surface); border: 1px solid var(--s-border); border-radius: var(--s-r); box-shadow: var(--s-shadow-lg); }
.s-usermenu__who { padding: 10px 10px 12px; border-bottom: 1px solid var(--s-border); margin-bottom: 6px; }
.s-usermenu__who b { display: block; font-size: .92rem; }
.s-usermenu__who span { font-size: .78rem; color: var(--s-text-3); }
.s-usermenu__panel a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--s-r-sm);
  color: var(--s-text); text-decoration: none; font-size: .88rem; font-weight: 700; }
.s-usermenu__panel a:hover { background: var(--s-surface-2); }
.s-usermenu__panel a .s-icon { color: var(--s-text-3); }
.s-usermenu__panel a.danger { color: var(--s-danger); } .s-usermenu__panel a.danger .s-icon { color: var(--s-danger); }
@media (max-width: 640px) { .s-appbar__link span { display: none; } .s-appbar__crumb { max-width: 30vw; } }

/* =====================================================================
   The public header (partials/ui.html: site_header). One header for the
   landing, pricing and the menu product page.
   ===================================================================== */
.sh { position: sticky; top: 0; z-index: 50; isolation: isolate; }
.sh::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: color-mix(in srgb, var(--s-bg) 78%, transparent);
  backdrop-filter: saturate(170%) blur(18px); -webkit-backdrop-filter: saturate(170%) blur(18px);
  border-bottom: 1px solid var(--s-border); box-shadow: 0 10px 30px -24px rgba(22, 32, 127, .35);
  transition: opacity var(--s-med) var(--s-ease); }
.sh.is-scrolled::before, .sh.is-open::before { opacity: 1; }
.sh__in { display: flex; align-items: center; gap: 10px; height: 72px; transition: height var(--s-med) var(--s-ease); }
.sh.is-scrolled .sh__in { height: 60px; }
.sh__brand { display: inline-flex; align-items: center; flex: none; border-radius: var(--s-r-xs); }
.sh__brand .brand-logo { height: 26px; width: auto; transition: transform var(--s-med) var(--s-ease-out); }
.sh__brand:hover .brand-logo { transform: scale(1.04); }
.sh__brand .bl-mark { transition: fill var(--s-med); }
.sh__brand:hover .bl-mark { fill: var(--s-accent); }

.sh__nav { position: relative; display: flex; align-items: center; gap: 2px; margin-inline-start: 20px; padding: 4px;
  border-radius: var(--s-r-pill); background: color-mix(in srgb, var(--s-surface) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--s-border) 80%, transparent); }
.sh__nav a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border-radius: var(--s-r-pill); color: var(--s-text-2); text-decoration: none; font-size: .86rem; font-weight: 700;
  white-space: nowrap; transition: color var(--s-fast) var(--s-ease); }
.sh__nav a:hover, .sh__nav a.is-active { color: var(--s-heading); }
.sh__nav a.is-active { background: var(--s-surface); box-shadow: var(--s-shadow-xs); }
.sh__ink { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: var(--s-r-pill);
  background: var(--s-surface-2); opacity: 0; pointer-events: none;
  transition: left var(--s-med) var(--s-ease-out), width var(--s-med) var(--s-ease-out), opacity var(--s-fast); }
.sh__nav.has-ink .sh__ink { opacity: 1; }
.sh__new { font-size: .66rem; font-weight: 800; line-height: 1; padding: 3px 7px; border-radius: 99px; color: #fff;
  background: linear-gradient(135deg, var(--s-accent), #ff9a52); box-shadow: 0 4px 10px -4px var(--s-accent);
  animation: shPulse 2.6s var(--s-ease) infinite; }
@keyframes shPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

.sh__act { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.sh__link { padding: 8px 12px; border-radius: var(--s-r-sm); color: var(--s-text-2); text-decoration: none; font-size: .86rem; font-weight: 700;
  white-space: nowrap; transition: color var(--s-fast), background var(--s-fast); }
.sh__link:hover { color: var(--s-heading); background: var(--s-surface-2); }
.sh__cta { min-height: 40px; padding: 0 16px; font-size: .86rem; border-radius: var(--s-r-pill); position: relative; overflow: hidden; }
.sh__cta .s-icon { transition: transform var(--s-med) var(--s-ease-out); }
.sh__cta:hover .s-icon { transform: translateX(-3px); }
.sh .s-theme-toggle { width: 40px; min-height: 40px; border-radius: var(--s-r-pill); }
.sh .s-theme-toggle .s-icon { transition: transform .5s var(--s-ease-out); }
.sh .s-theme-toggle:hover .s-icon { transform: rotate(-24deg) scale(1.08); }

.sh__burger { display: none; width: 40px; min-height: 40px; flex-direction: column; gap: 4px; border-radius: var(--s-r-pill); }
.sh__burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--s-text); margin-inline: auto;
  transition: transform var(--s-med) var(--s-ease-out), opacity var(--s-fast); }
.sh.is-open .sh__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sh.is-open .sh__burger span:nth-child(2) { opacity: 0; }
.sh.is-open .sh__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.sh__sheet { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--s-med) var(--s-ease-out); }
.sh__sheet > .s-container { overflow: hidden; }
.sh.is-open .sh__sheet { grid-template-rows: 1fr; }
.sh__sheet a:not(.s-btn) { display: flex; align-items: center; gap: 8px; padding: 14px 4px; border-bottom: 1px solid var(--s-border);
  color: var(--s-heading); text-decoration: none; font-weight: 800; font-size: .95rem;
  opacity: 0; transform: translateY(-6px); transition: opacity var(--s-med), transform var(--s-med) var(--s-ease-out); }
.sh__sheet a:not(.s-btn) .s-icon { margin-inline-start: auto; color: var(--s-text-3); }
.sh__sheet a.is-active { color: var(--s-primary); }
.sh.is-open .sh__sheet a:not(.s-btn) { opacity: 1; transform: none; }
.sh.is-open .sh__sheet a:nth-child(2) { transition-delay: .03s; } .sh.is-open .sh__sheet a:nth-child(3) { transition-delay: .06s; }
.sh.is-open .sh__sheet a:nth-child(4) { transition-delay: .09s; } .sh.is-open .sh__sheet a:nth-child(5) { transition-delay: .12s; }
.sh__sheet-act { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 0 20px; }

@media (max-width: 960px) {
  .sh__nav { display: none; }
  .sh__burger { display: inline-flex; }
  .sh__in { height: 64px; }
}
@media (max-width: 520px) {
  .sh__link { display: none; }
  .sh__cta { padding: 0 12px; }
  .sh__cta .s-icon { display: none; }
}
@media (min-width: 961px) { .sh__sheet { display: none; } }

/* The app bar, in the same language as the public header. */
.s-appbar__inner { gap: 10px; }
.s-appbar__nav { margin-inline-start: 14px; padding: 4px; border-radius: var(--s-r-pill); gap: 2px;
  background: color-mix(in srgb, var(--s-surface) 70%, transparent); border: 1px solid color-mix(in srgb, var(--s-border) 80%, transparent); }
.s-appbar__link { border-radius: var(--s-r-pill); padding: 7px 14px; font-size: .84rem; }
.s-appbar__link.is-active { background: var(--s-surface); color: var(--s-heading); box-shadow: var(--s-shadow-xs); }
.s-appbar__link .s-icon { transition: transform var(--s-med) var(--s-ease-out); }
.s-appbar__link:hover .s-icon { transform: translateY(-1px) scale(1.1); }
.s-avatar { transition: transform var(--s-med) var(--s-ease-out), box-shadow var(--s-med); }
.s-usermenu summary:hover .s-avatar, .s-usermenu[open] .s-avatar { transform: scale(1.06); box-shadow: 0 0 0 4px var(--s-primary-soft); }
.s-usermenu[open] .s-usermenu__panel { animation: sPop .22s var(--s-ease-out) both; transform-origin: top left; }
@media (max-width: 640px) { .s-appbar__nav { margin-inline-start: 4px; } .s-appbar__link { padding: 7px 10px; } }

/* The funnel's header. */
.brand-topbar { margin-inline: auto; }
.brand-topbar .tb-links a { border-radius: var(--s-r-pill); transition: background var(--s-fast), color var(--s-fast); }

.brand-footer .bf-inner, .brand-footer small { max-width: 1096px; }
.brand-footer .bf-links a { position: relative; }
.brand-footer .bf-links a::after { content: ""; position: absolute; inset-inline: 2px; bottom: 2px; height: 2px; border-radius: 2px;
  background: var(--s-primary); transform: scaleX(0); transition: transform var(--s-med) var(--s-ease-out); }
.brand-footer .bf-links a:hover::after { transform: scaleX(1); }

/* =====================================================================
   Type: the brand face runs large for its size, so the whole scale is
   set a step down, and the biggest headings are capped.
   ===================================================================== */
@media (min-width: 900px) { html { font-size: 15px; } }
body { line-height: 1.75; }

/* =====================================================================
   Motion. static/sowp-motion.js marks what to reveal; everything here
   is off under prefers-reduced-motion (the rule further up).
   ===================================================================== */
@keyframes sPageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sPop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sFadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes sShine { from { transform: translateX(-130%); } to { transform: translateX(130%); } }

body > main, body > .s-container, body > .wrap, .brand-main, .box { animation: sPageIn .55s var(--s-ease-out) both; }
.sh, .s-appbar, .brand-topbar { animation: sPop .5s var(--s-ease-out) both; }

.s-js .s-rv { opacity: 0; transform: translateY(22px); }
.s-js .s-rv.is-in { animation: sFadeUp .7s var(--s-ease-out) both; animation-delay: var(--rv-d, 0s); }

/* Buttons: a lift, a pressed state and a light that runs across the
   primary ones. */
.s-btn { transition: background var(--s-fast) var(--s-ease), border-color var(--s-fast) var(--s-ease), color var(--s-fast) var(--s-ease),
  box-shadow var(--s-med) var(--s-ease), transform var(--s-med) var(--s-ease-out); }
.s-btn:hover { transform: translateY(-1px); }
.s-btn:active { transform: translateY(1px) scale(.98); transition-duration: .06s; }
.s-btn--ghost:hover, .s-btn--icon:hover { transform: none; }
.s-btn--primary, .s-btn--accent { position: relative; overflow: hidden; }
.s-btn--primary::after, .s-btn--accent::after { content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-130%);
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .3) 50%, transparent 80%); }
.s-btn--primary:hover::after, .s-btn--accent:hover::after { animation: sShine .75s var(--s-ease-out); }
.s-btn .s-icon { transition: transform var(--s-med) var(--s-ease-out); }

/* Cards and tiles rise under the pointer. */
.s-card { transition: box-shadow var(--s-med) var(--s-ease), border-color var(--s-med), transform var(--s-med) var(--s-ease-out); }
a.s-card:hover, .s-card--hover:hover { transform: translateY(-3px); box-shadow: var(--s-shadow); border-color: var(--s-primary-line); }
.s-tab::after { transition: transform var(--s-med) var(--s-ease-out); }
.s-tab.is-active::after { animation: sGrow .35s var(--s-ease-out) both; }
@keyframes sGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.s-alert { animation: sPop .4s var(--s-ease-out) both; }
.s-input, .s-select, .s-textarea { transition: border-color var(--s-fast), box-shadow var(--s-med) var(--s-ease), background var(--s-fast), transform var(--s-med); }
.s-badge { transition: transform var(--s-med) var(--s-ease-out); }
details > summary { transition: color var(--s-fast); }
details[open] > summary ~ * { animation: sPop .3s var(--s-ease-out) both; }
a { transition: color var(--s-fast); }

/* =====================================================================
   Spoons (partials/ui.html: spoon_meter) -- owner pages only.
   ===================================================================== */
@keyframes spFill { from { width: 0; } }
.spm { display: grid; gap: 14px; padding: 18px; border-radius: var(--s-r-lg); background: var(--s-surface);
  border: 1px solid var(--s-border); box-shadow: var(--s-shadow-sm); }
.spm__head { display: flex; align-items: center; gap: 12px; }
.spm__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--s-accent-soft), var(--s-primary-soft)); color: var(--s-accent); }
.spm__ico .s-icon { animation: spStir 3.2s var(--s-ease) infinite; transform-origin: 70% 70%; }
@keyframes spStir { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-14deg); } 90% { transform: rotate(8deg); } }
.spm__title b { display: block; font-size: .98rem; color: var(--s-heading); }
.spm__title small { color: var(--s-text-3); font-size: .78rem; }
.spm__nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.spm__nums div { background: var(--s-surface-2); border-radius: var(--s-r); padding: 10px 12px; display: grid; gap: 2px; }
.spm__nums span { font-size: .74rem; color: var(--s-text-3); font-weight: 700; }
.spm__nums b { font-size: 1.35rem; font-weight: 900; color: var(--s-heading); line-height: 1.3; }
.spm__nums div:first-child b { color: var(--s-primary); }
.spm__bar, .spm-chip__bar { display: block; height: 8px; border-radius: 99px; background: var(--s-surface-3); overflow: hidden; }
.spm__bar > span, .spm-chip__bar > i { display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--s-primary), #7A5CFF 60%, var(--s-accent));
  animation: spFill 1s var(--s-ease-out) both; transition: width .6s var(--s-ease-out); }
.spm.is-low .spm__bar > span, .spm-chip.is-low .spm-chip__bar > i { background: var(--s-warning); }
.spm.is-empty .spm__bar > span, .spm-chip.is-empty .spm-chip__bar > i { background: var(--s-danger); }
.spm.is-low .spm__nums div:first-child b { color: var(--s-warning); }
.spm.is-empty .spm__nums div:first-child b { color: var(--s-danger); }
.spm__by { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .84rem; }
.spm__by li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--s-border); }
.spm__by li span { color: var(--s-text-2); }
.spm__note { margin: 0; font-size: .82rem; color: var(--s-warning); font-weight: 700; }
.spm.is-empty .spm__note { color: var(--s-danger); }
.spm__acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spm__hint { font-size: .76rem; color: var(--s-text-3); }

.spm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; text-decoration: none;
  background: var(--s-surface-2); border: 1px solid var(--s-border); color: var(--s-text-2); font-size: .78rem; font-weight: 700;
  white-space: nowrap; transition: border-color var(--s-fast), transform var(--s-med) var(--s-ease-out), box-shadow var(--s-med); }
.spm-chip:hover { border-color: var(--s-primary-line); transform: translateY(-1px); box-shadow: var(--s-shadow-sm); }
.spm-chip .s-icon { color: var(--s-accent); }
.spm-chip b { color: var(--s-heading); font-weight: 900; }
.spm-chip.is-low b { color: var(--s-warning); }
.spm-chip.is-empty b { color: var(--s-danger); }
.spm-chip__bar { width: 44px; height: 5px; }
.spm-chip.is-bump { animation: spBump .5s var(--s-ease-out); }
@keyframes spBump { 40% { transform: scale(1.08); } }

/* =====================================================================
   Password fields (sowp-motion.js: passwordField).
   ===================================================================== */
.pw { position: relative; display: block; }
/* A password is typed left to right and read in Latin digits: the brand
   face draws 1403 as ۱۴۰۳, which is not what the owner typed. */
.pw > input { width: 100%; direction: ltr; text-align: left; font-family: var(--s-font-latin) !important;
  padding-left: 46px !important; letter-spacing: .02em; }
.pw-eye { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
  display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--s-text-3);
  cursor: pointer; transition: color var(--s-fast), background var(--s-fast); padding: 0 !important; margin: 0 !important;
  box-shadow: none !important; min-height: 0 !important; }
.pw-eye:hover { color: var(--s-primary); background: var(--s-primary-soft); }
.pw-eye__lid { transform-origin: 12px 12px; transition: transform .3s var(--s-ease-out); }
.pw-eye__ball { transform-origin: 12px 12px; transition: transform .3s var(--s-ease-out), opacity .2s; }
.pw-eye__slash { stroke-dasharray: 23; stroke-dashoffset: 0; transition: stroke-dashoffset .35s var(--s-ease-out); }
.pw.is-shown .pw-eye { color: var(--s-primary); }
.pw.is-shown .pw-eye__slash { stroke-dashoffset: 23; }
.pw.is-shown .pw-eye__ball { animation: pwLook .6s var(--s-ease-out); }
@keyframes pwLook { 30% { transform: translateX(-2px); } 65% { transform: translateX(2px); } }
.pw-eye:active .pw-eye__lid { transform: scaleY(.15); }
.pw-caps { position: absolute; left: 46px; top: 50%; transform: translateY(-50%) scale(.9); opacity: 0; pointer-events: none;
  font-size: .7rem; font-weight: 800; color: var(--s-warning); background: var(--s-warning-soft); padding: 2px 8px; border-radius: 99px;
  transition: opacity .2s, transform .25s var(--s-ease-out); direction: ltr; }
.pw.is-caps .pw-caps { opacity: 1; transform: translateY(-50%) scale(1); }
.pw.is-valid > input { border-color: color-mix(in srgb, var(--s-success) 55%, var(--s-border-strong)) !important; }

.pw-meter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; margin-top: 10px;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s var(--s-ease-out), opacity .3s; }
.pw-meter.is-typing, .pw-meter:focus-within { max-height: 220px; opacity: 1; }
form:focus-within .pw-meter { max-height: 220px; opacity: 1; }
.pw-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.pw-bar i { height: 6px; border-radius: 99px; background: var(--s-surface-3); position: relative; overflow: hidden; }
.pw-bar i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; transform: scaleX(0); transform-origin: right;
  background: var(--pw-c, var(--s-danger)); transition: transform .35s var(--s-ease-out), background .3s; }
.pw-meter[data-score="1"] { --pw-c: var(--s-danger); }
.pw-meter[data-score="2"] { --pw-c: var(--s-warning); }
.pw-meter[data-score="3"] { --pw-c: #3aa76d; }
.pw-meter[data-score="4"] { --pw-c: var(--s-success); }
.pw-meter[data-score="1"] .pw-bar i:nth-child(-n+1)::after,
.pw-meter[data-score="2"] .pw-bar i:nth-child(-n+2)::after,
.pw-meter[data-score="3"] .pw-bar i:nth-child(-n+3)::after,
.pw-meter[data-score="4"] .pw-bar i::after { transform: scaleX(1); }
.pw-bar i:nth-child(2)::after { transition-delay: .05s; } .pw-bar i:nth-child(3)::after { transition-delay: .1s; }
.pw-bar i:nth-child(4)::after { transition-delay: .15s; }
.pw-meter[data-score="4"] .pw-bar i::after { animation: pwGlow 1.2s var(--s-ease) .2s; }
@keyframes pwGlow { 50% { filter: brightness(1.25); } }
.pw-word { font-size: .76rem; font-weight: 800; color: var(--pw-c, var(--s-text-3)); min-width: 4.5em; text-align: end; transition: color .3s; }
.pw-rules { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.pw-rules li { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--s-text-3); transition: color .25s; }
.pw-rules svg circle { fill: none; stroke: currentColor; stroke-width: 1.4; opacity: .5; transition: fill .3s, stroke .3s, opacity .3s; }
.pw-rules svg path { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 12; stroke-dashoffset: 12; transition: stroke-dashoffset .35s var(--s-ease-out) .05s; }
.pw-rules li.is-ok { color: var(--s-success); }
.pw-rules li.is-ok svg { animation: pwPop .35s var(--s-ease-out); }
.pw-rules li.is-ok svg circle { fill: var(--s-success); stroke: var(--s-success); opacity: 1; }
.pw-rules li.is-ok svg path { stroke-dashoffset: 0; }
@keyframes pwPop { 50% { transform: scale(1.3); } }
.pw-meter.is-shake { animation: pwShake .45s var(--s-ease); }
@keyframes pwShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (max-width: 420px) { .pw-rules { grid-template-columns: 1fr; } }

/* ---------- Phones: the small things that looked broken ---------- */
/* The page name after the logo was cut to two letters and an ellipsis on
   a phone; the page says its own name in its heading anyway. */
@media (max-width: 560px) { .s-appbar__sep, .s-appbar__crumb { display: none; } }
/* A row of page actions: on a phone, buttons share the row evenly
   instead of one breaking alone onto a line of its own. */
@media (max-width: 560px) {
  .s-pagehead > .s-row, .dash-head > .s-row, .s-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .s-pagehead > .s-row > .s-btn, .dash-head > .s-row > .s-btn, .s-actions > .s-btn { width: 100%; justify-content: center; padding-inline: 10px; }
  /* a meter or a chip in the row gets a line of its own above the buttons */
  .s-pagehead > .s-row > :not(.s-btn), .dash-head > .s-row > :not(.s-btn) { grid-column: 1 / -1; justify-self: start; }
}
/* A file field is drawn by the browser in English ("Choose File / No file
   chosen"). The button part is ours now; the file name stays. */
input[type="file"] { font: inherit; font-size: .82rem; color: var(--s-text-2); max-width: 100%; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 800; font-size: .84rem; margin-inline-end: 10px;
  padding: 8px 14px; border-radius: var(--s-r-sm); border: 1px solid var(--s-border-strong); background: var(--s-surface);
  color: var(--s-text); cursor: pointer; }
input[type="file"]::file-selector-button:hover { border-color: var(--s-primary); color: var(--s-primary); }

/* ---------- The 6-digit code ---------- */
/* One real input (so a phone can fill the code from the SMS, and paste
   works) over six drawn boxes. */
.otp { position: relative; direction: ltr; }
.otp input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; border: 0; padding: 0;
  caret-color: transparent; z-index: 2; cursor: text; }
.otp-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp-boxes span { display: grid; place-items: center; aspect-ratio: 1 / 1.15; max-height: 64px; border-radius: var(--s-r);
  border: 1.5px solid var(--s-border-strong); background: var(--s-surface); font-size: clamp(1.3rem, 6vw, 1.7rem); font-weight: 900;
  color: var(--s-heading); transition: border-color .15s, box-shadow .15s, background .2s, transform .15s; }
.otp.is-focus .otp-boxes span.is-next { border-color: var(--s-primary); box-shadow: var(--s-ring); }
.otp-boxes span.is-filled { border-color: var(--s-primary-line); animation: otpPop .18s var(--s-ease-out); }
.otp.is-busy .otp-boxes span { border-color: var(--s-primary); background: var(--s-primary-soft); }
.otp.is-ok .otp-boxes span { border-color: var(--s-success); background: var(--s-success-soft); color: var(--s-success); }
.otp.is-error .otp-boxes span { border-color: var(--s-danger); background: var(--s-danger-soft); color: var(--s-danger); }
.otp.is-error .otp-boxes { animation: pwShake .45s var(--s-ease); }
.otp-note { min-height: 1.6em; margin: 10px 0 0; font-size: .86rem; font-weight: 700; text-align: center; color: var(--s-text-3); }
.otp-note.is-error { color: var(--s-danger); }
.otp-note.is-ok { color: var(--s-success); }
@keyframes otpPop { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .otp-boxes span, .otp.is-error .otp-boxes { animation: none; } }
/* static/sowp-motion.js: the Persian file field */
.s-file { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-width: 0; }
.s-file__input { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.s-file__btn { flex: none; }
.s-file__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; color: var(--s-text-3); }
.s-file.has-file .s-file__name { color: var(--s-text); font-weight: 700; }
/* The file name wraps under its button rather than running out of a card. */
.s-file { flex-wrap: wrap; row-gap: 4px; }
.s-file__name { max-width: 100%; }
.imgpick > div { min-width: 0; }
/* A row of tabs: on a wide screen every tab is on screen (the last one used
   to be cut at the edge, "م…"); on a phone it still scrolls sideways, with
   the far edge fading so it reads as "more this way", not as cut text. */
@media (min-width: 900px) { .s-tabs { flex-wrap: wrap; overflow-x: visible; } }
@media (max-width: 899px) {
  .s-tabs { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); padding-inline-end: 24px; }
}

/* =====================================================================
   FOUNDATION v2 (1.5.0) -- minimal, calm, Persian-first.
   ---------------------------------------------------------------------
   Last in the file so it wins every tie with the layers above, which
   stay for the pages that still read their names. What it settles:

   TYPE (Bon everywhere, Persian rules)
     * No letter-spacing on Persian: tracking pulls the joined letters of
       a cursive script apart. Latin runs (.ltr, [dir=ltr]) keep theirs.
     * Body 16px on every screen (the 15px desktop root is gone), line
       height 1.85 for running text, 1.45 for headings; nothing under
       12px.
     * Weights carry hierarchy, a few of them: 400 text, 600 labels and
       tabs, 700 buttons and titles, 800 the page heading only.
   COLOUR (contrast measured, WCAG AA / Apple HIG)
     * --s-text-3 #676E8C light (5.0:1 on white), #8C93B4 dark (6.0:1).
     * Text on a coloured fill passes: badges become soft fills with an
       ink colour; the primary fill in dark mode is #4A63E8 (4.95:1 with
       white) instead of #6F87FF (3.2:1).
     * prefers-contrast: more darkens text and borders further.
   SURFACES
     * No colour blobs behind pages, no shadow under cards: a 1px line
       separates, space groups. One raised thing per page at most.
   CONTROLS
     * 44px targets on touch screens, fields 48px tall at 16px.
     * Buttons press, they do not shine or float.
   MOTION
     * Nothing animates on every page view or forever; what is left is
       short and tied to a person's action.
   ===================================================================== */

:root {
  --s-text-3: #676E8C;
  --s-danger: #C42828;
  --s-success-ink: #0F7A50;
  --s-accent-ink: #A9480C;
  --s-primary-fill: #4260E6;
  --s-primary-fill-hover: #3450D4;
  --s-on-success: #FFFFFF;
  --s-bg-grad: none;
  --s-r-sm: 10px;
  --s-r: 14px;
  --s-r-lg: 18px;
  --s-fs-xs: .75rem;    /* 12  captions, badges */
  --s-fs-sm: .875rem;   /* 14  secondary text, labels */
  --s-fs: 1rem;         /* 16  body, buttons, fields */
  --s-fs-lg: 1.125rem;  /* 18  card titles, lead */
  --s-fs-xl: 1.375rem;  /* 22  section headings */
  --s-fs-2xl: clamp(1.6rem, 3.2vw, 2rem);   /* 26-32 page headings */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --s-text-3: #8C93B4; --s-danger: #FF6B6B; --s-success-ink: #3CCB8B; --s-accent-ink: #FFB37F;
    --s-primary-fill: #4A63E8; --s-primary-fill-hover: #5A72EE; --s-on-success: #06281A; --s-bg-grad: none;
  }
}
:root[data-theme="dark"] {
  --s-text-3: #8C93B4; --s-danger: #FF6B6B; --s-success-ink: #3CCB8B; --s-accent-ink: #FFB37F;
  --s-primary-fill: #4A63E8; --s-primary-fill-hover: #5A72EE; --s-on-success: #06281A; --s-bg-grad: none;
}
@media (prefers-contrast: more) {
  :root { --s-text-2: #3B415C; --s-text-3: #4A5070; --s-border: #B9BFD3; --s-border-strong: #8C93AE; }
  :root[data-theme="dark"] { --s-text-2: #CDD1E6; --s-text-3: #B3B8D2; --s-border: #3F4670; --s-border-strong: #5A6292; }
}

/* ---------- Type ---------- */
html { font-size: 16px; }
@media (min-width: 900px) { html { font-size: 16px; } }
body { font-family: var(--s-font); font-size: var(--s-fs); line-height: 1.85; background: var(--s-bg); }
body *:not(.ltr):not([dir="ltr"]):not(code):not(kbd):not(pre) { letter-spacing: 0 !important; }
h1, h2, h3, h4 { line-height: 1.45; font-weight: 700; }
h1 { font-weight: 800; }
p { line-height: 1.85; }
b, strong { font-weight: 700; }
small { font-size: max(12px, .8em); }
.s-eyebrow { font-size: var(--s-fs-xs); font-weight: 600; }
.s-pagehead h1 { font-size: var(--s-fs-2xl); font-weight: 800; }
.s-pagehead p { font-size: var(--s-fs-sm); line-height: 1.8; }
.s-card__title { font-size: var(--s-fs-lg); font-weight: 700; }
.s-card__desc, .s-tile span.d { font-size: var(--s-fs-sm); }
.s-label { font-size: var(--s-fs-sm); font-weight: 600; }
.s-label small, .s-help { font-size: max(12px, .8rem); font-weight: 400; }
/* Persian quotes and numbers sit in the line, not above it. */
q { quotes: "«" "»"; }

/* ---------- Surfaces ---------- */
body, html { background: var(--s-bg); background-attachment: scroll; }
.s-card, .spm { box-shadow: none; border-color: var(--s-border); border-radius: var(--s-r-lg); }
.s-card--raised { box-shadow: var(--s-shadow-sm); }
a.s-card:hover, .s-card--hover:hover { transform: none; box-shadow: none; border-color: var(--s-primary-line); }
.s-tile { border-radius: var(--s-r); }
.s-tile:hover { transform: none; box-shadow: none; }
.s-card__icon { border-radius: 12px; }

/* ---------- Buttons ---------- */
.s-btn { min-height: 44px; font-size: .9375rem; font-weight: 700; border-radius: var(--s-r-sm); line-height: 1.2; }
.s-btn:hover { transform: none; }
.s-btn:active { transform: scale(.98); }
.s-btn--primary { --b-bg: var(--s-primary-fill); --b-fg: #fff; --b-bg-h: var(--s-primary-fill-hover); box-shadow: none; }
.s-btn--primary:hover { box-shadow: none; }
:root[data-theme="dark"] .s-btn--primary { --b-bg-h: #5A72EE; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .s-btn--primary { --b-bg-h: #5A72EE; } }
.s-btn--accent { box-shadow: none; }
.s-btn--primary::after, .s-btn--accent::after { content: none; }
.s-btn--sm { min-height: 36px; font-size: var(--s-fs-sm); border-radius: var(--s-r-sm); }
.s-btn--lg { min-height: 50px; font-size: var(--s-fs); }
.s-btn--icon { width: 44px; }
.s-btn--sm.s-btn--icon { width: 36px; }
@media (pointer: coarse) {
  .s-btn, .s-btn--sm { min-height: 44px; }
  .s-btn--sm.s-btn--icon, .s-btn--icon { width: 44px; min-width: 44px; }
  .s-tab { min-height: 44px; }
}

/* ---------- Fields ---------- */
.s-input, .s-select { min-height: 48px; font-size: var(--s-fs); border-radius: var(--s-r-sm); }
.s-textarea { font-size: var(--s-fs); line-height: 1.85; }

/* ---------- Badges, alerts ---------- */
.s-badge { height: 24px; padding: 0 10px; font-size: var(--s-fs-xs); font-weight: 700; }
.s-badge--accent { background: var(--s-accent-soft); color: var(--s-accent-ink); }
.s-badge--success { color: var(--s-success-ink); }
.s-alert { border: 0; padding: 12px 14px; font-size: var(--s-fs-sm); border-radius: var(--s-r); animation: none; }
.s-alert b, .s-alert strong { font-weight: 700; }

/* ---------- Tabs ---------- */
.s-tab { font-size: .9375rem; font-weight: 600; }
.s-tab.is-active { font-weight: 700; }

/* ---------- Header: names for icon-only links, room for a finger ---------- */
@media (max-width: 640px) {
  .s-appbar__link span { display: inline; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .s-appbar__link { min-width: 44px; min-height: 44px; justify-content: center; }
}
.s-usermenu summary { padding: 6px; margin: -6px; }
.brand-topbar .s-btn, .nav-actions .s-theme-toggle, .auth-top .s-theme-toggle, .s-appbar .s-theme-toggle, .sh .s-theme-toggle {
  width: 44px !important; min-height: 44px !important; height: 44px; }
.sh__burger { width: 44px; min-height: 44px; }
.sh__cta { min-height: 44px; }

/* ---------- Motion: only where a person did something ---------- */
body > main, body > .s-container, body > .wrap, .brand-main, .box, .sh, .s-appbar, .brand-topbar { animation: none; }
.sh__new, .spm__ico .s-icon { animation: none; }
.s-tab.is-active::after { animation: none; }
details[open] > summary ~ * { animation: none; }

/* An orange fill that text can sit on: white on the brand pumpkin is
   2.7:1, white on #C2410C is 5.2:1; in the dark, ink on #FF8A45 is 7.9:1. */
:root { --s-accent-fill: #C2410C; --s-on-accent: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s-accent-fill: #FF8A45; --s-on-accent: #1A1206; } }
:root[data-theme="dark"] { --s-accent-fill: #FF8A45; --s-on-accent: #1A1206; }
.s-btn--accent { --b-bg: var(--s-accent-fill); --b-fg: var(--s-on-accent); --b-bg-h: var(--s-accent-fill); }

/* =====================================================================
   DESIGN v3 (1.6.0) -- the landing's language, everywhere.

   Five brand colours (docs: Color.svg) and one rule for each:
     cobalt  #16207F  the night the dark pages sit in; deep headings
     indigo  #4260E6  links, focus, selection, the second button
     pumpkin #FE7524  the one main action on a screen, and the sunrise
     snow    #FAFAFA  the light page, and type on the dark one
     onyx    #0D0D0D  type on the light page, and hardware (phones)

   Both appearances on every page: the visitor's system setting, or the
   sun/moon button (theme_boot in partials/ui.html stores the choice).

   Contrast, measured:
     light  #0D0D0D on #FAFAFA 19.3:1 · --s-text-2 #464C66 8.4:1 ·
            --s-text-3 #676E8C 4.9:1 · indigo #4260E6 4.6:1
     dark   #FAFAFA on #05071A 18.9:1 · #B8BEDF 11.1:1 · #8E95BB 6.6:1 ·
            links #8EA2FF 7.6:1
     pumpkin buttons carry dark ink #1A1206: 7.4:1 (white would be 2.9:1)
   ===================================================================== */
:root {
  --s-bg: #FAFAFA;
  --s-bg-grad: radial-gradient(1200px 520px at 50% -14%, rgba(66, 96, 230, .10), transparent 70%);
  --s-surface: #FFFFFF;
  --s-surface-2: #F2F3F8;
  --s-surface-3: #E8EAF3;
  --s-overlay: rgba(5, 7, 26, .45);
  --s-border: #E5E7F0;
  --s-border-strong: #CED2E3;
  --s-text: #0D0D0D;
  --s-text-2: #464C66;
  --s-text-3: #676E8C;
  --s-heading: #0B0F2E;
  --s-primary: #4260E6;
  --s-primary-hover: #3450D4;
  --s-primary-strong: #16207F;
  --s-primary-soft: rgba(66, 96, 230, .10);
  --s-primary-line: rgba(66, 96, 230, .35);
  --s-primary-fill: #4260E6;
  --s-primary-fill-hover: #3450D4;
  --s-cta: #FE7524;
  --s-cta-hover: #FF8A45;
  --s-on-cta: #1A1206;
  --s-cta-glow: rgba(254, 117, 36, .55);
  --s-glass: rgba(255, 255, 255, .64);
  --s-glass-strong: rgba(255, 255, 255, .86);
  --s-glass-line: rgba(13, 13, 13, .09);
  --s-card-shine: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 40%);
  --s-card-shadow: 0 1px 2px rgba(11, 15, 46, .04), 0 22px 44px -32px rgba(22, 32, 127, .28);
  --s-spot: rgba(66, 96, 230, .10);
  --s-r-card: 24px;
  --s-r-ctl: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --s-bg: #05071A;
    --s-bg-grad: radial-gradient(1300px 600px at 50% -16%, rgba(22, 32, 127, .85), transparent 72%),
                 radial-gradient(800px 420px at 50% -8%, rgba(66, 96, 230, .22), transparent 70%);
    --s-surface: #0B1030; --s-surface-2: #10163C; --s-surface-3: #161D4A;
    --s-overlay: rgba(2, 3, 12, .62);
    --s-border: #1A2050; --s-border-strong: #283069;
    --s-text: #EEF0FA; --s-text-2: #B8BEDF; --s-text-3: #8E95BB; --s-heading: #FAFAFA;
    --s-primary: #8EA2FF; --s-primary-hover: #A9B8FF; --s-primary-strong: #C4CEFF;
    --s-primary-soft: rgba(66, 96, 230, .20); --s-primary-line: rgba(140, 165, 255, .45);
    --s-primary-fill: #4260E6; --s-primary-fill-hover: #4F6CF0;
    --s-glass: rgba(16, 22, 64, .52); --s-glass-strong: rgba(16, 22, 64, .84); --s-glass-line: rgba(255, 255, 255, .13);
    --s-card-shine: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .008));
    --s-card-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 30px 60px -40px rgba(0, 0, 0, .85);
    --s-spot: rgba(66, 96, 230, .20);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --s-bg: #05071A;
  --s-bg-grad: radial-gradient(1300px 600px at 50% -16%, rgba(22, 32, 127, .85), transparent 72%),
               radial-gradient(800px 420px at 50% -8%, rgba(66, 96, 230, .22), transparent 70%);
  --s-surface: #0B1030; --s-surface-2: #10163C; --s-surface-3: #161D4A;
  --s-overlay: rgba(2, 3, 12, .62);
  --s-border: #1A2050; --s-border-strong: #283069;
  --s-text: #EEF0FA; --s-text-2: #B8BEDF; --s-text-3: #8E95BB; --s-heading: #FAFAFA;
  --s-primary: #8EA2FF; --s-primary-hover: #A9B8FF; --s-primary-strong: #C4CEFF;
  --s-primary-soft: rgba(66, 96, 230, .20); --s-primary-line: rgba(140, 165, 255, .45);
  --s-primary-fill: #4260E6; --s-primary-fill-hover: #4F6CF0;
  --s-glass: rgba(16, 22, 64, .52); --s-glass-strong: rgba(16, 22, 64, .84); --s-glass-line: rgba(255, 255, 255, .13);
  --s-card-shine: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .008));
  --s-card-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 30px 60px -40px rgba(0, 0, 0, .85);
  --s-spot: rgba(66, 96, 230, .20);
  color-scheme: dark;
}
body { background: var(--s-bg-grad), var(--s-bg); background-repeat: no-repeat; background-attachment: scroll; }
html { scroll-padding-top: 84px; }

/* ---------- Buttons: three kinds, one radius ---------- */
.s-btn { border-radius: var(--s-r-ctl); min-height: 44px; }
.s-btn--sm { border-radius: 10px; }
.s-btn--lg { min-height: 50px; border-radius: var(--s-r-ctl); }
/* The main action is pumpkin in both themes and stays pumpkin under the
   pointer. At rest it sits flat (no orange glow); hover lifts it a
   little and lays a soft neutral shadow under it, slowly. */
.s-btn { transition: background-color .45s var(--s-ease-out), border-color .45s var(--s-ease-out), color .45s var(--s-ease-out),
  box-shadow .45s var(--s-ease-out), transform .45s var(--s-ease-out); }
.s-btn--primary, .s-btn--cta {
  --b-bg: var(--s-cta); --b-fg: var(--s-on-cta); --b-line: transparent; --b-bg-h: var(--s-cta-hover);
  box-shadow: 0 0 0 1px rgba(255, 170, 120, .45) inset, 0 0 0 rgba(13, 16, 40, 0); }
:root[data-theme="dark"] .s-btn--primary { --b-bg-h: var(--s-cta-hover); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .s-btn--primary { --b-bg-h: var(--s-cta-hover); } }
.s-btn:not(.s-btn--ghost):not(.s-btn--icon):hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--s-glass-line) inset, 0 14px 30px -14px rgba(13, 16, 40, .5); }
.s-btn--primary:hover, .s-btn--cta:hover { box-shadow: 0 0 0 1px rgba(255, 190, 150, .55) inset, 0 16px 32px -14px rgba(13, 16, 40, .55); }
:root[data-theme="dark"] .s-btn:not(.s-btn--ghost):not(.s-btn--icon):hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14) inset, 0 16px 34px -14px rgba(0, 0, 0, .8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .s-btn:not(.s-btn--ghost):not(.s-btn--icon):hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14) inset, 0 16px 34px -14px rgba(0, 0, 0, .8); } }
.s-btn:not(.s-btn--ghost):not(.s-btn--icon):active { transform: translateY(0) scale(.98); transition-duration: .08s; }
@media (prefers-reduced-motion: reduce) { .s-btn, .s-btn:hover { transition-duration: .01s; transform: none !important; } }
.s-btn--indigo { --b-bg: var(--s-primary-fill); --b-fg: #fff; --b-line: transparent; --b-bg-h: var(--s-primary-fill-hover);
  box-shadow: 0 0 0 1px rgba(160, 180, 255, .45) inset, 0 8px 28px -10px rgba(66, 96, 230, .55); }
.s-btn:not(.s-btn--primary):not(.s-btn--cta):not(.s-btn--indigo):not(.s-btn--ghost):not(.s-btn--danger):not(.s-btn--soft):not(.s-btn--accent):not(.s-btn--ink) {
  --b-bg: var(--s-glass); --b-line: var(--s-glass-line); --b-bg-h: var(--s-surface-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.s-btn .s-icon { transition: transform .25s var(--s-ease-out); }
.s-btn--primary:hover .s-icon[data-i="arrow-left"], .s-btn--cta:hover .s-icon[data-i="arrow-left"] { transform: translateX(-3px); }
.s-btn:active { transform: scale(.98); }

/* ---------- Surfaces: the landing's card ---------- */
.s-card { position: relative; border-radius: var(--s-r-card); background: var(--s-card-shine), var(--s-surface);
  border: 1px solid var(--s-border); box-shadow: var(--s-card-shadow); }
.s-card--glow { border-color: rgba(254, 117, 36, .45); box-shadow: 0 0 0 1px rgba(254, 117, 36, .2), 0 30px 80px -34px rgba(254, 117, 36, .5); }
.s-card[data-spot]::before, .v-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--s-spot), transparent 60%); transition: opacity .4s; }
.s-card[data-spot]:hover::before, .v-card:hover::before { opacity: 1; }

/* ---------- Fields ---------- */
.s-input, .s-select, .s-textarea { border-radius: var(--s-r-ctl); background: var(--s-surface); min-height: 46px; }
.s-input:focus, .s-select:focus, .s-textarea:focus { border-color: var(--s-primary); box-shadow: 0 0 0 4px var(--s-primary-soft); }
.s-switch input:checked + .track { background: var(--s-primary-fill); border-color: var(--s-primary-fill); }

/* ---------- Badges, tabs ---------- */
.s-badge { height: 24px; padding: 0 10px; }
.s-badge--cta { background: var(--s-cta); color: var(--s-on-cta); }

/* ---------- The public header: glass, links in the middle ---------- */
.sh { position: sticky; top: 0; z-index: 60; }
.sh::before { opacity: 1; background: transparent; border-bottom-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  transition: background .3s, border-color .3s; }
.sh.is-scrolled::before, .sh.is-open::before { background: var(--s-glass); border-bottom-color: var(--s-glass-line);
  backdrop-filter: saturate(170%) blur(18px); -webkit-backdrop-filter: saturate(170%) blur(18px); }
.sh__in { display: grid; grid-template-columns: 1fr auto 1fr; height: 68px; }
.sh.is-scrolled .sh__in { height: 62px; }
.sh__brand .brand-logo { height: 21px; }
.sh__nav { margin: 0; justify-self: center; background: transparent; border: 0; padding: 0; gap: 2px; }
.sh__nav a { padding: 10px 14px; border-radius: 10px; font-size: .9rem; font-weight: 600; color: var(--s-text-2); }
.sh__nav a:hover { color: var(--s-heading); }
.sh__nav a.is-active { background: var(--s-primary-soft); color: var(--s-heading); box-shadow: none; }
.sh__ink { top: 0; bottom: 0; border-radius: 10px; background: color-mix(in srgb, var(--s-text) 6%, transparent); }
.sh__act { margin: 0; justify-self: end; }
.sh__link { font-weight: 600; font-size: .9rem; }
.sh__cta { min-height: 40px; border-radius: 10px; padding: 0 16px; }
.sh .s-theme-toggle, .sh__burger { width: 44px; min-height: 44px; border-radius: 12px; }
.sh__burger { border: 1px solid var(--s-glass-line) !important; background: var(--s-glass) !important;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
/* The phone menu: a floating sheet of glass, not a drawer. */
.sh__sheet { position: absolute; top: calc(100% + 6px); left: 12px; right: 12px; display: block; grid-template-rows: none;
  padding: 8px; border-radius: 22px; background: var(--s-glass-strong); border: 1px solid var(--s-glass-line);
  backdrop-filter: saturate(180%) blur(26px); -webkit-backdrop-filter: saturate(180%) blur(26px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 30px 60px -20px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(-10px) scale(.98); transform-origin: top; visibility: hidden; pointer-events: none;
  transition: opacity .3s var(--s-ease-out), transform .3s var(--s-ease-out), visibility 0s .3s; }
.sh.is-open .sh__sheet { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity .3s var(--s-ease-out), transform .3s var(--s-ease-out); }
.sh__sheet > .s-container { overflow: visible; padding: 0; }
.sh__sheet a:not(.s-btn) { border: 0; border-radius: 12px; padding: 12px 14px; font-weight: 700; opacity: 1; transform: none; }
.sh__sheet a:not(.s-btn):hover { background: color-mix(in srgb, var(--s-text) 6%, transparent); }
.sh__sheet-act { padding: 10px 6px 6px; }
@media (max-width: 960px) { .sh__in { grid-template-columns: auto 1fr; } .sh__act { grid-column: 2; } }
@media (min-width: 961px) { .sh__sheet { display: none; } }
@media (prefers-reduced-transparency: reduce) {
  .sh.is-scrolled::before, .sh.is-open::before, .sh__sheet, .s-appbar, .brand-topbar { background: var(--s-surface) !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}

/* ---------- The panel's and the funnel's bars: the same glass ---------- */
.s-appbar { background: var(--s-glass); border-bottom-color: var(--s-glass-line); backdrop-filter: saturate(170%) blur(18px); -webkit-backdrop-filter: saturate(170%) blur(18px); }
.s-appbar .brand-logo { height: 21px; }
.s-appbar__nav { background: transparent; border: 0; padding: 0; }
.s-appbar__link { border-radius: 10px; font-weight: 600; }
.s-appbar__link.is-active { background: var(--s-primary-soft); color: var(--s-heading); box-shadow: none; }
.s-avatar { background: var(--s-cta); color: var(--s-on-cta); }
.s-usermenu__panel { border-radius: 18px !important; background: var(--s-glass-strong) !important; border: 1px solid var(--s-glass-line) !important;
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); }
.brand-topbar { position: sticky; top: 0; z-index: 40; max-width: none !important; width: 100%; box-sizing: border-box;
  background: var(--s-glass); border-bottom: 1px solid var(--s-glass-line);
  backdrop-filter: saturate(170%) blur(18px); -webkit-backdrop-filter: saturate(170%) blur(18px); }
.brand-topbar .brand-logo { height: 20px; }
.brand-steps li.done::before { background: var(--s-primary-fill); border-color: var(--s-primary-fill); color: #fff; }
.brand-steps li.current::before { background: var(--s-cta) !important; border-color: var(--s-cta) !important; color: var(--s-on-cta) !important;
  box-shadow: 0 6px 18px -6px var(--s-cta-glow); }

/* ---------- The funnel's single-card pages (login, create, details ...) ---------- */
.brand-main > .box, .box { border-radius: var(--s-r-card) !important; background: var(--s-card-shine), var(--s-surface) !important;
  box-shadow: var(--s-card-shadow) !important; }
.box input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .box textarea, .box select { border-radius: var(--s-r-ctl) !important; }
.box input:focus, .box textarea:focus, .box select:focus { box-shadow: 0 0 0 4px var(--s-primary-soft) !important; }
.box button[type="submit"], .box .btn-primary { background: var(--s-cta) !important; color: var(--s-on-cta) !important; border-radius: var(--s-r-ctl) !important;
  box-shadow: 0 0 0 1px rgba(255, 170, 120, .5) inset, 0 8px 28px -8px var(--s-cta-glow) !important; }
.box button[type="submit"]:hover, .box .btn-primary:hover { background: var(--s-cta-hover) !important; }

/* ---------- Footer (partials/brand.html: footer) ---------- */
/* A pane of glass over two soft lights: the pumpkin of the main action
   and the indigo of the brand, blurred through it. */
.sf { position: relative; isolation: isolate; overflow: hidden; margin-top: clamp(56px, 8vw, 96px); padding: clamp(28px, 4vw, 48px) 0 clamp(20px, 3vw, 32px); }
.sf__glow { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  /* Faded in from the top: overflow:hidden on .sf cut the light into a
     hard line along the footer's top edge (1.60.0). */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 45%); mask-image: linear-gradient(to bottom, transparent 0, #000 45%);
  background: radial-gradient(38% 60% at 82% 30%, rgba(66, 96, 230, .34), transparent 70%),
    radial-gradient(34% 55% at 16% 85%, rgba(254, 117, 36, .30), transparent 70%); }
.sf__glass { position: relative; padding: clamp(26px, 4vw, 48px) clamp(22px, 4vw, 48px) 22px; border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .28)); border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 30px 70px -40px rgba(22, 32, 127, .35);
  backdrop-filter: blur(26px) saturate(160%); -webkit-backdrop-filter: blur(26px) saturate(160%); }
:root[data-theme="dark"] .sf__glass { background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); border-color: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 30px 70px -40px rgba(0, 0, 0, .7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sf__glass { background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03));
  border-color: rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 30px 70px -40px rgba(0, 0, 0, .7); } }
@media (prefers-reduced-transparency: reduce) { .sf__glass { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--s-surface); } }
.sf__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, .6fr)) minmax(0, .7fr); gap: 32px; }
.sf__seal { display: inline-grid; place-items: center; min-width: 96px; min-height: 96px; padding: 6px; border-radius: 18px; background: #fff;
  box-shadow: 0 0 0 1px rgba(13, 13, 13, .06), 0 12px 30px -16px rgba(22, 32, 127, .4); }
.sf__seal img { display: block; max-width: 110px; height: auto; }
.sf__brand .brand-logo { height: 22px; }
.sf__brand h2 { margin: 18px 0 0; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; line-height: 1.45; color: var(--s-heading); }
.sf__brand p { margin: 8px 0 0; color: var(--s-text-3); font: 600 .9rem var(--s-font-latin); direction: ltr; text-align: right; }
.sf h3 { margin: 0 0 12px; font-size: .8rem; font-weight: 700; color: var(--s-text-3); }
.sf nav { display: grid; gap: 2px; }
.sf nav a { color: var(--s-text-2); text-decoration: none; padding: 6px 0; font-size: .92rem; transition: color .3s var(--s-ease-out); }
.sf nav a:hover { color: var(--s-cta); }
.sf__end { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--s-glass-line); font-size: .82rem; color: var(--s-text-3); }
@media (max-width: 1000px) { .sf__grid { grid-template-columns: 1fr 1fr 1fr; } .sf__brand { grid-column: 1 / -1; } }
@media (max-width: 640px) { .sf__grid { grid-template-columns: 1fr 1fr; } .sf__glass { border-radius: 22px; } }

/* =====================================================================
   Page building blocks for the public pages (v-*), shared by the
   landing, pricing, templates, help, blog, contact and about.
   ===================================================================== */
.v-wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 20px; box-sizing: border-box; }
.v-wrap--read { max-width: 760px; }
.v-sec { padding: clamp(48px, 7vw, 96px) 0; }
.v-sec--tight { padding: clamp(32px, 5vw, 56px) 0; }
.v-head { max-width: 680px; margin: 0 auto clamp(28px, 4vw, 44px); text-align: center; }
.v-head--start { margin-inline: 0; text-align: start; }
.v-display { margin: 0; font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 700; line-height: 1.32; color: var(--s-heading); }
.v-h1 { margin: 0; font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 700; line-height: 1.38; color: var(--s-heading); }
.v-h2 { margin: 0; font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 700; line-height: 1.42; color: var(--s-heading); }
.v-h3 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 700; line-height: 1.5; color: var(--s-heading); }
.v-lead { margin: 12px 0 0; color: var(--s-text-2); font-size: 1.06rem; line-height: 1.9; }
.v-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 5px 14px 5px 5px; border-radius: 999px;
  background: var(--s-glass); border: 1px solid var(--s-glass-line); font-size: .85rem; color: var(--s-text-2); text-decoration: none;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.v-eyebrow b { padding: 3px 12px; border-radius: 999px; background: var(--s-cta); color: var(--s-on-cta); font-weight: 700; }
.v-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.v-head .v-ctas { justify-content: center; }
.bw { font-family: var(--s-font-latin); font-weight: 700; direction: ltr; unicode-bidi: isolate; }

.v-hero { position: relative; padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); text-align: center; isolation: isolate; overflow: hidden; }
.v-hero .v-lead { max-width: 34rem; margin-inline: auto; }
.v-hero .v-ctas { justify-content: center; }
/* A small sunrise under a page's hero: the landing's signature, quieter. */
.v-sunrise { position: relative; height: 120px; margin-top: 28px; pointer-events: none; overflow: hidden; }
.v-sunrise::before { content: ""; position: absolute; left: 50%; top: 40px; width: min(1400px, 170vw); aspect-ratio: 1; border-radius: 50%; translate: -50% 0;
  background: var(--s-bg); box-shadow: inset 0 2px 0 rgba(255, 214, 186, .95), inset 0 16px 34px -14px rgba(254, 117, 36, .8),
    0 -8px 50px -6px rgba(254, 117, 36, .6), 0 -30px 140px 6px rgba(254, 117, 36, .2), 0 -50px 200px 40px rgba(66, 96, 230, .2); }

.v-card { position: relative; border-radius: var(--s-r-card); background: var(--s-card-shine), var(--s-surface); border: 1px solid var(--s-border);
  box-shadow: var(--s-card-shadow); overflow: hidden; isolation: isolate; }
.v-card::before { z-index: -1; }
.v-pad { padding: clamp(20px, 3vw, 28px); }
.v-grid { display: grid; gap: 16px; }
.v-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .v-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .v-grid--2, .v-grid--3 { grid-template-columns: 1fr; } }

.v-checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.v-checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--s-text-2); line-height: 1.8; }
.v-checks li::before { content: "✓"; flex: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 6px; display: grid; place-items: center;
  background: var(--s-cta); color: var(--s-on-cta); font-size: .78rem; font-weight: 800; box-shadow: 0 4px 14px -4px var(--s-cta-glow); }
.v-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--s-primary-soft);
  color: var(--s-primary); font-weight: 700; font-size: .82rem; }
.v-more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--s-primary); font-weight: 700; text-decoration: none; }
.v-more::after { content: "←"; transition: transform .25s var(--s-ease-out); }
.v-more:hover::after { transform: translateX(-4px); }

/* Questions, everywhere they appear. */
.v-faq { padding: 6px clamp(18px, 3vw, 24px); }
.v-faq details { border-bottom: 1px solid var(--s-border); }
.v-faq details:last-child { border-bottom: 0; }
.v-faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 700; color: var(--s-heading);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; }
.v-faq summary::-webkit-details-marker { display: none; }
.v-faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--s-surface-2); color: var(--s-text-2); font-size: 1.2rem; font-weight: 400; transition: transform .3s var(--s-ease-out), background .3s, color .3s; }
.v-faq details[open] summary::after { transform: rotate(45deg); background: var(--s-cta); color: var(--s-on-cta); }
.v-faq details > div, .v-faq details > p { color: var(--s-text-2); padding: 0 0 18px; margin: 0; line-height: 2; }

/* Reading: guides, posts, terms. */
.v-prose { font-size: 1.04rem; line-height: 2.1; color: var(--s-text); }
.v-prose h2 { margin: 36px 0 10px; font-size: 1.35rem; font-weight: 700; color: var(--s-heading); line-height: 1.6; scroll-margin-top: 90px; }
.v-prose h3 { margin: 26px 0 8px; font-size: 1.12rem; font-weight: 700; color: var(--s-heading); }
.v-prose p { margin: 0 0 16px; }
.v-prose ul, .v-prose ol { margin: 0 0 16px; padding-inline-start: 22px; }
.v-prose li { margin-bottom: 6px; }
.v-prose a { color: var(--s-primary); }
.v-prose blockquote { margin: 18px 0; padding: 14px 18px; border-inline-start: 3px solid var(--s-cta); background: var(--s-surface-2); border-radius: 12px; color: var(--s-text-2); }
/* A picture in a post (1.62.0): as wide as the text, its caption under it. */
.v-prose figure { margin: 22px 0; }
.v-prose figure img { display: block; width: 100%; height: auto; border-radius: 14px; }
.v-prose figcaption { margin-top: 8px; text-align: center; font-size: .86rem; color: var(--s-text-3); }
.v-prose img { max-width: 100%; border-radius: 16px; }
.v-prose code { font-family: 'JetBrains Mono', monospace; font-size: .9em; padding: 2px 6px; border-radius: 6px; background: var(--s-surface-2); direction: ltr; unicode-bidi: isolate; }

/* Reveal on scroll (static/sowp-motion.js marks .v-rv as .in). */
.s-js .v-rv { opacity: 0; transform: translateY(26px); filter: blur(6px); transition: opacity .9s var(--s-ease-out), transform .9s var(--s-ease-out), filter .9s var(--s-ease-out);
  transition-delay: var(--d, 0s); }
.s-js .v-rv.in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { .s-js .v-rv { opacity: 1; transform: none; filter: none; transition: none; } }

/* =====================================================================
   1.6.1 -- the design review (apple-design, design-taste-frontend,
   web-design-guidelines and the typeui premium/glass/bento skills).

   Rules this block enforces:
     * Focus you can see: a solid 2px indigo ring, 4.97:1 on the light
       page and 7.6:1 on the dark one (the old 20% halo was 1.3:1).
     * Pumpkin is the ONE main action of a screen. Checks, the open
       question, the avatar and tags go indigo or neutral.
     * Glass belongs to the floating layer (header, sheets, menus,
       controls over live content), not to buttons and labels in the
       page itself.
     * No Persian text under 13px; reveal moves only transform/opacity.
   ===================================================================== */
:focus-visible { outline: 2px solid var(--s-primary) !important; outline-offset: 2px !important; box-shadow: none; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 1px !important; }
.idea input:focus-visible { outline: none !important; }
.idea:focus-within { outline: 2px solid var(--s-primary); outline-offset: 2px; }

/* Skip to the content: first stop of the keyboard, out of sight otherwise. */
.s-skip { position: fixed; top: 10px; inset-inline-start: 10px; z-index: 300; padding: 10px 18px; border-radius: var(--s-r-ctl);
  background: var(--s-heading); color: var(--s-bg); font-weight: 700; text-decoration: none; transform: translateY(-180%);
  transition: transform .2s var(--s-ease-out); }
.s-skip:focus { transform: none; }
#main { scroll-margin-top: 84px; }
#main:focus { outline: none !important; }

/* Hit areas: the logo is a 44px target, as is the editor's home mark. */
.sh__brand, .s-appbar .brand-link, .brand-topbar .brand-link, .auth-top .brand-link { display: inline-flex; align-items: center; min-height: 44px; }
.szs-home { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; }
a, button, summary, label, input, select, textarea { touch-action: manipulation; }

/* Pumpkin for the main action only. */
.s-avatar { background: var(--s-primary-fill); color: #fff; }
.v-checks li::before { background: var(--s-primary-soft); color: var(--s-primary); box-shadow: none; }
.v-faq details[open] summary::after { background: var(--s-primary-soft); color: var(--s-primary); }
.v-eyebrow b { background: var(--s-primary-fill); color: #fff; }
.v-tag { color: var(--s-primary-hover); }                  /* 5.65:1 on its tint (was 4.35:1) */

/* Glass off the content layer: the plain button is a solid surface. */
.s-btn:not(.s-btn--primary):not(.s-btn--cta):not(.s-btn--indigo):not(.s-btn--ghost):not(.s-btn--danger):not(.s-btn--soft):not(.s-btn--accent):not(.s-btn--ink) {
  --b-bg: var(--s-surface); --b-line: var(--s-border-strong); --b-bg-h: var(--s-surface-2);
  backdrop-filter: none; -webkit-backdrop-filter: none; }
.v-eyebrow { background: var(--s-surface); border-color: var(--s-border); backdrop-filter: none; -webkit-backdrop-filter: none; }
.badge { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
@media (prefers-reduced-transparency: reduce) {
  .s-usermenu__panel, .sh__burger, .s-btn--ghost { background: var(--s-surface) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}
@media (prefers-contrast: more) {
  :root { --s-border: var(--s-border-strong); --s-glass-line: var(--s-border-strong); --s-text-3: var(--s-text-2); }
}

/* Reveal: transform and opacity only (filter is not composited). */
.s-js .v-rv { filter: none; transition: opacity .9s var(--s-ease-out), transform .9s var(--s-ease-out); transition-delay: var(--d, 0s); }

/* Type: 13px is the floor for Persian; headings break evenly; money aligns. */
:root { --s-fs-xs: .8125rem; }
.s-eyebrow, .s-badge, .badge, .s-label small, .s-help, .s-usermenu__who span, .spm__title small, .spm__nums span, .spm__hint,
.pw-word, .pw-rules li, .pw-caps, .sf h3, .job-plan, .plan__kicker, .price-note, .seg .off, .szs-hint { font-size: .8125rem; }
@media (min-width: 561px) { .brand-steps li { font-size: .8125rem; } }
@media (max-width: 560px) { .brand-steps li.current { font-size: .8125rem; } }
h1, h2, h3, .v-display, .v-h1, .v-h2, .v-h3 { text-wrap: balance; }
p, li, .v-lead { text-wrap: pretty; }
.price, .amt, .plan__price, .spm__nums b, [data-num] { font-variant-numeric: tabular-nums; }

/* Small phones (the responsive audit, 1.27.0): the logo and the light/dark
   button never give their width away to the links beside them -- at 320px
   the logo was squeezed to 10px and the button to 26px -- and the links
   keep their names for screen readers while showing only their icons. */
.brand-topbar .brand-link, .s-appbar .brand-link, .s-theme-toggle { flex: none; }
@media (max-width: 400px) {
  .brand-topbar .tb-links a span, .s-appbar__link span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .brand-topbar .tb-links a, .s-appbar__link { min-width: 44px; min-height: 44px; justify-content: center; }
}
/* Three icons, the logo, the light/dark button and the avatar do not fit
   320px. All three are a tap away already: the logo is the dashboard and
   the account menu has the menus and the plans. */
@media (max-width: 360px) { .s-appbar__nav { display: none; } }
/* A text link that is a control gets a finger-sized row. */
.auth-forgot, a.back { display: inline-flex; align-items: center; min-height: 44px; }
/* A small pill keeps its look; only the area that answers a tap grows. */
.job-plan { position: relative; }
.job-plan::after { content: ""; position: absolute; inset: -10px -4px; }

/* ===================================================================
   1.39.0 -- one colour for actions: orange.
   A main action is the CTA colour on every screen -- the panel's .btn,
   the old indigo buttons, and the submit buttons the build wizard's
   pages style for themselves. Blue stays for what it means elsewhere:
   links, focus, a selected day, the owner's own chat bubble.
   Secondary actions keep their outline (.ghost, .s-btn, .s-btn--soft).
   =================================================================== */
.s-btn--indigo { --b-bg: var(--s-cta); --b-fg: var(--s-on-cta); --b-bg-h: var(--s-cta-hover);
  box-shadow: 0 0 0 1px rgba(255, 170, 120, .45) inset; }
.btn:not(.ghost):not(.ghost-plain):not(.s-btn):not(.btn-new),
.create-submit,
.submit-bar button,
.box form > button[type="submit"]:not(.s-btn):not(.btn):not(.ghost),
.box > form button.create-submit {
  background: var(--s-cta) !important; color: var(--s-on-cta) !important; border-color: transparent !important;
  box-shadow: 0 0 0 1px rgba(255, 170, 120, .45) inset !important;
}
.btn:not(.ghost):not(.ghost-plain):not(.s-btn):not(.btn-new):hover,
.create-submit:hover,
.submit-bar button:hover,
.box form > button[type="submit"]:not(.s-btn):not(.btn):not(.ghost):hover {
  background: var(--s-cta-hover) !important;
  box-shadow: 0 0 0 1px rgba(255, 190, 150, .55) inset, 0 14px 30px -14px rgba(13, 16, 40, .5) !important;
}
.btn:not(.ghost):not(.ghost-plain):not(.s-btn):not(.btn-new):focus-visible,
.submit-bar button:focus-visible,
.box form > button[type="submit"]:focus-visible { outline: 3px solid var(--s-primary); outline-offset: 2px; }

/* Read by screen readers, not drawn (1.56.0). */
.s-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; }
