/* /learn: long-form lesson text, the hub groups and lesson navigation.
   Built on the tokens in site.css; nothing here overrides site.css components. */

/* ── hub ── */
.learn-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.learn-chips .chip { display: inline-flex; align-items: center; }
.learn-feature { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); overflow: hidden; }
.learn-feature-art { background: var(--bg); min-height: 220px; }
.learn-feature-art img { width: 100%; height: 100%; object-fit: cover; }
.learn-feature-copy { display: grid; gap: 12px; align-content: center; padding: clamp(24px, 3vw, 40px); }
.learn-group { padding-block: clamp(28px, 4vw, 48px); }
.learn-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.learn-card .learn-thumb img { width: 100%; height: 100%; object-fit: cover; }
.learn-card .meta { font: 500 11px var(--f-mono); color: var(--text-3); letter-spacing: .02em; }
.learn-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 760px) { .learn-feature { grid-template-columns: 1fr; } }

/* ── lesson header ── */
.learn-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.learn-title { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3rem); }
.learn-wrap { max-width: 760px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.learn-wrap > *, .learn-prose > * { min-width: 0; max-width: 100%; }
.learn-title { overflow-wrap: anywhere; }
.learn-banner, .learn-video { border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); }
.learn-banner img { width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; }
.learn-video { aspect-ratio: 16 / 9; }
.learn-video iframe { width: 100%; height: 100%; border: 0; }

/* ── lesson text ── */
.learn-prose { color: var(--text-2); font-size: 16.5px; line-height: 1.7; min-width: 0; }
.learn-prose > * + * { margin-top: 1.05em; }
.learn-prose h2 { margin-top: 2.2em; font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); line-height: 1.2; letter-spacing: -0.035em; }
.learn-prose h3 { margin-top: 1.8em; font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.02em; }
.learn-prose h4 { margin-top: 1.5em; font-size: 1rem; }
.learn-prose h2 + *, .learn-prose h3 + *, .learn-prose h4 + * { margin-top: .6em; }
.learn-prose strong { color: var(--text); font-weight: 600; }
.learn-prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--amber-25);
  text-underline-offset: 3px; transition: text-decoration-color var(--dur, .2s); }
.learn-prose a:hover { text-decoration-color: var(--amber); }
.learn-prose ul, .learn-prose ol { padding-left: 1.3em; }
.learn-prose ul { list-style: disc; }
.learn-prose ol { list-style: decimal; }
.learn-prose li + li { margin-top: .35em; }
.learn-prose li::marker { color: var(--text-4); }
.learn-prose blockquote { padding: 2px 0 2px 16px; border-left: 2px solid var(--amber-25); color: var(--text-3); font-size: 14.5px; }
.learn-prose .learn-figure img { border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); margin-inline: auto; }
.learn-prose .learn-pre { white-space: pre; overflow-x: auto; font-size: 12.5px; line-height: 1.6; }
.learn-prose .learn-pre:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.learn-table-wrap { overflow-x: auto; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.learn-table-wrap:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.learn-table-wrap table { width: 100%; font-size: 14px; line-height: 1.5; }
.learn-table-wrap th, .learn-table-wrap td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.learn-table-wrap th { font: 500 11px/1.4 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3);
  background: var(--surface-2); }
.learn-table-wrap th strong { color: inherit; font-weight: inherit; }
.learn-table-wrap tr:last-child td { border-bottom: 0; }
.learn-cell-line { display: block; }
.learn-cell-line + .learn-cell-line { margin-top: .3em; }

.learn-callout { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2); font-size: 15px; }
.learn-callout.is-product { background: var(--amber-08); box-shadow: inset 0 0 0 1px var(--amber-25); }
.learn-callout > div > * + * { margin-top: .6em; }
.learn-callout-icon { flex: none; line-height: 1.7; }

/* ── glossary term index ── */
.learn-index { display: grid; gap: 18px; padding: 20px 22px; }
.learn-index ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 20px; margin-top: 8px; }
.learn-index a { font-size: 14px; color: var(--text-3); }
.learn-index a:hover { color: var(--amber); }
.learn-index-sec { font: 500 11px var(--f-mono) !important; letter-spacing: .08em; text-transform: uppercase; }

/* ── lesson navigation ── */
.learn-nav { display: grid; gap: 14px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.learn-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.learn-step { display: grid; gap: 6px; padding: 16px 18px; font-size: 14.5px; color: var(--text); }
.learn-step.is-next { text-align: right; }
@media (max-width: 640px) { .learn-steps { grid-template-columns: 1fr; } .learn-step-empty { display: none; } }
