/* ==========================================================================
   Learning Center stylesheet  (/learn/learn.css)
   Shared by learn/index.php and every article in /learn/.
   Self-contained on purpose: system fonts and a gentle steel-blue palette that
   sits comfortably beside any design of the main site.
   To recolor the whole Learning Center, change the variables below.
   ========================================================================== */

:root {
  --ink:    #26323a;   /* body text */
  --head:   #15232b;   /* headings */
  --muted:  #64737b;   /* secondary text */
  --line:   #dfe5ee;   /* borders */
  --accent: #3b6ea5;   /* steel blue: links, buttons, highlights */
  --accent-dark: #2b5584;
  --tint:   #eef3fa;   /* pale blue background */
  --sky:    #f2f0f9;   /* pale lavender background */
  --sand:   #faf5ec;   /* pale warm background */
  --rose:   #fbf0ef;   /* pale rose background (warnings, cons) */
  --good:   #2e7d4f;
  --bad:    #b4483f;
}

* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink);
       font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
       font-size: 17px; line-height: 1.65; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { color: var(--head); line-height: 1.25; letter-spacing: -0.01em; }

/* ---------- Top bar ---------- */
.topbar { background: var(--tint); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1000px; margin: 0 auto; padding: 12px 20px; display: flex; gap: 16px;
              align-items: center; flex-wrap: wrap; font-size: .95rem; }
