:root {
  --bg: #0F1117;
  --surface: #181C27;
  --surface2: #1F2435;
  --surface3: #252B3D;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --text: #E8EEFF;
  --text2: #A8B4D0;
  --text3: #6B7A9E;
  --accent: #4C8EF7;
  --accent2: #2563EB;
  --glow: rgba(76,142,247,0.15);

  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Answer colors */
  --A: #F43F5E; --A-bg: rgba(244,63,94,0.08); --A-border: rgba(244,63,94,0.25);
  --B: #F59E0B; --B-bg: rgba(245,158,11,0.08); --B-border: rgba(245,158,11,0.25);
  --C: #3B82F6; --C-bg: rgba(59,130,246,0.08); --C-border: rgba(59,130,246,0.25);
  --D: #10B981; --D-bg: rgba(16,185,129,0.08); --D-border: rgba(16,185,129,0.25);
  --E: #8B5CF6; --E-bg: rgba(139,92,246,0.08); --E-border: rgba(139,92,246,0.25);


  /* Section accent colors */
  --U-col: #F43F5E;  --U-glow: rgba(244,63,94,0.12);
  --E-col: #F59E0B;  --E-glow: rgba(245,158,11,0.12);
  --P-col: #3B82F6;  --P-glow: rgba(59,130,246,0.12);
  --B-col: #10B981;  --B-glow: rgba(16,185,129,0.12);
  --T-col: #8B5CF6;  --T-glow: rgba(139,92,246,0.12);
  --V-col: #EC4899;  --V-glow: rgba(236,72,153,0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Sora', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(76,142,247,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 90%, rgba(139,92,246,0.05) 0%, transparent 60%);
}

/* Ambient background */
body::before {
  content: '';
  position: fixed;
  top: -40%;
  left: -20%;
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(37,99,235,0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  right: -15%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(139,92,246,0.05) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ─── MAIN ─── */
.main {
  margin-left: 260px;
  flex: 1;
  padding: 40px 48px 60px;
  max-width: 980px;
}

/* Save badge */
.save-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 99px;
  font-size: 11px;
  color: #10B981;
  margin-bottom: 28px;
}
.save-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: #10B981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.5; transform:scale(0.8); }
}

/* Section header */
.section-header {
  margin-bottom: 28px;
}
.section-eyebrow {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 600;
}
.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.2;
}
.section-header p {
  font-size: 14px;
  color: var(--text2);
  max-width: 600px;
  line-height: 1.6;
}

/* Legend */
.legend {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.legend-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  width: 100%;
  margin-bottom: 4px;
}
.leg-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
}
.leg-letter {
  width: 22px; height: 22px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.leg-info { line-height: 1.3; }
.leg-pts { font-weight: 600; }
.leg-title { font-size: 10px; opacity: 0.7; }

/* Question cards */
.qcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  /* animation: fadeUp 0.3s ease both; */
}

.qcard.answered {
  border-color: rgba(16,185,129,0.3);
  border-left-color: #10B981;
  box-shadow: 0 4px 20px rgba(16,185,129,0.08);
}

