:root {
  --text: #1a1a1a;
  --muted: #555;
  --border: #ddd;
  --bg: #fafafa;
  --accent: #1e40af;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: #fff;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 2rem 1.25rem 1.5rem;
  background: var(--bg);
}

.site-header__inner {
  max-width: 960px;
  margin: 0 auto;
}

.title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.authors {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.affiliations {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.author-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.author-note a {
  color: var(--accent);
}

.nav-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}

.nav-toc a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-toc a:hover {
  text-decoration: underline;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

section {
  margin-bottom: 3rem;
}

section h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.lede {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.abstract {
  margin: 0;
  font-size: 0.95rem;
}

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

.links-row a {
  color: var(--accent);
}

.header-links {
  margin-top: 0.85rem;
  gap: 0.5rem;
}

.link-pill {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}

.link-pill:hover {
  background: #fff;
  border-color: var(--accent);
  text-decoration: none;
}

.citation-wrap {
  margin-top: 0.5rem;
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg);
}

.citation-wrap pre {
  margin: 0;
  padding: 2.5rem 1rem 1rem 1.25rem;
  background: transparent;
  border: 0;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.5;
}

.citation-wrap code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre;
}

.copy-cite-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
}

.copy-cite-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.copy-cite-btn.is-copied {
  border-color: #15803d;
  color: #15803d;
}

.compare-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.compare-table th,
.compare-table td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.6rem;
  vertical-align: top;
}

.compare-table th {
  background: var(--bg);
  font-weight: 600;
  text-align: left;
}

.compare-table .prompt-cell {
  font-weight: 500;
  max-width: 14rem;
}

.compare-table audio {
  width: 160px;
  max-width: 100%;
  height: 32px;
}

.sketch-thumb {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  border: 1px solid var(--border);
  background: #eee;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

.video-card {
  border: 1px solid var(--border);
  padding: 0.75rem;
  background: var(--bg);
}

.video-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.video-card p {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.video-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.audio-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 0.4rem;
}

.audio-label:first-child {
  margin-top: 0;
}

.lookahead-legend {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1rem;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.9rem;
}

.lookahead-legend dt {
  font-weight: 600;
  white-space: nowrap;
}

.lookahead-legend dd {
  margin: 0;
  color: var(--muted);
}

.placeholder-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .compare-table audio {
    width: 120px;
  }
}
