:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-muted: #f8fafc;
  --panel-dark: #0f172a;
  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #64748b;
  --line: #e2e8f0;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
  --radius: 24px;
  --radius-sm: 16px;
  --max: 1152px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.container { width: min(calc(100% - 3rem), var(--max)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 0;
}
.brand { display: flex; align-items: center; gap: .85rem; border: 0; background: transparent; padding: 0; color: inherit; }
.brand-mark, .hero-mark, .footer-mark {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow);
}
.brand-mark { width: 3rem; height: 3rem; border-radius: var(--radius-sm); }
.brand-mark img { width: 2rem; height: 2rem; }
.brand-copy { display: flex; flex-direction: column; align-items: flex-start; }
.brand-kicker, .section-kicker, .hero-kicker {
  font-size: .76rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted);
}
.brand-title { font-size: 1.15rem; font-weight: 600; }
.top-nav { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.nav-btn, .dropdown-toggle {
  border: 0; border-radius: 1rem; padding: .65rem 1rem; background: transparent; color: var(--text-soft);
}
.nav-btn:hover, .dropdown-toggle:hover { background: #f1f5f9; }
.nav-btn.active, .dropdown-toggle.active, .dropdown.open .dropdown-toggle { background: var(--text); color: #fff; }
.dropdown { position: relative; }
.chevron { font-size: .85em; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + .5rem); width: 18rem;
  background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: .5rem; box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}
.dropdown-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent; border-radius: .85rem; padding: .9rem 1rem;
}
.dropdown-item:hover { background: #f8fafc; }
.item-title { display: block; font-weight: 600; color: var(--text); }
.item-desc { display: block; margin-top: .2rem; font-size: .8rem; color: var(--text-muted); line-height: 1.4; }
.page { display: none; }
.page.active { display: block; }
.section, .hero-section { padding: 4.5rem 0; }
.section-border { border-bottom: 1px solid var(--line); }
.section-border-top { border-top: 1px solid var(--line); }
.light-band, .muted-band { background: var(--panel-muted); }
.hero-bg { position: relative; overflow: hidden; }
.hero-pattern { position: absolute; inset: 0; pointer-events: none; color: rgba(203, 213, 225, 0.55); }
.hero-pattern svg { width: 100%; height: 100%; }
.hero-inner { position: relative; text-align: center; }
.hero-logo-row { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
.hero-mark { width: 4rem; height: 4rem; border-radius: 1.5rem; }
.hero-mark img { width: 2.75rem; height: 2.75rem; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 600; }
.page-title { font-size: clamp(2.3rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 1rem 0 0; color: var(--text-soft); }
.hero-copy, .lead { font-size: 1.15rem; max-width: 50rem; margin-inline: auto; }
.narrow-block { max-width: 48rem; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }
.btn {
  border-radius: 1rem; padding: .9rem 1.2rem; border: 1px solid var(--line); background: transparent; color: var(--text);
}
.btn-primary { background: var(--text); border-color: var(--text); color: #fff; }
.btn-secondary:hover { background: #f8fafc; }
.grid-two, .grid-two-alt { display: grid; gap: 2.5rem; }
.grid-two { grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); }
.grid-two-alt { grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); }
.card-grid { display: grid; gap: 1.5rem; }
.top-gap { margin-top: 2rem; }
.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four-up { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card, .subcard, .callout, .contact-inline {
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card { padding: 2rem; }
.subcard { padding: 1.5rem; margin-top: 1.25rem; background: var(--panel-muted); }
.muted-card { background: var(--panel-muted); }
.dark-card {
  background: var(--panel-dark); color: #e2e8f0;
}
.dark-card h2, .dark-card h3, .dark-card strong { color: #fff; }
.dark-card p, .dark-card li { color: #cbd5e1; }
.centered-card { text-align: center; }
.centered-card .btn { margin-top: 1.5rem; }
.stack-sm > * + * { margin-top: .75rem; }
.plain-list { padding-left: 1.1rem; margin: 1.25rem 0 0; color: var(--text-soft); }
.plain-list li + li { margin-top: .85rem; }
.meta-block { margin-top: 1rem; font-size: .96rem; color: var(--text-muted); }
.meta-block p { margin-top: .35rem; }
.article-copy p + p { margin-top: 1rem; }
.italic-note { font-style: italic; color: var(--text-muted); }
.callout { margin-top: 2rem; padding: 1.25rem 1.5rem; background: var(--panel-muted); }
.compact-text p { margin-top: .35rem; }
.break-all { word-break: break-all; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { text-align: center; padding: 2rem 0; color: var(--text-muted); font-size: .95rem; }
.footer-mark { width: 3rem; height: 3rem; border-radius: 1rem; margin: 0 auto 1rem; }
.footer-mark img { width: 2rem; height: 2rem; }
@media (max-width: 1080px) {
  .four-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three-up { grid-template-columns: 1fr; }
}
@media (max-width: 840px) {
  .grid-two, .grid-two-alt, .two-up, .four-up { grid-template-columns: 1fr; }
  .dropdown-menu { left: 0; right: auto; width: min(18rem, calc(100vw - 2rem)); }
}
@media (max-width: 640px) {
  .container { width: min(calc(100% - 1.5rem), var(--max)); }
  .section, .hero-section { padding: 3.5rem 0; }
  .card { padding: 1.35rem; }
  .hero-actions { justify-content: stretch; }
  .hero-actions .btn, .hero-actions button { width: 100%; }
  .brand-title { font-size: 1rem; }
}

.break-all { overflow-wrap: anywhere; word-break: break-word; }
.top-gap { margin-top: 1.5rem; }
.contact-grid.two-up-form { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.contact-form { display: grid; gap: 1rem; }
.contact-form h3 { margin-bottom: 0; }
.contact-form label { display: grid; gap: 0.4rem; font-size: 0.95rem; color: var(--text-soft); }
.contact-form input,
.contact-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 1rem; padding: 0.85rem 1rem;
  font: inherit; color: var(--text); background: #fff;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid rgba(15,23,42,0.12); outline-offset: 1px; }
.archive-block + .archive-block { margin-top: 2rem; }
@media (min-width: 900px) {
  .contact-grid.two-up-form { grid-template-columns: 1fr 1fr; align-items: start; }
}


.paper-link, .paper-meta-link {
  text-decoration: underline;
  text-underline-offset: 0.14em;
  text-decoration-thickness: 1px;
}
.paper-link { color: var(--text); }
.paper-meta-link { color: var(--text-soft); }
.paper-link:hover, .paper-meta-link:hover { color: #1d4ed8; }
.literature-card p strong { color: var(--text); }


.paper-citation {
  color: var(--muted-text);
  font-size: 0.96rem;
  line-height: 1.65;
}

#community-root .muted-card,
#community-root .card-grid {
  margin-top: 1.5rem;
}


.status-note {
  color: var(--text);
}

.audio-card {
  display: grid;
  gap: 1rem;
}

.audio-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--panel-muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
}

.audio-player {
  width: 100%;
  margin-top: 0.25rem;
}

.audio-note {
  margin-top: 0;
  font-size: 0.96rem;
  color: var(--text-muted);
}

.audio-attribution {
  margin-top: -0.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .audio-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
