/* Learn section — deliberately plain. Reading is the feature. */
:root {
  --bg: #fffdf9; --fg: #1a1a1a; --muted: #5c5f66; --rule: #e2ddd3;
  --accent: #8a4b2a; --code-bg: #f4f0e8; --card: #fffbf4;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14151a; --fg: #e8e6e1; --muted: #9aa0a8; --rule: #2b2d34;
    --accent: #e0996a; --code-bg: #1d1f26; --card: #191b21;
  }
}
:root[data-theme="dark"] {
  --bg: #14151a; --fg: #e8e6e1; --muted: #9aa0a8; --rule: #2b2d34;
  --accent: #e0996a; --code-bg: #1d1f26; --card: #191b21;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.65 Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 44rem; margin: 0 auto; padding: 3rem 1.25rem 5rem; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
header.site { border-bottom: 1px solid var(--rule); padding-bottom: 1rem; margin-bottom: 2.5rem; }
header.site nav { display: flex; gap: 1.25rem; font-size: .9rem; font-family: system-ui, sans-serif; }
h1 { font-size: 2.1rem; line-height: 1.2; text-wrap: balance; margin: 0 0 .6rem; }
h2 { font-size: 1.35rem; margin: 2.6rem 0 .7rem; text-wrap: balance; }
h3 { font-size: 1.08rem; margin: 1.8rem 0 .5rem; }
.lede { font-size: 1.14rem; color: var(--muted); margin: 0 0 2rem; }
.meta { font-family: system-ui, sans-serif; font-size: .82rem; color: var(--muted); margin: 0 0 2rem; }
code { background: var(--code-bg); padding: .12em .35em; border-radius: 3px;
       font: .87em/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
pre { background: var(--code-bg); padding: 1rem 1.1rem; border-radius: 6px;
      overflow-x: auto; border: 1px solid var(--rule); }
pre code { background: none; padding: 0; font-size: .84rem; }
blockquote { margin: 1.5rem 0; padding: .2rem 0 .2rem 1.2rem;
             border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
table { border-collapse: collapse; width: 100%; margin: 1.5rem 0; font-size: .94rem;
        font-family: system-ui, sans-serif; display: block; overflow-x: auto; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; }
img { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--rule); }
.card { display: block; border: 1px solid var(--rule); background: var(--card);
        border-radius: 8px; padding: 1.1rem 1.25rem; margin: 0 0 1rem;
        text-decoration: none; color: inherit; }
.card:hover { border-color: var(--accent); }
.card h3 { margin: 0 0 .3rem; font-size: 1.05rem; color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.tag { display: inline-block; font-family: system-ui, sans-serif; font-size: .72rem;
       text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
       border: 1px solid var(--rule); border-radius: 99px; padding: .1rem .55rem;
       margin: 0 0 .8rem; }
footer { border-top: 1px solid var(--rule); margin-top: 4rem; padding-top: 1.2rem;
         font-family: system-ui, sans-serif; font-size: .85rem; color: var(--muted); }

/* --- reference additions --- */
.crumb { font-family: system-ui, sans-serif; font-size: .82rem; color: var(--muted); margin: 0 0 .6rem; }
.crumb a { color: var(--muted); }
.lvl { display: inline-block; font-family: system-ui, sans-serif; font-size: .68rem;
       text-transform: uppercase; letter-spacing: .07em; padding: .12rem .5rem;
       border-radius: 99px; margin-right: .5rem; font-weight: 600; }
.lvl-basic        { background: #d8f0dd; color: #16502a; }
.lvl-intermediate { background: #fdeecd; color: #6b4310; }
.lvl-advanced     { background: #f6dcd8; color: #6d2018; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lvl-basic        { background: #1c3a26; color: #a8e0ba; }
  :root:not([data-theme="light"]) .lvl-intermediate { background: #3d2f14; color: #f0cf94; }
  :root:not([data-theme="light"]) .lvl-advanced     { background: #3d1f1c; color: #f0b4ab; }
}
.tg { font-family: ui-monospace, Menlo, monospace; font-size: .74rem;
      color: var(--muted); margin-right: .5rem; }
.toc { border: 1px solid var(--rule); background: var(--card); border-radius: 8px;
       padding: 1rem 1.2rem .9rem; margin: 0 0 2.2rem; }
.toc p { font-family: system-ui, sans-serif; font-size: .74rem; text-transform: uppercase;
         letter-spacing: .07em; color: var(--muted); margin: 0 0 .5rem; }
.toc ol { margin: 0; padding-left: 1.1rem; font-family: system-ui, sans-serif; font-size: .93rem; }
.toc li { margin-bottom: .25rem; }
.prereq { font-family: system-ui, sans-serif; font-size: .92rem; background: var(--card);
          border-left: 3px solid var(--accent); padding: .7rem .9rem; border-radius: 0 6px 6px 0;
          margin: 0 0 1.6rem; }
.anchor { opacity: 0; margin-left: .4rem; text-decoration: none; color: var(--muted);
          font-weight: 400; }
h2:hover .anchor { opacity: 1; }
.cardmeta { margin: .6rem 0 0 !important; }
.topic-blurb { color: var(--muted); font-size: .95rem; margin: -.4rem 0 1rem; }
