/* ===========================
   IQ Pro — stylesheet
   =========================== */

:root {
  --bg: #0A0A0A;
  --bg-elev: #111111;
  --bg-elev-2: #181818;
  --fg: #FAFAF7;
  --fg-dim: #8a8a85;
  --fg-dimmer: #555550;
  --border: #1f1f1f;
  --border-strong: #2a2a2a;
  --accent: #00D9A3;
  --accent-hot: #00B88A;
  --accent-glow: rgba(0, 217, 163, 0.15);
  --danger: #FF4D4D;
  --warn: #FFB84D;
  --serif: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 4px;
  --radius-lg: 8px;
  --max-wrap: 1200px;
  --max-narrow: 760px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, var(--accent-glow) 0%, transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(0, 217, 163, 0.04) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

.wrap { max-width: var(--max-wrap); margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: var(--max-narrow); }

.accent { color: var(--accent); font-style: italic; font-weight: 400; }
.dim { color: var(--fg-dim); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.brand-mark { color: var(--fg); }
.brand-slash { color: var(--accent); font-style: italic; margin: 0 2px; }
.brand-sub { color: var(--fg-dim); font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: 0.05em; align-self: center; position: relative; top: -1px; }
.brand:hover { color: var(--fg); }
.brand:hover .brand-slash { color: var(--accent-hot); }

.site-nav {
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
}
.site-nav a {
  color: var(--fg-dim);
  transition: color 0.15s;
  position: relative;
}
.site-nav a:hover { color: var(--fg); }
.site-nav a.is-active { color: var(--fg); }
.site-nav a.is-active::after {
  content: '';
  position: absolute;
  bottom: -26px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent-hot);
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -10px var(--accent);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--fg);
}
.btn-ghost:hover {
  border-color: var(--fg);
  color: var(--fg);
}
.btn-lg {
  padding: 16px 28px;
  font-size: 15px;
}
.btn-header { padding: 9px 16px; }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 64px; }
.hero-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  margin-bottom: 32px;
}
.hero-title {
  font-size: clamp(48px, 9vw, 112px);
  max-width: 14ch;
  margin-bottom: 28px;
}
.hero-lede {
  font-size: clamp(17px, 1.6vw, 20px);
  max-width: 60ch;
  color: var(--fg-dim);
  margin-bottom: 40px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 80px;
  flex-wrap: wrap;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hero-stats > div {
  background: var(--bg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-num {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--fg);
}
.stat-lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ---------- Section heads ---------- */
.section-head { margin-bottom: 56px; }
.kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
h2 {
  font-size: clamp(32px, 5vw, 56px);
  max-width: 20ch;
}

/* ---------- Categories ---------- */
.categories { padding: 96px 0; border-top: 1px solid var(--border); }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cat-grid-6 { grid-template-columns: repeat(3, 1fr); }
.categories-cta { text-align: center; margin-top: 40px; }
.cat-card {
  background: var(--bg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.2s;
}
.cat-card:hover { background: var(--bg-elev); }
.cat-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--fg-dimmer);
  margin-bottom: 8px;
}
.cat-card h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}
.cat-card p {
  color: var(--fg-dim);
  margin: 0;
  font-size: 15px;
}
.cat-cta {
  background: var(--accent);
  color: #000;
  justify-content: space-between;
}
.cat-cta:hover { background: var(--accent-hot); }
.cat-cta h3 { font-style: italic; color: #000; font-weight: 400; }
.cat-cta .btn {
  background: #000;
  color: var(--accent);
  align-self: flex-start;
}
.cat-cta .btn:hover { background: #000; color: var(--fg); box-shadow: none; transform: none; }

/* ---------- How ---------- */
.how {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}
.how-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.how-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.how-list li {
  display: flex;
  gap: 24px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.how-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.how-num {
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.04em;
  min-width: 80px;
}
.how-list h4 {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}
.how-list p { color: var(--fg-dim); margin: 0; }

/* ---------- Final CTA ---------- */
.final-cta {
  padding: 120px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.final-cta h2 {
  margin: 0 auto 40px;
  max-width: 20ch;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 96px 0 48px;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-size: clamp(40px, 7vw, 88px);
  margin-bottom: 24px;
}
.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--fg-dim);
  max-width: 55ch;
}

/* ---------- Prose ---------- */
.prose { padding: 64px 0 120px; }
.prose h2 {
  font-size: 32px;
  margin-top: 56px;
  margin-bottom: 16px;
  max-width: none;
}
.prose h2:first-child { margin-top: 0; }
.prose p {
  color: var(--fg-dim);
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.75;
}
.prose ul { color: var(--fg-dim); margin: 0 0 20px; padding-left: 20px; line-height: 1.8; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose a:not(.btn) { color: var(--accent); border-bottom: 1px solid var(--accent); }
.prose a:not(.btn):hover { color: var(--accent-hot); border-bottom-color: var(--accent-hot); }
.prose a.btn { border-bottom: 0; }
.cta-inline { margin-top: 48px; }

/* ---------- Contact ---------- */
.contact-grid-wrap { padding: 64px 0 120px; }
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 64px;
}
.contact-card {
  padding: 28px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s;
}
.contact-card:hover {
  border-color: var(--accent);
  color: var(--fg);
  transform: translateY(-2px);
}
.contact-card h3 {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  word-break: break-all;
}
.contact-card p { color: var(--fg-dim); margin: 0; font-size: 14px; }

.contact-form-wrap h2 {
  font-size: 28px;
  margin-bottom: 4px;
  max-width: none;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}
.contact-form label { display: flex; flex-direction: column; gap: 6px; }
.contact-form span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); }
.contact-form input, .contact-form textarea {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--fg);
  transition: border-color 0.15s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form button { align-self: flex-start; margin-top: 8px; }

