/* Ricci Flow Commons — Apple-inspired design system */

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg: #fbfbfd;
  --bg-elev: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-sunken: #ededf0;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --link: #0066cc;
  --glass: rgba(251, 251, 253, 0.72);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08), 0 32px 64px rgba(0, 0, 0, 0.12);
  --grad: linear-gradient(90deg, #0071e3 0%, #7a5af8 50%, #e0457b 100%);
  --green: #1d9d52;
  --orange: #c45500;
  --purple: #7a5af8;
  --red: #e0245e;
  --heat-0: #ebedf0;
  --heat-1: #b6d7ff;
  --heat-2: #6aa9f7;
  --heat-3: #2f7ee6;
  --heat-4: #0a56b8;
  --radius: 18px;
  --radius-lg: 28px;
  --nav-h: 48px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-elev: #161617; --bg-soft: #1d1d1f; --bg-sunken: #0c0c0d;
    --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #86868b;
    --line: rgba(255, 255, 255, 0.1); --line-strong: rgba(255, 255, 255, 0.18);
    --accent: #2997ff; --accent-hover: #47a6ff; --accent-soft: rgba(41, 151, 255, 0.14); --link: #2997ff;
    --glass: rgba(22, 22, 23, 0.72);
    --shadow-sm: 0 0 0 1px rgba(255, 255, 255, 0.06); --shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 32px 64px rgba(0, 0, 0, 0.6);
    --grad: linear-gradient(90deg, #2997ff 0%, #a78bfa 50%, #ff6b9a 100%);
    --green: #30d158; --orange: #ff9f0a; --purple: #a78bfa; --red: #ff375f;
    --heat-0: #1f1f22; --heat-1: #0d3a6e; --heat-2: #1560b8; --heat-3: #2f8cff; --heat-4: #7cc0ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-elev: #161617; --bg-soft: #1d1d1f; --bg-sunken: #0c0c0d;
  --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #86868b;
  --line: rgba(255, 255, 255, 0.1); --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #2997ff; --accent-hover: #47a6ff; --accent-soft: rgba(41, 151, 255, 0.14); --link: #2997ff;
  --glass: rgba(22, 22, 23, 0.72);
  --shadow-sm: 0 0 0 1px rgba(255, 255, 255, 0.06); --shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 32px 64px rgba(0, 0, 0, 0.6);
  --grad: linear-gradient(90deg, #2997ff 0%, #a78bfa 50%, #ff6b9a 100%);
  --green: #30d158; --orange: #ff9f0a; --purple: #a78bfa; --red: #ff375f;
  --heat-0: #1f1f22; --heat-1: #0d3a6e; --heat-2: #1560b8; --heat-3: #2f8cff; --heat-4: #7cc0ff;
  color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.47 var(--font); letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; overflow-x: hidden;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.028em; line-height: 1.1; }
p { margin: 0 0 1em; }
kbd { font: 12px var(--mono); padding: 2px 6px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text-2); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--bg-soft); padding: 0.12em 0.4em; border-radius: 6px; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.i { width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }
.muted { color: var(--text-2); }
.center { text-align: center; justify-content: center; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--bg-elev); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }

.wrap { width: min(1120px, 100% - 44px); margin-inline: auto; }
.wrap-narrow { width: min(720px, 100% - 44px); margin-inline: auto; }
main { min-height: 60vh; }
main > section { margin-block: 0 72px; }

.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--orange); margin: 0 0 8px; }
.eyebrow-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(19px, 2.2vw, 21px); line-height: 1.42; color: var(--text-2); max-width: 44em; letter-spacing: -0.02em; }

