/* styles/main.css — resets, typography, layout, components, utilities */

body.light-mode {
  --bg: #f4f6f9;
  --bg2: #ffffff;
  --bg3: #edf0f4;
  --surface: #ffffff;
  --surface2: #e8ecf2;
  --border: rgba(0,0,0,0.08);
  --border2: rgba(0,0,0,0.14);
  --accent: #00a87f;
  --accent2: #007f60;
  --accent-glow: rgba(0,168,127,0.15);
  --accent-glow2: rgba(0,168,127,0.08);
  --text: #0f1923;
  --text2: #4a5a6a;
  --text3: #8a9ab0;
}

body.light-mode .grid-bg {
  background-image:
    linear-gradient(rgba(0,168,127,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,168,127,0.04) 1px, transparent 1px);
}

body.light-mode .hero-glow {
  background: radial-gradient(circle, rgba(0,168,127,0.07) 0%, transparent 70%);
}

body.light-mode nav {
  background: linear-gradient(to bottom, rgba(244,246,249,0.97), transparent);
}

body.light-mode .logo-icon {
  box-shadow: 0 0 20px rgba(0,168,127,0.3);
}

body.light-mode .btn-primary {
  box-shadow: 0 0 30px rgba(0,168,127,0.2), 0 4px 20px rgba(0,0,0,0.1);
}

body.light-mode .form-input,
body.light-mode .form-select {
  background: #f4f6f9;
  color: #0f1923;
}

body.light-mode .paywall-panel,
body.light-mode .framework-panel {
  background: #ffffff;
}

body.light-mode .portal-cta-card h3,
body.light-mode .portal-fw-name,
body.light-mode .history-fw-name {
  color: #0f1923;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* NOISE TEXTURE OVERLAY */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}

/* GRID PATTERN */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,170,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,170,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* SCREENS */
.screen {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.screen.active { display: flex; flex-direction: column; }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(8,11,15,0.95), transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(0,212,170,0.4);
}

.logo-icon svg { width: 18px; height: 18px; color: #080b0f; }

.logo span { color: var(--accent); }

nav .nav-cta {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  background: none;
  border: 1px solid var(--border2);
  padding: 8px 18px;
  border-radius: 8px;
  transition: all 0.2s;
}
nav .nav-cta:hover { color: var(--text); border-color: var(--accent); }

/* ─── HERO ─── */
#screen-landing {
  position: relative;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0,212,170,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 100px;
  padding: 6px 14px 6px 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 32px;
  letter-spacing: 0.05em;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0,212,170,0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(0,212,170,0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 16px;
  max-width: 900px;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  display: inline-block;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-title em.fade-out {
  opacity: 0;
  transform: translateY(-8px);
}

.hero-title em.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 300;
  color: var(--text2);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #080b0f;
  background: var(--accent);
  border: none;
  padding: 16px 36px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 0 40px rgba(0,212,170,0.25), 0 4px 20px rgba(0,0,0,0.3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-primary:hover {
  background: #00efc0;
  box-shadow: 0 0 60px rgba(0,212,170,0.4), 0 4px 30px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  background: none;
  border: 1px solid var(--border);
  padding: 12px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s;
}
.btn-secondary:hover { color: var(--text); border-color: var(--border2); }

.hero-cta-note {
  font-size: 13px;
  color: var(--text3);
  font-family: var(--font-mono);
}

/* FRAMEWORK SELECTOR (slides up inside landing) */
.framework-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(8,11,15,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}
.framework-overlay.visible { display: flex; }

.framework-panel {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 90%;
  max-width: 760px;
  max-height: 85vh;
  overflow-y: auto;
  animation: scaleIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.framework-panel .section-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.framework-panel p {
  color: var(--text2);
  font-size: 15px;
  margin-bottom: 36px;
}

.framework-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.framework-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.framework-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s;
}

.framework-card:hover {
  border-color: var(--accent);
  background: var(--surface2);
  transform: translateY(-2px);
}
.framework-card:hover::before { transform: scaleX(1); }

.framework-card.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(0,212,170,0.1), rgba(0,212,170,0.03));
  box-shadow: 0 0 30px rgba(0,212,170,0.1);
}
.framework-card.selected::before { transform: scaleX(1); }

.framework-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.framework-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.framework-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
}

.framework-q-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  margin-top: 14px;
}

/* STATS BAR */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 32px;
  overflow: hidden;
}

.stat-item {
  background: var(--bg);
  padding: 18px 20px;
  text-align: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
  margin-bottom: 2px;
}

.stat-label {
  font-size: 13px;
  color: var(--text2);
}