.qhead {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.qcode {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.qtext {
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
  font-weight: 400;
}

/* Options grid */
.opts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.opt {
  border: 1.5px solid var(--border);
  border-left: 3px solid var(--lc, var(--border));
  border-radius: var(--radius);
  background: var(--surface2);
  padding: 12px 10px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
  text-align: left;
  position: relative;
  overflow: hidden;
}
.opt::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.opt:hover { transform: translateY(-2px); border-color: var(--border2); background: var(--surface3); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.opt:hover::before { opacity: 1; }

.opt-pts {
  font-size: 11px;
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
  color: var(--text2);
}
.opt-desc {
  font-size: 11px;
  line-height: 1.35;
  color: var(--text2);
}

/* Answer letter colors */
.opt[data-l="A"] { --lc: var(--A); }
.opt[data-l="B"] { --lc: var(--B); }
.opt[data-l="C"] { --lc: var(--C); }
.opt[data-l="D"] { --lc: var(--D); }
.opt[data-l="E"] { --lc: var(--E); }

/* .opt .opt-letter { color: var(--lc); } */

.opt.selected {
  border-color: var(--lc) !important;
  background: color-mix(in srgb, var(--lc) 12%, var(--surface2));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lc) 18%, transparent),
              0 6px 24px color-mix(in srgb, var(--lc) 16%, transparent);
  transform: translateY(-2px);
}

/* Nav footer */
.nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.nav-answered { font-size: 12px; color: var(--text3); }

.btns { display: flex; gap: 10px; }

.btn {
  padding: 11px 22px;
  border-radius: var(--radius);
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #7C3AED);
  color: white;
  box-shadow: 0 4px 14px rgba(76,142,247,0.25);
}
.btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 6px 24px rgba(76,142,247,0.4);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface3);
  border-color: var(--border2); }

/* ─── RESULTS ─── */
#results-view { display: none; }

.results-header { margin-bottom: 32px; }
.results-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  margin-bottom: 6px;
}
.results-header p { font-size: 14px; color: var(--text2); }

/* Section results */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.res-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.2s;
}
.res-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.res-card .rc-name {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  line-height: 1.3;
}
.res-card .rc-pct {
  font-family: 'Playfair Display', serif;
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1;
}
.res-card .rc-class {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
}
.res-card .rc-track { height: 4px; background: var(--surface3); border-radius: 4px; overflow: hidden; }
.res-card .rc-fill { height: 100%; border-radius: 4px; transition: width 0.6s; }

/* Bars card */
.bars-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.bars-card h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}
.bar-row { margin-bottom: 16px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-track2 { height: 8px; background: var(--surface3); border-radius: 4px; overflow: hidden; }
.bar-fill2 { height: 100%; border-radius: 4px; transition: width 0.7s cubic-bezier(0.4,0,0.2,1); }

/* Warnings */
.warn-card {
  background: rgba(244,63,94,0.06);
  border: 1px solid rgba(244,63,94,0.2);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
  color: #F43F5E;
  font-size: 13px;
}
.warn-card .warn-title { font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.warn-card ul { margin: 0 0 0 16px; }
.warn-card li { margin-bottom: 4px; }

/* Readiness table */
.readiness-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.rt-row {
  display: grid;
  grid-template-columns: 18px 90px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.rt-row:last-child { border-bottom: none; }
.rt-dot { width: 8px; height: 8px; border-radius: 50%; }
.rt-range { font-weight: 700; }
.rt-label { color: var(--text2); }

/* Result actions */
.res-actions { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }

/* Disclaimer */
.disclaimer {
  font-size: 11px;
  color: var(--text3);
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  line-height: 1.6;
}

/* ─── MOBILE NAV ─── */
.mob-tab {
  padding: 7px 13px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface2);
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.mob-tab.active { background: var(--accent); color: white; border-color: var(--accent); }
.mob-tab.done { background: rgba(16,185,129,0.1); color: #10B981; border-color: rgba(16,185,129,0.25); }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 20px 16px 80px; }
  .mobile-nav { display: flex; }
  .opts { grid-template-columns: 1fr; }
  .hero-score { flex-direction: column; gap: 20px; text-align: center; }
  .results-grid { grid-template-columns: 1fr 1fr; }
  .legend { gap: 4px; }
  .leg-info { display: none; }
}

/* ─── HIDE SIDEBAR FOR CLIENT ─── */
.sidebar { display: none !important; }
.main { margin-left: 0 !important; max-width: 860px; margin: 0 auto; }

/* ─── TOP PROGRESS BAR ─── */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(15,17,23,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, #F43F5E, #F59E0B, #3B82F6, #10B981, #8B5CF6, #EC4899) 1;
  padding: 14px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: -40px -48px 32px;
}
.top-bar-logo {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: var(--text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-bar-logo .lm {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), #7C3AED);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.top-bar-logo .top-bar-label {
  font-size: 10px;
  padding: 2px 8px;
  background: rgba(16,185,129,0.2);
  border: 1px solid rgba(16,185,129,0.35);
  border-radius: 99px;
  color: #34D399;
  margin-right: 4px;
  letter-spacing: 0.06em;
}
.top-bar-logo #top-sec-name {
  margin-left: 3px;
}
.top-bar-center {
  flex: 1;
  max-width: 340px;
}
.top-prog-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 5px;
}
.top-prog-track {
  height: 4px;
  background: var(--surface3);
  border-radius: 4px;
  overflow: hidden;
}
.top-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7C3AED);
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
}
.top-bar-score {
  text-align: right;
  white-space: nowrap;
}
.top-bar-score .ts-pts { font-size: 18px; font-weight: 700; color: var(--text); }
.top-bar-score .ts-label { font-size: 11px; color: var(--text3); }

