:root {
  --deep-navy: #0B1E3D;
  --navy: #244A70;
  --brand-blue: #334E7C;
  --blue: #4F7FA3;
  --mist: #D9E5F2;
  --sky: #B9D9F4;
  --milk: #F7F4EC;
  --gold: #C8A15A;
  --warm-light: #F4E7D6;
  --copper: #B96F50;
  --ink: #31475e;
  --muted: #64778a;
  --line: rgba(51, 78, 124, 0.22);
  --paper: rgba(255, 255, 255, 0.82);
  --radius-lg: 30px;
  --radius-md: 18px;
  --shadow: 0 24px 70px rgba(11, 30, 61, 0.13);
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--mist); }
body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(185, 217, 244, 0.78), transparent 32rem),
    radial-gradient(circle at 92% 18%, rgba(244, 231, 214, 0.82), transparent 30rem),
    linear-gradient(145deg, #eaf2f7, var(--milk) 58%, #f5eadc);
  overflow-x: hidden;
}

button, a { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.app-shell { width: min(1120px, 100%); min-height: 100dvh; margin: 0 auto; padding: 28px; }
.screen { min-height: calc(100dvh - 56px); }
.intro-screen { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr); grid-template-areas: "copy art" "intro art"; align-content: center; column-gap: 68px; row-gap: 22px; }
.intro-copy { grid-area: copy; max-width: 650px; align-self: end; }
.intro-text { grid-area: intro; align-self: start; }
.kicker { margin: 0 0 12px; color: var(--blue); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
h1, h2 { color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -0.025em; }
.intro-copy h1 { max-width: 720px; margin: 0; font-size: clamp(3.2rem, 7vw, 6.8rem); line-height: 0.94; }
.subtitle { margin: 20px 0 34px; color: var(--blue); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.35rem, 3vw, 2.15rem); }
.intro-text { max-width: 62ch; color: #4f5f75; font-size: 1.05rem; line-height: 1.68; }
.intro-text p:last-child { font-weight: 600; color: var(--navy); }
.button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 14px; padding: 13px 22px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--blue); color: white; box-shadow: 0 13px 28px rgba(79, 127, 163, 0.25); }
.button-primary:hover { background: #426F92; box-shadow: 0 15px 30px rgba(79, 127, 163, 0.3); }
.button-secondary { border-color: var(--blue); background: transparent; color: var(--navy); }
.intro-copy > .button { margin: 0; min-width: 190px; }
.hero-art { grid-area: art; min-height: 610px; display: grid; place-items: center; border: 1px solid rgba(79, 127, 163, 0.2); border-radius: 46% 54% 45% 55% / 44% 38% 62% 56%; background: var(--mist); box-shadow: var(--shadow); overflow: hidden; }
.hero-art img { width: 100%; height: 100%; min-height: 610px; display: block; object-fit: cover; object-position: center; }

.quiz-screen { width: min(760px, 100%); margin: 0 auto; padding: 12px 0 42px; transition: opacity 280ms ease, transform 280ms ease; }
.quiz-screen.is-moving-up { opacity: 0; transform: translateY(-38px); }
.quiz-screen.is-entering-from-below { opacity: 0; transform: translateY(38px); }
.quiz-header { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px; }
.progress-label { margin: 0; color: var(--blue); font-size: 0.82rem; font-weight: 700; }
.progress-track { height: 4px; overflow: hidden; border-radius: 99px; background: rgba(51, 78, 124, 0.14); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width 360ms ease; }

.choice-scale { position: relative; width: min(540px, 92vw); height: 250px; margin: 18px auto 0; }
.scale-beam { position: absolute; top: 84px; left: 50%; width: 82%; height: 80px; transform: translateX(-50%) rotate(0); transform-origin: center 12px; transition: transform 900ms cubic-bezier(0.2, 0.75, 0.2, 1); }
.beam-line { position: absolute; top: 10px; left: 0; width: 100%; height: 6px; border-radius: 99px; background: var(--deep-navy); box-shadow: 0 3px 0 rgba(255,255,255,.55); }
.scale-pivot { position: absolute; top: 0; left: 50%; z-index: 3; width: 26px; height: 26px; border: 6px solid var(--deep-navy); border-radius: 50%; transform: translateX(-50%); background: var(--gold); }
.scale-pan { position: absolute; top: 17px; width: 168px; height: 74px; border: 3px solid var(--blue); border-top: 0; border-radius: 0 0 90px 90px; background: rgba(247, 244, 236, 0.72); color: var(--navy); text-align: center; transition: transform 900ms cubic-bezier(0.2, 0.75, 0.2, 1); }
.scale-pan::before, .scale-pan::after { position: absolute; top: -65px; width: 2px; height: 70px; background: var(--blue); content: ""; }
.scale-pan::before { left: 25px; transform: rotate(23deg); transform-origin: bottom; }
.scale-pan::after { right: 25px; transform: rotate(-23deg); transform-origin: bottom; }
.scale-pan span { position: absolute; inset: auto 0 15px; font-family: Georgia, "Times New Roman", serif; }
.pan-self { left: -48px; }
.pan-others { right: -48px; }
.scale-column { position: absolute; top: 102px; left: 50%; width: 9px; height: 102px; transform: translateX(-50%); border-radius: 99px; background: var(--deep-navy); }
.scale-base { position: absolute; top: 198px; left: 50%; width: 148px; height: 13px; transform: translateX(-50%); border-radius: 50%; background: var(--deep-navy); }
.weights { position: absolute; z-index: 8; top: -8px; left: 50%; width: 96px; height: 112px; transform: translateX(-50%); pointer-events: none; transition: left 800ms ease, top 800ms ease; }
.scale-weight { position: absolute; top: 44px; left: 29px; width: 38px; height: 42px; display: grid; place-items: center; border: 3px solid var(--deep-navy); border-radius: 10px 10px 6px 6px; background: var(--copper); color: white; box-shadow: 0 8px 18px rgba(185,111,80,.32); font-size: 0; font-weight: 800; opacity: 1; transition: opacity 260ms ease; }
.scale-weight::before { position: absolute; top: -10px; left: 10px; width: 12px; height: 10px; border: 3px solid var(--deep-navy); border-bottom: 0; border-radius: 7px 7px 0 0; content: ""; }
.scale-weight.is-dropping { animation: weight-drop 620ms cubic-bezier(.18,.78,.25,1) both; }
.scale-weight.is-hidden-weight { opacity: 0; }
.choice-scale.is-wobbling .scale-beam { animation: neutral-wobble 620ms ease-in-out; }
.choice-scale.is-wobbling .scale-pivot { box-shadow: 0 0 0 9px rgba(200,161,90,.2); }
.choice-scale.is-revealed .scale-weight { left: calc(1px + var(--weight-index) * 8px); top: calc(45px + (var(--weight-index) % 2) * 6px); transform: scale(.78); }
.choice-scale.is-revealed[data-tilt^="toward-self"] .weights { left: 26%; top: 48px; }
.choice-scale.is-revealed[data-tilt^="toward-others"] .weights { left: 74%; top: 48px; }
.choice-scale.is-revealed[data-tilt="balanced"] .weights { left: 50%; top: 35px; }
.choice-scale[data-tilt="toward-self-strong"] .scale-beam { transform: translateX(-50%) rotate(-8deg); }
.choice-scale[data-tilt="toward-self"] .scale-beam { transform: translateX(-50%) rotate(-4deg); }
.choice-scale[data-tilt="balanced"] .scale-beam { transform: translateX(-50%) rotate(0deg); }
.choice-scale[data-tilt="toward-others"] .scale-beam { transform: translateX(-50%) rotate(5deg); }
.choice-scale[data-tilt="toward-others-strong"] .scale-beam { transform: translateX(-50%) rotate(9deg); }
.scale-status { margin: -20px 0 22px; color: var(--muted); font-size: 0.86rem; text-align: center; }

.question-card, .result-card, .practice, .next-step, .continuation { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.question-card { padding: clamp(22px, 5vw, 42px); }
.question-card h2 { margin: 0; font-size: clamp(1.65rem, 4vw, 2.45rem); line-height: 1.18; }
.answer-hint { margin: 14px 0 22px; color: var(--muted); }
.answers { display: grid; gap: 11px; }
.answer { width: 100%; display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; background: rgba(255,255,255,.84); text-align: left; line-height: 1.45; cursor: pointer; transition: border-color 150ms ease, transform 150ms ease, background 150ms ease; }
.answer:hover:not(:disabled) { border-color: var(--blue); transform: translateY(-1px); }
.answer.is-selected { border-color: var(--blue); background: var(--mist); }
.answer-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: white; font-weight: 800; }
.answer:disabled { cursor: default; opacity: 0.72; }
.answer.is-selected:disabled { opacity: 1; }

.result-screen { width: min(850px, 100%); margin: 0 auto; padding: 22px 0 70px; transition: opacity 360ms ease, transform 360ms ease; }
.result-screen.is-entering-from-below { opacity: 0; transform: translateY(38px); }
.result-scale-wrap { text-align: center; }
.result-scale-wrap #choice-scale { margin-top: 0; }
.result-scale-caption { max-width: 560px; margin: -18px auto 26px; color: var(--blue); font-family: Georgia, "Times New Roman", serif; font-size: 1.12rem; line-height: 1.45; }
.result-scale-wrap::after { display: block; width: 72px; height: 2px; margin: 18px auto 30px; background: var(--gold); content: ""; }
.result-card, .practice, .next-step, .continuation { padding: clamp(24px, 6vw, 54px); }
.result-score { display: inline-flex; margin: 0 0 18px; border-radius: 999px; padding: 8px 14px; background: var(--blue); color: white; font-size: 1rem; font-weight: 800; letter-spacing: .04em; }
.result-card h1 { margin: 0 0 28px; font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.04; }
.result-copy, .practice { font-size: 1.02rem; line-height: 1.7; }
.result-copy p, .practice p { max-width: 68ch; }
.result-copy strong { color: var(--navy); font-weight: 800; background: linear-gradient(transparent 62%, rgba(185,217,244,.72) 62%); }
.disclaimer { margin: 34px 0 0; border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); font-size: 0.87rem; line-height: 1.5; }
.result-utilities { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; margin: 18px 0 0; }
.result-utilities .button { width: 100%; }
.result-utility-notice { margin: 12px 4px 0; }
.result-scroll-cue { position: fixed; z-index: 20; right: max(16px, calc((100vw - 850px) / 2 + 18px)); bottom: 18px; max-width: min(390px, calc(100vw - 32px)); display: flex; align-items: center; gap: 14px; border: 1px solid rgba(79, 127, 163, 0.35); border-radius: 18px; padding: 13px 16px; background: rgba(247, 244, 236, 0.96); color: var(--navy); box-shadow: 0 14px 38px rgba(36, 74, 112, 0.2); font-weight: 700; text-align: left; cursor: pointer; backdrop-filter: blur(12px); }
.result-scroll-cue:hover { background: white; }
.scroll-arrow { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: white; font-size: 1.15rem; animation: cue-bounce 1.5s ease-in-out infinite; }
.practice { margin-top: 22px; background: linear-gradient(145deg, rgba(217,229,242,.9), rgba(247,244,236,.95)); }
.next-step { margin-top: 22px; background: var(--paper); }
.next-step p { max-width: 68ch; font-size: 1.02rem; line-height: 1.7; }
.next-step p:nth-of-type(3), .next-step p:nth-of-type(4) { color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 1.22rem; }
.practice h2, .next-step h2, .continuation h2 { margin: 0 0 24px; font-size: clamp(1.7rem, 4vw, 2.65rem); }
.practice ul, .practice ol { padding-left: 1.3rem; }
.practice li { margin: 8px 0; padding-left: 5px; }
.practice blockquote { margin: 24px 0; border-left: 4px solid var(--gold); padding: 13px 0 13px 22px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; line-height: 1.45; }
.practice-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 !important; list-style: none; }
.practice-columns li { border-top: 3px solid var(--blue); padding: 16px 4px 0; }
.practice-columns strong { display: block; margin-bottom: 7px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; }
.continuation { margin-top: 22px; }
.result-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cta-notice { margin: 14px 0 0; color: var(--blue); font-size: 0.9rem; }

