/* ============================================================
   Academic Personal Website — Minimalist Style
   Inspired by MIT / Stanford / Princeton academic pages
   ============================================================ */

/* --- CSS Custom Properties (light mode defaults) --- */
:root {
  --bg:         #ffffff;
  --bg-surface: #fafafa;
  --bg-tag:     #f4f4f4;
  --bg-code:    #f5f5f5;
  --bg-pre:     #f8f8f8;

  --fg:         #1a1a1a;
  --fg-heading: #111111;
  --fg-sub:     #555555;
  --fg-muted:   #888888;
  --fg-faint:   #999999;
  --fg-nav:     #444444;
  --fg-code:    #c7254e;
  --fg-pre:     #333333;

  --link:       #2a5db0;
  --nav-active: #111111;

  --bd:         #d8d8d8;
  --bd-mid:     #e0e0e0;
  --bd-light:   #eeeeee;
  --bd-faint:   #f0f0f0;
  --bd-toc:     #e8e8e8;
}

/* --- Dark mode via system preference --- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:         #1b1b1b;
    --bg-surface: #212121;
    --bg-tag:     #272727;
    --bg-code:    #252525;
    --bg-pre:     #1e1e1e;
    --fg:         #dcdcdc;
    --fg-heading: #f0f0f0;
    --fg-sub:     #aaaaaa;
    --fg-muted:   #777777;
    --fg-faint:   #666666;
    --fg-nav:     #aaaaaa;
    --fg-code:    #e06c75;
    --fg-pre:     #cccccc;
    --link:       #7bafd4;
    --nav-active: #f0f0f0;
    --bd:         #2e2e2e;
    --bd-mid:     #2a2a2a;
    --bd-light:   #252525;
    --bd-faint:   #222222;
    --bd-toc:     #2e2e2e;
  }
}

/* --- Dark mode via explicit toggle --- */
:root[data-theme="dark"] {
  --bg:         #1b1b1b;
  --bg-surface: #212121;
  --bg-tag:     #272727;
  --bg-code:    #252525;
  --bg-pre:     #1e1e1e;
  --fg:         #dcdcdc;
  --fg-heading: #f0f0f0;
  --fg-sub:     #aaaaaa;
  --fg-muted:   #777777;
  --fg-faint:   #666666;
  --fg-nav:     #aaaaaa;
  --fg-code:    #e06c75;
  --fg-pre:     #cccccc;
  --link:       #7bafd4;
  --nav-active: #f0f0f0;
  --bd:         #2e2e2e;
  --bd-mid:     #2a2a2a;
  --bd-light:   #252525;
  --bd-faint:   #222222;
  --bd-toc:     #2e2e2e;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  font-family: Georgia, 'Times New Roman', Times, serif;
  color: var(--fg);
  background-color: var(--bg);
  line-height: 1.75;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  line-height: 1.3;
  color: var(--fg-heading);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

h1 { font-size: 1.85rem; font-weight: 600; }
h2 { font-size: 1.35rem; border-bottom: 1px solid var(--bd-mid); padding-bottom: 0.3rem; margin-top: 2.5rem; }
h3 { font-size: 1.1rem; color: var(--fg-nav); }
h4 { font-size: 1rem; color: var(--fg-nav); font-style: italic; }

p { margin-bottom: 1rem; }

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

a:hover, a:focus {
  border-bottom-color: var(--link);
  outline: none;
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Header --- */
header {
  border-bottom: 1px solid var(--bd);
  padding: 1.2rem 0 0.8rem;
  margin-bottom: 2.5rem;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.site-title {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg-heading);
  border-bottom: none;
}

.site-title:hover {
  border-bottom: none;
  color: var(--link);
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1px solid var(--bd);
  color: var(--fg-nav);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.28rem 0.55rem;
  border-radius: 3px;
  font-family: inherit;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--link);
  color: var(--link);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--bd);
  border-radius: 3px;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  width: 36px;
  height: 34px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--fg-nav);
  transition: transform 0.2s ease, opacity 0.15s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Navigation --- */
header nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

header nav ul li {
  display: inline;
}

