/* layla — the Eesti-C2 layout (header, left index, ruled title, lesson tabs, single column)
   dressed in speakly.me's design: logo green, mint/aqua washes, lavender and iris-purple accents,
   rounded white cards, small-radius green buttons, Proxima-like type (Figtree). */
:root {
  --green: #00b58d;
  --green-ink: #009a78;
  --green-deep: #0d9b7a;
  --mint: #afead9;
  --aqua: #e6f8f4;
  --frost: #e2f7f1;
  --lavender: #d5d5ff;
  --crayon: #e1e1ff;
  --haze: #f3f1fa;
  --iris: #6846bc;
  --cosmos: #4a3687;
  --grape: #32285a;
  --peach: #fff4e6;
  --pink: #fff1ef;
  --ink: #0b0b0b;
  --soft: #4e4f4f;
  --mute: #707171;
  --line: #e2e3e3;
  --mouse: #f1f1f1;
  --dove: #f9f9f9;
  --paper: #ffffff;
  --good: #00a37f;
  --bad: #d8434f;
  --shadow: 0 2px 6px rgba(50, 40, 90, 0.05), 0 10px 30px rgba(50, 40, 90, 0.07);
  --sans: "Figtree", "Proxima Nova", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--green-ink); text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }
::selection { background: var(--mint); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.top-in { max-width: 1160px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 23px; color: var(--green); text-decoration: none; letter-spacing: .01em; }
.logo:hover { color: var(--green-deep); }
.logo small { font-weight: 500; font-size: 13px; color: var(--mute); margin-left: 4px; letter-spacing: 0; }
.flag { display: inline-flex; flex-direction: column; width: 26px; height: 18px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.flag i { flex: 1; }
.flag i:nth-child(1) { background: #ce2939; }
.flag i:nth-child(2) { background: #fff; }
.flag i:nth-child(3) { background: #477050; }
.toplinks { display: flex; align-items: center; font-size: 14px; }
.toplinks a { color: var(--soft); text-decoration: none; font-weight: 500; padding: 0 14px; border-left: 1px solid var(--line); line-height: 18px; }
.toplinks a:first-child { border-left: 0; }
.toplinks a:hover { color: var(--green-ink); }
.menu-btn { display: none; font: 700 14px var(--sans); border: 0; background: var(--green); color: #fff; padding: 8px 14px; border-radius: 6px; cursor: pointer; }

/* Layout */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; }
.side { padding: 28px 0 40px; font-size: 14px; }
.group { margin-bottom: 24px; }
.group-title { margin: 0 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li { margin: 0; }
.side li a { display: block; padding: 5px 10px; margin-left: -10px; color: var(--ink); text-decoration: none; border-radius: 8px; line-height: 1.4; }
.side li a:hover { background: var(--dove); color: var(--green-ink); }
.side li.here > a { background: var(--aqua); color: var(--green-ink); font-weight: 700; }
.side li.lvl { margin: 12px 0 3px; font-size: 11px; font-weight: 800; color: var(--iris); letter-spacing: 0.06em; text-transform: uppercase; }

main { padding: 28px 0 60px; min-width: 0; max-width: 760px; }
.title { border-bottom: 3px solid var(--green); padding-bottom: 12px; margin-bottom: 20px; }
.kicker { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--iris); text-transform: uppercase; letter-spacing: 0.08em; }
h1 { margin: 0; font: 800 36px/1.12 var(--sans); letter-spacing: -0.01em; }
h2 { font: 800 24px/1.25 var(--sans); margin: 40px 0 10px; padding-top: 4px; }
h3 { font: 700 17.5px/1.3 var(--sans); margin: 26px 0 8px; }
article > p:first-child { font-size: 18px; color: var(--soft); }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 4px; }
li::marker { color: var(--green); font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }

/* Lesson tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); margin: 0 0 24px; }
.tab { padding: 9px 16px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--soft); border-radius: 8px 8px 0 0; margin-bottom: -1px; border-bottom: 3px solid transparent; }
.tab:hover { color: var(--green-ink); background: var(--dove); }
.tab.on { color: var(--green-ink); border-bottom-color: var(--green); background: var(--aqua); }

/* Hungarian words + audio */
.w { white-space: nowrap; }
.w b { color: var(--ink); font-weight: 700; }
.say { display: none; }
.has-voice .say, .say[data-audio] { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 6px; padding: 0 0 0 2px; border: 0; border-radius: 50%; background: var(--green); color: #fff; font-size: 8px; line-height: 1; cursor: pointer; vertical-align: 1px; transition: background .12s, transform .12s; }
.has-voice .say:hover, .say[data-audio]:hover { background: var(--green-deep); transform: scale(1.08); }
.say.playing { background: var(--iris) !important; }
.ex { margin: 0 0 7px; padding: 8px 14px; background: var(--dove); border-radius: 10px; }
.gloss { color: var(--soft); }
.pron { color: var(--iris); font-style: italic; }
td.pron { font-style: italic; }
.note-inline { color: var(--mute); font-size: 14.5px; }
u.st { text-decoration: underline 2px var(--green); text-underline-offset: 3px; }

/* Tables */
table { border-collapse: collapse; width: 100%; margin: 6px 0 22px; font-size: 15px; background: var(--paper); }
.table-scroll { overflow-x: auto; margin: 6px 0 22px; border: 1px solid var(--line); border-radius: 12px; }
.table-scroll table { margin: 0; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green-ink); font-weight: 700; padding: 10px 12px; background: var(--aqua); }
td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
tbody tr:hover td { background: #fcfcfc; }
table.alpha td:first-child { font-size: 20px; font-weight: 800; width: 74px; color: var(--green-ink); }
table.wide { font-size: 14px; }

/* Boxes */
.box { background: var(--aqua); border-radius: 14px; padding: 14px 18px 2px; margin: 18px 0 22px; }
.box-title { font-weight: 800; margin-bottom: 6px; color: var(--green-ink); }
.box-tip { background: var(--haze); }
.box-tip .box-title { color: var(--iris); }
.box-warn { background: var(--peach); }
.box-warn .box-title { color: #b86a00; }

/* Exercises */
.drill { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; padding: 4px 20px 12px; margin: 22px 0; box-shadow: var(--shadow); }
.drill h3 { margin-top: 16px; }
.drill ol { padding-left: 26px; }
.drill li { margin-bottom: 11px; }
.drill .q { margin-right: 6px; }
.drill input { font: 500 15px var(--sans); padding: 7px 11px; border: 1.5px solid var(--line); border-radius: 8px; width: 230px; max-width: 100%; transition: border-color .15s, box-shadow .15s; }
.drill input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--frost); }
.drill input.ok { border-color: var(--good); background: var(--aqua); }
.drill input.no { border-color: var(--bad); background: var(--pink); }
.mark { margin-left: 6px; font-weight: 800; }
.mark.ok { color: var(--good); }
.mark.no { color: var(--bad); }
.ans { display: none; color: var(--green-ink); font-weight: 700; margin-left: 6px; }
.ans i { color: var(--mute); font-weight: 400; }
.drill.shown .ans { display: inline; }
.drill[data-type="read"] .ans::before { content: "= "; color: var(--mute); }
.drill-actions { margin-top: 6px; }
button.reveal, .btn { display: inline-flex; align-items: center; gap: 6px; font: 700 14px/1 var(--sans); border: 1.5px solid var(--green); background: var(--paper); color: var(--green-ink); padding: 10px 16px; border-radius: 6px; cursor: pointer; text-decoration: none; transition: background .15s, color .15s; }
button.reveal:hover, .btn:hover { background: var(--aqua); color: var(--green-deep); }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.score { color: var(--soft); font-size: 14px; font-weight: 600; margin-left: 8px; }

/* Pager */
.pager { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 18px; font-size: 15px; }
.pager a { text-decoration: none; font-weight: 700; }
.pager .nx { margin-left: auto; text-align: right; background: var(--green); color: #fff; padding: 10px 16px; border-radius: 6px; }
.pager .nx:hover { background: var(--green-deep); color: #fff; }

/* Home */
.course { list-style: none; padding: 0; margin: 10px 0 24px; border-top: 1px solid var(--line); }
.course li { border-bottom: 1px solid var(--line); margin: 0; padding: 12px 0; }
.course a { display: flex; gap: 14px; align-items: baseline; text-decoration: none; color: var(--ink); }
.course a:hover .t { color: var(--green-ink); }
.course .n { width: 28px; color: var(--mute); font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; }
.course .t { font-weight: 700; flex: 1; }
.course .lv { font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 5px; }
.course p { margin: 2px 0 0 42px; font-size: 14px; color: var(--soft); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 28px; }
.facts div { background: var(--haze); border-radius: 15px; padding: 16px 18px; }
.facts div:nth-child(2) { background: var(--aqua); }
.facts div:nth-child(3) { background: var(--crayon); }
.facts b { display: block; font: 800 26px/1.15 var(--sans); color: var(--grape); }
.facts span { font-size: 14px; color: var(--soft); }

/* Level colours */
.lvl-A1 { background: var(--mint); color: var(--green-ink); }
.lvl-A2 { background: var(--green); color: #fff; }
.lvl-B1 { background: var(--lavender); color: var(--cosmos); }
.lvl-B2 { background: var(--iris); color: #fff; }
.lvl-C1 { background: #ffcf95; color: #8a4b00; }
.lvl-C2 { background: var(--grape); color: #fff; }

/* Parallel text */
.parallel { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 10px 0 24px; padding: 4px 18px; background: var(--dove); border-radius: 15px; }
.parallel p { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.parallel p:nth-last-child(-n+2) { border-bottom: 0; }
.parallel p:nth-child(odd) { font-weight: 600; }
.parallel p:nth-child(even) { color: var(--soft); }
p.reading { font-size: 17.5px; line-height: 1.8; padding: 2px 0 2px 16px; border-left: 4px solid var(--mint); }

/* Trainer + quiz */
.card { border: 1px solid var(--line); border-radius: 15px; padding: 40px 24px; text-align: center; margin: 16px 0; min-height: 170px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(180deg, var(--haze), var(--paper)); box-shadow: var(--shadow); }
.card .front { font: 800 34px/1.2 var(--sans); }
.card .back { margin-top: 12px; font-size: 19px; color: var(--cosmos); min-height: 1.6em; }
.card .meta { margin-top: 18px; font-size: 13px; color: var(--mute); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.controls select { font: 600 14px var(--sans); padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); max-width: 100%; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.choices button { font: 600 15px var(--sans); text-align: left; padding: 12px 14px; border: 1.5px solid var(--line); background: var(--paper); border-radius: 10px; cursor: pointer; }
.choices button:hover { border-color: var(--green); background: var(--aqua); }
.choices button.ok { border-color: var(--good); background: var(--aqua); }
.choices button.no { border-color: var(--bad); background: var(--pink); }
.kbd { display: inline-block; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; font-size: 13px; background: var(--dove); font-family: ui-monospace, Menlo, monospace; }
.trainer-link { margin-top: 22px; padding: 14px 18px; background: var(--haze); border-radius: 12px; font-weight: 600; }

footer.bottom { border-top: 1px solid var(--line); color: var(--mute); font-size: 13px; background: var(--dove); }
footer.bottom p { max-width: 1160px; margin: 0 auto; padding: 18px 20px 28px; }

/* Drawer parts (only visible on phones) */
.drawer-head, .shade { display: none; }
.keys-only { }
@media (hover: none) { .keys-only { display: none; } }

/* Phone */
@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .wrap { grid-template-columns: 1fr; gap: 0; padding: 0 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .top-in { padding: 10px 16px; }
  .logo { font-size: 22px; }
  .logo small { display: none; }
  .toplinks a { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); padding: 8px 12px; font-size: 14px; }
  .menu-btn .bars { display: inline-flex; flex-direction: column; gap: 3px; }
  .menu-btn .bars i { display: block; width: 16px; height: 2px; border-radius: 2px; background: var(--green); }

  /* Index as a slide-in drawer */
  .side { display: block; position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 340px); z-index: 40; background: var(--paper); padding: 0 18px 32px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; transform: translateX(105%); transition: transform .25s ease; box-shadow: -12px 0 40px rgba(50, 40, 90, .18); border-radius: 18px 0 0 18px; }
  body.menu-open .side { transform: none; }
  body.menu-open { overflow: hidden; }
  .shade { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(50, 40, 90, .35); opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.menu-open .shade { opacity: 1; pointer-events: auto; }
  .drawer-head { display: block; position: sticky; top: 0; background: var(--paper); margin: 0 -18px 14px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); z-index: 1; }
  .drawer-bar { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 18px; margin-bottom: 10px; }
  .drawer-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--mouse); font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink); }
  .quick { display: flex; flex-wrap: wrap; gap: 8px; }
  .quick a { padding: 7px 12px; border-radius: 999px; background: var(--aqua); color: var(--green-ink); font-weight: 700; font-size: 14px; text-decoration: none; }
  .side li a { padding: 10px 12px; margin-left: -12px; font-size: 15.5px; }
  .side li.lvl { margin-top: 16px; }

  /* Page */
  main { padding-top: 18px; max-width: none; }
  .title { margin-bottom: 14px; padding-bottom: 10px; }
  .kicker { font-size: 12px; }
  h1 { font-size: 28px; line-height: 1.15; }
  h2 { font-size: 22px; margin-top: 34px; }
  article > p:first-child { font-size: 17px; }

  /* Tabs: one swipeable row, pinned under the header */
  .tabs { position: sticky; top: 61px; z-index: 5; background: var(--paper); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px; margin: 0 -16px 20px; padding: 6px 16px 0; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; white-space: nowrap; padding: 9px 14px; }

  /* Words and examples */
  .w { white-space: nowrap; }
  .w.long { white-space: normal; }
  .ex { padding: 10px 12px; }
  .has-voice .say, .say[data-audio] { width: 24px; height: 24px; font-size: 9px; }

  /* Tables: wide ones scroll sideways instead of squashing */
  table { font-size: 14.5px; }
  table.many-cols { min-width: calc(var(--cols, 5) * 122px); }
  .table-scroll { margin-left: -16px; margin-right: -16px; border-radius: 0; border-left: 0; border-right: 0; background: linear-gradient(90deg, var(--paper) 30%, rgba(255,255,255,0)), linear-gradient(90deg, rgba(255,255,255,0), var(--paper) 70%) 100% 0, radial-gradient(farthest-side at 0 50%, rgba(50,40,90,.14), transparent), radial-gradient(farthest-side at 100% 50%, rgba(50,40,90,.14), transparent) 100% 0; background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; }
  .table-scroll table { background: transparent; }
  th, td { padding: 9px 10px; }
  th:first-child, td:first-child { padding-left: 16px; }

  /* Home */
  .facts { display: flex; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 10px; margin: 18px -16px 24px; padding: 0 16px; }
  .facts::-webkit-scrollbar { display: none; }
  .facts div { flex: 0 0 72%; scroll-snap-align: start; padding: 14px 16px; }
  .facts b { font-size: 23px; }
  .course li { padding: 12px 0; }
  .course a { gap: 10px; }
  .course .n { width: 24px; }
  .course p { margin-left: 34px; }

  /* Exercises: 16px inputs so iPhones don't zoom in */
  .drill { padding: 4px 14px 12px; margin: 18px -4px; }
  .drill ol { padding-left: 22px; }
  .drill input { width: 100%; margin-top: 6px; font-size: 16px; padding: 10px 12px; }
  .drill-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
  button.reveal { padding: 11px 16px; }

  /* Pager: two big buttons */
  .pager { flex-direction: column-reverse; gap: 10px; }
  .pager a { display: block; text-align: center; padding: 13px 16px; border-radius: 10px; background: var(--dove); }
  .pager .nx { margin-left: 0; text-align: center; }
  .pager span:empty { display: none; }

  /* Trainer + quiz */
  .controls select { flex: 1 1 100%; font-size: 16px; }
  .card { padding: 32px 18px; min-height: 160px; }
  .card .front { font-size: 30px; }
  .controls .btn { flex: 1 1 auto; justify-content: center; padding: 13px 12px; }
  .controls .score { flex: 1 1 100%; margin: 4px 0 0; text-align: center; }
  .choices { grid-template-columns: 1fr; }

  .parallel { grid-template-columns: 1fr; padding: 4px 14px; }
  .parallel p:nth-child(odd) { border-bottom: 0; padding-bottom: 0; }
  footer.bottom p { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
}

/* Shared bits used by the home page at every size */
.btn.big { font-size: 15.5px; padding: 13px 20px; }
.start-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 6px; }
.course li.lv-head { display: flex; align-items: center; gap: 10px; padding: 22px 0 8px; border-bottom: 0; font-weight: 800; font-size: 15px; color: var(--grape); }
.course li.lv-head .lv { font-size: 11px; }
.course li.lv-head + li { border-top: 1px solid var(--line); }

/* Phone, second pass: app-like and compact */
@media (max-width: 860px) {
  /* closed drawer must not cast its shadow onto the page */
  .side { visibility: hidden; box-shadow: none; transition: transform .25s ease, visibility 0s linear .25s; }
  body.menu-open .side { visibility: visible; box-shadow: -12px 0 40px rgba(50, 40, 90, .18); transition: transform .25s ease; }

  /* compact header */
  .top { background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
  .top-in { padding: 8px 16px; }
  .logo { font-size: 21px; gap: 8px; }
  .flag { width: 24px; height: 16px; }
  .menu-btn { padding: 7px 11px; border-radius: 999px; }

  /* compact title block */
  main { padding-top: 14px; }
  .title { border-bottom-width: 0; padding-bottom: 0; margin-bottom: 12px; }
  .kicker { font-size: 11px; margin-bottom: 2px; }
  h1 { font-size: 26px; }
  article > p:first-child { font-size: 16.5px; color: var(--ink); line-height: 1.6; }

  /* tabs: a full-width segmented control, pinned under the header */
  .tabs { top: 54px; border-bottom: 0; padding: 8px 16px; gap: 0; margin-bottom: 16px; box-shadow: 0 1px 0 var(--line); }
  .tabs .tab, .tabs .tab.on { flex: 1 1 0; min-width: max-content; text-align: center; font-size: 13.5px; padding: 9px 10px; border-radius: 0; border: 1.5px solid var(--line); border-right-width: 0; margin: 0; background: var(--paper); color: var(--soft); }
  .tabs .tab:first-child { border-radius: 10px 0 0 10px; }
  .tabs .tab:last-child { border-radius: 0 10px 10px 0; border-right-width: 1.5px; }
  .tabs .tab.on { background: var(--green); border-color: var(--green); color: #fff; }
  .tabs .tab.on + .tab { border-left-color: var(--green); }

  /* examples: play button on the left, word + meaning, pronunciation underneath */
  .ex { position: relative; display: block; padding: 10px 12px 10px 56px; margin-bottom: 8px; border-radius: 12px; min-height: 54px; }
  .ex > .w { white-space: normal; }
  .ex > .w .say { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); margin: 0; width: 34px; height: 34px; font-size: 11px; }
  .ex > .w .say:hover { transform: translateY(-50%) scale(1.06); }
  .ex > .w b { font-size: 17px; line-height: 1.35; }
  .ex .gloss { font-size: 15px; }
  .ex .pw { display: block; font-size: 14px; line-height: 1.35; margin-top: 1px; }
  .ex .pl { display: none; }
  .ex .note-inline { display: block; font-size: 13.5px; margin-top: 2px; }
  .pager .pg-t { display: none; }

  /* vocab tables: word column wider, roomier rows */
  table.vocab td { padding-top: 11px; padding-bottom: 11px; }
  table.vocab td:first-child { width: 44%; }

  /* lesson pager becomes a sticky bottom bar */
  .pager { position: sticky; bottom: 0; z-index: 6; flex-direction: row; gap: 8px; margin: 28px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .pager a { flex: 1 1 0; min-width: 0; padding: 12px 10px; font-size: 14px; border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pager .nx { flex: 1.4 1 0; }
  .pager span:empty { display: none; }
  main { padding-bottom: 0; }
  footer.bottom { margin-top: 0; }

  /* home */
  .start-row .btn { flex: 1 1 0; justify-content: center; }
  .facts div { flex-basis: 64%; }
  .course li.lv-head { padding-top: 18px; }
  .course p { font-size: 13.5px; }
}

/* Print: clean handouts */
@media print {
  @page { margin: 16mm 14mm; }
  body { font-size: 11.5pt; color: #000; }
  .top, .side, .shade, footer.bottom, .pager, .tabs, .say, .drill-actions, .menu-btn, .trainer-link { display: none !important; }
  .wrap { display: block; padding: 0; max-width: none; }
  main { padding: 0; max-width: none; }
  .title { border-bottom-color: #000; }
  h2 { break-after: avoid; margin-top: 24px; }
  .ex, .box, .parallel, .facts div { background: none; border: 1px solid #ccc; break-inside: avoid; }
  .drill { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .drill input { border: 0; border-bottom: 1px solid #000; border-radius: 0; width: 55%; background: none; }
  .drill.shown .ans { display: inline; color: #000; }
  .table-scroll { overflow: visible; border-color: #999; }
  th { background: #eee !important; color: #000; }
  a { color: #000; text-decoration: none; }
  .lv { border: 1px solid #999; background: none !important; color: #000 !important; }
}
