
    /* Icon base styles */
    
  .icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .icon-wrapper svg {
    width: 100%;
    height: 100%;
  }
  .icon-wrapper.w-4 { width: 1rem; height: 1rem; }
  .icon-wrapper.w-6 { width: 1.5rem; height: 1.5rem; }
  .icon-wrapper.w-8 { width: 2rem; height: 2rem; }
  .icon-wrapper.h-4 { width: 1rem; height: 1rem; }
  .icon-wrapper.h-6 { width: 1.5rem; height: 1.5rem; }
  .icon-wrapper.h-8 { width: 2rem; height: 2rem; }

  /* For feature cards that expect a .icon child with font-size sizing */
  .feature-card .icon svg,
  .api-card-icon svg {
    width: 1em;
    height: 1em;
  }

    
  .support-widget-backdrop[hidden],
  .support-widget-panel[hidden] {
    display: none;
  }
  .support-widget-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1098;
    background: var(--overlay);
  }
  .support-widget-panel {
    position: fixed;
    right: max(1.25rem, env(safe-area-inset-right));
    bottom: max(5.75rem, calc(env(safe-area-inset-bottom) + 5.75rem));
    z-index: 1099;
    display: flex;
    width: min(430px, calc(100vw - 2rem));
    height: min(680px, calc(100vh - 8rem));
    min-height: 420px;
    flex-direction: column;
    overflow: hidden;
    color: var(--text);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    transform-origin: bottom right;
    animation: support-widget-enter 160ms ease-out;
  }
  @keyframes support-widget-enter {
    from {
      opacity: 0;
      transform: translateY(10px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  .support-widget-header {
    display: flex;
    min-height: 60px;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.9rem;
    color: var(--text);
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border);
  }
  .support-widget-header-copy {
    min-width: 0;
    flex: 1;
  }
  .support-widget-header h2 {
    margin: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .support-widget-header-new-ticket {
    display: inline-flex;
    min-height: 36px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    color: var(--accent-fg);
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
  }
  .support-widget-header-new-ticket:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
  }
  .support-widget-header-new-ticket[hidden] {
    display: none;
  }
  .support-widget-header-button,
  .support-widget-header-link {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--text-3);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
  }
  .support-widget-header-button:hover,
  .support-widget-header-link:hover {
    color: var(--text);
    background: var(--hover-bg);
    text-decoration: none;
  }
  .support-widget-back-button[hidden] {
    display: none;
  }
  .support-widget-body {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg-subtle);
  }
  .support-widget-loading,
  .support-widget-empty,
  .support-widget-error {
    display: flex;
    min-height: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.8rem;
    padding: 2rem;
    text-align: center;
  }
  .support-widget-loading {
    color: var(--text-3);
    font-size: 0.85rem;
  }
  .support-widget-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 999px;
    animation: support-widget-spin 0.7s linear infinite;
  }
  @keyframes support-widget-spin {
    to {
      transform: rotate(360deg);
    }
  }
  .support-widget-error {
    color: var(--danger-text);
  }
  .support-widget-error p,
  .support-widget-empty p {
    max-width: 300px;
    margin: 0;
    color: var(--text-3);
    font-size: 0.85rem;
    line-height: 1.55;
  }
  .support-widget-primary,
  .support-widget-secondary {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
  }
  .support-widget-primary {
    color: var(--accent-fg);
    background: var(--accent);
    border: 1px solid var(--accent);
  }
  .support-widget-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
  }
  .support-widget-secondary {
    color: var(--text-2);
    background: var(--surface);
    border: 1px solid var(--border-strong);
  }
  .support-widget-secondary:hover:not(:disabled) {
    background: var(--surface-hover);
  }
  .support-widget-primary:disabled,
  .support-widget-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  .support-widget-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.8rem;
  }
  .support-widget-ticket {
    display: block;
    width: 100%;
    padding: 0.9rem;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease;
  }
  .support-widget-ticket:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
  }
  .support-widget-ticket.has-unread {
    border-color: var(--accent-border);
    box-shadow: inset 3px 0 0 var(--accent);
  }
  .support-widget-ticket-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .support-widget-ticket-subject {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .support-widget-ticket-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.45rem;
    color: var(--text-3);
    font-size: 0.72rem;
  }
  .support-widget-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.4;
  }
  .support-widget-status.open {
    color: var(--success-text);
    background: var(--success-soft);
    border-color: var(--success-border);
  }
  .support-widget-status.awaiting_reply {
    color: var(--warning-text);
    background: var(--warning-soft);
    border-color: var(--warning-border);
  }
  .support-widget-status.closed {
    color: var(--text-2);
    background: var(--bg-subtle);
  }
  .support-widget-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  .support-widget-field {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
  }
  .support-widget-field label {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 500;
  }
  .support-widget-field input,
  .support-widget-field textarea,
  .support-widget-field select,
  .support-widget-composer textarea {
    width: 100%;
    padding: 0.68rem 0.75rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    font: inherit;
    font-size: 0.82rem;
    line-height: 1.5;
  }
  .support-widget-field textarea {
    min-height: 130px;
    resize: vertical;
  }
  .support-widget-field input:focus,
  .support-widget-field textarea:focus,
  .support-widget-field select:focus,
  .support-widget-composer textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
  }
  .support-widget-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
  }
  .support-widget-thread {
    display: flex;
    min-height: 100%;
    flex-direction: column;
  }
  .support-widget-thread-meta {
    padding: 0.7rem 0.9rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .support-widget-thread-subject {
    margin: 0 0 0.35rem;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
  }
  .support-widget-messages {
    display: flex;
    min-height: 220px;
    flex: 1;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding: 0.9rem;
  }
  .support-widget-message {
    display: flex;
    max-width: 86%;
    flex-direction: column;
    gap: 0.22rem;
  }
  .support-widget-message.user {
    align-self: flex-end;
  }
  .support-widget-message.admin {
    align-self: flex-start;
  }
  .support-widget-message-bubble {
    padding: 0.65rem 0.75rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.5;
  }
  .support-widget-message.user .support-widget-message-bubble {
    color: var(--accent-fg);
    background: var(--accent);
    border-bottom-right-radius: 3px;
  }
  .support-widget-message.admin .support-widget-message-bubble {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom-left-radius: 3px;
  }
  .support-widget-message-meta {
    padding: 0 0.2rem;
    color: var(--text-3);
    font-size: 0.64rem;
  }
  .support-widget-message.user .support-widget-message-meta {
    text-align: right;
  }
  .support-widget-attachment {
    display: block;
    margin-top: 0.45rem;
    color: inherit;
    font-size: 0.72rem;
    font-weight: 500;
    text-decoration: underline;
  }
  .support-widget-composer {
    padding: 0.75rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
  }
  .support-widget-composer textarea {
    min-height: 68px;
    max-height: 140px;
    resize: vertical;
  }
  .support-widget-composer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
  }
  .support-widget-closed {
    padding: 0.85rem;
    color: var(--text-2);
    background: var(--surface);
    border-top: 1px solid var(--border);
    font-size: 0.76rem;
    line-height: 1.5;
    text-align: center;
  }
  @media (min-width: 701px) {
    .support-widget-backdrop {
      display: none;
    }
  }
  @media (max-width: 700px) {
    .support-widget-panel {
      inset: auto 0 0 0;
      width: 100%;
      height: min(82vh, 720px);
      max-height: calc(100vh - env(safe-area-inset-top) - 1rem);
      border-right: 0;
      border-bottom: 0;
      border-left: 0;
      border-radius: 14px 14px 0 0;
      transform-origin: bottom center;
    }
    .support-widget-header {
      padding-top: 0.95rem;
    }
    .floating-support-btn[aria-expanded="true"] {
      opacity: 0;
      pointer-events: none;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .support-widget-panel {
      animation: none;
    }
  }


    /* CSS Variables - Design System */
    :root {
      --orange-500: #f97316;
      --orange-600: #ea580c;
      --orange-700: #c2410c;
      --orange-400: #fb923c;
      /* --slate-950 was referenced in 7 places but never defined, so every rule
         using it silently fell back to the inherited colour. */
      --slate-950: #020617;
      --slate-900: #0f172a;
      --slate-800: #1e293b;
      --slate-700: #334155;
      --slate-600: #475569;
      --slate-500: #64748b;
      --slate-400: #94a3b8;
      --slate-300: #cbd5e1;
      --slate-200: #e2e8f0;
      --slate-100: #f1f5f9;
      --slate-50: #f8fafc;
      --green-500: #22c55e;
      --green-400: #4ade80;
      --red-500: #ef4444;
      --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
      --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
      --radius-sm: 6px;
      --radius: 10px;
      --radius-lg: 14px;
    }
    
    :root { color-scheme: light; --bg: #ffffff; --bg-subtle: #fafafa; --bg-muted: #f4f4f5; --surface: #ffffff; --surface-raised: #ffffff; --surface-hover: #f4f4f5; --hover-bg: rgba(9, 9, 11, 0.04); --border: #e4e4e7; --border-strong: #d4d4d8; --text: #09090b; --text-2: #3f3f46; --text-3: #71717a; --text-4: #a1a1aa; --accent: #f97316; --accent-hover: #ea580c; --accent-fg: #0c0a09; --accent-text: #c2410c; --accent-soft: #fff7ed; --accent-border: #fed7aa; --danger: #dc2626; --danger-hover: #b91c1c; --success: #16a34a; --success-hover: #15803d; --warning: #d97706; --warning-hover: #b45309; --success-text: #15803d; --success-soft: #f0fdf4; --success-border: #bbf7d0; --danger-text: #b91c1c; --danger-soft: #fef2f2; --danger-border: #fecaca; --warning-text: #b45309; --warning-soft: #fffbeb; --warning-border: #fde68a; --info-text: #1d4ed8; --info-soft: #eff6ff; --info-border: #bfdbfe; --purple-text: #6d28d9; --purple-soft: #f5f3ff; --purple-border: #ddd6fe; --inverse-bg: #09090b; --inverse-surface: #18181b; --inverse-border: #27272a; --inverse-text: #fafafa; --inverse-text-2: #a1a1aa; --code-bg: #0c0c0f; --code-border: #27272a; --code-text: #e4e4e7; --header-bg: rgba(255, 255, 255, 0.82); --overlay: rgba(9, 9, 11, 0.45); --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.05); --shadow-md: 0 4px 16px -4px rgba(9, 9, 11, 0.08), 0 1px 2px rgba(9, 9, 11, 0.04); --shadow-lg: 0 24px 48px -16px rgba(9, 9, 11, 0.18), 0 2px 6px rgba(9, 9, 11, 0.05); --focus-ring: 0 0 0 3px rgba(249, 115, 22, 0.32); }
    :root[data-theme="dark"] { color-scheme: dark; --bg: #09090b; --bg-subtle: #0e0e11; --bg-muted: #18181b; --surface: #111114; --surface-raised: #18181b; --surface-hover: #1d1d21; --hover-bg: rgba(250, 250, 250, 0.05); --border: #27272a; --border-strong: #3f3f46; --text: #fafafa; --text-2: #d4d4d8; --text-3: #a1a1aa; --text-4: #71717a; --accent: #f97316; --accent-hover: #fb923c; --accent-fg: #0c0a09; --accent-text: #fb923c; --accent-soft: rgba(249, 115, 22, 0.12); --accent-border: rgba(249, 115, 22, 0.38); --danger: #ef4444; --danger-hover: #f87171; --success: #22c55e; --success-hover: #4ade80; --warning: #f59e0b; --warning-hover: #fbbf24; --success-text: #4ade80; --success-soft: rgba(34, 197, 94, 0.12); --success-border: rgba(34, 197, 94, 0.32); --danger-text: #f87171; --danger-soft: rgba(239, 68, 68, 0.12); --danger-border: rgba(239, 68, 68, 0.34); --warning-text: #fbbf24; --warning-soft: rgba(245, 158, 11, 0.12); --warning-border: rgba(245, 158, 11, 0.32); --info-text: #60a5fa; --info-soft: rgba(59, 130, 246, 0.12); --info-border: rgba(59, 130, 246, 0.34); --purple-text: #a78bfa; --purple-soft: rgba(139, 92, 246, 0.14); --purple-border: rgba(139, 92, 246, 0.36); --inverse-bg: #141417; --inverse-surface: #1c1c20; --inverse-border: #2e2e33; --inverse-text: #fafafa; --inverse-text-2: #a1a1aa; --code-bg: #0c0c0f; --code-border: #27272a; --code-text: #e4e4e7; --header-bg: rgba(9, 9, 11, 0.78); --overlay: rgba(0, 0, 0, 0.6); --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-md: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.02); --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.03); --focus-ring: 0 0 0 3px rgba(249, 115, 22, 0.4); }
    @media (prefers-color-scheme: dark) {
      :root:not([data-theme]) { color-scheme: dark; --bg: #09090b; --bg-subtle: #0e0e11; --bg-muted: #18181b; --surface: #111114; --surface-raised: #18181b; --surface-hover: #1d1d21; --hover-bg: rgba(250, 250, 250, 0.05); --border: #27272a; --border-strong: #3f3f46; --text: #fafafa; --text-2: #d4d4d8; --text-3: #a1a1aa; --text-4: #71717a; --accent: #f97316; --accent-hover: #fb923c; --accent-fg: #0c0a09; --accent-text: #fb923c; --accent-soft: rgba(249, 115, 22, 0.12); --accent-border: rgba(249, 115, 22, 0.38); --danger: #ef4444; --danger-hover: #f87171; --success: #22c55e; --success-hover: #4ade80; --warning: #f59e0b; --warning-hover: #fbbf24; --success-text: #4ade80; --success-soft: rgba(34, 197, 94, 0.12); --success-border: rgba(34, 197, 94, 0.32); --danger-text: #f87171; --danger-soft: rgba(239, 68, 68, 0.12); --danger-border: rgba(239, 68, 68, 0.34); --warning-text: #fbbf24; --warning-soft: rgba(245, 158, 11, 0.12); --warning-border: rgba(245, 158, 11, 0.32); --info-text: #60a5fa; --info-soft: rgba(59, 130, 246, 0.12); --info-border: rgba(59, 130, 246, 0.34); --purple-text: #a78bfa; --purple-soft: rgba(139, 92, 246, 0.14); --purple-border: rgba(139, 92, 246, 0.36); --inverse-bg: #141417; --inverse-surface: #1c1c20; --inverse-border: #2e2e33; --inverse-text: #fafafa; --inverse-text-2: #a1a1aa; --code-bg: #0c0c0f; --code-border: #27272a; --code-text: #e4e4e7; --header-bg: rgba(9, 9, 11, 0.78); --overlay: rgba(0, 0, 0, 0.6); --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-md: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.02); --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.03); --focus-ring: 0 0 0 3px rgba(249, 115, 22, 0.4); }
    }

    
    .theme-toggle {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      padding: 2px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--bg-subtle);
    }
    .theme-toggle__option {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      border: 0;
      border-radius: 999px;
      background: transparent;
      color: var(--text-3);
      cursor: pointer;
      transition: color 0.15s ease, background 0.15s ease;
    }
    .theme-toggle__option svg { width: 15px; height: 15px; }
    .theme-toggle__option:hover { color: var(--text); }
    .theme-toggle__option[aria-pressed="true"] {
      background: var(--surface-raised);
      color: var(--text);
      box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border);
    }
    .theme-toggle__option:focus-visible { outline: none; box-shadow: var(--focus-ring); }
    .theme-toggle__option svg { transition: transform 0.35s cubic-bezier(.2,.7,.2,1); }
    .theme-toggle__option[data-theme-option="dark"][aria-pressed="true"] svg { transform: rotate(-20deg) scale(1.06); }
    .theme-toggle__option[data-theme-option="light"][aria-pressed="true"] svg { transform: rotate(90deg); }
    ::view-transition-old(root),
    ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

    
    /* ===== UI PRIMITIVES ===== */
    .ui-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
    .ui-container--narrow { max-width: 880px; }
    .ui-section { padding: 5.5rem 0; }
    .ui-section--tight { padding: 3.5rem 0; }
    .ui-section--subtle { background: var(--bg-subtle); border-block: 1px solid var(--border); }
    .ui-eyebrow {
      display: inline-flex; align-items: center; gap: 0.5rem;
      margin: 0 0 0.9rem; color: var(--accent-text);
      font: 500 0.8rem/1.2 var(--font-mono); letter-spacing: 0.02em;
    }
    .ui-section-header { max-width: 720px; margin: 0 0 2.75rem; }
    .ui-section-header--center { margin-inline: auto; text-align: center; }
    .ui-section-header h2 {
      margin: 0; color: var(--text);
      font: 600 clamp(1.75rem, 3vw, 2.35rem)/1.15 var(--font-sans); letter-spacing: -0.03em;
    }
    .ui-lead { margin: 0.9rem 0 0; color: var(--text-3); font-size: 1.075rem; line-height: 1.65; }

    .ui-page-header { padding: 4.5rem 0 3rem; border-bottom: 1px solid var(--border); background: var(--bg); }
    .ui-page-header--plain { border-bottom: 0; }
    .ui-page-header__inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
    .ui-page-header__copy { max-width: 760px; }
    .ui-page-header h1 {
      margin: 0; color: var(--text);
      font: 600 clamp(2.1rem, 4.4vw, 3.4rem)/1.08 var(--font-sans); letter-spacing: -0.035em;
    }
    .ui-page-header .ui-lead { font-size: 1.15rem; max-width: 640px; }
    .ui-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; }
    .ui-page-header .ui-actions { margin-top: 1.75rem; }

    .ui-btn {
      display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
      min-height: 40px; padding: 0.55rem 1rem; border-radius: 8px; border: 1px solid transparent;
      font: 500 0.9rem/1.2 var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }
    .ui-btn svg { width: 16px; height: 16px; }
    .ui-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
    .ui-btn:active { transform: translateY(0.5px) scale(0.985); }
    .ui-btn svg:last-child:not(:first-child) { transition: transform 0.18s ease; }
    .ui-btn:hover svg:last-child:not(:first-child) { transform: translateX(2px); }
    .ui-btn--primary { background: var(--accent); color: var(--accent-fg); }
    .ui-btn--primary:hover { background: var(--accent-hover); color: var(--accent-fg); }
    .ui-btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
    .ui-btn--secondary:hover { background: var(--surface-hover); color: var(--text); }
    .ui-btn--ghost { background: transparent; color: var(--text-2); }
    .ui-btn--ghost:hover { background: var(--hover-bg); color: var(--text); }
    .ui-btn--lg { min-height: 46px; padding: 0.7rem 1.25rem; font-size: 0.95rem; }
    .ui-btn--sm { min-height: 32px; padding: 0.35rem 0.7rem; font-size: 0.82rem; border-radius: 7px; }
    /* Touch screens: every button reaches 44px, and page header actions stack full width on phones. */
    @media (pointer: coarse) { .ui-btn, .ui-btn--sm { min-height: 44px; } }
    @media (max-width: 560px) {
      .ui-page-header .ui-actions { flex-direction: column; align-items: stretch; }
      .ui-page-header .ui-actions > .ui-btn { width: 100%; }
    }

    .ui-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
    .ui-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ui-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ui-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ui-card {
      position: relative; display: flex; flex-direction: column; gap: 0.5rem;
      padding: 1.4rem; background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius-lg); color: var(--text-2); text-decoration: none;
      transition: border-color 0.15s ease, background 0.15s ease;
    }
    a.ui-card:hover { border-color: var(--border-strong); background: var(--surface-hover); }
    .ui-card h3 { margin: 0; color: var(--text); font: 600 1rem/1.35 var(--font-sans); letter-spacing: -0.01em; }
    .ui-card p { margin: 0; color: var(--text-3); font-size: 0.92rem; line-height: 1.6; }
    .ui-card__icon {
      display: inline-flex; align-items: center; justify-content: center;
      width: 34px; height: 34px; margin-bottom: 0.5rem; border-radius: 9px;
      border: 1px solid var(--border); background: var(--bg-subtle); color: var(--text-2);
    }
    .ui-card__icon svg { width: 18px; height: 18px; }
    .ui-card__meta { margin-top: auto; padding-top: 0.75rem; color: var(--text-3); font: 500 0.8rem var(--font-mono); }
    .ui-card__link { margin-top: auto; padding-top: 0.75rem; color: var(--accent-text); font-size: 0.875rem; font-weight: 500; }
    .ui-card__link::after { content: '\2192'; display: inline-block; margin-left: 0.3rem; transition: transform 0.18s ease; }
    a.ui-card:hover .ui-card__link::after { transform: translateX(3px); }
    a.ui-card:hover .ui-card__icon { color: var(--accent-text); border-color: var(--accent-border); background: var(--accent-soft); }
    .ui-card__icon { transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease; }

    .ui-badge {
      display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.5rem;
      border-radius: 999px; border: 1px solid var(--border); background: var(--bg-subtle);
      color: var(--text-2); font: 500 0.75rem/1.5 var(--font-sans); white-space: nowrap;
    }
    .ui-badge--accent { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-text); }
    .ui-badge--success { background: var(--success-soft); border-color: var(--success-border); color: var(--success-text); }
    .ui-badge--danger { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger-text); }
    .ui-badge--warning { background: var(--warning-soft); border-color: var(--warning-border); color: var(--warning-text); }
    .ui-badge--info { background: var(--info-soft); border-color: var(--info-border); color: var(--info-text); }

    .ui-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
    .ui-stat { padding: 1.1rem 1.25rem; border-right: 1px solid var(--border); }
    .ui-stat:last-child { border-right: 0; }
    .ui-stat__value { display: block; color: var(--text); font: 600 1.5rem/1.2 var(--font-sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
    .ui-stat__label { display: block; margin-top: 0.25rem; color: var(--text-3); font-size: 0.82rem; }

    .ui-callout { padding: 1rem 1.15rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-subtle); color: var(--text-2); font-size: 0.92rem; }
    .ui-callout--accent { background: var(--accent-soft); border-color: var(--accent-border); }
    .ui-code {
      margin: 0; padding: 1rem 1.15rem; overflow-x: auto; border: 1px solid var(--code-border);
      border-radius: var(--radius); background: var(--code-bg); color: var(--code-text);
      font: 0.82rem/1.7 var(--font-mono);
    }

    @media (max-width: 900px) {
      .ui-grid--3, .ui-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 640px) {
      .ui-section { padding: 3.75rem 0; }
      .ui-page-header { padding: 3rem 0 2.25rem; }
      .ui-grid--2, .ui-grid--3, .ui-grid--4 { grid-template-columns: minmax(0, 1fr); }
      .ui-container { padding: 0 1rem; }
      .ui-stat { border-right: 0; border-bottom: 1px solid var(--border); }
      .ui-stat:last-child { border-bottom: 0; }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    }

    
    @media (prefers-reduced-motion: no-preference) {
      @keyframes ui-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
      @keyframes ui-settle { from { transform: translateY(6px); } to { transform: none; } }
      :is(.ui-page-header__copy, .discovery-hero__copy) > h1 { animation: ui-settle 0.6s cubic-bezier(.2,.7,.2,1) both; }
      :is(.ui-page-header__copy, .discovery-hero__copy) > :not(h1):not(.ui-lead):not(.discovery-hero__description) {
        animation: ui-rise 0.55s cubic-bezier(.2,.7,.2,1) both;
      }
      :is(.ui-page-header__copy, .discovery-hero__copy) > :nth-child(3) { animation-delay: 0.06s; }
      :is(.ui-page-header__copy, .discovery-hero__copy) > :nth-child(4) { animation-delay: 0.12s; }
      :is(.ui-page-header__copy, .discovery-hero__copy) > :nth-child(n+5) { animation-delay: 0.18s; }
      :is(.ui-page-header__inner, .discovery-hero__grid) > :not(:first-child) { animation: ui-rise 0.7s 0.12s cubic-bezier(.2,.7,.2,1) both; }
      .ui-reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s cubic-bezier(.2,.7,.2,1), transform 0.6s cubic-bezier(.2,.7,.2,1); }
      .ui-reveal.is-revealed { opacity: 1; transform: none; }
    }
    .footer-column a, .ui-link {
      background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
      transition: background-size 0.25s cubic-bezier(.2,.7,.2,1), color 0.15s ease;
      text-decoration: none;
    }
    .footer-column a:hover, .ui-link:hover { background-size: 100% 1px; }
    [data-count-up] { font-variant-numeric: tabular-nums; }

    
    .mk-window {
      position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 14px;
      background: var(--surface); box-shadow: var(--shadow-lg); color: var(--text-2);
      font-size: 0.86rem; isolation: isolate;
    }
    .mk-window__bar {
      display: flex; align-items: center; gap: 0.6rem; min-height: 40px; padding: 0 0.9rem;
      border-bottom: 1px solid var(--border); background: var(--bg-subtle);
    }
    .mk-window__dots { display: inline-flex; gap: 6px; }
    .mk-window__dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
    .mk-window__title { color: var(--text-3); font: 500 0.75rem var(--font-mono); }
    .mk-window__body { padding: 1rem; }
    .mk-input {
      display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.4rem 0.4rem 0.8rem;
      border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg);
    }
    .mk-input svg { width: 16px; height: 16px; color: var(--text-4); flex: 0 0 auto; }
    .mk-input__value { flex: 1; min-width: 0; color: var(--text); font: 500 0.88rem var(--font-mono); white-space: nowrap; }
    .mk-input__button {
      flex: 0 0 auto; padding: 0.35rem 0.75rem; border-radius: 7px; background: var(--accent);
      color: var(--accent-fg); font-weight: 600; font-size: 0.8rem; transition: transform 0.12s ease, filter 0.12s ease;
    }
    .mk-input__button.is-pressed { transform: scale(0.94); filter: brightness(0.92); }
    .mk-rows { margin: 0.85rem 0 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
    .mk-row {
      display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 0.7rem;
      padding: 0.62rem 0.8rem; border-top: 1px solid var(--border); background: var(--surface);
    }
    .mk-row:first-child { border-top: 0; }
    .mk-row__state { position: relative; display: grid; place-items: center; width: 20px; height: 20px; }
    .mk-row__check {
      display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
      background: var(--success-soft); color: var(--success-text); box-shadow: inset 0 0 0 1px var(--success-border);
    }
    .mk-row__check svg { width: 11px; height: 11px; stroke-width: 3; }
    .mk-row__spinner {
      position: absolute; inset: 1px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent);
      opacity: 0; animation: mk-spin 0.7s linear infinite;
    }
    .mk-row__name { display: block; color: var(--text); font-weight: 500; line-height: 1.3; }
    .mk-row__path { display: block; color: var(--text-3); font: 0.72rem var(--font-mono); }
    .mk-row__value { color: var(--text-2); font: 500 0.78rem var(--font-mono); text-align: right; white-space: nowrap; }
    .mk-row__value .ui-badge { font-family: var(--font-sans); }
    .mk-footer {
      display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.85rem;
      color: var(--text-3); font-size: 0.78rem;
    }
    .mk-footer__done { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--success-text); font-weight: 500; }
    .mk-footer__done::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
    .mk-footer code { color: var(--text-3); font: 0.74rem var(--font-mono); }

    .mk-chat__messages { display: grid; gap: 0.7rem; }
    .mk-bubble { max-width: 88%; padding: 0.65rem 0.85rem; border-radius: 12px; line-height: 1.5; }
    .mk-bubble--user { justify-self: end; background: var(--text); color: var(--bg); border-bottom-right-radius: 4px; }
    .mk-window .mk-bubble--user p { color: var(--bg); }
    .mk-bubble--assistant { justify-self: start; border: 1px solid var(--border); background: var(--bg-subtle); border-bottom-left-radius: 4px; }
    .mk-bubble p { margin: 0; }
    .mk-bubble p + p, .mk-bubble ul { margin-top: 0.4rem; }
    .mk-window .mk-bubble ul { margin-left: 0; padding: 0; list-style: none; display: grid; gap: 0.3rem; }
    .mk-bubble li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
    .mk-bubble code { font: 0.8rem var(--font-mono); color: var(--text); }
    .mk-tool {
      justify-self: start; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.65rem 0.35rem 0.45rem;
      border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-3); font-size: 0.76rem;
    }
    .mk-tool code { color: var(--text); font: 500 0.74rem var(--font-mono); }
    .mk-tool .mk-row__state { width: 16px; height: 16px; }
    .mk-tool .mk-row__check { width: 16px; height: 16px; }
    .mk-typing { justify-self: start; display: none; gap: 4px; padding: 0.7rem 0.85rem; border-radius: 12px; background: var(--bg-subtle); border: 1px solid var(--border); }
    .mk-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-4); animation: mk-typing 1s ease-in-out infinite; }
    .mk-typing span:nth-child(2) { animation-delay: 0.15s; }
    .mk-typing span:nth-child(3) { animation-delay: 0.3s; }

    .mk-caret::after {
      content: ''; display: inline-block; width: 2px; height: 1.05em; margin-left: 1px; vertical-align: -0.15em;
      background: var(--accent); animation: mk-caret 1s step-end infinite;
    }
    @keyframes mk-spin { to { transform: rotate(360deg); } }
    @keyframes mk-caret { 50% { opacity: 0; } }
    @keyframes mk-typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-3px); opacity: 1; } }
    @keyframes mk-pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }

    /* Playback states, only ever set by the script. */
    .mk-js [data-mockup]:not([data-mockup-state]) [data-mk-step] { opacity: 0; }
    [data-mockup-state="playing"] [data-mk-step]:not(.is-on) { opacity: 0; transform: translateY(6px); }
    [data-mockup-state="playing"] [data-mk-step] { transition: opacity 0.35s cubic-bezier(.2,.7,.2,1), transform 0.35s cubic-bezier(.2,.7,.2,1); }
    [data-mockup-state="playing"] [data-mk-step]:not(.is-on).mk-typing { display: none; }
    [data-mockup-state="playing"] .mk-typing.is-on:not(.is-done) { display: inline-flex; }
    [data-mockup-state="playing"] .mk-typing.is-done { display: none; }
    [data-mk-pending].is-pending .mk-row__spinner { opacity: 1; }
    [data-mk-pending].is-pending .mk-row__check,
    [data-mk-pending].is-pending .mk-row__value { opacity: 0; }
    [data-mk-pending].is-resolved .mk-row__check { animation: mk-pop 0.35s cubic-bezier(.2,.7,.2,1) both; }
    [data-mk-pending].is-resolved .mk-row__value { animation: ui-rise 0.35s cubic-bezier(.2,.7,.2,1) both; }

    .mk-console { direction: ltr; text-align: left; }
    .mk-console__copy { margin-left: auto; }
    .mk-console__copy .ui-copy { width: 26px; height: 26px; }
    .mk-console__method { padding: 0.08rem 0.4rem; border-radius: 5px; background: var(--success-soft); color: var(--success-text); font: 600 0.68rem var(--font-mono); }
    .mk-console__request { display: flex; gap: 0.6rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); font: 0.8rem/1.6 var(--font-mono); }
    .mk-console__prompt { color: var(--accent-text); }
    .mk-console__command { min-width: 0; color: var(--text); overflow-wrap: anywhere; }
    .mk-console__status { display: flex; align-items: center; gap: 0.55rem; padding: 0.55rem 1rem; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
    .mk-console__status .mk-row__state, .mk-console__status .mk-row__check { width: 16px; height: 16px; }
    .mk-console__status .mk-row__value { color: var(--success-text); text-align: left; }
    .mk-console__status--danger .mk-row__check { background: var(--danger-soft); color: var(--danger-text); box-shadow: inset 0 0 0 1px var(--danger-border); }
    .mk-console__status--danger .mk-row__value { color: var(--danger-text); }
    .mk-console__type { margin-left: auto; color: var(--text-3); font: 0.72rem var(--font-mono); }
    .mk-console__response { position: relative; margin: 0; padding: 0.85rem 1rem 1rem; max-height: 300px; overflow: hidden; background: transparent; border: 0; color: var(--text-2); font: 0.78rem/1.65 var(--font-mono); }
    .mk-console__response code { display: grid; font: inherit; color: inherit; background: none; padding: 0; }
    .mk-console__line { white-space: pre; }
    .mk-console--truncated .mk-console__response::after { content: ''; position: absolute; inset: auto 0 0; height: 64px; background: linear-gradient(to bottom, transparent, var(--surface)); pointer-events: none; }
    .mk-json-key { color: var(--info-text); }
    .mk-json-string { color: var(--success-text); }
    .mk-json-number, .mk-json-literal { color: var(--accent-text); }

    @media (prefers-reduced-motion: reduce) {
      .mk-caret::after, .mk-typing span, .mk-row__spinner { animation: none; }
    }

    
    .ui-copy {
      position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0;
      border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-3); cursor: pointer;
      transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }
    .ui-copy:hover { color: var(--text); border-color: var(--border-strong); }
    /* Touch screens get a 44px hit area around the small visual button. */
    @media (pointer: coarse) { .ui-copy::before { content: ''; position: absolute; inset: -7px; } }
    .ui-copy:focus-visible { outline: none; box-shadow: var(--focus-ring); }
    .ui-copy__icon { grid-area: 1 / 1; display: grid; place-items: center; transition: transform 0.25s cubic-bezier(.2,.7,.2,1), opacity 0.2s ease; }
    .ui-copy__icon svg { width: 14px; height: 14px; }
    .ui-copy__icon--done { color: var(--success-text); opacity: 0; transform: scale(0.4) rotate(-30deg); }
    .ui-copy.is-copied { border-color: var(--success-border); background: var(--success-soft); }
    .ui-copy.is-copied .ui-copy__icon--copy { opacity: 0; transform: scale(0.4) rotate(30deg); }
    .ui-copy.is-copied .ui-copy__icon--done { opacity: 1; transform: none; }
    .ui-copy::after {
      content: attr(data-copied-label); position: absolute; top: 50%; right: calc(100% + 6px); padding: 0.2rem 0.45rem;
      border-radius: 6px; background: var(--text); color: var(--bg); font: 500 0.7rem/1.3 var(--font-sans); white-space: nowrap;
      opacity: 0; transform: translate(4px, -50%); pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
    }
    .ui-copy.is-copied::after { opacity: 1; transform: translate(0, -50%); }


    * { margin: 0; padding: 0; box-sizing: border-box; }
    .sr-only {
      position: absolute !important;
      width: 1px !important;
      height: 1px !important;
      padding: 0 !important;
      margin: -1px !important;
      overflow: hidden !important;
      clip: rect(0, 0, 0, 0) !important;
      white-space: nowrap !important;
      border: 0 !important;
    }
    body {
      font-family: var(--font-sans);
      line-height: 1.6;
      color: var(--text-2);
      background: var(--bg);
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      text-rendering: optimizeLegibility;
      font-feature-settings: 'ss01', 'cv11';
    }
    h1, h2, h3, h4, h5, h6 { color: var(--text); letter-spacing: -0.02em; }
    code, kbd, samp, pre { font-family: var(--font-mono); }
    ::selection { background: rgba(249, 115, 22, 0.22); }
    :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    button, input, select, textarea {
      font: inherit;
    }
    /* Mobile touch optimizations */
    a, button, [role="button"], input[type="submit"], input[type="button"] {
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }

    /* ===== HEADER ===== */
    .header {
      position: sticky;
      top: 0;
      z-index: 1000;
      height: 64px;
      padding: 0 1.5rem;
      color: var(--text);
      background: var(--header-bg);
      border-bottom: 1px solid transparent;
      -webkit-backdrop-filter: saturate(1.6) blur(12px);
      backdrop-filter: saturate(1.6) blur(12px);
      transition: border-color 0.2s ease, background 0.2s ease;
    }
    /* The hairline appears once content scrolls under the header. */
    .header.is-scrolled {
      border-bottom-color: var(--border);
    }
    /* Same measure as page content. */
    .header-inner {
      max-width: 1200px;
      height: 100%;
      margin: 0 auto;
      display: flex;
      align-items: center;
      gap: 1rem;
      position: relative;
    }
    body:has(.account-workspace-layout) .header-inner,
    body:has(.docs-layout) .header-inner {
      max-width: none;
    }
    body:has(.account-workspace-layout) .header,
    body:has(.docs-layout) .header {
      border-bottom-color: var(--border);
    }
    html {
      scroll-padding-top: 84px;
    }
    @media (prefers-reduced-motion: no-preference) {
      html { scroll-behavior: smooth; }
    }
    .brand-logo {
      display: inline-flex;
      align-items: center;
      min-height: 44px;
      gap: 0.5rem;
      text-decoration: none;
      line-height: 1;
      flex-shrink: 0;
    }
    .brand-logo:hover { text-decoration: none; }
    .brand-logo__mark {
      width: 36px;
      height: 36px;
      display: block;
      flex-shrink: 0;
    }
    .brand-logo__wordmark {
      font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
      font-size: 2.45rem;
      font-weight: 800;
      letter-spacing: -0.075em;
      line-height: 0.9;
      text-transform: lowercase;
      white-space: nowrap;
      position: relative;
      display: inline-flex;
      align-items: flex-end;
    }
    .brand-logo__wordmark::after {
      content: '';
      width: 0.1em;
      min-width: 2px;
      height: 0.82em;
      border-radius: 2px;
      background: var(--accent);
      margin-left: 0.14rem;
      margin-bottom: 0.02em;
      opacity: 0;
      transition: opacity 0.18s ease;
    }
    .brand-logo:hover .brand-logo__wordmark::after,
    .brand-logo:focus-visible .brand-logo__wordmark::after {
      opacity: 1;
      animation: brand-logo-cursor-blink 0.9s step-end infinite;
    }
    .brand-logo--orange .brand-logo__wordmark { color: var(--accent); }
    .brand-logo--white .brand-logo__wordmark { color: var(--inverse-text); }
    .brand-logo--adaptive .brand-logo__wordmark { color: var(--text); }
    .brand-logo--adaptive .brand-logo__chip { fill: var(--text); }
    .brand-logo--sm { gap: 0.45rem; }
    .brand-logo--sm .brand-logo__mark { width: 26px; height: 26px; }
    .brand-logo--sm .brand-logo__wordmark { font-size: 1.6rem; }
    .brand-logo--md .brand-logo__mark { width: 30px; height: 30px; }
    .brand-logo--md .brand-logo__wordmark { font-size: 1.95rem; }
    .logo .brand-logo__mark { width: 24px; height: 24px; }
    .logo .brand-logo__wordmark { font-size: 1.5rem; }
    @keyframes brand-logo-cursor-blink {
      0%, 45% { opacity: 1; }
      46%, 95% { opacity: 0; }
      96%, 100% { opacity: 1; }
    }
    .logo {
      flex-shrink: 0;
    }
    .nav {
      display: flex;
      align-items: center;
      gap: 0.125rem;
      flex: 1;
      justify-content: center;
      min-width: 0;
    }
    .nav > a,
    .nav > .nav-item > .nav-link {
      display: inline-flex;
      align-items: center;
      min-height: 36px;
      gap: 0.3rem;
      color: var(--text-2);
      text-decoration: none;
      font-weight: 500;
      font-size: 0.875rem;
      padding: 0.4rem 0.7rem;
      border-radius: 8px;
      white-space: nowrap;
      flex-shrink: 0;
      transition: color 0.15s ease, background 0.15s ease;
    }
    .nav > a:hover,
    .nav > .nav-item > .nav-link:hover,
    .nav-item:hover > .nav-link,
    .nav-item.nav-item-open > .nav-link {
      color: var(--text);
      background: var(--hover-bg);
      text-decoration: none;
    }
    .nav-item {
      position: relative;
      display: flex;
      align-items: center;
      padding-bottom: 14px;
      margin-bottom: -14px;
    }
    .nav-link .nav-caret {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 12px;
      height: 12px;
      flex-shrink: 0;
      color: var(--text-3);
      transition: transform 0.2s ease;
    }
    .nav-link .nav-caret svg {
      width: 100%;
      height: 100%;
    }
    .nav-item:hover .nav-caret,
    .nav-item:focus-within .nav-caret,
    .nav-item.nav-item-open .nav-caret {
      transform: rotate(180deg);
    }
    .nav-mega-menu {
      position: fixed;
      top: 64px;
      left: 50%;
      transform: translateX(-50%) translateY(6px);
      width: min(980px, calc(100vw - 4rem));
      background: var(--surface-raised);
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 14px;
      box-shadow: var(--shadow-lg);
      padding: 0.75rem;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
      z-index: 1002;
    }
    .nav-mega-search {
      margin-bottom: 0.5rem;
    }
    .product-menu-search-field {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      width: 100%;
      min-height: 40px;
      padding: 0.5rem 0.75rem;
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      border-radius: 9px;
      transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    }
    .product-menu-search-field svg {
      width: 16px;
      height: 16px;
      color: var(--text-3);
      flex-shrink: 0;
    }
    .product-menu-search-field:focus-within {
      background: var(--surface);
      border-color: var(--accent-border);
      box-shadow: var(--focus-ring);
    }
    .product-menu-search-input {
      width: 100%;
      border: none;
      background: transparent;
      color: var(--text);
      font: inherit;
      font-size: 0.875rem;
      outline: none;
      appearance: none;
    }
    .product-menu-search-input::placeholder {
      color: var(--text-3);
    }
    .product-menu-search-input::-webkit-search-cancel-button {
      appearance: none;
    }
    .nav-mega-empty {
      display: none;
      margin-bottom: 0.5rem;
      padding: 0.9rem 1rem;
      background: var(--bg-subtle);
      border: 1px dashed var(--border-strong);
      border-radius: 10px;
      color: var(--text-3);
      font-size: 0.84rem;
      line-height: 1.5;
    }
    .product-menu-empty-links {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      margin-top: 0.65rem;
    }
    .product-menu-empty-links a {
      display: inline-flex;
      padding: 0.3rem 0.6rem;
      border: 1px solid var(--border);
      border-radius: 999px;
      color: var(--text-2);
      background: var(--surface);
      text-decoration: none;
      font-size: 0.78rem;
      font-weight: 500;
    }
    .product-menu-empty-links a:hover {
      color: var(--text);
      border-color: var(--border-strong);
      text-decoration: none;
    }
    .nav-item:hover .nav-mega-menu,
    .nav-item:focus-within .nav-mega-menu,
    .nav-item.nav-item-open .nav-mega-menu {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translateX(-50%) translateY(0);
    }
    .nav-mega-menu__grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0.25rem 0.75rem;
      max-height: min(68vh, 640px);
      overflow-y: auto;
      padding: 0.25rem;
    }
    .nav-mega-column {
      display: grid;
      align-content: start;
      gap: 0.75rem;
    }
    .nav-mega-section {
      padding: 0.25rem 0;
    }
    .nav-mega-section-title {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      padding: 0.35rem 0.6rem 0.45rem;
      font-size: 0.75rem;
      font-weight: 500;
      color: var(--text-3);
    }
    .nav-mega-section-title svg {
      width: 14px;
      height: 14px;
      color: var(--text-3);
      flex-shrink: 0;
    }
    .nav-mega-links {
      display: grid;
      gap: 1px;
    }
    .nav-mega-link {
      display: block;
      padding: 0.5rem 0.6rem;
      border-radius: 8px;
      text-decoration: none;
      transition: background 0.12s ease;
    }
    .nav-mega-link:hover,
    .nav-mega-link:focus-visible {
      background: var(--hover-bg);
      text-decoration: none;
    }
    .nav-mega-link-title {
      display: block;
      font-size: 0.875rem;
      font-weight: 500;
      color: var(--text);
      line-height: 1.35;
    }
    .nav-mega-link-title svg {
      width: 16px;
      height: 16px;
      color: var(--text-3);
      flex-shrink: 0;
    }
    .nav-mega-link-summary {
      display: block;
      margin-top: 0.15rem;
      color: var(--text-3);
      font-size: 0.78rem;
      line-height: 1.4;
    }
    .nav-mega-section--compact .nav-mega-link {
      padding: 0.45rem 0.6rem;
    }
    .nav-mega-section--compact .nav-mega-link-title {
      font-size: 0.85rem;
    }
    .nav-mega-section--compact .nav-mega-link-summary {
      display: -webkit-box;
      margin-top: 0.1rem;
      overflow: hidden;
      font-size: 0.74rem;
      line-height: 1.35;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
    .nav-mega-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      margin: 0.5rem -0.75rem -0.75rem;
      padding: 0.7rem 1rem;
      background: var(--bg-subtle);
      border-top: 1px solid var(--border);
      border-radius: 0 0 14px 14px;
    }
    .nav-mega-summary {
      flex: 1;
      font-size: 0.8rem;
      color: var(--text-3);
      line-height: 1.5;
    }
    .nav-mega-all {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      min-height: 34px;
      padding: 0.4rem 0.8rem;
      background: var(--surface);
      color: var(--text);
      border: 1px solid var(--border-strong);
      text-decoration: none;
      border-radius: 8px;
      font-size: 0.82rem;
      font-weight: 500;
      white-space: nowrap;
      transition: background 0.15s ease, border-color 0.15s ease;
    }
    .nav-mega-all:hover {
      background: var(--surface-hover);
      color: var(--text);
      text-decoration: none;
    }
    .nav-mega-all svg {
      width: 14px;
      height: 14px;
    }
    .header-actions {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex-shrink: 0;
    }
    .global-search-trigger {
      min-height: 36px;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.3rem 0.35rem 0.3rem 0.65rem;
      color: var(--text-3);
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      border-radius: 8px;
      font: 400 0.84rem var(--font-sans);
      cursor: pointer;
      white-space: nowrap;
      transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }
    .global-search-trigger:hover {
      color: var(--text-2);
      border-color: var(--border-strong);
      background: var(--surface);
    }
    .global-search-trigger:focus-visible {
      outline: none;
      box-shadow: var(--focus-ring);
    }
    /* The header shares the 1200px content measure, so the search label would
       squeeze the primary navigation; the icon and shortcut carry the meaning. */
    @media (min-width: 1321px) {
      .global-search-trigger-label {
        display: none;
      }
    }
    .global-search-trigger svg {
      width: 15px;
      height: 15px;
      color: currentColor;
      flex: 0 0 auto;
    }
    .global-search-trigger kbd {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 2.2rem;
      min-height: 1.4rem;
      padding: 0.05rem 0.35rem;
      color: var(--text-3);
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 5px;
      font: 500 0.68rem var(--font-mono);
    }
    .global-search-trigger--mobile {
      display: none;
      width: 44px;
      height: 44px;
      min-height: 44px;
      padding: 0;
      place-items: center;
      flex: 0 0 44px;
      color: var(--text-2);
      background: transparent;
      border-color: transparent;
    }
    .global-search-trigger--mobile svg {
      width: 18px;
      height: 18px;
    }
    .global-search-layer[hidden] {
      display: none;
    }
    .global-search-layer {
      position: fixed;
      inset: 0;
      z-index: 12000;
      display: grid;
      place-items: center;
      padding: 1rem;
      overflow-y: auto;
      background: var(--overlay);
      opacity: 0;
      transition: opacity 0.16s ease;
    }
    .global-search-layer.is-open {
      opacity: 1;
    }
    .global-search-dialog {
      width: min(960px, 100%);
      max-height: calc(100dvh - 2rem);
      display: flex;
      flex-direction: column;
      isolation: isolate;
      color: var(--text);
      background: var(--surface-raised);
      border: 1px solid var(--border);
      border-radius: 14px;
      box-shadow: var(--shadow-lg);
      overflow: hidden;
      transform: translateY(-8px) scale(0.99);
      transition: transform 0.18s cubic-bezier(.2,.8,.2,1);
    }
    .global-search-layer.is-open .global-search-dialog {
      transform: translateY(0) scale(1);
    }
    .global-search-box {
      flex: 0 0 auto;
      display: grid;
      grid-template-columns: auto minmax(0,1fr) auto;
      align-items: center;
      gap: 0.75rem;
      min-height: 60px;
      padding: 0 0.85rem 0 1.15rem;
      background: transparent;
      border-bottom: 1px solid var(--border);
    }
    .global-search-box > svg {
      width: 18px;
      height: 18px;
      color: var(--text-3);
    }
    .global-search-input {
      min-width: 0;
      width: 100%;
      height: 58px;
      color: var(--text);
      background: transparent;
      border: 0;
      font: 400 1.05rem var(--font-sans);
      appearance: none;
    }
    .global-search-input:focus,
    .global-search-input:focus-visible {
      border: 0;
      outline: none;
      box-shadow: none;
    }
    .global-search-input::placeholder {
      color: var(--text-3);
      opacity: 1;
    }
    .global-search-input::-webkit-search-cancel-button {
      appearance: none;
    }
    .global-search-close {
      width: 32px;
      height: 32px;
      display: grid;
      place-items: center;
      color: var(--text-3);
      background: transparent;
      border: 1px solid transparent;
      border-radius: 8px;
      cursor: pointer;
      transition: color 0.15s ease, background 0.15s ease;
    }
    .global-search-close:hover {
      color: var(--text);
      background: var(--hover-bg);
    }
    .global-search-close:focus-visible {
      outline: none;
      box-shadow: var(--focus-ring);
    }
    .global-search-close svg {
      width: 18px;
      height: 18px;
    }
    .global-search-filters {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      gap: 0.25rem;
      padding: 0.55rem 0.85rem;
      overflow-x: auto;
      scrollbar-width: none;
      border-bottom: 1px solid var(--border);
    }
    .global-search-filters::-webkit-scrollbar {
      display: none;
    }
    .global-search-filter {
      flex: 0 0 auto;
      min-height: 30px;
      padding: 0.25rem 0.7rem;
      color: var(--text-3);
      background: transparent;
      border: 1px solid transparent;
      border-radius: 999px;
      font: 500 0.8rem var(--font-sans);
      cursor: pointer;
      transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    }
    .global-search-filter:hover {
      color: var(--text);
      background: var(--hover-bg);
    }
    .global-search-filter:focus-visible {
      outline: none;
      box-shadow: var(--focus-ring);
    }
    .global-search-filter[aria-pressed="true"] {
      color: var(--text);
      background: var(--bg-muted);
      border-color: var(--border);
    }
    .global-search-body {
      flex: 1 1 auto;
      display: grid;
      grid-template-columns: minmax(0,1fr) 320px;
      min-height: 0;
      height: clamp(360px, 52vh, 520px);
      overflow: hidden;
    }
    .global-search-results-panel {
      min-width: 0;
      min-height: 0;
      display: grid;
      grid-template-rows: auto minmax(0,1fr);
      padding: 0.75rem 0.5rem 0.5rem;
      overflow: hidden;
    }
    .global-search-results-label {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      min-height: 26px;
      padding: 0 0.6rem 0.4rem;
      color: var(--text-3);
      font-size: 0.75rem;
      font-weight: 500;
    }
    .global-search-results-label strong {
      color: var(--text-3);
      font: 500 0.72rem var(--font-mono);
    }
    .global-search-results {
      min-height: 0;
      display: grid;
      align-content: start;
      gap: 1px;
      overflow-y: auto;
      padding: 0 0.1rem 0.4rem;
      overscroll-behavior: contain;
      scroll-padding-block: 0.1rem 0.7rem;
      scrollbar-color: var(--border-strong) transparent;
    }
    .global-search-result {
      min-width: 0;
      display: grid;
      grid-template-columns: 32px minmax(0,1fr) auto;
      align-items: center;
      gap: 0.7rem;
      padding: 0.5rem 0.6rem;
      color: var(--text-2);
      background: transparent;
      border-radius: 8px;
      text-decoration: none;
      transition: background 0.1s ease, color 0.1s ease;
    }
    .global-search-result:hover,
    .global-search-result[aria-selected="true"] {
      color: var(--text);
      background: var(--hover-bg);
      text-decoration: none;
    }
    .global-search-result[aria-selected="true"] .global-search-result-icon {
      color: var(--accent-text);
      border-color: var(--accent-border);
      background: var(--accent-soft);
    }
    .global-search-result-icon,
    .global-search-preview-icon {
      display: grid;
      place-items: center;
      color: var(--text-2);
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      border-radius: 8px;
    }
    .global-search-result-icon {
      width: 32px;
      height: 32px;
    }
    .global-search-result-icon svg,
    .global-search-preview-icon svg {
      width: 16px;
      height: 16px;
    }
    .global-search-result-copy {
      min-width: 0;
    }
    .global-search-result-title {
      display: block;
      overflow: hidden;
      color: inherit;
      font-size: 0.875rem;
      font-weight: 500;
      line-height: 1.35;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .global-search-result-meta {
      display: block;
      overflow: hidden;
      margin-top: 0.1rem;
      color: var(--text-3);
      font-size: 0.75rem;
      line-height: 1.35;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .global-search-result-kind {
      color: var(--text-3);
      background: transparent;
      border: 1px solid var(--border);
      border-radius: 999px;
      padding: 0.1rem 0.45rem;
      font-size: 0.7rem;
      font-weight: 500;
    }
    .global-search-empty {
      min-height: 280px;
      display: grid;
      place-content: center;
      justify-items: center;
      padding: 2rem;
      text-align: center;
    }
    .global-search-empty-icon {
      width: 40px;
      height: 40px;
      display: grid;
      place-items: center;
      margin-bottom: 0.9rem;
      color: var(--text-3);
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      border-radius: 10px;
    }
    .global-search-empty-icon svg {
      width: 18px;
      height: 18px;
    }
    .global-search-empty strong {
      color: var(--text);
      font-size: 0.95rem;
      font-weight: 600;
    }
    .global-search-empty p {
      max-width: 29rem;
      margin: 0.4rem 0 0;
      color: var(--text-3);
      font-size: 0.84rem;
      line-height: 1.6;
    }
    .global-search-preview {
      min-width: 0;
      min-height: 0;
      position: relative;
      display: flex;
      flex-direction: column;
      padding: 1.4rem;
      overflow: hidden;
      color: var(--text);
      background: var(--bg-subtle);
      border-left: 1px solid var(--border);
    }
    [dir="rtl"] .global-search-preview {
      border-left: 0;
      border-right: 1px solid var(--border);
    }
    .global-search-preview-icon {
      width: 40px;
      height: 40px;
      margin-bottom: 1.1rem;
      background: var(--surface);
    }
    .global-search-preview-kind {
      color: var(--text-3);
      font: 500 0.75rem var(--font-mono);
    }
    .global-search-preview h2 {
      margin: 0.45rem 0 0;
      color: var(--text);
      font-size: 1.15rem;
      font-weight: 600;
      line-height: 1.35;
      letter-spacing: -0.015em;
      overflow-wrap: anywhere;
    }
    .global-search-preview-meta {
      margin-top: 0.5rem;
      color: var(--text-3);
      font: 400 0.75rem/1.5 var(--font-mono);
      overflow-wrap: anywhere;
    }
    .global-search-preview-summary {
      margin: 0.85rem 0 1.25rem;
      color: var(--text-2);
      font-size: 0.86rem;
      line-height: 1.65;
    }
    .global-search-preview-link {
      position: relative;
      z-index: 1;
      display: inline-flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      width: 100%;
      min-height: 40px;
      margin-top: auto;
      padding: 0.55rem 0.85rem;
      color: var(--accent-fg);
      background: var(--accent);
      border-radius: 8px;
      text-decoration: none;
      font-size: 0.86rem;
      font-weight: 500;
      transition: background 0.15s ease;
    }
    .global-search-preview-link:hover {
      color: var(--accent-fg);
      background: var(--accent-hover);
      text-decoration: none;
    }
    .global-search-preview-link:focus-visible {
      outline: none;
      box-shadow: var(--focus-ring);
    }
    .global-search-preview-link svg {
      width: 16px;
      height: 16px;
    }
    .global-search-footer {
      position: relative;
      z-index: 2;
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      min-height: 44px;
      padding: 0.5rem 1rem;
      color: var(--text-3);
      background: var(--bg-subtle);
      border-top: 1px solid var(--border);
      font-size: 0.75rem;
    }
    .global-search-hints {
      display: flex;
      align-items: center;
      gap: 1rem;
    }
    .global-search-hint {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      white-space: nowrap;
    }
    .global-search-hint kbd {
      min-width: 1.4rem;
      padding: 0.08rem 0.3rem;
      color: var(--text-2);
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 5px;
      text-align: center;
      font: 500 0.66rem var(--font-mono);
    }
    .btn-signin {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 36px;
      padding: 0.4rem 0.7rem;
      background: transparent;
      color: var(--text-2);
      font-size: 0.875rem;
      font-weight: 500;
      border-radius: 8px;
      text-decoration: none;
      transition: color 0.15s ease, background 0.15s ease;
    }
    .btn-signin:hover {
      color: var(--text);
      background: var(--hover-bg);
      text-decoration: none;
    }
    .btn-start-free {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 36px;
      padding: 0.4rem 0.9rem;
      background: var(--accent);
      color: var(--accent-fg);
      font-size: 0.875rem;
      font-weight: 500;
      border-radius: 8px;
      text-decoration: none;
      transition: background 0.15s ease;
      white-space: nowrap;
    }
    .btn-start-free:hover {
      background: var(--accent-hover);
      color: var(--accent-fg);
      text-decoration: none;
    }
    .header-dashboard-link {
      display: none;
      align-items: center;
      gap: 0.45rem;
      min-height: 36px;
      padding: 0.4rem 0.75rem;
      color: var(--text-2);
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      text-decoration: none;
      font-size: 0.84rem;
      font-weight: 500;
      transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    }
    .header-dashboard-link:hover {
      color: var(--text);
      background: var(--surface-hover);
      border-color: var(--border-strong);
      text-decoration: none;
    }
    .header-dashboard-link svg {
      width: 15px;
      height: 15px;
    }
    .header-theme-toggle {
      flex-shrink: 0;
    }

    /* ===== USER MENU ===== */
    .user-menu {
      position: relative;
    }
    .user-avatar-btn {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      min-height: 36px;
      padding: 0.2rem 0.6rem 0.2rem 0.25rem;
      background: transparent;
      border-radius: 999px;
      cursor: pointer;
      border: 1px solid var(--border);
      color: var(--text);
      font-size: 0.84rem;
      font-weight: 500;
      transition: background 0.15s ease, border-color 0.15s ease;
    }
    .user-avatar-btn:hover,
    .user-avatar-btn.open {
      background: var(--hover-bg);
      border-color: var(--border-strong);
    }
    .user-avatar-btn:focus-visible {
      outline: none;
      box-shadow: var(--focus-ring);
    }
    .user-avatar-btn::after {
      content: '';
      width: 0;
      height: 0;
      border-left: 4px solid transparent;
      border-right: 4px solid transparent;
      border-top: 5px solid var(--text-3);
      margin-left: 0.15rem;
      transition: transform 0.2s ease;
    }
    .user-avatar-btn.open::after {
      transform: rotate(180deg);
    }
    .user-avatar-btn img {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      object-fit: cover;
    }
    .user-avatar-btn .placeholder-avatar {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 0.72rem;
      color: var(--accent-fg);
    }

    /* User Dropdown */
    .user-dropdown {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      background: var(--surface-raised);
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: var(--shadow-lg);
      width: min(340px, calc(100vw - 2rem));
      opacity: 0;
      visibility: hidden;
      transform: translateY(-4px);
      transform-origin: top right;
      transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
      z-index: 1001;
      overflow: hidden;
    }
    .user-dropdown.show {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }
    .user-dropdown-header {
      display: flex;
      align-items: center;
      gap: 0.7rem;
      padding: 0.9rem 1rem;
      border-bottom: 1px solid var(--border);
    }
    .user-dropdown-avatar {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      flex: 0 0 auto;
      color: var(--accent-fg);
      background: var(--accent);
      border-radius: 50%;
      font-size: 0.82rem;
      font-weight: 600;
    }
    .user-dropdown-identity {
      min-width: 0;
      flex: 1;
    }
    .user-dropdown-name {
      font-weight: 600;
      color: var(--text);
      font-size: 0.9rem;
      line-height: 1.3;
    }
    .user-dropdown-email {
      color: var(--text-3);
      font-size: 0.8rem;
      margin-top: 0.1rem;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .user-dropdown-primary {
      padding: 0.5rem 0.5rem 0;
    }
    .user-dropdown-primary a {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      min-height: 40px;
      padding: 0.55rem 0.7rem;
      color: var(--text);
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      border-radius: 8px;
      text-decoration: none;
      font-size: 0.875rem;
      font-weight: 500;
      transition: background 0.15s ease, border-color 0.15s ease;
    }
    .user-dropdown-primary a:hover {
      color: var(--text);
      background: var(--surface-hover);
      border-color: var(--border-strong);
      text-decoration: none;
    }
    .user-dropdown-primary a svg {
      width: 16px;
      height: 16px;
      color: var(--text-3);
    }
    .user-dropdown-primary a .user-menu-arrow {
      display: inline-flex;
      margin-left: auto;
    }
    .user-dropdown-links {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 1px;
      padding: 0.4rem 0.5rem 0.5rem;
    }
    .user-dropdown-links a,
    .user-dropdown-links button {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      width: 100%;
      min-height: 38px;
      padding: 0.45rem 0.6rem;
      color: var(--text-2);
      text-decoration: none;
      font-size: 0.86rem;
      text-align: left;
      background: none;
      border: none;
      border-radius: 7px;
      cursor: pointer;
      transition: background 0.12s ease, color 0.12s ease;
      font-weight: 500;
      font-family: var(--font-sans);
    }
    .user-dropdown-links a svg,
    .user-dropdown-links button svg {
      width: 16px;
      height: 16px;
      flex-shrink: 0;
      color: var(--text-3);
    }
    .user-dropdown-links a:hover,
    .user-dropdown-links button:hover {
      background: var(--hover-bg);
      color: var(--text);
      text-decoration: none;
    }
    .user-dropdown-links a:hover svg,
    .user-dropdown-links button:hover svg {
      color: var(--text-2);
    }
    .user-dropdown-footer {
      display: flex;
      align-items: stretch;
      gap: 0.25rem;
      padding: 0.4rem 0.5rem;
      border-top: 1px solid var(--border);
      background: var(--bg-subtle);
    }
    .user-dropdown-footer > a,
    .user-dropdown-footer form,
    .user-dropdown-footer button {
      flex: 1;
    }
    .user-dropdown-footer > a,
    .user-dropdown-footer button {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.45rem;
      width: 100%;
      min-height: 36px;
      padding: 0.45rem 0.7rem;
      color: var(--text-2);
      background: transparent;
      border: 0;
      border-radius: 7px;
      text-decoration: none;
      font: 500 0.82rem var(--font-sans);
      cursor: pointer;
    }
    .user-dropdown-footer > a:hover,
    .user-dropdown-footer button:hover {
      color: var(--text);
      background: var(--hover-bg);
      text-decoration: none;
    }
    .user-dropdown-footer svg {
      width: 15px;
      height: 15px;
    }
    .user-dropdown-footer .logout-btn,
    .user-dropdown-footer .logout-btn:hover {
      color: var(--danger-text);
    }

    /* ===== SIGNED-IN WORKSPACE NAVIGATION ===== */
    .account-workspace-layout {
      display: grid;
      grid-template-columns: 232px minmax(0, 1fr);
      align-items: start;
      min-height: 68vh;
      /* Paint the sidebar column on the layout so it spans the full page height. */
      background: linear-gradient(to right, var(--bg-subtle) 231px, var(--border) 231px, var(--border) 232px, var(--bg) 232px);
    }
    [dir="rtl"] .account-workspace-layout {
      background: linear-gradient(to left, var(--bg-subtle) 231px, var(--border) 231px, var(--border) 232px, var(--bg) 232px);
    }
    .account-workspace-main {
      grid-column: 2;
      min-width: 0;
      background: var(--bg);
    }
    .account-workspace-sidebar {
      position: sticky;
      top: 64px;
      align-self: start;
      width: 232px;
      height: calc(100vh - 64px);
      overflow: hidden;
      z-index: 20;
      padding: 1rem 0.75rem;
      background: transparent;
    }
    .account-workspace-nav {
      display: flex;
      flex-direction: column;
      gap: 1px;
    }
    .account-workspace-nav a {
      position: relative;
      display: flex;
      align-items: center;
      gap: 0.6rem;
      width: 100%;
      min-height: 34px;
      padding: 0.4rem 0.6rem;
      color: var(--text-2);
      border-radius: 7px;
      text-decoration: none;
      font-size: 0.875rem;
      font-weight: 500;
      white-space: nowrap;
      transition: color 0.12s ease, background 0.12s ease;
    }
    .account-workspace-nav a svg {
      width: 16px;
      height: 16px;
      flex: 0 0 auto;
      color: var(--text-3);
    }
    .account-workspace-nav a:hover {
      color: var(--text);
      background: var(--hover-bg);
      text-decoration: none;
    }
    .account-workspace-nav a:focus-visible {
      outline: none;
      box-shadow: var(--focus-ring);
    }
    .account-workspace-nav a[aria-current="page"] {
      color: var(--text);
      background: var(--surface);
      box-shadow: inset 0 0 0 1px var(--border), var(--shadow-sm);
    }
    .account-workspace-nav a[aria-current="page"] svg {
      color: var(--accent-text);
    }
    @media (min-width: 901px) and (max-height: 620px) {
      .account-workspace-sidebar {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
      }
      .account-workspace-nav a {
        min-height: 30px;
        padding-top: 0.3rem;
        padding-bottom: 0.3rem;
      }
    }
    @media (max-width: 900px) {
      .account-workspace-layout,
      [dir="rtl"] .account-workspace-layout {
        grid-template-columns: minmax(0, 1fr);
        background: var(--bg);
      }
      .account-workspace-main {
        grid-column: 1;
      }
      .account-workspace-sidebar {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        padding: 0 1rem;
        background: var(--bg-subtle);
        border-bottom: 1px solid var(--border);
      }
      .account-workspace-nav {
        position: static;
        flex-direction: row;
        gap: 0.15rem;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
      }
      .account-workspace-nav::-webkit-scrollbar {
        display: none;
      }
      .account-workspace-nav a {
        width: auto;
        min-height: 44px;
        padding: 0.5rem 0.65rem;
        border-radius: 0;
      }
      .account-workspace-nav a:hover {
        background: transparent;
      }
      .account-workspace-nav a[aria-current="page"] {
        background: transparent;
        box-shadow: inset 0 -2px 0 var(--text);
      }
    }

    /* Support notification badge */
    .support-notification-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      background: var(--accent);
      color: var(--accent-fg);
      border-radius: 100px;
      font-size: 0.7rem;
      font-weight: 600;
      margin-left: 0.5rem;
    }

    .floating-support-btn {
      position: fixed;
      right: max(1.25rem, env(safe-area-inset-right));
      bottom: max(1.25rem, env(safe-area-inset-bottom));
      z-index: 999;
      width: 48px;
      height: 48px;
      align-items: center;
      justify-content: center;
      background: var(--accent);
      color: var(--accent-fg);
      border: 0;
      border-radius: 999px;
      box-shadow: var(--shadow-md);
      text-decoration: none;
      transition: background 0.15s ease;
    }
    .floating-support-btn:hover {
      background: var(--accent-hover);
      color: var(--accent-fg);
      text-decoration: none;
    }
    .floating-support-btn:focus-visible {
      outline: none;
      box-shadow: var(--shadow-md), var(--focus-ring);
    }
    .floating-support-btn svg {
      width: 22px;
      height: 22px;
      stroke-width: 1.8;
    }
    .floating-support-badge {
      position: absolute;
      top: -4px;
      right: -4px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 20px;
      height: 20px;
      padding: 0 5px;
      background: var(--text);
      color: var(--bg);
      border: 2px solid var(--bg);
      border-radius: 999px;
      font-size: 0.68rem;
      font-weight: 600;
      line-height: 1;
    }

    /* ===== LANGUAGE SELECTOR ===== */
    .language-selector {
      position: relative;
    }
    /* Bridge the gap above the dropdown so hover survives the move from the button. */
    .language-selector::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      height: 10px;
    }
    .lang-btn {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      min-height: 36px;
      padding: 0.35rem 0.55rem;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 8px;
      color: var(--text-2);
      font-size: 0.8rem;
      font-weight: 500;
      cursor: pointer;
      transition: color 0.15s ease, background 0.15s ease;
      font-family: var(--font-sans);
    }
    .lang-btn:hover,
    .language-selector.open .lang-btn {
      background: var(--hover-bg);
      color: var(--text);
    }
    .lang-btn:focus-visible {
      outline: none;
      box-shadow: var(--focus-ring);
    }
    .lang-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .lang-icon svg {
      width: 15px;
      height: 15px;
    }
    .lang-code {
      font: 500 0.75rem var(--font-mono);
    }
    .lang-flag {
      font-size: 0.85rem;
      line-height: 1;
    }
    .lang-arrow {
      color: var(--text-3);
      transition: transform 0.2s ease;
    }
    .language-selector:hover .lang-arrow,
    .language-selector.open .lang-arrow {
      transform: rotate(180deg);
    }
    .lang-dropdown {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      background: var(--surface-raised);
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: var(--shadow-lg);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-4px);
      transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
      z-index: 1001;
      overflow: hidden;
      padding: 0.4rem;
      display: grid;
      grid-template-columns: repeat(3, minmax(120px, 1fr));
      gap: 1px;
      min-width: 400px;
    }
    .language-selector:hover .lang-dropdown,
    .language-selector.open .lang-dropdown {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }
    .lang-option {
      position: relative;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      min-height: 34px;
      padding: 0.35rem 0.55rem;
      color: var(--text-2);
      text-decoration: none;
      font-size: 0.82rem;
      border-radius: 7px;
      transition: background 0.12s ease, color 0.12s ease;
    }
    .lang-option .lang-flag {
      min-width: 1.75rem;
      font: 500 0.66rem/1 var(--font-mono);
      text-align: center;
      background: var(--bg-muted);
      color: var(--text-3);
      padding: 0.2rem 0.3rem;
      border-radius: 4px;
    }
    .lang-option:not(.active):hover {
      background: var(--hover-bg);
      color: var(--text);
      text-decoration: none;
    }
    .lang-option.active,
    .lang-option.active:hover {
      background: var(--accent-soft);
      color: var(--accent-text);
      text-decoration: none;
    }
    .lang-option.active .lang-flag {
      background: var(--surface);
      color: var(--accent-text);
    }
    .lang-option .lang-name {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }
    .lang-check {
      display: none;
    }
    .lang-option.active .lang-check {
      display: block;
      margin-left: auto;
      flex-shrink: 0;
    }
    @media (max-width: 1320px) {
      .language-selector {
        display: none;
      }
    }

    /* ===== HAMBURGER MENU ===== */
    .hamburger-btn {
      display: none;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 5px;
      width: 44px;
      height: 44px;
      margin-left: -0.6rem;
      background: transparent;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      padding: 10px;
      z-index: 1001;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }
    .hamburger-btn span {
      width: 18px;
      height: 1.5px;
      background: var(--text);
      border-radius: 2px;
      transition: transform 0.25s ease, opacity 0.25s ease;
      transform-origin: center;
    }
    .hamburger-btn.open span:nth-child(1) {
      transform: translateY(6.5px) rotate(45deg);
    }
    .hamburger-btn.open span:nth-child(2) {
      opacity: 0;
      transform: scaleX(0);
    }
    .hamburger-btn.open span:nth-child(3) {
      transform: translateY(-6.5px) rotate(-45deg);
    }

    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
      display: none;
      position: fixed;
      top: 64px; /* Start below header */
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--overlay);
      z-index: 998; /* Below mobile menu and header */
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s ease;
    }
    .mobile-menu-overlay.show {
      opacity: 1;
      pointer-events: auto;
    }

    /* Mobile Menu Panel */
    .mobile-menu {
      display: none;
      position: fixed;
      top: 64px; /* Start below header to not cover hamburger button */
      left: -100%;
      width: min(360px, 100%);
      height: calc(100vh - 64px);
      height: calc(100dvh - 64px);
      background: var(--bg);
      border-right: 1px solid var(--border);
      z-index: 999; /* Below header z-index */
      padding: 0.5rem 0 2rem;
      transition: left 0.28s ease, visibility 0.28s ease;
      overflow-y: auto;
      visibility: hidden;
    }
    .mobile-menu.show {
      left: 0;
      visibility: visible;
    }
    @media (max-width: 480px) {
      .mobile-menu {
        width: 100%;
        border-right: 0;
      }
    }
    .mobile-menu a {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      min-height: 48px;
      color: var(--text);
      text-decoration: none;
      padding: 0.75rem 1.25rem;
      font-weight: 500;
      font-size: 0.95rem;
      border-bottom: 1px solid var(--border);
      transition: background 0.15s ease;
    }
    .mobile-menu a:hover {
      background: var(--hover-bg);
      color: var(--text);
      text-decoration: none;
    }
    .mobile-menu-section {
      padding: 1rem 1.25rem;
      border-bottom: 1px solid var(--border);
    }
    .mobile-menu-section-label {
      color: var(--text);
      font-size: 0.95rem;
      font-weight: 600;
      margin-bottom: 0.75rem;
    }
    .mobile-menu-search {
      margin-bottom: 0.75rem;
    }
    .mobile-menu-search .product-menu-search-input {
      font-size: 1rem;
    }
    .mobile-menu-section-grid {
      display: grid;
      gap: 0.9rem;
    }
    .mobile-menu-subsection {
      padding: 0;
    }
    .mobile-menu-subheading {
      color: var(--text-3);
      font-size: 0.78rem;
      font-weight: 500;
      margin-bottom: 0.25rem;
    }
    .mobile-product-link {
      display: block !important;
      min-height: 0 !important;
      padding: 0.45rem 0 !important;
      border-bottom: none !important;
      color: var(--text-2) !important;
      font-size: 0.92rem !important;
      line-height: 1.45;
      background: transparent !important;
    }
    .mobile-product-link:hover {
      color: var(--text) !important;
      text-decoration: none;
    }
    .mobile-product-link-summary {
      display: block;
      margin-top: 0.15rem;
      color: var(--text-3);
      font-size: 0.78rem;
      font-weight: 400;
      line-height: 1.4;
    }
    .mobile-menu-subsection--compact .mobile-menu-subheading {
      margin-bottom: 0.15rem;
    }
    .mobile-menu-subsection--compact .mobile-product-link {
      padding: 0.35rem 0 !important;
      font-size: 0.88rem !important;
    }
    .mobile-menu-subsection--compact .mobile-product-link-summary {
      display: -webkit-box;
      margin-top: 0.1rem;
      overflow: hidden;
      font-size: 0.74rem;
      line-height: 1.35;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
    .mobile-menu-section-footer {
      margin-top: 0.9rem;
      padding-top: 0.9rem;
      border-top: 1px solid var(--border);
    }
    .mobile-menu-empty {
      display: none;
      margin-top: 0.2rem;
      padding: 0.8rem;
      background: var(--bg-subtle);
      border: 1px dashed var(--border-strong);
      border-radius: 10px;
      color: var(--text-3);
      font-size: 0.84rem;
      line-height: 1.5;
    }
    .mobile-menu-empty .product-menu-empty-links a {
      display: inline-flex;
      min-height: 0;
      padding: 0.3rem 0.6rem;
      border: 1px solid var(--border);
      border-radius: 999px;
      color: var(--text-2);
      background: var(--surface);
      font-size: 0.78rem;
    }
    .mobile-product-all {
      display: inline-flex !important;
      align-items: center;
      gap: 0.4rem;
      min-height: 0 !important;
      padding: 0 !important;
      border-bottom: none !important;
      color: var(--accent-text) !important;
      background: transparent !important;
      font-size: 0.88rem !important;
      font-weight: 500 !important;
    }
    .mobile-product-all svg {
      width: 14px;
      height: 14px;
    }
    .mobile-menu-theme {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding: 1rem 1.25rem;
      color: var(--text-2);
      font-size: 0.9rem;
      font-weight: 500;
    }
    .mobile-menu-theme .theme-toggle__option {
      width: 36px;
      height: 36px;
    }
    .mobile-menu-user {
      padding: 1rem 1.25rem;
      border-bottom: 1px solid var(--border);
      display: none;
    }
    .mobile-menu-user.show {
      display: block;
    }
    .mobile-menu-user-info {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      margin-bottom: 0.75rem;
    }
    .mobile-menu-user-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--accent-fg);
      font-weight: 600;
      font-size: 0.9rem;
    }
    .mobile-menu-user-avatar img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      object-fit: cover;
    }
    .mobile-menu-user-details {
      flex: 1;
      min-width: 0;
    }
    .mobile-menu-user-name {
      color: var(--text);
      font-weight: 600;
      font-size: 0.95rem;
    }
    .mobile-menu-user-email {
      color: var(--text-3);
      font-size: 0.8rem;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .mobile-menu-user-links a {
      min-height: 44px;
      padding: 0.6rem 0;
      border-bottom: none;
      color: var(--text-2);
      font-size: 0.92rem;
    }
    .mobile-menu-user-links a:hover {
      background: transparent;
      color: var(--text);
    }
    .mobile-menu-user-links .logout-link,
    .mobile-menu-user-links .logout-link:hover {
      color: var(--danger-text);
    }

    /* Mobile Menu CTA (signed-out state) */
    .mobile-menu-cta {
      display: none;
      padding: 1rem 1.25rem 1.25rem;
      border-bottom: 1px solid var(--border);
      text-align: center;
    }
    .mobile-menu-cta.show {
      display: block;
    }
    .mobile-cta-button {
      display: flex !important;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      width: 100%;
      min-height: 44px;
      padding: 0.7rem 1.25rem !important;
      background: var(--accent) !important;
      color: var(--accent-fg) !important;
      font-size: 0.95rem;
      font-weight: 500;
      border-radius: 8px;
      text-decoration: none !important;
      border-bottom: none !important;
    }
    .mobile-cta-button:hover {
      background: var(--accent-hover) !important;
    }
    .mobile-cta-subtitle {
      margin-top: 0.5rem;
      color: var(--text-3);
      font-size: 0.8rem;
    }

    /* Mobile header buttons - hidden on desktop, JS controls on mobile */
    .btn-signup-mobile {
      display: none !important;
      align-items: center;
      justify-content: center;
      min-height: 36px;
      padding: 0.4rem 0.8rem;
      background: var(--accent);
      color: var(--accent-fg);
      font-size: 0.82rem;
      font-weight: 500;
      border-radius: 8px;
      text-decoration: none;
      white-space: nowrap;
      transition: background 0.15s;
    }
    .btn-signup-mobile:hover {
      background: var(--accent-hover);
      color: var(--accent-fg);
      text-decoration: none;
    }
    .btn-dashboard-mobile {
      display: none !important;
      align-items: center;
      justify-content: center;
      min-height: 36px;
      padding: 0.4rem 0.8rem;
      background: var(--surface);
      color: var(--text);
      border: 1px solid var(--border-strong);
      font-size: 0.82rem;
      font-weight: 500;
      border-radius: 8px;
      text-decoration: none;
      white-space: nowrap;
      transition: background 0.15s;
    }
    .btn-dashboard-mobile:hover {
      background: var(--surface-hover);
      color: var(--text);
      text-decoration: none;
    }

    /* ===== GENERAL LAYOUT ===== */
    /* Legacy page classes. New pages compose the .ui-* primitives instead;
       these stay visually aligned with them. */
    .hero {
      background: var(--bg);
      color: var(--text);
      padding: 4.5rem max(1.5rem, calc((100% - 1200px) / 2 + 1.5rem)) 3rem;
      text-align: left;
      position: relative;
      border-bottom: 1px solid var(--border);
    }
    .hero-content {
      position: relative;
      max-width: 1200px;
    }
    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      margin-bottom: 0.9rem;
      color: var(--accent-text);
      font: 500 0.8rem/1.2 var(--font-mono);
      letter-spacing: 0.02em;
    }
    .hero h1 {
      max-width: 900px;
      margin: 0 0 0.9rem;
      color: var(--text);
      font-size: clamp(2.1rem, 4.4vw, 3.4rem);
      font-weight: 600;
      line-height: 1.08;
      letter-spacing: -0.035em;
    }
    .hero h1 span {
      color: var(--text-3);
    }
    .hero p {
      max-width: 680px;
      margin: 0 0 2rem;
      color: var(--text-3);
      font-size: 1.15rem;
      line-height: 1.65;
    }
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      padding: 0.15rem 0.55rem;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--bg-subtle);
      color: var(--text-2);
      font-size: 0.78rem;
      font-weight: 500;
    }
    .container {
      max-width: 1000px;
      margin: 0 auto;
      padding: 3rem 1.5rem;
    }
    h2 {
      font-size: 1.75rem;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 1rem;
      margin-top: 3rem;
      letter-spacing: -0.025em;
    }
    h2:first-child { margin-top: 0; }
    h3 {
      color: var(--text);
      font-weight: 600;
      margin-top: 1.5rem;
      margin-bottom: 0.75rem;
      font-size: 1.1rem;
      letter-spacing: -0.01em;
    }
    p { margin-bottom: 1rem; color: var(--text-2); }
    code {
      background: var(--bg-muted);
      color: var(--text);
      padding: 0.15rem 0.35rem;
      border-radius: 5px;
      font-size: 0.86em;
      font-family: var(--font-mono);
    }
    pre {
      background: var(--code-bg);
      color: var(--code-text);
      border: 1px solid var(--code-border);
      padding: 1.1rem 1.25rem;
      border-radius: var(--radius);
      overflow-x: auto;
      margin: 1.5rem 0;
      font-size: 0.85rem;
      line-height: 1.7;
      font-family: var(--font-mono);
    }
    pre code {
      background: none;
      padding: 0;
      color: inherit;
      font-size: inherit;
    }
    .card {
      background: var(--surface);
      padding: 1.75rem;
      border-radius: 12px;
      margin-bottom: 1.5rem;
      border: 1px solid var(--border);
    }
    .card h2 {
      margin-top: 0;
    }
    .features-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1rem;
      margin: 1.5rem 0;
    }
    @media (max-width: 800px) {
      .features-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 500px) {
      .features-grid { grid-template-columns: 1fr; }
    }
    .feature-card {
      background: var(--surface);
      padding: 1.25rem;
      border-radius: 12px;
      border: 1px solid var(--border);
      text-align: left;
      transition: border-color 0.15s ease;
    }
    .feature-card:hover {
      border-color: var(--border-strong);
    }
    .feature-card .icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 34px;
      height: 34px;
      margin-bottom: 0.75rem;
      border: 1px solid var(--border);
      border-radius: 9px;
      background: var(--bg-subtle);
      color: var(--text-2);
      font-size: 1rem;
    }
    .feature-card .icon svg {
      width: 18px;
      height: 18px;
    }
    .feature-card h3 {
      color: var(--text);
      margin: 0 0 0.35rem 0;
      font-size: 1rem;
    }
    .feature-card p {
      color: var(--text-3);
      font-size: 0.9rem;
      margin: 0;
    }
    .try-box {
      background: var(--bg-subtle);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 1.5rem;
      margin: 2rem 0;
    }
    .try-box-title {
      font-weight: 600;
      color: var(--text);
      margin-bottom: 0.75rem;
      font-size: 1.05rem;
    }
    .try-box code {
      display: block;
      background: var(--code-bg);
      color: var(--code-text);
      border: 1px solid var(--code-border);
      padding: 1rem;
      border-radius: 8px;
      overflow-x: auto;
      font-size: 0.85rem;
    }
    .highlight {
      background: var(--accent-soft);
      color: var(--text);
      border: 1px solid var(--accent-border);
      padding: 1.25rem 1.5rem;
      border-radius: var(--radius);
      margin: 1.5rem 0;
    }
    .highlight h3 {
      color: var(--text);
      margin-top: 0;
    }
    .highlight p {
      color: var(--text-2);
      margin: 0;
    }
    .highlight a {
      color: var(--accent-text);
    }
    .endpoint {
      background: var(--surface);
      padding: 1.25rem;
      border-radius: var(--radius);
      margin: 1rem 0;
      border: 1px solid var(--border);
    }
    .endpoint .endpoint-header {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      margin-bottom: 0.75rem;
    }
    .endpoint .method {
      font-weight: 600;
      font-size: 0.7rem;
      font-family: var(--font-mono);
      padding: 0.2rem 0.45rem;
      border-radius: 5px;
      border: 1px solid transparent;
      text-transform: uppercase;
    }
    .endpoint .method-get { background: var(--success-soft); border-color: var(--success-border); color: var(--success-text); }
    .endpoint .method-post { background: var(--info-soft); border-color: var(--info-border); color: var(--info-text); }
    .endpoint .endpoint-path {
      font-family: var(--font-mono);
      font-weight: 500;
      color: var(--text);
    }
    ul { margin-left: 1.25rem; margin-top: 0.75rem; }
    li { margin-bottom: 0.5rem; color: var(--text-2); }
    a { color: var(--accent-text); text-decoration: none; font-weight: 500; }
    a:hover { text-decoration: underline; text-underline-offset: 3px; }
    .faq-section {
      margin: 3rem 0;
    }
    .faq-item {
      border-bottom: 1px solid var(--border);
      padding: 1.4rem 0;
    }
    .faq-item:last-child { border-bottom: none; }
    .faq-q {
      font-weight: 600;
      color: var(--text);
      font-size: 1.05rem;
      letter-spacing: -0.01em;
      margin-bottom: 0.6rem;
    }
    .faq-a {
      color: var(--text-2);
      margin: 0;
    }
    .cta-box {
      background: var(--bg-subtle);
      color: var(--text);
      border: 1px solid var(--border);
      padding: 2.5rem;
      border-radius: var(--radius-lg);
      text-align: left;
      margin: 3rem 0;
    }
    .cta-box h3 {
      font-size: 1.5rem;
      margin: 0 0 0.6rem;
      color: var(--text);
      letter-spacing: -0.025em;
    }
    .cta-box p {
      color: var(--text-3);
      margin-bottom: 1.5rem;
    }
    .cta-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.45rem;
      background: var(--accent);
      color: var(--accent-fg);
      min-height: 44px;
      padding: 0.65rem 1.25rem;
      border-radius: 8px;
      text-decoration: none;
      font-weight: 500;
      font-size: 0.95rem;
      transition: background 0.15s ease;
    }
    .cta-btn:hover {
      background: var(--accent-hover);
      color: var(--accent-fg);
      text-decoration: none;
    }

    /* Tool form styles */
    .tool-form {
      display: grid;
      gap: 1rem;
      margin-top: 1.5rem;
    }
    .tool-input {
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
    }
    .tool-input label {
      font-weight: 500;
      font-size: 0.9rem;
      color: var(--text);
    }
    .tool-input input {
      min-height: 44px;
      padding: 0.65rem 0.9rem;
      border-radius: 8px;
      border: 1px solid var(--border-strong);
      background: var(--surface);
      color: var(--text);
      font-size: 1rem;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .tool-input input::placeholder {
      color: var(--text-4);
    }
    .tool-input input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: var(--focus-ring);
    }
    .tool-actions {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
      align-items: center;
    }
    .tool-actions button {
      min-height: 44px;
      background: var(--accent);
      border: none;
      color: var(--accent-fg);
      padding: 0.65rem 1.25rem;
      border-radius: 8px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.15s;
    }
    .tool-actions button:hover {
      background: var(--accent-hover);
    }
    .tool-actions button:focus-visible {
      outline: none;
      box-shadow: var(--focus-ring);
    }
    .tool-results {
      background: var(--code-bg);
      color: var(--code-text);
      border: 1px solid var(--code-border);
      border-radius: 12px;
      padding: 1.25rem;
      margin-top: 1.5rem;
      font-family: var(--font-mono);
      font-size: 0.85rem;
      overflow-x: auto;
      min-height: 140px;
      white-space: pre-wrap;
    }

    /* ===== CUSTOMER LOGOS ===== */
    /* Logos render as single-colour silhouettes so every brand reads on both
       themes: black in light mode, white in dark mode. */
    .trust-logos-section {
      position: relative;
      padding: 3.5rem 1.5rem;
      background: var(--bg);
      border-block: 1px solid var(--border);
      overflow: hidden;
    }
    .trust-logos-section--api-inline {
      padding: 1.5rem 1rem;
      margin: 0 0 1.5rem;
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      background: var(--surface);
    }
    .trust-logos-inner {
      max-width: 1200px;
      margin: 0 auto;
    }
    .trust-logos-label {
      margin: 0 0 1.5rem;
      color: var(--text-3);
      font-size: 0.875rem;
      font-weight: 500;
      text-align: center;
    }
    .trust-logos-section--api-inline .trust-logos-label {
      margin-bottom: 0.75rem;
    }
    .trust-logos-track {
      position: relative;
      width: 100%;
      height: 84px;
      overflow: hidden;
      mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
      -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
    }
    .trust-logos-track:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 4px;
      border-radius: 10px;
    }
    .trust-logos-slide {
      display: flex;
      width: max-content;
      height: 100%;
      align-items: center;
      animation: trust-logos-marquee 48s linear infinite;
      will-change: transform;
    }
    .trust-logos-track:hover .trust-logos-slide,
    .trust-logos-track:focus-visible .trust-logos-slide {
      animation-play-state: paused;
    }
    .trust-logos-set {
      display: flex;
      flex: none;
      flex-wrap: nowrap;
      align-items: center;
      gap: clamp(2.5rem, 4vw, 4.5rem);
      padding-right: clamp(2.5rem, 4vw, 4.5rem);
    }
    .trust-logo-item {
      display: flex;
      flex: 0 0 clamp(130px, 11vw, 170px);
      align-items: center;
      justify-content: center;
      height: 56px;
    }
    .trust-logo-img {
      display: block;
      width: min(var(--trust-logo-width, 150px), 100%);
      max-width: 100%;
      height: 32px;
      object-fit: contain;
      object-position: center;
      filter: grayscale(1) brightness(0);
      opacity: 0.55;
      transition: opacity 0.2s ease;
    }
    .trust-logo-item:hover .trust-logo-img {
      opacity: 0.85;
    }
    :root[data-theme="dark"] .trust-logo-img {
      filter: grayscale(1) brightness(0) invert(1);
      opacity: 0.6;
    }
    :root[data-theme="dark"] .trust-logo-item:hover .trust-logo-img {
      opacity: 0.9;
    }
    @media (prefers-color-scheme: dark) {
      :root:not([data-theme]) .trust-logo-img {
        filter: grayscale(1) brightness(0) invert(1);
        opacity: 0.6;
      }
    }
    .trust-logos-section--api-inline .trust-logos-track {
      height: 72px;
    }
    .trust-logos-section--api-inline .trust-logo-img {
      height: 28px;
    }
    @keyframes trust-logos-marquee {
      from { transform: translateX(0); }
      to { transform: translateX(-50%); }
    }
    [dir="rtl"] .trust-logos-slide {
      animation-direction: reverse;
    }
    @media (max-width: 768px) {
      .trust-logos-section {
        padding: 2.5rem 1rem;
      }
      .trust-logos-label {
        margin-bottom: 1rem;
      }
      .trust-logos-track {
        height: 72px;
      }
      .trust-logos-set {
        gap: 2.25rem;
        padding-right: 2.25rem;
      }
      .trust-logo-item {
        flex-basis: 128px;
        height: 52px;
      }
      .trust-logo-img,
      .trust-logos-section--api-inline .trust-logo-img {
        height: 28px;
      }
    }
    @media (prefers-reduced-motion: reduce) {
      /* Static grid: every variant must grow to fit its rows, including the inline one. */
      .trust-logos-track,
      .trust-logos-section--api-inline .trust-logos-track {
        height: auto;
        mask-image: none;
        -webkit-mask-image: none;
      }
      .trust-logos-slide {
        width: 100%;
        height: auto;
        animation: none !important;
      }
      .trust-logos-set {
        flex: 1;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem 2.5rem;
        padding-right: 0;
      }
      @media (min-width: 900px) {
        .trust-logos-set {
          display: grid;
          grid-template-columns: repeat(5, minmax(0, 1fr));
          justify-items: center;
        }
      }
      .trust-logos-set--duplicate {
        display: none;
      }
    }

    /* ===== FOOTER ===== */
    .footer {
      background: var(--bg);
      color: var(--text-3);
      padding: 3.5rem 1.5rem 2rem;
      border-top: 1px solid var(--border);
    }
    /* Oversized brand sign-off: the logo's blinking terminal cursor, set large and quiet. */
    .footer-wordmark {
      display: flex;
      align-items: flex-end;
      justify-content: center;
      max-width: 1200px;
      margin: 3rem auto -2rem;
      overflow: hidden;
      user-select: none;
      pointer-events: none;
      line-height: 0.78;
      font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
      font-size: min(22.5vw, 16.5rem);
      font-weight: 800;
      letter-spacing: -0.075em;
      -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 96%);
      mask-image: linear-gradient(to bottom, #000 35%, transparent 96%);
    }
    .footer-wordmark__text::before { content: attr(data-wordmark); }
    .footer-wordmark__text {
      color: var(--text);
      opacity: 0.09;
      padding-right: 0.04em;
      /* Rasterize the oversized glyphs once so the blinking cursor does not repaint them. */
      transform: translateZ(0);
    }
    .footer-wordmark__cursor {
      flex: 0 0 auto;
      width: 0.09em;
      height: 0.54em;
      margin: 0 0 0.03em 0.05em;
      border-radius: 0.02em;
      background: var(--accent);
      opacity: 0.85;
      animation: footer-wordmark-blink 1.1s step-end infinite;
      will-change: opacity;
    }
    @media (prefers-reduced-motion: reduce) {
      .footer-wordmark__cursor { animation: none; }
    }
    :root[data-theme="dark"] .footer-wordmark__text { opacity: 0.11; }
    @keyframes footer-wordmark-blink {
      0%, 55% { opacity: 0.85; }
      56%, 100% { opacity: 0; }
    }
    .trust-logos-section + .footer {
      border-top: 0;
    }
    .footer-cta {
      position: relative;
      display: grid;
      grid-template-columns: minmax(0, 1.25fr) auto;
      align-items: center;
      gap: 2rem;
      max-width: 1200px;
      margin: 0 auto 3.5rem;
      padding: clamp(1.5rem, 3.5vw, 2.5rem);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      background: var(--bg-subtle);
    }
    .footer-cta h2 {
      max-width: 720px;
      margin: 0;
      color: var(--text);
      font-size: clamp(1.5rem, 2.6vw, 2.1rem);
      font-weight: 600;
      line-height: 1.15;
      letter-spacing: -0.03em;
    }
    .footer-cta p {
      max-width: 640px;
      margin: 0.7rem 0 0;
      color: var(--text-3);
      font-size: 0.98rem;
      line-height: 1.65;
    }
    .footer-cta__actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 0.6rem;
    }
    .footer-cta__button {
      display: inline-flex;
      min-height: 44px;
      align-items: center;
      justify-content: center;
      padding: 0.6rem 1.15rem;
      border: 1px solid transparent;
      border-radius: 8px;
      background: var(--accent);
      color: var(--accent-fg) !important;
      font-size: 0.92rem;
      font-weight: 500;
      text-align: center;
      white-space: nowrap;
      transition: background 0.15s ease, border-color 0.15s ease;
    }
    .footer-cta__button:hover {
      background: var(--accent-hover);
      color: var(--accent-fg) !important;
    }
    .footer-cta__button--secondary {
      border-color: var(--border-strong);
      background: var(--surface);
      color: var(--text) !important;
    }
    .footer-cta__button--secondary:hover {
      background: var(--surface-hover);
      color: var(--text) !important;
    }
    .footer a {
      color: var(--text-3);
      font-weight: 400;
      text-decoration: none;
      transition: color 0.15s ease;
    }
    .footer a:hover {
      color: var(--text);
      text-decoration: none;
    }
    .footer-grid {
      max-width: 1200px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 1.6fr repeat(4, 1fr);
      gap: 2rem;
    }
    .footer-brand {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.75rem;
    }
    .footer-brand .brand-logo__mark { width: 24px; height: 24px; }
    .footer-brand .brand-logo__wordmark { font-size: 1.5rem; }
    .footer-brand p {
      color: var(--text-3);
      font-size: 0.875rem;
      line-height: 1.6;
      margin: 0;
      max-width: 22rem;
    }
    .footer-column__title {
      color: var(--text);
      font-size: 0.84rem;
      font-weight: 500;
      line-height: 1.4;
      margin: 0 0 0.8rem;
      letter-spacing: 0;
    }
    .footer-column ul {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    .footer-column li {
      margin: 0;
    }
    .footer-column a {
      font-size: 0.86rem;
      line-height: 1.45;
    }
    .footer-distribution {
      max-width: 1200px;
      margin: 2.5rem auto 0;
      padding-top: 1.25rem;
      border-top: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 0.75rem 1rem;
      flex-wrap: wrap;
    }
    .footer-distribution__label {
      color: var(--text-3);
      font-size: 0.8rem;
      font-weight: 500;
    }
    .footer-distribution__links {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
    }
    .footer-distribution__link {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      padding: 0.3rem 0.6rem;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: transparent;
      color: var(--text-2) !important;
      font-size: 0.78rem;
      line-height: 1.2;
      transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    }
    .footer-distribution__link:hover {
      border-color: var(--border-strong);
      background: var(--hover-bg);
      color: var(--text) !important;
    }
    .footer-distribution__link:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 3px;
    }
    .footer-distribution__external {
      font-size: 0.72rem;
      color: var(--text-3);
    }
    .footer-meta {
      max-width: 1200px;
      margin: 1.25rem auto 0;
      padding-top: 1.25rem;
      border-top: 1px solid var(--border);
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem 1.5rem;
      justify-content: space-between;
      color: var(--text-3);
      font-size: 0.8rem;
    }
    /* Pages that end with their own closing CTA mark it, so the CTAs never stack. */
    body:has([data-page-closing-cta]) [data-site-footer-cta] {
      display: none;
    }
    .footer-legal {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem 1rem;
      justify-content: center;
    }
    .footer-legal a,
    .footer-meta a {
      color: var(--text-3);
    }
    .footer-legal a:hover,
    .footer-meta a:hover {
      color: var(--text);
    }
    .cookie-consent {
      position: fixed;
      left: 1rem;
      right: 1rem;
      bottom: 1rem;
      z-index: 10000;
      max-width: 760px;
      margin: 0 auto;
      padding: 1rem 1.1rem;
      color: var(--text-2);
      background: var(--surface-raised);
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: var(--shadow-lg);
    }
    .cookie-consent[hidden] {
      display: none;
    }
    .cookie-consent__content {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
    }
    .cookie-consent__copy {
      min-width: 0;
    }
    .cookie-consent__copy strong {
      display: block;
      color: var(--text);
      font-weight: 600;
      margin-bottom: 0.25rem;
    }
    .cookie-consent__copy p {
      margin: 0;
      color: var(--text-3);
      font-size: 0.86rem;
      line-height: 1.55;
    }
    .cookie-consent__copy a {
      color: var(--accent-text);
    }
    .cookie-consent__actions {
      display: flex;
      flex: 0 0 auto;
      gap: 0.5rem;
    }
    .cookie-consent__button {
      min-height: 2.5rem;
      padding: 0.5rem 0.85rem;
      border-radius: 8px;
      border: 1px solid var(--border-strong);
      background: var(--surface);
      color: var(--text);
      font: inherit;
      font-size: 0.84rem;
      font-weight: 500;
      cursor: pointer;
    }
    .cookie-consent__button:hover {
      background: var(--surface-hover);
    }
    .cookie-consent__button--primary {
      background: var(--accent);
      border-color: var(--accent);
      color: var(--accent-fg);
    }
    .cookie-consent__button--primary:hover {
      background: var(--accent-hover);
    }
    .footer-cookie-settings {
      appearance: none;
      border: 0;
      padding: 0;
      background: transparent;
      color: var(--text-3);
      font: inherit;
      cursor: pointer;
    }
    .footer-cookie-settings:hover {
      color: var(--text);
    }

    /* ===== MOBILE RESPONSIVENESS ===== */

    /* Compact desktop navigation for laptops and longer translated labels. */
    @media (min-width: 1321px) and (max-width: 1500px) {
      .header {
        padding: 0 1rem;
      }
      .header-inner {
        gap: 0.6rem;
      }
      .nav {
        gap: 0;
      }
      .nav > a,
      .nav > .nav-item > .nav-link {
        gap: 0.25rem;
        padding: 0.4rem 0.5rem;
        font-size: 0.84rem;
      }
      .header-actions {
        gap: 0.35rem;
      }
      .global-search-trigger-label {
        display: none;
      }
      .btn-signin {
        padding: 0.4rem 0.5rem;
      }
      .btn-start-free {
        padding: 0.4rem 0.75rem;
      }
      .header-dashboard-link {
        padding: 0.4rem 0.6rem;
      }
      .header-dashboard-link span {
        display: none;
      }
    }

    /* Mobile Navigation */
    @media (max-width: 1320px) {
      .header {
        padding: 0 1rem;
      }
      .header-inner {
        gap: 0.5rem;
        justify-content: space-between;
      }
      .hamburger-btn {
        display: flex;
        order: -1;
      }
      .logo {
        flex: 1;
        justify-content: flex-start;
      }
      .nav {
        display: none;
        position: static;
        transform: none;
      }
      .header-actions {
        display: none;
      }
      .global-search-trigger--mobile {
        display: grid;
      }
      /* Hide desktop auth UI on mobile - replaced by mobile buttons */
      .btn-signin, .btn-start-free, .user-menu {
        display: none !important;
      }
      /* Allow JS to control mobile header buttons */
      .btn-signup-mobile, .btn-dashboard-mobile {
        display: none !important;
      }
      .btn-signup-mobile[style*="inline-flex"] {
        display: inline-flex !important;
      }
      .btn-dashboard-mobile[style*="inline-flex"] {
        display: inline-flex !important;
      }
      .btn-signup-mobile,
      .btn-dashboard-mobile {
        min-height: 44px;
      }
      /* Leave room under the last content for the floating support button. */
      body:has(.floating-support-btn) main {
        padding-bottom: 5rem;
      }
      .mobile-menu-overlay,
      .mobile-menu {
        display: block;
      }
      .floating-support-btn {
        right: max(1rem, env(safe-area-inset-right));
        bottom: max(1rem, env(safe-area-inset-bottom));
      }
    }
    @media (max-width: 860px) {
      .global-search-layer {
        padding: 0.75rem;
      }
      .global-search-body {
        grid-template-columns: minmax(0,1fr);
        min-height: 0;
        height: min(66vh, 560px);
      }
      .global-search-preview {
        display: none;
      }
    }
    @media (max-width: 560px) {
      .global-search-layer {
        place-items: stretch;
        padding: 0;
      }
      .global-search-dialog {
        width: 100%;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
      }
      .global-search-box {
        min-height: 60px;
        padding: max(0.35rem, env(safe-area-inset-top)) 0.6rem 0 1rem;
      }
      .global-search-input {
        height: 56px;
        font-size: 1rem;
      }
      .global-search-close {
        width: 44px;
        height: 44px;
      }
      .global-search-body {
        min-height: 0;
        max-height: none;
        height: calc(100dvh - 60px - 49px);
        padding-bottom: env(safe-area-inset-bottom);
      }
      .global-search-result {
        grid-template-columns: 32px minmax(0,1fr);
        min-height: 48px;
      }
      .global-search-result-kind {
        display: none;
      }
      /* Keyboard hints and the shortcut label mean nothing on a phone. */
      .global-search-footer {
        display: none;
      }
      .global-search-hints {
        display: none;
      }
    }
    @media (max-width: 1100px) {
      .nav-mega-menu__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    /* Hero sections */
    @media (max-width: 640px) {
      .hero {
        padding: 3rem 1rem 2.25rem;
      }
      .hero h1 {
        font-size: 2rem;
        line-height: 1.15;
      }
      .hero p {
        font-size: 1rem;
      }
    }

    /* Container padding */
    @media (max-width: 600px) {
      .container {
        padding: 1.5rem 1rem;
      }
      h2 {
        font-size: 1.4rem;
        margin-top: 2rem;
      }
    }

    /* Code blocks - prevent overflow */
    pre, code {
      word-break: break-word;
    }
    @media (max-width: 600px) {
      pre {
        padding: 1rem;
        font-size: 0.8rem;
      }
      .try-box code {
        font-size: 0.75rem;
        padding: 0.75rem;
        white-space: pre-wrap;
        word-break: break-all;
      }
    }

    /* Cards */
    @media (max-width: 600px) {
      .card {
        padding: 1.25rem;
      }
    }

    /* Endpoint boxes */
    @media (max-width: 600px) {
      .endpoint {
        padding: 1rem;
      }
      .endpoint .endpoint-header {
        flex-wrap: wrap;
        gap: 0.5rem;
      }
      .endpoint .endpoint-path {
        font-size: 0.85rem;
        word-break: break-all;
      }
    }

    /* Footer */
    @media (max-width: 900px) {
      .footer-cta {
        grid-template-columns: minmax(0, 1fr);
      }
      .footer-cta__actions {
        justify-content: flex-start;
      }
      .footer-grid {
        grid-template-columns: repeat(2, 1fr);
      }
      .footer-brand {
        grid-column: 1 / -1;
      }
    }
    @media (max-width: 600px) {
      .footer {
        padding: 2.5rem 1rem 1.75rem;
      }
      .footer-cta {
        margin-bottom: 2.5rem;
        padding: 1.5rem;
      }
      .footer-cta__actions {
        flex-direction: column;
        align-items: stretch;
      }
      .footer-grid {
        gap: 1.75rem 1rem;
      }
      .footer-distribution {
        align-items: flex-start;
        flex-direction: column;
      }
      .footer-meta {
        flex-direction: column;
        align-items: flex-start;
      }
      .footer-legal {
        flex-wrap: wrap;
        justify-content: flex-start;
      }
      .cookie-consent__content {
        align-items: stretch;
        flex-direction: column;
      }
      .cookie-consent__actions {
        width: 100%;
      }
      .cookie-consent__button {
        flex: 1;
      }
    }

    @media (max-width: 480px) {
      .btn-signup-mobile,
      .btn-dashboard-mobile {
        max-width: 8.5rem;
        padding: 0.4rem 0.65rem;
        font-size: 0.78rem;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
      }
    }

    @media (max-width: 360px) {
      .logo .brand-logo__wordmark {
        display: none;
      }
    }

    /* CTA box */
    @media (max-width: 600px) {
      .cta-box {
        padding: 1.5rem 1.25rem;
      }
      .cta-box h3 {
        font-size: 1.25rem;
      }
    }

    /* Highlight boxes */
    @media (max-width: 600px) {
      .highlight {
        padding: 1rem;
      }
    }
    .api-trust-signals {
      max-width: 1200px;
      margin: 0 auto 1.5rem;
      padding: 1.25rem;
      background: var(--surface);
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
    }
    .api-trust-signals-header {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 0.85rem;
      align-items: start;
      margin-bottom: 1rem;
    }
    .api-trust-signals-icon,
    .api-trust-signal-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      color: var(--text-2);
      background: var(--bg-subtle);
      border: 1px solid var(--border);
    }
    .api-trust-signals-icon {
      width: 34px;
      height: 34px;
    }
    .api-trust-signals-icon svg {
      width: 18px;
      height: 18px;
    }
    .api-trust-signals h2 {
      margin: 0 0 0.3rem;
      font-size: 1.05rem;
      color: var(--text);
    }
    .api-trust-signals p {
      margin: 0;
      color: var(--text-3);
      line-height: 1.6;
      font-size: 0.9rem;
    }
    .api-trust-signals-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }
    .api-trust-signal {
      min-width: 0;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 0.7rem;
      padding: 0.9rem;
      background: var(--bg-subtle);
      border-right: 1px solid var(--border);
    }
    .api-trust-signal:last-child {
      border-right: 0;
    }
    .api-trust-signal-icon {
      width: 28px;
      height: 28px;
      color: var(--success-text);
    }
    .api-trust-signal-icon svg {
      width: 15px;
      height: 15px;
    }
    .api-trust-signal strong {
      display: block;
      color: var(--text);
      font-size: 0.95rem;
      font-weight: 600;
      margin-bottom: 0.1rem;
      overflow-wrap: anywhere;
    }
    .api-trust-signal span {
      display: block;
      color: var(--text-3);
      font-size: 0.78rem;
      font-weight: 500;
      margin-bottom: 0.3rem;
    }
    .api-trust-signal p {
      color: var(--text-3);
      font-size: 0.82rem;
      line-height: 1.55;
    }
    @media (max-width: 1024px) {
      .api-trust-signals-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .api-trust-signal {
        border-bottom: 1px solid var(--border);
      }
    }
    @media (max-width: 768px) {
      .api-trust-signals {
        padding: 1rem;
      }
      .api-trust-signals-grid {
        grid-template-columns: 1fr;
      }
      .api-trust-signal {
        border-right: 0;
      }
    }
    @media (prefers-reduced-motion: reduce) {
      .global-search-layer,
      .global-search-dialog,
      .global-search-trigger,
      .global-search-close,
      .global-search-filter,
      .global-search-result,
      .global-search-preview-link {
        scroll-behavior: auto !important;
        transition: none !important;
      }
      .brand-logo__wordmark::after {
        transition: none;
      }
      .brand-logo:hover .brand-logo__wordmark::after,
      .brand-logo:focus-visible .brand-logo__wordmark::after {
        animation: none;
        opacity: 1;
      }
    }

    /* Mobile ergonomics shared by every page: 44px touch targets in the footer,
       and form fields at 16px so iOS does not zoom the page on focus. */
    @media (max-width: 768px) {
      input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
      select,
      textarea {
        font-size: 16px !important;
      }
      .footer-legal a,
      .footer-meta a,
      .footer-cookie-settings,
      .footer-distribution__link {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
      }
      .footer-legal {
        gap: 0 1rem;
      }
      .footer-column ul {
        gap: 0;
      }
      .footer-column a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
      }
    }