/* ─── INNER PAD ─── */
.inner-pad { padding:32px 40px 60px; }

/* ─── PASSWORD MODAL ─── */
.pw-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.pw-overlay.open { display: flex; }

.pw-modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  animation: popIn 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes popIn {
  from { opacity:0; transform:scale(0.92); }
  to   { opacity:1; transform:scale(1); }
}

.pw-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--accent), #7C3AED);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(76,142,247,0.3);
}
.pw-modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--text);
  text-align: center;
  margin-bottom: 6px;
}
.pw-modal p {
  font-size: 13px;
  color: var(--text2);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}
.pw-input-wrap { position: relative; margin-bottom: 12px; }
.pw-input {
  width: 100%;
  padding: 13px 44px 13px 16px;
  background: var(--surface2);
  border: 1.5px solid var(--border2);
  border-radius: var(--radius);
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  letter-spacing: 0.1em;
}
.pw-input:focus { border-color: var(--accent); }
.pw-input.error { border-color: var(--A); animation: shake 0.3s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.pw-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text3); cursor: pointer;
  font-size: 16px; padding: 4px;
}
.pw-error-msg {
  font-size: 12px;
  color: var(--A);
  text-align: center;
  min-height: 18px;
  margin-bottom: 12px;
}
.pw-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent), #7C3AED);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  box-shadow: 0 4px 16px rgba(76,142,247,0.3);
}
.pw-btn:hover { opacity: 0.88; }
.pw-cancel {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--text3);
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  cursor: pointer;
  margin-top: 8px;
  transition: color 0.15s;
}
.pw-cancel:hover { color: var(--text2); }

@media (max-width: 600px) {
  .top-bar { padding: 12px 16px; margin: -20px -16px 24px; }
  .top-bar-center { display: none; }
  .pw-modal { padding: 28px 20px; }
}

.sidebar { display: none !important; }
.main { margin-left: 0 !important; max-width: 860px; margin: 0 auto; }

/* TOP BAR */
.top-bar {
  position: sticky; top: 0; z-index: 15;
  background: rgba(15,17,23,0.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 14px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.top-bar-logo {
  font-family: 'Playfair Display', serif;
  font-size: 15px; color: var(--text);
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
}
.top-bar-logo .lm {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #7C3AED);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0; color: white; font-weight: 700;
}
.top-bar-center { flex: 1; max-width: 320px; }
.top-prog-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--text3); margin-bottom: 5px; }
.top-prog-track { height: 4px; background: var(--surface3); border-radius: 4px; overflow: hidden; }
.top-prog-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #7C3AED); border-radius: 4px; transition: width 0.4s; width: 0%; }
.top-bar-score { text-align: right; white-space: nowrap; }
.top-bar-score .ts-pts { font-size: 18px; font-weight: 700; color: var(--text); }
.top-bar-score .ts-label { font-size: 11px; color: var(--text3); }

