/* PUPPET project page. Layout and typography follow the AIfred page (aifred.cyphy.life),
   which is itself styled on the Academic Project Page Template (research-template.roman.technology). */
:root{
  color-scheme:light;
  --ink:#18181b;--body:#3f3f46;--muted:#71717a;--line:#dadce0;--soft:#f8f9fa;
  --blue:#1a73e8;--link:#3b82f6;
  --inperson:#5b8fc9;--twod:#8a84c9;--vr:#3fb08a;
  --pass:#3ecf8e;--review:#f7d046;--fail:#f06b57;
  --sans:'Noto Sans',ui-sans-serif,system-ui,-apple-system,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:24px}
body{margin:0;color:var(--body);background:#fff;font:400 18px/1.7778 var(--sans);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
img{max-width:100%}
.content-width{width:min(100% - 48px,900px);margin-inline:auto}

/* ---------- Header ---------- */
.paper-head{text-align:center;padding:48px 0 36px}
.paper-head h1{max-width:900px;margin:0 auto;color:var(--ink);font:500 clamp(32px,4.6vw,48px)/1.1 var(--sans)}
.paper-head h1 .acronym{font-weight:700}
.authors{display:flex;justify-content:center;flex-wrap:wrap;gap:12px 40px;max-width:860px;margin:26px auto 0}
.author{display:flex;flex-direction:column;align-items:center;line-height:1.5}
.author-name{color:var(--link);font-size:20px;font-weight:400}
a.author-name:hover{color:#2563eb}
.affiliation{margin-top:2px;color:var(--body);font-size:18px}
.venue{margin:22px 0;color:var(--body);font-size:18px}
.resource-links{display:flex;justify-content:center;flex-wrap:wrap;gap:12px}
.resource-button{height:44px;padding:0 20px;border:1px solid #27272a;border-radius:999px;background:#27272a;color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:9px;font:400 18px/1 var(--sans);transition:background .15s,border-color .15s}
.resource-button:hover{background:#000;border-color:#000}
.resource-button svg{width:18px;height:18px;flex:none}
.resource-button .video-icon{width:15px;height:15px}

/* ---------- Video ---------- */
.video-section{padding:4px 0 0}
.video-frame{position:relative;aspect-ratio:16/9;background:#f1f3f4;overflow:hidden;border-radius:10px}
.video-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

/* ---------- Sections ---------- */
.paper-section{padding-top:49px}
.paper-section h2{margin:0 0 24px;font:700 30px/1.3333 var(--sans);color:var(--ink)}
.abstract-section{padding-top:37px}
.section-heading{border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:24px}
.section-heading h2{margin:0}
.section-intro{max-width:800px;margin:0 0 24px}
.prose p{margin:0 0 20px}
.abstract-section>p,.prose p,.section-intro{font-size:18px;line-height:1.7778;color:var(--body)}

/* ---------- Figures ---------- */
.editorial-figure{margin:0}
.editorial-figure img{width:100%;height:auto;display:block;object-fit:contain;background:#fff}
.editorial-figure figcaption{margin-top:16px;color:var(--muted);font-size:16px;line-height:1.5}
.centered-figure{text-align:center}
.centered-figure img{margin:0 auto}
.centered-figure figcaption{max-width:760px;margin:16px auto 0}
.why-figure{max-width:640px;margin:0 auto 26px}
.system-figure{margin:4px 0 0}
.wide-figure{width:min(1040px,100vw - 48px);margin:28px 0 8px 50%;transform:translateX(-50%)}

/* ---------- Key-number strip (results-grid on AIfred) ---------- */
.results-grid{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-top:22px}
.results-grid.four{grid-template-columns:repeat(4,1fr)}
.result{padding:22px 20px 24px 0}
.result+.result{border-left:1px solid var(--line);padding-left:22px}
.result strong{display:block;margin-bottom:5px;color:var(--ink);font:700 clamp(28px,3.6vw,36px)/1.2 var(--sans);letter-spacing:-.02em}
.result strong small{font-size:.6em;font-weight:600;color:#52525b;letter-spacing:0}
.result h3{margin:0 0 8px;font:600 20px/1.4 var(--sans);color:var(--ink)}
.result p{margin:0;font-size:16px;line-height:1.7}
.results-grid.four .result h3{font-size:17px}
.results-grid.four .result p{font-size:15px}

/* ---------- Component list (hardware-list on AIfred) ---------- */
.component-list{display:grid;grid-template-columns:repeat(3,1fr);gap:16px 24px;margin:28px 0 0;padding:0;list-style:none}
.component-list li{font-size:16px;line-height:1.6}
.component-list li strong{display:block;color:var(--ink);font:600 18px/1.5 var(--sans)}
.component-list li strong b{display:inline-grid;place-items:center;width:22px;height:22px;margin-right:8px;border-radius:5px;background:var(--vr);color:#fff;font:700 13px/1 var(--sans);vertical-align:2px}
.component-list li.hw strong b{background:#3b82c4}

/* ---------- Three-card rows (pipeline / modes on AIfred) ---------- */
.pipeline{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid var(--line);margin:22px 0 24px}
.pipeline article{padding:20px 22px 18px}
.pipeline article+article{border-left:1px solid var(--line)}
.pipeline article>span{color:var(--blue);font:600 14px var(--sans)}
.pipeline h3{margin:8px 0 6px;font:600 20px/1.4 var(--sans);color:var(--ink)}
.pipeline p{margin:0;font-size:16px;line-height:1.7}
.pipeline .maps{display:block;margin:2px 0 8px;color:var(--muted);font-size:14px}
.condition-card h3::before{content:"";display:inline-block;width:11px;height:11px;margin-right:9px;border-radius:3px;background:var(--c);vertical-align:1px}
.c-inperson{--c:var(--inperson)}.c-2d{--c:var(--twod)}.c-vr{--c:var(--vr)}

/* ---------- Hypotheses ---------- */
.hypotheses{margin:0 0 8px;padding:0;list-style:none;border-top:1px solid var(--line)}
.hypotheses li{display:grid;grid-template-columns:52px 1fr;gap:12px;padding:14px 0;border-bottom:1px solid var(--line);font-size:17px;line-height:1.7}
.hypotheses li>span{color:var(--blue);font-weight:700}

/* ---------- Table (template's GFM table) ---------- */
.table-wrap{overflow-x:auto;margin:6px 0 10px;border:1px solid var(--line);border-radius:8px}
table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.55}
th,td{padding:11px 14px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}
th{background:var(--soft);color:var(--ink);font-weight:600;white-space:nowrap}
tbody tr:last-child td{border-bottom:0}
td:first-child{font-weight:700;color:var(--ink);white-space:nowrap}
td.num{font-variant-numeric:tabular-nums}
.agency-table td:first-child{font-weight:400;color:var(--body);white-space:normal}
.agency-table tr:last-child td:first-child{font-weight:600;color:var(--ink)}
.table-caption{margin:10px 0 0;color:var(--muted);font-size:16px;line-height:1.5}
.badge{display:inline-block;padding:2px 9px;border-radius:999px;font-size:13px;font-weight:600;white-space:nowrap}
.badge-fail{background:#fde4e0;color:#b4321f}
.badge-review{background:#fdf3c8;color:#866400}
.badge-pass{background:#d9f6e8;color:#137a4b}
.outcomes{display:flex;flex-wrap:wrap;gap:10px 22px;margin:18px 0 0;font-size:16px}
.outcomes span{display:inline-flex;align-items:center;gap:8px}

/* ---------- Results ---------- */
.results-section{padding-bottom:20px}
.result-detail{margin-top:44px}
.result-detail h3{margin:0 0 16px;font:600 24px/1.5 var(--sans);color:var(--ink)}
.result-detail h3 .hyp{color:var(--blue);margin-right:8px}
.result-detail>p{margin:0 0 20px}
.result-detail::after{content:"";display:block;clear:both}
.result-figure{float:left;width:400px;margin:4px 30px 14px 0}
.result-figure-right{float:right;margin:4px 0 14px 30px}
.result-figure figcaption{text-align:left;margin:10px 0 0}
.result-conclusion{padding:18px 22px;border-left:3px solid var(--blue);background:var(--soft);color:#202124!important;font-weight:500}

/* ---------- Tab panels (from the research template) ---------- */
.tabs{margin:0 0 24px}
.tab-list{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:18px}
.tab-list button{appearance:none;border:0;background:none;padding:9px 14px;margin-bottom:-1px;border-bottom:2px solid transparent;color:var(--muted);font:500 16px var(--sans);cursor:pointer}
.tab-list button[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--ink)}
.tab-list button:hover{color:var(--ink)}
.tab-list button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.tab-panel[hidden]{display:none}
.tab-panel img{max-width:560px;margin:0 auto}

/* ---------- Footer ---------- */
.site-footer{width:min(100% - 48px,900px);margin:0 auto;padding:19px 0 24px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:14px}
.site-footer a{color:#4d5156}
.site-footer a:hover{color:var(--blue)}

/* ---------- Mobile ---------- */
@media(max-width:820px){
  .results-grid.four{grid-template-columns:repeat(2,1fr)}
  .results-grid.four .result:nth-child(3){border-left:0;padding-left:0}
  .results-grid.four .result:nth-child(n+3){border-top:1px solid var(--line)}
  .component-list{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:650px){
  body{font-size:16px}
  .desktop-break{display:none}
  .content-width,.site-footer{width:calc(100% - 32px)}
  .paper-head{padding:34px 0 26px}
  .paper-head h1{font-size:28px}
  .author-name{font-size:16px}.affiliation{font-size:14px}
  .venue{font-size:15px;margin:16px auto}
  .resource-button{height:40px;padding:0 16px;font-size:16px}
  .paper-section{padding-top:37px}.abstract-section{padding-top:29px}
  .paper-section h2{font-size:24px;margin-bottom:18px}.section-heading{margin-bottom:18px}
  .abstract-section>p,.prose p,.section-intro,.result-conclusion{font-size:16px}
  .editorial-figure figcaption{font-size:14px;margin-top:12px}
  .wide-figure{width:calc(100vw - 32px)}
  .results-grid{grid-template-columns:1fr}
  .results-grid.four{grid-template-columns:1fr}
  .result,.results-grid.four .result:nth-child(3){padding:14px 0}
  .result+.result{border-left:0;border-top:1px solid var(--line);padding-left:0}
  .result strong{font-size:28px}
  .result h3{font-size:18px}.result p{font-size:15px}
  .component-list,.pipeline{grid-template-columns:1fr}
  .pipeline article{padding:14px 16px}
  .pipeline article+article{border-left:0;border-top:1px solid var(--line)}
  .pipeline h3{font-size:18px}.pipeline p,.component-list li{font-size:15px}
  .hypotheses li{grid-template-columns:40px 1fr;font-size:15px}
  .result-detail h3{font-size:20px}
  .result-figure,.result-figure-right{float:none;width:100%;max-width:440px;margin:0 auto 18px}
  .tab-list button{padding:8px 10px;font-size:14px}
  table{font-size:13.5px}th,td{padding:9px 10px}
  .rules-table{min-width:660px}
  .code-block pre{font-size:12.5px;padding:16px}
  .site-footer{flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* Authors: three across, as on AIfred */
.authors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
@media(max-width:650px){.authors{gap:8px}.author-name{font-size:13px}.affiliation{font-size:11px}}
/* arXiv button (AIfred style); placeholder state until the link exists */
.arxiv-icon{color:#fff;font-size:14px;font-weight:600;letter-spacing:-.06em}
.arxiv-icon span{color:#f06b57}
.resource-button.is-placeholder{opacity:.45;cursor:default;pointer-events:none}