/* ── Navigation (frosted glass) ─────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { width: min(1120px, 100% - 32px); margin-inline: auto; height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center; gap: 0; width: 26px; height: 26px; border-radius: 8px;
  background: var(--text); color: var(--bg); font: 600 14px/1 Georgia, "Times New Roman", serif; white-space: nowrap; letter-spacing: -0.04em;
}
.brand-mark i { font-size: 13px; }
.nav-links { display: flex; gap: 4px; margin-inline: auto; }
.nav-links a { color: var(--text); opacity: 0.8; font-size: 13px; padding: 6px 11px; border-radius: 999px; transition: opacity .2s, background .2s; letter-spacing: -0.01em; }
.nav-links a:hover { opacity: 1; text-decoration: none; background: var(--bg-soft); }
.nav-links a[aria-current="page"] { opacity: 1; font-weight: 600; }
.nav-tools { display: flex; gap: 2px; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font-size: 16px; cursor: pointer; opacity: .85; }
.icon-btn:hover { background: var(--bg-soft); opacity: 1; }
.nav-menu { display: none; }
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: inline; } :root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .only-dark { display: inline; } :root:not([data-theme="light"]) .only-light { display: none; } }

@media (max-width: 820px) {
  .nav-menu { display: grid; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 22px 22px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { font-size: 22px; font-weight: 600; padding: 12px 0; border-radius: 0; border-bottom: 1px solid var(--line); opacity: 1; }
  .nav-links a:hover { background: none; }
  .brand-name { display: none; }
  .nav-tools { margin-left: auto; }
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--text);
  cursor: pointer; transition: background .2s, border-color .2s, transform .1s; white-space: nowrap;
}
.btn:hover { text-decoration: none; background: var(--bg-soft); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; }
.btn-small { font-size: 13px; padding: 5px 12px; }
.btn-large { font-size: 17px; padding: 12px 24px; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link-cta { font-size: 17px; display: inline-flex; align-items: center; gap: 2px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ── Chips, badges, fields ──────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; font-weight: 500; letter-spacing: -0.005em;
  padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--text-2); border: 1px solid transparent; cursor: pointer;
  transition: background .2s, color .2s;
}
a.chip:hover, button.chip:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.chip .count { opacity: .6; font-variant-numeric: tabular-nums; }
.chip-link { background: transparent; color: var(--link); }
.chips-filter { margin: 16px 0; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.01em; padding: 3px 8px; border-radius: 6px; background: var(--bg-soft); color: var(--text-2); }
.badge-core { background: rgba(29, 157, 82, 0.12); color: var(--green); }
.badge-related { background: rgba(122, 90, 248, 0.12); color: var(--purple); }
.badge-warn { background: rgba(196, 85, 0, 0.12); color: var(--orange); }
.badge-count { background: var(--accent-soft); color: var(--accent); }
.badge-count:empty { display: none; }

.field {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 40px; border-radius: 12px; background: var(--bg-soft);
  color: var(--text-3); border: 1px solid transparent; transition: border-color .2s, background .2s; flex: 1 1 260px;
}
.field:focus-within { border-color: var(--accent); background: var(--bg-elev); }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; outline: none; }
.field-large { height: 48px; max-width: 520px; margin-top: 24px; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-soft); border-radius: 10px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--bg-elev); box-shadow: var(--shadow-sm), 0 0 0 0.5px var(--line); }

/* ── Cards ──────────────────────────────────────────────────────────── */
.card { background: var(--bg-elev); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 56px 0 20px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head .lede { margin: 10px 0 0; font-size: 17px; }

/* ── Page hero ──────────────────────────────────────────────────────── */
.page-hero { padding: clamp(48px, 8vw, 96px) 0 32px; margin-bottom: 24px !important; }
.page-hero h1 { font-size: clamp(44px, 8vw, 80px); letter-spacing: -0.035em; margin-bottom: 16px; }
.page-hero .segmented { margin-top: 20px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; margin-bottom: 20px; }
.back .i { transform: rotate(180deg); }

/* ── Home hero ──────────────────────────────────────────────────────── */
.hero { text-align: center; padding-top: clamp(56px, 9vw, 110px); margin-bottom: 0 !important; overflow: hidden; }
.hero-title { font-size: clamp(44px, 8.4vw, 96px); letter-spacing: -0.04em; line-height: 1.02; margin-bottom: 20px; }
.hero-sub { font-size: clamp(19px, 2.4vw, 24px); line-height: 1.35; color: var(--text-2); max-width: 34em; margin: 0 auto 32px; letter-spacing: -0.02em; }
.hero .btn-row { justify-content: center; gap: 28px; }
.flow-stage { margin: 40px auto 0; width: min(1200px, 100%); position: relative; }
.flow-stage canvas { width: 100%; height: auto; aspect-ratio: 1200 / 560; display: block; }
.flow-stage figcaption { width: min(720px, 100% - 44px); margin: 0 auto; padding: 8px 0 24px; font-size: 14px; line-height: 1.5; display: grid; gap: 6px; justify-items: center; }
.eq { font: italic 400 22px/1.2 Georgia, "Times New Roman", serif; letter-spacing: 0; color: var(--text); }
.eq i { font-style: italic; }

.stats-band { background: var(--bg-soft); padding: 40px 0; margin-bottom: 72px !important; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; text-align: center; }
.stat-num { display: block; font-size: clamp(32px, 4.5vw, 48px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat-label { display: block; font-size: 14px; color: var(--text-2); margin-top: 4px; }
.stat-row { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 28px; }
.stat-row .stat-num { font-size: 36px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } .stats > :last-child { grid-column: span 2; } }

/* ── Bento tiles ────────────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 300px; padding: 32px; border-radius: var(--radius-lg);
  background: var(--bg-elev); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.tile:hover { text-decoration: none; transform: translateY(-3px) scale(1.005); box-shadow: var(--shadow); }
.tile h2 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 6px; }
.tile .eyebrow { margin: 0; }
.tile-cta { margin-top: auto; padding-top: 16px; color: var(--link); font-size: 15px; display: inline-flex; align-items: center; gap: 2px; }
.tile-papers { grid-column: span 4; background: linear-gradient(160deg, var(--bg-elev) 55%, var(--accent-soft)); }
.tile-journal { grid-column: span 2; }
.tile-events { grid-column: span 2; }
.tile-path { grid-column: span 2; }
.tile-concepts { grid-column: span 2; }
.tile-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; font-size: 15px; font-weight: 500; }
.tile-list li { display: grid; grid-template-columns: 56px 1fr; gap: 8px; line-height: 1.35; }
.tile-post-title { font-size: 19px; font-weight: 600; margin: 8px 0 2px; letter-spacing: -0.02em; line-height: 1.3; }
.tile-formula { margin: 12px 0 0; font-size: 14px; color: var(--text); }
.tile-formula .katex-display { margin: 0 0 10px; text-align: left; overflow: hidden; }
.tile-formula p { font-size: 14px; margin: 0; }
.mini-path { list-style: none; padding: 0; margin: 18px 0 0; display: flex; gap: 6px; align-items: center; }
.mini-path li { flex: 1; height: 8px; border-radius: 999px; background: var(--bg-sunken); }
.mini-path li.here { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.mini-path li:has(~ li.here) { background: var(--accent); opacity: .45; }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, 1fr); } .tile { grid-column: span 2 !important; min-height: 0; } }
@media (min-width: 620px) and (max-width: 900px) { .tile-journal, .tile-events, .tile-path, .tile-concepts { grid-column: span 1 !important; } }

/* ── Timeline rail ──────────────────────────────────────────────────── */
.rail { display: grid; grid-auto-flow: column; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 0 24px; }
.rail::-webkit-scrollbar { display: none; }
.timeline { grid-auto-columns: min(320px, 78vw); padding-inline: max(22px, calc((100% - 1120px) / 2)); scroll-padding-inline: max(22px, calc((100% - 1120px) / 2)); }
.moment { scroll-snap-align: start; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.moment-year { display: inline-block; font-size: 40px; font-weight: 800; letter-spacing: -0.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 8px; }
.moment h3 { font-size: 19px; margin-bottom: 8px; }
.moment p { font-size: 15px; color: var(--text-2); margin: 0; line-height: 1.45; }

.cta-card { text-align: center; padding: clamp(40px, 7vw, 80px) 24px; border-radius: var(--radius-lg); background: var(--bg-soft); }
.cta-card h2 { font-size: clamp(32px, 5vw, 56px); margin-bottom: 12px; }
.cta-card p { color: var(--text-2); font-size: 19px; max-width: 32em; margin: 0 auto 28px; }
.cta-card .btn-row { gap: 28px; }

/* ── Papers ─────────────────────────────────────────────────────────── */
.canon { background: var(--bg-soft); border-radius: var(--radius-lg); padding: 8px 8px 8px 24px; margin-bottom: 40px; }
.canon summary { list-style: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 16px 16px 16px 0; }
.canon summary::-webkit-details-marker { display: none; }
.canon summary .eyebrow { display: block; margin-bottom: 2px; }
.canon summary strong { font-size: 21px; letter-spacing: -0.02em; }
.canon summary .i { transition: transform .3s var(--ease); transform: rotate(90deg); font-size: 18px; color: var(--text-2); }
.canon:not([open]) summary .i { transform: none; }
.canon .rail { grid-auto-columns: 280px; padding: 4px 16px 20px 0; }
.canon-card {
  scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; padding: 22px; min-height: 250px; border-radius: var(--radius);
  background: var(--bg-elev); color: var(--text); border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s;
}
.canon-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.canon-year { font-size: 13px; font-weight: 700; color: var(--orange); }
.canon-title { font-weight: 600; font-size: 17px; line-height: 1.3; letter-spacing: -0.02em; }
.canon-authors { font-size: 13px; color: var(--text-2); }
.canon-note { font-size: 14px; color: var(--text-2); line-height: 1.4; }
.canon-link { margin-top: auto; color: var(--link); font-size: 14px; display: inline-flex; gap: 4px; align-items: center; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; position: sticky; top: var(--nav-h); z-index: 5; padding: 12px 0; background: var(--bg); }
.result-count { font-size: 14px; color: var(--text-2); margin: 0 0 8px; }
.month-title { font-size: 28px; margin: 40px 0 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; }
.month-title .muted { font-size: 17px; font-weight: 500; }
.paper-list { display: grid; gap: 0; }
.paper { padding: 24px 0; border-bottom: 1px solid var(--line); }
.paper:last-child { border-bottom: 0; }
.paper-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.cat { font: 600 11px/1 var(--mono); letter-spacing: 0.02em; padding: 4px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.paper-title { font-size: 21px; line-height: 1.3; letter-spacing: -0.022em; font-weight: 600; margin-bottom: 6px; }
.paper-title a { color: var(--text); }
.paper-title a:hover { color: var(--link); text-decoration: none; }
.paper-authors { font-size: 15px; color: var(--text-2); margin-bottom: 10px; }
.paper-note { font-size: 15px; background: var(--bg-soft); padding: 10px 14px; border-radius: 12px; }
.paper-abstract { font-size: 15px; line-height: 1.55; color: var(--text); position: relative; overflow: hidden; max-height: calc(1.55em * 3); transition: max-height .4s var(--ease); }
.paper-abstract p { margin: 0; }
.paper-abstract::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.6em; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.paper-abstract.open { max-height: 80em; }
.paper-abstract.open::after { display: none; }
.more { border: 0; background: none; color: var(--link); font: inherit; font-size: 14px; padding: 4px 0; cursor: pointer; margin-bottom: 10px; }
.more[hidden] { display: none; }
a.kw { color: inherit; background: linear-gradient(transparent 62%, var(--accent-soft) 62%); border-radius: 2px; box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--accent) 45%, transparent); }
a.kw:hover { color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.paper .chips { margin: 10px 0 14px; }
.paper-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.paper.compact { padding: 18px 0; }
.paper.compact .paper-title { font-size: 18px; }
.paper.compact .chips { margin: 6px 0 12px; }
.paper.compact .paper-authors { margin-bottom: 4px; }
.paper .katex { font-size: 1.05em; }
.empty { text-align: center; color: var(--text-2); padding: 48px 0; }
[data-save][aria-pressed="true"] { color: var(--orange); }
[data-save][aria-pressed="true"] svg path { fill: currentColor; }

/* ── Topics ─────────────────────────────────────────────────────────── */
.topic-group { margin-bottom: 48px; }
.topic-group > h2 { font-size: 24px; margin-bottom: 16px; }
.topic-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.topic-tile { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--line); color: var(--text); transition: transform .3s var(--ease), box-shadow .3s; }
.topic-tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.topic-name { font-weight: 600; font-size: 17px; }
.topic-blurb { font-size: 14px; color: var(--text-2); line-height: 1.4; flex: 1; }
.topic-bar { height: 4px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin-top: 8px; }
.topic-bar span { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.topic-count { font-size: 13px; color: var(--text-3); }
.topic-concepts { display: grid; gap: 16px; margin-bottom: 24px; }
.related-topics { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 32px 0; font-size: 14px; }

/* ── Events ─────────────────────────────────────────────────────────── */
.event-list { display: grid; gap: 16px; }
.event { display: grid; grid-template-columns: 88px 1fr; gap: 24px; padding: 28px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.event.past { background: transparent; box-shadow: none; }
.event-date { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; width: 88px; border-radius: 16px; overflow: hidden; background: var(--bg-elev); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); height: fit-content; }
.event-month { width: 100%; text-align: center; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 0; }
.event.past .event-month { background: var(--text-3); }
.event-day { font-size: 38px; font-weight: 300; letter-spacing: -0.03em; line-height: 1.15; padding-top: 4px; }
.event-year { font-size: 12px; color: var(--text-2); padding-bottom: 8px; }
.event-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.event h3 { font-size: 22px; line-height: 1.25; margin-bottom: 8px; }
.event h3 a { color: var(--text); }
.event-where { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--text-2); margin-bottom: 10px; }
.event-where .sep { opacity: .5; }
.event-desc { font-size: 15px; line-height: 1.5; }
.event-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.event[hidden] { display: none; }
.watch { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; margin-top: 56px; }
.watch h2 { font-size: 32px; margin-bottom: 10px; }
.watch-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: 15px; }
.watch-list a { display: inline-flex; gap: 4px; align-items: center; padding: 6px 0; }
@media (max-width: 720px) {
  .event { grid-template-columns: 1fr; padding: 22px; gap: 14px; }
  .event-date { flex-direction: row; width: auto; gap: 8px; align-items: baseline; box-shadow: none; background: none; border-radius: 0; }
  .event-month { width: auto; padding: 3px 8px; border-radius: 6px; }
  .event-day { font-size: 20px; font-weight: 600; padding: 0; }
  .event-year { font-size: 14px; padding: 0; }
  .watch, .watch-list { grid-template-columns: 1fr; }
}

/* ── Journal ────────────────────────────────────────────────────────── */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 8px; }
.post-card { display: flex; flex-direction: column; gap: 8px; padding: 28px; border-radius: var(--radius); background: var(--bg-elev); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s; }
.post-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card[hidden] { display: none; }
.post-card h3 { font-size: 22px; line-height: 1.2; }
.post-card p { color: var(--text-2); font-size: 15px; margin: 0; flex: 1; }
.post-card-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--text-2); }
.stage-dot::before { content: "●"; color: var(--accent); margin-right: 5px; font-size: 9px; vertical-align: 2px; }
.post-card .chips { margin-top: 8px; }

