:root {
  color-scheme: dark;
  --ink: #070b20;
  --panel: #111838;
  --panel-2: #18224b;
  --indigo: #5967ff;
  --blue: #68d8ff;
  --saffron: #ffb547;
  --paper: #f7f6ef;
  --muted: #a9b2d4;
  --good: #55e6a5;
  --bad: #ff7085;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  background:
    radial-gradient(circle at 78% 12%, rgba(89, 103, 255, .2), transparent 31rem),
    radial-gradient(circle at 12% 86%, rgba(104, 216, 255, .09), transparent 24rem),
    var(--ink);
}
button { font: inherit; }
.shell { width: min(1160px, calc(100% - 28px)); margin: 0 auto; padding: 22px 0 36px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.brand { display: flex; gap: 12px; align-items: center; font-weight: 850; letter-spacing: -.02em; }
.seal { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--indigo); box-shadow: 0 0 0 5px rgba(89, 103, 255, .13); font-family: Georgia, serif; font-size: 1.35rem; }
.brand small { display: block; color: var(--muted); font-weight: 650; font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; margin-top: 2px; }
.counter { color: var(--muted); font-size: .9rem; text-align: right; }
.progress-track { height: 5px; background: rgba(255,255,255,.09); border-radius: 999px; overflow: hidden; margin-bottom: 22px; }
.progress-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--indigo), var(--blue)); transition: width .45s ease; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.case-card { background: linear-gradient(145deg, rgba(24,34,75,.98), rgba(12,18,45,.98)); border: 1px solid rgba(143,160,255,.2); border-radius: 24px; padding: clamp(22px, 4vw, 42px); box-shadow: 0 28px 70px rgba(0,0,0,.28); position: relative; overflow: hidden; }
.case-card::after { content: ""; position: absolute; inset: 0 0 auto auto; width: 160px; height: 160px; background: radial-gradient(circle at top right, rgba(104,216,255,.15), transparent 67%); pointer-events: none; }
.case-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.year { background: var(--saffron); color: #261600; padding: 6px 10px; border-radius: 8px; font-weight: 900; }
.tag { color: var(--blue); font-size: .8rem; font-weight: 850; letter-spacing: .12em; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.05rem, 5.5vw, 4rem); line-height: .98; letter-spacing: -.045em; margin: 0 0 18px; max-width: 720px; }
.story { color: #d6daf0; font-size: clamp(1rem, 2vw, 1.17rem); line-height: 1.65; max-width: 760px; margin: 0 0 24px; }
.prompt { color: white; font-size: 1.02rem; margin: 0 0 12px; }
.choices { display: grid; gap: 11px; }
.choice { width: 100%; border: 1px solid rgba(166,177,235,.24); border-radius: 14px; background: rgba(5,9,29,.56); color: var(--paper); display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; text-align: left; padding: 14px 16px; min-height: 58px; cursor: pointer; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.choice:hover:not(:disabled), .choice:focus-visible { transform: translateY(-2px); border-color: var(--blue); background: rgba(30,43,91,.88); outline: none; }
.choice-key { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--blue); background: rgba(104,216,255,.1); font-weight: 900; }
.choice.is-correct { border-color: var(--good); background: rgba(85,230,165,.1); }
.choice.is-wrong { border-color: var(--bad); background: rgba(255,112,133,.1); }
.choice:disabled { cursor: default; opacity: .78; }
.feedback { border-left: 4px solid; margin-top: 18px; padding: 12px 15px; background: rgba(0,0,0,.2); border-radius: 6px 12px 12px 6px; }
.feedback.good { border-color: var(--good); }
.feedback.try { border-color: var(--bad); }
.feedback strong { display: block; margin-bottom: 4px; }
.feedback p { margin: 0; color: #d9def3; line-height: 1.55; }
.next, .replay { margin-top: 16px; border: 0; border-radius: 12px; background: var(--paper); color: #0d1333; padding: 12px 18px; font-weight: 900; cursor: pointer; box-shadow: 0 7px 0 #aeb3c5; }
.next:active, .replay:active { transform: translateY(4px); box-shadow: 0 3px 0 #aeb3c5; }
.sidebar { display: grid; gap: 14px; }
.panel { background: rgba(17,24,56,.86); border: 1px solid rgba(143,160,255,.17); border-radius: 18px; padding: 16px; }
.panel h2 { font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.meters { display: grid; gap: 12px; }
.meter { --level: 50%; }
.meter-label { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }
.meter-label span:last-child { font-weight: 900; color: white; }
.meter-bar { height: 7px; background: rgba(255,255,255,.08); border-radius: 10px; overflow: hidden; }
.meter-bar::before { content: ""; display: block; width: var(--level); height: 100%; background: linear-gradient(90deg, var(--indigo), var(--blue)); transition: width .4s ease; }
.score { font-size: 2.2rem; font-family: Georgia, serif; margin: 2px 0 0; color: var(--saffron); }
.score small { color: var(--muted); font-size: .8rem; font-family: inherit; }
.timeline { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; padding: 0; margin: 0; }
.timeline li { text-align: center; color: #66709a; font-size: .68rem; }
.timeline span { width: 10px; height: 10px; border-radius: 50%; background: #3d466d; display: block; margin: 0 auto 5px; }
.timeline .active { color: white; }
.timeline .active span { background: var(--saffron); box-shadow: 0 0 0 5px rgba(255,181,71,.13); }
.timeline .correct span { background: var(--good); }
.timeline .missed span { background: var(--bad); }
.tip { color: var(--muted); font-size: .83rem; line-height: 1.5; margin: 0; }
.result { min-height: 570px; display: grid; place-items: center; text-align: center; }
.result-inner { max-width: 600px; }
.verdict { color: var(--blue); letter-spacing: .16em; font-weight: 900; font-size: .78rem; }
.result h1 { margin: 12px auto 18px; }
.result p { color: #d6daf0; line-height: 1.6; font-size: 1.08rem; }
.result-score { color: var(--saffron) !important; font-weight: 900; }
[hidden] { display: none !important; }
.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; }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr 1fr; }
  .timeline-panel { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .shell { width: min(100% - 20px, 1160px); padding-top: 12px; }
  .topbar { align-items: flex-start; }
  .brand small { display: none; }
  .case-card { border-radius: 18px; padding: 20px 16px 24px; }
  .sidebar { grid-template-columns: 1fr; }
  .timeline-panel { grid-column: auto; }
  .choice { padding: 13px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
