:root {
  --bg: #0b0b0f;
  --surface: #14161d;
  --surface-2: #1b1e27;
  --surface-3: #232733;
  --line: #232733;
  --line-2: #323848;
  --text: #f4f6fa;
  --text-2: #a3acbb;
  --text-3: #8a93a3;

  --brand: #19b6dc;
  --brand-hover: #4cc9e8;
  --on-brand: #04151c;
  --brand-wash: rgba(25, 182, 220, .12);

  --sci: #2ecc9a;
  --math: #8b7bff;
  --soc: #ff9f45;

  --danger: #ff6b5e;
  --ok: #2ecc9a;

  --font: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 20px 40px -24px rgba(0, 0, 0, .8);
  --ease: cubic-bezier(.16, 1, .3, 1);

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 93.75%; -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-2) var(--bg); }
body { margin: 0; font: 400 1.0625rem/1.65 var(--font); color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
main { width: 100%; max-width: var(--max); margin: 0 auto; padding: clamp(20px, 4vw, 40px) var(--gutter) 96px; flex: 1; }
main.wide { max-width: 1440px; }
::selection { background: var(--brand); color: var(--on-brand); }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; margin: 0; text-wrap: balance; color: #fff; }
p { margin: 0; }
code { font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--text-3); }
.danger { color: var(--danger); }

