/* =========================================================
   Βιολογία Γ' Λυκείου — Διαδραστικό βοήθημα
   ========================================================= */

@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/commissioner-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/commissioner-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/commissioner-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --bg-2: #eaeef3;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --surface-3: #eef2f6;
  --border: #dde3ea;
  --border-strong: #c4ced9;
  --text: #17202b;
  --text-2: #3c4857;
  --muted: #677487;
  --primary: #0b8f7f;
  --primary-ink: #ffffff;
  --primary-soft: #dff4f0;
  --primary-strong: #076e62;
  --accent: #6d4aff;
  --accent-soft: #ece7ff;
  --warn: #c2410c;
  --warn-soft: #fff1e8;
  --danger: #c81e4a;
  --danger-soft: #ffe8ee;
  --ok: #138a47;
  --ok-soft: #e3f6ea;
  --info: #1f6fd1;
  --info-soft: #e5f0ff;
  --gold: #b7791f;
  --gold-soft: #fdf4e3;
  --shadow-sm: 0 1px 2px rgba(20, 30, 50, .06), 0 1px 1px rgba(20, 30, 50, .04);
  --shadow: 0 4px 16px rgba(20, 30, 50, .07), 0 1px 3px rgba(20, 30, 50, .06);
  --shadow-lg: 0 18px 40px rgba(20, 30, 50, .12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  /* βάσεις νουκλεοτιδίων */
  --A: #1aa260;
  --T: #e0414f;
  --G: #e2a21b;
  --C: #2f7fe0;
  --U: #9b51e0;
  --font: 'Commissioner', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Roboto Mono', Menlo, Consolas, monospace;
  --sidebar-w: 272px;
  --tabbar-h: 64px;
  --topbar-h: 58px;
  --content-w: 820px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1218;
    --bg-2: #141a22;
    --surface: #161c25;
    --surface-2: #1b222d;
    --surface-3: #222b38;
    --border: #2a3442;
    --border-strong: #3a4757;
    --text: #e7ecf2;
    --text-2: #c3ccd7;
    --muted: #8d9aab;
    --primary: #2ec4ad;
    --primary-ink: #04201c;
    --primary-soft: #11332f;
    --primary-strong: #5fdcc8;
    --accent: #9d86ff;
    --accent-soft: #241f45;
    --warn: #ff9a5c;
    --warn-soft: #3a2316;
    --danger: #ff6b8b;
    --danger-soft: #3b1822;
    --ok: #4ed38a;
    --ok-soft: #12301f;
    --info: #6aa8ff;
    --info-soft: #14243b;
    --gold: #f1c066;
    --gold-soft: #33280f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 4px 18px rgba(0, 0, 0, .35);
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, .5);
    --A: #3fd48a;
    --T: #ff6b78;
    --G: #f5c04a;
    --C: #5ea5ff;
    --U: #bd8bff;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1218;
  --bg-2: #141a22;
  --surface: #161c25;
  --surface-2: #1b222d;
  --surface-3: #222b38;
  --border: #2a3442;
  --border-strong: #3a4757;
  --text: #e7ecf2;
  --text-2: #c3ccd7;
  --muted: #8d9aab;
  --primary: #2ec4ad;
  --primary-ink: #04201c;
  --primary-soft: #11332f;
  --primary-strong: #5fdcc8;
  --accent: #9d86ff;
  --accent-soft: #241f45;
  --warn: #ff9a5c;
  --warn-soft: #3a2316;
  --danger: #ff6b8b;
  --danger-soft: #3b1822;
  --ok: #4ed38a;
  --ok-soft: #12301f;
  --info: #6aa8ff;
  --info-soft: #14243b;
  --gold: #f1c066;
  --gold-soft: #33280f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 4px 18px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, .5);
  --A: #3fd48a;
  --T: #ff6b78;
  --G: #f5c04a;
  --C: #5ea5ff;
  --U: #bd8bff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img, svg { max-width: 100%; }
