/* Self-hosted static fonts (Fontsource, OFL) — static files keep PDFs small */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/geist-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/geist-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/geist-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/geist-mono-latin-500-normal.woff2") format("woff2"); }

/* =========================================================
   Theme: johnlee.com — dark, minimal, Geist / Inter / Geist Mono
   ========================================================= */
:root {
  --bg: #0b0b0e;
  --bg-2: #111116;
  --surface: #15151b;
  --surface-2: #1c1c24;
  --line: rgba(241, 241, 244, 0.09);
  --line-2: rgba(241, 241, 244, 0.18);
  --text: #f1f1f4;
  --text-2: rgba(241, 241, 244, 0.78);
  --muted: rgba(241, 241, 244, 0.56);
  --accent: #8b7bff;
  --accent-soft: rgba(139, 123, 255, 0.14);
  --danger: #ff6b6b;
  --radius: 6px;
  --font-head: "Geist", "Inter", system-ui, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body::before { /* soft stage-light glow */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(900px 500px at 15% -10%, rgba(139, 123, 255, 0.10), transparent 60%),
              radial-gradient(700px 400px at 100% 0%, rgba(255, 196, 92, 0.05), transparent 60%);
}
.hidden { display: none !important; }
a { color: inherit; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10; height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 6vw, 100px);
  background: rgba(11, 11, 14, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--font-head); font-weight: 500; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; color: var(--text); white-space: nowrap; }
