:root {
  color-scheme: dark;

  --bg: #0a0a0b;
  --bg-2: #111114;
  --card: #131316;
  --card-2: #17171b;
  --card-alpha: rgba(19,19,22,0.85);
  --card-alpha-2: rgba(19,19,22,0.75);
  --hint-bg: rgba(19,19,22,0.5);
  --border: #26262c;
  --border-strong: #33333a;
  --text: #f5f5f7;
  --muted: #8a8a92;
  --muted-2: #5d5d66;
  --placeholder: #4b4b54;

  --accent: #7cd0e8;
  --accent-hover: #9adfef;
  --accent-glow: rgba(124,208,232,0.22);
  --accent-glow-strong: rgba(124,208,232,0.5);
  --accent-soft: rgba(124,208,232,0.07);
  --on-accent: #07161c;

  --success: #34d399;
  --success-soft: rgba(52,211,153,0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239,68,68,0.15);
  --danger-text: #ff8080;
  --warning: #f2c530;
  --warning-soft: rgba(242,197,48,0.15);

  --overlay-scrim: rgba(6,7,9,0.72);
  --shadow-sm: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-md: 0 20px 50px -20px rgba(0,0,0,0.55);
  --shadow-lg: 0 40px 80px -30px rgba(0,0,0,0.6);
  --shadow-modal: 0 40px 100px rgba(0,0,0,0.6);
  --grid-line: rgba(255,255,255,0.04);
  --hairline-hover: rgba(255,255,255,0.04);
  --ambient-glow: rgba(255,255,255,0.05);

  /* Terminal / mascot chip surface — intentionally dark in both themes */
  --terminal-bg: #1a1a1f;
  --terminal-border: var(--border-strong);

  /* Sheriff palette (decorative, fixed art) */
  --sh-hat: #2c3a7a;
  --sh-hat-dark: #1e285a;
  --sh-hat-band: #8a1e1e;
  --sh-skin: #ffcf8c;
  --sh-skin-dark: #d99a55;
  --sh-hair: #1a1a1e;
  --sh-shirt: var(--accent);
  --sh-vest: #2f3f8a;
  --sh-vest-dark: #212d63;
  --sh-belt: #3a2515;
  --sh-belt-line: #1f130a;
  --sh-star: #f2c530;
  --sh-mouth: #4a72c7;
  --sh-outline: #0d0f18;
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #f6f7f9;
  --bg-2: #eef0f3;
  --card: #ffffff;
  --card-2: #f5f6f8;
  --card-alpha: rgba(255,255,255,0.92);
  --card-alpha-2: rgba(255,255,255,0.88);
  --hint-bg: rgba(255,255,255,0.65);
  --border: #e2e4ea;
  --border-strong: #ccd0d9;
  --text: #14161c;
  --muted: #5a5f6b;
  --muted-2: #868c99;
  --placeholder: #9aa0ac;

  --accent: #0f7ea3;
  --accent-hover: #0c6885;
  --accent-glow: rgba(15,126,163,0.16);
  --accent-glow-strong: rgba(15,126,163,0.32);
  --accent-soft: rgba(15,126,163,0.07);
  --on-accent: #ffffff;

  --success: #0c8f63;
  --success-soft: rgba(12,143,99,0.1);
  --danger: #d5342a;
  --danger-soft: rgba(213,52,42,0.1);
  --danger-text: #b8291f;
  --warning: #a9720f;
  --warning-soft: rgba(169,114,15,0.12);

  --overlay-scrim: rgba(20,22,28,0.45);
  --shadow-sm: 0 8px 20px rgba(20,24,34,0.08);
  --shadow-md: 0 20px 44px -22px rgba(20,24,34,0.16);
  --shadow-lg: 0 30px 60px -30px rgba(20,24,34,0.16);
  --shadow-modal: 0 30px 80px rgba(20,24,34,0.2);
  --grid-line: rgba(20,24,34,0.045);
  --hairline-hover: rgba(20,24,34,0.035);
  --ambient-glow: rgba(15,126,163,0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv11' 1, 'ss01' 1, 'calt' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Background layers */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 20%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, black 30%, transparent 75%);
}
.bg-glow {
  position: fixed;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  border-radius: 9999px;
  background: var(--ambient-glow);
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
}

/* Theme toggle — sliding pill switch */
.theme-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.theme-toggle-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 30px;
}
.theme-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.theme-toggle .tt-icon {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  color: var(--muted-2);
  transition: color 0.2s;
}
.theme-toggle .tt-moon { color: var(--text); }
[data-theme="light"] .theme-toggle .tt-moon { color: var(--muted-2); }
[data-theme="light"] .theme-toggle .tt-sun { color: var(--text); }
.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 6px var(--accent-glow);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
[data-theme="light"] .theme-toggle-thumb { transform: translateX(24px); }
.theme-toggle-standalone {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 5;
}

