/* ==========================================================================
   HumanCred Design System — "Signal Verified"
   Dark precision. Human proof. Premium credential identity.
   WCAG 2.1 AA compliant.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700;12..96,800&family=Epilogue:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=optional');

/* ---------- Tokens ---------- */
:root {
  /* Surfaces */
  --bg: #09090b;
  --surface: #111114;
  --surface-2: #18181b;
  --surface-3: #1e1e23;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.11);

  /* Text */
  --text: #f1f1f3;
  --text-2: #9f9faa;
  --text-3: #a1a1ab;

  /* Accent — Cyan → Emerald */
  --cyan: #22d3ee;
  --cyan-glow: rgba(34, 211, 238, 0.2);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.15);
  --gradient-accent: linear-gradient(135deg, #22d3ee 0%, #10b981 100%);
  --gradient-accent-hover: linear-gradient(135deg, #38e4f8 0%, #34d399 100%);

  /* Status */
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.08);
  --red-border: rgba(248, 113, 113, 0.2);
  --amber: #fbbf24;
  --amber-bg: rgba(251, 191, 36, 0.08);
  --amber-border: rgba(251, 191, 36, 0.2);
  --green: #34d399;
  --green-bg: rgba(52, 211, 153, 0.08);
  --green-border: rgba(52, 211, 153, 0.2);

  /* Semantic aliases (backwards-compat) */
  --color-bg: var(--bg);
  --color-surface: var(--surface-2);
  --color-primary: var(--surface-3);
  --color-primary-hover: #2a2a2e;
  --color-accent: var(--cyan);
  --color-accent-hover: #06b6d4;
  --color-accent-subtle: rgba(34, 211, 238, 0.08);
  --color-text: var(--text);
  --color-text-secondary: var(--text-2);
  --color-border: var(--border);
  --color-border-strong: var(--border-strong);
  --color-focus: var(--cyan);
  --color-verified: var(--green);
  --color-verified-bg: var(--green-bg);
  --color-danger: var(--red);
  --color-danger-bg: var(--red-bg);
  --color-warning: var(--amber);
  --color-warning-bg: var(--amber-bg);

  /* Typography */
  --font-display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Epilogue', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', 'Cascadia Code', monospace;

  /* Shape */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --shadow-badge:
    0 0 0 1px rgba(34, 211, 238, 0.15),
    0 8px 32px rgba(34, 211, 238, 0.1),
    0 24px 60px rgba(0, 0, 0, 0.55);

  /* Layout */
  --max-width: 1080px;
  --header-height: 60px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--cyan);
  color: #09090b;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Base ---------- */
html { font-size: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(34, 211, 238, 0.045) 0%, transparent 70%);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }
a { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #38e4f8; }
small { font-size: 0.8125rem; color: var(--text-2); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */
.site-header {
  height: var(--header-height);
  background: rgba(9, 9, 11, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  letter-spacing: -0.03em;
}
.site-logo:hover,
.site-logo:focus { color: var(--text); }
.logo-image {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.logo-text {
  /* Text styling if needed */
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--gradient-accent);
  border-radius: 8px;
  position: relative;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.3);
  flex-shrink: 0;
}
.logo-mark::after {
  content: '';
  width: 11px;
  height: 11px;
  border: 2.5px solid rgba(9, 9, 11, 0.9);
  border-radius: 50%;
  position: absolute;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0.125rem;
  align-items: center;
}
nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-2);
  transition: color 0.15s, background 0.15s;
}
nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
nav a[aria-current="page"] {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}
nav .btn { text-decoration: none; }

/* ---------- Main ---------- */
main { flex: 1; padding: 2.5rem 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--text-3);
  padding: 1.75rem 0;
  font-size: 0.8125rem;
  margin-top: auto;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: var(--text-3);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text-2); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 1rem; }
.card-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.card-header h2, .card-header h3 { margin-bottom: 0.25rem; }
.card-header p { color: var(--text-2); margin-bottom: 0; }

