:root {
  --ink: #102b46;
  --ink-soft: #29445b;
  --mint: #a6e3c1;
  --mint-deep: #3f8769;
  --coral: #f67e6b;
  --cream: #f7f4ed;
  --paper: #fffdf9;
  --line: #d9e1df;
  --muted: #647885;
  --danger: #c7514e;
  --shadow: 0 18px 45px rgba(16, 43, 70, 0.1);
}

* { box-sizing: border-box; }
html { background: var(--cream); }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: "DM Sans", Arial, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, .78fr) minmax(0, 1.82fr); }
.context-panel { position: relative; display: flex; min-height: 100%; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 34px clamp(28px, 4vw, 64px) 30px; color: var(--paper); background: var(--ink); }
.context-panel::before { position: absolute; content: ""; inset: auto -90px 60px auto; width: 250px; height: 250px; border: 1px solid rgba(166, 227, 193, .35); border-radius: 50%; box-shadow: 0 0 0 28px rgba(166, 227, 193, .04), 0 0 0 58px rgba(166, 227, 193, .03); }
.panel-top, .context-copy, .panel-foot { position: relative; z-index: 1; }
.brand-logo { width: min(230px, 100%); aspect-ratio: 1; height: auto; display: block; object-fit: contain; }
.context-copy { max-width: 390px; padding: clamp(42px, 7vh, 88px) 0 25px; }
.progress-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; color: var(--mint); border: 1px solid rgba(166, 227, 193, .32); border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; }
.progress-pill i { width: 19px; height: 1px; background: rgba(166, 227, 193, .58); }
.progress-pill b { color: rgba(255, 255, 255, .62); font-weight: 700; }
.progress-pill em { padding-left: 4px; color: rgba(255, 255, 255, .77); font-style: normal; font-weight: 500; letter-spacing: .02em; }
.eyebrow, .section-kicker { margin: 24px 0 12px; color: var(--mint); font-size: .71rem; font-weight: 700; letter-spacing: .14em; }
.context-panel h1, .stage h2 { font-family: "Fraunces", Georgia, serif; font-weight: 700; letter-spacing: -.035em; }
.context-panel h1 { max-width: 395px; margin: 0; font-size: clamp(2rem, 3.2vw, 3.45rem); line-height: 1.04; }
.context-text { max-width: 350px; margin: 22px 0 0; color: rgba(255, 255, 255, .72); font-size: 1rem; line-height: 1.6; }
.panel-foot { display: flex; align-items: end; justify-content: space-between; color: rgba(255, 255, 255, .66); font-size: .83rem; line-height: 1.55; }
.panel-foot p { margin: 0; }
.panel-foot strong { color: var(--paper); font-size: 1rem; }
.dot-grid { width: 54px; height: 54px; background-image: radial-gradient(circle, var(--mint) 1.4px, transparent 1.7px); background-size: 11px 11px; opacity: .72; }

