:root {
  color-scheme: light;
  --bg: #fff; --surface: #f7f9fa; --ink: #101214; --muted: #37414a;
  --line: #d5dce1; --accent: #1b1f23; --green: #2b6b4d; --blue: #2f5f88;
  --orange: #95542f; --violet: #625087; --header: rgba(255,255,255,.95);
  --figure: #fff; --button-line: #69737c; --code: #f4f6f8; --max: 1120px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1013; --surface: #15191d; --ink: #f4f6f8; --muted: #bcc4cb;
  --line: #303840; --accent: #e2e7eb; --green: #72b28e; --blue: #83abd0;
  --orange: #d09168; --violet: #a28bc8; --header: rgba(13,16,19,.94);
  --figure: #f7f9fa; --button-line: #69737c; --code: #090c0f;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--ink) 34%, transparent); text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--accent); }
img { display: block; max-width: 100%; }
button { font: inherit; }
.site-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  justify-content: space-between; width: 100%; min-height: 52px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line); background: var(--header); backdrop-filter: blur(12px);
}
.wordmark { font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
.wordmark span { color: var(--accent); }
.site-header nav { display: flex; align-items: center; gap: 22px; }
.site-header nav a, .site-header nav button { color: var(--muted); font-size: .82rem; text-decoration: none; }
.site-header nav button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.site-header nav a:hover, .site-header nav button:hover { color: var(--ink); }
main, footer { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.hero { max-width: 1120px; padding: 28px 0 22px; text-align: center; }
.title-lockup {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  max-width: 1050px; margin: 0 auto;
}
.hero-mark { flex: 0 0 auto; width: 82px; height: 61px; }
.eyebrow, .section-label, .finding-index {
  margin: 0 0 11px; color: var(--accent); font-size: .74rem;
  font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
}
.hero h1 {
  margin: 0; font-size: clamp(1.8rem, 3.2vw, 2.45rem); text-align: left;
  font-weight: 300; line-height: 1.28; letter-spacing: -.025em;
}
.hero h1 strong { font-weight: 720; }
.hero h1 span { font-weight: 300; }
.dek { margin: 10px 0 0; color: var(--ink); font-size: clamp(.96rem, 1.4vw, 1.08rem); line-height: 1.4; }
.author-line { display: flex; justify-content: center; gap: 9px; margin-top: 16px; font-size: 1.16rem; font-weight: 600; }
.author-line a { color: #1769c2; text-decoration: none; }
.affiliation { margin: 13px 0 0; font-size: 1.06rem; font-weight: 500; }
.affiliation a { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); text-decoration: none; }
.affiliation img { width: 46px; height: 54px; object-fit: contain; }
.venue { margin: 13px 0 0; color: var(--ink); font-size: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.hero .actions { justify-content: center; }
.button {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px;
  border: 1px solid var(--ink); border-radius: 18px; color: var(--ink);
  font-size: .82rem; font-weight: 650; text-decoration: none;
}
.button:hover { border-color: var(--accent); background: var(--surface); }
.button-muted { color: var(--ink); border-color: var(--line); cursor: default; }
.button-quiet { border-color: var(--line); color: var(--ink); }
.hero-note { margin: 14px 0 0; color: var(--muted); font-size: .74rem; }
.framework-wrap { max-width: 710px; margin: 18px auto 20px; text-align: center; }
.framework-wrap h2 { margin: 0 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: 1.8rem; font-weight: 600; }
.figure-button, .paper-figure {
  width: 100%; margin: 0; padding: 0; overflow: hidden;
  border: 1px solid var(--line); background: var(--figure); cursor: zoom-in;
}
.figure-button img, .paper-figure img { width: 100%; }
.caption { max-width: 720px; margin: 7px auto 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: .8rem; text-align: center; }
.section { padding: 30px 0; scroll-margin-top: 52px; }
.section h2 {
  margin: 0; font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3vw, 2.1rem); font-weight: 600;
  line-height: 1.1; letter-spacing: -.03em;
}
.two-col { display: grid; grid-template-columns: .9fr 1.1fr; gap: 38px; }
.prose p { margin: 0 0 14px; color: var(--muted); }
.abstract-block { display: grid; grid-template-columns: 150px 1fr; gap: 28px; }
.abstract-block p { max-width: 900px; margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: .98rem; line-height: 1.58; }
.measurement-teaser {
  display: grid; grid-template-columns: 205px 1fr auto; gap: 14px; align-items: center;
  margin: 2px 0 14px; padding: 11px 2px; border-block: 1px solid var(--line);
  color: var(--ink); text-decoration: none; transition: border-color .18s ease;
}
.measurement-teaser:hover { border-color: var(--button-line); }
.measurement-teaser-copy .section-label { display: block; margin: 0 0 3px; font-size: .61rem; }
.measurement-teaser-copy strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; line-height: 1.15; }
.measurement-teaser-layers { display: flex; align-items: center; min-width: 0; }
.measurement-layer { display: flex; flex: 1 1 0; min-width: 0; align-items: center; gap: 6px; padding: 7px 8px; border: 1px solid var(--line); background: var(--surface); }
.measurement-layer b { display: grid; flex: 0 0 auto; place-items: center; width: 24px; height: 24px; border: 1px solid currentColor; border-radius: 50%; font-family: Georgia, serif; font-size: .8rem; font-weight: 500; }
.measurement-layer i { overflow: hidden; color: var(--ink); font-size: .67rem; font-style: normal; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.measurement-gap { flex: 0 0 22px; color: var(--muted); font-family: Georgia, serif; font-size: .85rem; text-align: center; }
.measurement-teaser-link { color: var(--muted); font-size: .68rem; font-weight: 650; white-space: nowrap; }
.measurement-teaser-link b { margin-left: 3px; color: var(--ink); font-size: .85rem; }
.measurement-layer.layer-p b { color: var(--green); } .measurement-layer.layer-e b { color: var(--blue); }
.measurement-layer.layer-s b { color: var(--orange); } .measurement-layer.layer-c b { color: var(--violet); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 24px; border-block: 1px solid var(--line); }
.stat-grid div { padding: 13px 14px; border-right: 1px solid var(--line); }
.stat-grid div:last-child { border-right: 0; }
.stat-grid strong { display: block; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 400; line-height: 1; }
.stat-grid span { display: block; margin-top: 7px; color: var(--muted); font-size: .7rem; }
.section-head { display: grid; grid-template-columns: 1.35fr .65fr; align-items: end; gap: 28px; margin-bottom: 12px; }
.section-head > p { margin: 0 0 3px; color: var(--muted); }
.layer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.layer-card { min-height: 132px; padding: 14px; border: 1px solid var(--line); background: var(--surface); }
.layer-card > span { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid currentColor; font-family: Georgia, serif; font-size: 1.15rem; }
.layer-card h3 { margin: 14px 0 4px; font-size: .88rem; }
.layer-card p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.layer-p > span { color: var(--green); } .layer-e > span { color: var(--blue); }
.layer-s > span { color: var(--orange); } .layer-c > span { color: var(--violet); }
.protocol-table-wrap { margin-top: 22px; overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.table-title { padding: 11px 14px 8px; border-bottom: 2px solid var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; font-weight: 700; text-align: center; }
.protocol-table { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--surface); font-size: .76rem; }
.protocol-table th, .protocol-table td { padding: 8px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.protocol-table th { color: var(--muted); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }
.protocol-table td:first-child { font-weight: 700; white-space: nowrap; }
.full-protocol .protocol-table td:nth-child(2) { color: var(--accent); font-weight: 650; white-space: nowrap; }
.full-protocol .protocol-table td:last-child { color: var(--muted); }
.full-protocol .protocol-table th:nth-child(1) { width: 7%; }
.full-protocol .protocol-table th:nth-child(2) { width: 15%; }
.full-protocol .protocol-table th:nth-child(3) { width: 60%; }
.full-protocol .protocol-table th:nth-child(4) { width: 18%; }
.protocol-table tbody tr:last-child td { border-bottom: 0; }
.table-note { margin: 0; padding: 9px 11px; border-top: 2px solid var(--ink); color: var(--muted); font-size: .66rem; }
.boundary-note { margin: 12px 0 0; color: var(--muted); font-size: .7rem; }
.metrics-table-wrap { margin-top: 26px; }
.metrics-table td:first-child { width: 25%; color: var(--ink); }
.metrics-table td:last-child { color: var(--ink); font-size: .84rem; }
.metrics-table mjx-container { margin: 0 !important; }
.paper-table-stack { display: grid; gap: 14px; max-width: 820px; margin: 14px auto 0; }
.paper-table-image { width: 100%; margin: 0; padding: 0; border: 0; background: #fff; cursor: zoom-in; }
.paper-table-image:first-child { width: min(100%, 760px); justify-self: center; }
.paper-table-image img { width: 100%; }
.finding { display: grid; grid-template-columns: 1.35fr .65fr; align-items: center; gap: 28px; padding: 18px 0; }
.finding-reverse { grid-template-columns: .65fr 1.35fr; }
.finding-reverse .finding-copy { order: 2; } .finding-reverse .paper-figure { order: 1; justify-self: start; }
.finding-index { margin-bottom: 10px; }
.finding h3 { margin: 0; font-family: Georgia, serif; font-size: clamp(1.4rem, 2.3vw, 1.75rem); font-weight: 600; line-height: 1.14; letter-spacing: -.02em; }
.finding-copy > p:not(.finding-index), .artifact-grid .lead { color: var(--ink); }
.finding-copy strong { color: var(--ink); }
.paper-figure { max-width: 330px; border-radius: 1px; justify-self: end; }
.paper-figure img { width: 100%; max-height: 245px; object-fit: contain; background: #fff; }
.mini-metrics { display: flex; gap: 18px; margin-top: 16px; }
.mini-metrics span { color: var(--muted); font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; }
.mini-metrics b { display: block; margin-bottom: 1px; color: var(--ink); font-family: Georgia, serif; font-size: 1.3rem; font-weight: 400; letter-spacing: 0; }
.takeaway { display: grid; grid-template-columns: 150px 1fr; gap: 28px; margin-top: 10px; padding: 17px 19px; background: var(--surface); }
.takeaway h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; }
.takeaway p { max-width: 900px; margin: 0; color: var(--ink); font-size: .98rem; }
.paper-access-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: start; }
.paper-title { max-width: 620px; margin: 17px 0 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; line-height: 1.48; }
.paper-meta { margin: 8px 0 0; color: var(--muted); font-size: .8rem; }
.paper-release { padding: 18px 20px; background: var(--surface); }
.paper-release > span:first-child { color: var(--accent); font-size: .7rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.paper-release p { margin: 8px 0 14px; color: var(--ink); font-size: .86rem; }
.paper-release .actions { margin-top: 0; }
.paper-viewer { height: min(72vh, 720px); margin-top: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.paper-viewer iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.artifact-grid .lead { margin: 18px 0 0; }
.artifact-list { display: grid; gap: 13px; margin-top: 18px; }
.artifact-list div { display: grid; grid-template-columns: 88px 1fr; gap: 18px; padding: 0; }
.artifact-list span { color: var(--accent); font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.artifact-list p { margin: 0; color: var(--ink); font-size: .82rem; }
.citation h2 { margin-bottom: 20px; }
.citation .actions { margin: 0 0 12px; }
.code-wrap { position: relative; border: 1px solid var(--line); background: var(--code); }
.code-wrap pre { margin: 0; padding: 22px; overflow-x: auto; color: var(--ink); font: .75rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
#copy-citation { position: absolute; top: 10px; right: 10px; padding: 5px 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.about-author { max-width: 860px; margin-inline: auto; padding-top: 22px; }
.about-card { display: grid; grid-template-columns: 112px 1fr; gap: 24px; align-items: center; padding: 14px 0 18px; }
.about-photo { display: block; width: 108px; height: 108px; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.about-copy h2 { font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; }
.about-credentials { display: grid; gap: 2px; margin: 6px 0 10px; }
.about-credentials p { margin: 0; color: var(--muted); font-size: .77rem; line-height: 1.45; }
.about-credentials strong { color: var(--ink); font-weight: 700; }
.about-copy > p { max-width: 690px; margin: 0; color: var(--muted); font-size: .82rem; }
.about-links { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 11px; }
.about-links a { color: var(--ink); font-size: .72rem; font-weight: 700; }
footer { display: flex; justify-content: space-between; padding: 20px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: .7rem; }
footer p { margin: 0; } footer div { display: flex; gap: 18px; }
#lightbox { width: min(96vw, 1500px); max-width: none; max-height: 94vh; padding: 44px 16px 16px; border: 1px solid var(--line); background: var(--bg); }
#lightbox::backdrop { background: rgba(0,0,0,.86); backdrop-filter: blur(4px); }
#lightbox img { max-height: calc(94vh - 60px); margin: auto; background: #fff; object-fit: contain; }
.lightbox-close { position: absolute; top: 7px; right: 11px; border: 0; background: transparent; color: var(--ink); font-size: 1.5rem; cursor: pointer; }
@media (max-width: 800px) {
  .site-header nav { gap: 14px; }
  .site-header nav a:nth-child(2), .site-header nav a:nth-child(3), .site-header nav a:nth-child(5), .site-header nav a:nth-child(6) { display: none; }
  main, footer { width: min(calc(100% - 32px), var(--max)); }
  .hero { padding: 26px 0 22px; }
  .title-lockup { gap: 14px; }
  .hero-mark { width: 72px; height: 54px; }
  .hero h1 { font-size: clamp(1.65rem, 6.2vw, 2.3rem); }
  .wide-only { display: none; }
  .two-col, .section-head, .finding, .finding-reverse, .abstract-block, .takeaway, .paper-access-grid { grid-template-columns: 1fr; gap: 18px; }
  .measurement-teaser { grid-template-columns: 1fr; gap: 10px; }
  .measurement-teaser-link { justify-self: start; }
  .stat-grid, .layer-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid div:nth-child(2) { border-right: 0; }
  .stat-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .layer-card { min-height: 140px; }
  .finding-reverse .finding-copy, .finding-reverse .paper-figure { order: initial; }
  .paper-figure { max-width: 620px; justify-self: center; }
  .finding { padding: 26px 0; } .protocol-table { min-width: 740px; }
  .paper-viewer { height: 560px; }
  .about-card { grid-template-columns: 94px 1fr; gap: 18px; }
  .about-photo { width: 90px; height: 90px; }
}
@media (max-width: 520px) {
  body { font-size: 14px; } .site-header nav a:nth-child(3) { display: none; }
  .title-lockup { flex-direction: column; gap: 7px; }
  .hero-mark { width: 62px; height: 47px; }
  .hero h1 { text-align: center; }
  .site-header nav button { font-size: 0; } .site-header nav button span { font-size: .9rem; }
  .author-line { flex-wrap: wrap; } .section { padding: 32px 0; }
  .stat-grid, .layer-grid { grid-template-columns: 1fr; }
  .measurement-teaser-layers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .measurement-gap { display: none; }
  .measurement-layer { flex: none; }
  .stat-grid div { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat-grid div:last-child { border-bottom: 0; }
  .layer-card { min-height: auto; } .layer-card h3 { margin-top: 20px; }
  .about-card { grid-template-columns: 1fr; text-align: center; }
  .about-photo { margin-inline: auto; }
  .about-links { justify-content: center; }
  .mini-metrics { flex-direction: column; gap: 10px; } footer { flex-direction: column; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