/* Header block */
.page-head {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 8px;
}

.sheriff-sprite-onb {
  width: 72px !important;
  height: 72px !important;
  image-rendering: pixelated;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.55));
}

/* --- MASCOT (Sheriff Pixel Agent) --- */
.mascot-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 14px;
  animation: floaty 3.6s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.mascot-bubble {
  position: relative;
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  color: #f5f5f7;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  padding: 8px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  white-space: nowrap;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 1.6s ease-in-out infinite;
}
.mascot-text.typing::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  color: var(--success);
  animation: caret-blink 0.7s steps(1) infinite;
}
@keyframes caret-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.mascot-tail {
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px; height: 10px;
  background: var(--terminal-bg);
  border-right: 1px solid var(--terminal-border);
  border-bottom: 1px solid var(--terminal-border);
  transform: translateX(-50%) rotate(45deg);
}

/* Sheriff Pixel Art - 16x16 grid built via JS */
.sheriff {
  position: relative;
  padding-bottom: 10px;
}
.sheriff-grid {
  display: grid;
  grid-template-columns: repeat(16, 6px);
  grid-template-rows: repeat(16, 6px);
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.55));
}
.sheriff-grid > i {
  display: block;
  width: 6px;
  height: 6px;
}
.sheriff-shadow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 8px;
  background: rgba(0,0,0,0.35);
  border-radius: 50%;
  filter: blur(6px);
  z-index: -1;
}

.page-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 6px 0 4px;
  text-align: center;
}
.page-subtitle {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  max-width: 440px;
  margin: 0;
}
.page-login-hint {
  color: var(--muted-2);
  font-size: 12px;
  text-align: center;
  margin: 10px 0 0;
}
.page-login-hint a { color: var(--accent); font-weight: 600; text-decoration: none; }
.page-login-hint a:hover { text-decoration: underline; }

/* Main / Card */
.main-wrap {
  position: relative;
  z-index: 2;
  flex-grow: 1;
  display: flex;
  justify-content: center;
  padding: 14px 20px 32px;
}
.card {
  width: 100%;
  max-width: 680px;
  background: var(--card-alpha);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 30px;
  box-shadow: var(--shadow-lg);
}
@media (max-width: 640px) {
  .card { padding: 22px 18px; border-radius: 16px; }
}
.login-card { max-width: 420px; margin: 0 auto; }
.login-footer-hint {
  text-align: center;
  font-size: 12px;
  color: var(--muted-2);
  margin: 20px 0 0;
}
.login-footer-hint a { color: var(--accent); font-weight: 600; text-decoration: none; }
.login-footer-hint a:hover { text-decoration: underline; }

