@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg: #09090b;
  --bg-2: #0f0f12;
  --surface: #18181b;
  --surface-2: #222228;
  --surface-3: #2a2a32;
  
  --border: rgba(255,255,255,0.06);
  --border-2: rgba(255,255,255,0.10);
  --border-3: rgba(255,255,255,0.15);
  
  --text: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --text-muted: #52525b;
  
  --gold: #d4af37;
  --gold-light: #f5d062;
  --gold-dark: #b8942e;
  --gold-glow: rgba(212,175,55,0.25);
  --gold-dim: rgba(212,175,55,0.08);
  
  --success: #22c55e;
  --success-soft: rgba(34,197,94,0.12);
  --danger: #ef4444;
  --danger-soft: rgba(239,68,68,0.12);
  --warning: #f59e0b;
  
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-full: 9999px;
  
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 64px rgba(0,0,0,0.6);
  --shadow-xl: 0 24px 96px rgba(0,0,0,0.7);
  --shadow-gold: 0 8px 40px rgba(212,175,55,0.2);
  
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--gold-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text); }
img, svg { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; }

/* ═══════════════════════════════════════
   FLOATING NAVBAR - Icon Based
═══════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem;
}

.nav-float {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  background: rgba(15,15,18,0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.04);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  text-decoration: none;
}

.nav-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 900;
  font-size: 1rem;
  box-shadow: var(--shadow-gold);
}

.nav-brand span {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.nav-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
  position: relative;
}

.nav-btn:hover {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.nav-btn.active {
  background: var(--surface);
  border-color: var(--border-2);
  color: var(--gold-light);
}

.nav-btn .icon {
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
}

.nav-btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #000;
  font-weight: 700;
  font-size: 0.8rem;
  width: auto;
  padding: 0 1.25rem;
  gap: 0.5rem;
  box-shadow: var(--shadow-gold);
}

.nav-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 48px rgba(212,175,55,0.3);
  color: #000;
}

.nav-btn-primary .icon { width: 16px; height: 16px; }

/* Popup Menu */
.nav-popup {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: rgba(15,15,18,0.98);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 0.75rem;
  min-width: 220px;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: all 0.25s var(--ease);
  z-index: 200;
}

.nav-popup.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.nav-popup-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.nav-popup-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.nav-popup-email {
  font-size: 0.8rem;
  color: var(--text-3);
}

.nav-popup-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.nav-popup-item:hover {
  background: var(--surface);
  color: var(--text);
}

.nav-popup-item .icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.75;
  color: var(--text-3);
}

.nav-popup-item:hover .icon { color: var(--gold-light); }

.nav-popup-item.danger { color: var(--danger); }
.nav-popup-item.danger:hover { background: var(--danger-soft); }
.nav-popup-item.danger .icon { color: var(--danger); }

.nav-popup-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

/* ═══════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse 800px 600px at 50% 30%, rgba(212,175,55,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  animation: fadeInUp 0.8s var(--ease) both;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--surface);
  border: 1px solid var(--border-2);
  padding: 0.5rem 1rem;
  border-radius: var(--r-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 1.5rem;
}

.hero-eyebrow-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Certificate Mockup */
.hero-visual {
  position: relative;
  animation: fadeInUp 0.8s var(--ease) 0.2s both;
}

.cert-mockup {
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: var(--r-2xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-xl), 0 0 80px rgba(212,175,55,0.1);
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: transform 0.5s var(--ease);
}

.cert-mockup:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.cert-mockup-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.cert-mockup-brand {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.cert-mockup-brand span {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cert-mockup-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid rgba(34,197,94,0.2);
  padding: 0.375rem 0.875rem;
  border-radius: var(--r-full);
}

.cert-mockup-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.cert-mockup-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.cert-mockup-level {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cert-mockup-level-badge {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cert-mockup-level-desc {
  font-size: 0.9rem;
  color: var(--text-3);
}

.cert-mockup-name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.cert-mockup-title {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 2rem;
}

.cert-mockup-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.cert-mockup-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cert-mockup-row-key {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cert-mockup-row-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-2);
}

.cert-mockup-row-val.mono {
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold-light);
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════
   TRUST BAR
═══════════════════════════════════════ */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  padding: 2rem;
}

.trust-bar-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-2);
  font-weight: 500;
}

