:root {
  --navy: #102a43;
  --navy-2: #163d5c;
  --ink: #14212b;
  --muted: #667987;
  --paper: #f4f1ea;
  --surface: #ffffff;
  --line: #dfe6e9;
  --gold: #d7a928;
  --teal: #0f8b8d;
  --teal-soft: #e7f5f4;
  --blue: #285cc4;
  --violet: #7047b8;
  --rose: #c83e68;
  --green: #267a55;
  --amber: #a86412;
  --red: #b34242;
  --shadow: 0 24px 70px rgba(16, 42, 67, .13);
  --phase-a: var(--blue);
  --phase-b: var(--teal);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
::selection { color: #fff; background: var(--teal); }
button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid #f5bd35;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 200;
  left: 16px;
  top: -70px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 16px; }

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(22px, calc((100vw - 1220px) / 2));
  background: rgba(255,255,255,.91);
  border-bottom: 1px solid rgba(16,42,67,.08);
  backdrop-filter: blur(18px);
}
.brand-button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.brand-mark, .cover-brand > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--navy), var(--teal));
  font-family: Georgia, serif;
  font-size: 24px;
  box-shadow: 0 9px 20px rgba(16,42,67,.2);
}
.brand-button strong, .brand-button small { display: block; }
.brand-button strong { color: var(--navy); font-size: 15px; letter-spacing: .01em; }
.brand-button small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.header-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #35a06f; box-shadow: 0 0 0 5px rgba(53,160,111,.12); }