.card-elevated {
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  background: var(--surface-3);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6875rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  min-height: 44px;
  min-width: 44px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: #09090b;
  border-color: transparent;
}
.btn-primary:hover {
  background: #e0e0e3;
  color: #09090b;
  box-shadow: var(--shadow-md);
}
.btn-accent {
  background: var(--gradient-accent);
  color: #061612;
  border-color: transparent;
  font-weight: 700;
}
.btn-accent:hover {
  background: var(--gradient-accent-hover);
  color: #061612;
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.28), 0 4px 16px rgba(16, 185, 129, 0.18);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
  padding: 0.5rem 0.75rem;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: transparent;
}
.btn-danger:hover {
  background: #fb7a7a;
  box-shadow: 0 0 16px rgba(248, 113, 113, 0.25);
}
.btn-sm {
  padding: 0.4375rem 1rem;
  font-size: 0.8125rem;
  min-height: 36px;
}
.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1.0625rem;
  border-radius: var(--radius-md);
}
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-icon {
  width: 44px;
  padding: 0;
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-2);
  letter-spacing: 0.01em;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-2);
  letter-spacing: 0.01em;
}
.form-input {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text);
  min-height: 44px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  border-color: var(--cyan);
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}
.form-input::placeholder { color: var(--text-3); }
.form-hint {
  font-size: 0.8125rem;
  color: var(--text-3);
  margin-top: 0.375rem;
  line-height: 1.4;
}
.form-error {
  font-size: 0.8125rem;
  color: var(--red);
  margin-top: 0.375rem;
  font-weight: 500;
}
.form-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.75rem 0;
  color: var(--text-3);
  font-size: 0.8125rem;
}
.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- Alerts ---------- */
.alert {
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-weight: 500;
  font-size: 0.9375rem;
  border: 1px solid;
}
.alert-error {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red-border);
}
.alert-success {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}
.alert-warning {
  background: var(--amber-bg);
  color: var(--amber);
  border-color: var(--amber-border);
}
.alert-info {
  background: rgba(34, 211, 238, 0.07);
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.2);
}

/* ==========================================================================
   HERO — Landing page
   ========================================================================== */
.hero {
  text-align: center;
  padding: 5rem 0 3.5rem;
  position: relative;
  isolation: isolate;
}
/* Dot grid — precision data aesthetic */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3125rem 0.875rem;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--cyan);
  margin-bottom: 1.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  position: relative;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.03em;
  line-height: 1.1;
  position: relative;
}
.hero h1 .accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.0625rem;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
  position: relative;
}
.hero-actions {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* Trust indicators */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  position: relative;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-3);
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.trust-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

/* ---------- How It Works ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}
.section-label::before {
  content: '';
  width: 18px;
  height: 1.5px;
  background: var(--cyan);
  border-radius: 1px;
  opacity: 0.55;
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 2rem 0;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.features .card + .card { margin-top: 0; }
.feature-card {
  position: relative;
  padding: 2rem 1.5rem;
  background: var(--surface-2);
  border: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
}
.feature-card:hover { background: var(--surface-3); }
.feature-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.08);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(34, 211, 238, 0.2);
  flex-shrink: 0;
}
.feature-card h3 {
  margin-bottom: 0.625rem;
  font-size: 1.0625rem;
  color: var(--text);
}
.feature-card p {
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* Privacy banner */
.privacy-banner {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 2rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  margin-top: 3rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}
.privacy-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--gradient-accent);
}
.privacy-banner h2 {
  color: var(--text);
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
.privacy-banner p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-2);
}
.privacy-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

/* ==========================================================================
   AUTH — Register / Login
   ========================================================================== */
.auth-page {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
}
.auth-card {
  width: 100%;
  max-width: 440px;
}
.auth-card h1 {
  font-size: 1.875rem;
  margin-bottom: 0.375rem;
}
.auth-card .subtitle {
  color: var(--text-2);
  margin-bottom: 2rem;
  font-size: 0.9375rem;
}
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-2);
}
.auth-footer a { font-weight: 600; color: var(--cyan); }
.auth-footer a:hover { color: #38e4f8; }

/* ==========================================================================
   BADGE DISPLAY — Credential visuals
   ========================================================================== */
.credential-card {
  text-align: center;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(34, 211, 238, 0.18);
  background: linear-gradient(145deg, #111118 0%, #0c0c13 100%);
  box-shadow: var(--shadow-badge);
  position: relative;
  overflow: hidden;
  animation: credentialGlow 4s ease-in-out infinite;
}
/* Gradient top-edge line */
.credential-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent 0%, #22d3ee 30%, #10b981 70%, transparent 100%);
}
/* Inner ambient glow */
.credential-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 45% at 50% -5%, rgba(34, 211, 238, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 50% 110%, rgba(16, 185, 129, 0.05) 0%, transparent 60%);
  pointer-events: none;
}
.credential-card > * { position: relative; z-index: 1; }

