/* SOLE additions on top of the locomanipulation page's style.css: the foothold-affordance scale
   (paper/style.py SAFETY: fails red -> cream -> holds teal), the drop-a-foot demo, placeholders. */
:root {
  --fail: #b8323f;
  --hold: #16806b;
  --cream: #f4eee2;
  --scale: linear-gradient(90deg, #8e1f2f 0%, #b8323f 18%, #e9a27e 42%, #f4eee2 55%, #7fc0a6 72%, #0d5e50 100%);
  --hl: #16806b;
}
h2::after { background: linear-gradient(90deg, var(--hl) 0%, rgba(22, 128, 107, 0.25) 45%, rgba(22, 128, 107, 0) 85%); }

/* hero */
.authors.placeholder { display: inline-block; padding: 4px 14px; border: 1px dashed #c9ccd1; border-radius: 8px; color: var(--ink-faint); font-size: 14.5px; }
.hero .tagline { max-width: 720px; }

/* teaser: 16:9 footage with the map beside it */
#teaser { margin-top: 26px; }
.teaser video { aspect-ratio: 16 / 9; background: #e9ecee; }
.scale-legend { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0 0; font-size: 13px; color: var(--ink-faint); }
.scale-legend .end { color: var(--ink-soft); font-weight: 500; }
.scale-bar { display: inline-block; width: 160px; height: 9px; border-radius: 3px; background: var(--scale); }

/* stats */
.stat .num.sole { color: var(--hold); }
.stat .num.hts { color: #5b6272; }
.stat .num.ame { color: #8a8f98; }

/* hardware table */
.table.hw td:last-child { white-space: nowrap; }

/* drop-a-foot demo */
.drops { margin: 18px 0 8px; }
.drops-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #eceef1;
  box-shadow: var(--card-shadow); touch-action: none; }
.drops-stage canvas { display: block; width: 100% !important; height: 100% !important; cursor: crosshair; }
.drops-msg { position: absolute; left: 12px; bottom: 12px; margin: 0; max-width: calc(100% - 24px); padding: 5px 11px; border-radius: 999px;
  background: rgba(26, 26, 26, 0.72); color: #fff; font: 600 13px/1.3 var(--sans); pointer-events: none; }
.drops-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.drops-bar .btn { border-radius: 10px; padding: 8px 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 13.5px/1.2 var(--sans); }
.drops-bar .btn:hover { border-color: var(--ink); }
.drops-bar .btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.drops-bar .btn:focus-visible { outline: 2px solid var(--hl); outline-offset: 2px; }
.tally { margin-left: auto; display: flex; gap: 16px; font-size: 13.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.tally b { color: var(--ink); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.dot.hold { background: var(--hold); }
.dot.fail { background: var(--fail); }
.drops .demo-note { margin-top: 8px; }

/* method / results */
#method h3, #results h3 { margin-top: 34px; }
.cols.results figure { margin: 0; }
.cols.results .figure img { width: 100%; height: auto; }
.placeholder-card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 28px; text-align: center; color: var(--ink-faint); border: 1px dashed #d4d7dc; }
pre code { font: inherit; }

@media (max-width: 640px) {
  .tally { margin-left: 0; width: 100%; }
  .scale-bar { width: 110px; }
}

/* the hardware clips are 16:9 with the onboard map inset at the right: never crop them (style.css sets 8:7 cover) */
#real-robot .grid2 video { aspect-ratio: 16 / 9; object-fit: contain; }

/* spacing, legibility, consistency */
:root { --ink-faint: #6a6a6a; }
:focus-visible { outline: 2px solid var(--hl); outline-offset: 2px; }
.hero .wrap { padding: 36px 40px 28px; }
.hero .links { align-items: center; margin-bottom: 0; }
.links .venue-pill { margin: 0 0 0 6px; }
.links .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; cursor: default; }
#method h3, #results h3, #real-robot h3 { font-size: 21px; margin-top: 48px; }
#real-robot .insight h3 { font-size: 18px; margin-top: 22px; }
#real-robot .insight h3:first-child { margin-top: 6px; }
.table.hw tbody tr:nth-child(4) td { border-top: 0; }
.gallery .ok { color: var(--hold); }
.gallery .fail { color: var(--fail); }
.wrap.wide { max-width: 1232px; }
#results .stats { margin-top: 18px; }
#results .stats-note { margin-bottom: 26px; }
.figure.bleed { margin-top: 22px; }
.hint { font-size: 12.5px; }
@media (max-width: 640px) {
  .hero .wrap { padding: 28px 18px 22px; }
  .figure.overview { overflow-x: auto; }
  .figure.overview img { min-width: 760px; }
}

/* clip carousels (hardware, comparisons): named tabs above, one clip at a time */
.car-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 10px; }
.car-tabs button { font: 500 13.5px/1 var(--sans); color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.car-tabs button:hover { border-color: var(--ink); color: var(--ink); }
.car-tabs button[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.car-tabs + .carousel { margin-top: 0; }
.carousel.hw .gallery video { aspect-ratio: 16 / 9; object-fit: contain; }
.carousel.hw .car-btn { top: calc(50% - 64px); }
.carousel.hw figcaption { max-width: 760px; text-align: left; margin-top: 2px; }
@media (hover: none), (max-width: 640px) {
  .car-tabs button { padding: 11px 14px; }
}

/* reading comfort. Sources: Baymard + Bringhurst (50-75 characters a line),
   Butterick (15-25 px web body text, 45-90 characters), WCAG 1.4.3 (4.5:1 contrast) and 1.4.8 (at most 80 characters).
   Text sits in one centered reading column of about 72 characters; figures and demos break out wider. */
:root { --measure: 660px; --cap: 620px; --outset: 948px; }
body { font-size: 17px; line-height: 1.65; color: #333; }
main > section.wrap, #play > .wrap:not(.wide) { max-width: calc(var(--measure) + 32px); }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
#method h3, #results h3, #real-robot h3 { margin-bottom: 10px; }
.outset, .drops, #results .stats, .cols.results, main .single:not(.bleed), main .figure:not(.bleed) {
  margin-left: calc(50% - min(var(--outset) / 2, 50vw - 16px)); margin-right: calc(50% - min(var(--outset) / 2, 50vw - 16px)); }
/* captions and notes: darker, a size up, left-aligned in the reading column */
figcaption, .figure figcaption, .carousel.hw figcaption { font-size: 15px; line-height: 1.55; color: var(--ink-soft); text-align: left;
  max-width: var(--measure); padding-right: calc(var(--measure) - var(--cap)); box-sizing: border-box;
  margin-left: auto; margin-right: auto; text-wrap: pretty; }
.teaser figcaption { max-width: var(--measure); }
.gallery .clip-title, .gallery .outcomes { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.grid2 figcaption { padding-right: 0; }
.gallery .clip-title { font-size: 17px; margin-top: 12px; }
.gallery .outcomes { font-size: 15px; gap: 4px 14px; }
.car-tabs { justify-content: center; }
.stats-note, .demo-note, #play details.play-more p, .table caption { color: var(--ink-soft); font-size: 15px; line-height: 1.55; max-width: var(--cap); }
#play .play-more .play-stats { font-size: 13.5px; }
.scale-legend { font-size: 14px; }
.stat .lbl { font-size: 15px; }
.stat small { font-size: 13.5px; color: var(--ink-soft); }
.table { font-size: 15.5px; }
.table th { font-size: 13.5px; }
.footer p { font-size: 14px; }
.signals { margin: 0 0 1em; padding-left: 1.25em; }
.signals li { margin-bottom: 0.6em; padding-left: 0.2em; }
.signals li::marker { color: var(--hl); }
.signals b { font-weight: 600; }
@media (max-width: 640px) {
  body { font-size: 16px; }
  figcaption, .figure figcaption, .carousel.hw figcaption { padding-right: 0; }
  figcaption, .figure figcaption, .carousel.hw figcaption, .stats-note, .demo-note, #play details.play-more p, .table caption { font-size: 14.5px; }
  .gallery .outcomes { font-size: 14.5px; }
}
#teaser .scale-legend { justify-content: flex-start; max-width: var(--measure); margin-left: auto; margin-right: auto; }
/* phones scroll the wide method figure sideways; say so, and keep the hint in view while it scrolls */
.swipe-hint { display: none; position: sticky; left: 0; width: max-content; margin: 0 0 8px; font-size: 13.5px; color: var(--ink-soft); }
@media (max-width: 640px) { .swipe-hint { display: block; } }