.trust-item .icon {
  width: 20px;
  height: 20px;
  color: var(--gold);
  stroke-width: 2;
}

.trust-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

/* ═══════════════════════════════════════
   SECTIONS
═══════════════════════════════════════ */
.section {
  padding: 7rem 2rem;
}

.section-center {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-label::before,
.section-label::after {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* ═══════════════════════════════════════
   FEATURES GRID
═══════════════════════════════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.feat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.feat-card:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feat-card:hover::before { opacity: 1; }

.feat-card-wide {
  grid-column: span 2;
}

.feat-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(212,175,55,0.15) 0%, rgba(212,175,55,0.05) 100%);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feat-icon .icon {
  width: 24px;
  height: 24px;
  color: var(--gold);
  stroke-width: 1.75;
}

.feat-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.feat-card p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* ═══════════════════════════════════════
   STEPS SECTION
═══════════════════════════════════════ */
.steps-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  opacity: 0.3;
}

.step-item {
  text-align: center;
  position: relative;
}

.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-3);
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 1;
  transition: all 0.3s var(--ease);
}

.step-num.done {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-color: var(--gold);
  color: #000;
  box-shadow: 0 0 30px rgba(212,175,55,0.3);
}

.step-item:hover .step-num {
  transform: scale(1.1);
}

.step-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.step-item p {
  font-size: 0.82rem;
  color: var(--text-3);
  line-height: 1.6;
}

/* ═══════════════════════════════════════
   CTA SECTION
═══════════════════════════════════════ */
.cta-section {
  padding: 8rem 2rem;
  text-align: center;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(212,175,55,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--text-2);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 900;
  font-size: 0.85rem;
}

.footer-brand span {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-3);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #000;
  box-shadow: 0 2px 12px rgba(212,175,55,0.25);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(212,175,55,0.35);
  color: #000;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text-2);
}

.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(212,175,55,0.06);
  color: var(--gold-light);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--border-2);
  color: var(--text);
}

.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-pill { border-radius: var(--r-full); }
.btn-full { width: 100%; }

/* ═══════════════════════════════════════
   MODAL
═══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  visibility: hidden;
  pointer-events: none;
}

.modal-overlay.open {
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  transform: translateY(20px) scale(0.98);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-container {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl), 0 0 60px rgba(0,0,0,0.3);
}

.modal-top-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
}

.modal-content {
  padding: 1.75rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  z-index: 1;
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-2);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.modal-subtitle {
  font-size: 0.875rem;
  color: var(--text-3);
  margin-bottom: 1.5rem;
}

.modal-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 4px;
  background: var(--bg-2);
  border-radius: var(--r);
}

.modal-tab {
  flex: 1;
  padding: 0.625rem 1rem;
  border-radius: var(--r-sm);
  background: transparent;
  border: none;
  color: var(--text-3);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-tab:hover { color: var(--text-2); }

.modal-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.modal-form {
  display: none;
}

.modal-form.active {
  display: block;
}

.modal-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-3);
}

.modal-footer a { 
  color: var(--gold-light);
  font-weight: 500;
}

.modal-footer a:hover {
  color: var(--gold);
}

/* ═══════════════════════════════════════
   FORMS
═══════════════════════════════════════ */
.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-2);
  letter-spacing: -0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  color: var(--text);
  transition: all 0.2s ease;
  outline: none;
  -webkit-appearance: none;
}

.form-group input::placeholder { color: var(--text-muted); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12), 0 2px 8px rgba(0,0,0,0.1);
}

/* ═══════════════════════════════════════
   ALERTS
═══════════════════════════════════════ */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--r);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  display: none;
  animation: shake 0.4s var(--ease);
}

.alert.show { display: block; }

.alert-error {
  background: var(--danger-soft);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.2);
}

.alert-success {
  background: var(--success-soft);
  color: #86efac;
  border: 1px solid rgba(34,197,94,0.2);
}

/* ═══════════════════════════════════════
   VERIFY RESULT
═══════════════════════════════════════ */
.verify-result {
  border-radius: var(--r-lg);
  padding: 2.5rem 2rem;
  text-align: center;
}

.verify-valid {
  background: linear-gradient(180deg, rgba(34,197,94,0.08) 0%, transparent 100%);
  border: 1px solid rgba(34,197,94,0.2);
}

