/* ReaderTube. Contrast ratios are noted next to each text colour (WCAG AA = 4.5:1). */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f9f9fb;
  --text: #1d1d1f;            /* 15.5:1 on --bg */
  --muted: #515154;           /* 7.3:1 on --bg, 8.1:1 on --surface */
  --hairline: rgba(0, 0, 0, .09);
  --accent: #0066cc;          /* 5.6:1 on white */
  --accent-fill: #0071e3;     /* white text on it: 4.7:1 */
  --accent-wash: #e8f1fc;
  --mark-bg: #fff1b8;         /* --text on it: 14.2:1 */
  --mark-text: #1d1d1f;
  --code-bg: #1d1d1f;
  --code-text: #f5f5f7;
  --ok: #1a7f37;    --ok-bg: #e9f6ec;      /* 4.6:1 */
  --warn: #8a5300;  --warn-bg: #fdf3e1;    /* 5.8:1 */
  --bad: #b91c1c;   --bad-bg: #fdecec;     /* 5.7:1 */
  --na: #515154;    --na-bg: #efeff2;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px rgba(0,0,0,.06);
  --radius: 20px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #232326;
    --text: #f5f5f7;          /* 16.7:1 on --surface */
    --muted: #a1a1a6;         /* 6.6:1 on --surface */
    --hairline: rgba(255, 255, 255, .11);
    --accent: #4da3ff;        /* 6.5:1 on --surface */
    --accent-wash: rgba(77, 163, 255, .13);
    --mark-bg: rgba(255, 214, 10, .22);
    --mark-text: #ffe680;     /* 11.9:1 on the mark over --surface */
    --code-bg: #0b0b0c;
    --ok: #4ade80;    --ok-bg: rgba(74, 222, 128, .12);
    --warn: #fbbf24;  --warn-bg: rgba(251, 191, 36, .12);
    --bad: #f87171;   --bad-bg: rgba(248, 113, 113, .12);
    --na: #a1a1a6;    --na-bg: rgba(255, 255, 255, .08);
    --shadow: 0 0 0 1px rgba(255,255,255,.06);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--accent-fill); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 28px; }

/* ---------- header: the landing view, then the compact top bar ----------
   One header holds the wordmark and the link field in both views. Before a link
   is submitted it fills the screen with both centred; with html.results it is the
   sticky translucent bar. app.js animates the change (FLIP), so it can reverse
   from wherever it is. */
.top { position: relative; z-index: 20; border-bottom: 1px solid transparent; transition: background-color .45s var(--ease), border-color .45s var(--ease); }
.top-in {
  min-height: 100vh; min-height: 100svh; padding: 0 24px 12vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
}
.mark { margin: 0; font: 700 clamp(2.9rem, 10vw, 4.6rem)/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif; letter-spacing: -0.035em; }
.mark-link { display: inline-flex; align-items: center; gap: .26em; color: var(--text); text-decoration: none; transform-origin: 0 0; border-radius: 12px; }
.mark-logo { width: .96em; height: .96em; flex: none; }
.ask { position: relative; display: flex; gap: 10px; width: min(680px, 100%); font-size: 1.15rem; }
/* #b91c1c on 12% red over #f5f5f7 (#eedbdd) = 4.87:1; dark #f87171 on 12% over #000 (#1e0e0e) = 6.75:1 */
.url-error {
  position: absolute; top: calc(100% + 12px); left: 0; margin: 0; padding: 8px 14px; border-radius: 12px;
  font-size: .95rem; line-height: 1.35; color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--bg));
  box-shadow: var(--shadow); animation: rise .3s var(--ease) both;
}
.field {
  flex: 1; display: flex; align-items: center; min-width: 0;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px;
  padding: 0 1.15em; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; padding: .82em 0; outline: none; }