a { color: var(--primary-strong); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 .9em; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.sidebar {
  display: none;
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 4px 8px 16px; }
.brand b { display: block; font-size: 1.08rem; }
.brand small { display: block; color: var(--muted); font-size: .78rem; margin-top: -2px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav .nav-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 10px 4px; font-weight: 700; }
.side-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 10px;
  color: var(--text-2); text-decoration: none; font-weight: 550; font-size: .95rem;
}
.side-nav a svg { flex: 0 0 auto; opacity: .85; }
.side-nav a:hover { background: var(--surface-3); color: var(--text); }
.side-nav a.active { background: var(--primary-soft); color: var(--primary-strong); }
.side-foot { padding-top: 12px; border-top: 1px solid var(--border); margin-top: 12px; }
.side-foot .theme-toggle { width: 100%; justify-content: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); display: flex; align-items: center; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 10px 0;
  display: flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.top-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 750; padding-left: 4px; }
.top-title { font-size: 1.02rem; font-weight: 700; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-brand + .top-title { display: none; }
body.has-back .top-brand { display: none; }
body.has-back .top-brand + .top-title { display: block; }
.top-actions { display: flex; gap: 2px; margin-left: auto; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  border: 0; background: transparent; color: var(--text-2); text-decoration: none;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.read-progress { position: absolute; left: 0; bottom: -1px; height: 3px; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .1s linear; border-radius: 0 3px 3px 0; }

.view {
  flex: 1;
  width: 100%;
  max-width: calc(var(--content-w) + 40px);
  margin: 0 auto;
  padding: 18px 16px calc(var(--tabbar-h) + 34px + env(safe-area-inset-bottom, 0px));
  outline: none;
}
.view.wide { max-width: 1160px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding: 4px 4px env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--border);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 650; border-radius: 12px;
}
.tabbar a .ti { display: inline-flex; padding: 3px 14px; border-radius: 14px; transition: background .2s; }
.tabbar a.active { color: var(--primary-strong); }
.tabbar a.active .ti { background: var(--primary-soft); }

@media (min-width: 980px) {
  .sidebar { display: flex; }
  .tabbar { display: none; }
  .top-brand { display: none !important; }
  .top-brand + .top-title { display: block !important; }
  .view { padding: 26px 32px 60px; }
  .topbar { padding: 0 18px; }
}

/* ---------- Typography helpers ---------- */
.eyebrow { font-size: .74rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--primary-strong); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
kbd { font-family: var(--mono); font-size: .85em; padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); }
mark { background: color-mix(in srgb, var(--gold) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.6em 0; }

/* ---------- Buttons & controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; min-height: 42px;
  border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-weight: 650; font-size: .95rem;
  text-decoration: none; line-height: 1.2;
  transition: transform .08s, background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { min-height: 34px; padding: 6px 11px; font-size: .86rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: .86rem; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.chip.active, .chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }

.seg { display: inline-flex; background: var(--surface-3); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-weight: 650; font-size: .88rem; color: var(--text-2); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label, .label { font-size: .82rem; font-weight: 700; color: var(--text-2); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border-radius: 11px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 1rem; min-height: 44px;
}
textarea.input { min-height: 80px; resize: vertical; }
.input.mono { font-family: var(--mono); letter-spacing: .06em; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
input[type="range"] { width: 100%; accent-color: var(--primary); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .2s; flex: 0 0 auto; cursor: pointer; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(18px); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 12px; }
.card h3 { font-size: 1.05rem; }
.card.link { display: block; text-decoration: none; color: inherit; transition: transform .12s, box-shadow .2s, border-color .2s; }
.card.link:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-head h2 { font-size: 1.2rem; margin: 0; }
.section-head a { font-size: .9rem; font-weight: 650; text-decoration: none; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 22px 20px;
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--accent) 30%, transparent) 0%, transparent 55%),
    radial-gradient(90% 120% at 0% 100%, color-mix(in srgb, var(--primary) 34%, transparent) 0%, transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero h2 { font-size: clamp(1.45rem, 4.6vw, 2.05rem); margin: 6px 0 8px; letter-spacing: -.02em; }
.hero p { color: var(--text-2); max-width: 46ch; }
.hero .helix-deco { position: absolute; right: -10px; top: -6px; width: 150px; opacity: .9; pointer-events: none; }
@media (max-width: 520px) { .hero .helix-deco { width: 110px; opacity: .35; } }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.stat { background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border); border-radius: 14px; padding: 8px 12px; min-width: 92px; }
.stat b { display: block; font-size: 1.25rem; line-height: 1.1; }
.stat span { font-size: .76rem; color: var(--muted); font-weight: 600; }

/* Quick tiles */
.tile {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .2s;
  min-height: 104px;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile .ticon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--tc-soft, var(--primary-soft)); color: var(--tc, var(--primary-strong)); }
