/* ─────────────────────────────────────────────────────────
   johnmbarrios.com — shared design system
   Crisp modern academic: pure white, cool neutrals,
   serif display + Inter body + mono labels.
   Fonts: Source Serif 4 · Inter · JetBrains Mono
   ───────────────────────────────────────────────────────── */

/* ── Self-hosted fonts (latin subsets, variable where available) ── */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url('fonts/source-serif-4-latin-opsz-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
}

/* ── Cross-document view transitions ── */
@view-transition { navigation: auto; }

:root {
  --ink:        #0f1115;
  --ink-soft:   #3f4650;
  --muted:      #6b7280;
  --paper:      #ffffff;
  --paper-deep: #f8f9fa;
  --rule:       #e7e9ec;
  --rule-dark:  #cfd3d9;
  --yale:       #00356b;
  --blue:       #1d63d8;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --w-wide: 1080px;
  --w-text: 720px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(29,99,216,0.14); }

a { color: var(--yale); text-decoration: none; }

.wrap { max-width: var(--w-wide); margin: 0 auto; padding: 0 1.5rem; }

/* ── Header ── */
.site-header {
  background: var(--yale);
  position: sticky;
  top: 0;
  z-index: 50;
  view-transition-name: site-header;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 60px;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.wordmark a { color: #ffffff; }
.wordmark a:hover { color: #c8dcf0; }

.site-nav {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.site-nav a {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.72);
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}

.site-nav a:hover { color: #ffffff; }
.site-nav a.active { color: #ffffff; font-weight: 600; border-bottom-color: rgba(255,255,255,0.85); }

/* ── Homepage hero ── */
.hero {
  background: url('hero-motif.svg') no-repeat right -60px bottom -220px / 760px auto;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 4.5rem;
  align-items: center;
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5.5vw, 3.5rem);
  font-weight: 560;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 1.15rem;
}

.hero-role {
  font-size: 0.99rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 1.35rem;
}

.hero-lede {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 36em;
  margin-bottom: 2rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-links a {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--rule-dark);
  border-radius: 999px;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.hero-links a:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: rgba(29,99,216,0.04);
}

.hero-photo picture { display: block; width: 100%; }

.hero-photo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center 12%;
  border-radius: 12px;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(15,17,21,0.05), 0 8px 32px rgba(15,17,21,0.06);
}

/* ── Section machinery ── */
.section-label {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.prose p { margin-bottom: 1.05rem; max-width: 46em; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--yale); border-bottom: 1px solid var(--rule-dark); transition: color .15s ease, border-color .15s ease; }
.prose a:hover { color: var(--blue); border-bottom-color: var(--blue); }
.prose em { font-style: italic; }

/* ── Announcement band ── */
.announce {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-deep);
}

.announce .wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.2rem;
  align-items: baseline;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.announce-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  white-space: nowrap;
}

.announce-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
}

.announce-title a { color: var(--ink); transition: color .15s ease; }
.announce-title a:hover { color: var(--blue); }

.announce-meta {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.announce-meta a { color: var(--yale); border-bottom: 1px solid var(--rule-dark); }
.announce-meta a:hover { color: var(--blue); border-bottom-color: var(--blue); }

/* ── Two-column body ── */
.main { padding: 4rem 0 5rem; }

.main .wrap.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 5rem;
  align-items: start;
}

.block { margin-bottom: 3.2rem; }
.block:last-child { margin-bottom: 0; }

/* ruled definition rows (education, etc.) */
.row-list { list-style: none; }

.row-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  line-height: 1.5;
}

.row-list li:first-child { border-top: 1px solid var(--rule); }

.row-list .primary { font-weight: 600; font-size: 0.95rem; }
.row-list .secondary { font-size: 0.85rem; color: var(--muted); margin-top: 0.1rem; }

/* right rail */
.rail-block { margin-bottom: 2.6rem; }
.rail-block:last-child { margin-bottom: 0; }

.rail-heading {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule-dark);
  margin-bottom: 0.35rem;
}

.rail-list { list-style: none; }

.rail-list li {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-soft);
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}

.rail-list li:last-child { border-bottom: none; }
.rail-list strong { color: var(--ink); font-weight: 600; }
.rail-list a { color: var(--yale); }
.rail-list a:hover { color: var(--blue); }

.rail-note {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--muted);
  padding-top: 0.55rem;
}

/* ── Interior page hero (Research, Teaching, …) ──
   Yale blue banner with custom collegiate-arch artwork */
.page-hero {
  background: var(--yale) url('yale-banner.svg') no-repeat center / cover;
}

/* per-page banner artwork (same visual family as yale-banner.svg);
   teaching keeps the default collegiate arches */
