/* Learning Center (/learn/) — loaded only on learn pages (site/_src/layout.mjs). Tokens come from site.css. */
.crumbs ol { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 0 6px; font-size: 0.92rem; color: var(--ink-2); }
.crumbs li { margin: 0; max-width: none; display: flex; align-items: center; }
.crumbs li[aria-current] { padding: 10px 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--rule); }
.crumbs a { display: inline-block; padding: 10px 0; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 0.92rem; margin: 0.4em 0; }
.lesson-meta > span + span::before { content: "·"; margin-right: 14px; color: var(--rule); }
.done-flag { color: var(--ok); font-weight: 700; }
.learn-hero h1 { max-width: 20ch; }
.track-grid { list-style: none; padding: 0; margin: 1em 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.track-card { position: relative; margin: 0; max-width: none; border: 1px solid var(--rule); border-top: 3px solid var(--ink); border-radius: var(--r); padding: 18px 18px 14px; background: var(--paper); display: flex; flex-direction: column; }
.track-card h3 { margin: 0 0 6px; font-size: 1.25rem; }
.track-card h3 a { color: var(--ink); text-decoration: none; }
.track-card h3 a::after { content: ""; position: absolute; inset: 0; }
.track-card h3 a:focus-visible { outline: none; }
.track-card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.track-card:hover { border-color: var(--ink-2); }
.track-card > p { color: var(--ink-2); margin: 0 0 8px; }
.track-icon { font-size: 1.8rem; line-height: 1; margin: 0 0 10px; }
.track-progress { font-weight: 650; color: var(--ink) !important; font-size: 0.92rem; }
.bar-track { height: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden; margin-top: auto; }
.bar-track span { display: block; height: 100%; width: var(--pct, 0%); background: var(--ok); border-radius: 3px; }
.track-card.complete { border-top-color: var(--ok); }
.track-card.complete .track-progress { color: var(--ok) !important; }
.start-path { padding-left: 1.4em; border-top: 2px solid var(--ink); }
.start-path li { padding: 10px 0; border-bottom: 1px solid var(--rule); margin: 0; max-width: none; }
.start-path a { font-weight: 650; display: inline-block; min-height: 24px; }
.start-path .lesson-meta { display: inline-flex; margin: 0 0 0 10px; }
.glossary-teaser { margin-top: 2.5em; }
.glossary-teaser h2, .page-hub section > h2 { margin-top: 1.6em; }
.track-head { padding: 12px 0 18px; border-bottom: 1px solid var(--rule); }
.track-head h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); margin-top: 0.2em; }
.learn-lead { font-size: 1.12rem; color: var(--ink-2); }
.lesson-list { list-style: none; padding: 0; margin: 1.5em 0; }
.lesson-list li { display: grid; grid-template-columns: 44px 1fr; gap: 0 14px; padding: 18px 0; border-bottom: 1px solid var(--rule); margin: 0; max-width: 820px; }
.lesson-list .num { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.lesson-list li.is-done .num { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.lesson-list h2 { font-size: 1.2rem; margin: 4px 0 4px; }
.lesson-list h2 a { color: var(--ink); }
.lesson-list p { margin: 0 0 4px; color: var(--ink-2); }
.page-lesson { max-width: 1060px; }
.lesson-head h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3rem); max-width: 22ch; }
.lesson-tools { margin: 10px 0 0; }
.btn-ghost.btn-sm, .btn.btn-sm { min-height: 44px; }
.you-learn { background: var(--paper-2); border-left: 4px solid var(--marigold); border-radius: 0 var(--r) var(--r) 0; padding: 14px 20px; margin: 22px 0; max-width: 760px; }
.you-learn h2 { font-size: 1.05rem; margin: 0 0 6px; }
.you-learn ul { margin: 0; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 48px; }
.lesson-toc { margin-bottom: 20px; }
.lesson-body { min-width: 0; max-width: 740px; }
.lesson-body h2 { margin-top: 2em; scroll-margin-top: 80px; }
.lesson-body h3 { scroll-margin-top: 80px; }
.lesson-body td code { white-space: nowrap; overflow-wrap: normal; }
.lesson-toc details { background: var(--paper-2); border-radius: var(--r); padding: 4px 16px; }
.lesson-toc summary { cursor: pointer; font-weight: 700; padding: 10px 0; min-height: 44px; display: flex; align-items: center; }
.lesson-toc ol { margin: 0 0 12px; padding-left: 1.2em; font-size: 0.95rem; }
.lesson-toc li { margin: 2px 0; }
.lesson-toc a { display: block; padding: 6px 0; color: var(--ink); }
.lesson-toc a.on { font-weight: 700; color: var(--link); }
@media (min-width: 1000px) {
  .lesson-grid { grid-template-columns: 230px minmax(0, 740px); }
  .lesson-grid.no-toc { grid-template-columns: minmax(0, 740px); }
  .lesson-toc { order: 0; }
  .lesson-toc details { position: sticky; top: 84px; background: none; padding: 0; border-left: 2px solid var(--rule); padding-left: 14px; }
  .lesson-toc summary { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); pointer-events: none; list-style: none; }
  .lesson-toc summary::-webkit-details-marker { display: none; }
}
.checklist { border: 2px solid var(--ink); border-radius: 10px; padding: 18px 20px 12px; margin: 2.2em 0; background: var(--paper); }
.checklist-title { font: 750 1.2rem var(--display); margin: 0 0 8px; }
.checklist ul { list-style: none; padding: 0; margin: 0; }
.checklist li { margin: 0; max-width: none; border-top: 1px solid var(--rule); }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; cursor: pointer; min-height: 44px; }
.checklist input { width: 22px; height: 22px; flex: none; margin: 2px 0 0; accent-color: var(--ok); cursor: pointer; }
.checklist input:checked + span { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--rule); }
.checklist-progress { margin: 6px 0 0; font-size: 0.92rem; color: var(--ink-2); min-height: 1.4em; }
.lesson-end { margin: 2.5em 0 0; padding-top: 18px; border-top: 2px solid var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.done-btn { min-height: 48px; }
.done-btn[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.done-note { margin: 0; color: var(--ink-2); font-weight: 600; }
.lesson-nav { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin: 1.6em 0; }
.lesson-nav a { display: block; border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 14px; text-decoration: none; color: var(--ink); font-weight: 650; min-height: 44px; }
.lesson-nav a:hover { border-color: var(--ink); }
.lesson-nav span { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); font-weight: 600; }
.lesson-nav .next { text-align: right; }
.soft-cta { color: var(--ink-2); font-size: 0.95rem; margin-top: 1.4em; }
.az { display: flex; flex-wrap: wrap; gap: 4px; margin: 18px 0; }
.az a { min-width: 44px; min-height: 44px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: var(--r); text-decoration: none; font-weight: 700; color: var(--ink); }
.az a:hover { border-color: var(--ink); }
.glossary { margin: 0; border-top: 2px solid var(--ink); max-width: 820px; }
.glossary .term { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.glossary dt { font-weight: 750; font-size: 1.1rem; scroll-margin-top: 80px; }
.glossary dd { margin: 4px 0 0; }
.glossary dd p { margin: 0 0 4px; }
.term-link { font-size: 0.92rem; }
.glossary-sources { font-size: 0.92rem; max-width: 820px; }
.glossary-sources h2 { font-size: 1.15rem; }
.learn-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 10px; font-weight: 650; z-index: 20; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0,0,0,0.2); }
@media (prefers-reduced-motion: no-preference) {
  .bar-track span { transition: width 0.5s ease; }
  .track-card.celebrate { animation: learn-pop 0.6s ease both; }
  .learn-toast { animation: learn-rise 0.35s ease both; }
  @keyframes learn-pop { 0% { transform: scale(1); } 40% { transform: scale(1.03); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 30%, transparent); } 100% { transform: scale(1); } }
  @keyframes learn-rise { from { opacity: 0; transform: translate(-50%, 10px); } }
}