.field input::-webkit-search-cancel-button { display: none; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.nojs { margin: 0; color: var(--muted); }

html.results .top {
  position: sticky; top: 0;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--hairline);
}
html.results .top-in {
  min-height: 0; max-width: 1280px; margin: 0 auto; padding: 9px 28px;
  /* logo | field centred on the page | free column of the same width, so the field sits in the true centre */
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr); align-items: center; gap: 22px;
}
html.results .top-in > .mark { justify-self: start; }
html.results .top-in > .ask { justify-self: center; }
html.results .mark { font-size: 1.12rem; letter-spacing: -0.012em; }
html.results .mark-logo { width: 1.45em; height: 1.45em; }
html.results .mark-link { gap: .55em; }
html.results .ask { width: 100%; font-size: 1rem; }
html.results .field input { padding: .62em 0; }
html.results .btn#go { min-height: 2.6em; padding: 0 1.25em; }
@media (prefers-reduced-transparency: reduce) { html.results .top { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* Results-only blocks never show on the landing view. */
#main:not(.shown) > * { display: none !important; }
#main:focus { outline: none; }

.btn {
  border: 0; border-radius: 999px; padding: 0 1.4em; min-height: 3.05em; flex: none;
  background: var(--accent-fill); color: #fff; cursor: pointer;   /* #fff on #0071e3: 4.7:1 */
  font-family: inherit; font-size: .92em; font-weight: 600; line-height: 1; white-space: nowrap;
  transition: transform .12s var(--ease), filter .2s;
}
.paste .btn { font-size: 1.02rem; min-height: 52px; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.96); transition-duration: .05s; }
/* disabled: #515154 on #efeff2 = 6.89:1 light; #a1a1a6 on #141414 = 7.16:1 dark */
.btn:disabled { background: var(--na-bg); color: var(--muted); cursor: progress; transform: none; filter: none; }

.notices > * { max-width: 820px; }   /* the column itself comes from .wrap, so it lines up with the top bar */
.notices:has(> :not([hidden])) { padding-top: 26px; }
.paste { background: var(--surface); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); animation: rise .45s var(--ease) both; }
.paste-why { margin: 0 0 10px; font-weight: 600; }
.paste-steps { margin: 0 0 14px; padding-left: 1.3em; color: var(--text); }
.paste-steps li { margin: 3px 0; }
.paste textarea {
  width: 100%; resize: vertical; border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface-2);
  color: var(--text); font: 15.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace; padding: 12px 14px; margin-bottom: 12px;
}
.paste textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }

.error { padding: 14px 18px; border-radius: 14px; background: var(--bad-bg); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); animation: rise .4s var(--ease) both; }
.paste + .error:not([hidden]) { margin-top: 14px; }

