/* The Learn section (scripts/build-site-resources.mjs; design: docs/mockups/learn.html).
   Builds on site.css tokens and resources.css. */

.learn-block { padding: 56px 0; }
.learn-block[id] { scroll-margin-top: 88px; }
.learn-block.alt { background: var(--bg-2); }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
.learn-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* the three-step path */
.learn-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 36px; text-align: left; }
.learn-step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.learn-step h3 a { color: inherit; text-decoration-color: var(--violet); text-underline-offset: .15em; }
.learn-step h3 a:hover { color: var(--violet); }
.learn-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: 800 1rem/1 var(--display); background: var(--violet-soft); color: var(--violet); margin-bottom: 12px; }
.learn-for { font-size: .92rem; color: var(--muted); margin-bottom: 10px; }
.learn-tag { display: inline-block; font: 700 .75rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; text-decoration: none; }
.learn-tag.open { background: var(--ok-soft); color: var(--ok); }
.learn-tag.course { background: var(--bg-2); color: var(--muted); }
.learn-path .learn-step:not(:last-child)::after { content: "→"; position: absolute; right: -16px; top: 50%; transform: translateY(-50%); font: 800 1.2rem/1 var(--display); color: var(--violet); }

/* placement */
.learn-placement { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
.learn-result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.learn-result h3 { font-size: 1.3rem; }

/* level headings, tabs, cards */
.learn-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.learn-head .lede { margin: 0; }
.learn-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.learn-tabs[hidden] { display: none; }
.learn-tabs button { font: 700 .92rem/1 var(--body); min-height: 40px; padding: 10px 16px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--ink); }
.learn-tabs button[aria-selected="true"] { background: var(--violet); color: #fff; }
.learn-panel-title { margin: 8px 0 16px; font-size: 1.3rem; }
.js-tabs .learn-panel-title { display: none; }
[role="tabpanel"][hidden] { display: none; }
[role="tabpanel"] + [role="tabpanel"] { margin-top: 32px; }
.js-tabs [role="tabpanel"] + [role="tabpanel"] { margin-top: 0; }

.learn-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.learn-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.learn-card.soon { background: transparent; border-style: dashed; }
.learn-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; font-weight: 800; }
.learn-card h3 { margin: 4px 0 0; }
.learn-card p { color: var(--muted); font-size: .95rem; margin: 0; }
.learn-foundation-groups { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.learn-foundation-card { color: var(--ink); min-height: 210px; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.learn-foundation-card:hover { border-color: var(--violet); box-shadow: var(--shadow); transform: translateY(-2px); }
.learn-foundation-card:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.learn-foundation-action { color: var(--violet); font-weight: 700; margin-top: auto; padding-top: 8px; }
.learn-foundation-support { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.learn-foundation-support .learn-icon { flex: 0 0 44px; }
.learn-foundation-support h3 { margin: 0 0 4px; }
.learn-foundation-support a { display: inline-block; margin-top: 8px; font-weight: 700; }
.learn-moves { list-style: none; margin: 4px 0 0; padding: 0; }
.learn-moves li { border-top: 1px solid var(--line); }
.learn-moves a { display: block; padding: 9px 0; font-weight: 600; text-decoration: none; }
.learn-moves a:hover { text-decoration: underline; }
.learn-meta { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .85rem; color: var(--muted); }
.learn-status { font: 700 .75rem/1 var(--body); padding: 5px 9px; border-radius: 999px; white-space: nowrap; background: var(--bg-2); color: var(--muted); }
.learn-optional { font: 700 .72rem/1 var(--body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* SAT essentials: domains of skills */
.learn-domains { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.learn-domain { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.learn-domain h3 { display: flex; align-items: center; gap: 10px; }
.learn-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.learn-skill { display: flex; align-items: center; gap: 12px; padding: 11px 0; min-height: 44px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.learn-skill:first-of-type { border-top: 0; }
.learn-skill > span:first-child { flex: 1; font-weight: 600; min-width: 0; }
.learn-skill:hover > span:first-child { color: var(--violet); }
.learn-bridge { display: block; margin-top: 28px; padding: 20px 22px; border-radius: var(--radius); background: var(--violet-soft); }
.learn-practice-banner { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 36px; padding: clamp(22px, 4vw, 36px); border: 1px solid var(--line); border-left: 6px solid var(--violet); border-radius: var(--radius); background: var(--violet-soft); }
.learn-practice-banner h3 { margin: 4px 0 8px; font-size: 1.45rem; }
.learn-practice-banner p { max-width: 62ch; margin: 0; color: var(--muted); }
.learn-practice-banner .btn { flex: none; }

/* account */
.learn-account { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px; align-items: center; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.learn-account h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.learn-account-actions { display: grid; gap: 12px; justify-items: start; }
.learn-checks { margin: 12px 0 0; padding: 0; list-style: none; }
.learn-checks li { padding: 6px 0 6px 28px; position: relative; }
.learn-checks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }

/* skill pages */
.learn-concept { padding-top: 28px; }
.learn-next { margin-top: 12px; }
.learn-next .learn-account { margin: 16px 0 24px; padding: 24px; }
.learn-stems li { font-style: italic; margin-bottom: 6px; }

@media (max-width: 860px) {
  .learn-path, .learn-placement, .learn-account { grid-template-columns: minmax(0, 1fr); }
  .learn-path .learn-step:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -22px; transform: translateX(-50%); }
  .learn-path { gap: 30px; }
  .learn-practice-banner { align-items: flex-start; flex-direction: column; }
}