.topbar a { text-decoration: none; font-weight: 600; }
.topbar .right { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Index hero ---------- */
.hero { background: linear-gradient(180deg, var(--tint) 0%, #fff 100%); }
.hero .in { max-width: 1000px; margin: 0 auto; padding: 42px 20px 18px; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin: .2em 0 .35em; max-width: 760px; }
.hero p { font-size: 1.12rem; max-width: 700px; color: #3b4a52; margin: 0; }
.search { margin-top: 22px; max-width: 540px; }
.search label { display: block; margin-bottom: 6px; }
.search input { width: 100%; font: inherit; padding: 12px 16px; border-radius: 10px; border: 1px solid #c8d4e3; background: #fff; }
.search input:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* Instant search results, shown right under the search box */
.results { margin-top: 8px; background: #fff; border: 1px solid #c8d4e3; border-radius: 12px;
           box-shadow: 0 8px 24px rgba(21,35,43,.08); max-height: 380px; overflow-y: auto; }
.results .count, .results .none { margin: 0; padding: 10px 16px; font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.results .none { border-bottom: 0; font-size: .95rem; }
.results ul { list-style: none; margin: 0; padding: 4px 0; }
.results a { display: block; padding: 9px 16px; text-decoration: none; }
.results a:hover, .results a:focus { background: var(--tint); outline: none; }
.results b { display: block; color: var(--head); font-weight: 600; }
.results span { font-size: .82rem; color: var(--muted); }

/* ---------- Page body ---------- */
main { max-width: 1000px; margin: 0 auto; padding: 0 20px 40px; }
main.article { max-width: 780px; padding-top: 22px; }
section { margin: 46px 0 0; }
section > h2 { font-size: 1.5rem; margin: 0 0 4px; }
section > p.sub { margin: 0 0 18px; color: var(--muted); }

/* ---------- Index: start-here cards ---------- */
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.paths a { display: block; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 12px;
           padding: 16px 18px; text-decoration: none; color: var(--ink); background: #fff; transition: box-shadow .15s; }
.paths a:hover { box-shadow: 0 4px 14px rgba(59,110,165,.15); }
.paths b { display: block; color: var(--head); font-size: 1.03rem; margin-bottom: 3px; }
.paths span { font-size: .92rem; color: var(--muted); }

/* ---------- Index: resources ---------- */
.resources { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }
.res { background: var(--sky); border-radius: 12px; padding: 18px 20px; }
.res:nth-child(3n+1) { background: var(--tint); }
.res:nth-child(3n+3) { background: var(--sand); }
.res h3 { margin: 0 0 6px; font-size: 1.06rem; }
.res p { margin: 0 0 10px; font-size: .96rem; }
.res a.go { font-weight: 600; text-decoration: none; }

/* ---------- Index: glossary ---------- */
.terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 26px; margin: 0; }
.terms div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.terms dt { font-weight: 700; color: var(--head); }
.terms dd { margin: 2px 0 0; font-size: .95rem; }

/* ---------- Index: guide list ---------- */
.cats { columns: 2 340px; column-gap: 40px; }
.cat { break-inside: avoid; margin: 0 0 28px; }
.cat h3 { font-size: 1.12rem; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--tint); }
.cat ul { margin: 0; padding: 0 0 0 20px; }
.cat li { margin: 7px 0; }
.cat li::marker { color: var(--accent); }
.cat a { text-decoration: none; font-weight: 500; }
.cat a:hover { text-decoration: underline; }
.cat li.hide { display: none; }
#nomatch { display: none; color: var(--muted); }

/* ---------- FAQ accordions ---------- */
details { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 10px 0; max-width: 820px; background: #fff; }
details[open] { background: var(--tint); }
summary { cursor: pointer; font-weight: 600; color: var(--head); }

/* ---------- Call to action ---------- */
.cta { background: var(--tint); border: 1px solid #cfdcee; border-radius: 14px; padding: 26px; margin: 52px 0 0;
       display: grid; gap: 16px; grid-template-columns: 1fr auto; align-items: center; }
.cta h2 { margin: 0 0 6px; font-size: 1.35rem; }
.cta p { margin: 0; }
.cta .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cta .btns a { text-decoration: none; font-weight: 600; padding: 11px 18px; border-radius: 10px;
               border: 1px solid var(--accent); color: var(--accent); background: #fff; white-space: nowrap; }
.cta .btns a.p { background: var(--accent); color: #fff; }
.cta .btns a.p:hover { background: var(--accent-dark); }
@media (max-width: 720px) { .cta { grid-template-columns: 1fr; } }

/* ---------- Article building blocks (each article uses a different mix) ---------- */
.crumbs { font-size: .88rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.article h1 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); margin: .35em 0 .25em; }
.article h2 { font-size: 1.4rem; margin: 1.8em 0 .5em; }
.article h3 { font-size: 1.12rem; margin: 1.4em 0 .4em; }
.updated { color: var(--muted); font-size: .9rem; margin-bottom: 1.2em; }
.lede { font-size: 1.13rem; color: #3b4a52; }

.tablewrap { overflow-x: auto; margin: 20px 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: var(--tint); color: var(--head); }
tr:nth-child(even) td { background: #fafbfd; }
.yes { color: var(--good); font-weight: 700; }
.no  { color: var(--bad);  font-weight: 700; }

.box { border-radius: 12px; padding: 16px 20px; margin: 22px 0; background: var(--sky); }
.box.tint { background: var(--tint); }
.box.sand { background: var(--sand); }
.box.rose { background: var(--rose); }
.box > :first-child { margin-top: 0; }
.box > :last-child { margin-bottom: 0; }

.divider { display: flex; align-items: center; gap: 14px; margin: 46px 0 4px; color: var(--accent);
           font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
hr.rule { border: 0; border-top: 2px dashed var(--line); margin: 40px 0; }

ol.steps { counter-reset: s; list-style: none; padding: 0; }
ol.steps > li { counter-increment: s; position: relative; padding-left: 50px; margin: 18px 0; }
ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
                        background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; }
ul.check, ul.x { list-style: none; padding: 0; }
ul.check li, ul.x li { padding-left: 28px; position: relative; margin: 8px 0; }
ul.check li::before { content: "\2713"; position: absolute; left: 4px; color: var(--good); font-weight: 700; }
ul.x li::before { content: "\2717"; position: absolute; left: 4px; color: var(--bad); font-weight: 700; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 20px 0; }
.grid2 > div { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.grid2 > div > :first-child { margin-top: 0; }
.grid2 .pro { background: var(--tint); border-color: #cfdcee; }
.grid2 .con { background: var(--rose); border-color: #f0d6d3; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 22px 0; }
.stats div { background: var(--sky); border-radius: 12px; padding: 14px; text-align: center; }
.stats b { display: block; font-size: 1.55rem; color: var(--accent-dark); }
.stats span { font-size: .88rem; color: var(--muted); }

.timeline { border-left: 3px solid var(--tint); margin: 20px 0 20px 8px; padding-left: 22px; }
.timeline > div { position: relative; margin: 0 0 20px; }
.timeline > div::before { content: ""; position: absolute; left: -30px; top: 7px; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); }

.myth { border-left: 4px solid var(--accent); background: var(--tint); padding: 12px 18px; margin: 16px 0; border-radius: 0 10px 10px 0; }
.myth .m { font-weight: 700; color: var(--head); margin: 0; }
.myth .f { margin: .35em 0 0; }

dl.defs dt { font-weight: 700; color: var(--head); margin-top: 14px; }
dl.defs dd { margin: 2px 0 0; }

blockquote { margin: 22px 0; padding: 6px 20px; border-left: 4px solid var(--line); color: #3b4a52; font-style: italic; }

.related { margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.related h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.related a { text-decoration: none; font-weight: 600; }
.related a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.note { font-size: .85rem; color: var(--muted); margin-top: 26px; }
footer.lc-foot { background: var(--tint); border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 20px 44px;
                 text-align: center; color: var(--muted); font-size: .92rem; }
footer.lc-foot nav a { margin: 0 8px; text-decoration: none; }
footer.lc-foot nav a:hover { text-decoration: underline; }
footer.lc-foot p { margin: 12px 0 0; }