@keyframes credentialGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(34, 211, 238, 0.12),
      0 8px 32px rgba(34, 211, 238, 0.08),
      0 24px 60px rgba(0, 0, 0, 0.55);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(34, 211, 238, 0.28),
      0 8px 40px rgba(34, 211, 238, 0.16),
      0 0 60px rgba(16, 185, 129, 0.07),
      0 24px 60px rgba(0, 0, 0, 0.55);
  }
}

.badge-hex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 1.5rem;
  position: relative;
}
.badge-hex svg {
  filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.3)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.badge-score {
  font-family: var(--font-display);
  font-size: 3.75rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -0.03em;
}
.badge-score-suffix {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-3);
  -webkit-text-fill-color: var(--text-3);
  margin-left: 0.15em;
}
.badge-label {
  font-size: 0.6875rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-top: 0.375rem;
  font-family: var(--font-mono);
}

/* Status pills */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.badge-status-valid {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}
.badge-status-valid::before {
  background: var(--green);
  box-shadow: 0 0 5px var(--green);
}
.badge-status-expired {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-3);
  border: 1px solid var(--border);
}
.badge-status-expired::before { background: var(--text-3); }
.badge-status-revoked {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
}
.badge-status-revoked::before { background: var(--red); }
.badge-status-pending {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}
.badge-status-pending::before { background: var(--amber); }
.badge-status-founder {
  background: rgba(251,191,36,0.12);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.3);
}
.badge-status-founder::before {
  background: #fbbf24;
  box-shadow: 0 0 5px #fbbf24;
}
.badge-status-manually-verified {
  background: rgba(139,92,246,0.12);
  color: #a78bfa;
  border: 1px solid rgba(139,92,246,0.3);
}
.badge-status-manually-verified::before {
  background: #a78bfa;
  box-shadow: 0 0 5px #a78bfa;
}

/* ==========================================================================
   VERIFICATION — Steps / progress
   ========================================================================== */
.verify-progress {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.verify-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-3);
  transition: all 0.25s ease;
}
.verify-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-3);
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.verify-step.active {
  background: rgba(34, 211, 238, 0.06);
  border-color: rgba(34, 211, 238, 0.25);
  color: var(--cyan);
}
.verify-step.active .verify-step-num {
  background: var(--gradient-accent);
  color: #09090b;
}
.verify-step.complete {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: var(--green);
}
.verify-step.complete .verify-step-num {
  background: var(--green);
  color: #09090b;
}

/* Timer */
.timer {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}
.timer.warning { color: var(--amber); }
.timer.danger { color: var(--red); }

/* Challenge areas */
.challenge-area {
  min-height: 280px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin: 1.25rem 0;
  background: var(--surface);
}

/* ---------- Score Meters ---------- */
.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.score-row-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: var(--font-mono);
}
.score-row-value {
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-family: var(--font-mono);
}
.score-meter {
  height: 4px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.score-meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.score-meter-fill.high {
  background: var(--gradient-accent);
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.4);
}
.score-meter-fill.medium { background: var(--amber); }
.score-meter-fill.low { background: var(--red); }

/* ==========================================================================
   DASHBOARD
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.dashboard-grid .card-full { grid-column: 1 / -1; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.stat-card {
  padding: 1.25rem;
  background: var(--surface);
  border-radius: 0;
  text-align: center;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.025em;
}
.stat-label {
  font-size: 0.6875rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-top: 0.375rem;
  font-family: var(--font-mono);
}

/* Vouch list */
.vouch-list { list-style: none; }
.vouch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-2);
}
.vouch-item:last-child { border-bottom: none; }

/* Vouch quota indicator */
.vouch-quota {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-2);
}
.quota-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cyan);
}
.quota-max {
  font-family: var(--font-mono);
  color: var(--text-3);
}

/* Vouch hero card */
.vouch-hero {
  border-color: rgba(34, 211, 238, 0.15);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.08), var(--shadow-md);
}

