@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --navy: #071427;
  --navy-2: #0b1d37;
  --ink: #132036;
  --muted: #66748a;
  --line: #dde5ef;
  --surface: #ffffff;
  --soft: #f3f7fb;
  --blue: #2b7fff;
  --cyan: #35c5c8;
  --green: #20a66a;
  --green-soft: #eaf8f1;
  --coral: #f06d61;
  --coral-soft: #fff0ed;
  --violet: #8069d7;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(13, 35, 65, .12);
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scrollbar-color: #a9b8ca transparent; overflow-x: clip; }
body { margin: 0; color: var(--ink); background: var(--soft); font-family: "DM Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; overflow-x: clip; }
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
svg { width: 1.3em; height: 1.3em; fill: currentColor; display: block; }
::selection { background: rgba(53, 197, 200, .24); }

.setup-shell { min-height: 100vh; }
.hero { min-height: min(760px, 92vh); position: relative; overflow: hidden; color: #fff; display: grid; align-items: center; padding: 84px max(24px, calc((100vw - 1160px)/2)); background: var(--navy) url('/assets/aviation-hero.png') center right/cover no-repeat; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4, 14, 30, .98) 0%, rgba(4, 14, 30, .84) 40%, rgba(4, 14, 30, .18) 78%), linear-gradient(0deg, rgba(4, 14, 30, .78), transparent 55%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 180px; z-index: -1; background: linear-gradient(transparent, rgba(7, 20, 39, .6)); }
.hero-glow { position: absolute; width: 420px; height: 420px; left: -160px; top: 20%; border-radius: 50%; background: rgba(43, 127, 255, .16); filter: blur(90px); pointer-events: none; animation: breathe 7s ease-in-out infinite; }
.hero-content { width: min(620px, 100%); animation: riseIn .9s cubic-bezier(.2,.8,.2,1) both; }
.brand-mark { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 16px; background: rgba(255,255,255,.1); backdrop-filter: blur(12px); margin-bottom: 32px; box-shadow: inset 0 1px rgba(255,255,255,.18); }
.brand-mark svg { font-size: 27px; transform: rotate(-10deg); }
.eyebrow { display: block; font: 700 11px/1 "Manrope", sans-serif; letter-spacing: .2em; color: #8fe6e5; margin-bottom: 18px; }
.hero h1 { margin: 0; font: 800 clamp(58px, 8vw, 104px)/.9 "Manrope", sans-serif; letter-spacing: -.065em; }
.hero h1 em { color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.82); font-style: normal; }
.hero p { max-width: 500px; margin: 28px 0 34px; color: rgba(235,244,255,.73); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; }
.hero-stats { display: flex; gap: 0; border-top: 1px solid rgba(255,255,255,.17); width: fit-content; padding-top: 22px; }
.hero-stats span { color: rgba(235,244,255,.62); font-size: 13px; padding: 0 25px; border-right: 1px solid rgba(255,255,255,.14); }
.hero-stats span:first-child { padding-left: 0; }
.hero-stats span:last-child { border: 0; }
.hero-stats b { color: #fff; font: 700 21px "Manrope"; display: block; margin-bottom: 3px; }
.scroll-cue { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.6); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; display: grid; justify-items: center; gap: 9px; }
.scroll-cue span { display: block; width: 1px; height: 32px; background: linear-gradient(transparent, #74dfe0); animation: scrollPulse 1.7s ease infinite; }

.download-spotlight { width: min(1080px, calc(100% - 32px)); margin: -34px auto 0; position: relative; z-index: 3; min-height: 190px; overflow: hidden; border-radius: 29px; padding: 30px 32px; display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 28px; color: #fff; background: linear-gradient(120deg, #0b203d 0%, #0b2946 58%, #0b3650 100%); box-shadow: 0 28px 70px rgba(5,22,43,.22); }
.download-spotlight::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 12% 0%, rgba(53,197,200,.2), transparent 26%), radial-gradient(circle at 82% 100%, rgba(43,127,255,.22), transparent 32%); }
.download-art { width: 104px; height: 104px; position: relative; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.13); border-radius: 31px; background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.035)); transform: rotate(-4deg); box-shadow: inset 0 1px rgba(255,255,255,.15); }
.download-art > span { width: 56px; height: 56px; display: grid; place-items: center; color: #0a223d; background: linear-gradient(135deg, #65dbd8, #66a8ff); border-radius: 18px; transform: rotate(4deg); box-shadow: 0 14px 28px rgba(44,157,216,.26); }
.download-art svg { width: 29px; height: 29px; }
.download-art i { position: absolute; border-radius: 50%; background: #55cfd0; box-shadow: 0 0 18px #55cfd0; }
.download-art i:nth-child(2) { width: 5px; height: 5px; left: 12px; top: 17px; }
.download-art i:nth-child(3) { width: 3px; height: 3px; right: 14px; bottom: 15px; }
.download-copy, .download-button { position: relative; }
.download-copy .eyebrow { margin: 0 0 9px; font-size: 9px; }
.download-copy h2 { margin: 0; font: 800 clamp(24px,3vw,36px)/1.08 "Manrope"; letter-spacing: -.045em; }
.download-copy p { max-width: 590px; color: #aab9ca; margin: 10px 0 0; font-size: 13px; line-height: 1.5; }
.download-button { min-height: 65px; padding: 0 20px; display: flex; align-items: center; gap: 13px; border: 0; border-radius: 19px; cursor: pointer; color: #071427; background: linear-gradient(135deg, #f2fbff, #a9e8e5); box-shadow: 0 15px 35px rgba(0,0,0,.2); transition: .25s cubic-bezier(.2,.8,.2,1); }
.download-button:hover { transform: translateY(-3px); box-shadow: 0 20px 42px rgba(0,0,0,.25); }
.download-button > span:first-child { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: rgba(7,20,39,.09); }
.download-button > span:nth-child(2) { text-align: left; white-space: nowrap; }
.download-button small, .download-button strong { display: block; }
.download-button small { color: #53707c; font: 700 8px "Manrope"; letter-spacing: .1em; }
.download-button strong { margin-top: 3px; font: 800 13px "Manrope"; }
.download-button > svg { margin-left: 6px; }

.download-overlay { position: fixed; inset: 0; z-index: 100; padding: 28px; overflow-y: auto; background: rgba(3,12,25,.78); backdrop-filter: blur(14px); animation: fadeOverlay .25s ease both; }
.download-sheet { width: min(850px, 100%); min-height: min(760px, calc(100vh - 56px)); margin: auto; padding: 34px; border-radius: 29px; background: var(--soft); box-shadow: 0 35px 100px rgba(0,0,0,.35); animation: modalRise .38s cubic-bezier(.2,.8,.2,1) both; }
.download-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; }
.download-head .eyebrow { color: var(--blue); margin-bottom: 10px; }
.download-head h2 { margin: 0; font: 800 clamp(30px,5vw,46px)/1 "Manrope"; letter-spacing: -.05em; }
.download-head p { max-width: 620px; margin: 12px 0 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
.download-close { width: 45px; height: 45px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: .2s; }
.download-close:hover { transform: rotate(5deg); border-color: #b7c7d9; }
.download-close:disabled { opacity: .4; cursor: wait; }
.download-tools { display: flex; align-items: center; gap: 12px; margin-top: 29px; }
.download-tools .search-box { flex: 1; }
.download-summary { display: flex; gap: 20px; margin: 12px 2px; color: var(--muted); font-size: 12px; }
.download-summary b { color: var(--ink); }
.download-subjects { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.download-subject { min-height: 65px; display: flex; align-items: center; gap: 12px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; transition: .18s; }
.download-subject:hover { transform: translateY(-1px); border-color: #b5c9e2; }
.download-subject.selected { border-color: #9ac4f7; background: #edf5ff; box-shadow: inset 0 0 0 1px rgba(43,127,255,.15); }
.download-subject input { position: absolute; opacity: 0; pointer-events: none; }
.download-subject strong, .download-subject small { display: block; }
.download-subject strong { font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.download-subject small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.download-subject.selected .fake-check { color: #fff; border-color: var(--blue); background: var(--blue); }
.download-footer { position: sticky; bottom: -34px; z-index: 2; margin: 28px -34px -34px; padding: 17px 34px max(17px, env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: center; gap: 18px; border-top: 1px solid rgba(188,202,219,.68); background: rgba(243,247,251,.93); backdrop-filter: blur(15px); text-align: left; }
.download-footer > div span, .download-footer > div strong { display: block; }
.download-footer > div span { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 8px; }
.download-footer > div strong { margin-top: 4px; font: 800 14px "Manrope"; }
.download-generate { min-width: 245px; }
.button-spinner { width: 18px; height: 18px; border: 2px solid rgba(7,20,39,.22); border-top-color: #071427; border-radius: 50%; animation: spin .75s linear infinite; }

.config-panel { width: min(980px, calc(100% - 32px)); margin: -1px auto 0; padding: 88px 0 50px; }
.config-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin: 0 0 28px; }
.config-heading.compact { margin-top: 70px; }
.config-heading > div { display: flex; align-items: center; gap: 16px; }
.step-number { color: var(--cyan); font: 700 11px "Manrope"; letter-spacing: .12em; }
.config-heading h2, .review-heading h2 { margin: 0; font: 800 clamp(26px, 4vw, 38px)/1 "Manrope"; letter-spacing: -.04em; }
.config-heading p, .review-heading p { color: var(--muted); margin: 0; font-size: 14px; }
.subject-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.search-box { flex: 1; height: 52px; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 17px; transition: .2s ease; }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(43,127,255,.1); }
.search-box svg { color: #8996a8; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.toolbar-actions { display: flex; gap: 8px; }
.text-button { border: 0; background: #e9f0f7; border-radius: 13px; padding: 14px 16px; font-weight: 700; font-size: 13px; cursor: pointer; transition: transform .2s, background .2s; }
.text-button:hover { background: #dde8f3; transform: translateY(-1px); }
.selection-summary { display: flex; gap: 18px; color: var(--muted); font-size: 12px; padding: 8px 2px 17px; }
.selection-summary b { color: var(--ink); }
.subjects-container { overflow: visible; background: rgba(255,255,255,.58); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; box-shadow: 0 15px 40px rgba(22,44,74,.05); }
.subject-group + .subject-group { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.group-title { display: flex; justify-content: space-between; color: #8b98aa; padding: 11px 10px 8px; font: 700 10px "Manrope"; letter-spacing: .09em; text-transform: uppercase; }
.subject-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.subject-row { position: relative; display: flex; align-items: center; gap: 12px; border-radius: 15px; padding: 13px 12px; cursor: pointer; transition: background .18s, transform .18s; }
.subject-row:hover { background: #fff; transform: translateY(-1px); }
.subject-row.selected { background: #edf5ff; }
.subject-row input { position: absolute; opacity: 0; pointer-events: none; }
.fake-check { width: 24px; height: 24px; flex: 0 0 auto; border: 1.5px solid #b8c5d4; border-radius: 8px; display: grid; place-items: center; color: transparent; background: #fff; transition: .2s ease; }
.fake-check svg { font-size: 16px; }
.subject-row.selected .fake-check { color: #fff; border-color: var(--blue); background: var(--blue); transform: scale(1.03); }
.subject-copy { min-width: 0; }
.subject-copy strong { display: block; font-size: 13px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.subject-copy small { display: block; color: var(--muted); margin-top: 4px; font-size: 11px; }
.empty-search { padding: 45px; text-align: center; color: var(--muted); }
.amount-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.amount-chip { height: 66px; border: 1px solid var(--line); background: #fff; border-radius: 17px; font: 800 19px "Manrope"; cursor: pointer; transition: .2s ease; }
.amount-chip:hover { border-color: #a5bee0; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(34,66,105,.08); }
.amount-chip.active { background: var(--navy-2); color: #fff; border-color: var(--navy-2); box-shadow: 0 12px 32px rgba(11,29,55,.22); transform: translateY(-2px); }
.full-bank { margin-top: 12px; display: flex; align-items: center; gap: 15px; padding: 17px 19px; border-radius: 18px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: .2s ease; }
.full-bank.active { border-color: #8bd7d5; background: #effafa; }
.full-bank input { position: absolute; opacity: 0; }
.toggle { width: 46px; height: 26px; flex: 0 0 auto; padding: 3px; border-radius: 20px; background: #c9d4e0; transition: .22s ease; }
.toggle i { display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: .22s cubic-bezier(.2,.8,.2,1); }
.full-bank.active .toggle { background: var(--cyan); }
.full-bank.active .toggle i { transform: translateX(20px); }
.full-bank strong, .full-bank small { display: block; }
.full-bank strong { font-size: 14px; }
.full-bank small { color: var(--muted); margin-top: 3px; font-size: 11px; }
.notice { margin-top: 12px; border-radius: 15px; background: #fff7e8; border: 1px solid #f2d89d; padding: 13px 16px; display: flex; gap: 8px; color: #775616; font-size: 12px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-card { position: relative; text-align: left; display: flex; align-items: center; gap: 15px; padding: 20px; border-radius: 20px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: .2s ease; }
.mode-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(24,53,91,.08); }
.mode-card.active { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue), 0 14px 34px rgba(43,127,255,.1); }
.mode-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 14px; background: #edf4fd; color: var(--blue); flex: 0 0 auto; }
.mode-card:nth-child(2) .mode-icon { color: var(--green); background: var(--green-soft); }
.mode-card strong, .mode-card small { display: block; }
.mode-card strong { font: 800 15px "Manrope"; }
.mode-card small { color: var(--muted); line-height: 1.45; margin-top: 5px; }
.mode-card > i { position: absolute; right: 17px; top: 17px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid #b8c4d4; }
.mode-card.active > i { border-color: var(--blue); background: var(--blue); box-shadow: 0 0 0 4px #dceaff; }
.start-wrap { margin-top: 65px; background: var(--navy); border-radius: 25px; color: #fff; padding: 24px 25px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow); position: sticky; bottom: 14px; z-index: 10; }
.start-wrap > div span, .start-wrap > div strong { display: block; }
.start-wrap > div span { color: #7f8fa7; text-transform: uppercase; letter-spacing: .13em; font-size: 9px; margin-bottom: 4px; }
.start-wrap > div strong { font: 700 15px "Manrope"; }
.primary-button, .secondary-button { min-height: 52px; border: 0; border-radius: 15px; padding: 0 20px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 12px; transition: .2s cubic-bezier(.2,.8,.2,1); }
.primary-button { background: linear-gradient(135deg, #4b95ff, #36c4c5); color: #06172d; box-shadow: 0 12px 30px rgba(43,127,255,.23); }
.primary-button:hover:not(:disabled) { transform: translateY(-2px) scale(1.01); box-shadow: 0 16px 34px rgba(43,127,255,.3); }
.primary-button:active:not(:disabled) { transform: translateY(0) scale(.98); }
.primary-button:disabled { opacity: .38; cursor: not-allowed; filter: grayscale(.4); }
.secondary-button { background: #e7eef6; color: var(--ink); }
footer { text-align: center; color: #8a98aa; padding: 20px 20px 45px; font-size: 12px; }

.quiz-shell { min-height: 100vh; background: linear-gradient(#071427 0 220px, #f3f7fb 220px); padding-bottom: 112px; }
.quiz-header { height: 138px; max-width: 820px; margin: auto; color: #fff; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 22px 20px 35px; position: relative; }
.icon-button { width: 42px; height: 42px; border-radius: 13px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; transition: .2s; }
.icon-button:hover { background: rgba(255,255,255,.15); transform: rotate(4deg); }
.quiz-brand { text-align: center; }
.quiz-brand span { display: block; color: #8da0ba; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.quiz-brand strong { display: block; font: 800 17px "Manrope"; margin-top: 4px; }
.quiz-brand i { color: #67809c; font-style: normal; }
.mini-plane { color: #6ad3d4; display: grid; place-items: center; transform: rotate(-9deg); }
.progress-track { position: absolute; height: 3px; border-radius: 4px; background: rgba(255,255,255,.12); bottom: 20px; left: 20px; right: 20px; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .55s cubic-bezier(.2,.8,.2,1); }
.question-stage { width: min(760px, calc(100% - 28px)); min-height: 560px; margin: 0 auto; background: #fff; border-radius: 27px; padding: clamp(25px, 5vw, 48px); box-shadow: var(--shadow); animation: slideQuestion .45s cubic-bezier(.2,.8,.2,1) both; }
.question-meta { display: flex; justify-content: space-between; gap: 16px; color: #8190a4; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.question-meta span:first-child { color: var(--blue); font-weight: 800; }
.question-stage h1 { font: 800 clamp(23px, 4vw, 34px)/1.22 "Manrope"; letter-spacing: -.035em; margin: 26px 0 30px; }
.question-image { display: block; max-width: min(100%, 500px); max-height: 390px; object-fit: contain; margin: -12px auto 28px; border-radius: 18px; }
.options { display: grid; gap: 10px; }
.option { width: 100%; min-height: 66px; border: 1px solid var(--line); background: #fbfdff; border-radius: 17px; padding: 12px 15px; display: grid; grid-template-columns: 38px 1fr 28px; align-items: center; gap: 12px; text-align: left; cursor: pointer; transition: .2s ease; }
.option:hover:not(:disabled) { border-color: #9eb9dc; background: #f5f9fe; transform: translateX(3px); }
.option > span { width: 36px; height: 36px; border-radius: 11px; background: #eaf0f7; display: grid; place-items: center; font: 800 12px "Manrope"; color: #65758b; transition: .2s; }
.option strong { font-size: 14px; line-height: 1.4; }
.option i { display: grid; place-items: center; font-style: normal; }
.option.chosen { border-color: var(--blue); background: #eff6ff; box-shadow: inset 0 0 0 1px var(--blue); }
.option.chosen > span { background: var(--blue); color: #fff; }
.option.correct { border-color: #72c8a2; background: var(--green-soft); box-shadow: inset 0 0 0 1px #72c8a2; }
.option.correct > span { background: var(--green); color: #fff; }
.option.correct i { color: var(--green); }
.option.wrong { border-color: #f09d95; background: var(--coral-soft); box-shadow: inset 0 0 0 1px #f09d95; }
.option.wrong > span { background: var(--coral); color: #fff; }
.option.wrong i { color: var(--coral); }
.feedback { margin-top: 19px; padding: 16px 18px; border-radius: 17px; display: flex; gap: 13px; align-items: center; animation: feedbackIn .35s ease both; }
.feedback > span { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; }
.feedback.success { background: var(--green-soft); color: #14744a; }
.feedback.success > span { background: #c9eddc; }
.feedback.error { background: var(--coral-soft); color: #9a3f37; }
.feedback.error > span { background: #ffd9d4; }
.feedback strong { display: block; font: 800 14px "Manrope"; }
.feedback p { margin: 3px 0 0; font-size: 12px; line-height: 1.4; }
.quiz-action { position: fixed; bottom: 0; left: 0; right: 0; padding: 13px max(18px, calc((100vw - 760px)/2)); background: rgba(243,247,251,.86); backdrop-filter: blur(16px); border-top: 1px solid rgba(182,198,216,.45); z-index: 10; }
.quiz-action .primary-button { width: 100%; color: #06172d; }

.results-shell { min-height: 100vh; background: var(--soft); }
.results-hero { background: var(--navy); color: #fff; padding: 70px 20px 58px; text-align: center; position: relative; overflow: hidden; }
.results-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(43,127,255,.2), transparent 35%), linear-gradient(120deg, transparent, rgba(53,197,200,.08)); }
.result-plane { width: 42px; margin: 0 auto 24px; color: #6ad3d4; transform: rotate(-8deg); position: relative; }
.results-hero .eyebrow { position: relative; }
.score-ring { --score: 0deg; width: 194px; height: 194px; margin: 26px auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--cyan) var(--score), rgba(255,255,255,.1) 0); position: relative; animation: scoreIn 1s cubic-bezier(.2,.8,.2,1) both; }
.score-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #0a1930; }
.score-ring > div { position: relative; }
.score-ring strong { font: 800 52px "Manrope"; letter-spacing: -.06em; display: block; }
.score-ring strong small { font-size: 20px; color: #7e91aa; }
.score-ring span { color: #8fdedc; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.results-hero h1 { max-width: 620px; margin: 0 auto 34px; color: #c6d2e1; font: 600 clamp(17px, 3vw, 23px)/1.4 "Manrope"; position: relative; }
.result-metrics { max-width: 680px; margin: auto; display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; position: relative; }
.result-metrics > div { border-right: 1px solid rgba(255,255,255,.1); }
.result-metrics > div:last-child { border: 0; }
.metric-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 7px; }
.metric-dot.green { background: #48d18f; }.metric-dot.coral { background: #ff7d70; }.metric-dot.blue { background: #4b95ff; }.metric-dot.violet { background: #a58df2; }
.result-metrics strong { font: 800 24px "Manrope"; }
.result-metrics small { display: block; color: #8192aa; font-size: 10px; margin-top: 4px; }
.review-panel { width: min(860px, calc(100% - 28px)); margin: 0 auto; padding: 65px 0 70px; }
.review-heading { margin-bottom: 25px; }
.review-heading > div { display: flex; align-items: center; gap: 14px; margin-bottom: 9px; }
.mistakes { display: grid; gap: 13px; }
.mistake-card { border-radius: 21px; background: #fff; border: 1px solid var(--line); padding: 22px; box-shadow: 0 10px 30px rgba(24,53,91,.05); animation: riseIn .45s ease both; }
.mistake-top { display: flex; align-items: center; gap: 10px; }
.mistake-top > span { width: 27px; height: 27px; border-radius: 9px; background: var(--coral-soft); color: var(--coral); display: grid; place-items: center; font-weight: 800; font-size: 11px; }
.mistake-top small { color: var(--blue); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: 9px; }
.mistake-card h3 { font: 700 16px/1.4 "Manrope"; margin: 15px 0; }
.answer-line { padding: 12px 13px; border-radius: 12px; margin-top: 7px; }
.answer-line span { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: 8px; margin-bottom: 4px; opacity: .7; }
.answer-line strong { font-size: 12px; line-height: 1.4; }
.wrong-line { background: var(--coral-soft); color: #943d36; }
.correct-line { background: var(--green-soft); color: #15724a; }
.perfect-card { text-align: center; padding: 55px 20px; border-radius: 22px; background: #fff; border: 1px solid var(--line); }
.perfect-card > span { width: 60px; height: 60px; border-radius: 18px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin: auto; }
.perfect-card strong { display: block; margin-top: 15px; font: 800 22px "Manrope"; }
.perfect-card p { margin: 5px 0 0; color: var(--muted); }
.result-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.load-error { min-height: 100vh; display: grid; place-content: center; text-align: center; padding: 30px; }
.load-error strong { font: 800 24px "Manrope"; }.load-error p { color: var(--muted); }.load-error button { border:0; border-radius: 14px; padding: 14px 20px; background: var(--blue); color:#fff; }

@keyframes riseIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes slideQuestion { from { opacity: 0; transform: translateX(24px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes feedbackIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 50% { transform: scale(1.16); opacity: .7; } }
@keyframes scrollPulse { 0%,100% { opacity:.2; transform:scaleY(.7); transform-origin:top;} 50% {opacity:1;transform:scaleY(1);} }
@keyframes scoreIn { from { opacity:0; transform:scale(.76) rotate(-18deg); } to { opacity:1; transform:none; } }
@keyframes fadeOverlay { from { opacity: 0; } }
@keyframes modalRise { from { opacity: 0; transform: translateY(28px) scale(.985); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .hero { min-height: 92svh; padding: 65px 24px 76px; background-position: 62% center; align-items: end; }
  .hero::before { background: linear-gradient(0deg, rgba(4,14,30,.99) 0%, rgba(4,14,30,.8) 58%, rgba(4,14,30,.25) 100%); }
  .hero h1 { font-size: clamp(53px, 17vw, 77px); }
  .hero p { font-size: 16px; margin: 22px 0 26px; }
  .brand-mark { margin-bottom: 24px; }
  .hero-stats { width: 100%; justify-content: space-between; }
  .hero-stats span { padding: 0 13px; flex: 1; }
  .download-spotlight { width: calc(100% - 24px); margin-top: -26px; padding: 24px 20px; grid-template-columns: 70px 1fr; gap: 17px; border-radius: 24px; }
  .download-art { width: 67px; height: 67px; border-radius: 21px; }
  .download-art > span { width: 42px; height: 42px; border-radius: 14px; }
  .download-art svg { width: 22px; height: 22px; }
  .download-copy h2 { font-size: 25px; }
  .download-copy p { font-size: 12px; }
  .download-button { grid-column: 1 / -1; width: 100%; justify-content: center; }
  .download-overlay { padding: 0; background: var(--soft); }
  .download-sheet { width: 100%; min-height: 100svh; padding: 24px 16px 110px; border-radius: 0; box-shadow: none; }
  .download-head { gap: 12px; }
  .download-head h2 { font-size: 34px; }
  .download-head p { font-size: 12px; }
  .download-tools { align-items: stretch; flex-direction: column; }
  .download-tools .toolbar-actions { justify-content: flex-end; }
  .download-subjects { grid-template-columns: 1fr; }
  .download-footer { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 11px 12px max(11px, env(safe-area-inset-bottom)); }
  .download-footer > div { display: none; }
  .download-generate { width: 100%; min-width: 0; }
  .config-panel { width: min(100% - 24px, 620px); padding-top: 58px; }
  .config-heading { display: block; }
  .config-heading p { margin: 10px 0 0 42px; line-height: 1.4; }
  .subject-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { justify-content: flex-end; }
  .subject-list { grid-template-columns: 1fr; }
  .subjects-container { overflow: visible; }
  .amount-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .amount-chip { height: 56px; border-radius: 14px; font-size: 16px; }
  .mode-grid { grid-template-columns: 1fr; }
  .notice { display: block; }.notice span { display:block; margin-top:4px; }
  .start-wrap { margin-top: 45px; padding: 14px; border-radius: 20px; bottom: max(8px, env(safe-area-inset-bottom)); gap: 12px; }
  .start-wrap > div { display: none; }
  .start-wrap .primary-button { width: 100%; }
  .quiz-shell { background: linear-gradient(#071427 0 176px, #f3f7fb 176px); padding-bottom: calc(98px + env(safe-area-inset-bottom)); }
  .quiz-header { height: 115px; padding: 15px 14px 28px; }
  .progress-track { left: 14px; right: 14px; bottom: 13px; }
  .question-stage { min-height: calc(100svh - 205px); width: calc(100% - 16px); border-radius: 23px; padding: 25px 18px; }
  .question-meta { display: block; }
  .question-meta span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .question-meta span:last-child { margin-top: 5px; }
  .question-stage h1 { margin: 20px 0 24px; font-size: 23px; }
  .option { grid-template-columns: 34px 1fr 22px; gap: 10px; min-height: 62px; padding: 10px 12px; }
  .option > span { width: 33px; height: 33px; }
  .option strong { font-size: 13px; }
  .quiz-action { padding: 10px 12px max(10px, env(safe-area-inset-bottom)); }
  .results-hero { padding-top: 52px; }
  .score-ring { width: 170px; height: 170px; }
  .result-metrics { grid-template-columns: repeat(2,1fr); gap: 18px 0; }
  .result-metrics > div:nth-child(2) { border:0; }.result-metrics > div:nth-child(-n+2) { padding-bottom: 16px; }
  .review-panel { padding-top: 45px; }
  .result-actions { flex-direction: column-reverse; }
  .result-actions button { width: 100%; }
}

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