.tile b { font-size: .98rem; }
.tile span { font-size: .8rem; color: var(--muted); line-height: 1.35; }

/* Chapter cards */
.book-head { display: flex; align-items: center; gap: 10px; margin: 24px 0 10px; }
.book-head h2 { font-size: 1.1rem; margin: 0; }
.book-head .pill { font-size: .72rem; font-weight: 750; padding: 3px 9px; border-radius: 99px; background: var(--surface-3); color: var(--muted); }
.chapter-card { display: flex; gap: 14px; align-items: stretch; padding: 0; overflow: hidden; }
.chapter-card .ch-num {
  flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--cc-soft); color: var(--cc); font-weight: 800; font-size: 1.5rem; line-height: 1;
}
.chapter-card .ch-num small { font-size: .62rem; font-weight: 750; letter-spacing: .06em; margin-bottom: 4px; text-transform: uppercase; }
.chapter-card .ch-body { padding: 13px 14px 13px 0; flex: 1; min-width: 0; }
.chapter-card h3 { margin: 0 0 4px; font-size: 1.02rem; }
.chapter-card p { margin: 0; font-size: .85rem; color: var(--muted); }
.lesson-links { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.lesson-link {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
  padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
  font-weight: 600; font-size: .92rem;
}
.lesson-link:hover { border-color: var(--cc, var(--primary)); }
.lesson-link .ll-state { margin-left: auto; display: flex; gap: 6px; align-items: center; font-size: .75rem; color: var(--muted); font-weight: 650; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); flex: 0 0 auto; }
.dot.done { background: var(--ok); }
.dot.part { background: var(--gold); }

.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; transition: width .4s; }

/* ---------- Lesson ---------- */
.lesson-hero {
  border-radius: 22px; padding: 20px; margin-bottom: 18px;
  background:
    radial-gradient(100% 140% at 100% 0%, color-mix(in srgb, var(--cc) 26%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
}
.lesson-hero .eyebrow { color: var(--cc); }
.lesson-hero h2 { font-size: clamp(1.4rem, 4.4vw, 1.9rem); margin: 6px 0 6px; letter-spacing: -.02em; }
.lesson-hero p { color: var(--text-2); margin: 0; }
.lesson-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.lesson-meta .chip { font-size: .78rem; padding: 4px 10px; }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; margin-bottom: 18px; }
.toc summary { list-style: none; padding: 10px 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: ''; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.toc[open] summary::after { transform: rotate(-135deg); }
.toc ol { margin: 0; padding: 0 8px 8px 34px; }
.toc li { padding: 3px 0; }
.toc a { text-decoration: none; color: var(--text-2); font-weight: 550; }
.toc a:hover { color: var(--primary-strong); }

.prose { font-size: 1.02rem; }
.prose section { scroll-margin-top: calc(var(--topbar-h) + 12px); }
.prose h3.sec-title {
  font-size: 1.28rem; margin: 34px 0 12px; padding-top: 4px;
  display: flex; align-items: baseline; gap: 10px;
}
.prose h3.sec-title .sn { font-size: .78rem; font-weight: 800; color: var(--cc, var(--primary)); background: var(--cc-soft, var(--primary-soft)); padding: 3px 8px; border-radius: 8px; flex: 0 0 auto; position: relative; top: -2px; }
.prose h4 { font-size: 1.06rem; margin: 22px 0 8px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--cc, var(--primary)); font-weight: 700; }
.prose strong, .prose b { font-weight: 720; }
.kw { font-weight: 720; color: var(--text); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--cc, var(--primary)) 26%, transparent) 62%); padding: 0 1px; }
.term { font-weight: 720; border-bottom: 2px dotted color-mix(in srgb, var(--cc, var(--primary)) 70%, transparent); cursor: help; }

