:root {
  color-scheme: light;
  --ink: #252a38;
  --muted: #697184;
  --navy: #20283d;
  --blue: #d51d2b;
  --blue-dark: #ad1321;
  --sky: #fff0f0;
  --mint: #e6f7f0;
  --coral: #e54542;
  --line: #e9e5e2;
  --surface: #fff;
  --canvas: #f6f8fc;
  --shadow: 0 18px 48px rgba(28, 47, 82, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: #fff; }
a { color: var(--blue-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: #173d9f; }
button, input, select, textarea { font: inherit; }
button, .button { -webkit-tap-highlight-color: transparent; }

.academy-topline { color: #171717; background: #f5c400; }
.academy-topline-inner { display: flex; width: min(1200px,100%); min-height: 35px; align-items: center; justify-content: space-between; gap: 1rem; margin: auto; padding: .35rem 1.25rem; font-size: .86rem; font-weight: 650; letter-spacing: .015em; }
.ticker-window { min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; }
.ticker-track { display: flex; width: max-content; animation: academy-ticker 16s linear infinite; }
.ticker-track > span { flex: none; padding-right: 4rem; }
@keyframes academy-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.academy-topline-inner > a { flex: none; }
.academy-topline a { color: #171717; text-decoration: none; }
.academy-topline a:hover { color: #000; text-decoration: underline; }
nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 86px; padding: .55rem max(1.2rem, calc((100vw - 1200px) / 2));
  background: rgba(255,255,255,.97); border-bottom: 1px solid #eee9e6;
  box-shadow: 0 5px 20px rgba(47,30,30,.06); backdrop-filter: blur(14px);
}
nav span { display: flex; align-items: center; justify-content: flex-end; gap: .25rem; flex-wrap: wrap; }
nav a { display: inline-flex; min-height: 40px; align-items: center; gap: .45rem; padding: .58rem .82rem; color: #604b2b; background: linear-gradient(180deg,#fffdf7 0%,#f5e8c9 100%); border: 1px solid #dfc987; border-radius: 999px; box-shadow: 0 4px 0 #cbb36f, 0 6px 12px rgba(86,62,20,.12); text-decoration: none; text-transform: uppercase; font-size: .76rem; font-weight: 750; letter-spacing: .025em; transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
nav a:hover { color: #78151c; background: linear-gradient(180deg,#fff5ce 0%,#eed07b 100%); border-color: #d7b650; transform: translateY(-2px); box-shadow: 0 6px 0 #b7963c, 0 9px 16px rgba(116,78,9,.19); }
nav a:active { transform: translateY(2px); box-shadow: 0 1px 0 #b7963c, 0 2px 5px rgba(116,78,9,.12); }
nav .brand { gap: .65rem; padding: .15rem .5rem .15rem 0; background: transparent; border-color: transparent; border-radius: 0; box-shadow: none; white-space: nowrap; }
nav .brand:hover { background: transparent; border-color: transparent; box-shadow: none; transform: none; }
nav .brand img { display: block; width: clamp(210px, 24vw, 278px); height: auto; }
nav a[href*="register"], nav a[href*="admin"], nav a[href*="login"] { color: #604b2b; background: linear-gradient(180deg,#fffdf7 0%,#f5e8c9 100%); border-color: #dfc987; box-shadow: 0 4px 0 #cbb36f, 0 6px 12px rgba(86,62,20,.12); }
nav a[href*="register"]:hover, nav a[href*="admin"]:hover, nav a[href*="login"]:hover { color: #78151c; background: linear-gradient(180deg,#fff5ce 0%,#eed07b 100%); border-color: #d7b650; box-shadow: 0 6px 0 #b7963c, 0 9px 16px rgba(116,78,9,.19); }
.cart-link { display: inline-flex; align-items: center; gap: .45rem; }
.cart-badge { display: inline-grid; min-width: 1.25rem; height: 1.25rem; padding: 0 .25rem; place-items: center; color: #fff; background: var(--coral); border-radius: 999px; font-size: .7rem; font-weight: 800; line-height: 1; }
nav .inline { margin-left: .25rem; }
nav .inline button { min-height: 38px; padding: .45rem .85rem; color: #604b2b; background: linear-gradient(180deg,#fffdf7 0%,#f5e8c9 100%); border: 1px solid #dfc987; border-radius: 999px; box-shadow: 0 4px 0 #cbb36f, 0 6px 12px rgba(86,62,20,.12); font-size: .82rem; }
nav .inline button:hover { color: #78151c; background: linear-gradient(180deg,#fff5ce 0%,#eed07b 100%); border-color: #d7b650; transform: translateY(-2px); box-shadow: 0 6px 0 #b7963c, 0 9px 16px rgba(116,78,9,.19); }
nav .inline button:active { transform: translateY(2px); box-shadow: 0 1px 0 #b7963c; }
main { width: min(1200px, 100%); margin: 0 auto; padding: .9rem 1.25rem 4rem; }
h1, h2, h3 { color: var(--navy); letter-spacing: -.04em; }
h1 { margin: 0; font-size: clamp(2rem, 4.3vw, 3.35rem); line-height: 1.08; }
h2 { margin: .25rem 0 .65rem; font-size: 1.35rem; line-height: 1.2; }
h3 { margin: .15rem 0 .5rem; }
p { line-height: 1.6; }
.note, small { color: var(--muted); }
main > h1 { margin: 1.2rem 0 1.4rem; }

.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(270px, .85fr); align-items: center; gap: 1rem; overflow: hidden; min-height: 350px; margin: 1.15rem 0 1.4rem; padding: clamp(2rem, 5.5vw, 4.4rem); color: #fff; background: linear-gradient(118deg,#aa1522 0%,#d51d2b 62%,#e94a46 100%); border: 1px solid rgba(255,255,255,.38); border-radius: 12px; box-shadow: 0 18px 45px rgba(150,24,36,.2); }
.hero::before { position: absolute; z-index: -1; top: -10rem; right: 16%; width: 32rem; height: 32rem; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; content: ""; box-shadow: 0 0 0 42px rgba(255,255,255,.035), 0 0 0 85px rgba(255,255,255,.025); }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { max-width: 610px; color: #fff; font-size: clamp(2.4rem, 5vw, 4.35rem); letter-spacing: -.06em; }
.typing-cursor { display: inline-block; width: .065em; height: .88em; margin-left: .1em; background: #ffd55f; vertical-align: -.06em; animation: typing-caret .85s steps(2,start) infinite; }
@keyframes typing-caret { to { visibility: hidden; } }
.hero p { max-width: 580px; margin: 1rem 0 0; color: #fff; font-size: 1.12rem; font-weight: 550; line-height: 1.7; text-shadow: 0 1px 2px rgba(75,8,16,.24); }
.hero-kicker, .eyebrow { color: #ffc8ba; font-size: .73rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero-kicker { display: flex; align-items: center; gap: .6rem; margin-bottom: .95rem; color: #fff2cf; font-size: .98rem; font-weight: 750; letter-spacing: .015em; text-transform: none; text-shadow: 0 1px 2px rgba(75,8,16,.3); }
.hero-kicker::before { width: 20px; height: 2px; background: #ffd55f; content: ""; }
.section-heading .eyebrow { color: #c3212e; }
.practice-carousel { position: relative; z-index: 1; justify-self: end; width: min(100%,430px); overflow: hidden; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.38); border-radius: 12px; box-shadow: 0 18px 40px rgba(65,12,20,.28); }
.practice-carousel-track { position: relative; aspect-ratio: 1.32; }
.practice-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .55s ease; pointer-events: none; }
.practice-slide.is-active { opacity: 1; pointer-events: auto; }
.practice-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.practice-slide::after { position: absolute; inset: 45% 0 0; background: linear-gradient(transparent,rgba(30,22,24,.75)); content: ""; }
.practice-slide figcaption { position: absolute; z-index: 1; right: 1rem; bottom: .9rem; left: 1rem; display: grid; justify-items: start; gap: .35rem; color: #fff; font-size: .95rem; font-weight: 750; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.slide-tag { padding: .22rem .48rem; color: #8f1520; background: #fff; border-radius: 3px; font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-shadow: none; text-transform: uppercase; }
.carousel-controls { display: flex; min-height: 48px; align-items: center; justify-content: space-between; padding: .3rem .7rem; background: rgba(255,255,255,.97); }
.carousel-arrow { display: grid; min-width: 34px; min-height: 34px; height: 34px; place-items: center; padding: 0 .6rem; color: #a81725; background: #fff0ef; border: 0; border-radius: 50px; box-shadow: none; cursor: pointer; font-size: .75rem; font-weight: 750; }
.carousel-arrow:hover, .carousel-dot:hover { background: #f7dedd; }
.carousel-dots { display: flex; align-items: center; gap: .5rem; }
.carousel-dot { width: 9px; height: 9px; min-height: 0; padding: 0; background: #d7c9c7; border: 0; border-radius: 50%; box-shadow: none; cursor: pointer; }
.carousel-dot.is-active { width: 23px; background: #c31b2a; border-radius: 99px; }
.carousel-dot:active { transform: none; box-shadow: none; }
.carousel-upload-form { grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); align-items: end; margin-bottom: 1.2rem; }
.admin-carousel-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 1rem; }
.admin-carousel-item { display: grid; align-content: start; gap: .65rem; padding: .8rem; background: #fffafa; border: 1px solid var(--line); border-radius: 8px; }
.admin-carousel-item > img { width: 100%; aspect-ratio: 1.45; object-fit: cover; border-radius: 5px; }
.admin-carousel-item .form { gap: .65rem; }
.hero-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero .hero-button { color: #604719; background: linear-gradient(180deg,#fffdf5 0%,#f1dfa9 100%); border: 1px solid #d8bd68; box-shadow: 0 5px 0 #bd9c43, 0 9px 18px rgba(70,14,18,.22); }
.hero .hero-button:hover { color: #71141c; background: linear-gradient(180deg,#fff3c6 0%,#e9c65c 100%); border-color: #c8a53b; transform: translateY(-2px); box-shadow: 0 7px 0 #a88327, 0 13px 22px rgba(70,14,18,.26); }
.hero .hero-button:active { transform: translateY(3px); box-shadow: 0 1px 0 #a88327, 0 3px 8px rgba(70,14,18,.18); }
.hero-tip { color: #fff; font-size: .98rem; font-weight: 600; line-height: 1.5; text-shadow: 0 1px 2px rgba(75,8,16,.28); }
.student-benefits { display: grid; grid-template-columns: repeat(3,1fr); gap: .85rem; margin: 0 0 2.5rem; }
.student-benefits > div { display: grid; grid-template-columns: auto 1fr; column-gap: .8rem; align-items: center; padding: 1.05rem; background: #fff; border: 1px solid var(--line); border-bottom: 3px solid #d51d2b; border-radius: 8px; box-shadow: 0 7px 22px rgba(65,35,35,.04); }
.student-benefits strong, .student-benefits small { grid-column: 2; }
.student-benefits strong { color: var(--navy); font-size: .94rem; }
.student-benefits small { margin-top: .18rem; color: var(--muted); font-size: .82rem; }
.benefit-icon { grid-row: 1 / span 2; display: grid; width: 44px; height: 44px; place-items: center; color: var(--blue); background: var(--sky); border-radius: 15px; }
.benefit-icon.mint { color: #168462; background: var(--mint); }
.benefit-icon.peach { color: #bf634c; background: #fff0e9; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; }
.section-heading h2 { margin: .35rem 0 0; font-size: 1.75rem; }
.section-heading h1 { margin-top: .25rem; }
.section-heading p { margin: 0; color: var(--muted); }
.set-card { position: relative; }
.set-topline { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.set-mark { color: #8190a7; font-size: .76rem; font-weight: 650; }
.set-context { margin: .45rem 0 1.15rem; color: var(--muted); }
.set-contents-link { display: inline-flex; align-items: center; gap: .35rem; align-self: flex-start; margin: -.55rem 0 1.05rem; color: var(--blue-dark); font-size: .86rem; font-weight: 750; text-decoration: none; }
.set-contents-link:hover { gap: .55rem; }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: 0 0 1.2rem; color: var(--muted); font-size: .9rem; }
.price-row strong { color: var(--blue-dark); font-size: 1.02rem; }
.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; padding: 2.2rem; color: var(--muted); background: var(--surface); border: 1px dashed #c7d2e4; border-radius: 20px; }
.empty-state strong { color: var(--ink); font-size: 1.05rem; }
.empty-state .button { margin-top: .6rem; }
.student-note { display: flex; justify-content: center; gap: .45rem; margin: 2rem 0 0; padding: 1rem; color: #5e5360; background: #fff5f2; border: 1px solid #f2ded9; border-radius: 8px; text-align: center; }
.student-note strong { color: var(--blue-dark); }
.login-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: clamp(1.5rem,4vw,3.5rem); min-height: 62vh; padding: clamp(1rem,4vw,3rem) 0; }
.login-panel { width: 100%; max-width: 530px; justify-self: center; }
.login-panel > h1 { margin-bottom: 1.25rem; font-size: clamp(1.8rem,3vw,2.65rem); }
.login-panel > .form { padding: 1.5rem; }
.login-panel .demo-box { max-width: none; }
.login-layout > .practice-carousel { width: min(100%,520px); justify-self: center; }

.filters { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; margin: 0 0 1.5rem; padding: .85rem; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px rgba(24,42,78,.035); }
.filters select { min-width: 150px; flex: 1 1 150px; }

button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .68rem 1.2rem; color: #fff; background: linear-gradient(135deg,#e43b45 0%,#c41728 100%); border: 1px solid #b91523; border-radius: 9px; box-shadow: 0 4px 0 #9e111d, 0 8px 16px rgba(201,27,42,.2); text-decoration: none; cursor: pointer; font-size: .88rem; font-weight: 760; transition: transform .16s ease, color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
button:hover, .button:hover { color: #fff; background: linear-gradient(135deg,#c92532 0%,#a90f1d 100%); border-color: #950f1a; transform: translateY(-2px); box-shadow: 0 5px 0 #820c16, 0 12px 20px rgba(201,27,42,.25); }
button:focus-visible, .button:focus-visible, nav a:focus-visible { outline: 3px solid #ffb38e; outline-offset: 3px; }
button:active, .button:active { transform: translateY(2px); box-shadow: 0 1px 0 #820c16, 0 3px 8px rgba(201,27,42,.16); }
button:disabled { cursor: not-allowed; opacity: .45; transform: none; box-shadow: none; }
.secondary { color: #43526d; background: #f2f5fa; border-color: #e3e8f1; box-shadow: none; }
.secondary:hover { color: #263a61; background: #e8eef9; border-color: #d6dfef; box-shadow: none; }
.danger { color: #a1443e; background: #fff1ef; border-color: #f5d8d4; box-shadow: none; }
.danger:hover { color: #fff; background: #c64d49; border-color: #c64d49; }
input, select, textarea { width: auto; min-height: 44px; padding: .68rem .8rem; color: #252a38; background: #fff; border: 1px solid #b8c0ce; border-radius: 11px; box-shadow: 0 1px 2px rgba(22,36,61,.025); }
select { font-size: .98rem; font-weight: 600; }
select option { color: #252a38; background-color: #fff; font-size: 1rem; }
select option:disabled { color: #626b7b; }
input::placeholder, textarea::placeholder { color: #96a1b3; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(213,29,43,.2); border-color: var(--blue); }
input[type="file"] { padding: .45rem; background: #f9fbff; }
input[type="file"]::file-selector-button { margin-right: .7rem; padding: .48rem .7rem; color: #43526d; background: #edf2fb; border: 0; border-radius: 8px; font-weight: 650; cursor: pointer; }
label { display: grid; gap: .42rem; color: #4e5d76; font-size: .9rem; font-weight: 650; }

.grid, .admin-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(265px,1fr)); gap: 1.1rem; }
.admin-page { display: grid; gap: 1.1rem; }
.admin-page > h1, .admin-page > p { margin: 0; }
.admin-grid { align-items: stretch; }
.admin-grid > .card { min-width: 0; }
.admin-sets-section { min-width: 0; }
.set-add-form { grid-template-columns: minmax(220px,1.45fr) minmax(170px,1.2fr) repeat(2,minmax(140px,.8fr)) auto; align-items: end; margin-bottom: 1rem; }
.set-admin-item { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: .8rem 1rem; margin-top: .9rem; padding: 1rem; background: linear-gradient(135deg,#fffdf8,#fff8e8); border: 1px solid #dfcf9e; border-left: 5px solid #d4ad3f; border-radius: 10px; box-shadow: 0 4px 12px rgba(95,71,21,.07); }
.set-admin-heading { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: .75rem; padding-bottom: .65rem; border-bottom: 1px solid #eee2c3; }
.set-admin-heading strong { color: #342918; font-size: 1.03rem; }
.set-admin-archived { background: #f7f7f5; border-color: #d4d4ce; border-left-color: #888b92; box-shadow: none; }
.set-edit-form { grid-template-columns: minmax(230px,1.5fr) minmax(170px,1.2fr) repeat(2,minmax(140px,.8fr)) auto; align-items: end; min-width: 0; }
.set-edit-form input, .set-edit-form select { min-width: 0; }
.set-delete-form { display: grid; justify-items: end; gap: .25rem; }
.set-delete-form button { white-space: nowrap; }
.card { padding: 1.35rem; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 9px 26px rgba(52,34,34,.05); }
.card h2 { font-size: 1.18rem; }
.grid .card { display: flex; flex-direction: column; min-height: 255px; border-top: 3px solid #d51d2b; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.grid .card:hover { transform: translateY(-3px); border-color: #d6e0f2; box-shadow: 0 16px 34px rgba(24,42,78,.09); }
.grid .card .actions { margin-top: auto; }
.pill { display: inline-flex; align-self: flex-start; padding: .33rem .68rem; color: #a71a25; background: #fff0ef; border-radius: 4px; font-size: .76rem; font-weight: 750; }
.actions { display: flex; gap: .55rem; flex-wrap: wrap; }
.actions form { flex: 1 1 145px; }
.actions button { width: 100%; }
.form { display: grid; gap: .85rem; }
.form input, .form select, .form textarea { width: 100%; }
.purchase { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: .85rem 0; }
.summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; padding: 1.15rem 1.3rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 22px rgba(24,42,78,.045); }
.summary h2 { margin: 0; }
.flash { margin: 1rem 0; padding: .85rem 1rem; border-radius: 12px; border: 1px solid transparent; }
.success { color: #17643b; background: #e9f8ef; border-color: #c7ecd4; }
.error { color: #922d2a; background: #fff0ef; border-color: #f3ceca; }
.inline { display: inline; }
.inline button { min-height: 38px; padding: .45rem .8rem; color: #6b7689; background: transparent; border-color: transparent; box-shadow: none; font-size: .82rem; }
.inline button:hover { color: #a23e3a; background: #fff0ed; border-color: #f7d5ce; box-shadow: none; transform: none; }
.demo-box { max-width: 560px; margin-top: 1.2rem; background: linear-gradient(135deg,#f4f7ff,#fff); }
.demo-box p { margin: .25rem 0; }
.inline-form { margin-top: .8rem; }
.academy-footer { margin-top: 3rem; padding: 2.6rem max(1.25rem, calc((100vw - 1150px) / 2)) 1.2rem; color: #e9eaf0; background: #20283d; border-top: 5px solid #d51d2b; }
.academy-footer-inner { display: grid; grid-template-columns: 1.5fr 1fr auto; align-items: center; gap: 2.5rem; max-width: 1150px; margin: auto; }
.footer-brand-block p { margin: .55rem 0 0; color: #c1c7d3; font-size: .88rem; }
.footer-banner-logo { display: block; width: min(100%,360px); height: 90px; object-fit: cover; object-position: center; border: 3px solid #fff; }
.footer-links { display: grid; justify-items: start; gap: .55rem; }
.footer-links strong { margin-bottom: .15rem; color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; }
.footer-links a { color: #e1e3eb; font-size: .87rem; text-decoration: none; }
.footer-links a:hover { color: #ffc44d; }
.footer-seal-wrap img { display: block; width: 90px; height: 90px; object-fit: cover; border: 3px solid #fff; border-radius: 50%; }
.footer-bottom { max-width: 1150px; margin: 1.7rem auto 0; padding-top: .9rem; color: #aeb5c4; border-top: 1px solid rgba(255,255,255,.15); font-size: .77rem; }
.purchased-set-card { margin: 1rem 0; }
.purchased-papers { margin-top: .8rem; }
.purchased-papers > .purchase { padding: 1rem 0; border-top: 1px solid #edf0f5; }
.submission-status { display: grid; gap: .5rem; margin-top: .7rem; padding: .85rem; background: #f7f9fd; border: 1px solid #edf0f6; border-radius: 13px; }
.set-detail-heading { align-items: center; margin: 1.7rem 0 1.25rem; }
.set-detail-heading h1 { margin: .35rem 0; font-size: clamp(2rem,4.5vw,3rem); }
.set-detail-heading p { margin: .55rem 0 0; color: var(--muted); }
.set-contents-list { display: grid; gap: .8rem; }
.set-paper-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1rem 1.2rem; }
.paper-icon { display: grid; width: 52px; height: 52px; place-items: center; color: #c21b29; background: #fff0ef; border-radius: 8px; }
.paper-description h2 { margin: .5rem 0 .15rem; font-size: 1.12rem; }
.paper-description p { margin: 0; color: var(--muted); font-size: .86rem; }
.paper-admin-list { display: grid; gap: 1rem; margin-top: 1rem; }
.paper-set-group { min-width: 0; padding: .9rem 1rem; background: linear-gradient(135deg,#fffdf8,#fff8e8); border: 1px solid #dfcf9e; border-left: 5px solid #d4ad3f; border-radius: 10px; box-shadow: 0 4px 12px rgba(95,71,21,.07); }
.paper-set-group-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .35rem; padding-bottom: .7rem; color: #342918; border-bottom: 1px solid #eadfbe; }
.paper-admin-card { margin: 0; padding: 1rem 0; background: transparent; border: 0; border-bottom: 1px solid #eadfbe; border-radius: 0; box-shadow: none; }
.paper-admin-card:last-of-type { border-bottom: 0; }
.paper-admin-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .9rem; color: #342918; }
.paper-edit-form { grid-template-columns: minmax(150px,1fr) minmax(170px,1fr) minmax(200px,1.25fr) auto; align-items: end; }
.paper-admin-actions { margin-top: .75rem; }
.paper-admin-actions form { flex: 0 1 auto; }
.archived-pill { color: #755514; background: #fff4d7; }
.paper-admin-card.is-archived { background: transparent; border-bottom-color: #d4d4ce; }

.viewer-shell { max-width: 1000px; margin: 1.5rem auto 0; }
.viewer-shell h1 { font-size: clamp(1.6rem,4vw,2.5rem); }
.watermark, .viewer-note { color: var(--muted); }
.review-summary { margin-top: 1rem; }
.viewer-controls { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; padding: .8rem; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.preview-upgrade { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0; padding: 1rem 1.15rem; background: linear-gradient(110deg,#fff0ef,#fff8ed); border: 1px solid #efd9d6; border-radius: 8px; }
.preview-upgrade > div { display: grid; gap: .2rem; }
.preview-upgrade strong { color: var(--navy); }
.preview-upgrade span { color: var(--muted); font-size: .88rem; }
.preview-upgrade form { margin: 0; }
#page-label { margin: 0 auto; color: #53627a; font-size: .9rem; font-weight: 750; }
#paper-stage { display: flex; min-height: 540px; align-items: flex-start; justify-content: center; overflow: auto; padding: .9rem; background: #e9edf5; border: 1px solid #dbe2ed; border-radius: 18px; box-shadow: inset 0 2px 7px rgba(24,42,78,.05); }
#paper-page { display: block; max-width: 100%; height: auto; background: #fff; border: 1px solid #e2e8f2; border-radius: 3px; box-shadow: 0 8px 24px rgba(24,42,78,.13); user-select: none; }

.review-layout { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(280px,.8fr); gap: 1rem; align-items: start; }
.review-heading, .review-tools, .page-controls { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.review-heading { margin-bottom: 1rem; }
.review-heading h1 { font-size: clamp(1.8rem,4vw,2.8rem); }
.review-tools { justify-content: flex-start; margin-bottom: .75rem; }
.review-tools label { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .85rem; }
#annotation-stage { position: relative; overflow: auto; margin-top: .75rem; background: #e9edf5; border: 1px solid var(--line); border-radius: 16px; }
#answer-page { display: block; width: 100%; height: auto; }
#annotation-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.review-form { position: sticky; top: 5.5rem; display: grid; gap: .8rem; }
.review-form h2 { margin: 0; }
.mark-row { position: relative; display: grid; grid-template-columns: 1fr 4.3rem auto 4.3rem 2.5rem; gap: .35rem; align-items: center; }
.mark-row input { min-width: 0; width: 100%; }
.mark-row button { min-height: 36px; padding: .25rem .7rem; }
.mark-error { grid-column: 1 / -1; color: #b42318; }
.total-mark { padding: .8rem; color: var(--blue-dark); background: var(--sky); border-radius: 12px; font-size: 1.05rem; font-weight: 750; }

@media (max-width: 820px) {
  nav { align-items: flex-start; flex-direction: column; gap: .55rem; }
  nav span { justify-content: flex-start; }
  nav { padding-inline: 1rem; }
  .hero { grid-template-columns: 1fr minmax(190px,.55fr); padding: 2.5rem; }
  .set-add-form, .set-edit-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .set-add-form button, .set-edit-form button { justify-self: start; }
  .set-admin-item { grid-template-columns: minmax(0,1fr) auto; }
  .academy-footer-inner { grid-template-columns: 1fr auto; gap: 1.6rem; }
  .footer-links { grid-column: 1; grid-row: 2; }
  .footer-seal-wrap { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 700px) {
  main { padding: .75rem .85rem 3rem; }
  .review-layout { grid-template-columns: 1fr; }
  .set-add-form, .set-edit-form { grid-template-columns: 1fr; }
  .set-admin-item { grid-template-columns: 1fr; }
  .set-delete-form { justify-items: stretch; }
  .login-layout { grid-template-columns: 1fr; gap: 1.5rem; min-height: auto; padding: .5rem 0 1.5rem; }
  .login-layout > .practice-carousel { width: min(100%,520px); }
  .review-form { position: static; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 2.1rem 1.35rem 1.3rem; border-radius: 9px; }
  .hero h1 { max-width: 520px; font-size: clamp(2.25rem,11vw,3.4rem); }
  .practice-carousel { width: 100%; justify-self: center; margin-top: .5rem; }
  .student-benefits { grid-template-columns: 1fr; gap: .6rem; margin-bottom: 2rem; }
  .student-benefits > div { padding: .85rem 1rem; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .set-paper-card { grid-template-columns: auto 1fr; }
  .set-paper-card > .button { grid-column: 1 / -1; width: 100%; }
  .paper-edit-form { grid-template-columns: 1fr; }
  .student-note { align-items: center; flex-direction: column; }
  .filters > * { flex: 1 1 145px; }
  .summary { align-items: stretch; flex-direction: column; }
  .preview-upgrade { align-items: stretch; flex-direction: column; }
  .preview-upgrade form button, .preview-upgrade > .button { width: 100%; }
  #page-label { order: -1; width: 100%; margin: 0; text-align: center; }
  #paper-stage { min-height: 360px; padding: .45rem; }
  .card { padding: 1.05rem; border-radius: 17px; }
  .academy-topline-inner { padding-inline: .85rem; font-size: .68rem; }
  .academy-footer { padding-inline: 1rem; }
  .footer-banner-logo { width: min(100%,300px); height: 76px; }
  .actions > *, .actions form { flex: 1 1 100%; }
}
@media (max-width: 450px) {
  nav span { gap: .1rem; }
  nav span > a { padding: .48rem .58rem; font-size: .81rem; }
  .brand-mark { width: 36px; height: 36px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: .65rem; }
  .purchase { align-items: flex-start; }
  .mark-row { grid-template-columns: 1fr 3.6rem auto 3.6rem 2.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .ticker-track { animation: none; }
  .ticker-track > span[aria-hidden="true"] { display: none; }
  .practice-slide { transition: none; }
  .typing-cursor { animation: none; }
}
