
    :root {
      --text: #181818;
      --muted: #616161;
      --line: #e2e2e2;
      --soft: #f7f7f7;
      --badge: #f0f2f5;
      --link: #214c8a;
      --max: 1040px;
      --radius: 0.9rem;
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      color: var(--text);
      background: white;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-size: 17px;
      line-height: 1.55;
    }
    a { color: var(--link); }
    a:hover { text-decoration-thickness: 2px; }
    code {
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
      font-size: .94em;
      background: #f5f5f5;
      border: 1px solid #e6e6e6;
      border-radius: .35rem;
      padding: .05rem .25rem;
    }
    .skip-link {
      position: absolute;
      left: -999px;
      top: 0;
      background: white;
      padding: .6rem .8rem;
      z-index: 10;
    }
    .skip-link:focus { left: .75rem; top: .75rem; }
    .page {
      max-width: var(--max);
      margin: 0 auto;
      padding: 32px 22px 80px;
    }
    .resource-header {
      padding: 18px 0 30px;
      border-bottom: 1px solid var(--line);
    }
    .eyebrow {
      margin: 0 0 .35rem;
      color: var(--muted);
      font-size: .98rem;
      letter-spacing: .02em;
    }
    h1 {
      margin: 0 0 .7rem;
      max-width: 920px;
      font-size: clamp(2.25rem, 5.6vw, 3.8rem);
      line-height: 1;
      letter-spacing: -.035em;
    }
    .resource-meta {
      margin: 0;
      max-width: 820px;
      color: var(--muted);
      font-size: 1.1rem;
    }
    .top-nav {
      display: flex;
      flex-wrap: wrap;
      gap: .75rem;
      margin: 1.45rem 0 0;
      font-size: 1.08rem;
      font-weight: 800;
    }
    .top-nav a {
      display: inline-flex;
      align-items: center;
      border: 2px solid var(--text);
      border-radius: 999px;
      background: var(--text);
      color: white;
      padding: .54rem 1.04rem;
      text-decoration: none;
      letter-spacing: .01em;
      box-shadow: 0 2px 0 rgba(0, 0, 0, .14);
    }
    .top-nav a:hover,
    .top-nav a:focus {
      background: var(--link);
      border-color: var(--link);
      text-decoration: none;
    }
    h2 {
      font-size: clamp(1.85rem, 4.2vw, 2.45rem);
      line-height: 1.08;
      margin: 2.8rem 0 .9rem;
      letter-spacing: -.025em;
    }
    h3 {
      font-size: 1.38rem;
      line-height: 1.2;
      margin: 1.3rem 0 .35rem;
      letter-spacing: -.01em;
    }
    h4 {
      font-size: 1.06rem;
      margin: 0 0 .25rem;
    }
    .section-intro,
    .lede {
      max-width: 880px;
      margin: .25rem 0 1rem;
    }
    .lede { color: var(--muted); }
    .project-details {
      max-width: 900px;
      margin: 1rem 0 1.6rem;
      border-top: 1px solid var(--line);
    }
    .detail-row {
      display: grid;
      grid-template-columns: 9.5rem minmax(0, 1fr);
      gap: 1rem;
      padding: .55rem 0;
      border-bottom: 1px solid var(--line);
    }
    .detail-row dt {
      color: var(--muted);
      font-weight: 700;
    }
    .detail-row dd { margin: 0; }
    .module {
      border-top: 2px solid var(--text);
      padding-top: 1rem;
      margin-top: 1.4rem;
    }
    .module-title {
      margin-top: 0;
      font-size: 1.5rem;
    }
    .resource-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
      gap: .75rem;
      margin: .9rem 0 1.4rem;
    }
    .resource-card {
      border: 1px solid var(--line);
      border-radius: .75rem;
      background: white;
      padding: .85rem .95rem;
    }
    .resource-card p {
      margin: .25rem 0 0;
      color: var(--muted);
    }
    .buttons {
      display: flex;
      flex-wrap: wrap;
      gap: .4rem;
      margin: .55rem 0 .35rem;
    }
    .badge {
      display: inline-block;
      background: var(--badge);
      border: 1px solid var(--line);
      border-radius: .4rem;
      line-height: 1.35;
      padding: .24rem .64rem;
      font-size: .96rem;
      color: var(--text);
      font-weight: 750;
      text-decoration: none;
      transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
    }
    .badge:hover,
    .badge:focus {
      border-color: var(--link);
      box-shadow: 0 0 0 2px rgba(33, 76, 138, .12);
      text-decoration: none;
    }
    .badge.article {
      background: #f7eeee;
      border-color: #e6d5d5;
      color: #6b2525;
    }
    .badge.code {
      background: #eef3fb;
      border-color: #d5e0f0;
      color: #315f98;
    }
    .badge.data {
      background: #eef6f0;
      border-color: #d4e6d8;
      color: #2f6841;
    }
    .badge.readme {
      background: #f1eefb;
      border-color: #ddd6ef;
      color: #5b438f;
    }
    .file-list {
      margin: .75rem 0 0;
      padding-left: 1.1rem;
      color: var(--muted);
    }
    .file-list li { margin: .28rem 0; }
    .file-list a { font-weight: 700; }
    .site-footer {
      margin-top: 2rem;
      color: var(--muted);
      font-size: 1rem;
    }
    .site-footer p { margin: 0; }
    @media (max-width: 620px) {
      body { font-size: 16px; }
      .page { padding-top: 22px; }
      .detail-row { grid-template-columns: 1fr; gap: .05rem; }
    }
  
/* Additions only for new Markdown features; the restored card CSS above is unchanged. */
.resource-prose { max-width: 900px; }
.resource-prose p { max-width: 880px; }
.resource-prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.resource-prose th, .resource-prose td { text-align: left; vertical-align: top; padding: .6rem; border-bottom: 1px solid var(--line); }
.resource-prose th { background: var(--soft); }
.resource-prose img, .section-intro img, .resource-card img { max-width: 100%; height: auto; }
.resource-prose pre, .resource-card pre { padding: 1rem; overflow-x: auto; background: var(--soft); border: 1px solid var(--line); border-radius: .45rem; }
.resource-prose pre code, .resource-card pre code { border: 0; padding: 0; background: transparent; white-space: pre; }
.math-display { overflow-x: auto; overflow-y: hidden; margin: 1.2rem 0; }
.resource-draft-banner { border: 1px solid #b99b53; background: #faf5e8; padding: .75rem 1rem; border-radius: .5rem; }