.post-head { padding: clamp(40px, 7vw, 80px) 0 24px; }
.post-head h1 { font-size: clamp(36px, 6vw, 56px); letter-spacing: -0.035em; margin: 8px 0 16px; }
.post-meta { font-size: 15px; color: var(--text-2); margin: 0; }
.post-byline { display: flex; gap: 12px; align-items: center; font-size: 15px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); line-height: 1.35; }
.avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 700; font-size: 16px; letter-spacing: 0; }
.avatar-xl { width: 96px; height: 96px; font-size: 34px; margin-bottom: 24px; box-shadow: var(--shadow); }
.post-foot { padding-top: 32px; border-top: 1px solid var(--line); margin-top: 48px; display: grid; gap: 28px; }
.post-share { display: flex; gap: 8px; flex-wrap: wrap; }
.related h2, .comments h2 { font-size: 24px; margin-bottom: 4px; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-nav a { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: var(--radius); background: var(--bg-soft); color: var(--text); font-weight: 600; font-size: 15px; line-height: 1.3; }
.post-nav a:hover { text-decoration: none; background: var(--bg-sunken); }
.post-nav .muted { font-size: 13px; font-weight: 500; }
.post-nav .next { text-align: right; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { text-align: left; } }

/* ── Prose (journal & concepts) ─────────────────────────────────────── */
.prose { font-size: 19px; line-height: 1.6; letter-spacing: -0.015em; }
.prose > :not(:first-child) { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose h2 { font-size: 30px; }
.prose > h2:not(:first-child) { margin-top: 2em; }
.prose h3 { font-size: 23px; }
.prose > h3:not(:first-child) { margin-top: 1.6em; }
.prose h2 + :not(:first-child), .prose h3 + :not(:first-child) { margin-top: 0.6em; }
.prose .anchor { position: absolute; margin-left: -1em; padding-right: .3em; color: var(--text-3); opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; text-decoration: none; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--text); font-size: 1.05em; }
.prose pre { background: var(--bg-soft); padding: 18px 20px; border-radius: 14px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.5em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose figure { margin-inline: 0; } .prose figcaption { font-size: 14px; color: var(--text-2); text-align: center; margin-top: 8px; }
.prose img { border-radius: 14px; }
.math-display, .katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.katex { font-size: 1.08em; }
.callout { background: var(--bg-soft); border-radius: 16px; padding: 18px 22px; border-left: 4px solid var(--text-3); }
.prose .callout > :not(:first-child) { margin-top: .7em; }
.callout-title { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-2); }
.callout-theorem, .callout-lemma { border-left-color: var(--accent); } .callout-theorem .callout-title, .callout-lemma .callout-title { color: var(--accent); }
.callout-definition { border-left-color: var(--purple); } .callout-definition .callout-title { color: var(--purple); }
.callout-idea, .callout-example { border-left-color: var(--green); } .callout-idea .callout-title, .callout-example .callout-title { color: var(--green); }
.callout-question, .callout-warning { border-left-color: var(--orange); } .callout-question .callout-title, .callout-warning .callout-title { color: var(--orange); }
.callout-proof { background: transparent; border-left-style: dashed; }
.callout-proof::after { content: "∎"; display: block; text-align: right; color: var(--text-2); }
.prose-compact { font-size: 16px; line-height: 1.55; }
.prose.prose-compact > :not(:first-child) { margin-top: .8em; }
.prose-compact blockquote { font-size: 1em; }

/* ── Concepts ───────────────────────────────────────────────────────── */
.concept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(480px, 100%), 1fr)); gap: 16px; align-items: start; }
.concept { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.concept h2 { font-size: 24px; }
.concept h2 a { color: var(--text); }
.concept[hidden] { display: none; }
.concept:target { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
.concept-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.stage-link { font-size: 14px; display: inline-flex; align-items: center; gap: 2px; }

/* ── Path ───────────────────────────────────────────────────────────── */
.progress-card { display: inline-flex; align-items: center; gap: 18px; padding: 16px 22px; margin-top: 28px; }
.progress-card .stat-num { font-size: 30px; }
.ring { width: 56px; height: 56px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring-bg { stroke: var(--bg-soft); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 119.4; stroke-dashoffset: 119.4; transition: stroke-dashoffset .6s var(--ease); }
.path { position: relative; }
.stage { display: grid; grid-template-columns: 48px 1fr; gap: 16px; position: relative; padding-bottom: 20px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.stage::before { content: ""; position: absolute; left: 23px; top: 48px; bottom: 0; width: 2px; background: var(--line-strong); }
.stage:last-child::before { display: none; }
.stage-num { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; background: var(--bg-elev); border: 2px solid var(--line-strong); font-weight: 700; font-size: 18px; position: relative; z-index: 1; transition: background .3s, color .3s, border-color .3s; }
.stage.is-current .stage-num { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.stage.is-done .stage-num { background: var(--green); border-color: var(--green); color: #fff; }
.stage-card h2 { font-size: 28px; margin-bottom: 10px; }
.stage-card h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); margin: 24px 0 10px; }
.stage.is-current .stage-card { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.milestones { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 4px; }
.milestones label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 8px 10px; margin-inline: -10px; border-radius: 10px; font-size: 16px; line-height: 1.4; }
.milestones label:hover { background: var(--bg-soft); }
.milestones input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border-radius: 999px; border: 2px solid var(--line-strong); display: grid; place-items: center; cursor: pointer; transition: all .2s; }
.milestones input:checked { background: var(--green); border-color: var(--green); }
.milestones input:checked::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.milestones input:checked + span { color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--text-3); }
.resources { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.resources a { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; margin-inline: -12px; border-radius: 12px; color: var(--text); font-size: 15px; line-height: 1.35; }
.resources a:hover { background: var(--bg-soft); text-decoration: none; }
.resources a > .i { color: var(--text-3); }
.kind { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-align: center; padding: 4px 0; border-radius: 6px; background: var(--bg-soft); color: var(--text-2); }
.kind-book { color: var(--accent); background: var(--accent-soft); }
.kind-paper { color: var(--orange); background: rgba(196, 85, 0, .1); }
.kind-video { color: var(--red); background: rgba(224, 36, 94, .1); }
.kind-course { color: var(--green); background: rgba(29, 157, 82, .1); }
.stage-notes { padding-left: 1.1em; font-size: 15px; }

/* ── About ──────────────────────────────────────────────────────────── */
.about-hero { text-align: left; }
.about-hero .btn-row { margin-top: 24px; }
.about-grid { display: grid; gap: 16px; }
.about-grid h2 { font-size: 26px; margin-bottom: 10px; }
.about-grid h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); margin: 20px 0 8px; }
.stuck ol { padding-left: 1.2em; display: grid; gap: 12px; margin: 0; }
.stuck li a { font-size: 14px; white-space: nowrap; }
.ways { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.footer { background: var(--bg-soft); color: var(--text-2); font-size: 13px; padding: 48px 0 32px; margin-top: 96px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.footer-grid h4 { font-size: 13px; color: var(--text); margin-bottom: 10px; letter-spacing: -0.01em; }
.footer-grid > div > a { display: flex; gap: 6px; align-items: center; color: var(--text-2); padding: 3px 0; }
.footer-grid a:hover { color: var(--text); }
.footer-brand p { margin-top: 12px; max-width: 26em; }
.footer-legal { padding-top: 20px; }
.footer-legal p { margin: 0 0 6px; }
.footer-legal a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: span 2; } }

/* ── Search palette (Spotlight) ─────────────────────────────────────── */
.palette { position: fixed; inset: 0; z-index: 100; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .28); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .2s; }
.palette-panel { position: relative; width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; background: var(--glass); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px); border-radius: 20px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); overflow: hidden; animation: pop .25s var(--ease); }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 16px 20px; font-size: 20px; color: var(--text-2); border-bottom: 1px solid var(--line); }
.palette-input input { flex: 1; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 20px; outline: none; letter-spacing: -0.02em; }
.palette-input input::-webkit-search-cancel-button { display: none; }
.palette-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.palette-results li a { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; color: var(--text); }
.palette-results li a:hover, .palette-results li[aria-selected="true"] a { background: var(--accent); color: #fff; text-decoration: none; }
.palette-results li[aria-selected="true"] .pr-sub, .palette-results li a:hover .pr-sub, .palette-results li[aria-selected="true"] .palette-results li a > span:last-child { min-width: 0; }
.pr-kind { color: rgba(255, 255, 255, .8); }
.pr-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.pr-title { display: block; font-weight: 500; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-sub { display: block; font-size: 12px; color: var(--text-2); }
.palette-empty { padding: 28px; text-align: center; color: var(--text-2); font-size: 15px; }
.palette-foot { display: flex; gap: 16px; padding: 10px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
@media (max-width: 560px) { .palette-foot { display: none; } .palette { padding-top: 8px; } }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: all .3s var(--ease); z-index: 120; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(-8px); } }

/* ── Scroll reveal ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

@media print {
  .nav, .footer, .toolbar, .paper-actions, .palette, .post-share, .comments { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ── Archive navigation ─────────────────────────────────────────────── */
.year-nav { margin: 4px 0 20px; }
.year-nav a { color: var(--text); font-size: 13px; font-weight: 500; padding: 6px 14px; border-radius: 8px; }
.year-nav a:hover { text-decoration: none; background: var(--bg-elev); }
.year-nav a[aria-current="page"] { background: var(--bg-elev); box-shadow: var(--shadow-sm), 0 0 0 0.5px var(--line); }
.archive-more { text-align: center; padding: 40px 0 8px; }
.archive-more .btn-row { justify-content: center; }

.rail-btns { display: flex; gap: 10px; }
.rail-btn { width: 36px; height: 36px; background: var(--bg-soft); opacity: 1; color: var(--text-2); }
.rail-btn:hover { background: var(--bg-sunken); color: var(--text); }
.rail-btn:disabled { opacity: .35; cursor: default; }
.rail-btn[data-rail="-1"] .i { transform: rotate(180deg); }

/* ── Automation notes & talks ───────────────────────────────────────── */
.auto-note { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); background: var(--bg-soft); padding: 6px 12px; border-radius: 999px; margin: 4px 0 0; }
.badge-auto { background: rgba(29, 157, 82, 0.1); color: var(--green); }
.event-orgs { font-size: 13px; margin-top: -4px; }
.talks-card { padding: 8px 28px 16px; }
.talks-sub { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin: 20px 0 4px; }
.talk-list { list-style: none; margin: 0; padding: 0; }
.talk { display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.talk:last-child { border-bottom: 0; }
.talk[hidden] { display: none; }
.talk-date { font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.talk-body { display: grid; gap: 2px; font-size: 14px; }
.talk-title { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.35; }
.talk-links { display: flex; gap: 6px; }
@media (max-width: 720px) { .talk { grid-template-columns: 1fr; gap: 6px; } }

/* ── People ─────────────────────────────────────────────────────────── */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 16px; align-items: start; }
.person { display: flex; flex-direction: column; gap: 14px; padding: 24px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.person[hidden] { display: none; }
.person:target { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
.person-head { display: flex; gap: 14px; align-items: center; }
.person-head h3 { font-size: 20px; margin-bottom: 2px; }
.person-head p { margin: 0; font-size: 14px; }
.known { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: 15px; line-height: 1.4; }
.ask { margin: 0; font-size: 15px; line-height: 1.45; }
.ask .eyebrow { display: block; margin-bottom: 2px; font-size: 12px; }
.person-recent { display: grid; gap: 6px; font-size: 14px; background: var(--bg-soft); border-radius: 12px; padding: 12px 14px; }
.person-recent > .muted { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.person-recent a { color: var(--text); line-height: 1.35; }
.person-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.reach-out { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; }
.reach-out h2 { font-size: 28px; margin-bottom: 14px; }
.etiquette { padding-left: 1.2em; display: grid; gap: 10px; font-size: 15px; line-height: 1.45; margin: 0 0 16px; }
.template { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.template-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.template-head .eyebrow { margin: 0; }
.template pre { margin: 0; white-space: pre-wrap; font: 13px/1.55 var(--mono); background: var(--bg-soft); border-radius: 14px; padding: 18px; color: var(--text); flex: 1; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); gap: 16px; align-items: start; }
.learn-col h3 { font-size: 20px; margin-bottom: 12px; }
.learn-why { font-size: 13px; color: var(--text-2); }
@media (max-width: 860px) { .reach-out { grid-template-columns: 1fr; } }

/* ── Path: resource roles & notes ───────────────────────────────────── */
.path-note { max-width: 46em; font-size: 15px; color: var(--text-2); background: var(--bg-soft); border-radius: 14px; padding: 14px 18px; margin-top: 20px; line-height: 1.5; }
.role { display: inline-block; margin-left: 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; vertical-align: 1px; }
.role-optional { background: var(--bg-sunken); color: var(--text-2); }
.role-reference { background: rgba(122, 90, 248, .12); color: var(--purple); }
.res-note { font-size: 13px; color: var(--text-2); line-height: 1.4; display: inline-block; margin-top: 2px; }
.resources a { align-items: start; }
.kind-notes { color: var(--green); background: rgba(29, 157, 82, .1); }
.kind-article { color: var(--purple); background: rgba(122, 90, 248, .1); }
.name-meaning { font-size: 15px; color: var(--text-2); border-left: 3px solid var(--accent); padding: 2px 0 2px 16px; line-height: 1.5; }

/* ── Path: owner's own progress ─────────────────────────────────────── */
.path-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; color: var(--text-2); margin: 16px 0 0; }
.dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; }
.dot-done { background: var(--green); }
.dot-here { background: var(--accent); margin-left: 6px; }
.badge-done { background: rgba(29, 157, 82, 0.12); color: var(--green); }
.stage.is-complete .stage-num { background: var(--green); border-color: var(--green); color: #fff; }
.stage.is-complete .stage-card { opacity: .92; }
.contact-line { font-size: 17px; margin-top: 20px; }

/* ── Journal & concepts refinements ─────────────────────────────────── */
.journal-count { font-size: 15px; margin: 0 0 4px; }
.role-advanced { background: rgba(122, 90, 248, .14); color: var(--purple); }
.concept.is-advanced { border-color: color-mix(in srgb, var(--purple) 28%, transparent); }
.name-note { font-size: 14px; margin-top: -4px; }