button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

@keyframes weight-drop { from { opacity: 0; transform: translateY(-64px) scale(.82); } 72% { transform: translateY(4px) scale(1.05); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes neutral-wobble { 0%,100% { transform: translateX(-50%) rotate(0); } 25% { transform: translateX(-50%) rotate(-3deg); } 55% { transform: translateX(-50%) rotate(3deg); } 78% { transform: translateX(-50%) rotate(-1deg); } }
@keyframes cue-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

@media (max-width: 820px) {
  .app-shell { padding: 18px; }
  .screen { min-height: calc(100dvh - 36px); }
  .intro-screen { grid-template-columns: 1fr; grid-template-areas: "copy" "art" "intro"; gap: 30px; padding: 28px 0; }
  .intro-copy h1 { font-size: clamp(2.85rem, 13vw, 4.5rem); }
  .hero-art { min-height: 330px; border-radius: 32% 68% 55% 45% / 48% 43% 57% 52%; }
  .hero-art img { min-height: 330px; }
  .quiz-header { grid-template-columns: 1fr; gap: 9px; }
  .choice-scale { transform: scale(.88); margin-top: 6px; margin-bottom: -10px; }
  .question-card { border-radius: 24px; }
  .practice-columns, .result-actions, .result-utilities { grid-template-columns: 1fr; }
  .result-actions .button { width: 100%; }
  .result-scroll-cue { right: 12px; bottom: 12px; left: 12px; max-width: none; }
}

@media (max-width: 480px) {
  .app-shell { padding: 12px; }
  .hero-art { width: min(330px, 100%); aspect-ratio: 1; min-height: 0; height: auto; margin-inline: auto; border-radius: 50%; }
  .hero-art img { min-height: 0; height: 100%; }
  .choice-scale { width: 108%; margin-left: -4%; transform: scale(.76); margin-top: -8px; margin-bottom: -25px; }
  .scale-pan { width: 145px; }
  .pan-self { left: -28px; }
  .pan-others { right: -28px; }
  .answer { grid-template-columns: 34px 1fr; padding: 12px; font-size: .94rem; }
  .answer-number { width: 31px; height: 31px; }
}

@media (max-width: 480px) and (max-height: 780px) {
  .intro-screen { gap: 18px; padding: 16px 0 28px; }
  .intro-copy h1 { font-size: clamp(2.55rem, 12vw, 3.8rem); }
  .subtitle { margin: 14px 0 22px; }
  .hero-art { width: 230px; }
  .hero-art, .hero-art img { min-height: 0; height: 230px; }
}

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