/* ===========================
   QUIZ
   =========================== */
.quiz-shell { padding: 64px 0 96px; min-height: calc(100vh - 72px - 260px); }
.quiz-screen { display: none; }
.quiz-screen.is-active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.rules {
  list-style: none;
  padding: 0;
  margin: 32px 0 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.rules li {
  color: var(--fg-dim);
  font-size: 16px;
  padding-left: 24px;
  position: relative;
}
.rules li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}
.rules strong { color: var(--fg); font-weight: 600; }

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.q-counter {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--fg);
  font-weight: 500;
}
.q-category {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.timer-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.timer-fill {
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  transition: transform 0.1s linear, background 0.3s;
}
.timer-fill.warn { background: var(--warn); }
.timer-fill.danger { background: var(--danger); }
.timer-num {
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
  color: var(--fg-dim);
  margin-bottom: 48px;
  font-weight: 500;
}

.q-text {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
  min-height: 100px;
}

.q-visual {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin: 0 0 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--fg);
}
.q-visual svg.vis {
  width: 100%;
  max-width: 520px;
  height: auto;
}

.q-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.q-options--visual {
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.q-option--visual {
  flex-direction: column;
  align-items: stretch;
  padding: 16px 12px;
  gap: 10px;
}
.q-option--visual .q-letter { align-self: flex-start; }
.q-opt-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  color: var(--fg);
}
.q-opt-visual svg.vis-sm {
  width: 100%;
  max-width: 80px;
  height: 80px;
}
.q-option {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 14px;
}
.q-option:hover {
  border-color: var(--accent);
  background: var(--bg-elev-2);
  transform: translateY(-1px);
}
.q-option:disabled { cursor: default; opacity: 0.7; transform: none; }
.q-option .q-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-dim);
  flex-shrink: 0;
}
.q-option:hover .q-letter { background: var(--accent); color: #000; border-color: var(--accent); }

/* ---------- Result ---------- */
.score-hero {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  margin: 32px 0 0;
}
.score-iq {
  font-family: var(--serif);
  font-size: clamp(96px, 18vw, 200px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  margin-bottom: 8px;
}
.score-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
}
.score-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 24px 0;
  overflow: hidden;
  position: relative;
}
.score-bar::before, .score-bar::after {
  content: '100';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-dimmer);
}
.score-bar::before {
  content: '70';
  left: 0;
  transform: none;
}
.score-bar::after {
  content: '145';
  right: 0;
  left: auto;
  transform: none;
}
.score-bar-fill {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.8s ease;
}
.score-summary {
  margin: 40px 0 32px;
  color: var(--fg-dim);
  font-size: 17px;
}
.score-summary strong { color: var(--fg); font-weight: 600; }
.score-breakdown {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}
.breakdown-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
  font-size: 14px;
}
.breakdown-row:last-child { border-bottom: 0; }
.breakdown-cat { color: var(--fg); }
.breakdown-score { font-family: var(--mono); color: var(--fg-dim); }
.breakdown-mini-bar {
  width: 80px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.breakdown-mini-bar-fill {
  height: 100%;
  background: var(--accent);
}

.score-band {
  padding: 24px;
  background: var(--bg-elev);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  margin-bottom: 32px;
}
.score-band h3 { font-family: var(--sans); font-size: 14px; font-weight: 600; margin-bottom: 8px; letter-spacing: 0.05em; }
.score-band p { color: var(--fg-dim); margin: 0; font-size: 15px; line-height: 1.7; }

.score-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.score-disclaimer {
  font-size: 12px;
  color: var(--fg-dimmer);
  line-height: 1.6;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ===========================
   CERTIFICATE
   =========================== */
.certificate-wrap {
  margin: 40px 0 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.cert-controls {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.cert-name-field {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cert-name-field span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.cert-name-field input {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--fg);
  transition: border-color 0.15s;
}
.cert-name-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.certificate {
  background: #FAFAF7;
  color: #111;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  aspect-ratio: 1.414;
  max-width: 100%;
}
.cert-border {
  border: 2px solid #111;
  height: 100%;
  padding: 6px;
}
.cert-inner {
  border: 1px solid #111;
  height: 100%;
  padding: 28px 40px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.cert-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}
.cert-inner > * { position: relative; z-index: 1; }

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #111;
  padding-bottom: 14px;
}
.cert-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
  color: #111;
}
.cert-brand-mark { color: #111; }
.cert-brand-slash { color: #0B9E77; font-style: italic; margin: 0 3px; }
.cert-brand-sub { color: #555; font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; }
.cert-kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #555;
}

.cert-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 0;
}
.cert-preamble {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #777;
  margin: 0 0 6px;
}
.cert-name {
  font-family: var(--serif);
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 800;
  color: #111;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  border-bottom: 1px solid #111;
  padding: 0 20px 6px;
  min-width: 60%;
  line-height: 1.1;
}
.cert-text {
  font-family: var(--sans);
  font-size: 14px;
  color: #333;
  max-width: 56ch;
  margin: 0 auto 18px;
  line-height: 1.55;
}
.cert-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 6px 0 14px;
  padding: 14px 32px;
  border: 1.5px solid #111;
  background: rgba(11, 158, 119, 0.06);
}
.cert-score-num {
  font-family: var(--serif);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 800;
  line-height: 1;
  color: #0B9E77;
  letter-spacing: -0.04em;
}
.cert-score-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #111;
}
.cert-details {
  font-family: var(--mono);
  font-size: 11px;
  color: #555;
  margin: 0;
}

.cert-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
  padding-top: 14px;
  border-top: 1px solid #111;
}
.cert-sig { text-align: center; }
.cert-sig-line {
  height: 1px;
  background: #111;
  margin-bottom: 6px;
}
.cert-sig-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: #111;
}
.cert-sig-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: #777;
}
.cert-seal {
  color: #0B9E77;
  opacity: 0.9;
}

