/* Content pages (#231), from the /learn article mockup (#374). Builds on app.css (landing nav,
   footer). The body is rendered markdown, which carries no classes, so everything inside
   .learn-article is styled by element. Reading type is ink (#2D3436), 18px. */

.learn { font-size: 18px; line-height: 1.7; }
.learn a { color: #2D6A4F; text-underline-offset: 3px; }

/* Header band: breadcrumb, title, the short answer. */
.learn-top { background: #F6F8F7; border-bottom: 1px solid #DCE1E6; }
.learn-top .landing-wrap { padding-top: 40px; padding-bottom: 48px; }
.learn-crumbs { font-size: 15px; font-weight: 500; }
.learn-crumbs a { text-decoration: none; }
.learn-crumbs span { color: #5F6B6D; margin: 0 8px; }
.learn-top h1 {
  margin-top: 18px; max-width: 22ch; font-size: clamp(34px, 4.4vw, 52px); font-weight: 600;
  line-height: 1.1; letter-spacing: -0.03em;
}
.learn-meta { margin-top: 18px; font-size: 15px; color: #5F6B6D; }
.learn-meta b { color: #2D3436; font-weight: 600; }

.learn-answer {
  margin-top: 28px; max-width: 760px; background: #fff; border: 1px solid #d5ddd8;
  border-left: 4px solid #2D6A4F; border-radius: 4px; padding: 20px 24px;
}
.learn-answer-label { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: #2D6A4F; }
.learn-answer p { margin-top: 6px; font-size: 20px; line-height: 1.55; font-weight: 500; }

/* Body: reading column plus a sticky side rail with the page's contents. */
.learn-body {
  display: grid; grid-template-columns: minmax(0, 700px) 300px; gap: 72px;
  justify-content: space-between; padding-top: 56px; padding-bottom: 72px;
}
.learn-article > * + * { margin-top: 20px; }
.learn-article h2 {
  margin-top: 56px; padding-top: 28px; border-top: 1px solid #DCE1E6; font-size: 28px;
  font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; scroll-margin-top: 24px;
}
.learn-article h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.learn-article h3 { margin-top: 32px; font-size: 21px; font-weight: 600; line-height: 1.35; }
.learn-article h3 + p { margin-top: 8px; }
.learn-article ul, .learn-article ol { padding-left: 26px; }
.learn-article li + li { margin-top: 8px; }

/* Tables: same size as body text, header row in faint verdant. A wide one scrolls sideways
   inside its own box, so the page never does. */
.learn-article table {
  display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse;
  font-size: 17px; line-height: 1.55;
}
.learn-article th, .learn-article td {
  text-align: left; vertical-align: top; padding: 14px 16px; border: 1px solid #DCE1E6;
}
.learn-article thead th { background: #F6F8F7; font-weight: 600; }

/* Formulas and other fenced blocks keep their line breaks and scroll sideways if long. */
.learn-article pre {
  overflow-x: auto; background: #F6F8F7; border: 1px solid #DCE1E6; border-radius: 4px;
  padding: 16px 18px; font-size: 15px; line-height: 1.6;
}

/* Call to action: the home page's start card, smaller. */
.learn-cta {
  border: 2px solid #2D6A4F; border-radius: 8px; padding: 24px;
  box-shadow: 0 10px 30px rgba(45, 106, 79, 0.12); background: #fff;
}
.learn-cta-title { font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.learn-cta-button {
  display: block; text-align: center; background: #2D6A4F; color: #fff !important;
  font-size: 17px; font-weight: 700; text-decoration: none; padding: 14px 28px; border-radius: 6px;
}
.learn-cta-wide {
  margin-top: 48px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}

/* Side rail. */
.learn-rail { position: relative; }
.learn-rail-inner { position: sticky; top: 24px; }
.learn-toc-label { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: #5F6B6D; }
.learn-toc ol { list-style: none; margin-top: 10px; border-left: 2px solid #DCE1E6; }
.learn-toc li a {
  display: block; padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent;
  font-size: 15px; line-height: 1.45; color: #2D3436; text-decoration: none;
}
.learn-toc li a:hover { border-left-color: #2D6A4F; color: #2D6A4F; }

/* Related links. */
.learn-end { border-top: 1px solid #DCE1E6; background: #F8F9FA; }
.learn-end .landing-wrap { padding-top: 56px; padding-bottom: 56px; }
.learn-end h2 { font-size: 20px; font-weight: 600; }
.learn-related {
  list-style: none; margin-top: 16px; max-width: 700px; display: flex; flex-direction: column;
  gap: 12px;
}
.learn-related a {
  display: block; background: #fff; border: 1px solid #DCE1E6; border-radius: 6px;
  padding: 16px 20px; font-size: 17px; font-weight: 600; text-decoration: none; color: #2D3436;
}
.learn-related a:hover { border-color: #2D6A4F; }

@media (max-width: 980px) {
  .learn-body { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .learn-rail { display: none; }
}
@media (max-width: 640px) {
  .learn { font-size: 17px; }
  .learn-top .landing-wrap { padding-top: 28px; padding-bottom: 32px; }
  .learn-answer { padding: 16px 18px; }
  .learn-answer p { font-size: 18px; }
  .learn-body { padding-top: 36px; }
  .learn-cta-wide { grid-template-columns: 1fr; }
}
