/* ============ Γραμματοσειρές (τοπικά, για offline) ============ */
@font-face { font-family: 'Manrope'; font-weight: 200 800; font-display: swap;
  src: url(../fonts/manrope-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: 'Manrope'; font-weight: 200 800; font-display: swap;
  src: url(../fonts/manrope-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; }
@font-face { font-family: 'Comfortaa'; font-weight: 300 700; font-display: swap;
  src: url(../fonts/comfortaa-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: 'Comfortaa'; font-weight: 300 700; font-display: swap;
  src: url(../fonts/comfortaa-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: #f6f5ff;
  --bg2: #eceaff;
  --card: #ffffff;
  --card2: #f8f8fd;
  --text: #1f2140;
  --muted: #5d6185;
  --line: #dcdcf0;
  --primary: #5b5bd6;
  --primary-2: #7c6cf0;
  --primary-ink: #ffffff;
  --accent: #ff6b6b;
  --yellow: #ffb400;
  --green: #1fa971;
  --teal: #0fa5b8;
  --pink: #e0529c;
  --orange: #f07b1d;
  --c1: #5b5bd6; --c2: #ff6b6b; --c3: #1fa971; --c4: #f07b1d; --c5: #0fa5b8; --c6: #e0529c;
  --ok-bg: #e2f7ee; --ok: #117a4f;
  --bad-bg: #ffe7e7; --bad: #b3261e;
  --def-bg: #fff7dc; --def-line: #ffcf4d;
  --tip-bg: #e9f6ff; --tip-line: #69c0ff;
  --fun-bg: #fdeaf5; --fun-line: #f09bc8;
  --shadow: 0 2px 4px rgba(40, 40, 90, .06), 0 8px 24px rgba(40, 40, 90, .08);
  --radius: 18px;
  --grid: #e4e4f3;
  --axis: #50537a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1122; --bg2: #171a33; --card: #1b1e38; --card2: #22264a; --text: #eceeff; --muted: #a4a8cc;
    --line: #30355e; --primary: #8f8cff; --primary-2: #a597ff; --primary-ink: #0f1122;
    --accent: #ff8a8a; --yellow: #ffcb47; --green: #45d49a; --teal: #3fd0e2; --pink: #ff7cc0; --orange: #ff9d4d;
    --c1: #8f8cff; --c2: #ff8a8a; --c3: #45d49a; --c4: #ff9d4d; --c5: #3fd0e2; --c6: #ff7cc0;
    --ok-bg: #123a2b; --ok: #6ee7b0; --bad-bg: #44191c; --bad: #ff9c94;
    --def-bg: #3a3014; --def-line: #b58d1e; --tip-bg: #10304a; --tip-line: #2f7fc0; --fun-bg: #3d1a31; --fun-line: #a44a7c;
    --shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --grid: #262a4d; --axis: #9ea3d4;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1122; --bg2: #171a33; --card: #1b1e38; --card2: #22264a; --text: #eceeff; --muted: #a4a8cc;
  --line: #30355e; --primary: #8f8cff; --primary-2: #a597ff; --primary-ink: #0f1122;
  --accent: #ff8a8a; --yellow: #ffcb47; --green: #45d49a; --teal: #3fd0e2; --pink: #ff7cc0; --orange: #ff9d4d;
  --c1: #8f8cff; --c2: #ff8a8a; --c3: #45d49a; --c4: #ff9d4d; --c5: #3fd0e2; --c6: #ff7cc0;
  --ok-bg: #123a2b; --ok: #6ee7b0; --bad-bg: #44191c; --bad: #ff9c94;
  --def-bg: #3a3014; --def-line: #b58d1e; --tip-bg: #10304a; --tip-line: #2f7fc0; --fun-bg: #3d1a31; --fun-line: #a44a7c;
  --shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --grid: #262a4d; --axis: #9ea3d4;
}

/* ============ Βάση ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  min-height: 100vh; min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
h1, h2, h3, h4 { font-family: 'Comfortaa', 'Manrope', system-ui, sans-serif; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.55rem, 5vw, 2.2rem); }
h2 { font-size: clamp(1.25rem, 4vw, 1.55rem); }
h3 { font-size: 1.12rem; }
p { margin: .55em 0; }
a { color: var(--primary); }
img { max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
main { max-width: 880px; margin: 0 auto; padding: 16px 16px 64px; outline: none; }
main:focus, main:focus-visible { outline: none; }

/* ============ Κεφαλίδα ============ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand img { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text b { font-family: 'Comfortaa', sans-serif; font-size: 1.05rem; white-space: nowrap; }
.brand-text small { color: var(--muted); font-size: .78rem; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-size: 1.2rem; display: grid; place-items: center;
}
.icon-btn:hover { border-color: var(--primary); }
.star-count { font-weight: 800; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }

/* ============ Κοινά στοιχεία ============ */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border: 1px solid var(--line); }
.muted { color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 14px; border: 0; cursor: pointer; font-weight: 700;
  background: var(--primary); color: var(--primary-ink); text-decoration: none; min-height: 44px;
  transition: transform .08s ease, filter .15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; min-height: 36px; font-size: .92rem; border-radius: 11px; }
.btn.ok { background: var(--green); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.crumbs { font-size: .9rem; margin-bottom: 10px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }

/* ============ Αρχική ============ */
.hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: 26px 22px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2) 60%, var(--pink));
  color: #fff; box-shadow: var(--shadow); margin-bottom: 22px;
}
.hero h1 { color: #fff; margin-bottom: .3em; }
.hero p { max-width: 36em; opacity: .95; }
.hero .owl { position: absolute; right: -6px; bottom: -14px; font-size: 96px; opacity: .9; transform: rotate(-8deg); pointer-events: none; }
.hero .btn { background: #fff; color: #3a2fa8; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.hero-stats span { background: rgba(255,255,255,.2); border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: .9rem; }
@media (max-width: 520px) { .hero .owl { font-size: 70px; right: -10px; bottom: -10px; opacity: .45; } }

.part-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.part-title .tag { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 3px 10px; font-weight: 800; font-size: .85rem; color: var(--muted); }
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.chapter-card {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform .12s ease;
}
.chapter-card:hover { transform: translateY(-2px); }
.chapter-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--cc, var(--primary)); }
.chapter-card .ch-emoji { font-size: 2rem; line-height: 1; }
.chapter-card h3 { margin: 0; }
.chapter-card .ch-num { font-size: .85rem; font-weight: 800; color: var(--cc, var(--primary)); letter-spacing: .02em; }
.bar { height: 8px; border-radius: 99px; background: var(--card2); overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; background: var(--cc, var(--primary)); border-radius: 99px; transition: width .4s; }
.tools-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

/* ============ Κεφάλαιο ============ */
.chapter-head { border-radius: 22px; padding: 20px; color: #fff; background: linear-gradient(135deg, var(--cc), color-mix(in srgb, var(--cc) 60%, #000 10%)); margin-bottom: 16px; box-shadow: var(--shadow); }
.chapter-head h1 { color: #fff; }
.lesson-list { display: flex; flex-direction: column; gap: 10px; }
.lesson-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.lesson-item:hover { border-color: var(--cc, var(--primary)); }
.lesson-item .num { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--cc) 16%, transparent); color: var(--cc); font-size: .95rem; }
.lesson-item .li-body { flex: 1; min-width: 0; }
.lesson-item .li-title { font-weight: 800; }
.lesson-item .li-sub { color: var(--muted); font-size: .9rem; }
.stars { letter-spacing: 1px; white-space: nowrap; font-size: 1rem; }
.stars .off { filter: grayscale(1); opacity: .3; }

/* ============ Μάθημα ============ */
.lesson-hero { border-radius: 22px; padding: 20px; margin-bottom: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.lesson-hero::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 180px; height: 180px; border-radius: 50%; background: color-mix(in srgb, var(--cc) 14%, transparent); }
.lesson-hero .ln { color: var(--cc); font-weight: 800; font-size: .9rem; }
.lesson-hero .big-emoji { font-size: 2.4rem; }
.toc { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 6px; scrollbar-width: thin; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 59px); z-index: 10; background: var(--bg); }
.toc a { flex: none; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .85rem; font-weight: 700; white-space: nowrap; }
.toc a:hover { border-color: var(--cc); color: var(--cc); }
.sec { margin: 16px 0; scroll-margin-top: 120px; }
.sec > h2 { display: flex; align-items: center; gap: 10px; }
.sec-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.box { border-radius: 16px; padding: 14px 16px; margin: 12px 0; border: 2px solid; }
.box > .box-title { font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.box.def { background: var(--def-bg); border-color: var(--def-line); }
.box.tip { background: var(--tip-bg); border-color: var(--tip-line); }
.box.fun { background: var(--fun-bg); border-color: var(--fun-line); }
.box.warn { background: var(--bad-bg); border-color: var(--bad); }
.owl-say { display: flex; gap: 12px; align-items: flex-start; }
.owl-say .owl { font-size: 2rem; line-height: 1; flex: none; }
.hook { font-size: 1.05rem; }
ul.clean { padding-left: 1.2em; margin: .4em 0; }
ul.clean li { margin: .25em 0; }
.formula { display: block; text-align: center; font-size: 1.2rem; font-weight: 700; margin: 10px 0; padding: 10px; background: var(--card2); border-radius: 12px; overflow-x: auto; }
.table-wrap { overflow-x: auto; margin: 10px 0; }
table.t { border-collapse: collapse; min-width: 100%; font-variant-numeric: tabular-nums; }
table.t th, table.t td { border: 1px solid var(--line); padding: 6px 10px; text-align: center; }
table.t th { background: var(--card2); }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: .85rem; background: var(--card2); border: 1px solid var(--line); }