header nav ul li a {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--fg-nav);
  letter-spacing: 0.02em;
  padding: 0.2rem 0;
  margin-right: 1.4rem;
  border-bottom: 1px solid transparent;
  text-transform: uppercase;
}

header nav ul li a:hover,
header nav ul li a.active {
  color: var(--nav-active);
  border-bottom-color: var(--nav-active);
}

/* --- Main Content --- */
main {
  min-height: 60vh;
  padding-bottom: 3rem;
}

/* --- Home Page --- */
.profile {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.profile-photo {
  flex-shrink: 0;
}

.profile-photo img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--bd-light);
  background: var(--bg-surface);
}

.profile-text { flex: 1; }

.profile-name {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 2rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.2rem;
  color: var(--fg-heading);
}

.profile-affiliation {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  color: var(--fg-sub);
  margin-bottom: 1.2rem;
  font-style: italic;
}

.profile-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.profile-links a {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--fg-nav);
  border: 1px solid var(--bd-mid);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}

.profile-links a:hover {
  border-color: var(--link);
  color: var(--link);
}

/* --- Research Page --- */
.research-theme { margin-bottom: 2rem; }

.research-theme h3 {
  color: var(--fg-heading);
  margin-bottom: 0.4rem;
}

/* Bulleted list of broader research interests */
.interest-list {
  padding-left: 2.4rem;
  margin-top: 0.8rem;
}

.interest-list li {
  margin-bottom: 0.8rem;
  padding-left: 0.4rem;   /* gap between bullet and text */
}

.interest-list li:last-child { margin-bottom: 0; }

/* --- 404 Page --- */
/* Bind the lead-in to the equation it introduces */
.nf-eq-lead { margin-bottom: 0.2rem; }

/* Display equation for the estimated probability. KaTeX supplies the math
   font; this only sets the surrounding rhythm and a slight scale-up so the
   equation reads as the focal point of the page. */
.nf-eq {
  margin: 0.9rem 0 1.9rem;
  color: var(--fg-heading);
}

.nf-eq .katex-display { margin: 0; }

.nf-eq .katex { font-size: 1.35em; }

/* --- Publications --- */
.pub-list { list-style: none; padding: 0; }

.pub-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--bd-light);
}

.pub-list li:last-child { border-bottom: none; }

.pub-title {
  font-weight: 600;
  font-style: italic;
  color: var(--fg);
  display: block;
  margin-bottom: 0.2rem;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--fg-nav);
  display: block;
  margin-bottom: 0.15rem;
}

.pub-venue {
  font-size: 0.85rem;
  color: var(--fg-sub);
  display: block;
  margin-bottom: 0.3rem;
}

.pub-links {
  font-size: 0.8rem;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.pub-links a {
  color: var(--link);
  margin-right: 0.8rem;
}

/* --- BibTeX --- */
.bibtex-toggle, .bibtex-copy {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--link);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 0.8rem;
  border-bottom: 1px solid transparent;
}

.bibtex-toggle:hover, .bibtex-copy:hover {
  border-bottom-color: var(--link);
}

.bibtex-toggle:focus-visible, .bibtex-copy:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

.pub-sep {
  color: var(--fg-faint);
  margin-right: 0.8rem;
  font-size: 0.7rem;
}

.bibtex-content {
  background: var(--bg-pre);
  border: 1px solid var(--bd-mid);
  border-radius: 3px;
  padding: 0.8rem 1rem;
  margin-top: 0.5rem;
  overflow-x: auto;
}

.bibtex-content code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  color: var(--fg-pre);
  white-space: pre;
  line-height: 1.5;
}

/* --- Blog & Notes lists --- */
.post-list { list-style: none; padding: 0; }

.post-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--bd-faint);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.post-list li:last-child { border-bottom: none; }

.post-title {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}

.post-date {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--fg-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.post-tags { margin-top: 0.3rem; }

.tag {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  background: var(--bg-tag);
  color: var(--fg-sub);
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  margin-right: 0.3rem;
  display: inline-block;
}

/* --- Post / Note content --- */
.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bd-toc);
}

