/* Image2Mesh: a source-led, progressively enhanced research page. */
:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #172333;
  --muted: #596678;
  --teal: #075e61;
  --teal-soft: #eaf5f4;
  --line: #dfe6e9;
  --lavender: #7164aa;
  --space: clamp(24px, 4vw, 64px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 108px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Inter", "Helvetica Neue", "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--lavender); outline-offset: 5px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }
img { display: block; max-width: 100%; height: auto; }
figure, p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 730; line-height: 1.1; letter-spacing: -.045em; }
h2 { font-size: clamp(32px, 3.55vw, 54px); }
h3 { font-size: clamp(24px, 2.1vw, 30px); }
[hidden] { display: none !important; }
.shell { width: min(1600px, 100%); margin-inline: auto; padding-inline: var(--space); }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; vertical-align: middle; }
.play-icon { width: 16px; height: 16px; fill: currentColor; stroke-width: 1; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 12px 24px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform: scaleX(0); transform-origin: left; z-index: 50; background: var(--teal); pointer-events: none; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.97); border-bottom: 1px solid rgba(223,230,233,.75); }
.header-inner { display: flex; align-items: center; min-height: 72px; gap: 32px; }
.wordmark { color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.wordmark span { font-weight: 420; }
.nav-links { display: flex; align-items: center; margin-left: auto; gap: 30px; }
.nav-links a { font-size: 14px; text-decoration: none; color: var(--ink); }
.nav-links a:hover, .nav-links a.active { color: var(--teal); text-decoration: underline; text-underline-offset: 8px; }
.nav-paper { display: inline-flex; align-items: center; justify-content: center; gap: 18px; border: 1px solid var(--teal); border-radius: 4px; padding: 6px 19px; font-size: 14px; text-decoration: none; }
.hero { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(32px, 4vw, 70px); align-items: center; padding-block: 48px; }
.hero-copy, .hero-details { min-width: 0; }
.hero h1 { font-size: clamp(52px, 6.25vw, 88px); letter-spacing: -.065em; line-height: .99; font-weight: 780; }
.hero h1 span { color: var(--teal); }
.hero-subtitle { color: var(--muted); font-size: clamp(18px, 1.6vw, 23px); line-height: 1.4; max-width: 30em; letter-spacing: -.025em; }
.authors { margin-top: 25px; font-size: 14px; line-height: 1.7; }
.authors a { color: var(--ink); font-weight: 650; }
.affiliations { margin-top: 6px; font-size: 13px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-height: 48px; padding: 11px 22px; border: 1px solid var(--teal); border-radius: 4px; background: #fff; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 650; line-height: 1.4; transition: background .18s, color .18s, transform .18s; }
.button:hover { background: var(--teal-soft); text-decoration: none; transform: translateY(-2px); }
.button.primary { background: var(--teal); color: #fff; }
.button.primary:hover { background: #064b4d; }
.survey-strip { display: flex; justify-content: space-between; align-items: center; gap: 22px; padding-block: 24px; position: relative; }
.survey-strip::before { content: ""; height: 1px; background: var(--teal); position: absolute; top: 0; left: var(--space); right: var(--space); }
.survey-strip p { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.survey-strip > div { display: flex; flex-wrap: wrap; gap: 0; }
.survey-strip a { font-size: 13px; text-decoration: none; padding-inline: 18px; border-left: 1px solid var(--line); line-height: 1.3; }
.survey-strip a:first-child { border: 0; }
.survey-strip a:last-child { padding-right: 0; }
.survey-strip a:hover { text-decoration: underline; }
.section { padding-block: 88px; border-top: 1px solid var(--line); }
.survey-strip + .section { padding-top: 48px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.section-heading p { margin-top: 16px; color: var(--muted); font-size: 18px; letter-spacing: -.018em; line-height: 1.5; max-width: 48em; }
.section-number { font-size: 10px; line-height: 1.4; font-weight: 550; color: var(--muted); letter-spacing: .13em; white-space: nowrap; padding-top: 9px; }
.reading-copy { max-width: 900px; color: var(--muted); line-height: 1.8; margin-bottom: 32px; }
.source-figure { background: #fff; }
.source-figure > a, .method-figure > a { display: block; position: relative; padding: 22px; border: 1px solid var(--line); border-radius: 3px; background: #fff; overflow: hidden; }
.source-figure img { margin-inline: auto; width: 100%; }
.source-figure figcaption, .video-figure figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 22px; color: var(--muted); font-size: 12px; padding-top: 13px; }
figcaption a { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
figcaption .icon { width: 16px; height: 16px; }
.zoom-affordance { display: inline-flex; position: absolute; bottom: 14px; right: 14px; padding: 6px 10px; align-items: center; gap: 7px; background: rgba(255,255,255,.96); color: var(--teal); border: 1px solid var(--line); border-radius: 3px; font-size: 11px; line-height: 1.5; opacity: 0; transform: translateY(3px); transition: opacity .18s, transform .18s; }
a:hover > .zoom-affordance, a:focus-visible > .zoom-affordance { opacity: 1; transform: none; }
.zoom-affordance .icon { width: 15px; height: 15px; }
.method-section { background: #fbfcfc; }
.method-explorer { display: grid; grid-template-columns: 310px minmax(0, 1fr); border: 1px solid var(--line); background: #fff; margin-top: 34px; }
.method-tabs { border-right: 1px solid var(--line); }
.method-tabs button { width: 100%; display: flex; align-items: center; gap: 18px; padding: 28px 24px; min-height: 106px; background: #fff; border: none; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; text-align: left; font-size: 18px; font-weight: 620; letter-spacing: -.025em; }
.method-tabs button > span:first-child { color: var(--muted); font-size: 18px; font-weight: 500; }
.method-tabs small { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; font-weight: 400; letter-spacing: 0; margin-top: 5px; }
.method-tabs .icon { margin-left: auto; width: 17px; }
.method-tabs button:hover { background: #f7faf9; }
.method-tabs [aria-selected="true"] { background: var(--teal-soft); border-left-color: var(--teal); }
.method-tabs [aria-selected="true"] > span:first-child { color: var(--teal); }
.method-panel { padding: 30px; min-height: 445px; }
.method-panel:not([hidden]), .evidence-panel:not([hidden]) { animation: panel-enter .28s ease-out; }
@keyframes panel-enter { from { opacity: .3; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.method-panel > p { margin-top: 14px; color: var(--muted); font-size: 15px; line-height: 1.7; max-width: 65em; }
.subcategories { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; }
.subcategories button { padding: 6px 0; border: 0; border-bottom: 2px solid transparent; font-size: 13px; line-height: 1.5; color: var(--muted); background: transparent; }
.subcategories button.selected { color: var(--teal); border-bottom-color: var(--teal); font-weight: 650; }
.subcategories button:hover { color: var(--teal); }
.method-figure { margin-top: 18px; }
.method-figure > a { height: 210px; padding: 20px; display: grid; place-items: center; }
.method-figure img { width: 100%; height: 100%; max-height: 168px; object-fit: contain; }
.method-panel .method-tradeoff { font-size: 12px; margin-top: 20px; }
.method-tradeoff strong { color: var(--teal); padding-right: 8px; font-weight: 650; }
.figure-details { margin-top: 28px; border-block: 1px solid var(--line); }
.figure-details summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 20px; padding: 22px 0; color: var(--teal); font-size: 14px; font-weight: 620; }
.figure-details summary::-webkit-details-marker { display: none; }
.figure-details summary > span { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 400; }
.figure-details summary > .icon { width: 17px; }
.figure-details[open] { padding-bottom: 28px; }
.taxonomy-figure { max-width: 1000px; margin: 0 auto; }
.taxonomy-overview { margin-top: 42px; }
.prisma-figure { max-width: 640px; margin: 0 auto; }
.evidence-tabs { display: flex; gap: 10px; margin-bottom: 22px; }
.evidence-tabs button { border: 1px solid var(--line); color: var(--muted); background: #fff; border-radius: 4px; padding: 10px 26px; font-size: 13px; font-weight: 600; }
.evidence-tabs button[aria-selected="true"] { background: var(--teal); color: #fff; border-color: var(--teal); }
.evidence-note { margin-top: 24px; padding: 18px 24px; border-left: 3px solid var(--teal); background: #f3f8f8; }
.evidence-note strong { font-size: 13px; font-weight: 650; color: var(--teal); }
.evidence-note p { margin-top: 5px; font-size: 13px; color: var(--muted); max-width: 85em; }
.video-section { background: #fbfcfc; }
.video-figure video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0e1519; object-fit: contain; border-radius: 3px; }
.video-error { margin-top: 15px; color: var(--muted); }
.muted { color: var(--muted); font-weight: 400; padding-left: 8px; }
.questions { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 42px; gap: 40px; }
.questions article { padding-right: 36px; border-right: 1px solid var(--line); }
.questions article:last-child { border: none; padding-right: 0; }
.questions article > span { color: var(--lavender); font-size: 18px; }
.questions h3 { color: var(--teal); margin-top: 10px; font-size: 28px; letter-spacing: -.035em; }
.questions p { margin-top: 15px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.challenge-figure { margin-top: 42px; }
.legacy-gallery > p { color: var(--muted); font-size: 13px; max-width: 800px; margin-bottom: 24px; }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.archive-grid a { display: flex; height: 150px; align-items: center; justify-content: center; padding: 14px; border: 1px solid var(--line); background: #fff; }
.archive-grid img { max-height: 120px; width: 100%; object-fit: contain; }
.archive-grid figcaption { font-size: 12px; color: var(--muted); padding-top: 8px; }
.citation-section { background: #f3f7f7; padding-block: 76px; border-top: 1px solid var(--line); }
.citation-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: center; }
.citation-layout h2 { font-size: clamp(32px, 3vw, 44px); }
.citation-layout p { color: var(--muted); font-size: 15px; margin-top: 20px; }
.citation-layout pre { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; padding: 24px; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 5px; color: #415367; font-size: 11px; line-height: 1.7; }
.citation-layout code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.citation-layout .copy-status { font-size: 12px; min-height: 20px; margin-top: 9px; }
.text-link { font-size: 12px; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.text-link .icon { width: 15px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 110px; }
.site-footer a { color: var(--ink); text-decoration: none; font-size: 13px; }
.site-footer > a { font-weight: 650; }
.site-footer > div { display: flex; align-items: center; gap: 30px; }
.site-footer .icon { width: 16px; margin-left: 8px; }
dialog { position: fixed; inset: 0; padding: 0; width: min(1500px, 94vw); max-width: 94vw; max-height: 94vh; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; }
dialog::backdrop { background: rgba(13,25,33,.78); }
.dialog-toolbar { display: flex; align-items: center; gap: 24px; padding: 16px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.dialog-toolbar p { font-size: 13px; max-width: 70%; line-height: 1.5; }
.dialog-toolbar > a { margin-left: auto; flex-shrink: 0; font-size: 12px; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.close-dialog { display: grid; place-items: center; width: 38px; height: 38px; padding: 8px; border: 1px solid var(--line); background: #fff; border-radius: 3px; flex-shrink: 0; }
.dialog-image { padding: 24px; overflow: auto; }
.dialog-image img { margin: auto; width: auto; max-width: 100%; max-height: 76vh; object-fit: contain; }
@media (min-width: 1600px) { .hero { padding-block: 80px; } }
@media (max-width: 1100px) {
  .header-inner { gap: 24px; }
  .nav-links { gap: 22px; }
  .hero { grid-template-columns: 1fr 1fr; gap: 32px; }
  .hero h1 { font-size: 64px; }
  .survey-strip { align-items: flex-start; flex-direction: column; gap: 15px; }
  .survey-strip a:first-child { padding-left: 0; }
  .method-explorer { grid-template-columns: 255px minmax(0, 1fr); }
  .method-tabs button { padding: 26px 16px; gap: 12px; font-size: 16px; }
  .method-tabs small { font-size: 10px; }
  .method-panel { padding: 26px; }
  .citation-layout { gap: 40px; }
  .questions { gap: 26px; }
  .questions article { padding-right: 24px; }
}
@media (max-width: 800px) {
  html { scroll-padding-top: 100px; }
  .header-inner { min-height: 72px; gap: 14px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
  .wordmark { font-size: 16px; }
  .nav-paper { margin-left: auto; padding: 5px 12px; }
  .nav-paper .icon { width: 16px; }
  .nav-links { order: 3; width: 100%; margin: 0; justify-content: space-between; gap: 12px; }
  .nav-links a { font-size: 12px; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 45px; padding-bottom: 38px; }
  .hero h1 { font-size: clamp(54px, 10.5vw, 78px); }
  .hero-subtitle { font-size: 21px; max-width: 520px; }
  .authors { font-size: 12px; max-width: 560px; }
  .section { padding-block: 60px; }
  .section-heading { gap: 20px; }
  .section-heading p { font-size: 16px; }
  .section-number { font-size: 9px; padding-top: 6px; }
  .method-explorer { grid-template-columns: 1fr; }
  .method-tabs { display: grid; grid-template-columns: repeat(2, 1fr); border-right: none; }
  .method-tabs button { min-height: 80px; padding: 16px; gap: 14px; font-size: 15px; }
  .method-tabs button:nth-child(odd) { border-right: 1px solid var(--line); }
  .method-tabs small { font-size: 10px; }
  .method-tabs .icon { display: none; }
  .method-panel { min-height: 415px; padding: 26px; }
  .citation-layout { grid-template-columns: 1fr; gap: 30px; }
  .citation-section { padding-block: 56px; }
  .questions { gap: 25px; }
  .questions h3 { font-size: 23px; }
  .questions p { font-size: 13px; }
  .questions article { padding-right: 18px; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 500px) {
  :root { --space: 22px; }
  html { scroll-padding-top: 115px; }
  .hero h1 { font-size: 59px; }
  .hero-subtitle { font-size: 19px; }
  .actions { gap: 10px; }
  .button { font-size: 13px; padding: 11px 15px; gap: 12px; }
  .survey-strip p { font-size: 14px; }
  .survey-strip a { padding-inline: 11px; font-size: 10px; }
  .section-heading { flex-direction: column-reverse; gap: 12px; }
  .section-heading p { font-size: 15px; }
  .section-number { padding-top: 0; }
  .reading-copy { font-size: 14px; }
  .source-figure > a { padding: 10px; }
  .source-figure figcaption, .video-figure figcaption { font-size: 10px; }
  .source-figure figcaption .icon, .video-figure figcaption .icon { width: 13px; }
  .zoom-affordance { opacity: 1; transform: none; bottom: 7px; right: 7px; font-size: 9px; padding: 3px 6px; }
  .method-tabs button { padding: 14px 10px; font-size: 13px; gap: 10px; }
  .method-tabs button > span:first-child { font-size: 14px; }
  .method-tabs small { font-size: 9px; }
  .method-panel { padding: 22px 16px; min-height: 445px; }
  .method-panel > p { font-size: 14px; }
  .method-figure > a { height: 180px; padding: 12px; }
  .method-figure img { max-height: 154px; }
  .method-panel .method-tradeoff { font-size: 11px; }
  .subcategories { gap: 8px 16px; }
  .subcategories button { font-size: 11px; }
  .figure-details summary { font-size: 12px; gap: 14px; }
  .figure-details summary > span { display: none; }
  .figure-details summary > .icon { margin-left: auto; }
  .evidence-note { padding: 16px; }
  .evidence-note p { font-size: 12px; }
  .evidence-tabs button { padding: 9px 20px; }
  .questions { grid-template-columns: 1fr; gap: 28px; margin-top: 30px; }
  .questions article { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 24px 38px; position: relative; }
  .questions article > span { position: absolute; left: 0; top: 0; font-size: 14px; }
  .questions h3 { margin-top: 0; font-size: 25px; }
  .questions p { font-size: 14px; margin-top: 10px; }
  .archive-grid { gap: 20px 14px; }
  .archive-grid a { height: 100px; padding: 8px; }
  .archive-grid img { max-height: 82px; }
  .archive-grid figcaption { font-size: 10px; }
  .site-footer { min-height: 100px; }
  .site-footer > div { gap: 15px; }
  .site-footer a { font-size: 12px; }
  .dialog-toolbar { padding: 12px; gap: 10px; flex-wrap: wrap; }
  .dialog-toolbar p { max-width: calc(100% - 50px); font-size: 12px; flex: 1; }
  .dialog-toolbar > a { order: 3; margin-left: 0; font-size: 11px; }
  .dialog-image { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