.verify-revoked {
  background: linear-gradient(180deg, rgba(239,68,68,0.08) 0%, transparent 100%);
  border: 1px solid rgba(239,68,68,0.2);
}

.verify-invalid {
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.verify-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
}

.verify-icon-ok {
  background: rgba(34,197,94,0.15);
  border: 2px solid rgba(34,197,94,0.3);
  color: var(--success);
  box-shadow: 0 0 40px rgba(34,197,94,0.2);
}

.verify-icon-bad {
  background: rgba(239,68,68,0.12);
  border: 2px solid rgba(239,68,68,0.25);
  color: var(--danger);
}

.verify-label {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.cert-detail-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.625rem 1.5rem;
  text-align: left;
  max-width: 320px;
  margin: 0 auto;
}

.cert-detail-key {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
}

.cert-detail-val { color: var(--text); font-size: 0.9rem; font-weight: 600; }

.cert-ref {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  color: var(--gold-light) !important;
}

/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-in { animation: fadeInUp 0.5s var(--ease) both; }

/* ═══════════════════════════════════════
   PAGE CONTAINER
══════════════════════════════════════ */
.page-container {
  max-width: 520px;
  margin: 0 auto;
  padding: 7.5rem 1.5rem 3rem;
}

.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-2);
  font-size: 1rem;
}

/* ═══════════════════════════════════════
   CARD
══════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  text-align: center;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

/* ═══════════════════════════════════════
   STEP PROGRESS
══════════════════════════════════════ */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
}

.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.3s;
}

.step-dot.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold-light);
}

.step-dot.done {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}

.step-dot.done svg { width: 16px; height: 16px; }

.step-line {
  width: 32px;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   CHECKLIST
══════════════════════════════════════ */
.checklist {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem;
  margin: 1.5rem 0;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0;
  font-size: 0.9rem;
  color: var(--text-2);
}

.checklist-item svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; }
.checklist-item.warning svg { color: var(--warning); }
.checklist-item + .checklist-item { border-top: 1px solid var(--border); }

/* ═══════════════════════════════════════
   UPLOAD AREA
══════════════════════════════════════ */
.upload-area {
  border: 2px dashed var(--border-2);
  border-radius: var(--r);
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-2);
}

.upload-area:hover, .upload-area.drag-over {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.upload-icon {
  width: 56px;
  height: 56px;
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.upload-icon svg { width: 24px; height: 24px; color: var(--gold); }

.upload-area p { color: var(--text-2); font-size: 0.9rem; margin-bottom: 0.25rem; }
.upload-area p strong { color: var(--gold-light); }

/* ═══════════════════════════════════════
   VIDEO PREVIEW
══════════════════════════════════════ */
.video-preview {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4/3;
  background: #000;
  border-radius: var(--r);
  margin: 1.5rem auto;
  display: block;
  object-fit: cover;
}

.recording-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--danger);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.recording-dot {
  width: 10px;
  height: 10px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse 1s infinite;
}

/* ═══════════════════════════════════════
   TEST CONTAINER
══════════════════════════════════════ */
.test-container {
  display: grid;
  grid-template-columns: 220px 680px;
  gap: 2rem;
  width: fit-content;
  margin: 0 auto;
  padding: 7.5rem 2rem 3rem;
  max-width: calc(100% - 4rem);
}

.test-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.test-timer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
}

.timer-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.timer-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold-light);
  letter-spacing: 0.05em;
}

.timer-value.warning { color: var(--danger); animation: pulse 1s infinite; }

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem;
  margin-bottom: 1rem;
}

.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.webcam-box {
  position: relative;
  aspect-ratio: 4/3;
  background: #000;
  border-radius: var(--r-sm);
  overflow: hidden;
}

.webcam-box video { width: 100%; height: 100%; object-fit: cover; }

.webcam-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  border-radius: var(--r-full);
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse 1s infinite;
}

/* ═══════════════════════════════════════
   QUESTION CARD
══════════════════════════════════════ */
.q-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  margin-bottom: 1rem;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.q-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.q-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}

.q-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  transition: width 0.4s ease;
}

.q-num { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; white-space: nowrap; }

.q-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  background: var(--gold-dim);
  border: 1px solid rgba(212,175,55,0.2);
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.q-text { font-size: 1rem; font-weight: 600; margin-bottom: 1.5rem; line-height: 1.7; }