/* Progress Rail */
.progress-rail {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.progress-rail li {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}
.progress-rail li:last-child { flex: 0 0 auto; }
.rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  flex-shrink: 0;
  cursor: default;
}
.progress-rail li.clickable .rail-item { cursor: pointer; }
.dot {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--bg);
  border: 2px solid var(--border-strong);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.25s ease;
}
.dot svg { width: 14px; height: 14px; }
.dot-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 6px;
  align-self: center;
  margin-bottom: 22px;
  transition: background 0.35s ease;
}
/* rail states */
.progress-rail li.active .dot {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
  background: var(--accent-soft);
}
.progress-rail li.active .dot-label { color: var(--accent); }
.progress-rail li.done .dot {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.progress-rail li.done .dot-label { color: var(--accent); }
.progress-rail li.done + li .connector,
.progress-rail li.done .connector { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }

@media (max-width: 560px) {
  .dot-label { display: none; }
  .connector { margin-bottom: 0; }
}

/* Steps */
.step[hidden] { display: none; }
.step { animation: fadeIn 0.28s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.step-header { margin-bottom: 18px; }
.step-header.center { text-align: center; }
.eyebrow {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.step-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.subtitle {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.subtitle kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  color: #f5f5f7;
}

/* Fields */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.mt { margin-top: 12px; }
.mt-lg { margin-top: 20px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: 11px;
  color: var(--muted);
  margin-left: 4px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.field input,
.field select,
.select-wrap select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
.field input::placeholder { color: var(--placeholder); }
.field input:focus,
.field select:focus,
.select-wrap select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field-hint {
  font-size: 11px;
  color: var(--muted-2);
  margin: 4px 0 0 4px;
}
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon svg {
  position: absolute;
  left: 16px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.input-icon input { padding-left: 42px; }

.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  cursor: pointer;
}
.select-caret {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--muted);
  pointer-events: none;
}

/* Chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  min-height: 2px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px 6px 14px;
  font-size: 12px;
  font-weight: 500;
}
.chip button {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  display: inline-flex;
  cursor: pointer;
  transition: color 0.15s;
}
.chip button:hover { color: var(--text); }
.chip button svg { width: 12px; height: 12px; }

/* Issue cards */
.issue-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) { .issue-grid { grid-template-columns: 1fr 1fr; } }
.issue-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  transition: border 0.2s, background 0.2s, transform 0.15s;
}
.issue-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.issue-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-glow), 0 0 18px var(--accent-soft);
}
.issue-icon {
  width: 34px; height: 34px;
  background: var(--card-2);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text);
}
.issue-icon svg { width: 16px; height: 16px; }
.issue-card.selected .issue-icon { background: var(--accent); color: var(--on-accent); }
.issue-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.issue-title { font-size: 13px; font-weight: 600; }
.issue-body { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* Link add row */
.link-row { display: flex; gap: 8px; align-items: center; }
.link-row input { flex: 1; }
.btn-add {
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 999px;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.btn-add:hover { background: var(--accent-hover); }
.btn-add svg { width: 18px; height: 18px; }
.link-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
}
.link-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.link-item button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 2px;
  display: inline-flex;
  transition: color 0.15s;
}
.link-item button:hover { color: var(--text); }
.link-item button svg { width: 14px; height: 14px; }
.hint-box {
  border: 1px dashed var(--border-strong);
  background: var(--hint-bg);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.hint-box strong { color: var(--text); font-weight: 600; }
/* Shown once the base plan's single suppression target is filled. */
.hint-box-locked { border-style: solid; margin-top: 10px; }

/* The link input locks after the first target — more are a paid feature. */
.link-row-locked { opacity: 0.55; }
.link-row-locked input,
.link-row-locked .btn-add { cursor: not-allowed; }

/* Plans */
.plan-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.plan-grid[hidden] { display: none; }
@media (min-width: 640px) { .plan-grid { grid-template-columns: 1fr 1fr; } }
.plan-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border 0.25s;
}
.plan-card:hover { border-color: var(--border-strong); }
.plan-card--highlight {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
}
.plan-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 0 18px 0 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.plan-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 8px;
}
.plan-label--primary { color: var(--text); }
.plan-price {
  margin: 0 0 20px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.plan-price span {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}
.plan-setup-fee {
  margin: -14px 0 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.plan-setup-fee span {
  font-weight: 400;
  color: var(--muted-2);
}
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  flex: 1;
}
.plan-features li {
  display: flex; align-items: center; gap: 10px;
}
.plan-features li svg {
  width: 14px; height: 14px;
  color: var(--text);
  flex-shrink: 0;
}
.plan-features--primary { color: var(--text); }
.plan-features--primary li svg { color: var(--success); }

/* Final step — confirmation checklist */
.final-checklist {
  list-style: none;
  padding: 0;
  margin: 0 auto 22px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.final-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
}
.final-checklist .check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Buttons */
button { cursor: pointer; font-family: inherit; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 0 26px var(--accent-glow-strong); }
.btn-primary svg { width: 16px; height: 16px; }
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 500;
  transition: border 0.15s, background 0.2s, color 0.15s;
}
.btn-outline:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  transition: color 0.15s;
}
.btn-ghost:hover { color: var(--text); }
.btn-ghost:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-ghost svg { width: 16px; height: 16px; }
.btn-full { width: 100%; }