/* ─── INTRO SCREEN ─── */
#screen-intro {
  align-items: center;
  justify-content: center;
  padding: 120px 24px;
  text-align: center;
}

.intro-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--surface2), var(--surface));
  border: 1px solid var(--border2);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 32px;
  box-shadow: 0 0 40px var(--accent-glow);
}

.intro-icon svg { width: 36px; height: 36px; color: var(--accent); }

.intro-framework-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-glow2);
  border: 1px solid rgba(0,212,170,0.2);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 20px;
  max-width: 700px;
}

.intro-body {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto 40px;
}

.intro-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto 48px;
  text-align: left;
}

.intro-check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text2);
}

.check-icon {
  width: 22px; height: 22px;
  background: var(--accent-glow);
  border: 1px solid rgba(0,212,170,0.3);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.check-icon svg { width: 12px; height: 12px; color: var(--accent); }

/* ─── ASSESSMENT ─── */
#screen-assessment {
  padding: 140px 24px 60px;
  align-items: center;
  justify-content: center;
}

.assessment-container {
  width: 100%;
  max-width: 740px;
  position: relative;
}

.assessment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}

.assessment-framework-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.back-btn {
  font-size: 13px;
  color: var(--text3);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
  font-family: var(--font-body);
}
.back-btn:hover { color: var(--text2); }
.back-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Question card */
.question-viewport {
  overflow: hidden;
  position: relative;
  min-height: 360px;
}

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.question-card.slide-out-left {
  animation: slideOutLeft 0.35s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
.question-card.slide-out-right {
  animation: slideOutRight 0.35s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
.question-card.slide-in-right {
  animation: slideInRight 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.question-card.slide-in-left {
  animation: slideInLeft 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slideOutLeft {
  to { transform: translateX(-60px); opacity: 0; }
}
@keyframes slideOutRight {
  to { transform: translateX(60px); opacity: 0; }
}
@keyframes slideInRight {
  from { transform: translateX(60px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideInLeft {
  from { transform: translateX(-60px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.question-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text3);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.question-text {
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 36px;
  letter-spacing: -0.3px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.option-btn:hover {
  border-color: var(--border2);
  background: var(--surface2);
}

.option-btn.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(0,212,170,0.08), rgba(0,212,170,0.02));
  box-shadow: 0 0 0 1px rgba(0,212,170,0.2);
}

.option-indicator {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}

.option-btn.selected .option-indicator {
  background: var(--accent);
  border-color: var(--accent);
}
.option-btn.selected .option-indicator::after {
  content: '';
  width: 6px; height: 6px;
  background: #080b0f;
  border-radius: 50%;
}

.option-label {
  font-size: 14px;
  color: var(--text2);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  width: 28px;
  flex-shrink: 0;
}

.option-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}

.option-btn.selected .option-text { color: var(--text); }

.submit-row {
  display: flex;
  justify-content: flex-end;
}

/* ─── PROGRESS BAR ─── */
.progress-bar-container {
  position: fixed;
  top: 72px; left: 0; right: 0;
  z-index: 50;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 10px 40px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.progress-info {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  letter-spacing: 0.06em;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 8px var(--accent-glow);
}

.progress-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
}

/* ─── RESULTS ─── */
#screen-results {
  padding: 100px 24px 60px;
  align-items: center;
}

.results-container {
  width: 100%;
  max-width: 860px;
}

.results-header {
  text-align: center;
  margin-bottom: 56px;
}

.results-header .section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.results-header p { color: var(--text2); font-size: 16px; }

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.result-card h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 20px;
}

/* Score circle */
.score-circle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}

.score-circle {
  position: relative;
  width: 140px; height: 140px;
}

.score-circle svg {
  position: absolute; inset: 0;
  transform: rotate(-90deg);
}

.score-circle-bg { fill: none; stroke: var(--surface2); stroke-width: 8; }
.score-circle-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 339;
  stroke-dashoffset: 339;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 6px rgba(0,212,170,0.5));
}

.score-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}

.score-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -2px;
  line-height: 1;
}

.score-denom {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
}

/* Maturity badge */
.maturity-display {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.maturity-levels {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.maturity-level {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  opacity: 0.35;
  transition: all 0.3s;
}

.maturity-level.active {
  opacity: 1;
  background: rgba(0,212,170,0.08);
  border-color: rgba(0,212,170,0.25);
}

.maturity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.maturity-level-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.maturity-level-desc {
  font-size: 11px;
  color: var(--text2);
  margin-top: 2px;
}

/* Radar chart */
.radar-card {
  grid-column: 1 / -1;
}

.radar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

/* Category breakdown */
.category-breakdown {
  grid-column: 1 / -1;
}

.category-list { display: flex; flex-direction: column; gap: 16px; }

.category-item {}

.category-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.category-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.category-score {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text2);
}

.category-track {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}

.category-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── ACCOUNT CREATION ─── */
#screen-account {
  align-items: center;
  justify-content: center;
  padding: 120px 24px;
}