/* Παραδείγματα με βήματα */
.example .problem { font-weight: 600; }
.steps { list-style: none; padding: 0; margin: 10px 0 0; counter-reset: st; }
.steps li { counter-increment: st; position: relative; padding: 8px 10px 8px 44px; margin: 6px 0; background: var(--card2); border-radius: 12px; animation: pop .25s ease; }
.steps li::before { content: counter(st); position: absolute; left: 10px; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--cc, var(--primary)); color: #fff; font-weight: 800; font-size: .8rem; display: grid; place-items: center; }
@keyframes pop { from { transform: translateY(4px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Μαθηματική γραφή */
.m { font-family: 'Manrope', 'Cambria Math', 'STIX Two Math', serif; white-space: nowrap; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 .12em; line-height: 1.15; font-size: .95em; }
.frac > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 .2em; }
.frac > span:last-child { padding: 0 .2em; }
.sqrt { display: inline-flex; align-items: stretch; white-space: nowrap; }
.sqrt > .rad { font-size: 1.05em; padding-right: 1px; }
.sqrt > .rc { border-top: 1.5px solid currentColor; padding: 0 .15em; margin-top: .18em; }
.vec { position: relative; display: inline-block; padding-top: .25em; }
.vec::before { content: ""; position: absolute; left: 1px; right: 1px; top: .1em; border-top: 1.5px solid currentColor; }
.vec::after { content: ""; position: absolute; right: -1px; top: -.1em; border: .22em solid transparent; border-left: .38em solid currentColor; border-right: 0; }
.hat { position: relative; display: inline-block; }
.hat::before { content: "^"; position: absolute; left: 0; right: 0; top: -.72em; text-align: center; font-size: .9em; }
.abs { border-left: 1.5px solid currentColor; border-right: 1.5px solid currentColor; padding: 0 .2em; }
.hl { color: var(--cc, var(--primary)); font-weight: 800; }
.hl2 { color: var(--accent); font-weight: 800; }
.hl3 { color: var(--green); font-weight: 800; }

/* ============ Πειράματα (widgets) ============ */
.widget { background: var(--card); border: 2px dashed color-mix(in srgb, var(--cc, var(--primary)) 55%, transparent); border-radius: 20px; padding: 14px; }
.widget-title { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 6px; }
.widget-title .badge { background: var(--cc, var(--primary)); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .78rem; }
.widget .hint { color: var(--muted); font-size: .92rem; margin: 0 0 8px; }
.w-stage { width: 100%; display: block; margin: 0 auto; max-width: 520px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.w-stage.wide { max-width: 640px; }
.w-controls { display: grid; gap: 10px; margin-top: 10px; }
.w-controls.two { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.ctl { display: grid; gap: 2px; }
.ctl label { font-weight: 700; font-size: .92rem; display: flex; justify-content: space-between; gap: 8px; }
.ctl label output { color: var(--cc, var(--primary)); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--cc, var(--primary)); height: 30px; }
.readout { background: var(--card2); border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.readout .big { font-size: 1.25rem; font-weight: 800; }
.w-input { font: inherit; padding: 9px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--card2); color: var(--text); min-width: 0; width: 100%; }
.w-input:focus { border-color: var(--primary); outline: none; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 7px 12px; cursor: pointer; font-weight: 700; min-height: 36px; }
.seg button.on { background: var(--cc, var(--primary)); color: #fff; }
.chip-btn { border: 1px solid var(--line); background: var(--card2); border-radius: 12px; padding: 8px 12px; cursor: pointer; font-weight: 700; min-height: 40px; }
.chip-btn:hover { border-color: var(--cc, var(--primary)); }
.chip-btn.on { background: var(--cc, var(--primary)); color: #fff; border-color: transparent; }
.feedback { margin-top: 8px; padding: 8px 12px; border-radius: 12px; font-weight: 700; }
.feedback.ok { background: var(--ok-bg); color: var(--ok); }
.feedback.bad { background: var(--bad-bg); color: var(--bad); }

/* SVG */
svg text { font-family: 'Manrope', system-ui, sans-serif; fill: var(--text); }
svg .grid { stroke: var(--grid); stroke-width: 1; }
svg .axis { stroke: var(--axis); stroke-width: 1.6; }
svg .tick { fill: var(--muted); font-size: 10px; }
svg .lbl { font-size: 13px; font-weight: 700; }
svg .s1 { stroke: var(--c1); } svg .s2 { stroke: var(--c2); } svg .s3 { stroke: var(--c3); } svg .s4 { stroke: var(--c4); } svg .s5 { stroke: var(--c5); } svg .s6 { stroke: var(--c6); }
svg .f1 { fill: var(--c1); } svg .f2 { fill: var(--c2); } svg .f3 { fill: var(--c3); } svg .f4 { fill: var(--c4); } svg .f5 { fill: var(--c5); } svg .f6 { fill: var(--c6); }
svg .ft1 { fill: color-mix(in srgb, var(--c1) 22%, transparent); } svg .ft2 { fill: color-mix(in srgb, var(--c2) 22%, transparent); }
svg .ft3 { fill: color-mix(in srgb, var(--c3) 22%, transparent); } svg .ft4 { fill: color-mix(in srgb, var(--c4) 22%, transparent); }
svg .ft5 { fill: color-mix(in srgb, var(--c5) 22%, transparent); } svg .ft6 { fill: color-mix(in srgb, var(--c6) 22%, transparent); }
svg .ink { stroke: var(--text); } svg .fink { fill: var(--text); } svg .fmuted { fill: var(--muted); } svg .smuted { stroke: var(--muted); }
svg .fcard { fill: var(--card); } svg .fcard2 { fill: var(--card2); }
svg .thin { stroke-width: 1; } svg .mid { stroke-width: 2; } svg .thick { stroke-width: 3.2; }
svg .dash { stroke-dasharray: 5 4; }
svg .none { fill: none; }
svg .handle { cursor: grab; touch-action: none; }
svg .handle:active { cursor: grabbing; }
svg .handle-ring { fill: transparent; stroke: none; }
svg .pulse { animation: pulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 50% { transform: scale(1.25); } }

/* ============ Κουίζ ============ */
.quiz { border: 2px solid var(--cc, var(--primary)); }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.dots { display: flex; gap: 5px; flex-wrap: wrap; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--card2); border: 1px solid var(--line); }
.dots i.cur { background: var(--cc, var(--primary)); border-color: transparent; transform: scale(1.2); }
.dots i.ok { background: var(--green); border-color: transparent; }
.dots i.bad { background: var(--accent); border-color: transparent; }
.q-text { font-size: 1.08rem; font-weight: 700; margin: 6px 0 12px; }
.choices { display: grid; gap: 8px; }
.choice {
  text-align: left; border: 2px solid var(--line); background: var(--card2); border-radius: 14px; padding: 11px 14px; cursor: pointer; font-weight: 600; min-height: 48px;
  display: flex; gap: 10px; align-items: center;
}
.choice .key { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); font-weight: 800; font-size: .85rem; }
.choice:hover:not(:disabled) { border-color: var(--cc, var(--primary)); }
.choice.sel { border-color: var(--cc, var(--primary)); background: color-mix(in srgb, var(--cc, var(--primary)) 12%, var(--card2)); }
.choice.ok { border-color: var(--green); background: var(--ok-bg); }
.choice.bad { border-color: var(--accent); background: var(--bad-bg); }
.choice:disabled { cursor: default; }
.tf { grid-template-columns: 1fr 1fr; }
.num-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.num-row .w-input { max-width: 220px; font-size: 1.1rem; font-weight: 700; }
.why { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card2); }
.q-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.result { text-align: center; padding: 10px 0; }
.result .big-stars { font-size: 2.6rem; letter-spacing: 4px; }
.result .score { font-size: 1.5rem; font-weight: 800; }

/* Πλοήγηση μαθημάτων */
.lesson-nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 22px; }
.lesson-nav a { min-width: 0; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.lesson-nav a small { display: block; color: var(--muted); }
.lesson-nav a.next { text-align: right; grid-column: 2; }
.lesson-nav a b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Toast / confetti */
#toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); transform: translateX(-50%) translateY(120px); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; transition: transform .3s; z-index: 50; max-width: 90vw; text-align: center; }
#toast.show { transform: translateX(-50%) translateY(0); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

.footer { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 36px; }
.footer a { color: var(--muted); }

@media (max-width: 520px) {
  main { padding: 12px 12px 56px; }
  .sec-body, .card { padding: 14px; }
  .brand-text small { display: none; }
  .widget { padding: 12px 10px; }
  .lesson-nav { grid-template-columns: minmax(0, 1fr); }
  .lesson-nav a.next { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