/* ---------- status ---------- */
.status { margin-top: 26px; }
.status-card { max-width: 820px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; animation: rise .4s var(--ease) both; }
.status-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.status-head strong { font-size: 1.08rem; letter-spacing: -0.01em; }
.eta { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.track { display: grid; grid-template-columns: 22px 120px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--hairline); }
.track:first-child { border-top: 0; }
.track .name { font-weight: 600; }
.track .what { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track .left { color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.track.wait .dot { border: 2px dashed var(--hairline); }
.track.run .dot { border: 2px solid var(--hairline); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.track.done .dot { background: var(--ok); color: var(--surface); }
.track.done .dot::after { content: ""; width: 8px; height: 4.5px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.track.fail .dot { background: var(--bad); }
.track.fail .what { color: var(--bad); white-space: normal; }
.bar-line { grid-column: 2 / -1; height: 4px; border-radius: 4px; background: var(--na-bg); overflow: hidden; margin-top: -2px; }
.bar-line i { display: block; height: 100%; width: 0; background: var(--accent-fill); border-radius: 4px; transition: width .5s var(--ease); }
.track.done .bar-line { display: none; }
.searches { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.status details summary { cursor: pointer; color: var(--muted); font-size: .92rem; }
.status details summary:hover { color: var(--text); }
.chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 3px 10px; border-radius: 999px; background: var(--na-bg); font-size: .86rem; }

/* ---------- output layout ---------- */
.out { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 44px; padding-top: 32px; padding-bottom: 120px; }

/* ---------- sidebar: two levels, current position marked on both ---------- */
.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 104px); overflow: auto; overscroll-behavior: contain; padding: 2px 6px 12px 2px; scrollbar-width: thin; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.toc-list { display: grid; gap: 2px; }
/* level 1: sections */
.toc-top {
  display: block; position: relative; padding: 7px 12px; border-radius: 10px;
  font-size: .98rem; font-weight: 600; letter-spacing: -0.005em; color: var(--muted);   /* 6.6:1 dark, 7.3:1 light */
}
.toc-top:hover { color: var(--text); background: var(--na-bg); }
.toc-top.on { color: var(--text); background: var(--accent-wash); }
.toc-top.on::before, .toc-sec.has-on > .toc-top::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent);
}
.toc-sec.has-on > .toc-top { color: var(--text); }       /* parent of the key point being read */
/* level 2: key points, indented behind a guide line */
.toc-sub { margin: 2px 0 8px 18px !important; padding-left: 0; border-left: 2px solid var(--hairline); display: grid; gap: 1px; }
.toc-kp {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: baseline;
  margin-left: -2px; padding: 6px 8px 6px 12px; border-left: 2px solid transparent; border-radius: 0 9px 9px 0;
  font-size: .9rem; line-height: 1.35; color: var(--muted);
}
.toc-kp:hover { color: var(--text); background: var(--na-bg); }
.toc-n { font: 600 .78rem/1.35 ui-monospace, "SF Mono", Menlo, monospace; color: var(--muted); text-align: right; }
.toc-t { min-width: 0; }
.toc-time {
  font: 600 .74rem/1 ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums;
  padding: 3px 6px; border-radius: 6px; background: var(--na-bg); color: var(--muted); align-self: center;
}
.toc-kp.on { color: var(--text); font-weight: 600; background: var(--accent-wash); border-left-color: var(--accent); }
.toc-kp.on .toc-n { color: var(--accent); }
.toc-kp.on .toc-time { background: var(--accent-fill); color: #fff; }   /* 4.7:1 */
@media (max-width: 1100px) { .out { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }

.doc > section { margin-bottom: 56px; }
.doc h2 { font-size: 1.7rem; letter-spacing: -0.022em; line-height: 1.15; margin: 0 0 18px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.doc h2 .n { font-size: 1rem; font-weight: 600; color: var(--muted); }

/* video */
.video { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); margin-bottom: 30px; animation: rise .45s var(--ease) both; }
.video img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; display: block; background: var(--na-bg); }
.video h2 { font-size: 1.25rem; margin: 0 0 4px; display: block; }
.video p { margin: 0; color: var(--muted); font-size: .95rem; }

/* overview */
.tldr { font-size: 1.3rem; line-height: 1.55; letter-spacing: -0.008em; margin: 0 0 18px; }
.prereq { background: var(--surface); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.prereq h3 { margin: 0 0 8px; font-size: 1rem; }
.prereq ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.prereq li { padding: 6px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--hairline); font-size: .95rem; }

/* highlighted terms and inline code */
mark { background: var(--mark-bg); color: var(--mark-text); padding: .05em .28em; border-radius: 5px; font-weight: 600; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
:not(pre) > code { font: .9em ui-monospace, "SF Mono", Menlo, monospace; padding: .1em .38em; border-radius: 6px; background: color-mix(in srgb, var(--accent) 11%, transparent); color: color-mix(in srgb, var(--accent) 72%, var(--text)); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
a.ts { font: 600 .82rem/1 ui-monospace, "SF Mono", Menlo, monospace; text-decoration: none; padding: 3px 7px; border-radius: 7px; background: var(--na-bg); color: var(--text); white-space: nowrap; }
a.ts:hover { background: var(--accent-wash); color: var(--accent); }

/* key points: full-width lessons */
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: k; }
.lesson { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 30px 28px; animation: rise .45s var(--ease) both; transition: box-shadow .3s; }
.lesson.live { box-shadow: var(--shadow), 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.lesson-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.lesson-head .num { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-fill); color: #fff; font-weight: 700; }
.lesson-head h3 { flex: 1; margin: 0; font-size: 1.32rem; letter-spacing: -0.015em; line-height: 1.25; }
.watch { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 10px; border-radius: 999px; background: var(--na-bg); color: var(--text); text-decoration: none; font-size: .88rem; font-weight: 600; font-variant-numeric: tabular-nums; transition: background .15s, transform .12s var(--ease); }
.watch:hover { background: var(--accent-wash); color: var(--accent); }
.watch:active { transform: scale(.95); }
.lesson > p { margin: 0 0 14px; }
.callout { border-radius: 14px; padding: 12px 16px; margin: 14px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }
.callout b { grid-column: 1 / -1; font-size: .82rem; letter-spacing: .02em; }
.callout p { grid-column: 1 / -1; margin: 0; }
.callout.why { background: var(--accent-wash); }
.callout.why b { color: var(--accent); }
.callout.trap { background: var(--warn-bg); }
.callout.trap b { color: var(--warn); }
.howto { display: grid; gap: 18px; margin-top: 16px; }
.howto.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
@media (max-width: 860px) { .howto.two { grid-template-columns: minmax(0, 1fr); } }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 8px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 700; background: var(--na-bg); color: var(--text); margin-top: 1px; }

.code { position: relative; }
.code .lang { position: absolute; top: 10px; left: 16px; font: 600 .74rem/1 ui-monospace, Menlo, monospace; color: #a1a1a6; text-transform: lowercase; }
pre { margin: 0; background: var(--code-bg); color: var(--code-text); border-radius: 14px; padding: 32px 84px 16px 16px; font: 15.5px/1.6 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.copy { position: absolute; top: 8px; right: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: var(--code-text); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-family: inherit; font-size: .8rem; font-weight: 600; line-height: 1; transition: transform .12s var(--ease), background .2s; }
.copy:hover { background: rgba(255,255,255,.16); }
.copy:active { transform: scale(.94); }

/* practice */
.grid2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; animation: rise .45s var(--ease) both; }
.exercise { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-content: start; }
.exercise input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent-fill); cursor: pointer; }
.exercise label { font-weight: 600; cursor: pointer; }
.exercise .why, .exercise .code { grid-column: 2; }
.exercise .why { margin: 0; color: var(--muted); }
.exercise .code { margin-top: 8px; }
.exercise.checked label { text-decoration: line-through; color: var(--muted); }
.done-count { font-size: 1rem; font-weight: 600; color: var(--muted); }

.quiz { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.q { padding: 0; overflow: hidden; }
.q summary { list-style: none; cursor: pointer; padding: 18px 22px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; font-weight: 600; }
.q summary::-webkit-details-marker { display: none; }
.q summary .reveal { font-size: .88rem; color: var(--accent); white-space: nowrap; }
.q[open] summary .reveal::before { content: "Hide answer"; }
.q:not([open]) summary .reveal::before { content: "Show answer"; }
.q .a { padding: 0 22px 18px; margin: 0; border-top: 1px solid var(--hairline); padding-top: 14px; }

.glossary { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.glossary .card { padding: 16px 18px; }
.glossary dt { font-weight: 700; margin-bottom: 4px; }
.glossary dd { margin: 0; color: var(--muted); font-size: .96rem; }

/* fact checks */
.verdicts { display: inline-flex; gap: 6px; flex-wrap: wrap; font-size: .85rem; font-weight: 600; letter-spacing: 0; }
.verdict { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; font-size: .84rem; font-weight: 700; }
.verdict::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.v-correct { color: var(--ok); background: var(--ok-bg); }
.v-partly, .v-outdated { color: var(--warn); background: var(--warn-bg); }
.v-wrong { color: var(--bad); background: var(--bad-bg); }
.v-unverified { color: var(--na); background: var(--na-bg); }
.fact { border-top: 4px solid transparent; }
.fact.f-correct { border-top-color: var(--ok); }
.fact.f-partly, .fact.f-outdated { border-top-color: var(--warn); }
.fact.f-wrong { border-top-color: var(--bad); }
.fact.f-unverified { border-top-color: var(--na); }
.fact-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.claim { font-weight: 600; font-size: 1.04rem; margin: 0 0 8px; }
.fact p { margin: 0 0 8px; }
.sources { margin: 6px 0 0; padding: 0; list-style: none; font-size: .94rem; }
.sources li { margin: 3px 0; overflow-wrap: anywhere; }
.nosrc { color: var(--muted); font-size: .92rem; border-left: 3px dashed var(--hairline); padding-left: 10px; }

.links a.card { display: block; text-decoration: none; color: var(--text); transition: transform .25s var(--ease); }
.links a.card:hover { transform: translateY(-2px); }
.links a.card:active { transform: scale(.98); }
.links .title { font-weight: 600; color: var(--accent); display: block; margin-bottom: 4px; }
.links p { margin: 0; color: var(--muted); }
.links .host { display: block; margin-top: 8px; font-size: .85rem; color: var(--muted); }

/* skeleton while a section waits for its first words */
.skel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; display: grid; gap: 10px; }
.skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--na-bg) 0%, var(--hairline) 50%, var(--na-bg) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skel i:nth-child(1) { width: 38%; height: 16px; } .skel i:nth-child(2) { width: 92%; } .skel i:nth-child(3) { width: 80%; }
.skel-note { color: var(--muted); font-size: .92rem; margin: 0; }
.sec-error { color: var(--bad); background: var(--bad-bg); border-radius: 14px; padding: 12px 16px; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .track.run .dot { border-top-color: var(--accent); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  html:not(.results) .ask { flex-direction: column; gap: 12px; }
  html.results .top-in { padding: 8px 14px; gap: 12px; grid-template-columns: auto minmax(0, 1fr); }
  html.results .mark-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html.results .field { padding: 0 .9em; }
  html.results .btn#go { padding: 0 1em; }
  .video { grid-template-columns: 1fr; }
  .lesson { padding: 20px 18px 22px; }
  .lesson-head { flex-wrap: wrap; }
  .lesson-head h3 { flex-basis: calc(100% - 50px); }
  .watch { margin-left: 50px; }
  .track { grid-template-columns: 22px 1fr auto; }
  .track .what { grid-column: 2 / -1; grid-row: 2; white-space: normal; }
  .bar-line { grid-column: 2 / -1; }
}
