:root {
  color-scheme: light dark;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --ink: #202629;
  --muted: #5d686c;
  --faint: #778184;
  --line: #cdd5d6;
  --line-strong: #9da9ab;
  --accent: #087d86;
  --accent-soft: #e4f0ef;
  --code-bg: #f0f2ef;
  --table-head: #f0f2ef;
  --focus: #bd6900;
  --max-width: 1200px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151a1c;
  --surface: #1b2224;
  --ink: #eceeeb;
  --muted: #b7c0bf;
  --faint: #909c9d;
  --line: #394447;
  --line-strong: #5b6a6d;
  --accent: #73c4c4;
  --accent-soft: #203334;
  --code-bg: #20282a;
  --table-head: #20282a;
  --focus: #ffcb79;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #151a1c;
    --surface: #1b2224;
    --ink: #eceeeb;
    --muted: #b7c0bf;
    --faint: #909c9d;
    --line: #394447;
    --line-strong: #5b6a6d;
    --accent: #73c4c4;
    --accent-soft: #203334;
    --code-bg: #20282a;
    --table-head: #20282a;
    --focus: #ffcb79;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.65; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
p { margin: 0 0 1.1em; }
.shell { width: min(var(--max-width), calc(100% - 56px)); margin-inline: auto; }
.skip-link { position: absolute; top: -60px; left: 18px; z-index: 5; padding: 8px 12px; color: var(--paper); background: var(--ink); }
.skip-link:focus { top: 12px; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line-strong); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 82px; padding-block: 14px; }
.project-lockup { display: grid; gap: 1px; color: var(--ink); text-decoration: none; }
.project-name { font-family: Georgia, "Times New Roman", serif; font-size: 22px; line-height: 1.2; }
.project-kind { color: var(--muted); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.institution-lockup { display: flex; align-items: center; justify-content: flex-end; gap: 19px; }
.brand-logo { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.tehealp-logo { width: 132px; height: 48px; }
.tehealp-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pucp-logo { width: 105px; height: 48px; overflow: hidden; }
.pucp-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.logo-dark { display: none !important; }
:root[data-theme="dark"] .tehealp-logo img { filter: brightness(0) invert(1); }
:root[data-theme="dark"] .pucp-logo .logo-dark { display: block !important; width: 180%; height: 180%; max-width: none; flex: 0 0 auto; mix-blend-mode: screen; }
:root[data-theme="dark"] .pucp-logo .logo-light { display: none !important; }
.theme-toggle { border: 1px solid var(--line-strong); padding: 6px 9px; color: var(--ink); background: transparent; font: inherit; font-size: 11px; white-space: nowrap; cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.site-nav { min-height: 42px; border-top: 1px solid var(--line); }
.nav-details { min-height: 42px; }
.nav-details > summary { display: none; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; min-height: 42px; }
.site-nav a { flex: 0 0 auto; color: var(--muted); font-size: 12px; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--accent); text-decoration: underline; }
.page-layout { display: grid; grid-template-columns: 188px minmax(0, 1fr); gap: 58px; align-items: start; padding-top: 37px; padding-bottom: 96px; }
.contents { position: sticky; top: 22px; align-self: start; padding: 3px 0 16px; }
.contents-title { margin: 0 0 12px; color: var(--faint); font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; letter-spacing: .1em; }
.contents ol { margin: 0; padding: 0; list-style: none; counter-reset: contents; }
.contents li { counter-increment: contents; border-top: 1px solid var(--line); }
.contents li:last-child { border-bottom: 1px solid var(--line); }
.contents li a { display: block; padding: 6px 0; color: var(--muted); font-size: 11px; line-height: 1.45; text-decoration: none; }
.contents li a::before { content: counter(contents, decimal-leading-zero) "  "; color: var(--faint); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; }
.contents li a:hover { color: var(--accent); }
.contents-repo { display: inline-block; margin-top: 15px; font-size: 11px; }
.document { width: 100%; max-width: 900px; min-width: 0; }
.document-section { padding: 32px 0 38px; border-top: 1px solid var(--line-strong); scroll-margin-top: 18px; }
.document-section:first-child { padding-top: 3px; border-top: 0; }
.eyebrow-row { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--faint); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; letter-spacing: .08em; }
h1, h2, h3 { color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.2; }
h1 { max-width: 780px; margin: 17px 0 12px; font-size: clamp(34px, 4.5vw, 48px); letter-spacing: -.025em; }
h2 { margin: 0; font-size: clamp(23px, 2.6vw, 29px); letter-spacing: -.015em; }
h3 { margin: 0 0 9px; font-size: 19px; }
.lead { max-width: 760px; margin: 0 0 14px; color: var(--muted); font-size: 19px; line-height: 1.48; }
.byline { max-width: 760px; margin-bottom: 22px; font-size: 13px; }
.project-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 0 0; border-block: 1px solid var(--line); }
.project-facts div { padding: 11px 13px 12px 0; }
.project-facts dt { color: var(--faint); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.project-facts dd { margin: 3px 12px 0 0; font-size: 12px; line-height: 1.45; }
.quick-start { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; margin-top: 22px; padding: 15px 0 4px; border-top: 1px solid var(--line-strong); }
.quick-start h2 { margin: 0 0 4px; font-size: 20px; }
.quick-start p { max-width: 630px; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.quick-start .code-block { margin: 4px 0 0; }
.quick-start-link { justify-self: start; font-size: 12px; }
.section-heading { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: start; margin: 0 0 21px; }
.section-number { padding-top: 5px; color: var(--accent); font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.section-kicker { margin: 0 0 5px; color: var(--faint); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; letter-spacing: .1em; }
.process-figure { margin: 0; border: 1px solid var(--line); }
.process-figure > figcaption { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.route-table { padding: 2px 14px; }
.route-row { display: grid; grid-template-columns: 125px minmax(0, 1fr) 140px; gap: 16px; align-items: center; min-height: 66px; border-bottom: 1px solid var(--line); }
.route-row:last-child { border-bottom: 0; }
.route-label { color: var(--accent); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.route-row p { margin: 0; font-size: 13px; }
.route-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.route-output { padding-left: 14px; border-left: 1px solid var(--line-strong); color: var(--muted); font-size: 11px; }
.shared-sequence { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.shared-sequence li { min-width: 0; padding: 12px 9px 12px 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.shared-sequence li:last-child { border-right: 0; }
.shared-sequence span, .shared-sequence strong, .shared-sequence small { display: block; }
.shared-sequence span { color: var(--accent); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; }
.shared-sequence strong { margin: 4px 0; font-size: 11px; font-weight: 650; }
.shared-sequence small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.figure-note, .table-note { margin: 11px 14px 13px; color: var(--muted); font-size: 11px; }
.code-block { max-width: 100%; margin: 14px 0; padding: 14px 16px; overflow-x: auto; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--code-bg); color: var(--ink); font: 12px/1.65 "SFMono-Regular", Consolas, "Liberation Mono", monospace; tab-size: 2; }
.code-block code { color: inherit; white-space: pre; }
.command-examples { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 24px; }
.command-example { min-width: 0; border-top: 1px solid var(--line-strong); }
.command-example h3 { margin: 11px 0 0; font-size: 17px; }
.command-example .code-block { font-size: 10px; }
.method-note { color: var(--muted); font-size: 12px; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.technical-table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.5; }
.technical-table th, .technical-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.technical-table thead th { border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); background: var(--table-head); color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; font-weight: 600; letter-spacing: .045em; text-transform: uppercase; }
.technical-table tbody th { width: 150px; font-weight: 650; }
.technical-table td { color: var(--muted); }
.benchmark-table { min-width: 680px; font-variant-numeric: tabular-nums; }
.benchmark-table td:not(:first-child) { text-align: right; }
.document-links { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.document-links li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.document-links a { font-size: 12px; }
.document-links span { color: var(--faint); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; }
.author-table { min-width: 730px; }
.author-table tbody th { width: 220px; }
.author-table td:last-child { white-space: nowrap; }
.citation-block { margin: 0 0 25px; padding: 2px 0 2px 17px; border-left: 3px solid var(--accent); }
.citation-label { margin: 0 0 5px; color: var(--faint); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.citation-text { max-width: 720px; margin-bottom: 8px; font-size: 13px; }
.citation-block > a { font-size: 11px; }
.related-work { padding-top: 18px; border-top: 1px solid var(--line); }
.related-work h3 { font-size: 17px; }
.related-work p { max-width: 780px; font-size: 12px; }
.related-work .method-note { font-size: 10px; }
.site-footer { border-top: 1px solid var(--line-strong); background: var(--paper); }
.footer-inner { display: flex; justify-content: space-between; gap: 28px; padding-block: 20px 26px; }
.footer-identity { display: grid; gap: 2px; color: var(--muted); font-size: 11px; }
.footer-identity strong { color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; align-content: start; }
.footer-links a { font-size: 11px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tehealp-logo img { filter: brightness(0) invert(1); }
  :root:not([data-theme="light"]) .pucp-logo .logo-dark { display: block !important; width: 180%; height: 180%; max-width: none; flex: 0 0 auto; mix-blend-mode: screen; }
  :root:not([data-theme="light"]) .pucp-logo .logo-light { display: none !important; }
}
@media (max-width: 1000px) {
  .page-layout { grid-template-columns: 155px minmax(0, 1fr); gap: 34px; }
  .shared-sequence { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shared-sequence li:nth-child(3) { border-right: 0; }
}
@media (max-width: 760px) {
  .shell { width: min(var(--max-width), calc(100% - 36px)); }
  .masthead { align-items: flex-start; flex-direction: column; gap: 12px; padding-block: 15px; }
  .institution-lockup { width: 100%; justify-content: flex-start; gap: 15px; }
  .tehealp-logo { width: 122px; height: 43px; }
  .pucp-logo { width: 100px; height: 43px; }
  .site-nav { padding-block: 7px; }
  .nav-details > summary { display: block; min-height: 28px; padding: 4px 0; color: var(--muted); font-size: 12px; cursor: pointer; list-style: none; }
  .nav-details > summary::-webkit-details-marker { display: none; }
  .nav-details > summary::after { margin-left: 7px; color: var(--accent); content: "＋"; }
  .nav-details[open] > summary::after { content: "−"; }
  .nav-links { min-height: 0; flex-wrap: wrap; gap: 5px 17px; padding: 7px 0 3px; }
  .page-layout { display: block; padding-top: 22px; padding-bottom: 55px; }
  .contents { display: none; }
  .document { max-width: none; }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  .shell { width: calc(100% - 30px); }
  .project-name { font-size: 20px; }
  .institution-lockup { gap: 11px; }
  .tehealp-logo { width: 108px; }
  .pucp-logo { width: 84px; }
  .theme-toggle { margin-left: auto; padding-inline: 7px; font-size: 10px; }
  .nav-links { gap: 4px 15px; }
  .site-nav a { font-size: 11px; }
  .page-layout { padding-top: 15px; }
  .document-section { padding: 25px 0 30px; }
  .document-section:first-child { padding-top: 0; }
  .lead { font-size: 17px; }
  .project-facts { grid-template-columns: 1fr 1fr; }
  .project-facts div:nth-child(2), .project-facts div:nth-child(4) { border-left: 1px solid var(--line); padding-left: 12px; }
  .route-row { grid-template-columns: 1fr auto; gap: 5px 10px; padding-block: 9px; }
  .route-label { grid-column: 1 / -1; }
  .route-row p { grid-column: 1; }
  .route-output { grid-column: 2; grid-row: 2; padding-left: 9px; font-size: 9px; }
  .shared-sequence { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shared-sequence li:nth-child(3) { border-right: 1px solid var(--line); }
  .shared-sequence li:nth-child(even) { border-right: 0; }
  .command-examples { grid-template-columns: 1fr; gap: 12px; }
  .section-heading { grid-template-columns: 29px minmax(0, 1fr); gap: 7px; }
  .technical-table { font-size: 11px; }
  .technical-table th, .technical-table td { padding: 7px 8px; }
  .pose-system-table { display: block; }
  .pose-system-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pose-system-table tbody { display: block; }
  .pose-system-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .pose-system-table tbody th { grid-column: 1 / -1; width: auto; padding: 12px 8px 3px; border-bottom: 0; }
  .pose-system-table tbody td { min-width: 0; padding: 5px 8px 12px; border-bottom: 0; }
  .pose-system-table tbody td::before { display: block; margin-bottom: 4px; color: var(--faint); font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; letter-spacing: .04em; text-transform: uppercase; content: attr(data-label); }
  .document-links li { gap: 7px; }
  .document-links a { font-size: 11px; }
  .footer-inner { display: grid; gap: 14px; }
  .footer-links { gap: 7px 13px; }
}
