:root { color-scheme: light; --ink: #363636; --muted: #666; --link: #2679b8; --line: #dedede; --light: #f5f5f5; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: #fff; color: var(--ink); font-family: 'Noto Sans', Arial, sans-serif; font-size: 16px; line-height: 1.65; }
[hidden] { display: none !important; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, a, summary, [tabindex] { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #268bc7; outline-offset: 4px; }
button { font: inherit; cursor: pointer; }
.container { width: min(960px, calc(100% - 48px)); margin-inline: auto; }
.narrow { max-width: 780px; }
p { margin: 0 0 1.15rem; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; color: #303030; }
h1 { margin: 0 0 25px; font-size: 43px; letter-spacing: -1.4px; }
h2 { font-size: 30px; margin: 0 0 24px; letter-spacing: -.65px; }
h3 { font-size: 22px; margin: 0 0 14px; letter-spacing: -.35px; }
h4 { font-size: 15px; margin: 0 0 9px; }
sup { font-size: .65em; margin-left: 2px; }
.centered { text-align: center; }
.site-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 26px; min-height: 52px; align-items: center; font-size: 14px; }
.site-nav a { color: #555; padding: 8px 0; }
.site-nav a:first-child { font-weight: 700; }
.publication-header { text-align: center; padding-top: 30px; padding-bottom: 30px; }
.project-name { display: block; font-size: 51px; letter-spacing: -1.7px; margin-bottom: 8px; }
.publication-links { display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 41px; padding: 7px 19px; border-radius: 999px; background: #363636; color: #fff; line-height: 1.3; }
.pill:hover { background: #202020; text-decoration: none; }
.pill svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.teaser { padding-top: 9px; padding-bottom: 33px; }
.teaser-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.media-item { min-width: 0; text-align: center; }
.media-item h4 { font-weight: 500; }
video { display: block; width: 100%; height: auto; border-radius: 5px; background: #f0f0f0; }
.teaser video { aspect-ratio: 4/3; }
.teaser-message { text-align: center; font-size: 20px; line-height: 1.55; margin: 23px auto 4px; max-width: 910px; }
.teaser-message strong { font-weight: 600; }
.text-button { color: #666; font-size: 13px; padding: 4px 9px; background: transparent; border: 1px solid #ccc; border-radius: 5px; }
.text-button:hover { color: #222; background: #ededed; }
.section { padding: 48px 0; }
.abstract-section { padding-top: 37px; padding-bottom: 37px; background: #f5f5f5; }
.abstract-section p { text-align: justify; }
.section-intro { margin: -6px 0 30px; }
.diagram { display: block; width: 100%; height: auto; }
.diagram-link { display: block; margin: 29px auto 33px; }
.method-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 26px; }
.method-columns h3 { font-size: 19px; text-align: center; }
.method-columns p { font-size: 15px; }
.research-details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 24px; }
summary { padding: 14px 0; cursor: pointer; font-weight: 500; }
.details-body { padding: 6px 0 23px; }
.demonstration-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; }
.demonstration-copy p { font-size: 15px; }
.hardware { margin-top: 28px; }
.light-section { background: var(--light); }
.condition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
.condition-grid video { aspect-ratio: 4/3; }
.tab-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 22px 0 26px; }
.tab-list button { border: 1px solid #d1d1d1; border-radius: 999px; background: #fff; color: #505050; padding: 8px 17px; font-size: 14px; line-height: 1.4; }
.tab-list button[aria-selected="true"] { background: #363636; color: white; border-color: #363636; }
.tab-list button:hover:not([aria-selected="true"]) { background: #e9e9e9; }
.tab-panel { margin-top: 24px; }
.tabs.enhanced .tab-panel { margin-top: 0; }
.tabs.enhanced .fallback-title { display: none; }
.comparison-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.comparison-grid h4 { min-height: 38px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.comparison-grid video { aspect-ratio: 16/15; }
.ours h4 { color: #226b50; font-weight: 700; }
.ours video { outline: 2px solid #659480; outline-offset: 2px; }
.egg-grid video { aspect-ratio: 342/962; }
.mobile-hint { display: none; }
.subsection-title { margin-top: 40px; }
.small-text { color: var(--muted); font-size: 13px; margin: 19px 0 0; }
.table-scroll { overflow-x: auto; margin: 25px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: center; line-height: 1.5; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); }
thead { border-top: 2px solid #666; border-bottom: 2px solid #666; }
th:first-child { text-align: left; width: 43%; }
thead th:not(:first-child) { min-width: 115px; }
tbody th { font-weight: 400; }
table small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.result-ours { background: #edf4ef; border-bottom: 2px solid #666; }
.result-ours th { font-weight: 700; }
#results .small-text { margin-bottom: 21px; }
.wiping-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.wiping-grid video { aspect-ratio: 16/9; }
pre { overflow-x: auto; background: #f5f5f5; padding: 22px; border-radius: 4px; margin: 0; font-size: 13px; line-height: 1.65; }
footer { background: #fafafa; padding: 36px 0; text-align: center; font-size: 13px; color: #666; }
footer p { margin-bottom: 5px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 5; padding: 10px; background: white; }
@media (max-width: 760px) {
  h1 { font-size: 35px; letter-spacing: -.8px; }
  h2 { font-size: 27px; }
  .project-name { font-size: 44px; }
  .desktop-break { display: none; }
  .method-columns { grid-template-columns: 1fr; gap: 10px; }
  .demonstration-layout { grid-template-columns: 1fr; gap: 22px; }
  .comparison-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; }
  .egg-grid { grid-template-columns: repeat(5, minmax(115px, 1fr)); overflow-x: auto; padding: 4px 4px 12px; }
  .egg-grid video { max-height: 360px; }
  .mobile-hint { display: block; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
  .teaser-message { font-size: 18px; }
  .condition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .abstract-section p { text-align: left; }
}
@media (max-width: 480px) {
  .container { width: calc(100% - 32px); }
  .site-nav { gap: 21px; font-size: 13px; }
  .publication-header { padding-top: 24px; padding-bottom: 23px; }
  h1 { font-size: 29px; letter-spacing: -.6px; margin-bottom: 21px; }
  .project-name { font-size: 43px; }
  .pill { padding: 8px 14px; font-size: 14px; }
  .teaser-grid { gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .teaser-grid h4 { font-size: 11px; min-height: 27px; }
  .teaser-message { font-size: 17px; margin-top: 18px; }
  .teaser-message br { display: none; }
  .teaser-message strong { display: block; margin-bottom: 9px; }
  .section { padding: 36px 0; }
  h2 { font-size: 25px; }
  h3 { font-size: 21px; }
  .condition-grid { gap: 21px 12px; }
  .condition-grid h4 { font-size: 13px; min-height: 31px; }
  .comparison-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .egg-grid { grid-template-columns: repeat(5, 120px); }
  .wiping-grid { grid-template-columns: 1fr; gap: 22px; }
  .tab-list { gap: 7px; }
  .tab-list button { padding: 8px 12px; font-size: 12px; }
  pre { font-size: 11px; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 480px) {
  .teaser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .teaser-grid .media-item:first-child { grid-column: 1 / -1; }
  .teaser-grid h4 { font-size: 13px; min-height: auto; }
}
/* Anonymous, compact publication page. */
.publication-header { padding-top: 52px; padding-bottom: 24px; }
.pill { border: 0; }
.pill:disabled { opacity: .55; cursor: default; }
.pill:disabled:hover { background: #363636; }
.pill svg.github-icon { fill: currentColor; stroke: none; }
.lead-demo { padding-top: 20px; padding-bottom: 32px; }
.lead-demo h2 { font-size: 28px; line-height: 1.3; margin-bottom: 18px; }
.lead-demo .section-intro { max-width: 740px; }
.comparison-details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 24px; }
.comparison-details summary { font-size: 15px; }
.comparison-details[open] { padding-bottom: 20px; }
@media (max-width: 480px) {
  .publication-header { padding-top: 32px; }
  .lead-demo h2 { font-size: 24px; }
}
.cup-teaser { padding: 14px 0 30px; }
.cup-teaser figure { margin: 0; }
.cup-teaser figcaption { margin: 4px auto 24px; max-width: 900px; text-align: center; font-size: 19px; line-height: 1.5; }
.full-video-section { padding-bottom: 28px; }
#full-video { aspect-ratio: 16 / 9; }
.generalization-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.condition-comparison { min-width: 0; }
.condition-comparison h3 { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 15px; min-height: 38px; margin-bottom: 15px; }
.condition-comparison .media-item + .media-item { margin-top: 19px; }
.condition-comparison h4 { font-size: 13px; }
.condition-comparison video { aspect-ratio: 16 / 9; }
@media (max-width: 900px) {
  .generalization-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
}
@media (max-width: 480px) {
  .cup-teaser figcaption { font-size: 16px; }
  .generalization-grid { grid-template-columns: 1fr; gap: 26px; }
  .condition-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .condition-comparison h3 { grid-column: 1 / -1; min-height: auto; margin: 0; }
  .condition-comparison .media-item + .media-item { margin-top: 0; }
}
/* One method label per row; conditions share a common column header. */
.generalization-matrix { display: grid; grid-template-columns: 125px repeat(4, minmax(0, 1fr)); gap: 20px 16px; align-items: center; }
.generalization-matrix .method-heading { grid-column: 1; grid-row: calc(var(--method) + 1); font-size: 14px; line-height: 1.5; letter-spacing: 0; margin: 0; }
.generalization-matrix .ours-label { color: #226b50; }
.generalization-matrix .condition-heading { grid-column: calc(var(--condition) + 1); grid-row: 1; text-align: center; font-size: 14px; line-height: 1.4; letter-spacing: 0; margin: 0; }
.generalization-matrix .media-item { grid-column: calc(var(--condition) + 1); grid-row: calc(var(--method) + 1); }
.generalization-matrix video { aspect-ratio: 16 / 9; }
@media (max-width: 760px) {
  .generalization-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
  .generalization-matrix .method-heading { grid-row: 1; grid-column: var(--method); text-align: center; }
  .generalization-matrix .condition-heading { grid-column: 1 / -1; grid-row: calc(var(--condition) * 2); margin-top: 12px; }
  .generalization-matrix .media-item { grid-column: var(--method); grid-row: calc(var(--condition) * 2 + 1); }
}

/* Keep the six cup clips in two rows; color identifies the contact shift. */
.cup-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 12px; font-size: 13px; }
.cup-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.cup-legend i { display: inline-block; width: 14px; height: 14px; border: 1px solid #0002; border-radius: 3px; }
.cup-nominal { background: #f0f0f0; }
.cup-geometry { background: #e2edfc; }
.cup-material { background: #e3f2e6; }
.cup-condition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cup-condition-grid .media-item { padding: 8px; border-radius: 6px; }
.cup-condition-grid h4 { display: flex; justify-content: center; align-items: center; min-height: 20px; margin-bottom: 8px; }
.cup-condition-grid video { aspect-ratio: 4 / 3; }
@media (max-width: 600px) {
  .cup-legend { font-size: 11px; gap: 5px 12px; }
  .cup-condition-grid { gap: 7px; }
  .cup-condition-grid .media-item { padding: 4px; }
  .cup-condition-grid h4 { font-size: 10px; min-height: 27px; margin-bottom: 5px; }
}

/* Show the benefit as the result of contact factorization. */
.framing-caption { display: flex; flex-direction: column; align-items: center; gap: 0; font-weight: 400; }
.framing-principle { max-width: 820px; }
.framing-connector { width: 40px; height: 36px; margin: 10px 0; flex: none; fill: #4b6479; }
.framing-outcome { font-weight: 400; }

/* Compact tables for the contact factor estimation details: surface heights, then estimators. */
.estimation-details { margin: 6px 0 0; }
.estimation-table { text-align: left; border-top: 2px solid #666; border-bottom: 2px solid #666; }
.estimation-table th:first-child { width: 26%; }
.estimation-table th[scope="row"] { font-weight: 600; }
.estimation-table th, .estimation-table td { padding: 8px 12px; vertical-align: middle; }
.estimation-table thead th { min-width: 0; }
.estimation-details .katex { font-size: 1.08em; }.estimation-details .math { white-space: nowrap; }
.surface-rows td:nth-child(2) .math { white-space: normal; }
.estimation-details .small-text { margin: 0 0 8px; }
.surface-rows tr:last-child > * { border-bottom: 1px solid #666; }
@media (max-width: 480px) {
  .estimation-table { font-size: 13px; }
  .estimation-table th:first-child { width: 28%; }
  .estimation-table th, .estimation-table td { padding: 8px 6px; }
}
