/* Wearable research, using the academic site's type and section rules. */
.wearables-page .page-masthead { padding: 2.4rem 0 1.6rem; }
.wearables-page .page-masthead h1 { max-width: 24ch; font-size: clamp(2.6rem,5.3vw,4.6rem); }
.wearables-page .content-layout { padding-top: 1.8rem; }
.w-article { max-width: 1240px; }
.w-lead-copy { max-width: 80ch; }
.w-lead-copy p:first-child { margin-top: 0; }
.w-lead-copy p { line-height: 1.6; }
.w-lead-layout { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: clamp(1.5rem,3vw,3rem); align-items: start; }
.w-video { margin: 0; min-width: 0; scroll-margin-top: 6rem; }
.w-video video { display: block; width: 100%; aspect-ratio: 16/9; background: #111; }
.w-video figcaption { margin-top: .7rem; font: .85rem/1.5 var(--sans); color: var(--muted); }
.w-contents { margin: 1.8rem 0 2.3rem; padding: .8rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font: .87rem/1.9 var(--sans); }
.w-contents span { padding: 0 .4rem; color: var(--muted); }
.w-contents a { display: inline-block; text-underline-offset: .18em; }
.w-section { margin-bottom: 2.8rem; scroll-margin-top: 6rem; }
.w-section > p { max-width: 82ch; line-height: 1.65; }
.w-section h2 { max-width: none; }
.w-equation { width: fit-content; max-width: 100%; overflow-x: auto; margin: 1.3rem 0; padding: .8rem 1.4rem; border-left: 2px solid var(--red); font: 1.2rem/2 var(--serif); }
.w-sum { display: inline-grid; grid-template-rows: .8em 1.3em .8em; vertical-align: middle; margin: 0 .12em; text-align: center; line-height: 1; }
.w-sum span { font-size: .58em; line-height: 1.2; }
.w-sum b { font-size: 1.2em; line-height: 1; font-weight: 400; }
.w-equation sub, .w-equation sup { font-size: .7em; line-height: 0; }
.w-table-wrap { max-width: 100%; overflow-x: auto; margin: 1.4rem 0; }
.w-table-wrap table { width: 100%; border-collapse: collapse; font: .92rem/1.5 var(--sans); }
.w-table-wrap caption { padding: 0 0 .7rem; text-align: left; font-size: .86rem; color: var(--muted); }
.w-table-wrap th, .w-table-wrap td { padding: .8rem .85rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.w-table-wrap thead th { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.w-table-wrap tbody th { width: 23%; font-weight: 400; }
.w-topic-list { max-width: 90ch; }
.w-topic-list dt { margin: 1.3rem 0 .35rem; font-size: 1.2rem; }
.w-topic-list dd { margin: 0 0 1rem; max-width: 82ch; }
.w-results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.3rem; margin: 1.8rem 0 .7rem; }
.w-confusion { width: 100%; table-layout: fixed; border-collapse: collapse; font-family: var(--sans); }
.w-confusion caption { text-align: left; margin-bottom: 1rem; font-size: 1.05rem; }
.w-confusion th { font-size: .75rem; text-align: center; padding: .7rem .2rem; font-weight: 400; }
.w-confusion thead th:first-child { text-align: left; font-size: .65rem; color: var(--muted); }
.w-confusion tbody th { text-align: left; }
.w-confusion td { height: 4.8rem; text-align: center; border: 3px solid white; background: rgb(224 22 22 / calc(.035 + var(--cell-strength) * .25)); font-size: 1.65rem; font-variant-numeric: tabular-nums; }
.w-confusion td span { font-size: .75rem; margin-left: .1rem; }
.w-confusion .w-diagonal { font-weight: 700; }
.content-main .w-chart-note { font: .83rem/1.5 var(--sans); color: var(--muted); margin-bottom: 1.5rem; }
.w-patent-title { font-size: 1.15rem; }
.w-patent-title a { text-underline-offset: .15em; }
.content-main .w-patent-detail { font: .9rem/1.65 var(--sans); }
@media (max-width: 960px) {
 .w-lead-layout { grid-template-columns: 1fr; gap: 1rem; }
 .w-video { max-width: 820px; }
}
@media (max-width: 760px) { .w-results-grid { grid-template-columns: 1fr; gap: 1.8rem; } }
@media (max-width: 600px) {
 .wearables-page .page-masthead { padding: 1.8rem 0 1.3rem; }
 .w-contents { line-height: 2.1; margin: 1.4rem 0 2rem; }
 .w-section { margin-bottom: 2.3rem; }
 .w-equation { font-size: .99rem; padding: .65rem .75rem; }
 .w-table-wrap table { font-size: .82rem; }
 .w-table-wrap th, .w-table-wrap td { padding: .6rem .5rem; }
 .w-table-wrap tbody th { min-width: 6rem; }
 .w-confusion td { font-size: 1.45rem; height: 4.3rem; }
}

/* Research plots and acquisition diagrams. */
.w-research-figure { margin: 1.7rem 0 2rem; max-width: 960px; }
.w-research-figure img { display: block; width: 100%; height: auto; }
.w-research-figure figcaption { margin-top: .85rem; max-width: 85ch; font-family: var(--sans); font-size: .87rem; line-height: 1.5; color: #505050; }
.w-feature-explorer { max-width: 960px; margin: 1.6rem 0; }
.w-feature-buttons { display: flex; gap: .6rem; flex-wrap: wrap; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.w-feature-buttons button { padding: .6rem 1.1rem; border: 1px solid #bdbdbd; background: #fff; color: #222; font: inherit; font-family: var(--sans); font-size: .9rem; cursor: pointer; }
.w-feature-buttons button[aria-pressed="true"] { border-color: var(--red-dark); color: var(--red-dark); box-shadow: inset 0 -2px var(--red-dark); }
.w-feature-buttons button:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
.w-feature-explorer [hidden] { display: none; }
.w-feature-explorer .w-research-figure { margin-top: 1rem; }
.w-mux-flow { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1.4rem; font-family: var(--sans); }
.w-mux-flow > div { position: relative; border-top: 2px solid var(--red-dark); border-bottom: 1px solid #bbb; padding: 1.1rem .4rem; }
.w-mux-flow > div + div::before { content: '→'; position: absolute; left: -1.2rem; top: 1.1rem; color: var(--red-dark); }
.w-mux-flow strong { display: block; font-size: .95rem; line-height: 1.4; }
.w-mux-flow span { display: block; font-size: .82rem; line-height: 1.45; margin-top: .5rem; }
@media (max-width: 600px) {
 .w-mux-flow { grid-template-columns: 1fr; gap: .8rem; }
 .w-mux-flow > div + div::before { content: '↓'; left: auto; right: .5rem; top: -.9rem; background: #fff; }
 .w-research-figure { margin-left: -.35rem; margin-right: -.35rem; }
}

/* MuscleMate capstone: figures and technical narrative within the academic shell. */
.musclemate-page .w-lead-copy { max-width: none; }
.mm-opening { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: clamp(1.8rem,4vw,3.5rem); align-items: start; }
.content-main .mm-kicker { color: var(--red-dark); font: 700 .76rem/1.5 var(--sans); letter-spacing: .055em; text-transform: uppercase; margin-bottom: 1.2rem; }
.mm-figure { margin: 0; min-width: 0; }
.mm-figure a { display: block; }
.mm-figure img { display: block; width: 100%; height: auto; }
.mm-figure figcaption { font: .82rem/1.55 var(--sans); color: #505050; margin-top: .7rem; max-width: 80ch; }
.mm-opening-photo img { border: 1px solid #ddd; }
.mm-specs { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; padding: 1.5rem 0; margin: 2rem 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mm-specs dt { font: .75rem/1.5 var(--sans); color: var(--red-dark); text-transform: uppercase; letter-spacing: .06em; }
.mm-specs dd { margin: .35rem 0 0; font: 1.5rem/1.2 var(--serif); }
.mm-two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 1.8rem 0 2rem; max-width: 840px; }
.mm-two-up img { height: 280px; object-fit: contain; background: #faf9f7; }
.mm-hardware-row { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; margin: 2rem 0; align-items: start; }
.mm-hardware-row h3 { margin-top: 0; }
.mm-hardware-row p { line-height: 1.65; }
.mm-signal-path { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1.6rem; margin: 1.8rem 0; font-family: var(--sans); }
.mm-signal-path > div { position: relative; padding: .8rem 0 1rem; border-top: 2px solid var(--red); border-bottom: 1px solid var(--line); }
.mm-signal-path > div + div::before { content: '→'; position: absolute; left: -1.3rem; top: .6rem; color: var(--red-dark); }
.mm-signal-path b { display: block; font-size: 1rem; margin-bottom: .45rem; }
.mm-signal-path span { font-size: .86rem; line-height: 1.55; }
.mm-bins { display: grid; grid-template-columns: repeat(4,1fr); margin: 1.5rem 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); font: .83rem/1.5 var(--sans); }
.mm-bins div { padding: .8rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mm-bins b { display: block; color: var(--red-dark); font-weight: 500; margin-bottom: .25rem; }
.mm-bins span { white-space: nowrap; }
.mm-math-layout { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 2.5rem; align-items: start; }
.mm-math-layout p { line-height: 1.65; }
.mm-math-layout p:first-child { margin-top: 0; }
.mm-mathematica { padding: 1rem .3rem 1rem 1rem; border: 1px solid var(--line); }
.mm-app-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; margin: 2rem 0; }
.mm-app-grid p { line-height: 1.65; }
.mm-app-grid > div > .mm-figure img { width: 100%; height: 310px; object-fit: contain; background: #f7f7f7; }
.mm-phone-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.mm-phone-pair img { height: 310px; width: 100%; object-fit: contain; background: #f7f7f7; }
.mm-phone-pair figcaption { text-align: center; }
@media (max-width: 1050px) {
 .mm-opening { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
 .mm-math-layout { grid-template-columns: 1fr; }
 .mm-mathematica { max-width: 680px; margin: 0 auto; }
}
@media (max-width: 760px) {
 .mm-opening,.mm-hardware-row,.mm-app-grid { grid-template-columns: 1fr; }
 .mm-opening-photo { max-width: 650px; }
 .mm-specs { grid-template-columns: 1fr 1fr; gap: 1.3rem; }
 .mm-specs dd { font-size: 1.35rem; }
 .mm-two-up { gap: 1rem; }
 .mm-two-up img { height: 210px; }
 .mm-app-grid { gap: 2rem; }
 .mm-app-grid > div > .mm-figure img { height: auto; }
 .mm-signal-path { grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
 .mm-signal-path > div:nth-child(3)::before { content: ''; }
 .mm-bins { grid-template-columns: 1fr 1fr; }
 .mm-bins div { padding: .65rem; }
 .mm-mathematica { padding: .5rem; }
}
@media (max-width: 450px) { .mm-two-up { grid-template-columns: 1fr; } .mm-two-up img { height: 260px; } .mm-phone-pair img { height: 225px; } }
@media (max-width: 760px) {
 .mm-opening { display: flex; flex-direction: column; gap: 0; }
 .mm-opening > div { display: contents; }
 .mm-opening > div > p { order: 3; }
 .mm-opening > div > .mm-kicker { order: 0; }
 .mm-opening > div > p:nth-child(2) { order: 1; }
 .mm-opening-photo { order: 2; margin: 1rem 0 1.2rem; }
}

/* Prototype photographs retain their full frames and the site's academic typography. */
.w-prototype-group { margin-top: 2.5rem; }
.w-prototype-group h3 { margin: 0 0 1.2rem; font-size: 1.35rem; }
.w-prototype-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.w-prototype { margin: 0; min-width: 0; }
.w-prototype > a { display: block; background: #f5f5f5; }
.w-prototype img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: contain; }
.w-prototype > a:focus-visible { outline: 2px solid var(--red, #c00); outline-offset: 5px; }
.w-prototype figcaption { margin-top: .9rem; font: .9rem/1.55 var(--sans); color: #505050; }
.w-prototype figcaption strong { display: block; color: #000; margin-bottom: .35rem; }
.w-prototype figcaption span { display: block; }
@media (max-width: 960px) { .w-prototype-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .w-prototype-grid { grid-template-columns: 1fr; gap: 2rem; } .w-prototype-group { margin-top: 2rem; } }

.w-prototype-group:first-of-type .w-prototype-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.w-prototype-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.7fr 1fr; gap: 2rem; align-items: center; margin-bottom: 1rem; }
.w-prototype-wide img { aspect-ratio: auto; }
.w-prototype-wide figcaption { font-size: 1rem; margin: 0; }
.w-prototype-wide figcaption strong { font: bold 1.5rem/1.25 var(--serif); margin-bottom: .8rem; }
@media (max-width: 640px) { .w-prototype-group:first-of-type .w-prototype-grid, .w-prototype-wide { grid-template-columns: 1fr; } .w-prototype-wide { gap: .9rem; margin-bottom: 0; } }