.view { min-height: 100vh; }
.page-shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.eyebrow { color: #d3e7e9; font-size: 12px; font-weight: 900; letter-spacing: .15em; }
.eyebrow.dark { color: var(--teal); }

.landing-view {
  position: relative;
  overflow: hidden;
  padding: 144px 20px 70px;
  color: #fff;
  background:
    radial-gradient(circle at 75% 18%, rgba(15,139,141,.35), transparent 27rem),
    linear-gradient(145deg, #0b2032 0%, #123c59 60%, #0e5f67 130%);
}
.landing-view:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .26;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
.landing-inner { position: relative; z-index: 2; width: min(1120px, 100%); margin: 0 auto; text-align: center; }
.landing-inner > .eyebrow { animation: rise-in .65s ease both; }
.landing-view h1 { margin: 19px 0 20px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 6vw, 76px); font-weight: 500; line-height: 1.03; letter-spacing: -.035em; }
.landing-view h1 { animation: rise-in .75s .06s ease both; }
.landing-view h1 span { color: #6ed0cc; font-style: italic; }
.landing-lead { max-width: 760px; margin: 0 auto; color: #dce9ef; font-size: clamp(16px, 2vw, 19px); line-height: 1.7; animation: rise-in .75s .12s ease both; }
.landing-orbit { position: absolute; border: 1px solid rgba(255,255,255,.10); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 520px; height: 520px; top: -210px; left: -190px; }
.orbit-two { width: 680px; height: 680px; right: -360px; bottom: -360px; }
.math-symbol { position: absolute; z-index: 1; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; color: rgba(255,255,255,.18); background: rgba(255,255,255,.035); font-family: Georgia, serif; backdrop-filter: blur(6px); animation: float-symbol 6s ease-in-out infinite; }
.symbol-one { top: 130px; left: 5%; width: 90px; height: 58px; transform: rotate(-8deg); font-size: 26px; }
.symbol-two { top: 250px; right: 5%; width: 64px; height: 64px; transform: rotate(9deg); font-size: 32px; animation-delay: -2s; }
.symbol-three { bottom: 95px; left: 2%; width: 70px; height: 70px; transform: rotate(7deg); font-size: 36px; animation-delay: -4s; }

.phase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 46px auto 36px; }
.phase-card {
  position: relative;
  overflow: hidden;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 31px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 25px;
  color: #fff;
  background: rgba(255,255,255,.08);
  text-align: left;
  cursor: pointer;
  transition: transform .22s ease, background .22s ease, border-color .22s ease;
  backdrop-filter: blur(16px);
  animation: rise-in .7s .18s ease both;
}
.phase-card + .phase-card { animation-delay: .25s; }
.phase-card:hover { transform: translateY(-5px); background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.36); }
.phase-card:after { content: attr(data-letter); position: absolute; right: -18px; bottom: -55px; color: rgba(255,255,255,.055); font-family: Georgia, serif; font-size: 230px; line-height: 1; }
.phase-card-top { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.class-pill { padding: 7px 11px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.09); font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.phase-card-arrow { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.13); font-size: 20px; transition: transform .2s; }
.phase-card:hover .phase-card-arrow { transform: translateX(4px); }
.phase-card h2 { position: relative; z-index: 1; margin: 28px 0 8px; font-family: Georgia, serif; font-size: 35px; font-weight: 500; }
.phase-card p { position: relative; z-index: 1; max-width: 480px; margin: 0; color: #dce7ee; line-height: 1.55; }
.phase-meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 24px; }
.phase-meta span { padding: 7px 10px; border-radius: 8px; background: rgba(0,0,0,.15); color: #eaf5f6; font-size: 11px; font-weight: 800; }
.phase-card.fase-e { box-shadow: inset 0 -3px 0 rgba(65,173,208,.7); }
.phase-card.fase-f { box-shadow: inset 0 -3px 0 rgba(214,78,130,.7); }

.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 12px; }
.trust-row > div { display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; column-gap: 11px; text-align: left; }
.trust-row > div > span { grid-row: 1 / 3; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #7cd5d0; background: rgba(255,255,255,.08); font-size: 21px; }
.trust-row b { font-size: 13px; }
.trust-row small { margin-top: 2px; color: #b9ccd5; font-size: 11px; }

.setup-view { padding: 126px 0 70px; background: radial-gradient(circle at 8% 15%, rgba(15,139,141,.1), transparent 24rem), var(--paper); }
.setup-shell { max-width: 1060px; }
.text-button { padding: 9px 0; border: 0; color: var(--navy); background: transparent; font-weight: 800; cursor: pointer; }
.back-button { margin-bottom: 18px; }
.setup-card { overflow: hidden; display: grid; grid-template-columns: .92fr 1.08fr; min-height: 570px; border-radius: 30px; background: #fff; box-shadow: var(--shadow); }
.setup-visual { position: relative; overflow: hidden; padding: 50px 43px; color: #fff; background: linear-gradient(150deg, var(--phase-a), var(--phase-b)); }
.setup-visual:after { content: "π"; position: absolute; right: -20px; bottom: -90px; color: rgba(255,255,255,.09); font-family: Georgia, serif; font-size: 280px; }
.setup-phase { position: relative; z-index: 1; display: inline-flex; padding: 8px 12px; border: 1px solid rgba(255,255,255,.27); border-radius: 999px; background: rgba(255,255,255,.12); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.setup-visual h2 { position: relative; z-index: 1; margin: 25px 0 14px; font-family: Georgia, serif; font-size: 42px; font-weight: 500; line-height: 1.05; }
.setup-visual > p { position: relative; z-index: 1; color: rgba(255,255,255,.88); line-height: 1.7; }
.setup-facts { position: relative; z-index: 1; display: grid; gap: 14px; margin: 42px 0 0; }
.setup-facts div { padding: 15px 0; border-top: 1px solid rgba(255,255,255,.19); }
.setup-facts dt { color: rgba(255,255,255,.65); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.setup-facts dd { margin: 5px 0 0; font-weight: 800; line-height: 1.4; }
.identity-form { padding: 51px 52px; }
.identity-form h2 { margin: 10px 0 8px; color: var(--navy); font-family: Georgia, serif; font-size: 36px; font-weight: 500; }
.identity-form > p { margin: 0 0 25px; color: var(--muted); line-height: 1.6; }
.identity-form label { display: block; margin: 17px 0 7px; color: var(--navy); font-size: 13px; font-weight: 850; }
.identity-form label span { color: var(--red); }
.identity-form input { width: 100%; padding: 14px 15px; border: 1px solid #cbd6dc; border-radius: 12px; color: var(--ink); background: #fbfcfc; }
.identity-form input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15,139,141,.10); outline: none; }
.identity-form input[aria-invalid="true"] { border-color: var(--red); }
.field-error { min-height: 18px; margin: 5px 0 0 !important; color: var(--red) !important; font-size: 12px; }
.setup-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button { min-height: 45px; padding: 11px 17px; border: 1px solid transparent; border-radius: 11px; font-weight: 850; cursor: pointer; transition: transform .14s, box-shadow .14s, background .14s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.primary-button { color: #fff; background: linear-gradient(135deg, var(--navy), var(--teal)); box-shadow: 0 10px 22px rgba(16,42,67,.16); }
.quiet-button { border-color: #ccd7dc; color: var(--navy); background: #fff; }
.finish-button { color: #fff; background: linear-gradient(135deg, #9a6712, var(--gold)); box-shadow: 0 10px 24px rgba(168,100,18,.2); }
.form-note { margin: 22px 0 0 !important; padding: 12px 13px; border-radius: 10px; color: #6e621f !important; background: #fff9de; font-size: 12px; }

.quiz-view { padding: 106px 0 70px; background: #f5f7f6; }
.quiz-topbar { position: fixed; z-index: 40; top: 76px; left: 0; right: 0; background: rgba(245,247,246,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(15px); }
.quiz-topbar-inner { width: min(1180px, calc(100% - 36px)); height: 76px; margin: 0 auto; display: grid; grid-template-columns: 180px 1fr 44px; align-items: center; gap: 25px; }
.phase-token { width: fit-content; padding: 8px 11px; border-radius: 9px; color: var(--phase-a); background: color-mix(in srgb, var(--phase-a) 9%, white); font-size: 12px; font-weight: 900; letter-spacing: .07em; }
.progress-copy { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 800; }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #dce5e7; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--phase-a), var(--phase-b)); transition: width .25s ease; }
.icon-button { width: 42px; height: 42px; border: 1px solid #d1dbdf; border-radius: 12px; color: var(--muted); background: #fff; font-size: 24px; cursor: pointer; }
.quiz-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; padding-top: 74px; }
.question-map { position: sticky; top: 171px; max-height: calc(100vh - 195px); overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 11px 35px rgba(16,42,67,.06); }
.map-heading { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.map-heading b { color: var(--navy); }
.map-heading small { color: var(--muted); }
.map-group { margin-top: 16px; }
.map-group-name { margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.map-buttons { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.map-button { aspect-ratio: 1; border: 1px solid #d8e1e4; border-radius: 8px; color: #6a7b85; background: #fff; font-size: 11px; font-weight: 850; cursor: pointer; }
.map-button.done { border-color: color-mix(in srgb, var(--phase-a) 28%, white); color: var(--phase-a); background: color-mix(in srgb, var(--phase-a) 8%, white); }
.map-button.unknown { color: var(--amber); background: #fff5df; border-color: #ead19f; }
.map-button.current { color: #fff; background: var(--phase-a); border-color: var(--phase-a); box-shadow: 0 0 0 3px color-mix(in srgb, var(--phase-a) 15%, transparent); }
.map-legend { display: grid; gap: 7px; margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.map-legend span { display: flex; align-items: center; gap: 7px; }
.map-legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend-current { background: var(--phase-a); }
.legend-done { background: color-mix(in srgb, var(--phase-a) 20%, white); border: 1px solid var(--phase-a); }
.legend-unknown { background: #fff5df; border: 1px solid #d2a94e; }

.question-card { min-height: 650px; padding: 38px 42px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 16px 48px rgba(16,42,67,.07); }
.question-heading { display: grid; grid-template-columns: 52px 1fr; gap: 17px; align-items: start; }
.question-number { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; color: #fff; background: linear-gradient(145deg, var(--phase-a), var(--phase-b)); font-size: 19px; font-weight: 900; box-shadow: 0 10px 24px color-mix(in srgb, var(--phase-a) 21%, transparent); }
.element-label { margin: 2px 0 7px; color: var(--phase-a); font-size: 11px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.question-card h1 { margin: 0; color: var(--navy); font-family: Georgia, serif; font-size: clamp(24px, 3vw, 33px); font-weight: 500; line-height: 1.35; }
.options { display: grid; gap: 10px; margin-top: 30px; }
.option-button { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 13px; padding: 10px 15px; border: 1px solid #d4dee2; border-radius: 13px; background: #fff; text-align: left; cursor: pointer; transition: border .15s, background .15s, transform .15s; }
.option-button:hover { transform: translateX(3px); border-color: var(--phase-a); }
.option-button[aria-pressed="true"] { border-color: var(--phase-a); background: color-mix(in srgb, var(--phase-a) 6%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--phase-a) 9%, transparent); }
.option-letter { flex: 0 0 37px; display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; color: var(--navy); background: #edf2f4; font-weight: 900; }
.option-button[aria-pressed="true"] .option-letter { color: #fff; background: var(--phase-a); }
.option-copy { line-height: 1.45; }
.confidence-panel { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; padding: 13px 15px; border-radius: 12px; background: #f4f7f7; color: var(--muted); font-size: 12px; font-weight: 800; }
.confidence-buttons { display: flex; gap: 7px; }
.confidence-buttons button { padding: 7px 10px; border: 1px solid #cdd8dc; border-radius: 8px; background: #fff; color: var(--navy); font-size: 11px; font-weight: 850; cursor: pointer; }
.confidence-buttons button[aria-pressed="true"] { color: #fff; border-color: var(--teal); background: var(--teal); }
.unknown-button { margin-top: 13px; padding: 9px 12px; border: 1px dashed #c8d2d7; border-radius: 10px; color: var(--muted); background: #fbfcfc; font-size: 12px; font-weight: 800; cursor: pointer; }
.unknown-button[aria-pressed="true"] { color: #895c11; border-color: #d4ac58; background: #fff6e4; }
.question-navigation { display: flex; justify-content: space-between; gap: 10px; margin-top: 31px; padding-top: 22px; border-top: 1px solid var(--line); }
.question-navigation .finish-button { margin-left: auto; }

.results-view { padding-top: 76px; background: #e9edef; }
.results-toolbar { position: sticky; z-index: 30; top: 76px; padding: 11px 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(15px); }
.toolbar-inner { display: flex; justify-content: space-between; align-items: center; }
.toolbar-inner > div { display: flex; gap: 9px; }
.sync-badge { align-self: center; padding: 7px 10px; border-radius: 999px; color: #5f6f77; background: #eef3f4; font-size: 10px; font-weight: 850; }
.sync-badge.syncing { color: #735613; background: #fff3ce; }
.sync-badge.synced { color: #176044; background: #dff5e9; }
.sync-badge.failed { color: #8d3b3b; background: #ffe4e1; }
.report { width: min(1100px, calc(100% - 36px)); margin: 36px auto 70px; background: #fff; box-shadow: 0 24px 80px rgba(16,42,67,.15); }
.report-cover { position: relative; overflow: hidden; min-height: 560px; display: flex; flex-direction: column; padding: 48px 55px; color: #fff; background: linear-gradient(145deg, #0a2033, #164967 70%, #0f7977 130%); }
.cover-pattern { position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(circle at 70% 30%, #000, transparent 70%); }
.report-cover:after { content: "∫"; position: absolute; right: 35px; top: -100px; color: rgba(255,255,255,.055); font-family: Georgia, serif; font-size: 520px; line-height: 1; transform: rotate(11deg); }
.cover-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.cover-brand > span { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); box-shadow: none; }
.cover-brand b, .cover-brand small { display: block; }
.cover-brand b { font-size: 12px; letter-spacing: .13em; }
.cover-brand small { margin-top: 3px; color: #b9d4dc; font-size: 9px; letter-spacing: .12em; }
.cover-main { position: relative; z-index: 2; max-width: 740px; margin: auto 0; }
.cover-kicker { margin-bottom: 17px; color: #77d5cf; font-size: 12px; font-weight: 900; letter-spacing: .14em; }
.cover-main h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(44px, 6vw, 68px); font-weight: 500; line-height: .98; letter-spacing: -.025em; }
.cover-main p { max-width: 610px; margin: 20px 0 0; color: #d4e2e8; font-size: 17px; line-height: 1.65; }
.cover-identity { position: relative; z-index: 2; display: grid; grid-template-columns: 1.2fr 1.2fr .65fr .9fr .9fr; gap: 16px; padding-top: 23px; border-top: 1px solid rgba(255,255,255,.2); }
.cover-identity small, .cover-identity strong { display: block; }
.cover-identity small { margin-bottom: 5px; color: #a8c5cf; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cover-identity strong { font-size: 13px; }
.report-body { padding: 50px 55px 30px; }
.result-hero { display: grid; grid-template-columns: 210px 1fr; gap: 38px; align-items: center; padding: 30px; border: 1px solid #d9e3e5; border-radius: 24px; background: linear-gradient(145deg, #f8fbfa, #eef6f5); }
.score-ring { --score-deg: 0deg; width: 180px; height: 180px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--teal) var(--score-deg), #dce7e7 0); }
.score-ring:before { content: ""; grid-area: 1/1; width: 148px; height: 148px; border-radius: 50%; background: #fff; }
.score-ring > div { grid-area: 1/1; z-index: 1; text-align: center; }
.score-ring strong, .score-ring span { display: block; }
.score-ring strong { color: var(--navy); font-family: Georgia, serif; font-size: 48px; font-weight: 500; line-height: 1; }
.score-ring span { margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.result-intro h2 { margin: 9px 0 8px; color: var(--navy); font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.result-intro > p { margin: 0; color: var(--muted); line-height: 1.65; }
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 20px; }
.metric-row > div { padding: 12px; border-left: 2px solid #c8d9d9; }
.metric-row strong, .metric-row span { display: block; }
.metric-row strong { color: var(--navy); font-size: 20px; }
.metric-row span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.report-section { margin-top: 52px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.section-heading > div { display: flex; align-items: center; gap: 14px; }
.section-heading > div > span { color: #c1cdd1; font-family: Georgia, serif; font-size: 35px; }
.section-heading small { color: var(--teal); font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.section-heading h2 { margin: 2px 0 0; color: var(--navy); font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.section-heading > p { max-width: 420px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: right; }
.element-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.element-result { padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.element-result-head { display: flex; justify-content: space-between; gap: 15px; }
.element-result h3 { margin: 0; color: var(--navy); font-size: 16px; }
.element-result-head strong { color: var(--teal); font-size: 19px; }
.element-result-meta { margin-top: 4px; color: var(--muted); font-size: 10px; }
.element-bar { height: 8px; overflow: hidden; margin: 14px 0; border-radius: 999px; background: #e3ebed; }
.element-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--navy), var(--teal)); }
.level-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .05em; }
.level-good { color: #176044; background: #dff5e9; }
.level-mid { color: #805311; background: #fff1cf; }
.level-low { color: #903636; background: #ffe2df; }
.level-insufficient { color: #596771; background: #e9eef0; }
.element-result p { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.concept-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.concept-tag { padding: 5px 7px; border-radius: 7px; color: #88465a; background: #fff0f4; font-size: 9px; font-weight: 800; }
.mastery-matrix { display: grid; gap: 14px; }
.mastery-row { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; break-inside: avoid; }
.mastery-row-title { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 14px 18px; color: #fff; background: linear-gradient(115deg, var(--navy), #245b70); }
.mastery-row-title h3 { margin: 0; font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.mastery-row-title span { font-size: 10px; font-weight: 850; opacity: .78; }
.mastery-columns { display: grid; grid-template-columns: 1fr 1fr; }
.mastery-column { padding: 17px 18px; }
.mastery-column + .mastery-column { border-left: 1px solid var(--line); }
.mastery-column h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 11px; color: var(--navy); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.mastery-column h4 i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(38,122,85,.10); }
.mastery-column.needs-work h4 i { background: var(--red); box-shadow: 0 0 0 4px rgba(179,66,66,.10); }
.mastery-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.mastery-list li { padding: 10px 11px; border-radius: 10px; color: #53656e; background: #f5f8f8; font-size: 10px; line-height: 1.55; }
.mastery-list li strong { display: block; margin-bottom: 2px; color: var(--navy); font-size: 11px; }
.mastery-list li.error-evidence { background: #fff4f3; }
.mastery-list li.error-evidence strong { color: #943d3d; }
.mastery-empty { color: var(--muted); font-size: 10px; font-style: italic; }
.profile-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 15px; }
.narrative-card, .priority-card { padding: 23px; border-radius: 18px; }
.narrative-card { color: #dce8ed; background: linear-gradient(145deg, var(--navy), var(--navy-2)); line-height: 1.7; }
.narrative-card h3 { margin: 0 0 11px; color: #fff; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.narrative-card p { margin: 0; font-size: 12px; }
.narrative-card p + p { margin-top: 11px; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.13); }
.narrative-card b { color: #78d3cc; }
.priority-card { border: 1px solid #e7d6ae; background: #fffaf0; }
.priority-card h3 { margin: 0; color: #6f4c13; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.priority-card ol { margin: 14px 0 0; padding-left: 20px; }
.priority-card li { margin: 9px 0; color: #6b604d; font-size: 11px; line-height: 1.5; }
.confidence-insight { margin-top: 14px; padding: 17px 19px; border-left: 4px solid var(--teal); border-radius: 8px; color: #40545e; background: var(--teal-soft); font-size: 11px; line-height: 1.6; }
.review-list { display: grid; gap: 11px; }
.review-item { break-inside: avoid; border: 1px solid var(--line); border-left: 5px solid #bfcbd0; border-radius: 13px; background: #fff; }
.review-item.correct { border-left-color: #3a9a70; }
.review-item.wrong { border-left-color: #ca5151; }
.review-item.unknown, .review-item.empty { border-left-color: #d09a32; }
.review-summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; padding: 16px; cursor: pointer; }
.review-summary::-webkit-details-marker { display: none; }
.review-title { color: var(--navy); font-size: 12px; line-height: 1.5; }
.review-status { padding: 5px 8px; border-radius: 999px; color: #586a73; background: #edf2f3; font-size: 9px; font-weight: 900; white-space: nowrap; }
.review-body { padding: 0 16px 17px; }
.diagnosis-box { padding: 13px; border-radius: 10px; background: #f5f8f8; color: #53656e; font-size: 11px; line-height: 1.65; }
.diagnosis-box b { color: var(--navy); }
.option-analysis { margin: 13px 0 0; padding: 12px 12px 1px 30px; border-top: 1px dashed #cbd6da; color: #5c6f78; font-size: 10px; line-height: 1.5; }
.option-analysis li { margin-bottom: 8px; }
.option-analysis .answer-key { color: var(--green); font-weight: 800; }
.report-footer { margin-top: 45px; padding: 20px 22px; border-top: 1px solid var(--line); color: var(--muted); background: #f7f9f9; font-size: 10px; line-height: 1.6; }
.report-footer p { margin: 4px 0 0; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(7,25,38,.58); backdrop-filter: blur(5px); }
.modal { width: min(470px, 100%); padding: 30px; border-radius: 22px; background: #fff; box-shadow: 0 28px 90px rgba(0,0,0,.25); text-align: center; }
.modal-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto; border-radius: 50%; color: #8c5a0a; background: #fff1c9; font-weight: 900; }
.modal h2 { margin: 15px 0 8px; color: var(--navy); font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.modal p { margin: 0; color: var(--muted); line-height: 1.6; }
.modal-actions { display: flex; justify-content: center; gap: 9px; margin-top: 22px; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 22px; transform: translate(-50%, 20px); max-width: calc(100% - 30px); padding: 11px 15px; border-radius: 10px; color: #fff; background: var(--navy); box-shadow: var(--shadow); font-size: 12px; font-weight: 750; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float-symbol {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@media (max-width: 900px) {
  .phase-grid, .setup-card, .result-hero, .profile-grid { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .setup-visual { min-height: 420px; }
  .quiz-shell { grid-template-columns: 1fr; padding-top: 80px; }
  .question-map { position: static; max-height: none; }
  .quiz-topbar-inner { grid-template-columns: auto 1fr 42px; gap: 12px; }
  .result-hero { text-align: center; }
  .score-ring { margin: auto; }
  .element-results { grid-template-columns: 1fr; }
  .cover-identity { grid-template-columns: repeat(2, 1fr); }
  .mastery-columns { grid-template-columns: 1fr; }
  .mastery-column + .mastery-column { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .site-header { height: 67px; padding: 0 13px; }
  .brand-mark { width: 37px; height: 37px; }
  .brand-button small, .header-status { display: none; }
  .landing-view { padding: 115px 10px 50px; }
  .landing-view h1 br { display: none; }
  .phase-grid { grid-template-columns: 1fr; margin-top: 33px; }
  .phase-card { min-height: 255px; padding: 24px; }
  .phase-card h2 { font-size: 31px; }
  .setup-view { padding-top: 95px; }
  .page-shell { width: min(100% - 20px, 1180px); }
  .setup-visual, .identity-form { padding: 32px 24px; }
  .setup-visual h2 { font-size: 35px; }
  .quiz-view { padding-top: 90px; }
  .quiz-topbar { top: 67px; }
  .quiz-topbar-inner { height: 68px; width: calc(100% - 20px); }
  .phase-token { max-width: 94px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .quiz-shell { padding-top: 60px; }
  .question-map { padding: 15px; }
  .map-buttons { grid-template-columns: repeat(7, 1fr); }
  .question-card { min-height: 0; padding: 25px 18px; }
  .question-heading { grid-template-columns: 43px 1fr; gap: 11px; }
  .question-number { width: 43px; height: 43px; border-radius: 12px; }
  .question-card h1 { font-size: 23px; }
  .confidence-panel { align-items: flex-start; }
  .question-navigation { flex-wrap: wrap; }
  .question-navigation .finish-button { width: 100%; margin-left: 0; }
  .results-view { padding-top: 67px; }
  .results-toolbar { top: 67px; }
  .toolbar-inner { gap: 10px; }
  .toolbar-inner .text-button { font-size: 11px; }
  .toolbar-inner .button { min-height: 40px; padding: 8px 10px; font-size: 11px; }
  .report { width: 100%; margin: 0; }
  .report-cover { min-height: 620px; padding: 36px 24px; }
  .cover-main h1 { font-size: 46px; }
  .cover-identity { grid-template-columns: 1fr 1fr; }
  .report-body { padding: 30px 18px; }
  .result-hero { padding: 24px 15px; }
  .metric-row { grid-template-columns: repeat(2, 1fr); text-align: left; }
  .section-heading { align-items: flex-start; }
  .section-heading > p { display: none; }
  .review-summary { grid-template-columns: 1fr; gap: 8px; }
  .review-status { width: fit-content; }
  .modal-actions { flex-direction: column; }
}

@page { size: A4; margin: 12mm; }
@media print {
  :root { --paper: #fff; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body { background: #fff; }
  .no-print, .site-header, .toast, .modal-backdrop { display: none !important; }
  .results-view { display: block !important; min-height: 0; padding: 0; background: #fff; }
  .report { width: 100%; margin: 0; box-shadow: none; }
  .report-cover { height: 273mm; min-height: 0; padding: 20mm 16mm; break-after: page; }
  .cover-main h1 { font-size: 53px; }
  .cover-identity { grid-template-columns: 1.2fr 1.2fr .65fr .9fr .9fr; }
  .report-body { padding: 0; }
  .result-hero { margin: 0 0 9mm; padding: 8mm; break-inside: avoid; }
  .score-ring { width: 150px; height: 150px; }
  .score-ring:before { width: 124px; height: 124px; }
  .score-ring strong { font-size: 40px; }
  .report-section { margin-top: 9mm; }
  .element-result, .mastery-row, .profile-grid, .confidence-insight, .review-item, .report-footer { break-inside: avoid; }
  .question-analysis-section { break-before: page; }
  .review-item { margin-bottom: 3mm; }
  .review-item > .review-body { display: block !important; }
  .review-summary { padding: 4mm; }
  .review-body { padding: 0 4mm 4mm; }
  .section-heading h2 { font-size: 24px; }
  .report-footer { margin-top: 8mm; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
