/* App, part 1: the page's shared pieces (iPhone screen recordings, spec lists), the opener with its Mac screen, Trade on
   BingX, the Desk and From Watch to call. Part 2 (Size to the closing line): app-tools.css. Mobile first; desktop from
   900 px, on the shell's 12-column grid. */

/* ---------- full-frame iPhone screens: the kit's phone without its frame, as in the CALL recording ---------- */
.ios { position: relative; overflow: hidden; border-radius: var(--r-s); background: #000; isolation: isolate;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6), 0 40px 80px -40px rgba(11, 11, 12, .45); }
.ios .tu-phone { aspect-ratio: 390 / 844; }
.ios .tu-phone > * { --pt: calc(100cqw / 390); }
.ios .tu-phone__body { inset: 0; border-radius: 0; background: #000; box-shadow: none; }
.ios .tu-phone__btn { display: none; }
.ios .tu-phone__screen { inset: 0; border-radius: 0; }
/* the screen-recording pill around the clock */
.ios .tu-phone__time { margin-left: calc(-10 * var(--pt)); padding: calc(1.5 * var(--pt)) calc(10 * var(--pt)); border-radius: 999px; background: #FF3B30; color: #fff; }

/* ---------- spec lists: an ink rule, then rows on hairlines (Home's spec sheet) ---------- */
.spec { border-top: 1px solid var(--ink); }
.spec-h { padding-top: 16px; font-size: var(--t-h3); font-weight: 500; line-height: 1.25; letter-spacing: -.02em; }
.spec-rows { margin-top: 8px; }
.spec-rows li, .spec-row { display: grid; gap: 4px; padding: 14px 0 15px; border-bottom: 1px solid var(--rule-2); }
.spec-rows h4, .spec-row dt { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: -.012em; line-height: 1.35; }
.spec-rows p, .spec-row dd { font-size: 15px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
@media (min-width: 900px) {
  .spec-rows li, .spec-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); column-gap: var(--gap); align-items: baseline; }
}

/* ---------- 1. opener: the title, then the trade playing on the Desk (a Mac screen; phones: the iPhone screen) ---------- */
.op { padding: calc(var(--hdr) + clamp(28px, 6vh, 64px)) 0 clamp(64px, 8vw, 128px); }
.op-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.op-h { font-family: var(--serif); font-weight: 400; font-size: var(--t-h1); line-height: .94; letter-spacing: -.014em; }
.op-l { display: block; }
.op-sub { margin-top: 20px; max-width: 30ch; font-size: var(--t-lead); line-height: 1.45; letter-spacing: -.012em; color: var(--ink-soft); text-wrap: pretty; }
.op-rec { margin: 36px auto 0; width: min(100%, 320px, calc(72svh * 390 / 844)); }
.op-rec .rec-frame { box-shadow: 0 1px 0 rgba(255, 255, 255, .6), 0 40px 80px -40px rgba(11, 11, 12, .45); }
.mac { display: none; }

.js .op-l { opacity: 0; transform: translateY(.16em); transition: opacity .9s var(--ease), transform 1.2s var(--ease); }
.js .op-l:nth-child(2) { transition-delay: .09s; }
.js .op-sub, .js .op-rec { opacity: 0; transition: opacity .9s var(--ease) .25s, transform 1.2s var(--ease) .25s; }
.js .op-rec { transform: translateY(24px); transition-delay: .35s; }
.js .op.is-in .op-l, .js .op.is-in .op-sub, .js .op.is-in .op-rec { opacity: 1; transform: none; }
.rm .op-l, .rm .op-sub, .rm .op-rec { opacity: 1 !important; transform: none !important; transition: none !important; }

@media (min-width: 900px) {
  .op-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
  .op-h { grid-column: 1 / -1; white-space: nowrap; }
  .op-l { display: inline; }
  .op-sub { grid-column: 1 / span 5; margin-top: 26px; }
  .op-rec { grid-column: 1 / -1; width: auto; margin: clamp(40px, 4.6vw, 72px) 0 0; }
  .op-rec .rec-frame { aspect-ratio: 16 / 10; container-type: inline-size; box-shadow: 0 1px 0 rgba(255, 255, 255, .6), 0 60px 120px -60px rgba(11, 11, 12, .55); }
  .op-ios { display: none; }
  /* a Mac desktop: the films' wallpaper, the menu bar with the market's clock, the Desk window */
  .mac { display: block; position: absolute; inset: 0; background: #0b0b0c url("/assets/img/app/wallpaper.webp") 50% 50% / cover no-repeat; }
  .mac-bar { position: absolute; inset: 0 0 auto; z-index: 2; height: 2.15cqw; display: flex; align-items: center; gap: 1.5cqw; padding: 0 1.1cqw 0 1.6cqw;
    font-size: .8cqw; font-weight: 500; letter-spacing: 0; color: rgba(255, 255, 255, .92); background: rgba(16, 16, 18, .3);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
  .mac-bar b { font-weight: 700; }
  .mac-r { margin-left: auto; display: flex; align-items: center; gap: 1.2cqw; }
  .mac-r svg { height: .9cqw; width: auto; }
  .mac-batt { display: flex; align-items: center; gap: .45cqw; font-variant-numeric: tabular-nums; }
  .mac-batt svg { height: .82cqw; }
  .mac-clock { font-variant-numeric: tabular-nums; }
  .mac-win { position: absolute; left: 5.5cqw; width: 89cqw; top: 3.9cqw; }
}

/* ---------- 2. Trade on BingX: the deeper stock; the iPhone screen the visitor taps beside the connection spec ---------- */
.tob { background: var(--paper-2); padding: var(--sec) 0; }
.tob-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.tob-head .lead { max-width: 28ch; }
.tob-phone { position: relative; margin: 44px auto 0; width: min(100%, 300px); }
.tob-tap { position: absolute; z-index: 3; left: 0; top: 0; width: 0; height: 0; border-radius: 12px; cursor: default; transition: box-shadow .3s var(--ease); }
.tob-tap.is-on { cursor: pointer; box-shadow: 0 0 0 2px rgba(255, 255, 255, .88); }
.tob-tap:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
.tob-places { margin-top: 40px; max-width: 34ch; font-size: var(--t-lead); line-height: 1.45; letter-spacing: -.012em; color: var(--ink-soft); text-wrap: pretty; }
.tob-places b { font-weight: 500; color: var(--ink); }
.tob-connect { margin-top: 48px; }
.tob-connect li { transition: opacity .4s var(--ease); }
/* while the order sheet is up, the row about it stays and the others step back */
.tob[data-state="sheet"] .tob-connect li:not([data-step]), .tob[data-state="sending"] .tob-connect li:not([data-step]) { opacity: .42; }
.tob-ex { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--ink); display: grid; gap: 24px; }
.tob-lead { display: grid; gap: 14px; justify-items: start; }
.tob-lead img { height: 26px; width: auto; }
.tob-lead p { max-width: 26ch; font-size: var(--t-h3); font-weight: 500; line-height: 1.3; letter-spacing: -.02em; text-wrap: balance; }
.tob-also { display: grid; gap: 16px; padding-top: 18px; border-top: 1px solid var(--rule-2); }
.tob-also p { font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.tob-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.tob-marks img { height: 15px; width: auto; filter: brightness(0); opacity: .6; }
@media (min-width: 900px) {
  .tob-grid { grid-template-columns: repeat(12, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: var(--gap); }
  .tob-phone { grid-column: 1 / span 6; grid-row: 1 / span 4; align-self: start; justify-self: center; margin: 0; width: min(100%, 360px, calc((100svh - 150px) * 390 / 844)); }
  .tob-head { grid-column: 7 / span 6; grid-row: 1; }
  .tob-places { grid-column: 7 / span 5; grid-row: 2; margin-top: clamp(32px, 3vw, 48px); }
  .tob-connect { grid-column: 7 / span 6; grid-row: 3; margin-top: clamp(48px, 5vw, 80px); }
  .tob-ex { grid-column: 7 / span 6; grid-row: 4; align-self: start; margin-top: 48px; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--gap); }
  .tob-also { padding: 0 0 0 var(--gap); border-top: 0; border-left: 1px solid var(--rule-2); align-content: start; }
}

/* ---------- 3. the Desk on ink: the views as an index beside the kit's chart ---------- */
@keyframes dk-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.dk { background: var(--ink); color: var(--on-ink); padding: var(--sec) 0; }
.dk .lead { color: var(--on-ink-soft); }
.dk-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.dk-tabs { display: flex; gap: 22px; margin: 36px calc(var(--m) * -1) 0; padding: 0 var(--m); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; box-shadow: inset 0 -1px 0 var(--rule-ink); }
.dk-tabs::-webkit-scrollbar { display: none; }
.dk-tab { position: relative; flex: none; padding: 12px 0 14px; font-size: 15px; font-weight: 500; letter-spacing: -.01em; color: var(--on-ink-mute); text-align: left; transition: color .3s var(--ease); }
.dk-tab:hover { color: var(--on-ink-soft); }
.dk-tab[aria-selected="true"] { color: var(--on-ink); }
.dk-tab:focus-visible { outline: none; }
.dk-tab:focus-visible .dk-l { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 3px; }
.dk-s { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dk-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; }
.dk-bar b { display: block; height: 100%; background: var(--on-ink); transform-origin: 0 50%; transform: scaleX(0); }
.dk-tab[aria-selected="true"] .dk-bar b { transform: none; }
.dk-tab.is-run .dk-bar b { animation: dk-fill var(--dk-dur, 3s) linear both; }
.dk-view { margin-top: 20px; min-width: 0; }
.dk-screen { overflow: hidden; border-radius: var(--r-s); background: #0f1012; box-shadow: inset 0 0 0 1px var(--rule-ink); }
.dk-screen .tu-ch { display: block; }
.dk-say { margin-top: 16px; min-height: 3em; font-size: 17px; line-height: 1.45; letter-spacing: -.012em; color: var(--on-ink-soft); }
.dk-say.is-in { animation: dk-say .6s var(--ease) both; }
@keyframes dk-say { from { opacity: 0; transform: translateY(6px); } }
.rm .dk-say.is-in { animation: none; }
@media (min-width: 900px) {
  .dk-grid { grid-template-columns: repeat(12, 1fr); grid-template-rows: auto 1fr; column-gap: var(--gap); }
  .dk-head { grid-column: 1 / span 4; grid-row: 1; }
  .dk-tabs { grid-column: 1 / span 4; grid-row: 2; align-self: start; flex-direction: column; gap: 0; margin: clamp(40px, 4vw, 64px) 0 0; padding: 0; overflow: visible; box-shadow: none; border-top: 1px solid var(--rule-ink); }
  .dk-tab { display: grid; padding: 14px 0 15px; border-bottom: 1px solid var(--rule-ink); }
  .dk-l { font-size: var(--t-h3); letter-spacing: -.02em; line-height: 1.25; }
  .dk-s { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; display: none; max-width: 34ch; margin-top: 6px;
    font-size: 15px; font-weight: 400; line-height: 1.45; letter-spacing: -.008em; color: var(--on-ink-soft); }
  .dk-tab[aria-selected="true"] .dk-s { display: block; animation: dk-say .6s var(--ease) both; }
  .rm .dk-tab .dk-s { animation: none; }
  .dk-bar { bottom: -1px; }
  .dk-view { grid-column: 5 / span 8; grid-row: 1 / span 2; margin: 0; }
  .dk-say { display: none; }
}

/* ---------- 4. From Watch to call: five filters tick; the status moves along the lifecycle ---------- */
.wc { padding: var(--sec) 0; }
.wc-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.wc-head { display: grid; gap: 14px; }
.wc-head .lead { max-width: 30ch; }
.wc-filters { margin-top: 44px; border-top: 1px solid var(--ink); }
.wc-filters li { display: flex; align-items: center; gap: 14px; padding: 14px 0 15px; border-bottom: 1px solid var(--rule-2);
  font-size: clamp(18px, 1.5vw, 22px); font-weight: 500; line-height: 1.25; letter-spacing: -.02em; color: var(--ink-mute); transition: color .5s var(--ease); }
.wc-filters i { position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--rule); }
.wc-filters i::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .5s var(--ease); }
.wc-filters svg { position: relative; width: 13px; height: 13px; color: var(--paper); opacity: 0; transition: opacity .3s var(--ease) .12s; }
.wc-filters li.is-on { color: var(--ink); }
.wc-filters li.is-on i::before { transform: none; }
.wc-filters li.is-on svg { opacity: 1; }
html:not(.js) .wc-filters li { color: var(--ink); }

.wc-life { margin-top: 64px; }
.wc-now { font-size: clamp(60px, 17vw, 136px); font-weight: 500; line-height: .95; letter-spacing: -.05em; white-space: nowrap; }
.wc-now span { display: inline-block; color: var(--ink-mute); }
.wc-now [data-k="live"] { color: var(--ink); }
.wc-now [data-k="tp1"], .wc-now [data-k="tp2"], .wc-now [data-k="closed"] { color: var(--gain); }
.js .wc-now span { animation: wc-in .7s var(--ease) both; }
@keyframes wc-in { from { opacity: 0; transform: translateY(.1em); } }
.rm .wc-now span { animation: none; }
/* the lifecycle as a track: a dot per state, the line inks in as the call moves on */
.wc-rail { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 30px; }
.wc-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: var(--rule); }
.wc-rail li { position: relative; padding-top: 22px; font: 400 12px/1.3 var(--mono); letter-spacing: -.01em; color: var(--ink-mute); transition: color .4s var(--ease); }
.wc-rail li::before { content: ""; position: absolute; z-index: 1; left: 0; top: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1px var(--ink-mute); transition: background-color .4s var(--ease), box-shadow .4s var(--ease); }
.wc-rail li::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s var(--ease); }
.wc-rail li:last-child::after { display: none; }
.wc-rail li.is-past, .wc-rail li.is-on { color: var(--ink); }
.wc-rail li.is-past::before, .wc-rail li.is-on::before { background: var(--ink); box-shadow: none; }
.wc-rail li.is-past::after { transform: none; }
.wc-alt { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 26px; font: 400 13px/1.3 var(--mono); }
.wc-alt span { display: inline-flex; align-items: center; gap: 8px; }
.wc-alt span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.wc-fill { color: var(--ink-mute); transition: color .4s var(--ease); }
.wc-fill.is-on { color: var(--gain); }
.wc-inv { color: var(--loss); }
@media (min-width: 900px) {
  .wc-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
  .wc-head { grid-column: 1 / -1; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: end; gap: 0 var(--gap); }
  .wc-head .h2 { grid-column: 1 / span 7; }
  .wc-head .lead { grid-column: 9 / span 4; padding-bottom: .3em; }
  .wc-filters { grid-column: 1 / span 5; margin-top: clamp(56px, 6vw, 96px); }
  .wc-life { grid-column: 7 / span 6; align-self: end; margin-top: clamp(56px, 6vw, 96px); }
  .wc-now { font-size: clamp(64px, 7.4vw, 120px); }
  .wc-rail li { font-size: 13px; }
}
