.portfolio-study {
  --card-height: clamp(430px, 56svh, 565px);
  --pin: calc(var(--header-height) + 15px);
  max-width: var(--study-page-width); margin: 0 auto; padding: 0 var(--study-gutter);
}
.study-intro {
  display: flex; align-items: end; justify-content: space-between; gap: 32px;
  margin: 0 0 clamp(25px, 3.5vh, 48px);
  padding: clamp(30px, 4.8vh, 61px) 0 clamp(21px, 2.9vh, 34px);
  border-bottom: 1px solid var(--line);
}
.study-intro h1 { margin: 0; font-size: clamp(31px, 3.55vw, 54px); line-height: 1.07; font-weight: 500; letter-spacing: -.066em; }
.study-intro h1 span { color: var(--subtle); }
.study-intro > p { margin: 0 1px 2px 0; max-width: 38ch; font-size: clamp(12px, 1.05vw, 15px); line-height: 1.5; color: var(--body-copy); }
.showcase-grid { display: grid; grid-template-columns: clamp(211px, 17.4vw, 268px) minmax(0, 1fr); gap: clamp(17px, 2.1vw, 36px); align-items: start; }
.project-sidebar { position: sticky; top: calc(var(--pin) + 11px); align-self: start; min-width: 0; z-index: 6; padding-top: 4px; }
.project-index { max-width: 260px; }
.index-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.index-head h2 { margin: 0; font-size: clamp(19px, 1.5vw, 23px); font-weight: 550; letter-spacing: -.045em; }
.position-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .055em; }
.index-scale { position: relative; --row: clamp(56px, 6.6vh, 68px); --needle: 38px; --dial-pos: 0; }
.index-scale ol { padding: 0; margin: 0; list-style: none; }
.index-scale li { position: relative; }
.index-scale li:not(:last-child)::after { content: ""; position: absolute; top: calc(100% - 1px); left: 0; width: 9px; height: 1px; background: var(--subtle); opacity: .65; pointer-events: none; }
.index-scale a { display: flex; align-items: center; gap: 12px; height: var(--row); color: var(--body-copy); font-size: clamp(15px, 1.23vw, 19px); line-height: 1.2; font-weight: 450; letter-spacing: -.033em; }
.tick { flex: 0 0 var(--needle); }
.tick::before { content: ""; display: block; border-radius: 3px; width: 19px; height: 2px; background: currentColor; opacity: .7; }
.index-scale a:is(:hover,:focus-visible,[aria-current]) { color: var(--ink); }
.index-scale a[aria-current] { font-weight: 600; }
.dial-needle { position: absolute; inset: 0 auto auto 0; height: 4px; width: var(--needle); border-radius: 4px; background: var(--ink); pointer-events: none; transform: translateY(calc((var(--dial-pos) + .5) * var(--row) - 2px)); }
.project-arrows { display: flex; gap: 9px; margin-top: 20px; }
.project-arrows button,.round-tool { display: inline-grid; place-items: center; flex: none; margin: 0; padding: 0; width: 44px; height: 44px; background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 50%; }
.project-arrows button:not(:disabled):hover,.round-tool:not(:disabled):hover { background: var(--hover-surface); border-color: var(--subtle); }
.project-arrows button:disabled,.round-tool:disabled,.playback-button:disabled { opacity: .35; cursor: default; }
.project-stack { min-width: 0; position: relative; padding-bottom: clamp(42px, 7vh, 90px); }
.project-stop { position: relative; height: 0; width: 0; scroll-margin: 0; }
.project-card-stage { --card: #f5f5f1; --card-text: #202424; --secondary: #545a57; --rule: #d1d4ce; --soft: #e7e9e3;
  --accent: #437d59; --canvas: #174438; --glow: #548263; --edge: #102b26;
  width: 100%; min-height: var(--card-height); display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr);
  margin: 0 0 clamp(28px, 4.5vh, 58px); padding: 9px; color: var(--card-text); background: var(--card);
  border: 1px solid var(--rule); border-radius: 24px; isolation: isolate; z-index: calc(var(--n) + 1); overflow: clip;
  box-shadow: 0 8px 30px -24px rgb(3 7 8 / 40%);
}
:root[data-theme="dark"] .project-card-stage { --card: #292c2b; --card-text: #f4f4ef; --secondary: #bbc2ba; --rule: #424744; --soft: #353a36; --accent: #a3cfaa; }
.project-card-stage[data-theme-project="captain"] { --canvas: #32495a; --glow: #8396a0; --edge: #1f3444; --accent: #467494; }
.project-card-stage[data-theme-project="ops"] { --canvas: #3a3543; --glow: #746779; --edge: #29242f; --accent: #775c8e; }
.project-card-stage[data-theme-project="insight"] { --canvas: #b7abbe; --glow: #e8deea; --edge: #94859e; --accent: #775590; }
:root[data-theme="dark"] .project-card-stage[data-theme-project="captain"] { --card: #292d31; --rule: #43494c; --secondary: #bfc6cb; --soft: #373c40; --accent: #a8c3d7; }
:root[data-theme="dark"] .project-card-stage[data-theme-project="ops"] { --card: #2d2a30; --rule: #47424a; --secondary: #c4bec8; --soft: #3b373e; --accent: #c2accd; }
:root[data-theme="dark"] .project-card-stage[data-theme-project="insight"] { --card: #302c33; --rule: #49444d; --secondary: #c7bfcb; --soft: #403b44; --accent: #dbc4e3; }
.project-card-stage:last-child { margin-bottom: 0; }
@media (min-width: 781px) and (min-height: 620px) {
  .project-card-stage { position: sticky; top: calc(var(--pin) + var(--n) * 7px); }
}
.product-art { position: relative; margin: 0; min-width: 0; overflow: hidden; border-radius: 16px; isolation: isolate;
  background: radial-gradient(ellipse at 40% 32%, var(--glow) 0, transparent 65%),linear-gradient(145deg,var(--canvas) 30%,var(--edge) 100%); }
.product-art::before { content: ""; position: absolute; inset: 0; opacity: .22; pointer-events: none; background: linear-gradient(118deg, transparent 35%,rgb(255 255 255 / 10%) 36%,transparent 46%); }
/* Modular quarter-circles frame software previews in their existing palettes. */
.corner-pattern { position: absolute; inset: 0; overflow: hidden; pointer-events: none; color: var(--arc-ink, #e1f4de); }
.pattern-start { position: absolute; top: 0; left: 0; width: 30%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); gap: 2%; }
.corner-pattern span { display: block; aspect-ratio: 1; background: currentColor; opacity: .32;
  mask: radial-gradient(circle farthest-side at 0 0,transparent 66.8%,#000 67.4% 99.4%,transparent 100%); }
.pattern-start span:nth-child(1) { grid-area: 1 / 1; opacity: .38; }
.pattern-start span:nth-child(2) { grid-area: 1 / 2; opacity: .28; }
.pattern-start .pattern-disc { grid-area: 2 / 1; opacity: .36; mask: radial-gradient(circle farthest-side at 0 100%,#000 99.4%,transparent 100%); }
.pattern-start span:nth-child(4) { grid-area: 2 / 2; transform: rotate(270deg); }
.pattern-start span:nth-child(5) { grid-area: 2 / 3; transform: rotate(270deg); opacity: .27; }
.pattern-start span:nth-child(6) { grid-area: 3 / 1; transform: rotate(180deg); opacity: .29; }
.pattern-end { position: absolute; right: 0; bottom: 12%; width: 18%; aspect-ratio: 1.15; }
.pattern-end span { position: absolute; width: 51%; bottom: 0; }
.pattern-end span:nth-child(1) { width: 36%; right: 48%; bottom: 58%; transform: rotate(180deg); opacity: .34; }
.pattern-end span:nth-child(2) { left: 0; transform: rotate(270deg); opacity: .29; }
.pattern-end span:nth-child(3) { right: 0; transform: rotate(180deg); opacity: .38; }
[data-theme-project="captain"] .corner-pattern { --arc-ink: #dcecf8; }
[data-theme-project="ops"] .corner-pattern { --arc-ink: #f1e3f5; }
[data-theme-project="insight"] .corner-pattern { --arc-ink: #59436a; }
.art-stage { position: absolute; inset: 12px 12px 36px; container-type: size; display: grid; place-items: center; }
/* The content box is the original screen. All materials sit outside its edge. */
.hardware { --rim: clamp(3.5px,.85cqw,6px); --max-w: 94cqw; --max-h: 96cqh;
  position: relative; display: block; width: min(var(--max-w), calc(var(--max-h) * var(--aspect))); aspect-ratio: var(--aspect); border: 0; padding: 0;
  border-radius: var(--corners); background: #19201d; box-shadow: 0 0 0 1px #111714, 0 0 0 var(--rim) #29302d, 0 0 0 calc(var(--rim) + 1px) #a6afa7, 1px 5px 6px #06151044, 4px 18px 25px -5px #06151059; }
.screen-glass,.screen-clip { display: block; overflow: hidden; border-radius: inherit; clip-path: inset(0 round var(--corners)); }
.screen-glass { position: absolute; inset: 0; }
.screen-clip { position: relative; }
.screen-glass img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.hw-desktop { --max-w: 85cqw; --max-h: 88cqh; margin-bottom: clamp(6px,1.75cqw,12px); }
.hw-desktop::after { content: ""; position: absolute; left: -6%; width: 112%; top: calc(100% + var(--rim)); height: clamp(6px,1.75cqw,12px);
  border-radius: 2px 2px 12% 12% / 1px 1px 78% 78%;
  background: radial-gradient(ellipse at 50% 0%,#59615f 0 34%,transparent 40%) center top / 17% 60% no-repeat, linear-gradient(0deg,#59625e,#9ba39f 44%,#c6ccc8 72%,#e1e4e1);
  box-shadow: 0 3px 4px #0a151438; }
.product-art figcaption { position: absolute; z-index: 4; bottom: 16px; left: 18px; right: 59px; display: flex; align-items: center; gap: 8px;
  color: #f1f5ef; font-size: 10px; font-weight: 450; letter-spacing: .025em; line-height: 1.4; text-shadow: 0 1px 4px #16271e80; }
.product-art figcaption::before { content: ""; width: 15px; height: 1px; flex: 0 0 15px; background: currentColor; opacity: .8; }
[data-theme-project="insight"] figcaption {color:#302334; text-shadow:none;}
/* Gestures sit above the screen while its frames crossfade inside the bezel. */
.card-film { display: block; position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.card-film [hidden],.inline-preview-toggle[hidden],.inline-preview-toggle [hidden] { display: none !important; }
.inline-preview-toggle {
  position: absolute; right: 12px; bottom: 8px; z-index: 5; width: 34px; height: 34px;
  display: grid; place-items: center; padding: 0; border: 1px solid rgb(245 250 245 / 32%); border-radius: 50%;
  background: rgb(22 33 29 / 65%); color: #fff;
}
.inline-preview-toggle span { display: flex; }
.inline-preview-toggle:hover { background: #24342d; }
[data-theme-project="insight"] .inline-preview-toggle { color: #342c3b; background: #f7f3f6bd; border-color: #61566b66; }
.screen-glass > .frame-outgoing,.screen-clip > .frame-outgoing { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; z-index: 1; pointer-events: none; }
.card-film .demo-pointer svg { width: clamp(6px,min(2cqw,1.45vw),10px); }
.card-film .touch-contact { width: clamp(6px,min(1.65cqw,1.3vw),9px); }
.card-film .demo-pointer.is-tapping::before { width: 12px; height: 12px; left: -6px; top: -6px; }

.product-info { container-type: inline-size; display: flex; min-width: 0; align-items: flex-start; align-self: center; flex-direction: column; padding: 23px clamp(18px, 2vw, 36px); }
.product-role { margin: 0 0 9px; display: flex; align-items: center; gap: 7px; font-size: 10px; letter-spacing: .13em; line-height: 1.5; text-transform: uppercase; font-weight: 550; color: var(--accent); }
.product-role > span { border-radius: 50%; width: 5px; height: 5px; background: currentColor; }
.product-info h2 { margin: 0; font-size: clamp(25px, 2.52vw, 40px); line-height: 1.13; font-weight: 550; letter-spacing: -.055em; text-wrap: balance; }
.project-description { margin: 9px 0 0; max-width: 40ch; font-size: clamp(13px, 1.1vw, 16px); line-height: 1.5; letter-spacing: -.012em; color: var(--secondary); }
.project-credits { display: grid; row-gap: 5px; width: 100%; margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); font-size: clamp(12px,.88vw,13px); line-height: 1.45; }
.project-credits div { display: grid; grid-template-columns: 4.4em minmax(0,1fr); gap: 9px; }
.project-credits dt { color: var(--secondary); }
.project-credits dd { margin: 0; color: var(--card-text); }
.project-credits div:first-child dd { font-weight: 550; }
.device-tabs { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 2px; max-width: 100%; padding: 3px; border-radius: 999px; background: var(--soft); }
.preview-controls,.prototype-selection { display: flex; flex-wrap: nowrap; align-items: center; gap: 7px; white-space: nowrap; }
.preview-controls { max-width: 100%; margin-top: 17px; }
.appearance-switch { display: inline-flex; flex: none; gap: 2px; align-items: center; border: 1px solid var(--rule,var(--line)); padding: 2px; border-radius: 999px; color: var(--card-text,var(--ink)); background: var(--soft); }
.appearance-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 999px; background: transparent; color: var(--secondary,var(--body-copy)); min-height: 36px; padding: 5px 9px; font: inherit; font-size: 12px; font-weight: 500; line-height: 1; }
.appearance-switch button[aria-pressed="true"] { color: var(--card,var(--paper)); background: var(--card-text,var(--ink)); }
.appearance-switch button:not([aria-pressed="true"]):hover { color: var(--card-text,var(--ink)); }
.device-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid transparent; min-height: 36px; border-radius: 999px; padding: 5px 8px; font-family: inherit; font-size: 11.5px; line-height: 1; white-space: nowrap; font-weight: 500; color: var(--secondary,var(--muted)); background: transparent; }
.device-tabs button[aria-pressed="true"] { color: var(--card-text,var(--ink)); background: var(--card,var(--paper)); border-color: var(--rule,var(--line)); box-shadow: 0 1px 3px #0002; }
.device-tabs button:not([aria-pressed="true"]):hover { color: var(--card-text,var(--ink)); }
.single-device { display: inline-flex; align-items: center; gap: 7px; color: var(--secondary); font-size: 12px; padding: 8px 12px; border: 1px solid var(--rule,var(--line)); border-radius: 999px; }
.project-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 17px; margin-top: 14px; }
.try-button,.visit-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; line-height: 1.2; font-size: 13px; font-weight: 500; }
.try-button { border-radius: 999px; background: var(--card-text); color: var(--card); border: 1px solid transparent; min-height: 40px; padding: 8px 15px; }
.try-button:hover { opacity: .89; }
.visit-link { color: var(--card-text); min-height: 36px; border-bottom: 1px solid transparent; }
.visit-link:hover { text-decoration: underline; text-underline-offset: 4px; }
html:has(.portfolio-study) { scrollbar-gutter: stable; }
.prototype-dialog { --stage: #dfebe4; --stage-light: #f3f6f0; --ring: #567c6733; --accent-ink: #437458;
  position: fixed; inset: 0; width: min(1340px, calc(100vw - 46px)); height: min(90dvh, 920px); max-width: none; max-height: none; margin: auto; padding: 0;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.prototype-dialog[data-project="captain"] { --stage: #dfe7ee; --stage-light: #f3f6f8; --ring: #37567033; --accent-ink: #456b82; }
.prototype-dialog[data-project="ops"],.prototype-dialog[data-project="insight"] { --stage: #e6dfea; --stage-light: #f8f4f8; --ring: #77658333; --accent-ink: #755887; }
:root[data-theme="dark"] .prototype-dialog { --stage: #182921; --stage-light: #2a3d30; --ring: #9bc4a530; --accent-ink: #a9cbac; }
:root[data-theme="dark"] .prototype-dialog[data-project="captain"] { --stage: #1b2a35; --stage-light: #334450; --ring: #acc7d730; --accent-ink: #acccdf; }
:root[data-theme="dark"] .prototype-dialog:is([data-project="ops"],[data-project="insight"]) { --stage: #2c2632; --stage-light: #403648; --ring: #d0b7d830; --accent-ink: #d0b9d8; }
.prototype-dialog [hidden] { display: none !important; }
.prototype-dialog::backdrop { background: rgb(7 10 9 / 74%); backdrop-filter: blur(5px); }
.prototype-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr); }
.prototype-head { padding: 12px 17px 12px 24px; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 14px; align-items: center; border-bottom: 1px solid var(--line); }
#prototype-title { font-size: clamp(17px,1.48vw,21px); line-height: 1.1; font-weight: 600; letter-spacing: -.05em; }
.window-tools { display: flex; align-items: center; justify-self: end; gap: 7px; }
#prototype-devices { display: flex; align-items: center; min-width: 0; }
.prototype-selection .device-tabs,.prototype-selection .single-device { margin: 0; }
.prototype-selection .device-tabs { flex-wrap: nowrap; }
.prototype-selection .device-tabs button { font-size: 12px; padding-inline: 10px; min-height: 36px; }
.prototype-selection .single-device { color: var(--body-copy); }
.zoom-tool[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.prototype-body { min-height: 0; display: grid; grid-template-columns: clamp(216px,22%,286px) minmax(0,1fr); }
.prototype-guide { display: flex; flex-direction: column; gap: 22px; min-height: 0; overflow: auto; padding: clamp(19px,2vw,31px); border-right: 1px solid var(--line); }
.chapter-nav { flex: none; }
.chapter-nav h3 { margin: 0 0 9px; font-size: 12px; font-weight: 550; color: var(--muted); }
#prototype-chapters { display: grid; gap: 3px; }
#prototype-chapters button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 7px 12px; text-align: left; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--body-copy); font: inherit; font-size: 13px; line-height: 1.35; }
#prototype-chapters button::before { content: ""; width: 9px; flex: 0 0 9px; height: 2px; border-radius: 2px; background: var(--line); }
#prototype-chapters button:hover { color: var(--ink); background: var(--hover-surface); }
#prototype-chapters button[aria-current] { color: var(--ink); background: var(--soft); border-color: var(--line); font-weight: 550; }
#prototype-chapters button[aria-current]::before { background: var(--accent-ink); }
#prototype-chapters button[data-chapter="gallery"] { margin-top: 5px; }
.flow-picker { display: none; min-width: 0; gap: 7px; color: var(--muted); }
.flow-picker > span { font-size: 11px; font-weight: 550; }
#prototype-flow,#gallery-screen { width: 100%; max-width: 100%; padding: 9px 12px; min-height: 41px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; font-family: inherit; font-size: 12px; line-height: 1.3; cursor: pointer; text-overflow: ellipsis; }
.step-copy { min-width: 0; }
.step-guide { margin-block: auto; }
.step-meter { display: flex; align-items: center; gap: 12px; margin-bottom: 17px; }
#step-number { flex: none; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.step-track { height: 2px; flex: 1; border-radius: 2px; overflow: hidden; background: var(--line); }
.step-track i { display: block; height: 100%; background: var(--accent-ink); transform: scaleX(var(--progress,0)); transform-origin: left; transition: transform .15s ease; }
.step-copy h3 { margin: 0; color: var(--ink); font-size: clamp(22px,1.95vw,29px); font-weight: 550; letter-spacing: -.055em; line-height: 1.14; text-wrap: balance; }
.step-copy p { margin: 13px 0 0; color: var(--body-copy); font-size: 13px; line-height: 1.65; }
#step-equivalent { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.prototype-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; max-height: 107px; overflow: auto; padding: 3px; margin-inline: -3px; }
.prototype-actions button,.screen-error button { min-height: 36px; margin: 0; padding: 6px 11px; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; line-height: 1.3; }
.prototype-actions button:hover,.screen-error button:hover { border-color: var(--subtle); }
.step-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.step-controls [data-step="-1"] { margin-left: auto; }
.step-controls:has([data-restart]:not([hidden])) .round-tool { width: 35px; height: 35px; }
.playback-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 15px; border: 1px solid transparent; border-radius: 999px; background: var(--ink); color: var(--paper); font: inherit; font-size: 13px; font-weight: 550; }
.playback-button:not(:disabled):hover { opacity: .85; }
.prototype-canvas { --mat-padding: clamp(15px,1.8vw,28px); min-width: 0; min-height: 0; position: relative; isolation: isolate; overflow: hidden; overscroll-behavior: contain;
  background: radial-gradient(ellipse at 39% 29%,var(--stage-light),transparent 75%),var(--stage); }
.prototype-canvas>.corner-pattern { color:var(--accent-ink); }
.prototype-canvas>.screen-mat { position:relative;z-index:1; }
.prototype-canvas[data-zoom="true"] { overflow: auto; }
.screen-mat { width: max-content; height: max-content; min-width: 100%; min-height: 100%; display: grid; place-items: center; padding: var(--mat-padding); box-sizing: border-box; }
.prototype-surface { --rim: clamp(4px,.48vw,7px); position: relative; flex: none; border-radius: var(--corners); background: #19201d;
  box-shadow: 0 0 0 1px #101612,0 0 0 var(--rim) #29302d,0 0 0 calc(var(--rim) + 1px) #a0a8a2,0 12px 28px -6px #0a150f4d; }
#prototype-pixels { width: 100%; height: auto; max-width: none; display: block; }
#prototype-targets { position: absolute; inset: 0; z-index: 2; }
#prototype-targets button { position: absolute; display: block; padding: 0; margin: 0; border: 0; background: transparent; border-radius: 4px; }
#prototype-targets button:is(:hover,:focus-visible) { outline: 2px solid #319362; outline-offset: -2px; background: #67d49728; }
.playback-button [data-symbol] { display: inline-flex; align-items: center; }
.demo-pointer { position: absolute; z-index: 3; pointer-events: none; width: 0; height: 0; }
.demo-pointer svg { position: absolute; left: -1px; top: -1px; width: clamp(10px,.95vw,13px); height: auto; overflow: visible; filter: drop-shadow(0 1px 2px #0009); }
.demo-pointer.is-tapping::before { content: ""; position: absolute; width: 17px; height: 17px; left: -8.5px; top: -8.5px; border: 1px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #243e39; animation: tour-tap 190ms ease-out both; }
@keyframes tour-tap { from { transform: scale(.42); opacity: 1; } to { transform: scale(1.18); opacity: 0; } }
.touch-contact { position: absolute; z-index: 3; pointer-events: none; width: clamp(8px,.75vw,11px); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%,-50%); border: 1.25px solid white; background: #33423fcc; box-shadow: 0 0 0 1px #162b2777,0 1px 4px #15221c44; animation: finger-contact 265ms ease-out both; }
.touch-contact::after { content: ""; position: absolute; inset: -1px; border: 1px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #283d3577; animation: contact-ripple 265ms ease-out both; }
@keyframes finger-contact { 0% { scale: .85; opacity: .35; } 18%,72% { scale: 1; opacity: 1; } 100% { scale: .92; opacity: 0; } }
@keyframes contact-ripple { 0%,12% { transform: scale(.9); opacity: 0; } 30% { opacity: .9; } 100% { transform: scale(1.65); opacity: 0; } }
.prototype-dialog[data-input="touch"] .demo-pointer,.prototype-dialog[data-input="mouse"] .touch-contact { display: none; }
@media (hover:hover) {
  .prototype-dialog[data-input="touch"] .screen-clip,.prototype-dialog[data-input="touch"] #prototype-targets button { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='7' cy='7' r='3.25' fill='%2333423f' fill-opacity='.46' stroke='white' stroke-width='2'/%3E%3Ccircle cx='7' cy='7' r='4.6' fill='none' stroke='%231a2f29' stroke-opacity='.65'/%3E%3C/svg%3E") 7 7, crosshair; }
  .prototype-dialog[data-input="mouse"] .screen-clip,.prototype-dialog[data-input="mouse"] #prototype-targets button { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='16' viewBox='0 0 24 28'%3E%3Cpath d='M2 2l18 12-9 1.5-4.6 8.8z' fill='%23162525' stroke='white' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 1 1, auto; }
  .prototype-dialog[data-playing="true"] .screen-clip,.prototype-dialog[data-playing="true"] #prototype-targets button,.screen-glass:has(.card-film[data-playing="true"]) { cursor: none; }
  .prototype-dialog:is([data-playing="true"],[data-input="touch"]) #prototype-targets button:hover:not(:focus-visible) { outline: 0; background: transparent; }
}
.screen-error { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--paper); }
:where(.portfolio-study,.prototype-dialog) :is(button,a,select):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.device-short { display: none; }
@media (max-width:1080px) {
  .showcase-grid { grid-template-columns: clamp(176px,19vw,205px) minmax(0,1fr); gap: 17px; }
  .index-scale { --needle: 31px; --row: 54px; }
  .index-scale a { gap: 9px; }
  .product-info { padding-inline: 18px; }
  .project-card-stage { grid-template-columns: minmax(0,1.14fr) minmax(0,1fr); min-height: 420px; }
  .product-info h2 { font-size: 28px; }

}
@media (max-width:900px) {
  .showcase-grid { grid-template-columns: clamp(165px,20vw,183px) minmax(0,1fr); gap: 13px; }
  .prototype-head { grid-template-columns: minmax(0,1fr) auto auto; padding: 10px 14px; }
  .prototype-guide { padding: 17px; }
  .project-actions { gap: 6px 12px; }
}
@media (max-width:780px) {
  .study-intro { margin-bottom: 21px; padding: 28px 0 19px; align-items: flex-start; }
  .study-intro > p { font-size: 12px; }
  .project-card-stage { position: relative; grid-template-columns: minmax(0,1fr); border-radius: 19px; padding: 7px; min-height: 0; margin-bottom: 22px; }
  .product-art { height: clamp(283px,55vw,400px); border-radius: 13px; }
  .product-info { padding: 24px 18px 20px; }
  .product-role { font-size: 10px; margin-bottom: 9px; }
  .product-info h2 { font-size: clamp(24px,4.7vw,30px); }
  .project-description { font-size: 13px; line-height: 1.55; max-width: 48ch; margin-top: 9px; }
  .preview-controls { margin-top: 15px; }
  .project-actions { margin-top: 15px; gap: 8px 16px; }
  .product-art figcaption { font-size: 10px; left: 12px; bottom: 10px; }
  .project-stack { padding-bottom: 30px; }
}
@media (max-width:900px) and (orientation:portrait), (max-width:760px) and (min-height:551px), (max-width:590px) {
  .prototype-dialog { width: calc(100vw - 10px); height: calc(100dvh - 12px); border-radius: 15px; }
  .prototype-head { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "title tools" "device device"; gap: 4px 9px; padding: 7px 12px 9px; }
  #prototype-title { grid-area: title; font-size: 17px; }
  .window-tools { grid-area: tools; }
  .prototype-selection { justify-content: center; }
  .prototype-selection { grid-area: device; min-width: 0; }
  .prototype-selection .device-tabs { width: auto; }
  .prototype-selection .device-tabs button { min-height: 36px; gap: 4px; padding-inline: 7px; }
  .prototype-selection .device-short { display: inline; }
  .prototype-selection .device-label { display: none; }
  .prototype-body { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr) min(34dvh,clamp(150px,22dvh,180px)); }
  .prototype-canvas { grid-row: 1; --mat-padding: 12px; }
  .prototype-guide { grid-row: 2; display: grid; grid-template-columns: minmax(0,1fr) auto; align-content: start; align-items: center; gap: 5px 9px; padding: 8px 11px; max-height: 34dvh; border: 0; border-top: 1px solid var(--line); }
  .chapter-nav { display: none; }
  .flow-picker { display: grid; grid-area: 1 / 1; }
  .flow-picker > span { display: none; }
  #prototype-flow { min-height: 36px; font-size: 11px; }
  .step-controls { grid-area: 1 / 2; gap: 4px; }
  .step-controls .round-tool { width: 40px; height: 40px; }
  .playback-button { min-height: 40px; padding: 6px 10px; gap: 2px; }
  .step-guide { grid-area: 2 / 1 / 3 / -1; margin: 0; display: grid; grid-template-columns: auto minmax(0,1fr); min-height: 57px; align-content: start; align-items: baseline; gap: 3px 9px; }
  .step-meter { margin: 0; gap: 7px; }
  .step-track { display: none; }
  .step-copy p { margin: 2px 0 0; font-size: 11px; line-height: 1.4; }
  .step-copy h3 { font-size: 15px; line-height: 1.3; }
  #step-equivalent { margin-top: 2px; }
  .prototype-actions { grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto; padding: 2px; margin: 0 -2px; }
  .prototype-actions button { flex: none; min-height: 32px; font-size: 11px; }
}
@media (max-width:590px) {
  .window-tools { gap: 4px; }
  .window-tools .round-tool { width: 35px; height: 35px; }
  .prototype-selection { gap: 6px; }
  .study-intro { display: block; padding-top: 24px; margin-bottom: 15px; }
  .study-intro h1 { font-size: 33px; }
  .study-intro > p { margin: 9px 0 0; max-width: 45ch; }
  .intro-break { display: none; }
  .showcase-grid { grid-template-columns: 44px minmax(0,1fr); gap: 4px; }
  .project-sidebar { top: calc(var(--header-height) + 26px); }
  .index-head,.index-name,.project-arrows { display: none; }
  .index-scale { --row: 54px; --needle: 29px; }
  .index-scale a { width: 44px; }
  .index-scale a:focus-visible::after { content: attr(title); position: absolute; left: 33px; z-index: 4; white-space: nowrap; padding: 5px 9px; background: var(--ink); color: var(--paper); border-radius: 5px; font-size: 12px; }
  .tick::before { width: 16px; }
  .index-scale li:not(:last-child)::after { width: 7px; }
  .product-info { padding: 17px 11px 14px; }
  .product-info h2 { font-size: 25px; }
  .product-art { height: clamp(260px,80vw,360px); }
  .try-button,.visit-link { min-height: 42px; }
}
@container (max-width:510px) {
  .preview-controls { gap: 5px; }
  .preview-controls .device-label { display: none; }
  .preview-controls .device-short { display: inline; }
  .preview-controls button { padding-inline: 7px; }
}
@container (max-width:412px) {
  .preview-controls .device-tabs svg { display: none; }
  .preview-controls .device-tabs button { padding-inline: 5px; }
}
@container (max-width:340px) {
  .preview-controls .appearance-switch svg { display: none; }
}
@container (max-width:301px) {
  .preview-controls .appearance-switch button { width: 36px; padding: 0; }
  .preview-controls .appearance-switch svg { display: block; }
  .preview-controls .appearance-switch button span { display: none; }
  .preview-controls .device-tabs button { padding-inline: 4px; }
}
@container (max-width:280px) {
  .preview-controls .device-tabs button { padding-inline: 3px; }
  .preview-controls { gap: 4px; }
}
@container (max-width:264px) {
  .preview-controls .device-tabs svg { display: block; }
  .preview-controls .device-tabs button { width: 33px; padding-inline: 0; }
  .preview-controls .device-tabs .device-short { display: none; }
}
@media (max-width:405px) {
  .prototype-selection .appearance-switch button { width: 36px; padding: 0; }
  .prototype-selection .appearance-switch span { display: none; }
}
@media (max-width:345px) {
  .prototype-selection .device-tabs button { padding-inline: 5px; }
  .prototype-selection .device-tabs svg { display: none; }
}
@media (min-width:600px) and (max-width:900px) and (orientation:portrait) {
  .prototype-head,.prototype-head:has(.single-device) { padding: 10px 14px; grid-template-columns: minmax(0,1fr) auto auto; grid-template-areas: "title device tools"; }
  .prototype-guide { padding: 11px 18px; }
  .prototype-selection .device-tabs button { padding-inline: 10px; }
  .flow-picker { max-width: 290px; }
  .step-copy p { display: block; margin: 2px 0 0; }
}
@media (max-height:550px) and (min-width:591px) {
  .prototype-dialog { width: calc(100vw - 14px); height: calc(100dvh - 12px); border-radius: 12px; }
  .prototype-head { padding: 4px 11px; }
  .prototype-body { grid-template-columns: 205px minmax(0,1fr); }
  .prototype-guide { padding: 10px 14px; gap: 9px; }
  .chapter-nav { display: none; }
  .flow-picker { display: grid; }
  .step-meter,.prototype-actions { margin-block: 5px; }
  .step-guide h3 { font-size: 19px; }
  .step-copy p { margin-top: 5px; font-size: 12px; }
}
@media (min-width:591px) and (max-width:760px) and (max-height:550px) {
  .prototype-head { gap: 8px; }
  .prototype-selection .device-tabs button { padding-inline: 7px; }
  .prototype-selection .device-label,.prototype-selection .appearance-switch svg { display: none; }
  .prototype-selection .device-short { display: inline; }
  .prototype-selection .appearance-switch button { padding-inline: 7px; }
  .window-tools .round-tool { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  .step-track i { transition: none; }
  .demo-pointer.is-tapping::before { animation: none; }
  .touch-contact,.touch-contact::after { animation: none; }
  .touch-contact::after { display: none; }
}