/* MOBILE TABS */
.mob-tabs {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(15,17,23,0.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 8px 12px; gap: 6px; overflow-x: auto; z-index: 20;
}
.mob-tab {
  padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface2);
  font-family: 'Sora', sans-serif; font-size: 11px; font-weight: 600;
  color: var(--text3); cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.mob-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mob-tab.done { background: rgba(16,185,129,0.1); color: #10B981; border-color: rgba(16,185,129,0.25); }

@media(max-width:700px){
  .top-bar{ padding:12px 16px; }
  .top-bar-center{ display:none; }
  .mob-tabs{ display:flex; }
  .inner-pad{ padding:20px 14px 70px !important; }
}
@media print{
  .top-bar,.mob-tabs,.res-actions,.pw-overlay{ display:none !important; }
  #results-view{ display:block !important; }
  #section-view{ display:none !important; }
}

.sidebar{display:none!important;}
.main{margin-left:0!important;max-width:860px;margin:0 auto;}
.top-bar{position:sticky;top:0;z-index:15;background:rgba(15,17,23,0.95);backdrop-filter:blur(10px);border-bottom:1px solid var(--border);padding:14px 40px;display:flex;align-items:center;justify-content:space-between;gap:20px;}
.top-bar-logo{font-family:'Playfair Display',serif;font-size:15px;color:var(--text);display:flex;align-items:center;gap:10px;white-space:nowrap;}
.top-bar-logo .lm{width:30px;height:30px;border-radius:8px;background:linear-gradient(135deg,var(--accent),#7C3AED);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:white;flex-shrink:0;}
.top-bar-center{flex:1;max-width:320px;}
.top-prog-label{display:flex;justify-content:space-between;font-size:11px;color:var(--text3);margin-bottom:5px;}
.top-prog-track{height:4px;background:var(--surface3);border-radius:4px;overflow:hidden;}
.top-prog-fill{height:100%;background:linear-gradient(90deg,var(--accent),#7C3AED);border-radius:4px;transition:width 0.4s;width:0%;}
.top-bar-score{text-align:right;white-space:nowrap;}
.top-bar-score .ts-pts{font-size:18px;font-weight:700;color:var(--text);}
.top-bar-score .ts-label{font-size:11px;color:var(--text3);}
.mob-tabs{display:none;position:fixed;bottom:0;left:0;right:0;background:rgba(15,17,23,0.96);backdrop-filter:blur(8px);border-top:1px solid var(--border);padding:8px 12px;gap:6px;overflow-x:auto;z-index:20;}
.mob-tab{padding:6px 12px;border-radius:20px;border:1px solid var(--border);background:var(--surface2);font-family:'Sora',sans-serif;font-size:11px;font-weight:600;color:var(--text3);cursor:pointer;white-space:nowrap;transition:all 0.15s;}
.mob-tab.active{background:var(--accent);color:#fff;border-color:var(--accent);}
.mob-tab.done{background:rgba(16,185,129,0.1);color:#10B981;border-color:rgba(16,185,129,0.25);}
@media(max-width:700px){.top-bar{padding:12px 16px;}.top-bar-center{display:none;}.mob-tabs{display:flex;}.inner-pad{padding:20px 14px 70px!important;}}
@media print{.top-bar,.mob-tabs,.res-actions,.pw-overlay{display:none!important;}#results-view{display:block!important;}#section-view{display:none!important;}}

/* ── SECTION TABS (top) ── */
.sec-tabs-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15,17,23,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sec-tabs-wrap::-webkit-scrollbar { display: none; }
.sec-tabs {
  display: flex;
  align-items: stretch;
  min-width: max-content;
  padding: 0 16px;
}
.sec-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text3);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
  position: relative;
}
.sec-tab:hover { color: var(--text); }
.sec-tab.st-active { border-bottom-color: var(--lc, var(--accent)); }
.sec-tab.st-done { color: var(--D); }
.sec-tab.st-done::after {
  content: '✓';
  font-size: 9px;
  position: absolute;
  top: 6px; right: 4px;
}
.sec-tab-icon { font-size: 14px; }
.sec-tab-name { }
.sec-tab-res { /* results tab */
  color: var(--accent);
  border-left: 1px solid var(--border);
  padding-left: 20px;
}

/* app2: generated markup style separation */
.top-score-max {
  color: var(--text3);
  font-size: 11px;
  font-weight: 400;
}

.score-a { --score-color: var(--A); --score-bg: var(--A-bg); --score-border: var(--A-border); }
.score-b { --score-color: var(--B); --score-bg: var(--B-bg); --score-border: var(--B-border); }
.score-c { --score-color: var(--C); --score-bg: var(--C-bg); --score-border: var(--C-border); }
.score-d { --score-color: var(--D); --score-bg: var(--D-bg); --score-border: var(--D-border); }
.score-e { --score-color: var(--E); --score-bg: var(--E-bg); --score-border: var(--E-border); }
.score-muted { --score-color: var(--text3); --score-bg: transparent; --score-border: var(--border); }

.section-accent-1 { --section-color: #F43F5E; --section-bg: rgba(244,63,94,0.13); --section-border: rgba(244,63,94,0.4); }
.section-accent-2 { --section-color: #F59E0B; --section-bg: rgba(245,158,11,0.13); --section-border: rgba(245,158,11,0.4); }
.section-accent-3 { --section-color: #3B82F6; --section-bg: rgba(59,130,246,0.13); --section-border: rgba(59,130,246,0.4); }
.section-accent-4 { --section-color: #10B981; --section-bg: rgba(16,185,129,0.13); --section-border: rgba(16,185,129,0.4); }
.section-accent-5 { --section-color: #8B5CF6; --section-bg: rgba(139,92,246,0.13); --section-border: rgba(139,92,246,0.4); }
.section-accent-6 { --section-color: #EC4899; --section-bg: rgba(236,72,153,0.13); --section-border: rgba(236,72,153,0.4); }

.sec-tab.section-accent-1,
.sec-tab.section-accent-2,
.sec-tab.section-accent-3,
.sec-tab.section-accent-4,
.sec-tab.section-accent-5,
.sec-tab.section-accent-6 {
  --lc: var(--section-color);
}
.sec-tab.st-active {
  background: var(--section-bg);
  color: var(--section-color);
}
.sec-tab.st-done:not(.st-active) { color: var(--D); }
.sec-tab-res { --lc: var(--accent); }
.sec-tab-res.st-active {
  background: rgba(76,142,247,0.12);
  color: var(--accent);
}

.mob-tab.active.section-accent-1,
.mob-tab.active.section-accent-2,
.mob-tab.active.section-accent-3,
.mob-tab.active.section-accent-4,
.mob-tab.active.section-accent-5,
.mob-tab.active.section-accent-6 {
  background: var(--section-bg);
  border-color: var(--section-border);
  color: var(--section-color);
}

.score-option-1 { --option-color: var(--A); --option-bg: var(--A-bg); --option-border: var(--A-border); }
.score-option-2 { --option-color: var(--B); --option-bg: var(--B-bg); --option-border: var(--B-border); }
.score-option-3 { --option-color: var(--C); --option-bg: var(--C-bg); --option-border: var(--C-border); }
.score-option-4 { --option-color: var(--D); --option-bg: var(--D-bg); --option-border: var(--D-border); }
.score-option-5 { --option-color: var(--E); --option-bg: var(--E-bg); --option-border: var(--E-border); }

.leg-letter.score-option-1,
.leg-letter.score-option-2,
.leg-letter.score-option-3,
.leg-letter.score-option-4,
.leg-letter.score-option-5 {
  background: var(--option-bg);
  border: 1px solid var(--option-border);
  color: var(--option-color);
}
.leg-pts.score-option-1,
.leg-pts.score-option-2,
.leg-pts.score-option-3,
.leg-pts.score-option-4,
.leg-pts.score-option-5 {
  color: var(--option-color);
}

.qarea { flex: 1; }
.opt.score-option-1,
.opt.score-option-2,
.opt.score-option-3,
.opt.score-option-4,
.opt.score-option-5 {
  --lc: var(--option-color);
}
.opt .opt-badge {
  border: 1px solid color-mix(in srgb, var(--option-border) 35%, transparent);
  border-radius: 6px;
  color: var(--option-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  height: 26px;
  margin-bottom: 7px;
  min-width: 26px;
}
.opt.selected .opt-badge {
  background: var(--option-bg);
  border-color: var(--option-border);
  box-shadow: 0 0 8px var(--option-border);
}
.opt.selected .opt-pts,
.opt.selected .opt-desc {
  color: var(--option-color);
}

.res-card .rc-pct { color: var(--score-color); }
.res-card .rc-class {
  background: color-mix(in srgb, var(--score-color) 12%, transparent);
  color: var(--score-color);
}
.res-card .rc-fill { background: var(--score-color); }

.bar-row-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.bar-row-pct {
  color: var(--score-color);
  font-weight: 600;
}
.bar-fill2 { background: var(--score-color); }
.bars-title {
  color: var(--text3);
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.donut-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 16px;
  padding: 24px;
}
.donut-chart {
  display: flex;
  justify-content: center;
}
.result-donut-svg {
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.25));
  flex-shrink: 0;
  height: 200px;
  width: 200px;
}
.result-donut-bg { stroke: var(--surface3); }
.result-donut-svg .section-accent-1,
.result-donut-svg .section-accent-2,
.result-donut-svg .section-accent-3,
.result-donut-svg .section-accent-4,
.result-donut-svg .section-accent-5,
.result-donut-svg .section-accent-6 {
  stroke: var(--section-color);
}
.result-donut-score {
  fill: var(--text);
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
}
.result-donut-label {
  fill: var(--text3);
  font-family: 'Sora', sans-serif;
  font-size: 11px;
}
.donut-legend {
  flex: 1;
  min-width: 180px;
}
.donut-legend-title {
  color: var(--text3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.donut-legend-row {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  padding: 7px 0;
}
.donut-legend-dot {
  background: var(--section-color);
  border-radius: 3px;
  flex-shrink: 0;
  height: 10px;
  width: 10px;
}
.donut-legend-name {
  color: var(--text2);
  flex: 1;
  font-size: 13px;
}
.donut-legend-pct {
  color: var(--section-color);
  font-size: 14px;
  font-weight: 700;
}

.rt-row .rt-dot { background: var(--score-color); }
.rt-row .rt-range { color: var(--score-color); }

/* ─── REPORT MODAL ─── */
.report-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 110;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.report-overlay.open { display: flex; }

.report-modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: popIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.report-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.report-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: var(--text);
}
.report-close {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text3);
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.report-close:hover { background: var(--surface3); color: var(--text); border-color: var(--border2); }

.report-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
  color: var(--text);
  line-height: 1.7;
}

.report-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  gap: 20px;
  text-align: center;
}
.report-loader p { color: var(--text2); font-size: 14px; }

.spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--surface3);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

#report-text {
  font-size: 15px;
  color: var(--text);
}
#report-text h1, #report-text h2, #report-text h3 {
  font-family: 'Playfair Display', serif;
  margin: 24px 0 12px;
  color: var(--accent);
}
#report-text h1 { font-size: 28px; }
#report-text h2 { font-size: 22px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
#report-text h3 { font-size: 18px; color: var(--text3); }
#report-text p { margin-bottom: 16px; }
#report-text ul, #report-text ol { margin-bottom: 16px; padding-left: 20px; }
#report-text li { margin-bottom: 8px; }
#report-text a { text-decoration: none; color: var(--accent); }
#report-text strong { color: var(--text); font-weight: 600; }
#report-text hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