.q-options { display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }

.q-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.2s ease;
}

.q-option:hover { border-color: var(--gold); background: var(--gold-dim); transform: translateX(4px); }
.q-option.selected { border-color: var(--gold); background: rgba(212,175,55,0.1); box-shadow: 0 0 0 3px rgba(212,175,55,0.1); }

.q-option-letter {
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
}

.q-option.selected .q-option-letter { background: var(--gold); border-color: var(--gold); color: #000; }
.q-option-text { font-size: 0.95rem; color: var(--text-2); }

.q-nav { display: flex; justify-content: space-between; margin-top: 1.5rem; }

.flag-banner {
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--r);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--warning);
  margin-bottom: 1rem;
}

.flag-banner.show { display: flex; }
.flag-banner svg { width: 20px; height: 20px; flex-shrink: 0; }

.submit-area { display: none; margin-top: 1rem; }

.submit-warning {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--r);
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--warning);
  margin-bottom: 1rem;
}

/* ═══════════════════════════════════════
   RESULT
══════════════════════════════════════ */
.result-icon {
  width: 80px;
  height: 80px;
  background: var(--success-soft);
  border: 2px solid rgba(34,197,94,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.result-icon svg { width: 40px; height: 40px; color: var(--success); }

.result-score {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2rem;
  margin: 1.5rem 0;
}

.result-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.result-value {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.result-sub { font-size: 0.95rem; color: var(--text-3); margin-top: 0.5rem; }

/* ═══════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.empty-state-icon svg { width: 32px; height: 32px; color: var(--gold); }
.empty-state h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-2); margin-bottom: 1.5rem; }

/* ═══════════════════════════════════════
   LOADING STATE
══════════════════════════════════════ */
.loading-state {
  text-align: center;
  padding: 5rem 2rem;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 1s linear infinite;
}

.loading-state p { color: var(--text-3); font-size: 0.9rem; }

/* ═══════════════════════════════════════
   INFO BOX
══════════════════════════════════════ */
.info-box {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-top: 2rem;
}

.info-box-icon {
  width: 44px;
  height: 44px;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-box-icon svg { width: 22px; height: 22px; color: var(--gold); }
.info-box strong { display: block; margin-bottom: 0.25rem; color: var(--text); }
.info-box p { color: var(--text-2); font-size: 0.875rem; margin: 0; }

/* ═══════════════════════════════════════
   CERTIFICATE CARDS
══════════════════════════════════════ */
.cert-card-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.cert-card-item:hover { border-color: var(--border-2); }
.cert-card-item.revoked { opacity: 0.6; border-style: dashed; }

.cert-card-header { margin-bottom: 1rem; }

.cert-card-level {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.level-badge {
  display: inline-flex;
  padding: 0.3rem 0.875rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid;
}

.status-badge {
  display: inline-flex;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
}

.status-valid { background: var(--success-soft); color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.status-revoked { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }

.cert-card-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem; }
.cert-card-body > p { color: var(--text-3); font-size: 0.875rem; margin-bottom: 1rem; }

.cert-card-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-2);
}

.meta-label { color: var(--text-3); margin-right: 0.25rem; }

.cert-card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.cert-card-actions .btn { flex: 1; justify-content: center; }

.cert-card-revoked {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--danger-soft);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  color: #fca5a5;
}

.cert-card-revoked svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--danger); }