/* ---------- header ---------- */
.masthead { background: rgba(11, 11, 15, .92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(10px); }
.masthead-in { max-width: var(--max); margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; gap: 24px; min-height: 72px; }
.masthead-in.wide { max-width: 1440px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 30px; width: auto; filter: brightness(1.15); }
/* The logo art has black parts, so it sits on a white tile to stay visible on the dark site. */
.brand .brand-icon { height: 44px; padding: 4px 6px; background: #fff; border-radius: 10px; filter: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: .95rem; }
.nav > a:not(.btn), .nav .linklike { color: var(--text-2); text-decoration: none; padding: 8px 14px; border-radius: 8px; transition: color .2s var(--ease), background-color .2s var(--ease); }
.nav > a:not(.btn):hover, .nav .linklike:hover { color: #fff; background: var(--surface); text-decoration: none; }
.nav form { margin: 0; }
.nav .btn { margin-left: 8px; }
.who { display: flex; align-items: center; gap: 10px; margin-left: 10px; padding-left: 16px; border-left: 1px solid var(--line-2); text-decoration: none; }
.who:hover .who-txt > span:first-child { color: var(--brand); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: .95rem; }
.who-txt { display: grid; line-height: 1.2; font-size: .88rem; color: #fff; }
.who-no { font-size: .76rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.nav-toggle, .nav-btn { display: none; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; }
.linklike:hover { text-decoration: underline; }
.linklike.danger { color: var(--danger); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 700 1rem/1 var(--font); background: var(--brand); color: var(--on-brand); border: 1px solid transparent; border-radius: 10px;
  padding: 14px 22px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: var(--brand-hover); color: var(--on-brand); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .i { transition: transform .25s var(--ease); }
.btn:hover .i { transform: translateX(3px); }
.btn-sm { padding: 11px 18px; font-size: .94rem; }
.btn-lg { padding: 17px 26px; font-size: 1.04rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: #fff; border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface); color: #fff; border-color: var(--text-3); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: clamp(32px, 6vw, 80px); align-items: center; padding: clamp(24px, 6vw, 72px) 0 clamp(24px, 4vw, 48px); }
.hero h1 { font-size: clamp(2.7rem, 6.2vw, 5rem); line-height: 1; letter-spacing: -0.045em; }
.accent { color: var(--brand); }
.lede { margin-top: 24px; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--text-2); max-width: 46ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.stats { display: flex; flex-wrap: wrap; gap: 16px 44px; margin: 44px 0 0; }
.stats dt { color: #fff; font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; }
.stats dd { margin: 2px 0 0; color: var(--text-3); font-size: .9rem; }

.finder { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.finder h2 { font-size: .98rem; font-weight: 600; letter-spacing: 0; color: var(--text-2); }
.seg-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg-group legend { padding: 0; margin-bottom: 8px; font-size: .78rem; font-weight: 600; color: var(--text-3); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-block; padding: 10px 16px; border-radius: 9px; background: var(--surface-2); color: var(--text); font-size: .92rem; font-weight: 500; cursor: pointer; border: 1px solid transparent; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.seg label:hover span { border-color: var(--line-2); background: var(--surface-3); }
.seg input:checked + span { background: var(--brand); color: var(--on-brand); font-weight: 700; }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 3px; }
.finder .btn { margin-top: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .finder { animation: rise .8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .06s; } .hero-copy > :nth-child(3) { animation-delay: .12s; } .hero-copy > :nth-child(4) { animation-delay: .18s; }
  .finder { animation-delay: .2s; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }
}

/* ---------- sections ---------- */
.band { margin-top: clamp(64px, 9vw, 112px); }
main > .band:first-child { margin-top: 0; }
.band > h2, .band-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.band > h2 { margin-bottom: 28px; }
.band-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.more:hover { text-decoration: underline; }
.page-h { font-size: clamp(2.1rem, 4.8vw, 3.4rem); margin-bottom: 10px; }
.lede-sm { color: var(--text-2); margin-bottom: 28px; }
.empty { padding: 36px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--text-2); display: grid; gap: 16px; justify-items: start; }

/* subject tones */
.t-sci { --t: var(--sci); }
.t-math { --t: var(--math); }
.t-soc { --t: var(--soc); }
.t-brand { --t: var(--brand); }

.subjects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.subject { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 16px; align-items: center; padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: #fff; text-decoration: none; transition: border-color .25s var(--ease), transform .25s var(--ease); }
.subject:hover { color: #fff; border-color: var(--t); transform: translateY(-2px); }
.subject-icon { grid-row: span 2; width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--t) 16%, transparent); color: var(--t); }
.subject-icon .i { width: 26px; height: 26px; }
.subject-name { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.subject-n { font-size: .88rem; color: var(--text-3); }
.subject-go { grid-row: 1 / span 2; grid-column: 3; color: var(--text-3); transition: transform .25s var(--ease), color .25s var(--ease); }
.subject:hover .subject-go { color: var(--t); transform: translateX(3px); }

/* product cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card a { position: relative; height: 100%; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: #fff; text-decoration: none; transition: transform .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease); }
.card a::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--t); }
.card a:hover { transform: translateY(-3px); border-color: var(--line-2); background: var(--surface-2); color: #fff; }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 24px 20px 20px; flex: 1; }
.card-kind { font-size: .76rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--t); }
.card-title { font-weight: 600; font-size: 1.05rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; }
.card-price { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.card-price b { font-weight: 700; font-size: 1.3rem; }
.card-price s, .price s { color: var(--text-3); font-size: .88rem; }
.card-meta { font-size: .8rem; color: var(--text-3); white-space: nowrap; }
.owned { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--sci); font-size: .95rem; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: grid; gap: 6px; align-content: start; }
.steps li::before { content: '0' counter(step); color: var(--brand); font-weight: 700; font-size: .9rem; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.steps b { font-weight: 700; font-size: 1.15rem; color: #fff; }
.steps span { color: var(--text-2); font-size: .94rem; }

/* protection band */
.protect { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.protect h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 14px; }
.protect-copy p { color: var(--text-2); }
.protect-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.protect-list li { display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.protect-list .i { width: 40px; height: 40px; padding: 9px; border-radius: 10px; background: var(--brand-wash); color: var(--brand); }
.protect-list span { display: grid; gap: 2px; font-size: .93rem; color: var(--text-2); }
.protect-list b { color: #fff; font-weight: 600; font-size: 1rem; }

/* ---------- browse ---------- */
.filters { display: grid; gap: 12px; margin: 0 0 32px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips-label { width: 76px; font-size: .8rem; font-weight: 600; color: var(--text-3); }
.chip { padding: 8px 14px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 500; background: var(--surface-2); border: 1px solid transparent; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.chip:hover { color: #fff; background: var(--surface-3); border-color: var(--line-2); }
.chip.on { background: var(--brand); color: var(--on-brand); font-weight: 700; }

/* ---------- product ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--text-3); margin-bottom: 24px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.product { display: grid; grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.product-art { width: 100%; }
.cover { position: relative; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; color: #fff; }
.cover-lg { aspect-ratio: 4 / 4.4; border-radius: 22px; padding: 24px; background: var(--surface); border: 1px solid var(--line); }
.cover-lg::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--t); }
.cover-lg::after { content: ''; position: absolute; width: 360px; height: 360px; right: -120px; bottom: -150px; border-radius: 50%; background: color-mix(in srgb, var(--t) 14%, transparent); }
.cover-top { display: flex; gap: 8px; position: relative; z-index: 1; }
.cover-top span { font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); }
.cover-icon { position: absolute; right: 30px; bottom: 30px; z-index: 1; color: var(--t); }
.cover-icon .i { width: 110px; height: 110px; stroke-width: 1.3; }
.cover-subj { position: relative; z-index: 1; align-self: end; font-weight: 800; font-size: 2rem; letter-spacing: -0.03em; }
.pill { display: inline-block; font-size: .76rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--t); margin-bottom: 14px; }
.product h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
.meta { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.meta li { font-size: .86rem; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); padding: 5px 11px; border-radius: 8px; }
.desc { margin-top: 24px; display: grid; gap: 12px; color: var(--text-2); max-width: 65ch; }
.buy { margin-top: 30px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; display: grid; gap: 14px; max-width: 460px; }
.buy form { margin: 0; }
.price { display: flex; align-items: baseline; gap: 12px; font-variant-numeric: tabular-nums; }
.price b { font-weight: 800; font-size: 2.4rem; letter-spacing: -0.03em; color: #fff; }
.off { font-size: .8rem; font-weight: 700; color: var(--sci); background: rgba(46, 204, 154, .12); padding: 4px 9px; border-radius: 7px; }
.owned-note { display: flex; gap: 8px; align-items: center; font-weight: 600; color: var(--sci); }
.assure { list-style: none; margin: 4px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .88rem; color: var(--text-2); }
.assure li { display: flex; gap: 10px; align-items: center; }
.assure .i { color: var(--brand); }
.hint { display: flex; gap: 8px; align-items: flex-start; font-size: .86rem; color: var(--text-3); line-height: 1.5; }

/* ---------- panels and forms ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.auth { max-width: 460px; margin: clamp(0px, 3vw, 28px) auto 0; }
.auth-in { padding: clamp(24px, 5vw, 40px); }
.auth h1 { font-size: clamp(1.8rem, 5vw, 2.3rem); margin-bottom: 10px; }
.order-no { font-size: .8rem; color: var(--text-3); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.form { display: grid; gap: 16px; margin-top: 8px; }
.field { display: grid; gap: 7px; }
.cell-label { font-size: .86rem; font-weight: 600; color: var(--text); }
.field input:not([type=file]), .field select, .field textarea, .search input {
  width: 100%; border: 1px solid var(--line-2); background: var(--bg); border-radius: var(--r-sm);
  font: 400 1rem/1.4 var(--font); color: #fff; padding: 12px 14px; min-height: 50px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input::placeholder, .field textarea::placeholder, .search input::placeholder { color: var(--text-3); }
.field select { appearance: none; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93a3' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat; padding-right: 40px; }
.field textarea { resize: vertical; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--text-3); }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-wash); }
.field input[type=file] { font: inherit; color: var(--text-2); padding: 10px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); background: var(--bg); }
.field input[type=file]::file-selector-button { font: 600 .9rem/1 var(--font); background: var(--surface-2); color: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 14px; margin-right: 12px; cursor: pointer; }
.form > .btn { margin-top: 8px; }
.switch { margin-top: 24px; color: var(--text-2); text-align: center; }
.err { margin: 4px 0 8px; padding: 12px 14px; background: rgba(255, 107, 94, .1); border: 1px solid rgba(255, 107, 94, .35); border-radius: var(--r-sm); color: #ff9a90; font-weight: 500; }
.warn { margin: 18px 0 14px; padding: 12px 14px; background: rgba(255, 159, 69, .1); border: 1px solid rgba(255, 159, 69, .35); border-radius: var(--r-sm); color: #ffc48c; font-size: .93rem; }
.flash { max-width: var(--max); margin: 18px auto 0; width: calc(100% - 2 * var(--gutter)); padding: 12px 16px; background: rgba(46, 204, 154, .1); border: 1px solid rgba(46, 204, 154, .35); border-radius: 12px; color: #7fe3c2; font-weight: 500; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); color: var(--text-3); margin-top: auto; }
/* Logo column, then Material / Help / Contact spread across the full width; a full-width rule above the fine print. */
.foot-in { max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter) 32px; display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px 48px; align-items: start; }
.foot-in.wide { max-width: 1440px; }
.foot-logo { display: block; width: 100%; max-width: 280px; height: auto; padding: 10px 14px; background: #fff; border-radius: 12px; }
.foot-nav { display: grid; gap: 10px; align-content: start; font-size: .95rem; }
.foot-h { font-size: .8rem; font-weight: 600; color: #fff; margin-bottom: 4px; }
.foot-nav a { color: var(--text-2); text-decoration: none; justify-self: start; }
.foot-nav a:hover { color: #fff; }
.foot-contact { font-variant-numeric: tabular-nums; }
.foot-contact a { overflow-wrap: anywhere; }
.foot-bottom { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 32px; border-top: 1px solid var(--line); padding-top: 22px; font-size: .84rem; color: var(--text-3); }
.foot-fine { max-width: 70ch; }
.prose p { max-width: 68ch; margin-bottom: 14px; color: var(--text-2); }
.prose h2 { font-size: 1.3rem; letter-spacing: -0.02em; margin: 36px 0 12px; }
.prose ul { max-width: 68ch; margin: 0 0 14px; padding-left: 1.2em; color: var(--text-2); }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--brand); }

/* Contact details and account details: label / value rows */
.contact { max-width: 600px; margin: 24px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.contact > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.contact > div:last-child { border-bottom: 0; }
.contact dt { color: var(--text-3); font-size: .9rem; }
.contact dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.contact .addr { white-space: pre-line; }
.auth .contact { margin: 18px 0 8px; }
.auth .contact > div { grid-template-columns: 70px minmax(0, 1fr); padding: 10px 14px; }
.sub-h { font-size: 1.15rem; letter-spacing: -0.02em; margin: 28px 0 14px; }
.warn a { color: inherit; font-weight: 600; }

/* Admin: one-time password reveal */
.reveal { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; align-items: baseline; max-width: 460px; margin: 8px 0 20px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.reveal .mono { font-size: 1.05rem; color: #fff; }
.reveal .pw { font-size: 1.6rem; letter-spacing: .08em; color: var(--brand); user-select: all; }

/* ---------- reader ---------- */
body.bare main { max-width: none; padding: 0; }
body.bare .flash { position: fixed; z-index: 10; left: 50%; transform: translateX(-50%); bottom: 20px; width: min(520px, calc(100% - 32px)); margin: 0; background: #0f2a22; }
@media (prefers-reduced-motion: no-preference) {
  body.bare .flash { animation: flash-out .4s ease-in 4s forwards; }
  @keyframes flash-out { to { opacity: 0; visibility: hidden; } }
}
.reader { --zoom: 1; min-height: 100vh; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.reader-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(11, 11, 15, .95); border-bottom: 1px solid var(--line); }
.reader-back { color: #fff; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; }
.reader-back:hover { background: var(--surface); color: #fff; }
.reader-title { display: grid; min-width: 0; line-height: 1.25; }
.reader-title b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-title span { font-size: .78rem; color: var(--text-3); }
.reader-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.reader-count { font-size: .9rem; margin-right: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; background: var(--surface); padding: 6px 12px; border-radius: 8px; color: var(--text-2); }
.tool { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-2); background: transparent; color: #fff; border-radius: 10px; cursor: pointer; }
.tool:hover { background: var(--surface); }
.reader-pages { display: grid; gap: 18px; justify-items: center; padding: 24px 12px 80px; transition: filter .2s; }
.leaf { margin: 0; width: min(100%, calc(880px * var(--zoom))); aspect-ratio: 1 / 1.414; background: #fff; position: relative; border-radius: 6px; overflow: hidden; box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .8); }
.leaf.ready { aspect-ratio: auto; }
.leaf:not(.ready)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, #1b1e27 40%, #232733 50%, #1b1e27 60%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.leaf canvas { display: block; width: 100%; height: auto; pointer-events: none; }
.leaf-retry { display: none; }
.leaf.failed::after { display: none; }
.leaf.failed .leaf-retry { display: block; position: absolute; inset: 0; margin: auto; height: max-content; width: max-content; padding: 12px 16px; border: 1px solid #d6dbe3; border-radius: 10px; background: #fff; color: #0b0b0f; font: inherit; cursor: pointer; }
.reader-empty { color: var(--text-2); padding: 60px 20px; text-align: center; }
.paused .reader-pages { filter: blur(22px); }
.shield { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; background: rgba(11, 11, 15, .7); color: #fff; text-align: center; font-size: 1.1rem; cursor: pointer; }
.shield[hidden] { display: none; }
.shield p { display: grid; justify-items: center; gap: 6px; }
.shield span { font-size: .9rem; color: var(--text-2); }
/* Only the reader (the one bare page) blocks printing; receipts must print. */
@media print { .bare * { display: none !important; } .bare::after { content: 'Printing is not available for EduFinger material.'; display: block; padding: 40px; } }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 36px; }
.admin-nav { display: grid; gap: 4px; align-content: start; align-self: start; position: sticky; top: 96px; }
.admin-nav a { padding: 10px 14px; color: var(--text-2); text-decoration: none; font-weight: 500; border-radius: 9px; }
.admin-nav a:hover { background: var(--surface); color: #fff; }
.admin-nav a[aria-current] { background: var(--brand-wash); color: var(--brand); font-weight: 600; }
.tally { margin: 16px 0 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.tally .cell { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tally dt { font-size: .82rem; font-weight: 500; color: var(--text-3); }
.tally dd { margin: 6px 0 0; font-weight: 800; font-size: 1.7rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: #fff; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .78rem; font-weight: 600; color: var(--text-3); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; font-size: .88rem; white-space: nowrap; color: var(--text-2); }
.act { text-align: right; white-space: nowrap; }
.act form { margin: 0; }
.form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px; align-items: end; margin: 0 0 28px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.form-grid { grid-template-columns: 1fr 1fr; align-items: start; gap: 18px 20px; max-width: 880px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.form-grid .field:first-child, .form-grid .field:has(textarea), .form-grid .field:has(input[type=file]) { grid-column: 1 / -1; }
.check { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; }
.search { display: flex; gap: 10px; max-width: 560px; margin: 8px 0; }
.del { margin-top: 18px; }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .protect { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; }
  .product-art { max-width: 420px; }
  .admin { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .foot-in { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .admin-nav { position: static; grid-auto-flow: column; justify-content: start; overflow-x: auto; }
  .admin-nav a { white-space: nowrap; }
}
@media (max-width: 700px) {
  body { font-size: 1rem; }
  .brand img { height: 25px; }
  .brand .brand-icon { height: 38px; }
  .brand { gap: 8px; }
  .masthead-in { position: relative; min-height: 62px; }
  .nav-btn { display: grid; place-items: center; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; color: #fff; }
  .nav-btn .i { width: 22px; height: 22px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 2px; padding: 8px var(--gutter) 16px; }
  .nav > a:not(.btn), .nav .linklike { display: block; width: 100%; text-align: left; padding: 12px; }
  .nav .btn { margin: 8px 0 0; }
  .nav .who { order: -1; border-left: 0; padding: 8px 12px 12px; margin: 0; border-bottom: 1px solid var(--line); }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav-toggle:focus-visible + .nav-btn { outline: 2px solid var(--brand); outline-offset: 3px; }
  .hero h1 { font-size: 2.65rem; }
  .cta .btn { flex: 1; }
  .stats { gap: 14px 24px; }
  .stats dt { font-size: 1.05rem; }
  .finder { padding: 20px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 20px 14px 14px; }
  .card-title { font-size: .95rem; }
  .card-foot { flex-direction: column; align-items: flex-start; gap: 2px; }
  .card-meta { text-align: left; }
  .card-price s { display: none; }
  .steps { grid-template-columns: 1fr; }
  .chips-label { width: 100%; }
  .cover-lg { aspect-ratio: 16 / 10; padding: 18px; }
  .cover-icon .i { width: 76px; height: 76px; }
  .cover-subj { font-size: 1.6rem; }
  .form-row, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-in { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
  .foot-contact { grid-column: 1 / -1; }
  .contact > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .reader-title span { display: none; }
  .reader-count { margin-right: 2px; }
}
@media (max-width: 360px) { .cards { grid-template-columns: 1fr; } }

/* Receipts print cleanly: no site header, footer or buttons. */
@media print {
  .masthead, .foot, .flash, .no-print { display: none !important; }
  :root { --text: #000; --text-2: #222; --text-3: #555; --surface: #fff; --line: #ccc; }
  body, .page-h { background: #fff !important; color: #000 !important; }
}