.account-container {
  width: 100%;
  max-width: 480px;
}

.account-container .section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.account-container .sub {
  color: var(--text2);
  font-size: 15px;
  margin-bottom: 36px;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.form-label .req { color: var(--accent); }

.form-input, .form-select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow2);
}

.form-select option { background: var(--surface); color: var(--text); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-divider {
  text-align: center;
  font-size: 12px;
  color: var(--text3);
  margin: 8px 0 4px;
}

.password-note {
  font-size: 12px;
  color: var(--text3);
  margin-top: 6px;
}

/* ─── PORTAL ─── */
#screen-portal {
  padding: 100px 24px 60px;
  align-items: center;
}

.portal-container {
  width: 100%;
  max-width: 900px;
}

.portal-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.portal-header .section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.portal-header p { color: var(--text2); font-size: 14px; }

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.portal-fw-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.portal-fw-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
}

.portal-fw-card.completed::after { background: var(--accent); }
.portal-fw-card.not-started::after { background: var(--surface2); }

.portal-fw-card:hover { border-color: var(--border2); transform: translateY(-2px); }

.portal-fw-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.portal-fw-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.portal-fw-score {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
  margin-bottom: 2px;
}

.portal-fw-score-label {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.portal-fw-date {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
}

.portal-cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.portal-cta-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.portal-cta-card p {
  font-size: 14px;
  color: var(--text2);
  max-width: 500px;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 14px 24px;
  font-size: 14px;
  color: var(--text);
  opacity: 0;
  transition: all 0.3s;
  z-index: 200;
  white-space: nowrap;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* UTILITY */
.hidden { display: none !important; }
.text-accent { color: var(--accent); }

/* ─── HISTORY SECTION ─── */
.history-section {
  margin-bottom: 24px;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.history-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}

.history-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
}

.history-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.history-row {
  display: grid;
  grid-template-columns: 28px 1fr 120px 90px 110px 28px;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.history-row:last-child { border-bottom: none; }
.history-row:hover { background: var(--surface2); }

.history-row-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  text-align: center;
}

.history-fw-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.history-fw-icon svg { width: 16px; height: 16px; }

.history-fw-info { display: flex; align-items: center; gap: 12px; }

.history-fw-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}

.history-fw-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.history-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text3);
}

