/* NatGasPipe Learn pages */
:root {
  --bg: #f3f7fb;
  --panel: #ffffff;
  --text: #1b1f24;
  --muted: #5d6673;
  --line: #d9e0e8;
  --accent: #1673c4;
  --soft: #e3f0fb;
  --green: #2e7d1f;
  --green-soft: #e9f6e3;
  --code: #eef2f6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #04111f; --panel: #0a1d33; --text: #e6e9ee; --muted: #9aa3af; --line: #1d3350;
    --accent: #6ab8f2; --soft: #10273f; --green: #7ccf52; --green-soft: #12291a; --code: #0f2640;
  }
}
:root[data-theme="dark"] {
  --bg: #04111f; --panel: #0a1d33; --text: #e6e9ee; --muted: #9aa3af; --line: #1d3350;
  --accent: #6ab8f2; --soft: #10273f; --green: #7ccf52; --green-soft: #12291a; --code: #0f2640;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }

.learn-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

.learn-hero {
  background: linear-gradient(135deg, var(--brand-navy-900) 0%, var(--brand-navy-700) 100%);
  color: #fff;
  padding: 34px 0 30px;
}
.learn-hero h1 { font-size: clamp(28px, 4.5vw, 42px); line-height: 1.15; margin: 4px 0 10px; letter-spacing: -0.02em; }
.learn-hero .hero-desc { max-width: 760px; margin: 0; color: rgba(255, 255, 255, 0.82); font-size: 17px; }
.learn-hero .meta { margin: 10px 0 0; font-size: 13px; color: var(--brand-green-light); font-weight: 600; }
.crumbs { margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.65); }
.crumbs a { color: var(--brand-green-light); text-decoration: none; font-weight: 600; }

/* Guide pages: sidebar + article */
.learn-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; padding-top: 28px; padding-bottom: 48px; align-items: start; }
@media (max-width: 900px) { .learn-layout { grid-template-columns: minmax(0, 1fr); } .guide-list { order: 2; } }

.guide-list { position: sticky; top: 72px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; }
@media (max-width: 900px) { .guide-list { position: static; } }
.guide-list-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0 8px 8px; }
.guide-list ol { list-style: none; margin: 0; padding: 0; }
.guide-list a { display: flex; gap: 10px; align-items: baseline; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 14px; line-height: 1.35; }
.guide-list a:hover { background: var(--soft); }
.guide-list a[aria-current="page"] { background: var(--soft); color: var(--accent); font-weight: 700; }
.num { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.guide-list a[aria-current="page"] .num { background: var(--accent); color: #fff; }

.article { max-width: 760px; min-width: 0; }
.article h2 { font-size: 25px; line-height: 1.25; margin: 38px 0 10px; letter-spacing: -0.01em; scroll-margin-top: 80px; }
.article h3 { font-size: 18px; margin: 24px 0 6px; }
.article p, .article li { color: var(--text); }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 4px 0; }
.article .lede { font-size: 18px; color: var(--muted); margin-top: 0; }
.article code { background: var(--code); padding: 1px 6px; border-radius: 4px; font-size: 14px; }

.toc { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 0 0 24px; }
.toc-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.toc ol { margin: 6px 0 0; padding-left: 20px; columns: 2; column-gap: 28px; font-size: 14px; }
@media (max-width: 560px) { .toc ol { columns: 1; } }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.takeaways { background: var(--green-soft); border-left: 4px solid var(--brand-green); border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 26px 0; }
.takeaways strong:first-child { display: block; margin-bottom: 4px; }
.takeaways ul { margin: 0; }
.note { background: var(--soft); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; padding: 12px 18px; margin: 20px 0; }

.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.article table { border-collapse: collapse; width: 100%; font-size: 14px; }
.article th, .article td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { background: var(--soft); font-weight: 700; white-space: nowrap; }
.article tr:last-child td { border-bottom: 0; }

dl.terms { margin: 10px 0 0; border-top: 1px solid var(--line); }
dl.terms dt { font-weight: 700; margin-top: 14px; }
dl.terms dd { margin: 2px 0 0; color: var(--muted); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 44px; }
.pager a { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--text); font-weight: 700; }
.pager a:hover { border-color: var(--accent); }
.pager small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.pager .next { text-align: right; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

/* Learn home */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 28px 0 8px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; text-decoration: none; color: var(--text); transition: border-color 0.15s, transform 0.15s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h2 { font-size: 19px; margin: 10px 0 6px; line-height: 1.25; }
.card p { margin: 0 0 12px; color: var(--muted); font-size: 14px; flex: 1; }
.card .go { font-size: 13px; font-weight: 700; color: var(--accent); }
.tools-callout { margin: 18px 0 48px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; }
.tools-callout h2 { margin: 0 0 6px; font-size: 19px; }
.tools-callout p { margin: 0; color: var(--muted); }

.learn-foot { border-top: 1px solid var(--line); background: var(--panel); padding: 20px 16px 28px; text-align: center; font-size: 13px; color: var(--muted); }
.learn-foot p { max-width: 760px; margin: 6px auto; }