.page-hero.ph-research { background-image: url('banner-research.svg'); }
.page-hero.ph-code     { background-image: url('banner-code.svg'); }
.page-hero.ph-media    { background-image: url('banner-media.svg'); }
.page-hero.ph-cv       { background-image: url('banner-cv.svg'); }
.page-hero.ph-ai       { background-image: url('banner-ai.svg'); }   /* Claude Code course sub-site */
.page-hero.ph-lag      { background-image: url('banner-lag.svg'); }  /* Labor & Accounting Group sub-site */

.page-hero .wrap {
  padding-top: 4.2rem;
  padding-bottom: 3.8rem;
}

.page-hero .eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9dc1e4;
  margin-bottom: 0.9rem;
}

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 560;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  color: #ffffff;
}

.page-hero .lede {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.78);
  max-width: 42em;
}

/* ── Entry list (courses, papers, resources) ── */
.entry {
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--rule);
}

.entry-kicker {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.entry h3 {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.45rem;
}

.entry h3 a { color: var(--ink); transition: color .15s ease; }
.entry h3 a:hover { color: var(--blue); }

.entry p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 46em;
  margin-bottom: 0.85rem;
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.entry-links a,
.entry-links .soon {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
}

.entry-links a {
  color: var(--ink-soft);
  border: 1px solid var(--rule-dark);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.entry-links a:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: rgba(29,99,216,0.04);
}

.entry-links .soon {
  color: var(--muted);
  border: 1px dashed var(--rule-dark);
  cursor: default;
}

/* ── Footer ── */
.site-footer {
  background: var(--yale);
  padding: 2.2rem 0 2.6rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
}

.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: #ffffff; }

/* ── Responsive ── */
@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 2.6rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .hero-photo { max-width: 300px; }
  .main .wrap.cols { grid-template-columns: 1fr; gap: 3.2rem; }
  .announce .wrap { grid-template-columns: 1fr; gap: 0.4rem; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .site-header .wrap { height: auto; padding-top: 0.9rem; padding-bottom: 0.9rem; }
  .site-nav { gap: 0.5rem 1.1rem; width: 100%; flex-wrap: wrap; overflow: visible; }
  .main { padding: 3rem 0 3.5rem; }
}

/* ─────────────────────────────────────────────────────────
   RESEARCH — generated research.html (build.mjs)
   Toolbar, filter chips, timeline strip, paper cards.
   ───────────────────────────────────────────────────────── */

:root { --accent: #bd5319; }

.page-hero .hero-stats {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #9dc1e4;
  margin-top: 1.1rem;
}

/* ── Sticky toolbar ── */
.research-toolbar {
  position: sticky;
  top: 60px;              /* clears the sticky masthead */
  z-index: 40;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  padding: 0.8rem 0 0.85rem;
}

.rt-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.rt-row + .rt-row { margin-top: 0.65rem; }

.rt-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 420px;
  color: var(--muted);
}

.rt-search svg {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.rt-search input {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--ink);
  padding: 0.5rem 0.9rem 0.5rem 2.15rem;
  border: 1px solid var(--rule-dark);
  border-radius: 999px;
  background: var(--paper);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.rt-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,99,216,0.10);
}

.rt-search input::placeholder { color: var(--muted); }