/* Required-field marker + step validation banner */
.required-mark { color: var(--danger); font-weight: 700; }
.step-error {
  margin: 0 0 14px;
  background: var(--danger-soft);
  color: var(--danger-text);
  border: 1px solid var(--danger);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  text-align: center;
}

/* Step 1 — Auth0 auth choices */
.auth-error {
  max-width: 420px;
  margin: 0 auto 14px;
  background: var(--danger-soft);
  color: var(--danger-text);
  border: 1px solid var(--danger);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  text-align: center;
}
/* Same callout, positive outcome. Used by the verification page, where the
   common case ("confirmed", "link sent") is good news and rendering it in the
   danger palette reads as a failure. */
.auth-error--ok {
  background: var(--ok-soft, var(--success-soft, rgba(34, 197, 94, .12)));
  color: var(--ok-text, var(--success-text, #15803d));
  border-color: var(--ok, var(--success, #22c55e));
}
.auth-choices { display: flex; flex-direction: column; gap: 14px; max-width: 360px; margin: 8px auto 0; }
.auth-choices[hidden], .auth-form[hidden] { display: none; }
.btn-auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  transition: border 0.15s, background 0.2s, transform 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,0,0,0.1);
  cursor: pointer;
}
.btn-auth:hover { border-color: var(--accent); background: var(--card-2); transform: translateY(-1px); }
.btn-auth svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-auth--email svg { color: var(--muted); }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-choices .field-hint { text-align: center; max-width: 320px; align-self: center; }

.auth-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 420px;
  margin: 8px auto 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
}
.auth-profile[hidden] { display: none; }
.auth-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--card-2); flex-shrink: 0; }
.auth-profile-info { flex: 1; min-width: 0; }
.auth-profile-status { font-size: 10px; color: var(--success); font-weight: 700; margin: 0 0 2px; text-transform: uppercase; letter-spacing: 0.05em; }
.auth-profile-name { font-size: 14px; font-weight: 600; color: var(--text); margin: 0; }
.auth-profile-email { font-size: 12px; color: var(--muted); margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sign-in form — email/password on top, Google below, links at the bottom */
.auth-form { max-width: 360px; margin: 8px auto 0; display: flex; flex-direction: column; gap: 4px; }
.auth-form .auth-divider { margin: 16px 0; }
.auth-form .btn-auth { margin-top: 2px; }
.auth-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 12px;
}
.auth-links-sep { color: var(--muted-2); }
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  padding: 2px;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.step-nav[hidden] { display: none; }

/* SFX toggle button */
.sfx-toggle {
  position: fixed;
  left: 28px;
  bottom: 28px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, border 0.15s, color 0.15s;
}
.sfx-toggle:hover { transform: scale(1.06); border-color: var(--accent); }
.sfx-toggle.muted { color: var(--muted-2); }
.sfx-toggle svg { width: 18px; height: 18px; }
