@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/inter-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/inter-medium.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/inter-bold.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/space-grotesk.ttf") format("truetype");
}

:root {
  --paper: #faf9f6;
  --surface: #fff;
  --ink: #282822;
  --muted: #525951;
  --line: #e4e2da;
  --accent: #ac4821;
  --soft: #f7ede3;
  --radius: 12px;
  --text-meta: 14px;
  --text-body: 16px;
  --text-heading: 24px;
  --text-title: 28px;
  --leading-body: 1.75;
  --leading-heading: 1.35;
  --leading-ui: 1.5;
  --section-space: 56px;
  --heading-indent: 36px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: var(--text-body);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 105px; }
body { margin: 0; font-size: var(--text-body); line-height: var(--leading-body); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
strong { font-weight: 700; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
::selection { background: #f1d2b8; }
.shell { width: min(1140px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 10; padding: 12px 18px; font-size: var(--text-meta); background: var(--surface); border: 1px solid var(--accent); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(250, 249, 246, .97); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: "Space Grotesk", "Inter", sans-serif; font-weight: 500; font-size: var(--text-heading); line-height: var(--leading-heading); letter-spacing: -.025em; }
.brand-mark { width: 28px; height: 28px; flex-shrink: 0; object-fit: contain; }
.site-header nav { display: flex; gap: 24px; font-size: var(--text-meta); font-weight: 500; line-height: var(--leading-ui); }
.site-header nav a, .header-paper, .site-footer > a:last-child { transition: color .15s; }
.site-header a:hover, .site-footer > a:hover { color: var(--accent); }
.header-paper { font-size: var(--text-meta); font-weight: 700; line-height: var(--leading-ui); }
.header-paper span { margin-left: 5px; }
.hero { width: min(1440px, calc(100% - 64px)); text-align: center; padding: 48px 0 40px; }
.eyebrow { color: var(--accent); margin: 0 0 16px; text-transform: uppercase; font-size: var(--text-meta); line-height: var(--leading-ui); font-weight: 500; letter-spacing: .08em; }
h1 { font-size: var(--text-title); line-height: var(--leading-heading); letter-spacing: -.025em; font-weight: 500; margin: 0 0 24px; }
h1 em { color: var(--accent); font-family: "Space Grotesk", "Inter", sans-serif; font-size: inherit; font-weight: 500; font-style: oblique 8deg; font-synthesis: style; letter-spacing: -.025em; margin-right: .16em; }
.authors { display: grid; gap: 8px; font-size: var(--text-body); line-height: var(--leading-ui); }
.author-row { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 20px; row-gap: 8px; }
.author-row > span, .affiliations span { white-space: nowrap; }
.authors a:hover { color: var(--accent); }
sup { font-size: var(--text-meta); margin-left: 2px; line-height: 0; }
.authors sup { color: var(--accent); }
.affiliations { display: grid; gap: 8px; font-size: var(--text-meta); color: var(--muted); margin: 24px auto 0; line-height: var(--leading-ui); }
.affiliations > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
.affiliations sup { margin-right: 4px; }
.contributions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; font-size: var(--text-meta); color: var(--muted); margin: 16px 0 24px; line-height: var(--leading-ui); }
.resource-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.resource-links a { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); padding: 12px 20px; min-height: 44px; border-radius: 8px; background: var(--surface); font-size: var(--text-meta); font-weight: 700; line-height: var(--leading-ui); transition: border-color .15s, background .15s; }
.resource-links svg { height: 18px; width: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.resource-links img { width: 18px; height: 18px; }
.resource-links a:hover { border-color: var(--accent); background: var(--soft); }
.resource-links .primary-link { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.resource-links .primary-link:hover { background: #45443b; }

.section { padding-top: var(--section-space); }
.overview { border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px 24px; margin-bottom: 24px; }
.section-heading > div { min-width: 0; }
h2 { display: flex; align-items: baseline; gap: 12px; font-size: var(--text-heading); line-height: var(--leading-heading); letter-spacing: -.02em; font-weight: 500; margin: 0; }
h2 > span:last-child { min-width: 0; }
.section-number { flex: 0 0 24px; color: var(--accent); font-family: "Space Grotesk", "Inter", sans-serif; font-size: var(--text-meta); font-weight: 500; letter-spacing: 0; }
.section-hint { font-size: var(--text-body); color: var(--muted); line-height: var(--leading-body); text-align: left; margin: 8px 0 0 var(--heading-indent); }
.section-link { align-self: start; font-size: var(--text-meta); line-height: var(--leading-ui); color: var(--accent); margin-top: 4px; }
h3 { font-size: var(--text-body); font-weight: 700; line-height: var(--leading-ui); margin: 0; }
.overview-summary { max-width: 90ch; margin: 0; color: var(--muted); }
.click-idea { margin: 24px 0 0; padding: 16px 20px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--soft); font-size: var(--text-body); line-height: var(--leading-body); }
.click-idea strong { color: var(--accent); }
.metrics { margin: 24px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 24px 0; border-block: 1px solid var(--line); }
.metrics > div { display: flex; flex-direction: column; gap: 8px; padding-left: 24px; border-left: 1px solid var(--line); }
.metrics > div:first-child { padding-left: 0; border: 0; }
.metrics strong { font-size: var(--text-heading); line-height: var(--leading-heading); font-weight: 500; letter-spacing: -.02em; }
.metrics strong span { color: var(--accent); font-size: var(--text-body); letter-spacing: 0; }
.metrics > div > span { color: var(--muted); font-size: var(--text-meta); line-height: var(--leading-ui); }
.paper-figure { margin: 0; }
.paper-figure > a { display: block; background: var(--surface); padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); }
.paper-figure img { width: 100%; height: auto; display: block; }
.paper-figure figcaption, .media-caption { color: var(--muted); margin: 12px 0 0; font-size: var(--text-meta); line-height: var(--leading-body); }
.reading-width { max-width: 90ch; margin: 0; }
.abstract-band .reading-width > p:last-child { margin: 0; color: var(--muted); font-size: var(--text-body); line-height: var(--leading-body); }
.method-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.method-steps article { padding-top: 16px; border-top: 1px solid var(--line); }
.step-number { display: inline-block; color: var(--accent); margin-bottom: 8px; font-size: var(--text-meta); font-weight: 500; }
.method-steps p { color: var(--muted); font-size: var(--text-body); line-height: var(--leading-body); margin: 8px 0 0; }

.video-card, .gallery-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.video-heading { padding: 24px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.video-heading p { margin: 8px 0 0; font-size: var(--text-meta); line-height: var(--leading-ui); color: var(--muted); }
.carousel-buttons { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.round-button { width: 44px; height: 44px; padding: 10px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.round-button:hover { color: var(--accent); background: var(--soft); border-color: var(--accent); }
.round-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#video-count { font-size: var(--text-meta); font-variant-numeric: tabular-nums; color: var(--muted); min-width: 46px; text-align: center; }
.video-stage { aspect-ratio: 16 / 9; background: #161916; }
.video-stage video { display: block; width: 100%; height: 100%; object-fit: contain; }
.video-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; }
.video-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.video-tab { border: 1px solid transparent; background: transparent; padding: 10px 12px; border-radius: 8px; color: var(--muted); font-size: var(--text-meta); line-height: var(--leading-ui); min-height: 44px; }
.video-tab:hover { background: var(--paper); }
.video-tab[aria-pressed="true"] { color: var(--accent); border-color: #efddcd; background: var(--soft); }
#video-original { font-size: var(--text-meta); color: var(--accent); padding: 10px 0; }
.media-error { font-size: var(--text-meta); color: #a13124; margin: 0; padding: 8px 24px 16px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: var(--text-body); line-height: var(--leading-ui); font-variant-numeric: tabular-nums; white-space: nowrap; }
caption { text-align: left; padding: 16px 20px 0; font-size: var(--text-meta); color: var(--muted); }
th, td { padding: 16px; text-align: right; }
th:first-child { text-align: left; padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
thead th { font-size: var(--text-meta); font-weight: 500; border-bottom: 1px solid var(--line); color: var(--muted); }
tbody tr + tr { border-top: 1px solid var(--line); }
tbody th { font-weight: 500; }
tbody tr:last-child { background: #fbf5ee; }
tbody .mean { color: var(--accent); font-weight: 700; }
tbody a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gallery-toolbar { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 4px; }
.filters button { background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 10px 12px; min-height: 44px; font-size: var(--text-meta); line-height: var(--leading-ui); color: var(--muted); }
.filters button:hover { background: var(--paper); }
.filters button[aria-pressed="true"] { color: var(--accent); background: var(--soft); border-color: #efddcd; }
#case-count { font-size: var(--text-meta); color: var(--muted); white-space: nowrap; }
.case-scroll { height: min(72vh, 760px); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #92978a #eeeee7; background: #f1f1eb; }
.case-scroll::-webkit-scrollbar { width: 10px; }
.case-scroll::-webkit-scrollbar-track { background: #eeeee7; }
.case-scroll::-webkit-scrollbar-thumb { border: 2px solid #eeeee7; border-radius: 12px; background: #92978a; }
.case-list { display: grid; gap: 16px; padding: 16px; }
.case-card { margin: 0; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.case-card figcaption { padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
.case-number { font-variant-numeric: tabular-nums; font-size: var(--text-meta); font-weight: 500; color: var(--accent); }
.case-type { font-size: var(--text-meta); margin-left: auto; color: var(--muted); }
.case-card a, .case-card img { display: block; }
.case-card img { width: 100%; height: auto; }
.comparison { border-top: 1px solid var(--line); }
.comparison summary { cursor: pointer; color: var(--muted); font-size: var(--text-meta); padding: 12px 20px; min-height: 44px; }
.comparison summary:hover, .comparison[open] summary { color: var(--accent); }
.gallery-footer { display: flex; justify-content: space-between; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--text-meta); line-height: var(--leading-ui); }
.citation-section { padding-bottom: 48px; }
.copy-button { justify-self: end; background: var(--surface); border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; font-size: var(--text-meta); line-height: var(--leading-ui); min-height: 44px; }
.copy-button:hover { color: var(--accent); border-color: var(--accent); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; padding: 24px; background: #efeee8; border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--text-meta); line-height: var(--leading-body); color: #51534a; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: inherit; }
#copy-status { min-height: 1.75em; }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 24px 0 32px; border-top: 1px solid var(--line); }
.site-footer p, .site-footer > a:last-child { font-size: var(--text-meta); color: var(--muted); margin: 0; }

@media (max-width: 900px) {
  .method-steps { gap: 20px; }
  .metrics > div { padding-left: 16px; }
}

@media (max-width: 640px) {
  :root { --section-space: 40px; }
  .shell, .hero { width: calc(100% - 32px); }
  .header-inner { min-height: 66px; gap: 12px 20px; flex-wrap: wrap; padding-block: 12px; }
  .site-header nav { width: 100%; order: 3; justify-content: space-between; gap: 16px; }
  .header-paper { display: inline-flex; }
  .hero { padding: 32px 0; }
  .author-row { gap: 8px 16px; }
  .affiliations > div { gap: 8px 16px; }
  .affiliations span { white-space: normal; }
  .contributions { gap: 8px 16px; }
  .resource-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(420px, 100%); gap: 8px; margin-inline: auto; }
  .resource-links a { padding: 10px 12px; gap: 8px; }
  .section-heading { grid-template-columns: minmax(0, 1fr); }
  .section-link, .section-heading > .copy-button { justify-self: start; margin: 0 0 0 var(--heading-indent); }
  .metrics { gap: 12px; padding: 20px 0; }
  .metrics > div { padding-left: 12px; }
  .click-idea { padding: 16px; }
  .paper-figure > a { padding: 8px; }
  .video-heading { padding: 16px; flex-wrap: wrap; gap: 16px; }
  .video-heading > div:first-child { width: 100%; }
  .carousel-buttons { width: 100%; justify-content: space-between; }
  .video-footer { padding: 12px; }
  .video-tabs { gap: 0; }
  .video-tab { padding-inline: 8px; }
  .method-steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .gallery-toolbar { padding: 12px; flex-wrap: wrap; gap: 8px; }
  .filters { gap: 0; }
  .filters button { padding-inline: 8px; }
  #case-count { padding-inline: 8px; }
  .case-scroll { height: 66vh; }
  .case-list { padding: 8px; }
  .case-card figcaption { padding: 12px; }
  .case-type { display: none; }
  .comparison summary { padding-inline: 12px; }
  .gallery-footer { padding: 12px; }
  .gallery-footer > span:last-child { text-align: right; max-width: 110px; }
  pre { padding: 16px; }
  .site-footer { padding-bottom: 24px; }
  .site-footer p { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
