/* A quiet editorial frame for TactoHand's scientific figures and live tools.
   Figure geometry and field colors remain in their original stylesheets. */
:root {
  --paper: #f7f9f8;
  --surface: #ffffff;
  --ink: #233d47;
  --secondary: #526970;
  --muted: #62747a;
  --accent: #2b6461;
  --wash: #e8f0ed;
  --rule: #d8e2de;
  --display: Georgia, 'Times New Roman', serif;
}

body { background: var(--paper); color: var(--ink); line-height: 1.75; }
main, header.site-header, footer { max-width: 1240px; }
main { padding-inline: 40px; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-color: currentColor; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
input[type=range] { accent-color: var(--accent); }
button, select { border-color: var(--rule); }

header.site-header {
  height: 90px;
  padding: 0 40px;
  border-bottom: 0;
}
.wordmark { font-family: var(--display); font-size: 25px; font-weight: 400; letter-spacing: -.9px; color: var(--ink); }
.site-header nav { gap: 25px; font-size: 13px; }
.site-header nav a { color: var(--secondary); }
.site-header nav a:hover { color: var(--accent); text-decoration: underline; }

.paper-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 40px;
  text-align: left;
  padding: 57px 0 48px;
}
.paper-hero h1 {
  grid-column: 1 / -1;
  font: 400 clamp(76px, 8.4vw, 116px)/1.02 var(--display);
  letter-spacing: -.065em;
  margin: 0 0 27px -5px;
  color: var(--ink);
}
.paper-title {
  grid-column: 1 / -1;
  font-size: clamp(25px, 2.35vw, 33px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -.7px;
  max-width: 920px;
  margin: 0 0 33px;
  color: var(--secondary);
  text-wrap: pretty;
}
.hero-credits { padding-top: 23px; border-top: 1px solid var(--rule); }
.paper-hero .authors {
  justify-content: flex-start;
  max-width: none;
  gap: 0 17px;
  font-size: 14px;
  line-height: 1.9;
  margin: 0 0 8px;
  color: var(--ink);
}
.paper-hero .affiliations { color: var(--muted); font-size: 12px; margin: 0; }
.resource-links { gap: 9px; }
.resource-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 9px 17px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--accent);
  background: transparent;
}
.resource-links a:hover { background: var(--wash); border-color: #adc6bd; }
.resource-links .primary { color: white; background: var(--accent); border-color: var(--accent); }
.resource-links .primary:hover { background: #214f4d; border-color: #214f4d; }
.paper-hero > .resource-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 360px);
  align-self: end;
  gap: 12px;
  margin: 0 0 5px;
}

.paper-hero > .resource-links > .resource-card {
  min-height: 52px;
  padding: 9px 13px;
}

.film-section { max-width: none; }
.film-section video { border-radius: 6px; }
#film { margin-bottom: 92px; }
.film-tools, .film-timeline { color: var(--muted); }
.film-tools a { font-size: 12px; }
.film-timeline button, .film-tools select { background: transparent; border-color: var(--rule); border-radius: 3px; }
.chapters { justify-content: flex-start; gap: 7px; padding-top: 12px; border-top: 1px solid var(--rule); margin-top: 18px; }
.chapters button { color: var(--secondary); padding: 4px 11px; border-radius: 3px; }
.chapters button:first-child { margin-left: -11px; }
.chapters button:hover { background: var(--wash); }