.rt-sort {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.rt-sort-label {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.15rem;
}

.rt-sortbtn {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--rule-dark);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.rt-sortbtn:hover { color: var(--blue); border-color: var(--blue); }
.rt-sortbtn.on {
  color: #fff;
  background: var(--yale);
  border-color: var(--yale);
}
.rt-sortbtn.off { opacity: 0.45; cursor: default; }
.rt-sortbtn.off:hover { color: var(--ink-soft); border-color: var(--rule-dark); }

.rt-chip-rows {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem 1.4rem;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip-group-status { margin-left: auto; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--rule-dark);
  border-radius: 999px;
  padding: 0.26rem 0.7rem;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.chip:hover { color: var(--blue); border-color: var(--blue); background: rgba(29,99,216,0.04); }

.chip.on {
  color: #fff;
  background: var(--yale);
  border-color: var(--yale);
}

.chip-n {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
}

.chip.on .chip-n { color: #c8dcf0; }

/* ── Timeline strip ── */
.research-strip {
  background: var(--paper-deep);
  border-bottom: 1px solid var(--rule);
}

.research-strip .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  flex-wrap: wrap;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.strip-meta { display: flex; flex-direction: column; gap: 0.45rem; }

.strip-count {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.strip-cites {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.strip-cites a { color: var(--yale); border-bottom: 1px solid var(--rule-dark); }
.strip-cites a:hover { color: var(--blue); border-bottom-color: var(--blue); }

.strip-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.74rem;
  color: var(--muted);
}

.strip-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }

.strip-bib {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--yale);
  border-bottom: 1px solid var(--rule-dark);
}
.strip-bib:hover { color: var(--blue); border-bottom-color: var(--blue); }

.timeline { flex: 0 1 460px; min-width: 260px; }
.timeline svg { display: block; width: 100%; height: auto; }
.tl-year { font-family: var(--mono); font-size: 10px; fill: var(--muted); }
.tl-dot circle { transition: opacity .2s ease, r .15s ease; }
.tl-dot:hover circle { r: 6.5; }
.tl-dot.dim circle { opacity: 0.15; }

/* ── Paper cards ── */
.research-main { padding-top: 2.2rem; }

.paper {
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 140px;   /* land below sticky header + toolbar */
}

.paper:target { animation: paper-flash 1.6s ease 1; }
@keyframes paper-flash {
  0%, 35% { background: rgba(29,99,216,0.06); }
  100% { background: transparent; }
}

.paper-head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.paper-kicker {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-pill {
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.status-published  { color: var(--yale);  background: rgba(0,53,107,0.08); }
.status-forthcoming{ color: #2d6a4f;      background: rgba(45,106,79,0.10); }
.status-rr         { color: var(--accent);background: rgba(189,83,25,0.10); }
.status-working    { color: var(--ink-soft); background: var(--paper-deep); border: 1px solid var(--rule); }

.cite-badge {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--muted);
  border-bottom: 1px dotted var(--rule-dark);
}
a.cite-badge:hover { color: var(--blue); border-bottom-color: var(--blue); }

.paper h3 {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.35rem;
  max-width: 52em;
}

.paper h3 a { color: var(--ink); transition: color .15s ease; }
.paper h3 a:hover { color: var(--blue); }

.paper-authors {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}

.paper-note {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.paper-abstract { margin: 0.5rem 0 0.65rem; max-width: 46em; }

.paper-abstract summary {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--yale);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.paper-abstract summary::-webkit-details-marker { display: none; }
.paper-abstract summary::before {
  content: '';
  width: 0.45em;
  height: 0.45em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .2s ease;
}
.paper-abstract[open] summary::before { transform: rotate(45deg); }
.paper-abstract summary:hover { color: var(--blue); }

.paper-abstract p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--ink-soft);
  padding-top: 0.5rem;
}

.paper-links { margin-top: 0.75rem; }

/* featured-paper figure thumbnails (build.mjs adds .has-thumb) */
.paper.has-thumb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 1.7rem;
  align-items: start;
}

.paper-thumb {
  display: block;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
  padding: 6px;
  margin-top: 0.3rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.paper-thumb:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 10px rgba(15,17,21,0.07);
}

.paper-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

@media (max-width: 700px) {
  .paper.has-thumb { display: block; }
  .paper-thumb { display: none; }
}

/* BibTeX copy button rides in .entry-links; match its pills */
.bib-btn {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--paper);
  padding: 0.32rem 0.75rem;
  border: 1px solid var(--rule-dark);
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.bib-btn:hover { color: var(--blue); border-color: var(--blue); background: rgba(29,99,216,0.04); }
.bib-btn.copied { color: #2d6a4f; border-color: #2d6a4f; background: rgba(45,106,79,0.06); }

.no-results {
  padding: 3rem 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ── Research responsive ── */
@media (max-width: 880px) {
  .chip-group-status { margin-left: 0; }
  .research-strip .wrap { flex-direction: column; align-items: stretch; }
  .timeline { flex-basis: auto; max-width: 460px; }
}

@media (max-width: 560px) {
  .research-toolbar { position: static; }  /* masthead wraps on mobile; avoid overlap */
  .rt-sort { margin-left: 0; }
  .paper { scroll-margin-top: 20px; }
  .paper h3 { font-size: 1.14rem; }
}

/* ─────────────────────────────────────────────────────────
   INTERIOR PAGES — code / media / cv (Phase 4 migrations)
   ───────────────────────────────────────────────────────── */

/* solid-blue primary pill for main downloads */
.entry-links a.pill-primary {
  color: #fff;
  background: var(--yale);
  border-color: var(--yale);
}
.entry-links a.pill-primary:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

/* callout note (toolkit requirements, etc.) */
.callout {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--yale);
  border-radius: 8px;
  padding: 1.3rem 1.5rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 52em;
  margin-top: 2.5rem;
}
.callout strong { color: var(--ink); }
.callout ul { margin: 0.6rem 0 0 1.2rem; }
.callout li { margin: 0.25rem 0; }
.callout code {
  font-family: var(--mono);
  font-size: 0.8em;
  background: rgba(0,53,107,0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* embedded CV PDF */
.pdf-frame {
  width: 100%;
  height: 82vh;
  min-height: 560px;
  border: 1px solid var(--rule-dark);
  border-radius: 8px;
  background: var(--paper-deep);
  margin-top: 1.6rem;
}

.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--rule);
}
.download-row .dl-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.download-row .dl-sub { font-size: 0.82rem; color: var(--muted); margin-top: 0.1rem; }

/* ── Timeline instant tooltip ── */
.tl-tip {
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  max-width: 340px;
  padding: 0.4rem 0.65rem;
  background: var(--yale);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.45;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(15,17,21,0.18);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.08s ease;
}
.tl-tip.show { opacity: 1; }