.brand small { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-left: 12px; font-weight: 500; }
@media (max-width: 560px) { .brand small { display: none; } }
.top-right { display: flex; align-items: center; gap: 20px; }
.progress-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); white-space: nowrap; }
.visit-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: 4px; color: var(--text); text-decoration: none;
  font-size: 14.5px; font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s;
}
.visit-btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
@media (max-width: 560px) { .progress-label { display: none; } .visit-btn { height: 38px; padding: 0 12px; font-size: 13.5px; } }
.progress { height: 2px; background: transparent; position: sticky; top: 72px; z-index: 10; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #c9a4ff); transition: width .35s ease; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 780px; margin: 0 auto; padding: 56px 16px 96px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 44px; }
@media (max-width: 600px) { .card { padding: 26px 20px; } .wrap { padding-top: 28px; } }

/* ---------- Intro ---------- */
.intro { background: transparent; border: 0; padding: 0; }
.intro h1 { font-family: var(--font-head); font-weight: 500; font-size: clamp(44px, 8vw, 76px); line-height: 1.02; letter-spacing: -0.04em; margin: 14px 0 22px; }
.intro p { margin: 0 0 14px; color: var(--text-2); font-size: 18px; max-width: 640px; }
.intro p.muted { color: var(--muted); font-size: 16.5px; }
.muted { color: var(--muted); }
.meta { list-style: none; padding: 0; margin: 36px 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta li { padding: 20px 0; display: flex; flex-direction: column; gap: 2px; }
.meta li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.meta strong { font-family: var(--font-head); font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }
.meta span { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* ---------- Steps ---------- */
.step { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step h2 { font-family: var(--font-head); font-weight: 500; margin: 0 0 28px; font-size: clamp(22px, 3.2vw, 28px); line-height: 1.3; letter-spacing: -0.02em; }
.step h3 { margin: 28px 0 12px; font-size: 15px; font-weight: 500; color: var(--text-2); }

/* Answer cards */
.options { display: grid; gap: 10px; }
.option {
  position: relative; display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--bg-2); cursor: pointer; font-size: 17px; color: var(--text-2);
  transition: border-color .15s, background .15s, color .15s; user-select: none;
}
.option:hover { border-color: rgba(241, 241, 244, 0.38); color: var(--text); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .dot { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(241, 241, 244, 0.4); display: grid; place-items: center; transition: all .15s; }
.option .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); transform: scale(0); transition: transform .15s; }
.option.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.option.selected .dot { border-color: var(--accent); background: var(--accent); }
.option.selected .dot::after { transform: scale(1); }
.option input:focus-visible + .dot { outline: 2px solid var(--accent); outline-offset: 3px; }
.option.inline { padding: 15px 18px; }
.options.two { grid-template-columns: 1fr 1fr; }

/* Form fields */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .grid2, .options.two, .meta { grid-template-columns: 1fr; } .meta li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.field input, .field select {
  font: inherit; font-size: 16px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--bg-2); color: var(--text); width: 100%; transition: border-color .15s, box-shadow .15s; appearance: none;
}
.field input::placeholder { color: rgba(241, 241, 244, 0.32); }
.field input:disabled { opacity: .5; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a0a0a8' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.field select option { background: var(--surface); color: var(--text); }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 24px; cursor: pointer; font-size: 15px; color: var(--muted); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 3px; flex: 0 0 auto; }
.check a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* Nav + buttons */
.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); gap: 12px; }
.btn { font: inherit; font-weight: 500; font-size: 15.5px; border-radius: 4px; padding: 13px 24px; border: 1px solid transparent; cursor: pointer; transition: all .15s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.lg { padding: 16px 30px; font-size: 16.5px; }
.btn.primary { background: var(--text); color: var(--bg); }
.btn.primary:hover:not(:disabled) { background: #ffffff; box-shadow: 0 0 0 4px rgba(241, 241, 244, 0.08); }
.btn.primary:disabled { background: rgba(241, 241, 244, 0.14); color: rgba(241, 241, 244, 0.4); cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--text); }
.btn .arrow { color: var(--accent); }

/* ---------- Report ---------- */
body.is-report .wrap { max-width: 1240px; }
body.is-report .progress { display: none; }
.report { display: grid; grid-template-columns: 420px 1fr; gap: 24px; align-items: start; }
@media (max-width: 980px) { .report { grid-template-columns: 1fr; } .rep-right { order: -1; } }
.rep-left { display: grid; gap: 20px; }
.rep-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.rep-card.center { display: flex; justify-content: center; }
.rep-card h3 { margin: 0 0 14px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.wheel { width: 100%; max-width: 380px; height: auto; }
.radar { width: 100%; max-width: 380px; height: auto; }
/* SVG theme hooks */
.w-q { stroke: var(--text); stroke-width: 1.5; fill-opacity: 0.16; }
.w-s { fill: var(--bg-2); stroke: var(--line-2); stroke-width: 1; }
.w-s.on { fill-opacity: 0.32; stroke: var(--text); stroke-width: 1.8; }
.w-c { fill: var(--surface-2); stroke: var(--line-2); }
.w-c.on { fill: var(--accent-soft); stroke: var(--text); stroke-width: 1.8; }
.w-outer { fill: none; stroke: var(--text); stroke-width: 2; }
.w-quad { font: 500 16px var(--font-head); fill: var(--text); letter-spacing: -0.01em; }
.w-slice { font: 500 10.5px var(--font-body); fill: var(--muted); }
.w-slice.on { font-weight: 700; font-size: 11px; fill: var(--text); }
.w-plus { font: 600 11px var(--font-body); fill: var(--muted); }
.r-grid { fill: none; stroke: var(--line-2); }
.r-shape { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; fill-opacity: 1; }
.r-dot { fill: var(--accent); }
.r-label { font: 500 13px var(--font-body); fill: var(--text); }
.r-tick { font: 500 10px var(--font-mono); fill: var(--muted); }

.questions { background: var(--bg-2); }
.questions p { margin: 0 0 14px; font-size: 14.5px; color: var(--text-2); padding-left: 14px; border-left: 2px solid var(--line-2); }
.questions p:last-child { margin: 0; }
.ol-row { display: flex; align-items: center; gap: 12px; }
.ol-score { font-family: var(--font-head); font-size: 40px; font-weight: 500; letter-spacing: -0.03em; }
.ol-score small { font-size: 15px; color: var(--muted); font-weight: 500; }
.pill { padding: 4px 10px; border-radius: 99px; font-weight: 500; font-size: 12.5px; }
.split { display: flex; height: 6px; border-radius: 99px; overflow: hidden; margin: 18px 0 10px; background: var(--surface-2); }
.legend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

.rep-right { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 44px 48px; }
@media (max-width: 600px) { .rep-right { padding: 26px 20px; } }
.rep-name { margin: 8px 0 0; font-family: var(--font-head); font-size: clamp(36px, 5vw, 52px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
.rep-date { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 12px 0 28px; }
.rep-top-actions { margin: -8px 0 28px; display: flex; gap: 10px; flex-wrap: wrap; }
body.print-mode .rep-top-actions { display: none; }
.rep-summary { display: grid; grid-template-columns: max-content 1fr; gap: 14px 32px; margin: 0 0 40px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 18px; }
.rep-summary dt { color: var(--muted); }
.rep-summary dd { margin: 0; font-family: var(--font-head); font-weight: 500; font-size: 20px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.01em; }
@media (max-width: 600px) { .rep-summary { grid-template-columns: 1fr; gap: 2px; } .rep-summary dd { margin-bottom: 12px; } }
.rep-right h2 { font-family: var(--font-head); font-weight: 500; font-size: 24px; margin: 44px 0 14px; letter-spacing: -0.02em; }
.rep-right h2:first-of-type { margin-top: 0; }
.rep-right p { margin: 0 0 16px; color: var(--text-2); font-size: 16.5px; line-height: 1.75; }
.rep-list { padding-left: 0; margin: 0; list-style: none; }
.rep-list li { margin-bottom: 14px; color: var(--text-2); line-height: 1.7; padding-left: 20px; position: relative; }
.rep-list li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.rep-list strong { color: var(--text); font-weight: 600; }
.rep-answers { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-2); }
.rep-answers summary { cursor: pointer; font-weight: 500; color: var(--text); }
.rep-answers ol { padding-left: 20px; margin: 16px 0 0; }
.rep-answers li { margin-bottom: 12px; }
.rep-answers li span { display: block; color: var(--muted); font-size: 13.5px; }
.res-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 32px; }

/* ---------- Light palette for PDF / print ---------- */
body.print-mode, body.light {
  --bg: #ffffff; --bg-2: #f6f6f8; --surface: #ffffff; --surface-2: #f1f1f4;
  --line: #e7e7ec; --line-2: #d6d6de; --text: #0b0b0e; --text-2: #34343c; --muted: #6b6b76;
  --accent: #6a5af9; --accent-soft: rgba(106, 90, 249, 0.12);
}
body.print-mode::before { display: none; }
body.print-mode .topbar, body.print-mode .res-actions, body.print-mode .rep-answers, body.print-mode .progress { display: none; }
body.print-mode .wrap { padding: 0; max-width: none; }
body.print-mode .report { grid-template-columns: 300px 1fr; gap: 16px; }
body.print-mode .rep-right { order: 0; }
body.print-mode .rep-right { padding: 28px 30px; }
body.print-mode .rep-summary { font-size: 15px; gap: 8px 20px; }
body.print-mode .rep-summary dd { font-size: 16px; }
body.print-mode .rep-name { font-size: 38px; }
body.print-mode .rep-card, body.print-mode .rep-list li, body.print-mode .questions p { break-inside: avoid; }
@media print {
  body::before, .topbar, .progress, .res-actions, .rep-answers, .rep-top-actions { display: none; }
}