h2 {
  font-family: var(--display);
  font-size: clamp(32px, 3.1vw, 43px);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -1.25px;
  color: var(--ink);
  text-wrap: pretty;
}
h3 { color: var(--ink); }
.text-section { margin-top: 100px; padding-top: 55px; border-color: var(--rule); }
.section-intro {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: 55px;
  align-items: start;
  max-width: none;
  margin-bottom: 34px;
}
.section-intro h2 { margin: 0; }
.section-intro > p { margin: 0; color: var(--secondary); font-size: 17px; line-height: 1.8; max-width: 65ch; }
#explore { border: 0; margin-top: 0; padding-top: 0; }
.lab { margin-top: 32px; border-radius: 8px; box-shadow: none; }
.lab input[type=range] { accent-color: #8ebeb9; }
.lab button:focus-visible, .lab select:focus-visible, .lab input:focus-visible { outline-color: #a9d8cc; }
.demo-caption { color: var(--muted); font-size: 12px; max-width: 85ch; margin-top: 18px; }
#explore + #overview {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: 0 55px;
  margin-top: 78px;
  padding: 44px 0 0;
}
.abstract h2 { grid-row: span 2; max-width: 400px; }
.abstract > p { font-size: 18px; line-height: 1.8; color: var(--secondary); }
.abstract > p:last-child { margin-bottom: 0; }

#problem .target-definitions { border: 0; padding: 30px; gap: 36px; border-radius: 6px; }
.target-field h3 { font: 400 27px/1.3 var(--display); color: var(--ink); letter-spacing: -.5px; }
.target-field > p { color: var(--secondary); }
.target-field .target-legend span, .target-field > span, .targets-caption { color: var(--muted); }
.data-numbers {
  margin: 42px 0 34px;
  padding: 25px 0 27px;
  border-block: 1px solid var(--rule);
  gap: 28px;
}
.data-numbers strong { color: var(--ink); font: 400 clamp(31px, 3.1vw, 43px)/1.2 var(--display); letter-spacing: -1.5px; }
.data-numbers span { display: block; margin-top: 7px; font-size: 12px; color: var(--muted); }
.dataset-image-grid { padding: 0; border: 0; background: none; gap: 21px 12px; }
.dataset-tile img { border-radius: 3px; }
.dataset-tile > span { color: var(--secondary); font-size: 11px; margin-top: 7px; }
.dataset-overview-figure { margin: 30px 0 37px; }
details { border-color: var(--rule); color: var(--secondary); padding-block: 19px; }
summary { color: var(--ink); font-weight: 400; }
.search-label { color: var(--secondary); }
.search-label input { border-color: var(--rule); color: var(--ink); }
th, .small { color: var(--muted); }
td, th { border-color: var(--rule); }

.paper-figure > a, .figure-surface, .allocation-panels { border-color: var(--rule); border-radius: 5px; }
.paper-figure figcaption { color: var(--muted); font-size: 13px; line-height: 1.75; gap: 25px; margin-top: 15px; }
.paper-figure figcaption strong, .evidence-points strong { color: var(--ink); font-weight: 600; }
.figure-source-link { font-size: 12px; }
.figure-story { margin-top: 54px; }
.figure-story > .section-intro { display: block; margin-bottom: 27px; max-width: 850px; }
.figure-story > .section-intro > h3, .figure-story > h3,
.wrench-explainer h3, .benchmark-block h3, .qualitative-heading {
  font: 400 29px/1.3 var(--display);
  letter-spacing: -.5px;
  color: var(--ink);
}
.figure-story > .section-intro > p, .figure-story > p,
.wrench-explainer p, .two-col p, .force-label-summary p { color: var(--secondary); }
.figure-story > .section-intro > h3 { margin-bottom: 15px; }
.force-allocation-problem { border-color: var(--rule); background: var(--wash); border-radius: 5px; }
.force-allocation-problem h4 { color: var(--ink); font-weight: 500; }
.force-allocation-problem p { color: var(--secondary); }
.benchmark-scroll { border-top-color: #68847f; border-bottom-color: var(--rule); }
.benchmark-table thead th { color: var(--ink); background: #eef3f0; font-weight: 600; }
.benchmark-table tbody th { color: var(--ink); }
.benchmark-table th, .benchmark-table td { border-color: var(--rule); }
.benchmark-table .ours-result { background: var(--wash); color: #245a53; }
.metric-description, .benchmark-note, .evidence-link, .evidence-points p { color: var(--muted); }
.reconstruction-section > .section-intro { max-width: none; }
#reconstruction-illustration { border-radius: 7px; }
.comparison-example h4, .comparison-method > p { color: var(--ink); }

.paper-colophon {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  column-gap: 94px;
  margin-top: 100px;
  padding-top: 57px;
  border-top: 1px solid var(--rule);
}
.closing-note { margin: 0; padding: 0; border-radius: 0; background: none; color: var(--ink); }
.closing-invitation {
  font: 400 clamp(29px, 2.7vw, 38px)/1.25 var(--display);
  letter-spacing: -1px;
  text-wrap: pretty;
  max-width: 510px;
}
.closing-message { margin-top: 21px; max-width: 450px; color: var(--secondary); font-size: 16px; line-height: 1.8; }
.paper-colophon .resources { margin: 0; padding: 3px 0 0; border: 0; }
.resources h2 { font: 400 27px/1.3 var(--display); letter-spacing: -.6px; margin-bottom: 23px; }
.resources .resource-links { margin: 0 0 26px; }
.resources details { font-size: 13px; }
.resources pre { color: var(--secondary); font-size: 11px; line-height: 1.8; }
.resources #copy-citation { font-size: 12px; color: var(--accent); }
footer { margin-top: 65px; padding: 27px 40px 34px; border-color: var(--rule); }
footer .wordmark { font-size: 23px; }
footer p { font-size: 11px; color: var(--muted); }

@media (min-width: 1500px) {
  main, header.site-header, footer { max-width: 1300px; }
}
@media (max-width: 1100px) {
  .paper-hero { grid-template-columns: 1fr; }
  .hero-credits { max-width: 780px; }
  .paper-hero > .resource-links { margin: 24px 0 0; }
  .section-intro, #explore + #overview { gap: 0 35px; }
  .paper-colophon { column-gap: 50px; }
  .site-header nav { gap: 19px; }
}
@media (max-width: 700px) {
  main { padding-inline: 22px; }
  header.site-header { padding: 19px 22px 15px !important; gap: 13px; }
  header.site-header nav { gap: 7px 17px; }
  header.site-header nav a { font-size: 11px; color: var(--secondary); }
  .wordmark { font-size: 24px; }
  .paper-hero { padding: 37px 0 31px; }
  .paper-hero h1 { font-size: clamp(62px, 14.2vw, 88px); letter-spacing: -.065em; margin: 0 0 22px -3px; }
  .paper-title { font-size: 24px; line-height: 1.42; letter-spacing: -.45px; margin-bottom: 26px; }
  .hero-credits { padding-top: 19px; }
  .paper-hero .authors { column-gap: 13px; row-gap: 2px; font-size: 12px; line-height: 1.8; }
  .paper-hero .affiliations { font-size: 11px; line-height: 1.8; max-width: 320px; margin-top: 9px; }
  .paper-hero > .resource-links { margin-top: 22px; }
  .resource-links a, .resources .resource-links a { font-size: 12px; padding: 9px 13px; min-height: 40px; }
  .film-section video { border-radius: 4px; }
  #film { margin-bottom: 61px; }
  .film-tools { font-size: 11px; }
  .film-tools a { font-size: 11px; }
  .chapters { gap: 3px 5px; margin-top: 16px; padding-top: 12px; }
  .chapters button { font-size: 10px; padding: 4px 6px; }
  .chapters button:first-child { margin-left: -6px; }
  h2 { font-size: 33px; letter-spacing: -.9px; line-height: 1.2; }
  .text-section { margin-top: 65px; padding-top: 34px; }
  .section-intro { display: block; margin-bottom: 26px; }
  .section-intro h2 { margin-bottom: 19px; }
  .section-intro > p { font-size: 16px; line-height: 1.8; }
  .lab { margin: 24px -10px 0; border-radius: 6px; }
  .lab.expanded { margin: 0; border-radius: 0; }
  .demo-caption { font-size: 11px; line-height: 1.75; }
  #explore + #overview { display: block; margin-top: 51px; padding-top: 0; }
  .abstract h2 { margin-bottom: 22px; }
  .abstract > p { font-size: 17px; }
  #problem .target-definitions { padding: 23px 18px; gap: 28px; }
  .target-field h3 { font-size: 27px; }
  .target-field + .target-field { border-color: var(--rule); }
  .data-numbers { gap: 23px; margin-block: 28px; padding-block: 23px; }
  .data-numbers strong { font-size: 34px; }
  .data-numbers span { font-size: 11px; margin-top: 6px; }
  .dataset-image-grid { gap: 17px 9px; padding: 0; }
  .dataset-tile > span { font-size: 10px; }
  .paper-figure figcaption { font-size: 12px; gap: 7px; line-height: 1.75; }
  .figure-source-link { font-size: 11px; }
  .figure-story { margin-top: 37px; }
  .figure-story > .section-intro > h3, .figure-story > h3,
  .wrench-explainer h3, .benchmark-block h3, .qualitative-heading { font-size: 26px; }
  .wrench-explainer p { font-size: 16px; }
  .paper-colophon { display: block; margin-top: 65px; padding-top: 36px; }
  .closing-invitation { font-size: 32px; letter-spacing: -.8px; max-width: 440px; }
  .closing-message { font-size: 15px; line-height: 1.8; margin-top: 18px; }
  .paper-colophon .resources { margin-top: 37px; padding: 0; }
  .resources h2 { font-size: 26px; margin-bottom: 20px; }
  .resources .resource-links { margin-bottom: 24px; }
  footer { margin-top: 39px; padding: 23px 22px 27px; gap: 18px; }
  footer .wordmark { font-size: 23px; }
  footer p { font-size: 10px; }
}
@media (max-width: 374px) {
  main { padding-inline: 18px; }
  .paper-title { font-size: 22px; }
  .paper-hero h1 { font-size: 60px; }
  .resource-links a { padding-inline: 11px; }
}

.resource-card {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 43px;
  padding: 7px 13px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.3;
}

.resource-card span {
  color: var(--muted);
  font-size: 11px;
}

.resource-links a.resource-card {
  display: grid;
  justify-content: start;
  padding: 7px 13px;
}

/* Keep the compact objective readable beside its geometry illustration. */
.force-label-construction .force-allocation-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start;
}

.force-allocation-problem .math-formula {
  font-size: 16px;
}

.force-allocation-problem .typeset-math {
  display: block;
  max-width: 100%;
  margin-inline: auto;
}

@media (max-width: 900px) {
  .force-label-construction .force-allocation-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .force-allocation-problem {
    max-width: 540px;
  }
}