.post-header h1 {
  font-size: 1.6rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.post-meta {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  color: var(--fg-muted);
}

article { max-width: 100%; }
article p { margin-bottom: 1.1rem; }

article ul, article ol {
  padding-left: 1.6rem;
  margin-bottom: 1rem;
}

article li { margin-bottom: 0.3rem; }

article blockquote {
  border-left: 3px solid var(--bd);
  padding-left: 1.1rem;
  margin: 1.5rem 0;
  color: var(--fg-sub);
  font-style: italic;
}

article code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88em;
  background: var(--bg-code);
  padding: 0.1em 0.3em;
  border-radius: 2px;
  color: var(--fg-code);
}

article pre {
  background: var(--bg-pre);
  border: 1px solid var(--bd-mid);
  border-radius: 3px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin: 1.2rem 0;
}

article pre code {
  background: none;
  padding: 0;
  color: var(--fg-pre);
  font-size: 0.85rem;
}

/* KaTeX display math */
.katex-display {
  margin: 1.5rem 0;
  overflow-x: auto;
  overflow-y: hidden;
}

/* --- Table of Contents --- */
.toc {
  background: var(--bg-surface);
  border: 1px solid var(--bd-toc);
  padding: 1rem 1.4rem;
  margin-bottom: 2rem;
  border-radius: 2px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
}

.toc h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  margin-top: 0;
  margin-bottom: 0.6rem;
  color: var(--fg-sub);
}

.toc ul { list-style: none; padding: 0; }
.toc ul li { padding: 0.15rem 0; }
.toc ul li a { color: var(--fg-nav); }
.toc ul li.toc-h3 { padding-left: 1rem; }

/* --- Tables --- */
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

article th {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  text-align: left;
  padding: 0.5rem 0.8rem;
  border-bottom: 2px solid var(--bd);
  color: var(--fg-nav);
}

article td {
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid var(--bd-faint);
  vertical-align: top;
}

article tr:last-child td { border-bottom: none; }

/* --- Footnotes --- */
.footnotes {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bd-mid);
  font-size: 0.85rem;
  color: var(--fg-sub);
}

.footnotes ol { padding-left: 1.4rem; }
.footnotes li { margin-bottom: 0.4rem; line-height: 1.6; }

sup.footnote-ref a {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  text-decoration: none;
  border-bottom: none;
  color: var(--link);
  padding: 0 0.1em;
}

/* --- CV --- */
.cv-section { margin-bottom: 2.4rem; }

/* Two columns: a fixed-width date column and a flexible detail column.
   The fixed width keeps every entry's text aligned regardless of how long
   the date label is; long labels wrap inside the column instead. */
.cv-entry {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--bd-faint);
}

.cv-entry:last-child { border-bottom: none; }

.cv-year {
  flex: 0 0 8.75rem;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--fg-muted);
  padding-top: 0.15rem;
}

.cv-detail { flex: 1; min-width: 0; }

/* Title line, then one row per detail */
.cv-detail strong {
  display: block;
  font-size: 0.95rem;
  color: var(--fg);
  margin-bottom: 0.15rem;
}

.cv-detail span {
  display: block;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--fg-sub);
}

/* The line right after the title is the institution / affiliation */
.cv-detail strong + span {
  font-style: italic;
  margin-bottom: 0.1rem;
}

/* --- Contact --- */
.contact-info { list-style: none; padding: 0; }

.contact-info li {
  padding: 0.4rem 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.contact-info .label {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  min-width: 80px;
}

.email-display {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
}

.noscript-note {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  color: var(--fg-muted);
}

.page-note {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--fg-sub);
}

/* --- Skip to content --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 0.5rem 1rem;
  background: var(--fg-heading);
  color: var(--bg);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  border: none;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
  border-bottom: none;
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--bd-mid);
  padding: 1.2rem 0;
  margin-top: 3rem;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  color: var(--fg-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
}

footer a { color: var(--fg-muted); }

/* --- Responsive --- */
@media (max-width: 600px) {
  html { font-size: 16px; }

  .nav-toggle { display: flex; }

  header nav ul {
    display: none;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--bd-faint);
  }

  header nav ul.nav-open { display: flex; }

  header nav ul li { display: block; }

  header nav ul li a {
    display: block;
    padding: 0.4rem 0;
    margin-right: 0;
    font-size: 0.9rem;
  }

  .profile { flex-direction: column; gap: 1rem; }
  .cv-entry { flex-direction: column; gap: 0.3rem; }
  .cv-year { flex: 0 0 auto; }
  .post-list li { flex-direction: column; gap: 0.2rem; }
  footer { flex-direction: column; }
}

