/* OrderSay features page. Live-surface grammar (docs/site/FEATURES-BRIEF.md).
   Loaded after scrollcraft.css and site.css, so the brand tokens, fonts and .cta come from there.
   The markup is the final state. html.js + [data-at]:not(.on) is the only "before" state, so
   without JavaScript every panel shows its end. Only transform, translate and opacity move. */

.fx {
  --chrome-h: 56px;
  --status-h: 44px;
  --line: #E2DBCD;
  --panel: var(--white);
  --soft: #4A5A6B;
  --tint: #FDEBD6;
  --row-h: 92px;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ------------------------------------------------------------- app chrome -- */
.chrome {
  position: fixed; inset: 0 0 auto; z-index: var(--sc-z-chrome);
  height: var(--chrome-h); display: flex; align-items: center; gap: 1.25rem;
  padding: 0 var(--gut); background: var(--white); border-bottom: 1px solid var(--line);
}
.chrome__brand { flex: none; display: flex; align-items: center; min-height: 44px; }
.chrome__brand img { display: block; }
.tabs { flex: 1; min-width: 0; height: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs ol { display: flex; height: 100%; margin: 0; padding: 0; list-style: none; }
.tab {
  display: flex; align-items: center; height: 100%; padding: 0 0.8rem; white-space: nowrap;
  font-family: var(--sc-font-display); font-weight: 500; font-size: 0.86rem;
  color: var(--soft); text-decoration: none; box-shadow: inset 0 0 0 transparent;
  transition: color var(--sc-d-fast) var(--sc-ease-out), box-shadow var(--sc-d-fast) var(--sc-ease-out);
}
.tab:hover { color: var(--ink); }
.tab[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--tape); }
.tab:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.chrome__langs { flex: none; display: flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.chrome__langs a {
  display: grid; place-items: center; min-width: 40px; min-height: 40px; border-radius: 8px;
  font-family: var(--sc-font-display); font-weight: 500; font-size: 0.8rem; color: var(--soft); text-decoration: none;
}
.chrome__langs a[aria-current="page"] { color: var(--ink); background: var(--paper); }

/* ------------------------------------------------- status bar + the ticket -- */
.status {
  position: fixed; inset: auto 0 0; z-index: var(--sc-z-chrome);
  height: var(--status-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 var(--gut); background: var(--ink); color: var(--paper); font-size: 0.8rem;
}
.status__demo { margin: 0; display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.status__demo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tape); }
.journey { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.journey__ticket { margin: 0; color: #B9C3CE; white-space: nowrap; }
.journey__stamps { display: flex; align-items: center; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.stamp { display: flex; align-items: center; gap: 0.4rem; }
.stamp__dot {
  width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #7C8B9B;
  transition: background-color 180ms var(--sc-ease-out), border-color 180ms var(--sc-ease-out), transform 260ms var(--sc-ease-out);
}
.stamp__label { display: none; white-space: nowrap; font-weight: 600; }
.stamp.is-on .stamp__dot { background: var(--tape); border-color: var(--tape); }
.stamp.is-last .stamp__label { display: inline; }
.stamp.is-pressed .stamp__dot { transform: scale(1.45); }
html:not(.js) .stamp .stamp__dot { background: var(--tape); border-color: var(--tape); }
html:not(.js) .stamp:last-child .stamp__label { display: inline; }

/* ------------------------------------------------------------- act frames -- */
.fx-act { position: relative; scroll-margin-top: var(--chrome-h); }
.fx-stage {
  height: 100vh; height: 100svh;
  padding: calc(var(--chrome-h) + clamp(1rem, 3vh, 2rem)) var(--gut) calc(var(--status-h) + clamp(1rem, 3vh, 2rem));
  display: grid; grid-template-columns: minmax(16rem, 0.36fr) 1fr; gap: clamp(1.25rem, 3vw, 3rem); align-items: center;
}
.fx-flow {
  padding: calc(var(--chrome-h) + clamp(3rem, 9vh, 6rem)) var(--gut) clamp(3rem, 9vh, 6rem);
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); max-width: 84rem; margin: 0 auto;
}
.fx-flow--split { grid-template-columns: minmax(16rem, 0.4fr) 1fr; align-items: center; }
.fx-flow--trail { grid-template-columns: 1fr minmax(16rem, 0.4fr); }

/* ----------------------------------------------------------------- guides -- */
.guide { display: grid; gap: 0.8rem; align-content: center; max-width: 30rem; }
.guide--wide { max-width: 44rem; }
.guide__title {
  margin: 0; font-family: var(--sc-font-display); font-weight: 600;
  font-size: clamp(1.4rem, 1rem + 1.1vw, 2.1rem); line-height: 1.14; letter-spacing: -0.02em; text-wrap: balance;
}
.guide__body { margin: 0; color: var(--soft); font-size: clamp(1rem, 0.94rem + 0.2vw, 1.1rem); line-height: 1.5; text-wrap: pretty; }
.guide__points { margin: 0.2rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; font-weight: 600; font-size: 0.95rem; }
.guide__points li { display: flex; align-items: center; gap: 0.55rem; }
.guide__points li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--tape); flex: none; }
.js .guide--steps { display: grid; }
.js .guide--steps .guide__step { grid-area: 1 / 1; }
.guide__step { display: grid; gap: 0.8rem; align-content: start; }
html:not(.js) .guide--steps { gap: 1.6rem; }

/* ----------------------------------------------------------------- panels -- */
.surface { display: grid; gap: 1rem; min-width: 0; min-height: 0; max-height: 100%; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 2px hsl(var(--sc-shadow-color) / 0.06), 0 8px 24px -12px hsl(var(--sc-shadow-color) / 0.18);
  padding: 1rem; min-width: 0;
}
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.panel__title { margin: 0; font-family: var(--sc-font-display); font-weight: 600; font-size: 1.02rem; }
.avatar {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: #E7ECF2; color: var(--ink); font-weight: 700; font-size: 0.78rem;
}
.avatar--team { background: var(--tape); }
.chip {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 0.5rem; border-radius: 999px;
  font-size: 0.74rem; font-weight: 600; background: #EDE8DD; color: var(--ink); white-space: nowrap; margin: 0;
}
.chip--wismo { background: #E7ECF2; }
.chip--problem { background: var(--tint); color: #7A3B06; }
.chip--return { background: #EDE8DD; }
.chip--pre { background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.chip--alert, .chip--closed { background: var(--ink); color: var(--paper); }
.chip--wait { background: var(--tint); color: #7A3B06; }
.chip--ok { background: #E7ECF2; }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.seg__btn {
  min-height: 36px; padding: 0 0.75rem; border: 0; border-radius: 8px; background: transparent; color: var(--soft);
  font: 600 0.8rem var(--ui); cursor: pointer;
}
.seg__btn[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px hsl(var(--sc-shadow-color) / 0.16); }
.seg__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.seg--small .seg__btn { min-height: 32px; padding: 0 0.6rem; }

/* ------------------------------------------------------ act 1: the queue -- */
.surface--inbox { grid-template-columns: minmax(0, 1.55fr) minmax(14rem, 1fr); align-items: start; }
.q-list { position: relative; height: calc(var(--rows) * var(--row-h)); margin: 0; padding: 0; list-style: none; }
.q {
  position: absolute; inset: 0 0 auto; height: calc(var(--row-h) - 6px);
  display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.6rem 0.7rem;
  border-radius: 10px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line);
  --row: var(--prio);
  transform: translate3d(0, calc(var(--row) * var(--row-h)), 0);
  transition: transform 640ms var(--sc-ease-out), opacity 260ms var(--sc-ease-out), translate 260ms var(--sc-ease-out);
}
/* Newest first. While messages are still arriving, --waiting (set by features.js) is how many have
   not come in yet: the newest arrived row sits on top and each new one pushes the rest down. */
.queue[data-sort="time"] .q { --row: max(0, calc(var(--time) - var(--waiting, 0))); }
.q--top { box-shadow: inset 0 0 0 2px var(--tape); }
.queue[data-sort="time"] .q--top { box-shadow: inset 0 0 0 1px var(--line); }
.q__main { display: grid; gap: 0.15rem; min-width: 0; flex: 1; }
.q__head { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.86rem; }
.q__name { font-weight: 700; }
.q__when { color: var(--soft); font-size: 0.78rem; white-space: nowrap; }
.q__text { font-size: 0.84rem; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q__tags { display: flex; gap: 0.35rem; margin-top: 0.15rem; }
.js .q[data-at]:not(.on) { opacity: 0; translate: -18px 0; pointer-events: none; }

.side { display: grid; gap: 0.75rem; align-content: start; }
.side__label { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--soft); }
.groups { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; }
.group { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.4rem 0.55rem; border-radius: 8px; background: var(--paper); font-size: 0.86rem; }
.group b { font-variant-numeric: tabular-nums; }
.group--window { background: var(--ink); color: var(--paper); }
.why { border-radius: 10px; padding: 0.75rem; background: var(--tint); transition: opacity 320ms var(--sc-ease-out), translate 320ms var(--sc-ease-out); }
.why__title { margin: 0 0 0.4rem; font-weight: 700; font-size: 0.9rem; }
.why__who { font-weight: 500; color: #7A3B06; }
.why__list { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.2rem; font-size: 0.86rem; }
.js .why:not(.on) { opacity: 0; translate: 0 10px; }
/* The explanation is about the priority order; sorted by time it would name the wrong task. */
.queue[data-sort="time"] ~ .side .why { display: none; }

/* ---------------------------------------------------- act 2: three matches -- */
.fx-cases { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.case { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; display: grid; gap: 0.35rem; align-content: start; }
.case__state { margin: 0 0 0.35rem; justify-self: start; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.case--one .case__state { background: #E7ECF2; }
.case--many .case__state { background: var(--tint); color: #7A3B06; }
.case--none .case__state { background: #EDE8DD; }
.case__who { margin: 0; font-weight: 700; font-size: 1.02rem; }
.case__detail { margin: 0; color: var(--soft); font-size: 0.9rem; }
.case__result { margin: 0.6rem 0 0; padding-top: 0.6rem; border-top: 1px solid var(--line); font-size: 0.92rem; }

/* ------------------------------------------------- act 3: the answer, peak -- */
.act-answer .fx-stage { grid-template-columns: 1fr minmax(16rem, 0.34fr); }
.surface--answer { grid-template-columns: minmax(0, 1.25fr) minmax(15rem, 1fr); align-items: stretch; }
.convo { display: grid; grid-template-rows: auto 1fr; gap: 0.9rem; background: #FBF9F4; }
.convo__who { margin: 0; display: flex; gap: 0.7rem; align-items: center; font-size: 0.92rem; }
.convo__who > span:last-child { display: grid; }
.convo__match { color: var(--soft); font-size: 0.8rem; }
.convo__thread { display: grid; gap: 0.8rem; align-content: start; }
.bubble { margin: 0; max-width: 85%; padding: 0.65rem 0.8rem 1.3rem; border-radius: 14px; position: relative; font-size: 0.92rem; line-height: 1.4; }
.bubble--in { background: var(--white); box-shadow: inset 0 0 0 1px var(--line); border-top-left-radius: 4px; }
.bubble--out { justify-self: end; background: var(--ink); color: var(--paper); border-top-right-radius: 4px; padding-bottom: 1.6rem; }
.bubble__time { position: absolute; right: 0.7rem; bottom: 0.35rem; font-size: 0.72rem; color: var(--soft); }
.bubble--out .token { background: transparent; color: inherit; padding: 0; box-shadow: none; text-decoration: underline; text-decoration-color: var(--tape); text-underline-offset: 3px; }
.ticks { position: absolute; right: 0.7rem; bottom: 0.35rem; display: flex; gap: 0.45rem; font-size: 0.72rem; color: #B9C3CE; }
.tick { transition: opacity 220ms var(--sc-ease-out); }
.tick:last-child { color: var(--tape); font-weight: 700; }
.compose { border-radius: 12px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); padding: 0.75rem; display: grid; gap: 0.5rem; transition: opacity 300ms var(--sc-ease-out), translate 300ms var(--sc-ease-out); }
.compose__label { margin: 0; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--soft); }
.compose__text { margin: 0; font-size: 0.95rem; line-height: 1.55; }
.compose__actions { margin: 0; display: flex; justify-content: flex-end; gap: 0.5rem; }
.btn { display: inline-flex; align-items: center; min-height: 34px; padding: 0 0.9rem; border-radius: 8px; font-weight: 600; font-size: 0.84rem; box-shadow: inset 0 0 0 1px var(--line); }
.btn--send { background: var(--tape); box-shadow: none; transition: transform 160ms var(--sc-ease-out), background-color 160ms var(--sc-ease-out), color 160ms var(--sc-ease-out); }
.js .btn--send.on { background: var(--ink); color: var(--paper); transform: scale(0.96); }
.token { padding: 0 0.12rem; border-radius: 4px; background: var(--tint); color: var(--ink); transition: background-color 260ms var(--sc-ease-out), color 260ms var(--sc-ease-out), box-shadow 260ms var(--sc-ease-out); }
.js .compose .token:not(.on) { color: transparent; background: #EEE9DE; box-shadow: none; }

.card { display: grid; gap: 0.6rem; align-content: start; }
.card__since { margin: 0; font-size: 0.84rem; color: var(--soft); }
.card__orders { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.3rem; }
.card__orders li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.4rem 0.55rem; border-radius: 8px; font-size: 0.86rem; box-shadow: inset 0 0 0 1px var(--line); }
.card__orders li.is-sel { box-shadow: inset 0 0 0 2px var(--ink); }
.card__orders span { color: var(--soft); }
.fields { margin: 0; display: grid; gap: 0.25rem; }
.field { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.5rem; padding: 0.4rem 0.55rem; border-radius: 8px; font-size: 0.86rem; transition: opacity 260ms var(--sc-ease-out), background-color 400ms var(--sc-ease-out); }
.field dt { color: var(--soft); }
.field dd { margin: 0; font-weight: 600; }
.field .link { color: var(--tape-text); text-decoration: underline; text-underline-offset: 3px; }
.js .field:not(.on) { opacity: 0.28; }
.field.is-pulse { background: var(--tint); }
.js .bubble[data-at]:not(.on), .js .compose:not(.on) { opacity: 0; translate: 0 12px; }
.bubble[data-at] { transition: opacity 300ms var(--sc-ease-out), translate 300ms var(--sc-ease-out); }
.js .tick:not(.on) { opacity: 0; }

/* ---------------------------------------------------- act 4: return form -- */
.formwrap { display: grid; gap: 1rem; justify-items: center; padding: clamp(1.25rem, 3vw, 2.5rem); border-radius: 20px; background: #ECE6DA; }
.rform { width: min(100%, 26rem); margin: 0; background: var(--white); border-radius: 18px; padding: 1.25rem; box-shadow: var(--sc-e2); display: grid; gap: 0.9rem; transform-style: preserve-3d; }
.rform__title { margin: 0; font-family: var(--sc-font-display); font-weight: 600; font-size: 1.1rem; }
.rform__fields { margin: 0; display: grid; gap: 0.55rem; }
.rform__fields div { display: grid; gap: 0.15rem; padding: 0.55rem 0.7rem; border-radius: 10px; background: var(--paper); }
.rform__fields dt { font-size: 0.74rem; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: 0.03em; }
.rform__fields dd { margin: 0; font-weight: 600; }
.rform__submit { margin: 0; display: grid; place-items: center; min-height: 44px; border-radius: 10px; background: var(--ink); color: var(--paper); font-weight: 600; }
.landed { margin: 0; display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.55rem 0.85rem; border-radius: 10px; background: var(--white); box-shadow: inset 0 0 0 2px var(--tape); font-size: 0.88rem; font-weight: 600; }
.landed::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tape); flex: none; }

/* ------------------------------------------------------- act 5: team rail -- */
.fx-stage--rail { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; align-items: start; overflow: hidden; }
.guide--top { max-width: 40rem; }
.rail { display: flex; gap: 1rem; align-items: flex-start; width: max-content; padding-right: var(--gut); will-change: transform; }
.tool { width: clamp(16rem, 24vw, 19rem); max-height: 100%; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; display: grid; gap: 0.7rem; align-content: start; }
.tool__title { margin: 0; font-family: var(--sc-font-display); font-weight: 600; font-size: 1.02rem; }
.tool__hint { margin: 0; font-size: 0.8rem; color: var(--soft); }
.tool__body { margin: 0; font-size: 0.92rem; }
.who { margin: 0; display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.note { margin: 0; padding: 0.75rem; border-radius: 10px; background: #FFF6D9; font-size: 0.92rem; }
.tags { margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.saved { margin: 0; padding: 0.75rem; border-radius: 10px; background: var(--paper); font-size: 0.92rem; }
.search input {
  width: 100%; min-height: 40px; padding: 0 0.75rem; border-radius: 10px; border: 1px solid var(--line); background: var(--white);
  font: 0.92rem var(--ui); color: var(--ink);
}
.search input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.results { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.25rem; font-size: 0.86rem; }
.results li { padding: 0.3rem 0.45rem; border-radius: 6px; background: var(--paper); }
.results span { color: var(--soft); }
.templates { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.2rem; font-size: 0.88rem; }
.files { margin: 0; display: flex; gap: 0.6rem; }
.file { width: 64px; height: 76px; border-radius: 8px; display: grid; place-items: end center; padding-bottom: 0.4rem; font-size: 0.72rem; font-weight: 700; }
.file--img { background: linear-gradient(160deg, #D9CDB5, #B8A586); }
.file--pdf { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.states { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; font-size: 0.9rem; }
.state { display: flex; align-items: center; gap: 0.5rem; }
.state::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #B9C3CE; flex: none; }
.state--1::before { background: var(--ink); }
.state--2::before { background: var(--tape); }
.state--3::before { background: var(--white); box-shadow: inset 0 0 0 2px #B3261E; }

/* ----------------------------------------------------------- act 6: rules -- */
.rules { display: grid; gap: 1rem; }
.rules__list { margin: 0; padding: 0; list-style: none; display: grid; }
.rules__list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.8rem 0.2rem; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.lock { flex: none; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 0.76rem; font-weight: 700; }
.lock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tape); }
.uilang { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 0.75rem 1rem; }
.uilang__title { margin: 0; font-weight: 700; font-size: 0.94rem; }
.uilang__preview { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
.uilang__preview li { padding: 0.25rem 0.55rem; border-radius: 6px; background: var(--paper); font-size: 0.84rem; font-weight: 600; }

/* ---------------------------------------------------------- act 7: report -- */
.tiles { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; display: grid; gap: 0.5rem; align-content: space-between; }
.tile dt { font-size: 0.86rem; color: var(--soft); }
.tile dd { margin: 0; font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem); line-height: 1; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------- act 8: set-up and join -- */
.act-setup .fx-stage { grid-template-columns: 1fr; }
.surface--setup { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: stretch; max-width: 76rem; width: 100%; margin: 0 auto; }
.fx-steps { margin: 0.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; counter-reset: step; }
.fx-steps li { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0.2rem; font-size: 0.94rem; counter-increment: step; transition: opacity 260ms var(--sc-ease-out); }
.fx-steps li::before {
  content: counter(step); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--tape); color: var(--ink); font-weight: 700; font-size: 0.78rem;
}
.js .fx-steps li:not(.on) { opacity: 0.35; }
.js .fx-steps li:not(.on)::before { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.join { display: grid; gap: 0.9rem; align-content: center; background: var(--ink); color: var(--paper); border-color: var(--ink); padding: clamp(1.25rem, 3vw, 2.25rem); }
.join__title { margin: 0; font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.2rem); line-height: 1.1; letter-spacing: -0.02em; }
.join__body { margin: 0; color: #B9C3CE; max-width: 44ch; }
.join__form { display: grid; gap: 0.45rem; }
.join__label { font-weight: 600; font-size: 0.9rem; }
.join__row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.join__row input {
  flex: 1 1 14rem; min-width: 0; min-height: 48px; padding: 0 0.9rem; border-radius: 12px; border: 1px solid #3A5470;
  background: #0B2136; color: var(--paper); font: 1rem var(--ui);
}
.join__row input::placeholder { color: #8796A6; }
.join__row input:focus-visible { outline: 2px solid var(--tape); outline-offset: 2px; }
.join .cta:focus-visible { outline-color: var(--paper); }
.join__err { margin: 0; color: var(--tape); font-size: 0.86rem; }
.fx-foot { display: grid; gap: 0.25rem; margin-top: 0.5rem; padding-top: 0.9rem; border-top: 1px solid #2A4562; font-size: 0.8rem; color: #B9C3CE; }
.fx-foot .foot__line { margin: 0; }
.fx-foot a { color: var(--paper); }

/* ------------------------------------------------------------------ phone -- */
@media (max-width: 980px) {
  .fx-stage, .act-answer .fx-stage { grid-template-columns: 1fr; align-content: start; align-items: start; gap: 1rem; }
  .fx-flow--split, .fx-flow--trail { grid-template-columns: 1fr; }
  .fx-flow--trail .guide { order: -1; }
  .surface--inbox { grid-template-columns: 1fr; }
  .side { display: none; }
  .act-answer .guide { order: -1; }
  .fx-cases, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .fx { --chrome-h: 52px; --status-h: 40px; --row-h: 62px; }
  .chrome { gap: 0.5rem; padding: 0 0.75rem; }
  .chrome__brand img { width: 104px; height: auto; }
  .tab { padding: 0 0.6rem; font-size: 0.82rem; }
  .chrome__langs a { min-width: 36px; }
  .status { padding: 0 0.75rem; font-size: 0.72rem; }
  .journey__ticket, .stamp.is-last .stamp__label { display: none; }
  .journey__stamps { gap: 0.25rem; }
  .stamp__dot { width: 10px; height: 10px; }
  .fx-stage { padding-top: calc(var(--chrome-h) + 0.9rem); padding-bottom: calc(var(--status-h) + 0.9rem); }
  .guide__title { font-size: 1.3rem; }
  .guide__body { font-size: 0.94rem; }
  .guide__points { display: none; }
  .panel { padding: 0.75rem; }
  .panel__head { margin-bottom: 0.5rem; }
  .q { padding: 0.5rem 0.6rem; }
  .q__tags { display: none; }
  .surface--answer { grid-template-columns: 1fr; gap: 0.6rem; }
  .card__since, .card__orders, .card .panel__title { display: none; }
  .fields { grid-template-columns: 1fr 1fr; }
  .field { grid-template-columns: 1fr; gap: 0; padding: 0.3rem 0.45rem; font-size: 0.8rem; }
  .field[data-field="items"] { display: none; }
  .bubble { font-size: 0.86rem; }
  .compose__text { font-size: 0.88rem; }
  .js .compose.is-sent, .js .bubble--out:not(.on) { display: none; }
  .fx-cases, .tiles { grid-template-columns: 1fr; }
  .tool { width: 78vw; }
  .uilang { grid-template-columns: 1fr; }
  .uilang__preview { justify-content: flex-start; }
  .surface--setup { grid-template-columns: 1fr; gap: 0.6rem; }
  .fx-steps { margin-top: 0.3rem; gap: 0.1rem; }
  .fx-steps li { padding: 0.15rem 0; font-size: 0.84rem; line-height: 1.3; }
  .fx-steps li::before { width: 20px; height: 20px; font-size: 0.72rem; }
  .join { gap: 0.5rem; }
  .join__title { font-size: 1.35rem; }
  .join__body { font-size: 0.9rem; line-height: 1.4; }
  .join__row input { min-height: 44px; }
  .fx-foot { margin-top: 0.2rem; padding-top: 0.6rem; }
  .join__row .cta { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 860px) and (max-height: 760px) {
  .guide__body { display: none; }
  .act-answer .guide__body { display: block; }
  /* The close keeps its field and footer on screen: the step list and the copy above the field give way. */
  .setup .panel__title, .join__body { display: none; }
  .act-setup .fx-stage { height: auto; min-height: 100svh; }
}

/* ------------------------------------------------------------ no JavaScript -- */
/* Also when the scripts fail to start: the head script drops .js at load unless features.js set
   .fx-live. Nothing pins without the engine, so a screen may grow past the viewport, the rail
   wraps, the engine's hidden-until-cued styles are cancelled and a plain link replaces the field. */
html:not(.js) .fx-stage { height: auto; min-height: 100vh; min-height: 100svh; }
html:not(.js) .rail { flex-wrap: wrap; width: auto; }
html:not(.js) [data-sc-cue], html:not(.js) [data-sc-in], html:not(.js) [data-sc-stagger] > * { opacity: 1 !important; transform: none !important; }
/* The field shows only once its submit handler is bound (.fx-join); until then, and whenever it is
   not bound, the plain link stands in. */
html:not(.fx-join) .join__form, .fx-join .join__alt { display: none; }

/* ---------------------------------------------------------- reduced motion -- */
@media (prefers-reduced-motion: reduce) {
  .q, .why, .field, .compose, .bubble[data-at], .tick, .fx-steps li, .btn--send, .token, .stamp__dot, .tab { transition: none; }
  .stamp.is-pressed .stamp__dot { transform: none; }
}
