/* The lesson pages (/learn/): plain, light, readable on phones. */
:root { --fg: #1d2a38; --muted: #5b6b7c; --line: #dbe4ee; --accent: #ffcf33; --accent-ink: #1d2a38; --link: #1f63b5; --soft: #f3f7fb; }
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.75 system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif; color: var(--fg); background: #fff; }
a { color: var(--link); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: linear-gradient(#8ec5ff, #2f6fb5); }
.top a { color: #fff; text-decoration: none; font-weight: 700; }
.top nav { display: flex; gap: 14px; align-items: center; }
.top .play { background: var(--accent); color: var(--accent-ink); padding: 6px 14px; border-radius: 999px; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
h1 { font-size: 30px; line-height: 1.3; margin: 12px 0; }
h2 { font-size: 22px; margin: 32px 0 8px; }
.answer { font-size: 18px; background: var(--soft); border-left: 4px solid #2f6fb5; padding: 12px 16px; border-radius: 8px; }
.cta { display: inline-block; margin: 6px 0 4px; padding: 10px 18px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 800; text-decoration: none; }
ul, ol { padding-left: 1.4em; }
li { margin: 4px 0; }
.steps li { margin: 8px 0; }
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin: 8px 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.practice { margin: 32px 0 8px; padding: 16px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
.practice p { margin: 4px 0 8px; }
.updated { font-size: 14px; color: var(--muted); }
.more ul { list-style: none; padding: 0; }
.more li { padding: 6px 0; border-bottom: 1px solid var(--line); }
footer { text-align: center; font-size: 14px; color: var(--muted); padding: 24px 16px 32px; }
figure { margin: 16px 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
/* A screenshot with its notes as text over it (positions in % of the picture). */
.shot .frame { position: relative; container-type: inline-size; }
.shot svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.shot svg line { stroke: #ffcf33; stroke-width: 6; }
.shot svg circle { fill: #ffcf33; }
.shot .note { position: absolute; max-width: 62%; padding: .35em .8em; border-radius: .6em; background: rgba(20, 32, 48, .88); border: 2px solid #ffcf33; color: #fff; font-weight: 700; font-size: clamp(9px, 2.4cqw, 18px); line-height: 1.35; }
.shot .board { position: absolute; left: 50%; top: 3%; transform: translateX(-50%); display: grid; grid-template-columns: auto auto auto; align-items: center; column-gap: .8em; padding: .4em 1.2em .5em; border-radius: .8em; background: rgba(20, 32, 48, .85); color: #fff; font-size: clamp(9px, 2.4cqw, 18px); font-weight: 700; text-align: center; }
.shot .board b { font-size: 2em; line-height: 1.1; }
.shot .board em { grid-column: 1 / -1; font-style: normal; color: #ffcf33; font-weight: 600; }
.langs { font-size: 14px; color: var(--muted); }
/* YouTube videos: a thumbnail with a play mark until played (public/learn/video.js). */
.yt-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.yt { margin: 0; }
.yt-play, .yt-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; overflow: hidden; background: #000; }
.yt-play { position: relative; padding: 0; cursor: pointer; }
.yt-play img { width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; opacity: .92; transition: opacity .15s; }
.yt-play:hover img { opacity: 1; }
.yt-icon { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: #e62117; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.yt-icon::after { content: ''; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.yt figcaption b { color: var(--fg, inherit); }