.stage { padding: 36px clamp(28px, 7.5vw, 124px) 52px; background: var(--paper); }
.registration-stage { display: flex; min-height: 100vh; flex-direction: column; }
.stage-topline { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .12em; }
.form-wrap { width: min(100%, 540px); margin: auto 0; padding: 52px 0; }
.section-kicker { margin: 0 0 16px; color: var(--mint-deep); }
.stage h2 { max-width: 720px; margin: 0; font-size: clamp(2.05rem, 4vw, 4.2rem); line-height: 1.02; }
.intro-copy { max-width: 500px; margin: 20px 0 34px; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.field-group { display: flex; flex-direction: column; gap: 9px; margin-top: 20px; }
.field-group label { font-size: .84rem; font-weight: 700; }
.field-group input { width: 100%; padding: 15px 16px; color: var(--ink); border: 1px solid #bfd0d1; border-radius: 10px; background: #fff; transition: border .2s, box-shadow .2s; }
.field-group input::placeholder { color: #92a0a6; }
.field-group input:hover { border-color: var(--ink-soft); }
.field-group input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(166, 227, 193, .55); outline: none; }
.form-status { min-height: 1.35rem; margin: 14px 0 0; color: var(--danger); font-size: .87rem; font-weight: 600; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 26px; min-height: 52px; padding: 13px 20px; border-radius: 10px; font-size: .93rem; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.primary-button { min-width: 215px; margin-top: 18px; color: var(--ink); border: 1px solid var(--mint); background: var(--mint); box-shadow: 0 8px 0 #76b897; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 10px 0 #76b897; }
.primary-button:active { transform: translateY(5px); box-shadow: 0 3px 0 #76b897; }
.secondary-button { color: var(--ink); border: 1px solid #bccbca; background: transparent; }
.secondary-button:hover { border-color: var(--ink); background: #f2f7f5; }
.supporting-note { margin: 0; color: var(--muted); font-size: .8rem; }

.quiz-stage { min-height: 100vh; }
.case-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 28px; }
.case-header .section-kicker { margin-bottom: 13px; }
.case-header h2 { font-size: clamp(2rem, 3.7vw, 3.6rem); }
.text-button { padding: 7px 0; color: var(--ink-soft); border: 0; border-bottom: 1px solid currentColor; background: transparent; font-size: .83rem; font-weight: 700; }
.text-button:hover { color: var(--coral); }
.case-card { position: relative; display: flex; gap: 18px; padding: 24px 26px; border-left: 4px solid var(--coral); border-radius: 2px 12px 12px 2px; background: #fff3ee; }
.case-card p { max-width: 820px; margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.67; }
.case-number { display: grid; flex: 0 0 auto; width: 28px; height: 28px; place-items: center; color: var(--paper); border-radius: 50%; background: var(--coral); font-size: .69rem; font-weight: 700; }
.instruction-row { display: flex; align-items: center; gap: 11px; margin: 28px 0 17px; }
.instruction-row p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.instruction-icon { display: grid; width: 23px; height: 23px; place-items: center; color: var(--ink); border-radius: 50%; background: var(--mint); font-weight: 800; }
.option-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0; border: 0; }
.option-card { display: flex; min-height: 66px; align-items: center; gap: 12px; padding: 14px 15px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; transition: transform .16s ease, border-color .16s, background .16s, box-shadow .16s; }
.option-card:hover { transform: translateY(-1px); border-color: #7aa999; box-shadow: 0 7px 16px rgba(16, 43, 70, .06); }
.option-card.is-selected { color: var(--ink); border-color: var(--mint-deep); background: #effaf3; box-shadow: inset 0 0 0 1px var(--mint); }
.option-card:has(input:focus-visible) { outline: 3px solid var(--coral); outline-offset: 3px; }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.fake-checkbox { display: grid; flex: 0 0 20px; width: 20px; height: 20px; place-items: center; border: 1.5px solid #9aaeb2; border-radius: 6px; background: var(--paper); }
.option-card.is-selected .fake-checkbox { border-color: var(--mint-deep); background: var(--mint-deep); }
.option-card.is-selected .fake-checkbox::before { content: "✓"; color: white; font-size: .78rem; font-weight: 800; }
.option-label { font-size: .88rem; font-weight: 600; line-height: 1.32; }
.selection-help { margin: 13px 0 0; color: var(--muted); font-size: .78rem; }
.quiz-status { margin-top: 8px; }
.quiz-actions { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.quiz-actions p { margin: 0; color: var(--muted); font-size: .82rem; }
.quiz-actions p span { color: var(--coral); }
.quiz-actions .primary-button { margin: 0; }
.participant-chip { display: flex; align-items: center; gap: 11px; margin-top: 28px; padding: 11px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; background: rgba(255, 255, 255, .06); }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; color: var(--ink); border-radius: 50%; background: var(--mint); font-size: .85rem; font-weight: 800; }
.participant-chip small, .verdict small { display: block; color: rgba(255, 255, 255, .58); font-size: .62rem; font-weight: 700; letter-spacing: .1em; }
.participant-chip strong { display: block; max-width: 200px; overflow: hidden; color: var(--paper); font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.quiz-foot { align-items: center; }
.quiz-foot strong { color: var(--mint); font-size: 1.35rem; }

.result-stage { min-height: 100vh; }
.result-intro { padding: clamp(38px, 7vh, 80px) 0 27px; }
.result-intro h2 { font-size: clamp(2rem, 3.7vw, 3.65rem); }
.result-mark { display: grid; width: 72px; height: 72px; place-items: center; margin: 24px 0 16px; color: var(--ink); border-radius: 50%; background: var(--mint); font-size: 2.4rem; font-weight: 800; }
.result-context.is-review .result-mark { color: var(--paper); background: var(--coral); }
.result-score { gap: 12px; justify-content: flex-start; }
.result-score strong { color: var(--mint); font-family: "Fraunces", Georgia, serif; font-size: 2.35rem; line-height: 1; }
.verdict { display: flex; align-items: center; gap: 14px; padding: 17px 19px; border-radius: 12px; }
.verdict.success { border: 1px solid #9edbbb; background: #ebf9ef; }
.verdict.review { border: 1px solid #fac1b7; background: #fff0ec; }
.verdict > span { display: grid; width: 34px; height: 34px; place-items: center; color: var(--paper); border-radius: 50%; background: var(--mint-deep); font-weight: 800; }
.verdict.review > span { background: var(--coral); }
.verdict small { color: var(--muted); }
.verdict strong { color: var(--ink); font-size: .94rem; }
.feedback-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.feedback-card { min-height: 204px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.feedback-card.correct { border-top: 4px solid var(--mint-deep); }
.feedback-card.missed { border-top: 4px solid var(--coral); }
.feedback-card.incorrect { border-top: 4px solid #bf8b6b; }
.feedback-heading { display: flex; gap: 10px; align-items: center; }
.feedback-heading > span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; font-size: .83rem; font-weight: 800; }
.correct .feedback-heading > span { color: white; background: var(--mint-deep); }
.missed .feedback-heading > span { color: white; background: var(--coral); }
.incorrect .feedback-heading > span { color: white; background: #bf8b6b; }
.feedback-heading small { color: var(--muted); font-size: .61rem; font-weight: 700; letter-spacing: .1em; }
.feedback-heading h3 { margin: 3px 0 0; color: var(--ink); font-size: .88rem; }
.feedback-list { margin: 17px 0 0; padding: 0; list-style: none; }
.feedback-list li { position: relative; padding: 8px 0 8px 16px; color: var(--ink-soft); border-bottom: 1px solid #edf1ef; font-size: .8rem; line-height: 1.35; }
.feedback-list li::before { position: absolute; left: 0; content: "•"; font-weight: 800; }
.feedback-list.correct li::before { color: var(--mint-deep); }
.feedback-list.missed li::before { color: var(--coral); }
.feedback-list.incorrect li::before { color: #bf8b6b; }
.empty-feedback { margin: 20px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.answer-key { display: flex; align-items: baseline; gap: 17px; padding: 14px 0; border-top: 1px dashed #9fb3b1; border-bottom: 1px dashed #9fb3b1; }
.answer-key span { flex: 0 0 auto; color: var(--mint-deep); font-size: .67rem; font-weight: 800; letter-spacing: .1em; }
.answer-key p { margin: 0; color: var(--ink-soft); font-size: .84rem; line-height: 1.5; }
.promo-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 17px 20px; color: var(--paper); border: 1px solid #234b69; border-radius: 12px; background: var(--ink); }
.promo-banner > span { flex: 0 0 auto; color: var(--mint); font-size: .65rem; font-weight: 800; letter-spacing: .11em; }
.promo-banner p { margin: 0; font-size: .9rem; line-height: 1.45; }
.promo-banner strong { color: var(--mint); }
.result-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }
.result-actions .primary-button { margin: 0; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: minmax(245px, .65fr) minmax(0, 1.45fr); }
  .context-panel { padding: 27px 25px; }
  .stage { padding: 30px 38px 45px; }
  .feedback-grid { grid-template-columns: 1fr; }
  .feedback-card { min-height: auto; }
}

@media (max-width: 700px) {
  .app-shell { display: block; }
  .context-panel { min-height: auto; padding: 20px 22px 24px; }
  .context-panel::before { width: 160px; height: 160px; bottom: -50px; right: -42px; }
  .brand-logo { width: 154px; }
  .context-copy { max-width: 500px; padding: 30px 0 5px; }
  .context-panel h1 { max-width: 480px; font-size: 2rem; }
  .context-text { margin-top: 12px; font-size: .9rem; }
  .panel-foot { display: none; }
  .stage, .registration-stage, .quiz-stage, .result-stage { min-height: auto; padding: 26px 21px 34px; }
  .registration-stage { min-height: calc(100vh - 268px); }
  .form-wrap { margin: 18px 0 0; padding: 28px 0; }
  .stage h2 { font-size: 2.15rem; }
  .case-header { align-items: flex-start; padding-bottom: 22px; }
  .case-header h2 { font-size: 2.08rem; }
  .text-button { flex: 0 0 auto; font-size: .75rem; }
  .case-card { gap: 12px; padding: 18px; }
  .case-card p { font-size: .92rem; }
  .option-list { grid-template-columns: 1fr; }
  .option-card { min-height: 58px; }
  .quiz-actions { align-items: stretch; flex-direction: column; }
  .quiz-actions .primary-button, .primary-button { width: 100%; }
  .quiz-actions p { text-align: center; }
  .result-intro { padding: 27px 0 23px; }
  .result-actions { flex-direction: column-reverse; }
  .result-actions button { width: 100%; }
  .promo-banner { align-items: flex-start; flex-direction: column; gap: 7px; }
  .answer-key { align-items: flex-start; flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: no-preference) {
  .stage, .context-panel { animation: appear .45s ease both; }
  @keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