.cert-note {
  font-size: 12px;
  color: var(--fg-dim);
  margin-top: 12px;
  text-align: center;
}

/* ===========================
   PRINT
   =========================== */
@media print {
  @page { size: A4 landscape; margin: 10mm; }

  /* Reset backgrounds and hide everything */
  html, body { background: #FFF !important; color: #000 !important; }
  body::before { display: none !important; }
  .site-header, .site-footer, .score-actions, .score-hero, .score-bar,
  .score-summary, .score-breakdown, .score-band, .score-disclaimer,
  .kicker, .quiz-screen > .wrap > h1, .quiz-screen > .wrap > .kicker,
  .no-print, .cert-note { display: none !important; }

  /* Hide intro and quiz screens when printing from result */
  .quiz-screen:not(.is-active) { display: none !important; }

  /* Show certificate full page */
  .quiz-shell, .wrap, .wrap-narrow {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .certificate-wrap {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
  .certificate {
    background: #FFF !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: 100%;
    aspect-ratio: 1.414;
    box-shadow: none !important;
  }
  .cert-border { border-color: #000 !important; }
  .cert-inner { border-color: #000 !important; }
  .cert-name, .cert-score { border-color: #000 !important; }
  .cert-brand-mark, .cert-brand-sub, .cert-kicker, .cert-name,
  .cert-text, .cert-score-label, .cert-details, .cert-sig-label,
  .cert-sig-sub, .cert-sig-line { color: #000 !important; background: transparent !important; }
  .cert-brand-slash, .cert-score-num, .cert-seal { color: #0B9E77 !important; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  background: var(--bg);
  margin-top: 96px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-tag { color: var(--fg-dim); margin-top: 12px; font-size: 14px; max-width: 40ch; }
.site-footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 16px;
  font-weight: 500;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: var(--fg-dim); font-size: 14px; }
.site-footer a:hover { color: var(--accent); }
.footer-legal {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  color: var(--fg-dimmer);
  font-size: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .q-options--visual { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 64px 0 40px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .contact-cards { grid-template-columns: 1fr; }
  .q-options { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .site-header .wrap { gap: 12px; }
  .score-actions { flex-direction: column; }
  .score-actions .btn { width: 100%; justify-content: center; }
}
