:root {
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
  color: #273541;
  background: #fff;
  font-synthesis: none;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, a { font: inherit; }
button { cursor: pointer; }
.shell { width: min(100% - 32px, 760px); margin: 0 auto; padding: 24px 0 48px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 54px; }
.back-link { color: #1587c2; font-size: 15px; font-weight: 800; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.brand { color: #46a302; font-size: 15px; font-weight: 900; }
.intro-row { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
h1 { font-size: clamp(30px, 6vw, 43px); line-height: 1.2; letter-spacing: -.025em; margin: 0 0 11px; }
.subheading { color: #687987; font-size: 17px; line-height: 1.65; margin: 0 0 34px; }
.practice-label { flex: none; padding: 9px 13px; border-radius: 100px; color: #46a302; background: #e9fbdc; font-size: 13px; font-weight: 800; }
.progress-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: #5e7164; font-size: 14px; font-weight: 700; }
.progress-track { height: 12px; overflow: hidden; border-radius: 12px; background: #e5e9ec; margin-bottom: 23px; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: 12px; background: #58cc02; transition: width 220ms var(--ease-out); }
.question-panel { padding: clamp(22px, 5vw, 36px); border: 2px solid #e5e9ec; border-radius: 22px; background: #fff; box-shadow: 0 4px 0 #d9dfe3; }
.question-index { color: #46a302; font-size: 14px; font-weight: 800; }
h2 { font-size: clamp(22px, 4.7vw, 28px); line-height: 1.45; margin: 14px 0 27px; }
.choices { display: grid; gap: 11px; }
.choice { width: 100%; min-height: 60px; padding: 15px 18px; border: 2px solid #dce3e7; border-radius: 15px; background: #fff; color: #273541; text-align: right; font-size: 17px; line-height: 1.5; font-weight: 700; box-shadow: 0 3px 0 #dce3e7; transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out), border-color 140ms ease; }
.choice:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 #dce3e7; }
.choice:disabled { cursor: default; }
.choice.correct { border-color: #58cc02; background: #e9fbdc; box-shadow: 0 3px 0 #a5db86; animation: answer-pop 240ms var(--ease-out) both; }
.choice.incorrect { border-color: #b65a50; background: #fff0ec; }
.response-panel { display: none; margin-top: 25px; padding: 20px; border: 2px solid #b8ea8a; border-radius: 20px; background: #dffac5; animation: feedback-in 220ms var(--ease-out) both; }
.response-panel:has(.feedback:not([hidden])) { display: block; }
.response-panel:has(.feedback.incorrect:not([hidden])) { background: #fff4ee; border-color: #f1d9ce; }
.feedback { animation: feedback-in 220ms var(--ease-out) both; }
.feedback strong { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 20px; }
.feedback strong::before { content: '✓'; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #58cc02; color: white; font-size: 17px; }
.feedback.incorrect strong::before { content: '×'; background: #e66b5b; }
.feedback p { margin: 7px 0 0; line-height: 1.7; }
.english { color: #51606a; font-size: 14px; text-align: left; }
.primary-button, .secondary-button { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 13px 23px; border-radius: 13px; font-size: 16px; font-weight: 800; text-decoration: none; }
.primary-button { border: 2px solid #58cc02; background: #58cc02; color: #fff; box-shadow: 0 4px 0 #46a302; transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out); }
.primary-button:active { transform: translateY(3px); box-shadow: 0 1px 0 #46a302; }
#next-button { display: flex; width: 100%; margin-top: 17px; }
.secondary-button { border: 2px solid #e5e9ec; background: #fff; color: #273541; box-shadow: 0 4px 0 #d9dfe3; transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out); }
.secondary-button:active { transform: translateY(3px); box-shadow: 0 1px 0 #d9dfe3; }
.note { margin-top: 20px; color: #708273; font-size: 13px; line-height: 1.5; }
.result-panel { padding: clamp(26px, 6vw, 45px); border: 2px solid #e5e9ec; border-radius: 22px; background: #fff; text-align: center; box-shadow: 0 4px 0 #d9dfe3; }
.result-panel:not([hidden]) { animation: feedback-in 240ms var(--ease-out) both; }
.result-mark { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #e9fbdc; color: #46a302; font-size: 34px; font-weight: 800; margin-bottom: 22px; animation: feedback-in 240ms var(--ease-out) both; }
.score { font-size: 23px; font-weight: 800; color: #46a302; }
.result-panel p:not(.score) { line-height: 1.7; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 27px; }
.streak-badge { display: inline-block; margin: 0 0 12px; padding: 6px 14px; border-radius: 100px; background: #fff3c4; color: #8a5a00; font-size: 15px; font-weight: 800; animation: answer-pop 360ms var(--ease-out) both; }
.result-panel { position: relative; overflow: hidden; }
.result-stars { margin: 0 0 6px; color: #b57f00; font-size: 44px; letter-spacing: 6px; line-height: 1.2; }
.result-panel:not([hidden]) .result-stars { animation: answer-pop 480ms var(--ease-out) 120ms both; }
.result-count { margin: -6px 0 14px; color: #5e7164; font-size: 15px; }
.improvement { margin: 0 0 12px; color: #0b6fa3; font-weight: 800; }
.result-panel[data-tier="low"] { border-color: #f6d9a8; }
.result-panel[data-tier="low"] .score { color: #b86a00; }
.result-panel[data-tier="low"] #retry-button { box-shadow: 0 4px 0 #46a302, 0 0 0 4px #e9fbdc; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti span { position: absolute; top: -12px; inset-inline-start: var(--x); width: 9px; height: 14px; border-radius: 2px; background: hsl(var(--hue) 70% 55%); animation: confetti-fall 1400ms var(--ease-out) var(--delay) both; }
@keyframes confetti-fall { to { transform: translateY(420px) rotate(540deg); opacity: 0; } }
h2:focus, .feedback:focus { outline: none; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible { outline: 3px solid #173f2b; outline-offset: 3px; }
@keyframes feedback-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes answer-pop { 50% { transform: scale(1.02); } }
@media (hover: hover) and (pointer: fine) {
  .choice:not(:disabled):hover { border-color: #58cc02; background: #f6fff0; }
  .primary-button:hover { background: #61d70a; }
  .secondary-button:hover { border-color: #b8c4ca; }
}
@media (max-width: 560px) {
  .shell { width: min(100% - 28px, 760px); padding-top: 17px; }
  .topbar { margin-bottom: 37px; }
  .intro-row { display: block; }
  .practice-label { display: inline-block; margin: -14px 0 22px; }
  .subheading { margin-bottom: 24px; }
  .response-panel { padding: 18px; }
  .result-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .response-panel, .feedback, .result-mark, .result-panel:not([hidden]) { animation: feedback-fade 200ms ease both; }
  .choice.correct { animation: none; }
  .choice, .primary-button, .secondary-button { transition: border-color 140ms ease, background-color 140ms ease; }
  .choice:not(:disabled):active, .primary-button:active, .secondary-button:active { transform: none; }
  .progress-track span { transition: none; }
  .streak-badge, .result-stars { animation: none !important; }
  .confetti { display: none; }
}
@keyframes feedback-fade { from { opacity: 0; } to { opacity: 1; } }
.source-line { margin-top: 12px !important; padding-top: 10px; border-top: 1px solid rgba(39, 53, 65, .12); color: #4d5f6b; font-size: 14px; }
.source-line a { color: #0b6fa3; font-weight: 800; text-underline-offset: 3px; }