.box {
  position: relative;
  border-radius: 14px; padding: 13px 14px 13px 46px; margin: 16px 0;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: .97rem;
}
.box > :last-child { margin-bottom: 0; }
.box::before {
  position: absolute; left: 13px; top: 12px; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; font-size: 14px; font-weight: 800; line-height: 1;
}
.box .box-title { display: block; font-weight: 780; margin-bottom: 4px; font-size: .9rem; letter-spacing: .01em; }
.box.remember { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.box.remember::before { content: '★'; background: var(--primary); color: var(--primary-ink); }
.box.remember .box-title { color: var(--primary-strong); }
.box.tip { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.box.tip::before { content: 'i'; background: var(--info); color: #fff; font-family: Georgia, serif; }
.box.tip .box-title { color: var(--info); }
.box.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.box.warn::before { content: '!'; background: var(--warn); color: #fff; }
.box.warn .box-title { color: var(--warn); }
.box.example { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
.box.example::before { content: '✎'; background: var(--accent); color: #fff; }
.box.example .box-title { color: var(--accent); }
.box.exam { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.box.exam::before { content: '🎯'; background: transparent; font-size: 18px; }
.box.exam .box-title { color: var(--gold); }
.box.analogy { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.box.analogy::before { content: '💡'; background: transparent; font-size: 18px; }
.box.analogy .box-title { color: var(--ok); }

.table-wrap { overflow-x: auto; margin: 14px 0; border-radius: 12px; border: 1px solid var(--border); -webkit-overflow-scrolling: touch; }
table.t { border-collapse: collapse; width: 100%; font-size: .92rem; background: var(--surface); }
table.t th, table.t td { padding: 9px 11px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.t th { background: var(--surface-3); font-weight: 720; font-size: .84rem; color: var(--text-2); white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t.compact th, table.t.compact td { padding: 6px 8px; }
table.t td.c, table.t th.c { text-align: center; }

.figure { margin: 18px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; overflow-x: auto; }
.figure svg { display: block; margin: 0 auto; height: auto; }
.figure figcaption, .figcap { font-size: .84rem; color: var(--muted); text-align: center; margin-top: 8px; }

.steps-list { counter-reset: st; list-style: none; padding: 0 !important; }
.steps-list > li { counter-increment: st; position: relative; padding: 2px 0 10px 40px; margin: 0 !important; }
.steps-list > li::before {
  content: counter(st); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--cc-soft, var(--primary-soft)); color: var(--cc, var(--primary-strong));
  font-weight: 800; font-size: .85rem; display: grid; place-items: center;
}
.steps-list > li:not(:last-child)::after { content: ''; position: absolute; left: 13.5px; top: 30px; bottom: 2px; width: 1px; background: var(--border-strong); }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.compare > div { border-radius: 14px; padding: 12px; border: 1px solid var(--border); background: var(--surface); }
.compare > div h5 { margin: 0 0 6px; font-size: .92rem; }
.compare ul { margin: 0; padding-left: 1.1em; font-size: .92rem; }
@media (max-width: 560px) { .compare { grid-template-columns: 1fr; } }

.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
.lesson-nav a { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.lesson-nav a small { display: block; color: var(--muted); font-size: .76rem; font-weight: 650; }
.lesson-nav a b { font-size: .92rem; }
.lesson-nav a.next { text-align: right; grid-column: 2; }

.summary-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--cc, var(--primary)); border-radius: 14px; padding: 14px 16px; margin: 26px 0 0; }
.summary-card h3 { font-size: 1.05rem; }
.summary-card ul { margin: 0; padding-left: 1.2em; }

/* Bases */
.seq { font-family: var(--mono); font-weight: 700; letter-spacing: .1em; word-break: break-all; }
.b { font-family: var(--mono); font-weight: 800; }
.bA { color: var(--A); } .bT { color: var(--T); } .bG { color: var(--G); } .bC { color: var(--C); } .bU { color: var(--U); }
.seq-row { display: flex; align-items: center; gap: 8px; font-family: var(--mono); width: max-content; min-width: 100%; }
.seq-row .strand { flex-wrap: nowrap; }
.seq-row .end { color: var(--muted); font-weight: 750; font-size: .9rem; min-width: 22px; font-family: var(--font); }
.strand { display: flex; flex-wrap: wrap; gap: 2px; }
.nt {
  display: inline-grid; place-items: center; width: 26px; height: 30px; border-radius: 6px;
  font-family: var(--mono); font-weight: 800; font-size: .95rem; color: #fff;
}
.nt.A { background: var(--A); } .nt.T { background: var(--T); } .nt.G { background: var(--G); color: #2b2100; } .nt.C { background: var(--C); } .nt.U { background: var(--U); }
.nt.dim { opacity: .35; }
.nt.hl { outline: 3px solid var(--text); outline-offset: 1px; }
.codon-grp { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; margin-right: 4px; }
.codon-grp.start { background: color-mix(in srgb, var(--ok) 25%, transparent); }
.codon-grp.stop { background: color-mix(in srgb, var(--danger) 25%, transparent); }
.aa {
  display: inline-flex; align-items: center; justify-content: center; min-width: 50px; height: 34px; padding: 0 8px;
  border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 750; font-size: .85rem;
  border: 1.5px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.aa.stop { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.aa.changed { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.chain { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chain .bond { width: 8px; height: 2px; background: var(--border-strong); }

/* ---------- Tools ---------- */
.tool {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin: 18px 0; box-shadow: var(--shadow-sm);
}
.tool-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tool-head .tico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
.tool-head h4 { margin: 0; font-size: 1.02rem; }
.tool-head p { margin: 0; font-size: .82rem; color: var(--muted); }
.tool-head .tool-open { margin-left: auto; }
.tool .out { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); overflow-x: auto; }
.tool .out:empty { display: none; }
.tool-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.tool-stage { background: var(--surface-2); border-radius: 14px; border: 1px solid var(--border); padding: 10px; overflow-x: auto; }
.tool-stage svg { display: block; margin: 0 auto; height: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; }
.kpi b { display: block; font-size: 1.15rem; line-height: 1.2; }
.kpi span { font-size: .74rem; color: var(--muted); font-weight: 650; }
.stepper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.stepper .step-dots { display: flex; gap: 5px; flex: 1; justify-content: center; min-width: 120px; }
.stepper .step-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.stepper .step-dots i.on { background: var(--primary); transform: scale(1.25); }
.step-text { min-height: 3.2em; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--primary-soft); font-size: .95rem; }
.step-text b { color: var(--primary-strong); }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.feedback { margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-weight: 600; font-size: .94rem; }
.feedback.ok { background: var(--ok-soft); color: var(--ok); }
.feedback.bad { background: var(--danger-soft); color: var(--danger); }
.feedback.info { background: var(--info-soft); color: var(--info); }

.tool-list-card { display: flex; gap: 12px; align-items: flex-start; }
.tool-list-card .tico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
.tool-list-card h3 { margin: 0 0 3px; font-size: 1rem; }
.tool-list-card p { margin: 0; font-size: .84rem; color: var(--muted); line-height: 1.4; }
.tool-list-card .tags { margin-top: 6px; display: flex; gap: 5px; flex-wrap: wrap; }
.tag { font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); color: var(--muted); }

/* Punnett */
.punnett { border-collapse: separate; border-spacing: 4px; margin: 0 auto; }
.punnett th { font-family: var(--mono); font-weight: 800; color: var(--accent); padding: 6px; font-size: .95rem; }
.punnett td { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 6px; text-align: center; font-family: var(--mono); font-weight: 750; min-width: 52px; font-size: .92rem; }
.punnett td small { display: block; font-family: var(--font); font-weight: 600; font-size: .66rem; color: var(--muted); margin-top: 2px; letter-spacing: 0; }
.punnett td.hl { outline: 2.5px solid var(--accent); }
.ratio-bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; margin-top: 8px; }
.ratio-bar span { display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; color: #fff; min-width: 0; overflow: hidden; white-space: nowrap; }

/* Order game */
.order-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.order-item { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; padding: 8px 8px 8px 12px; font-size: .93rem; }
.order-item .oi-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 800; font-size: .8rem; flex: 0 0 auto; }
.order-item .oi-t { flex: 1; }
.order-item .oi-btns { display: flex; gap: 3px; }
.order-item .oi-btns button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); display: grid; place-items: center; }
.order-item.ok { border-color: var(--ok); background: var(--ok-soft); }
.order-item.bad { border-color: var(--danger); background: var(--danger-soft); }

/* ---------- Quiz ---------- */
.quiz { margin-top: 30px; }
.quiz-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.quiz-head h3 { margin: 0; font-size: 1.25rem; }
.q-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; margin-bottom: 12px; }
.q-card .q-num { font-size: .74rem; font-weight: 800; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; display: flex; gap: 8px; align-items: center; }
.q-card .q-type { background: var(--surface-3); padding: 2px 7px; border-radius: 6px; }
.q-card .q-text { font-weight: 650; margin: 6px 0 12px; font-size: 1rem; }
.q-opts { display: flex; flex-direction: column; gap: 7px; }
.q-opt {
  display: flex; align-items: flex-start; gap: 10px; text-align: left; width: 100%;
  padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface);
  font-size: .95rem; line-height: 1.4;
}
.q-opt .ol { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 800; font-size: .78rem; }
.q-opt:hover { border-color: var(--primary); }
.q-opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.q-opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.q-opt.correct .ol { background: var(--ok); color: #fff; }
.q-opt.wrong { border-color: var(--danger); background: var(--danger-soft); }
.q-opt.wrong .ol { background: var(--danger); color: #fff; }
.q-opt[disabled] { cursor: default; }
.q-tf { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-explain { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border-left: 3px solid var(--info); font-size: .92rem; }
.q-explain b:first-child { color: var(--info); }
.quiz-result { text-align: center; padding: 20px; }
.score-ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-3) 0); }
.score-ring > div { width: 94px; height: 94px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; }
.fill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.fill-row .input { flex: 1; min-width: 160px; }

/* ---------- Flashcards ---------- */
.fc-wrap { perspective: 1400px; max-width: 560px; margin: 0 auto; }
.fc {
  position: relative; width: 100%; min-height: 300px; cursor: pointer;
  transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3, .7, .2, 1);
}
.fc.flipped { transform: rotateY(180deg); }
.fc-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 22px; padding: 24px 22px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  overflow-y: auto;
}
.fc-face.front { background: radial-gradient(100% 100% at 100% 0%, color-mix(in srgb, var(--cc, var(--primary)) 22%, transparent), transparent 60%), var(--surface); }
.fc-face.back { transform: rotateY(180deg); text-align: left; align-items: stretch; }
.fc-face .fc-label { position: absolute; top: 14px; left: 16px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fc-face .fc-q { font-size: 1.3rem; font-weight: 750; line-height: 1.35; }
.fc-face .fc-a { font-size: 1rem; line-height: 1.55; }
.fc-hint { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 10px; }
.fc-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 560px; margin: 14px auto 0; }
.fc-actions .btn { flex-direction: column; gap: 0; padding: 8px; font-size: .86rem; }
.fc-actions .btn small { font-weight: 600; opacity: .75; font-size: .7rem; }
.btn.again { border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }
.btn.hard { border-color: color-mix(in srgb, var(--gold) 50%, transparent); color: var(--gold); }
.btn.easy { border-color: color-mix(in srgb, var(--ok) 50%, transparent); color: var(--ok); }
.leitner { display: flex; gap: 6px; justify-content: center; margin: 12px 0 4px; }
.leitner div { text-align: center; font-size: .7rem; color: var(--muted); font-weight: 700; }
.leitner div b { display: block; width: 42px; padding: 5px 0; border-radius: 9px; background: var(--surface-3); color: var(--text); font-size: .95rem; margin-bottom: 2px; }

/* ---------- Definitions / traps / exercises ---------- */
.def-item { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.def-item:last-child { border-bottom: 0; }
.def-item dt { font-weight: 760; color: var(--text); margin-bottom: 3px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.def-item dt .tag { font-weight: 700; }
.def-item dd { margin: 0; color: var(--text-2); font-size: .96rem; }
.def-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 14px; padding: 0; overflow: hidden; }
.group-title { font-size: 1rem; margin: 24px 0 8px; display: flex; align-items: center; gap: 8px; }
.group-title .gdot { width: 10px; height: 10px; border-radius: 3px; background: var(--cc, var(--primary)); }

.trap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.trap h4 { margin: 0 0 8px; font-size: 1rem; display: flex; gap: 8px; align-items: flex-start; }
.trap h4::before { content: '⚠'; color: var(--warn); }
.trap .wrong, .trap .right { padding: 8px 11px; border-radius: 10px; font-size: .93rem; margin-top: 6px; }
.trap .wrong { background: var(--danger-soft); }
.trap .wrong::before { content: '✗ Λάθος: '; font-weight: 800; color: var(--danger); }
.trap .right { background: var(--ok-soft); }
.trap .right::before { content: '✓ Σωστό: '; font-weight: 800; color: var(--ok); }
.trap .why { font-size: .9rem; color: var(--text-2); margin-top: 8px; }

.ex { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; margin-bottom: 12px; }
.ex-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.ex-head h4 { margin: 0; font-size: 1.02rem; flex: 1; min-width: 180px; }
.lvl { font-size: .7rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.lvl.l1 { background: var(--ok-soft); color: var(--ok); }
.lvl.l2 { background: var(--gold-soft); color: var(--gold); }
.lvl.l3 { background: var(--danger-soft); color: var(--danger); }
.ex-problem { font-size: .97rem; }
.ex-steps { margin-top: 10px; }
.ex-step { border-left: 3px solid var(--accent); background: var(--surface-2); padding: 9px 12px; border-radius: 0 10px 10px 0; margin-top: 8px; font-size: .95rem; animation: fadeIn .3s ease; }
.ex-step b.sl { color: var(--accent); }
.ex-answer { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--ok-soft); font-size: .95rem; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Accordion */
details.acc { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin: 10px 0; }
details.acc > summary { list-style: none; padding: 12px 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 10px; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: '+'; margin-left: auto; font-size: 1.3rem; font-weight: 500; color: var(--muted); line-height: 1; }
details.acc[open] > summary::after { content: '−'; }
details.acc > .acc-body { padding: 0 14px 14px; }

/* Search */
.search-box { position: relative; }
.search-box .input { padding-left: 42px; font-size: 1.05rem; min-height: 50px; border-radius: 14px; }
.search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.result { display: block; text-decoration: none; color: var(--text); padding: 11px 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 7px; }
.result small { color: var(--muted); font-weight: 650; font-size: .74rem; display: block; }
.result p { margin: 2px 0 0; font-size: .88rem; color: var(--text-2); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 650; font-size: .9rem;
  transition: opacity .25s, transform .25s; z-index: 60; max-width: calc(100vw - 32px); box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 980px) { .toast { bottom: 24px; } }

/* Install banner */
.install-card { display: flex; gap: 12px; align-items: center; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--radius); padding: 12px 14px; margin-top: 14px; }
.install-card p { margin: 0; font-size: .88rem; flex: 1; }

/* Exam */
.exam-bar { position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); z-index: 5; display: flex; gap: 10px; align-items: center; padding: 10px 12px; margin: 0 0 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); }
.timer { font-family: var(--mono); font-weight: 800; font-size: 1.05rem; }

/* Misc */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--primary); color: var(--primary-ink); font-size: .72rem; font-weight: 800; }
.pill-ok { color: var(--ok); font-weight: 750; }
.pill-bad { color: var(--danger); font-weight: 750; }
.cell-svg text { font-family: var(--font); }
.fade-in { animation: fadeIn .3s ease; }
.clickable { cursor: pointer; }
svg .hot { cursor: pointer; transition: opacity .15s, filter .15s; }
svg .hot:hover { filter: brightness(1.08) drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 60%, transparent)); }
.info-panel { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.info-panel h5 { margin: 0 0 4px; font-size: 1rem; }
.syllabus li { margin: .25em 0; }
.foot-note { font-size: .78rem; color: var(--muted); margin-top: 30px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .sidebar, .tabbar, .topbar, .quiz, .tool, .lesson-nav { display: none !important; }
  .view { padding: 0; max-width: none; }
}
