/*
 * Learn section styles. Loaded after /catalog/compound.css, which supplies
 * the colour tokens, type families, buttons, nav and footer.
 * Pages are generated by scripts/build-learn-pages.js.
 */

.learn .accent { color: var(--blue); }

.learn .cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.learn-lead {
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.55;
  max-width: 560px;
  margin: 26px 0 0;
}

.learn-h2 {
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1;
  margin-top: 16px;
}

.learn-disclaimer {
  font-size: 13px;
  line-height: 1.6;
  color: var(--mute);
  max-width: 820px;
  margin: 40px 0 0;
}
.learn-disclaimer.boxed {
  background: var(--paper-deep);
  color: rgba(20, 23, 28, 0.78);
  padding: 20px 22px;
  max-width: none;
}

/* ---------- index: hero ---------- */
.learn-hero { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(56px, 7vw, 88px); }
.learn-hero-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px 64px;
}
.learn-hero-grid > div { flex: 1 1 460px; min-width: 0; }
.learn-hero h1 {
  font-size: clamp(48px, 7vw, 84px);
  line-height: 0.96;
  margin-top: 22px;
}
.learn-hero .cta-row { margin-top: 32px; }
.hero-figure {
  flex: 1 1 380px;
  min-width: 0;
  margin: 0;
  background: var(--white);
  border: 1px solid var(--rule);
  box-shadow: 0 18px 50px rgba(11, 61, 111, 0.12);
  padding: clamp(18px, 3vw, 28px);
}
.hero-figure img { width: 100%; height: auto; display: block; }
.hero-figure figcaption,
.figure figcaption {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.5;
  color: var(--mute);
}

/* ---------- index: article grid ---------- */
.lgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 24px;
  margin-top: 40px;
}
.lcard {
  background: var(--white);
  border: 1px solid var(--rule);
  box-shadow: 0 2px 16px rgba(11, 61, 111, 0.06);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.lcard-fig {
  display: block;
  background: var(--cream);
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--rule);
}
.lcard-fig img { width: 100%; height: 180px; object-fit: contain; display: block; }
.lcard-body {
  padding: 24px 26px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}
.lcard-time { font-size: 15px; color: var(--mute); }
.lcard h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}
.lcard h3 a { text-decoration: none; }
.lcard h3 a:hover { color: var(--blue); }
.lcard-sub { margin: 0; font-size: 17px; line-height: 1.55; }
.lcard-key { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rule); }
.lcard-key .eyebrow { font-size: 15px; margin-bottom: 4px; }
.lcard-key p { margin: 0; font-size: 14px; line-height: 1.55; color: rgba(20, 23, 28, 0.78); }
.lcard-actions { display: flex; border-top: 1px solid var(--rule); margin-top: 22px; }
.lcard-read,
.lcard-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 52px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.lcard-read { flex: 1; background: var(--ink); color: var(--paper); }
.lcard-read:hover { background: var(--blue-deep); }
.lcard-pdf { padding: 0 22px; color: var(--ink); }
.lcard-pdf:hover { background: var(--paper); color: var(--blue); }

/* ---------- article: header ---------- */
.article-head {
  padding-top: clamp(44px, 6vw, 80px);
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--rule);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  color: var(--mute);
  margin-bottom: 32px;
}
.crumbs a { color: var(--ink); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }
.article-head h1 {
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.94;
  margin-top: 20px;
  max-width: 1000px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 32px;
  font-size: 14px;
  color: var(--mute);
}

/* ---------- article: body layout ---------- */
.article-wrap { padding-top: clamp(44px, 6vw, 80px); }
.article-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px 72px;
}
.article-side {
  flex: 1 1 230px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
@media (min-width: 900px) {
  .article-side { position: sticky; top: 104px; }
}
.toc ol {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}
.toc li { border-bottom: 1px solid var(--rule); }
.toc a {
  display: block;
  padding: 10px 0;
  font-size: 14px;
  color: rgba(20, 23, 28, 0.78);
  text-decoration: none;
}
.toc a:hover { color: var(--blue); }
.print-card {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 20px;
}
.print-title { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.print-card p { font-size: 13px; color: var(--mute); margin: 6px 0 16px; }
.print-card .btn { width: 100%; }

/* ---------- article: prose ---------- */
.prose {
  flex: 999 1 560px;
  min-width: 0;
  max-width: 740px;
}
.prose h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 56px 0 18px;
  scroll-margin-top: 100px;
}
.prose > h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 36px 0 12px;
  scroll-margin-top: 100px;
}
.prose p,
.prose li {
  font-family: var(--read);
  font-size: 20px;
  line-height: 1.65;
  color: rgba(20, 23, 28, 0.82);
}
.prose p { margin: 0 0 20px; }
.prose ul { margin: 0 0 24px; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose a { color: var(--blue); }

.prose .figure {
  margin: 8px 0 28px;
  background: var(--white);
  border: 1px solid var(--rule);
  box-shadow: 0 2px 16px rgba(11, 61, 111, 0.06);
  padding: clamp(16px, 3vw, 32px);
}
.prose .figure img { width: 100%; height: auto; display: block; }

.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--rule);
  margin: 0 0 24px;
}
.table-wrap table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}
.table-wrap thead tr { background: #05152a; color: #eff4f8; }
.table-wrap thead th { padding: 14px 16px; text-align: left; font-weight: 600; }
.table-wrap tbody tr:nth-child(even) { background: var(--cream); }
.table-wrap tbody th,
.table-wrap tbody td {
  padding: 14px 16px;
  border-top: 1px solid var(--rule);
  vertical-align: top;
  text-align: left;
}
.table-wrap tbody th {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 17px;
  text-transform: lowercase;
  letter-spacing: 0.03em;
  color: var(--blue);
  width: 22%;
}

.callout {
  background: var(--white);
  border-top: 2px solid var(--blue);
  padding: 22px 24px 4px;
  margin: 8px 0 28px;
}
.callout p { font-size: 19px; }

.formula {
  background: #05152a;
  color: #eff4f8;
  padding: 20px 22px;
  overflow-x: auto;
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- article: footer blocks ---------- */
.prose .next-card {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 20px;
  align-items: center;
  background: #05152a;
  color: #eff4f8;
  padding: 30px 32px;
  text-decoration: none;
  transition: background 0.18s ease;
}
.prose .next-card:hover { background: var(--blue-deep); color: #eff4f8; }
.next-label {
  grid-column: 1;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9db1c3;
}
.next-title {
  grid-column: 1;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 38px);
  line-height: 1.05;
  margin-top: 10px;
}
.next-sub { grid-column: 1; color: #9db1c3; font-size: 15px; margin-top: 10px; }
.next-arrow { grid-column: 2; grid-row: 1 / span 3; font-size: 28px; }

.related-testing { margin-top: 40px; }
.related-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.prose .related-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.prose .related-links a:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 640px) {
  .prose p,
  .prose li { font-size: 18px; }
  .next-card { padding: 24px 22px; }
}