/* --- Search (nav overlay) --- */
.search-toggle {
  background: none;
  border: 1px solid var(--bd);
  color: var(--fg-nav);
  cursor: pointer;
  line-height: 1;
  padding: 0.28rem 0.55rem;
  border-radius: 3px;
  font-family: inherit;
  transition: border-color 0.15s ease, color 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-toggle svg {
  display: block;
}

.search-toggle:hover {
  border-color: var(--link);
  color: var(--link);
}

.search-toggle:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.search-overlay.open {
  display: flex;
}

.search-panel {
  background: var(--bg);
  border: 1px solid var(--bd-mid);
  border-radius: 4px;
  width: 100%;
  max-width: 520px;
  margin: 0 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.search-panel input {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-bottom: 1px solid var(--bd-light);
  border-radius: 4px 4px 0 0;
  background: var(--bg);
  color: var(--fg);
  outline: none;
}

.search-panel input::placeholder {
  color: var(--fg-faint);
}

.search-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 320px;
  overflow-y: auto;
}

.search-results-list li {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--bd-faint);
}

.search-results-list li:last-child { border-bottom: none; }

.search-results-list li a {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.88rem;
  display: block;
  color: var(--fg);
  border-bottom: none;
}

.search-results-list li a:hover { color: var(--link); }

.search-result-meta {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  color: var(--fg-muted);
  display: block;
  margin-top: 0.15rem;
}

.search-no-results {
  padding: 0.8rem 1rem;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--fg-muted);
  font-style: italic;
}

.search-hint {
  padding: 0.5rem 1rem;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  color: var(--fg-faint);
  text-align: right;
  border-top: 1px solid var(--bd-faint);
}


/* --- Post figures, result tables, step grids (blog/notes content) --- */
.figure-container {
  margin: 2rem 0;
  text-align: center;
}
.figure-container svg {
  max-width: 100%;
  height: auto;
}
/* Width caps for specific figures (replaces inline style attributes,
   which the strict CSP disallows) */
.figure-container .fig-540 { max-width: 540px; }
.figure-container .fig-620 { max-width: 620px; }
.figure-container .fig-660 { max-width: 660px; }

.figure-caption {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  color: var(--fg-sub);
  margin-top: 0.6rem;
  font-style: italic;
  line-height: 1.5;
}
.figure-caption.caption-left { text-align: left; }

.results-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}
.results-table th {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 2px solid var(--bd);
  color: var(--fg-nav);
  white-space: nowrap;
}
.results-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--bd-faint);
  vertical-align: top;
}
.results-table tr:last-child td { border-bottom: none; }
.results-table .best { font-weight: 700; }
.results-table .total-row td { border-top: 2px solid var(--bd); }
.highlight-row td { background: var(--bg-surface); }

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.step-box {
  background: var(--bg-surface);
  border: 1px solid var(--bd-toc);
  border-radius: 3px;
  padding: 1rem 1.2rem;
}
.step-box .step-label {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 0.4rem;
}
.step-box .step-title {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--fg-heading);
  margin-bottom: 0.4rem;
}
.step-box p {
  font-size: 0.88rem;
  margin-bottom: 0;
}
@media (max-width: 600px) {
  .step-grid { grid-template-columns: 1fr; }
  .results-table { font-size: 0.78rem; }
  .results-table th, .results-table td { padding: 0.35rem 0.4rem; }
}

/* --- Print --- */
@media print {
  .skip-link, nav, footer, .theme-toggle, .nav-toggle, .search-toggle, .search-overlay { display: none; }
  a { color: inherit; border-bottom: none; }
  body { font-size: 11pt; }
}