/* ═══════════════════════════════════════
   UTILITIES
══════════════════════════════════════ */
.text-center { text-align: center; }
.text-muted { color: var(--text-3); }
.text-small { font-size: 0.8rem; }
.text-center { text-align: center; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════
   STAGE VISIBILITY
═══════════════════════════════════════ */
.stage { 
  display: none; 
}

.stage.active { 
  display: block; 
}

.stage.test-container.active {
  display: grid;
}

.test-main {
  min-width: 0;
}

/* ═══════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-2); }

/* ═══════════════════════════════════════
   PROGRESS DOTS
═══════════════════════════════════════ */
.q-dots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.q-dot {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.q-dot.answered {
  background: rgba(212,175,55,0.2);
  border-color: rgba(212,175,55,0.4);
}

.q-dot.current {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(212,175,55,0.4);
}

/* ═══════════════════════════════════════
   PAYMENT BOX
═══════════════════════════════════════ */
.payment-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.payment-price {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.payment-box p { color: var(--text-2); font-size: 0.9rem; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { display: none; }
  .hero-sub { margin: 0 auto 2rem; }
  .hero-actions { justify-content: center; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feat-card-wide { grid-column: span 2; }
  .steps-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .steps-grid::before { display: none; }
}

@media (max-width: 768px) {
  .nav-float { border-radius: var(--r-lg); }
  .nav-btn-label { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .feat-card-wide { grid-column: span 1; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .trust-divider { display: none; }
  .trust-bar-inner { gap: 1.5rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .hero { padding: 7rem 1.5rem 3rem; }
  .section { padding: 5rem 1.5rem; }
  .steps-grid { grid-template-columns: 1fr; }
  .modal-box { border-radius: var(--r-xl); }
  .modal-content { padding: 1.25rem; }
  .page-container { padding-top: 5.5rem; }
}

/* ═══════════════════════════════════════
   TEST CONTAINER RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 960px) {
  .test-container {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 740px;
    padding: 5.5rem 1.5rem 2rem;
  }
  .test-sidebar {
    position: static;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
  }
  .test-timer { margin-bottom: 0; flex: 0 0 auto; min-width: 120px; }
  .sidebar-card { margin-bottom: 0; flex: 1; min-width: 140px; }
}

@media (max-width: 540px) {
  .test-container { padding: 5rem 1rem 2rem; }
  .webcam-card { display: none; }
  .test-sidebar { flex-wrap: nowrap; gap: 0.75rem; }
  .test-timer { min-width: 90px; }
  .sidebar-card { min-width: 0; }
}

/* ═══════════════════════════════════════
   ENGLISURE ADDITIONS
═══════════════════════════════════════ */
.nav-brand span b { color: var(--gold); font-weight: inherit; }
.q-dot { cursor: pointer; }
.q-dot:hover { border-color: var(--gold); }
.q-option.correct { border-color: var(--success); background: var(--success-soft); }
.q-option.correct .q-option-letter { background: var(--success); border-color: var(--success); color: #000; }
.q-option.wrong { border-color: var(--danger); background: var(--danger-soft); }
.q-option.wrong .q-option-letter { background: var(--danger); border-color: var(--danger); color: #fff; }
.q-option.locked { cursor: default; }
.q-option.locked:hover { transform: none; }

.deadline-banner {
  display: flex; align-items: center; gap: .75rem;
  background: var(--gold-dim); border: 1px solid rgba(212,175,55,.25);
  border-radius: var(--r); padding: .85rem 1rem; margin-bottom: 1.25rem;
  font-size: .88rem; color: var(--gold-light);
}
.deadline-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.deadline-banner strong { color: var(--text); font-variant-numeric: tabular-nums; }

.save-state { font-size: .75rem; color: var(--text-muted); display: flex; align-items: center; gap: .35rem; min-height: 1.2em; }
.save-state.saving { color: var(--gold-light); }
.save-state.saved { color: var(--success); }
.save-state.error { color: var(--danger); }

/* Webcam: snapshot flash + counters */
.webcam-box { isolation: isolate; }
.webcam-box video { transform: scaleX(-1); }
.webcam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 2; }
.webcam-flash.go { animation: snapflash .45s ease-out; }
@keyframes snapflash { 0% { opacity: .85; } 100% { opacity: 0; } }
.webcam-shot {
  position: absolute; left: 8px; bottom: 8px; z-index: 3;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px); border-radius: var(--r-full);
  padding: 3px 9px; font-size: .68rem; font-weight: 700; color: #fff; opacity: 0; transition: opacity .3s;
}
.webcam-shot.show { opacity: 1; }
.webcam-meta { display: flex; justify-content: space-between; font-size: .72rem; color: var(--text-3); margin-top: .6rem; }
.webcam-meta strong { color: var(--text); font-variant-numeric: tabular-nums; }
.cam-status { display: flex; align-items: center; gap: .4rem; font-size: .72rem; margin-top: .45rem; color: var(--success); }
.cam-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cam-status.bad { color: var(--danger); }

/* Camera blocked overlay (covers the question area) */
.cam-blocked {
  position: fixed; inset: 0; z-index: 900; display: none;
  align-items: center; justify-content: center; padding: 1.5rem;
  background: rgba(9,9,11,.94); backdrop-filter: blur(6px);
}
.cam-blocked.show { display: flex; }
.cam-blocked-card {
  max-width: 440px; text-align: center; background: var(--surface);
  border: 1px solid rgba(239,68,68,.35); border-radius: var(--r-lg); padding: 2rem;
  box-shadow: 0 0 60px rgba(239,68,68,.12);
}
.cam-blocked-card .result-icon { background: var(--danger-soft); border-color: rgba(239,68,68,.3); }
.cam-blocked-card .result-icon svg { color: var(--danger); }
.cam-blocked-card h2 { font-size: 1.3rem; margin-bottom: .5rem; }
.cam-blocked-card p { color: var(--text-2); font-size: .92rem; margin-bottom: 1rem; }
.cam-blocked-card video { width: 100%; max-width: 260px; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r-sm); background: #000; margin: 0 auto 1rem; transform: scaleX(-1); }

/* Camera check stage */
.camcheck-video { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r); background: #000; border: 1px solid var(--border); transform: scaleX(-1); }
.camcheck-meter { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: .9rem 0 .4rem; }
.camcheck-meter > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--danger), var(--warning), var(--success)); transition: width .3s; }
.rules { display: grid; gap: .6rem; margin: 1.25rem 0 1.5rem; }
.rules div { display: flex; gap: .65rem; font-size: .88rem; color: var(--text-2); }
.rules svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; margin-top: 2px; }

/* Demo */
.demo-badge {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .7rem; font-weight: 800; letter-spacing: .08em;
  color: var(--gold-light); background: var(--gold-dim); border: 1px solid rgba(212,175,55,.25);
  border-radius: var(--r-full); padding: .3rem .75rem;
}
.demo-cam { aspect-ratio: 4/3; border-radius: var(--r-sm); background: var(--bg-2); border: 1px dashed var(--border-2); display: flex; align-items: center; justify-content: center; text-align: center; padding: .75rem; font-size: .75rem; color: var(--text-muted); }
.review-list { display: grid; gap: .75rem; margin: 1.5rem 0; text-align: left; }
.review-item { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r); padding: 1rem 1.1rem; }
.review-item.ok { border-color: rgba(34,197,94,.3); }
.review-item.bad { border-color: rgba(239,68,68,.3); }
.review-q { font-weight: 600; font-size: .92rem; margin-bottom: .4rem; }
.review-a { font-size: .85rem; color: var(--text-2); }
.review-a .ok { color: var(--success); font-weight: 600; }
.review-a .bad { color: var(--danger); font-weight: 600; text-decoration: line-through; }

/* Status pills used on My Tests */
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: var(--r-full); font-size: .7rem; font-weight: 800; letter-spacing: .05em; border: 1px solid; }
.pill-gold { color: var(--gold-light); background: var(--gold-dim); border-color: rgba(212,175,55,.3); }
.pill-green { color: #4ade80; background: var(--success-soft); border-color: rgba(34,197,94,.3); }
.pill-red { color: #f87171; background: var(--danger-soft); border-color: rgba(239,68,68,.3); }
.pill-grey { color: var(--text-3); background: var(--surface-2); border-color: var(--border-2); }
.note { border-radius: var(--r-sm); padding: .8rem 1rem; font-size: .87rem; margin: .75rem 0; line-height: 1.55; }
.note-gold { background: rgba(212,175,55,.07); border: 1px solid rgba(212,175,55,.2); color: var(--gold-light); }
.note-red { background: rgba(239,68,68,.07); border: 1px solid rgba(239,68,68,.25); color: #fca5a5; }
.note-grey { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2); }

.level-table { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; max-width: 1100px; margin: 0 auto; }
.level-cell { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.5rem; }
.level-cell .lv { font-size: 2rem; font-weight: 900; color: var(--gold); letter-spacing: -.02em; }
.level-cell .ln { font-weight: 700; margin-bottom: .35rem; }
.level-cell p { font-size: .85rem; color: var(--text-3); }
@media (max-width: 900px) { .level-table { grid-template-columns: 1fr 1fr; } }

.hero-price { margin-top: 1rem; font-size: .88rem; color: var(--text-3); }
.hero-price strong { color: var(--gold-light); }

/* Keep the camera visible on phones during the real test */
@media (max-width: 540px) {
  .webcam-card { display: block; flex: 0 0 110px; }
  .webcam-card .sidebar-label, .webcam-card .webcam-meta { display: none; }
  .progress-card { display: none; }
}
@media (max-width: 480px) {
  .q-card { padding: 1.25rem; min-height: 0; }
}

/* Homepage announcement strip (sits under the floating nav) */
.news-strip {
  display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; text-align: center;
  margin: 6.2rem auto -4.5rem; max-width: 1100px; width: calc(100% - 2rem);
  padding: .7rem 1rem; border-radius: var(--r-full);
  background: var(--gold-dim); border: 1px solid rgba(212,175,55,.28);
  color: var(--text-2); font-size: .85rem; position: relative; z-index: 2;
}
.news-strip:hover { color: var(--text); border-color: rgba(212,175,55,.5); }
.news-strip strong { color: var(--gold-light); }
.news-strip-tag { background: var(--gold); color: #000; font-weight: 800; font-size: .66rem; letter-spacing: .08em; padding: .15rem .5rem; border-radius: var(--r-full); }
@media (max-width: 600px) { .news-strip { border-radius: var(--r); margin-top: 6.25rem; font-size: .8rem; } }

/* Checkout consent boxes */
.consent { display: grid; gap: .75rem; margin: 1.25rem 0 1rem; }
.consent-row { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--r); cursor: pointer; font-size: .85rem; line-height: 1.55; color: var(--text-2); }
.consent-row:has(input:checked) { border-color: rgba(212,175,55,.45); background: var(--gold-dim); }
.consent-row input { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--gold); cursor: pointer; }
.consent-row strong { color: var(--text); }

/* Custom dialogs (replace browser alert/confirm) */
.ui-dialog-overlay { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(0,0,0,.7); backdrop-filter: blur(6px); opacity: 0; transition: opacity .18s; }
.ui-dialog-overlay.open { opacity: 1; }
.ui-dialog { position: relative; width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-lg);
  padding: 1.75rem 1.5rem 1.25rem; box-shadow: var(--shadow-xl); transform: translateY(8px) scale(.98); transition: transform .18s; overflow: hidden; }
.ui-dialog-overlay.open .ui-dialog { transform: none; }
.ui-dialog-bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark)); }
.ui-dialog-bar.danger { background: var(--danger); }
.ui-dialog h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.ui-dialog p { color: var(--text-2); font-size: .92rem; line-height: 1.6; }
.ui-dialog-input { width: 100%; margin-top: 1rem; }
.ui-dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.4rem; }
.btn-danger { background: var(--danger); color: #fff; border: none; }
.btn-danger:hover { filter: brightness(1.1); }

/* Homepage: preview of the real Englisure certificate template */
.cert-preview {
  position: relative; aspect-ratio: 1.414; width: 100%; max-width: 620px; margin-left: auto;
  background: #1b2232; border-radius: 6px; container-type: inline-size;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 90px rgba(59,130,246,.12);
  transform: perspective(1200px) rotateY(-6deg) rotateX(4deg); transition: transform .5s var(--ease);
}
.cert-preview:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
.cert-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.cp-content { position: absolute; inset: 0; color: #fff; }
.cp-t { position: absolute; left: 50%; transform: translate(-50%, -50%); white-space: nowrap; text-align: center; }
.cp-title { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 800; font-size: 8.4cqw; line-height: 1; }
.cp-sub { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 2cqw; letter-spacing: 1.05em; padding-left: 1.05em; }
.cp-label { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 1.2cqw; letter-spacing: .12em; }
.cp-name, .cp-level { font-family: Arial, Helvetica, sans-serif; font-size: 3.1cqw; }
.cp-foot-h { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 2cqw; letter-spacing: .08em; }
.cp-foot-s { font-family: Arial, sans-serif; font-size: 1.05cqw; letter-spacing: .14em; color: #d1d5db; }
.cp-foot-v { font-family: Arial, sans-serif; font-size: 1.55cqw; }
.cp-date { font-family: Arial, sans-serif; font-size: 1.5cqw; }
.cp-verified {
  position: absolute; right: -10px; bottom: -14px; background: var(--success); color: #04120a; font-weight: 800; font-size: .78rem;
  padding: .45rem .85rem; border-radius: var(--r-full); box-shadow: 0 8px 24px rgba(34,197,94,.35);
}