.history-score-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.history-score {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.history-score-bar {
  width: 60px;
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.history-score-fill {
  height: 100%;
  border-radius: 2px;
}

.history-maturity {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
  border: 1px solid transparent;
  display: inline-block;
}

.history-chevron {
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.history-row:hover .history-chevron { color: var(--text2); }

.history-empty {
  padding: 32px;
  text-align: center;
  font-size: 14px;
  color: var(--text3);
  font-family: var(--font-mono);
}

/* ─── PAYWALL / LOCKED CARD ─── */
.portal-fw-card.locked {
  cursor: default;
  opacity: 0.7;
}
.portal-fw-card.locked:hover { transform: none; border-color: var(--border); }

.lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,183,3,0.1);
  border: 1px solid rgba(255,183,3,0.25);
  border-radius: 100px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.paywall-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8,11,15,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.paywall-modal.visible { display: flex; }

.paywall-panel {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 100%;
  max-width: 520px;
  text-align: center;
  animation: scaleIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@keyframes scaleIn {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.paywall-icon {
  width: 60px; height: 60px;
  background: rgba(255,183,3,0.1);
  border: 1px solid rgba(255,183,3,0.25);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.paywall-icon svg { width: 28px; height: 28px; color: var(--amber); }

.paywall-panel .section-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.paywall-panel p {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.paywall-price {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.paywall-price-amount {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -2px;
}
.paywall-price-label {
  font-size: 13px;
  color: var(--text3);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.paywall-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
  text-align: left;
}
.paywall-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text2);
}

/* ─── SAVE PROGRESS BANNER ─── */
.save-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 40px;
  background: rgba(0,212,170,0.04);
  border-bottom: 1px solid rgba(0,212,170,0.1);
  position: fixed;
  top: 118px; left: 0; right: 0;
  z-index: 48;
}
.save-progress-text {
  font-size: 13px;
  color: var(--text3);
  font-family: var(--font-mono);
}
.save-progress-text span { color: var(--accent); }
.btn-save {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--accent);
  background: rgba(0,212,170,0.08);
  border: 1px solid rgba(0,212,170,0.2);
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn-save:hover { background: rgba(0,212,170,0.14); border-color: rgba(0,212,170,0.35); }

/* ─── SUMMARY CARD ─── */
.summary-card {
  grid-column: 1 / -1;
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.summary-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.summary-score-100 { background: linear-gradient(135deg, rgba(0,212,170,0.12), rgba(0,212,170,0.04)); border: 1px solid rgba(0,212,170,0.25); }
.summary-score-100::before { background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.summary-score-80 { background: linear-gradient(135deg, rgba(72,149,239,0.1), rgba(72,149,239,0.03)); border: 1px solid rgba(72,149,239,0.2); }
.summary-score-80::before { background: linear-gradient(90deg, #2d7fd3, var(--blue)); }
.summary-score-60 { background: linear-gradient(135deg, rgba(255,183,3,0.08), rgba(255,183,3,0.02)); border: 1px solid rgba(255,183,3,0.2); }
.summary-score-60::before { background: linear-gradient(90deg, #c98b00, var(--amber)); }
.summary-score-40 { background: linear-gradient(135deg, rgba(244,140,6,0.1), rgba(244,140,6,0.02)); border: 1px solid rgba(244,140,6,0.2); }
.summary-score-40::before { background: linear-gradient(90deg, #b85e00, #f48c06); }
.summary-score-0 { background: linear-gradient(135deg, rgba(255,77,109,0.1), rgba(255,77,109,0.02)); border: 1px solid rgba(255,77,109,0.2); }
.summary-score-0::before { background: linear-gradient(90deg, #c2003a, var(--red)); }

.summary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.summary-emoji { font-size: 28px; line-height: 1; }
.summary-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.summary-body {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.75;
}
.summary-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 16px;
}

/* ─── STATIC SEO CONTENT SECTION ─── */
.seo-section {
  width: 100%;
  padding: 80px 24px;
  border-top: 1px solid var(--border);
}
.seo-container {
  max-width: 900px;
  margin: 0 auto;
}
.seo-heading {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: var(--text);
}
.seo-intro {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: 48px;
}
.seo-frameworks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 64px;
}
.seo-framework h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin-bottom: 8px;
  color: var(--text);
}
.seo-framework p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.75;
}
.seo-framework a {
  color: var(--accent);
  text-decoration: none;
}
.seo-framework a:hover {
  text-decoration: underline;
}
.seo-faq {
  border-top: 1px solid var(--border);
  padding-top: 48px;
}
.seo-faq .seo-heading {
  margin-bottom: 32px;
}
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-question {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin-bottom: 8px;
  color: var(--text);
}
.faq-answer {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.75;
  max-width: 720px;
}

/* RESPONSIVE */
/* ─── MOBILE OPTIMISATION ─── */
@media (max-width: 680px) {

  /* Nav */
  nav { padding: 14px 18px; }
  .logo { font-size: 18px; }
  .logo-icon { width: 28px; height: 28px; }
  .logo-icon svg { width: 15px; height: 15px; }
  nav .nav-cta { font-size: 12px; padding: 6px 12px; }
  #nav-right { gap: 6px; }

  /* Landing */
  #screen-landing { padding: 0 18px; height: 100vh; overflow: hidden; }
  .hero-title { font-size: clamp(28px, 9vw, 42px); letter-spacing: -1px; margin-bottom: 10px; }
  .hero-subtitle { font-size: 13px; margin-bottom: 20px; }
  .btn-primary { font-size: 15px; padding: 14px 24px; }
  .hero-cta-note { font-size: 11px; }
  .stats-bar { grid-template-columns: repeat(3, 1fr); margin-top: 20px; }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 11px; }

  /* Framework selector */
  .framework-overlay { align-items: center; }
  .framework-panel { padding: 28px 18px 32px; border-radius: 16px; width: 92%; max-height: 85vh; overflow-y: auto; }
  .framework-panel .section-title { font-size: 22px; }
  .framework-panel p { font-size: 13px; margin-bottom: 24px; }
  .framework-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px; }
  .framework-card { padding: 18px 16px; }
  .framework-name { font-size: 17px; }
  .framework-desc { font-size: 12px; }

  /* Intro screen */
  #screen-intro { padding: 90px 18px 40px; }
  .intro-icon { width: 56px; height: 56px; margin-bottom: 20px; }
  .intro-title { font-size: 26px; letter-spacing: -0.5px; }
  .intro-body { font-size: 14px; margin-bottom: 28px; }
  .intro-checklist { max-width: 100%; margin-bottom: 32px; gap: 10px; }
  .intro-check { font-size: 13px; }

  /* Assessment */
  #screen-assessment { padding: 130px 14px 40px; }
  .assessment-container { max-width: 100%; }
  .assessment-header { margin-bottom: 20px; }
  .question-card { padding: 22px 18px; }
  .question-number { font-size: 11px; margin-bottom: 10px; }
  .question-text { font-size: 16px; margin-bottom: 22px; }
  .options-list { gap: 8px; margin-bottom: 20px; }
  .option-btn { padding: 12px 14px; gap: 10px; }
  .option-indicator { width: 18px; height: 18px; }
  .option-label { width: 22px; font-size: 12px; }
  .option-text { font-size: 13px; }
  .option-text strong { font-size: 10px; }
  .submit-row { justify-content: stretch; }
  .submit-row .btn-primary { width: 100%; justify-content: center; }
  .back-btn { font-size: 12px; }

  /* Progress bar */
  .progress-bar-container { padding: 8px 16px; gap: 10px; }
  .progress-info { font-size: 10px; }
  .progress-pct { font-size: 10px; }

  /* Save progress bar */
  .save-progress-bar { top: 104px; padding: 8px 16px; }
  .btn-save { font-size: 11px; padding: 6px 12px; }

  /* Results */
  #screen-results { padding: 80px 14px 40px; }
  .results-container { max-width: 100%; }
  .results-header { margin-bottom: 28px; }
  .results-header .section-title { font-size: 24px; }
  .results-header p { font-size: 14px; }
  .results-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
  .result-card { padding: 22px 18px; }
  .score-circle { width: 120px; height: 120px; }
  .score-num { font-size: 30px; }
  .summary-title { font-size: 17px; }
  .summary-body { font-size: 13px; line-height: 1.65; }
  .category-name { font-size: 13px; }

  /* Radar chart */
  #radar-chart { width: 300px; height: 240px; }

  /* Account */
  #screen-account { padding: 90px 18px 40px; }
  .account-container { max-width: 100%; }
  .account-container .section-title { font-size: 26px; }
  .account-container .sub { font-size: 14px; margin-bottom: 24px; }
  .form-input, .form-select { font-size: 16px; } /* Prevents iOS zoom on focus */
  .form-row { grid-template-columns: 1fr; }

  /* Portal */
  #screen-portal { padding: 80px 14px 40px; }
  .portal-container { max-width: 100%; }
  .portal-header { margin-bottom: 24px; }
  .portal-header .section-title { font-size: 24px; }
  .portal-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
  .portal-fw-card { padding: 22px 18px; }
  .portal-fw-name { font-size: 16px; }
  .portal-fw-score { font-size: 28px; }
  .portal-cta-card { padding: 24px 18px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .portal-cta-card .btn-primary { width: 100%; justify-content: center; }

  /* History */
  .history-section { margin-bottom: 16px; }
  .history-row { grid-template-columns: 20px 1fr 80px 24px; gap: 8px; padding: 12px 14px; }
  .history-date { display: none; }
  .history-score { font-size: 16px; }
  .history-score-bar { display: none; }
  .history-fw-name { font-size: 13px; }
  .history-maturity { font-size: 9px; padding: 3px 6px; }

  /* Paywall modal */
  .paywall-modal { padding: 16px; align-items: flex-end; }
  .paywall-panel { padding: 32px 20px; border-radius: 20px 20px 0 0; }
  .paywall-panel .section-title { font-size: 22px; }
  .paywall-price-amount { font-size: 34px; }

  /* Consult modal */
  #consult-modal { padding: 16px; align-items: flex-end; }
  #consult-modal .paywall-panel { border-radius: 20px 20px 0 0; padding: 28px 20px; }

  /* Misc */
  .intro-framework-badge { font-size: 10px; }
  .form-divider { font-size: 11px; }

  /* SEO section */
  .seo-section { padding: 52px 18px; }
  .seo-frameworks { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; }
  .seo-faq { padding-top: 32px; }
}

/* Extra small phones */
@media (max-width: 380px) {
  .hero-title { font-size: 28px; }
  .question-text { font-size: 15px; }
  .stats-bar { grid-template-columns: 1fr; gap: 1px; }
  .stat-num { font-size: 20px; }
  .framework-panel { padding: 24px 14px 28px; }
  .framework-grid { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: 1fr; }
}
