/* Lesson pages (/learn/..., /zh/learn/..., /cheat-sheet/): layout on top of styles.css and theme.css. */
.learn-site { max-width: 1000px; margin: 0 auto; padding: 18px 20px 30px; }
.learn-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.learn-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: "Grandstander", system-ui, sans-serif; font-weight: 800; font-size: 26px; }
.learn-brand .brand-mark { width: 42px; height: 42px; }
.learn-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.learn-nav a { color: var(--ink); font-weight: 600; }
.learn-nav a.action { color: #ffffff; text-decoration: none; }
.learn-main h1 { font-size: 40px; line-height: 1.15; margin: 6px 0 12px; }
.learn-main .lead { font-size: 19px; line-height: 1.6; max-width: 820px; }
.learn-main .card { margin: 18px 0; padding: 20px 22px; }
.learn-main .card h2 { font-size: 26px; margin-bottom: 10px; }
.learn-main .card h3 { font-size: 16px; margin: 0 0 6px; color: var(--muted); }
.learn-main p { line-height: 1.6; }
.crumbs { font-size: 15px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0 4px; align-items: start; }
.pair pre { margin: 0; font-size: 16px; }
.learn-main .markdown-preview { min-height: 0; margin-top: 0; }
.learn-main .markdown-preview.try-preview { min-height: 72px; }
.note { color: var(--muted); font-size: 16px; margin: 6px 0 14px; }
.mistake + .mistake { border-top: 1px dashed var(--line); padding-top: 10px; }
.practice .prompt { font-size: 18px; font-weight: 600; }
.practice .answer-editor { width: 100%; min-height: 120px; box-sizing: border-box; font: 16px/1.5 "IBM Plex Mono", Menlo, monospace; }
.practice #practice-check { margin-top: 12px; }
.cta { background: var(--selected); }
.cta .action { display: inline-block; text-decoration: none; }
.learn-main > p .action { display: inline-block; text-decoration: none; margin: 4px 8px 4px 0; }
.prev-next { display: flex; justify-content: space-between; gap: 12px; margin: 22px 0; flex-wrap: wrap; }
.prev-next a { font-weight: 600; color: var(--ink); }
.lesson-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.lesson-links li { display: grid; gap: 2px; }
.lesson-links a { color: var(--ink); font-size: 18px; }
.lesson-links span { color: var(--muted); font-size: 15px; line-height: 1.5; }
.cheat-table { width: 100%; border-collapse: collapse; }
.cheat-table th, .cheat-table td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.cheat-table td:first-child { width: 20%; font-weight: 600; }
.cheat-table td:nth-child(2) { width: 42%; }
.cheat-table pre { margin: 0; font-size: 14px; }
.cheat-table .markdown-preview { padding: 8px 12px; }
.learn-foot { margin-top: 30px; border-top: 2px solid var(--line); color: var(--muted); font-size: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 700px) {
  .pair { grid-template-columns: 1fr; }
  .learn-main h1 { font-size: 30px; }
  .cheat-table thead { display: none; }
  .cheat-table tr { display: grid; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .cheat-table td { border: 0; padding: 4px 0; width: auto !important; }
}
@media print {
  .learn-head, .learn-foot, .prev-next, .cta, .practice, .note { display: none; }
  #app { background: none; }
  .learn-main .card { box-shadow: none; border: 1px solid #cccccc; break-inside: avoid; }
  .cheat-table tr { break-inside: avoid; }
}
.learn-main a.action { display: inline-block; text-decoration: none; color: #ffffff; }
.learn-main a.action.ghost { color: var(--ink); }
.cheat-table a { color: var(--ink); }