/* Responsive vouch grid */
@media (max-width: 640px) {
  .vouch-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   SHAPES / CAPTCHA
   ========================================================================== */
.shapes-area {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 350px;
  margin: 1rem auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.shape-btn {
  position: absolute;
  background: none;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  min-width: 44px;
  min-height: 44px;
  transition: border-color 0.15s;
}
.shape-btn:hover { border-color: var(--border-strong); }
.shape-btn.selected {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.06);
}

.semantic-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.625rem;
  margin-top: 1rem;
}
.semantic-option {
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 0.9375rem;
  font-family: var(--font-body);
  cursor: pointer;
  text-align: center;
  font-weight: 500;
  min-height: 44px;
  color: var(--text-2);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.semantic-option:hover {
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.04);
  color: var(--text);
}
.semantic-option.selected {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
}

/* ==========================================================================
   BADGE VERIFY — Public verification page
   ========================================================================== */
.verify-result-page {
  max-width: 520px;
  margin: 0 auto;
}
.verify-checks {
  display: grid;
  gap: 0.625rem;
  margin-top: 1.5rem;
}
.verify-check-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-2);
}
.verify-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
}
.verify-check-icon.pass {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}
.verify-check-icon.fail {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
}

/* ==========================================================================
   EMBED / WIDGET
   ========================================================================== */
.embed-code {
  background: var(--surface);
  color: var(--cyan);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
  border: 1px solid var(--border-strong);
}

.humancred-widget {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  background: var(--surface-2);
  text-decoration: none;
  color: var(--text-2);
}
.humancred-widget.valid {
  border-color: var(--green-border);
  background: var(--green-bg);
  color: var(--green);
}
.humancred-widget.invalid {
  border-color: var(--red-border);
  background: var(--red-bg);
  color: var(--red);
}

/* ==========================================================================
   PROFILE
   ========================================================================== */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #09090b;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
}
.profile-meta h1 { margin-bottom: 0.25rem; }
.profile-meta p { color: var(--text-2); margin-bottom: 0; }

.dl-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
}
.dl-grid dt {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}
.dl-grid dd {
  font-size: 0.9375rem;
  color: var(--text);
}

/* ==========================================================================
   Loading overlay
   ========================================================================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.82);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-2);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
}
.loading-spinner::before {
  content: '';
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Modal backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.72);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}
.modal-backdrop[hidden],
.loading-overlay[hidden] {
  display: none !important;
}
[hidden] {
  display: none !important;
}
.modal-card {
  max-width: 500px;
  width: 90%;
  animation: modalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.text-muted { color: var(--text-2); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-row { display: flex; flex-direction: column; gap: 0.75rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.875rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .verify-progress { flex-direction: column; }
  .site-header .container { gap: 0.5rem; }
  nav ul { gap: 0.125rem; }
  nav a { padding: 0.5rem 0.5rem; font-size: 0.8125rem; }
  .profile-header { flex-direction: column; text-align: center; }
  .dl-grid { grid-template-columns: 1fr; gap: 0.25rem 0; }
  .dl-grid dt { margin-top: 0.75rem; }
  .trust-bar { gap: 1rem; }
  .privacy-banner { flex-direction: column; text-align: center; align-items: center; }
}
@media (max-width: 800px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .features { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .credential-card { animation: none; }
}

/* High contrast */
@media (forced-colors: active) {
  .btn { border: 2px solid ButtonText; }
  .form-input { border: 2px solid ButtonText; }
  .badge-status { border: 1px solid; }
  .credential-card { border: 2px solid Highlight; animation: none; }
  .credential-card::before { background: Highlight; }
  .badge-score { -webkit-text-fill-color: ButtonText; color: ButtonText; }
  .hero h1 .accent { -webkit-text-fill-color: Highlight; }
  .logo-mark { background: Highlight; }
}

/* ==========================================================================
   CAPTCHA CHALLENGES
   ========================================================================== */
.captcha-semantic {
  border: none;
  padding: 0;
  margin: 0;
}

.captcha-prompt {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  padding: 0;
}

.captcha-semantic-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.captcha-option-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.captcha-option-btn:hover {
  border-color: var(--cyan);
  background: var(--surface-3);
}

.captcha-option-btn:focus {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.captcha-option-selected {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
}

.captcha-instruction {
  margin-bottom: 1.5rem;
}

.captcha-instruction-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.captcha-selection-status {
  font-size: 0.875rem;
  color: var(--text-2);
  margin: 0.75rem 0;
}

.captcha-shape-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.captcha-shape-group {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.captcha-shape-group:hover {
  opacity: 0.8;
}

.captcha-shape-group:focus {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

.captcha-shape-selected {
  opacity: 0.6;
}

.captcha-reset-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.captcha-reset-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.captcha-reset-btn:focus {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.captcha-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
