/* Sign-in, onboarding, and the in-app connect / reconnect moments.
   One focused canvas per moment in the landing page's visual language:
   #fafafa ground, two-tone Instrument Sans headlines, mono footnotes, black actions. */
:root { color-scheme: light; }
* { box-sizing: border-box; }
html { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
.overlay-scrollbar { position: fixed; z-index: 300; width: 10px; opacity: 0; pointer-events: none; touch-action: none; transition: opacity 550ms ease; }
.overlay-scrollbar[hidden] { display: none; }
html.scrollbars-active .overlay-scrollbar { opacity: 1; pointer-events: auto; }
.overlay-scrollbar-thumb { position: absolute; top: 0; right: 2px; width: 4px; border-radius: 999px; background: rgb(30 33 32 / 48%); }
body.flow-page { min-width: 320px; margin: 0; background: #fafafa; }

.flow { --ink: #101010; --text: #404040; --muted: #777; --faint: #8b8b88; --line: #e2e2df; --ease: cubic-bezier(.2, .7, .2, 1);
  display: flex; min-height: 100svh; flex-direction: column; color: var(--text); background: #fafafa;
  font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.flow a:not(.btn) { color: inherit; }
.flow .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.flow :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.flow .moment-title:focus, .flow .moment-title:focus-visible { outline: none; }
.flow strong { color: var(--ink); font-weight: 600; }

/* Canvas */
/* The one header: landing, pricing, account, onboarding, 404 and in-app sheets.
   Its gutters follow the 1137px content column; its actions are text links or btn-sm. */
.flow-top { position: fixed; inset: 0 0 auto; z-index: 40; display: flex; height: 60px; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0 max(32px, calc((100vw - 1137px) / 2)); color: #404040; background: rgb(250 250 250 / 82%); font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif; backdrop-filter: blur(16px); -webkit-font-smoothing: antialiased; view-transition-name: flow-top; }
.flow-logo { display: inline-grid; flex: none; width: 2rem; height: 2rem; place-items: center; }
.flow-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.flow-nav { position: absolute; top: 50%; left: 50%; display: flex; gap: 2.4rem; transform: translate(-50%, -50%); }
.flow-nav a { color: #404040; font-size: .82rem; font-weight: 520; text-decoration: none; white-space: nowrap; transition: color 200ms ease; }
.flow-nav a:hover, .flow-nav a[aria-current="page"] { color: #101010; }
.flow-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: #c2c2c0; text-underline-offset: .45em; }
.flow-nav a:focus-visible, .flow-logo:focus-visible { outline: 2px solid #101010; outline-offset: 3px; border-radius: 4px; }
.flow-top-end { display: flex; gap: 1.4rem; align-items: center; margin-left: auto; font-size: .82rem; }
.flow-account { color: var(--muted); }
.flow-stage { display: grid; flex: 1; place-items: center; padding: 128px 32px 96px; }
.flow-footnote { display: flex; justify-content: space-between; gap: 2rem; padding: 0 max(2rem, calc((100vw - 1137px) / 2)) 28px; color: var(--faint); font: 500 .58rem ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }

/* Moment */
.moment { display: flex; width: min(100%, 1160px); flex-direction: column; align-items: center; text-align: center; }
.moment-eyebrow { margin: 0 0 1.4rem; color: var(--muted); font: 500 .62rem ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.moment-title { margin: 0; color: var(--ink); font-size: clamp(3.6rem, 6vw, 6.4rem); font-weight: 520; letter-spacing: -.06em; line-height: .91; outline: none; }
.moment-title span { color: var(--muted); }
.moment-auth .moment-title { font-size: clamp(3.2rem, 5.2vw, 5.6rem); }
.moment-detail { max-width: 36rem; margin: 1.3rem auto 0; color: var(--muted); font-size: clamp(.95rem, 1.1vw, 1.06rem); line-height: 1.55; }
.moment-body { display: grid; width: min(100%, 35rem); gap: 1rem; margin-top: 2.8rem; text-align: left; }
.moment-auth .moment-body { width: min(100%, 25rem); margin-top: 2.4rem; }
.moment-actions { display: flex; flex-wrap: wrap; gap: .75rem 1.4rem; align-items: center; justify-content: center; margin-top: .8rem; }
.moment-wait { display: inline-flex; gap: .7rem; align-items: center; justify-self: center; margin: 0; color: #666; font: 500 .62rem ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }

/* Choreography: each moment's parts rise in sequence; View Transitions cross-fade the canvas. */
.reveal { animation: flow-rise 440ms var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 40ms); }
@keyframes flow-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes flow-fade-out { to { opacity: 0; transform: translateY(-10px) scale(.992); } }
@keyframes flow-fade-in { from { opacity: 0; } }
::view-transition-old(root) { animation: 280ms ease both flow-fade-out; }
::view-transition-new(root) { animation: 320ms ease 60ms both flow-fade-in; }
::view-transition-group(flow-top) { animation: none; }

/* Buttons: the one system for every surface (landing, pricing, account, onboarding, workspace).
   primary: the screen's action; `arrow` marks only a screen's single main call to action.
   secondary: every other action. text: inline and header links. inverse: primary on a dark section.
   Sizes: sm for headers and dense workspace rows, default, lg for moment calls to action. */
.btn { --btn-ease: cubic-bezier(.2, .7, .2, 1); display: inline-flex; min-height: 2.65rem; align-items: center; justify-content: center; gap: .65rem; margin: 0; padding: .35rem 1rem; border: 1px solid transparent; border-radius: 9px; font: inherit; font-size: .9rem; font-weight: 550; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; appearance: none; -webkit-appearance: none;
  font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease, box-shadow 220ms ease, transform 220ms var(--btn-ease), opacity 220ms ease; }
.btn:focus-visible { outline: 2px solid #101010; outline-offset: 3px; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn:disabled { cursor: not-allowed; opacity: .42; }
.btn.is-loading { cursor: progress; opacity: 1; }
.btn-primary { border-color: #171717; color: #fff; background: #111; box-shadow: 0 5px 12px rgb(0 0 0 / 8%); }
.btn-primary:hover:not(:disabled) { background: #000; box-shadow: 0 10px 22px rgb(0 0 0 / 14%); }
.btn-primary:has(.btn-arrow) { padding-right: .35rem; }
.btn-arrow { display: inline-grid; flex: none; width: 2rem; height: 2rem; place-items: center; margin-left: .35rem; border-radius: 6px; color: #111; background: #fff; transition: transform 260ms var(--btn-ease); }
.btn-arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary:hover:not(:disabled) .btn-arrow { transform: translate(1px, -1px); }
.btn-icon { display: inline-grid; place-items: center; }
.btn-icon svg { width: 17px; height: 17px; }
.btn-lg { min-height: 3.1rem; padding-left: 1.2rem; font-size: 1rem; }
.btn-lg .btn-arrow { width: 2.35rem; height: 2.35rem; }
.btn-sm { min-height: 2.25rem; gap: .45rem; padding: .3rem .85rem; border-radius: 8px; font-size: .8rem; }
.btn-sm.btn-primary { box-shadow: none; }
.btn-sm .btn-icon svg { width: 15px; height: 15px; }
.btn-sm .btn-arrow { width: 1.6rem; height: 1.6rem; border-radius: 5px; }
.btn-primary.btn-sm:has(.btn-arrow) { padding-right: .3rem; }
.btn-secondary { border-color: #d7d7d7; color: #222; background: #fff; }
.btn-secondary:hover:not(:disabled) { border-color: #111; color: #111; }
.btn-inverse { border-color: #f4f4f4; color: #111; background: #f4f4f4; }
.btn-inverse:hover:not(:disabled) { border-color: #fff; background: #fff; box-shadow: 0 10px 26px rgb(0 0 0 / 30%); }
.btn-inverse:has(.btn-arrow) { padding-right: .35rem; }
.btn-inverse .btn-arrow { color: #fff; background: #111; }
.btn-inverse:hover:not(:disabled) .btn-arrow { transform: translate(1px, -1px); }
.btn-inverse:focus-visible { outline-color: #f4f4f4; }
.btn-text { min-height: 0; padding: .2rem 0; border: 0; border-radius: 0; color: var(--text, #404040); background: transparent; font-weight: 520; text-decoration: underline; text-decoration-color: #c2c2c0; text-underline-offset: .3em; }
.btn-text:hover:not(:disabled) { color: var(--ink, #101010); text-decoration-color: currentColor; }
.flow-top .btn-text { font-size: .82rem; text-decoration: none; }
.flow-top .btn-text:hover:not(:disabled) { text-decoration: underline; text-decoration-color: #c2c2c0; }
.ui-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgb(0 0 0 / 14%); border-top-color: currentColor; border-radius: 50%; animation: flow-spin 800ms linear infinite; }
.btn-primary .ui-spinner { border-color: rgb(0 0 0 / 12%); border-top-color: #111; }
@keyframes flow-spin { to { transform: rotate(360deg); } }

/* Segmented switch */
.segmented { position: relative; display: grid; grid-template-columns: repeat(var(--segments), 1fr); padding: 4px; border: 1px solid #e3e3e0; border-radius: 11px; background: #f0f0ee; }
.segmented-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--segments)); border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 8%), 0 4px 12px rgb(0 0 0 / 5%); transform: translateX(calc(100% * var(--segment-index))); transition: transform 380ms var(--ease); }
.segment { position: relative; z-index: 1; margin: 0; padding: .62rem .5rem; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font: inherit; font-size: .86rem; font-weight: 550; cursor: pointer; appearance: none; transition: color 260ms ease; }
.segment[aria-selected="true"] { color: var(--ink); }

/* Fields */
.field { display: grid; gap: .45rem; }
.field-label { color: #555; font-size: .78rem; font-weight: 560; }
.field-control { position: relative; }
.field-input { display: block; width: 100%; height: 3.1rem; margin: 0; padding: 0 1rem; border: 1px solid #dcdcd9; border-radius: 10px; color: var(--ink); background: #fff; font: inherit; font-size: 1rem; outline: none; appearance: none; -webkit-appearance: none; transition: border-color 200ms ease, box-shadow 200ms ease; }
.field-input::placeholder { color: #aaa; }
.field-input:hover { border-color: #c4c4c1; }
.field-input:focus { border-color: #111; box-shadow: 0 0 0 4px rgb(17 17 17 / 6%); }
.field-input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px #fff inset; -webkit-text-fill-color: var(--ink); }
.field-control:has(.field-reveal) .field-input { padding-right: 4.6rem; }
.field-reveal { position: absolute; top: 50%; right: .5rem; margin: 0; padding: .38rem .6rem; border: 0; border-radius: 6px; color: #444; background: #f2f2f0; font: inherit; font-size: .74rem; font-weight: 560; cursor: pointer; appearance: none; transform: translateY(-50%); transition: background-color 200ms ease; }
.field-reveal:hover { background: #e8e8e5; }
.field.has-error .field-input { border-color: #111; }
.field-hint, .field-error, .permissions-hint { display: flex; gap: .5rem; align-items: baseline; margin: 0; color: #888; font-size: .8rem; line-height: 1.4; }
.field-error, .permissions-hint { color: var(--text); animation: flow-rise 300ms var(--ease) both; }
.field-error::before, .permissions-hint::before { flex: none; width: 5px; height: 5px; border-radius: 50%; background: #111; content: ""; transform: translateY(-1px); }

/* Inline edit, e.g. a prefilled workspace name inside a sentence */
.inline-field { display: inline-flex; gap: .25rem; align-items: baseline; }
.inline-input { min-width: 4ch; margin: 0; padding: 0 .1rem .05rem; border: 0; border-bottom: 1px dashed #9a9a9a; border-radius: 0; color: var(--ink); background: transparent; font: inherit; font-weight: 600; text-align: center; outline: none; appearance: none; field-sizing: content; transition: border-color 200ms ease; }
.inline-input:hover { border-bottom-color: #555; }
.inline-input:focus { border-bottom: 1px solid #111; }
.inline-pen { width: .78em; height: .78em; fill: none; stroke: #999; stroke-width: 1.4; stroke-linejoin: round; }

/* Consent sentence with a switch */
.permissions { display: grid; gap: .55rem; }
.permission { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color 260ms ease, box-shadow 260ms ease; }
.permission:hover { border-color: #cdcdca; }
.permission.is-on { border-color: #cfcfcc; box-shadow: 0 6px 18px rgb(0 0 0 / 4%); }
.permission.needs-attention { border-color: #111; animation: flow-nudge 420ms var(--ease); }
@keyframes flow-nudge { 20% { transform: translateX(-5px); } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } }
.permission-input, .choice-input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.permission-track { position: relative; display: block; width: 2.6rem; height: 1.5rem; border-radius: 999px; background: #e2e2df; transition: background-color 260ms ease; }
.permission-track span { position: absolute; top: 3px; left: 3px; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 20%); transition: transform 320ms var(--ease); }
.permission.is-on .permission-track { background: #111; }
.permission.is-on .permission-track span { transform: translateX(1.1rem); }
.permission-input:focus-visible + .permission-track { outline: 2px solid #111; outline-offset: 3px; }
.permission-text { color: #222; font-size: .95rem; line-height: 1.4; }
.permission-tag { display: inline-block; margin-left: .55rem; padding: .12rem .38rem; border: 1px solid #e0e0dd; border-radius: 4px; color: #888; font: 500 .56rem ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; vertical-align: .15em; }

/* Choices */
.choices { display: grid; gap: .5rem; max-height: 17.5rem; margin: 0; padding: 0; overflow-y: auto; border: 0; scrollbar-width: none; }
.choice { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color 240ms ease, box-shadow 240ms ease; }
.choice:hover { border-color: #cdcdca; }
.choice.is-on { border-color: #111; box-shadow: 0 8px 22px rgb(0 0 0 / 6%); }
.choice-mark { width: 1.1rem; height: 1.1rem; border: 1.5px solid #bdbdbb; border-radius: 50%; transition: border-width 220ms var(--ease), border-color 220ms ease; }
.choice.is-on .choice-mark { border: 5px solid #111; }
.choice-input:focus-visible ~ .choice-mark { outline: 2px solid #111; outline-offset: 3px; }
.choice-title { overflow: hidden; color: var(--ink); font-size: 1.04rem; font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
.choice-title span { color: #8a8a88; font-weight: 450; }
.choice-tag { color: var(--faint); font: 500 .58rem ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }

/* Notices: neutral by default; attention is black ink, never a warning hue */
.notice { display: grid; grid-template-columns: auto 1fr; gap: .8rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; animation: flow-rise 360ms var(--ease) both; }
.notice-mark { width: 6px; height: 6px; margin-top: .42rem; border-radius: 50%; background: #a3a3a0; }
.notice-attention { border-color: #111; }
.notice-attention .notice-mark { background: #111; }
.notice-title { margin: 0; color: var(--ink); font-size: .88rem; font-weight: 600; }
.notice-text { margin-top: .2rem; color: #666; font-size: .85rem; line-height: 1.5; }
.notice-actions { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin-top: .75rem; }

/* Account */
.auth-form { display: grid; gap: 1rem; margin: 0; }
.auth-form > .btn-primary { width: 100%; justify-content: space-between; margin-top: .3rem; }
.auth-form > .moment-actions { justify-content: stretch; }
.auth-form > .moment-actions .btn { flex: 1 1 12rem; }
.auth-foot { margin: .2rem 0 0; color: #888; font-size: .82rem; line-height: 1.5; text-align: center; }
.auth-waiting { display: inline-flex; gap: .7rem; align-items: center; justify-self: center; margin: 0 0 .4rem; color: #555; font: 500 .62rem ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.setup-pulse { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #111; animation: flow-pulse 1.8s ease-out infinite; }
@keyframes flow-pulse { 0% { box-shadow: 0 0 0 0 rgb(17 17 17 / 32%); } 70%, 100% { box-shadow: 0 0 0 9px rgb(17 17 17 / 0%); } }

/* Setup: the black box opens while the wrkr reads */
.flow[data-moment="setup"] .flow-stage { display: block; padding: 0; place-items: normal; }
/* Head, scene and status are stacked rows, so the scene always starts below the head's actions.
   The scene row has three in-flow columns (measurements · box · discoveries): the measurements
   column is never narrower than its content, so nothing is positioned against the viewport or
   clipped at any width. overflow: clip cannot be scrolled by focus, so content never shifts. */
.setup { position: relative; display: grid; height: 100svh; min-height: 700px; box-sizing: border-box;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, 2.6fr) minmax(11rem, 1fr); grid-template-rows: auto minmax(180px, 1fr) auto;
  column-gap: clamp(1rem, 3vw, 3rem); overflow: clip; padding: clamp(96px, 13.5vh, 136px) max(40px, calc((100% - 1320px) / 2)) 0; }
.setup-head { position: relative; z-index: 3; display: flex; width: min(100%, 1100px); min-width: 0; flex-direction: column; grid-column: 1 / -1; align-items: center; justify-self: center; text-align: center; }
.setup-head .moment-title { font-size: clamp(3.4rem, 5.6vw, 6rem); }
.setup-head .moment-detail { max-width: 34rem; }
.setup-head .moment-actions { margin-top: 1.6rem; }
.setup-scene { position: relative; z-index: 1; min-width: 0; min-height: 0; grid-column: 1 / -1; grid-row: 2; margin: clamp(1rem, 3.5vh, 2.5rem) 0 0; transition: opacity 600ms ease, filter 600ms ease; }
.setup[data-phase="failed"] { padding-bottom: 6vh; }
.setup[data-phase="failed"] .setup-scene { opacity: .32; filter: grayscale(1); }
.setup-cause { width: min(100%, 32rem); margin-top: 1.6rem; }
.setup[data-phase="failed"] .setup-stream { opacity: 0; }
.setup-box { position: absolute; inset: 0; }
.setup-box canvas { display: block; width: 100%; height: 100%; animation: flow-fade-in 900ms ease both; }
.setup-box-fallback { position: absolute; top: 18%; left: 50%; width: min(46vw, 560px); height: 62%; background: linear-gradient(135deg, #303335, #111314 42%, #252729); box-shadow: inset -14px -9px 22px rgb(0 0 0 / 32%); opacity: 1; transform: translateX(-50%) skewY(-2deg); transition: opacity 400ms ease; }
.setup-box[data-ready="true"] .setup-box-fallback { opacity: 0; }
.setup-metrics, .setup-stream { position: relative; z-index: 3; grid-row: 2; align-self: end; margin: 0 0 clamp(1rem, 7vh, 4.5rem); text-align: left; }
.setup-metrics { display: grid; grid-column: 1; gap: 1.35rem; }
.setup-metrics div { opacity: .45; transition: opacity 500ms ease; }
.setup-metrics div[data-known="true"] { opacity: 1; }
.setup-metrics dt, .setup-stream-label { margin: 0; color: var(--faint); font: 500 .58rem ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.setup-metrics dd { margin: .3rem 0 0; color: var(--ink); font-size: clamp(1.9rem, 2.6vw, 2.6rem); font-weight: 520; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1; }
.counter.is-pending { color: #c9c9c6; }
.setup-stream { width: min(100%, 260px); min-width: 0; grid-column: 3; justify-self: end; }
.setup-stream ol { display: grid; gap: .7rem; margin: .9rem 0 0; padding: 0; list-style: none; }
.setup-stream li { color: #222; font-size: .92rem; line-height: 1.3; opacity: .42; animation: flow-stream 620ms var(--ease) both; transition: opacity 500ms ease; }
.setup-stream li:nth-last-child(-n + 2) { opacity: 1; }
.setup-stream li span { display: block; margin-bottom: .2rem; color: #999; font: 500 .54rem ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
@keyframes flow-stream { from { opacity: 0; filter: blur(4px); transform: translateY(12px); } }
.setup-status { position: relative; z-index: 3; display: flex; min-width: 0; max-width: 100%; grid-column: 1 / -1; gap: .7rem; align-items: center; justify-self: center; margin: 1rem 0 5.5vh; overflow: hidden; color: #666; font: 500 .6rem ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.setup-time { margin-left: .6rem; color: #9a9a97; }
.setup[data-phase="ready"] .setup-pulse, .setup[data-phase="connected"] .setup-pulse, .setup[data-phase="failed"] .setup-pulse { animation: none; }
.setup[data-phase="failed"] .setup-pulse { background: transparent; box-shadow: inset 0 0 0 1.5px #111; }
.setup-meter { position: absolute; z-index: 3; bottom: 0; left: 0; width: 100%; height: 2px; background: #e6e6e3; }
.setup-meter i { display: block; width: 100%; height: 100%; background: #292929; transform-origin: left; transition: transform 1200ms var(--ease); }

/* In-app sheet */
.flow-sheet { position: fixed; z-index: 200; inset: 0; overflow-y: auto; background: #fafafa; animation: flow-sheet-in 420ms var(--ease) both; scrollbar-width: none; }
.flow-sheet .flow-top { position: sticky; background: transparent; backdrop-filter: none; }
.flow-sheet .flow-stage { min-height: calc(100svh - 60px - 48px); padding-top: 64px; }
@keyframes flow-sheet-in { from { opacity: 0; transform: scale(1.015); } }

@media (max-width: 1050px) {
  .flow-top { padding-inline: 28px; }
  .flow-nav { display: none; }
}
@media (max-width: 760px) {
  .flow-top { padding-inline: 18px; }
  .flow-account { display: none; }
  .flow-top-end { gap: 1.1rem; }
  .flow-top .btn-sm { padding-inline: .75rem; }
  .flow-stage { place-items: start center; padding: 108px 18px 56px; }
  .moment-title, .moment-auth .moment-title { font-size: clamp(3rem, 12.4vw, 4.4rem); }
  .moment-eyebrow { margin-bottom: 1.1rem; }
  .moment-detail { max-width: 30ch; margin-top: 1rem; font-size: .95rem; }
  .moment-body, .moment-auth .moment-body { margin-top: 2rem; }
  .moment-actions { flex-direction: column; align-items: stretch; }
  .moment-actions .btn-primary { justify-content: space-between; }
  .moment-actions .btn-primary .btn-label { flex: 1; text-align: left; }
  .flow-footnote { padding: 0 18px 22px; font-size: .5rem; }
  .flow-footnote span:last-child { display: none; }
  .permission, .choice { padding: .9rem; gap: .8rem; }
  .permission-text { font-size: .9rem; }
  .setup { display: flex; height: auto; min-height: 100svh; flex-direction: column; padding: 100px 18px 72px; }
  .setup-head { position: static; width: 100%; }
  .setup-head .moment-actions { align-self: stretch; }
  .setup-head .moment-title { font-size: clamp(2.9rem, 12vw, 4.2rem); }
  .setup-scene { position: relative; inset: auto; height: 400px; margin: -70px -18px -80px; pointer-events: none; }
  .setup[data-phase="failed"] .setup-scene { height: 240px; margin: -30px -18px -50px; }
  .setup-metrics, .setup-stream { align-self: stretch; margin: 0; }
  .setup-metrics { position: static; grid-template-columns: 1fr 1fr; gap: 1.2rem 1rem; padding-top: 1.2rem; border-top: 1px solid #deded9; }
  .setup-stream { position: static; width: auto; margin-top: 1.6rem; }
  .setup-status { position: static; max-width: none; margin: 1.8rem 0 0; justify-self: start; white-space: normal; }
  .setup-meter { position: fixed; }
}
@media (prefers-reduced-motion: reduce) {
  .flow *, .flow *::before, .flow *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
