/* Trace app phone mockups (fv- device, ap- app screens).
   Lifted from the /pricing-store device viewer (branch pricing-store-concept) so other pages can show
   real Trace app screens in a CSS iPhone. Screens must sit inside .fv-phone > .fv-screen > .fv-shot.is-on.
   Colour tokens the screens expect; pages that define them already can ignore these. */
.fv-phone, .fv-stage { --ink: #393c3c; --ink-2: #5a5c5c; --ink-3: #7b7d7d; --stroke: #dfdfdf; --white: #fff; --teal-10: #e7f8f5; --teal-50: #1f616d; }

/* The /pricing-store page reset these inside its own main; repeat them here so screens look the same on any page. */
.ap :is(h1, h2, h3, p, ul, ol, figure) { margin: 0; padding: 0; }
.ap ul, .ap ol { list-style: none; }
.ap a { color: inherit; text-decoration: none; }
.ap img, .ap video { border-radius: 0; }

/* ───────── Features: device viewer (fv-) ─────────
       Pick a feature on the left; the phone shows that screen of the Trace app. Full Game Film turns the phone sideways. */
    .fv { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: center; gap: 0 40px; background: #f5f5f5; border-radius: 32px; padding: 56px 56px 56px 48px; }
    .fv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
    .fv-list li { margin: 0; padding: 0; list-style: none; max-width: 100%; }
    .fv-item { display: inline-flex; align-items: center; gap: 12px; padding: 13px 22px 13px 14px; background: var(--white); border: 1px solid transparent; border-radius: 100px; font-size: 16px; line-height: 20px; font-weight: 500; letter-spacing: -0.2px; color: var(--ink); text-align: left; transition: border-color 150ms; }
    .fv-item:hover { border-color: var(--stroke); }
    .fv-plus { position: relative; width: 24px; height: 24px; flex: 0 0 24px; border: 1.5px solid var(--teal-50); border-radius: 50%; }
    .fv-plus::before, .fv-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: var(--teal-50); transform: translate(-50%, -50%); }
    .fv-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
    .fv-desc { display: none; }
    .fv-item[aria-expanded="true"] { display: block; padding: 24px 26px; border-radius: 24px; cursor: default; border-color: transparent; }
    .fv-item[aria-expanded="true"] .fv-plus, .fv-item[aria-expanded="true"] .fv-label { display: none; }
    .fv-item[aria-expanded="true"] .fv-desc { display: block; animation: fv-in 350ms ease both; }
    .fv-desc, .fv-card-text { font-size: 16px; line-height: 1.5; font-weight: 400; letter-spacing: -0.1px; color: var(--ink-2); }
    .fv-desc b, .fv-card-text b { font-weight: 500; color: var(--ink); }
    .fv-plan { display: block; margin-top: 10px; font-size: 13px; line-height: 16px; color: var(--ink-3); }
    @keyframes fv-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

    /* The phone: iPhone 16/17 Pro proportions (402 x 874 pt screen), thin black border, titanium edge.
       --pw sets the size; everything else derives from it. .is-land turns the whole device a quarter turn. */
    .fv-stage { height: 680px; display: grid; place-items: center; min-width: 0; }
    .fv-phone { --phone-w: 300px; --bz: 5px; --sw: calc(var(--phone-w) - 2 * var(--bz)); --sh: calc(var(--sw) * 2.174);
                position: relative; width: var(--phone-w); height: calc(var(--sh) + 2 * var(--bz)); padding: var(--bz); border-radius: calc(var(--sw) * .137 + var(--bz)); background: #0a0a0a;
                box-shadow: 0 0 0 1px #3c3f42, 0 0 0 2.5px #a3a7aa, 0 0 0 3px #5f6366, 0 44px 70px -34px rgba(31, 52, 56, .38);
                transition: transform 800ms cubic-bezier(.65, 0, .35, 1); }
    .fv-phone.is-land { transform: rotate(-90deg); }
    .fv-key { position: absolute; width: 3px; background: linear-gradient(90deg, #6a6e71, #b9bdbf 60%, #8a8e91); }
    .fv-key.l { left: -5.5px; border-radius: 2px 0 0 2px; }
    .fv-key.r { right: -5.5px; border-radius: 0 2px 2px 0; }
    .fv-key.k1 { top: 17.5%; height: 4.5%; } .fv-key.k2 { top: 25%; height: 8%; } .fv-key.k3 { top: 35%; height: 8%; } .fv-key.k4 { top: 28%; height: 12.5%; }
    .fv-screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--sw) * .137); overflow: hidden; overflow: clip; background: #000; isolation: isolate; }
    .fv-island { position: absolute; z-index: 5; left: 50%; top: calc(var(--bz) + var(--sw) * .028); width: calc(var(--sw) * .313); height: calc(var(--sw) * .092); border-radius: 100px; background: #000; transform: translateX(-50%); }
    .fv-shot { position: absolute; inset: 0; opacity: 0; transition: opacity 300ms ease; container-type: size; overflow: hidden; overflow: clip; }
    .fv-shot.is-on { opacity: 1; transition-delay: 200ms; }
    .fv-shot.fv-land { inset: auto; left: 50%; top: 50%; width: var(--sh); height: var(--sw); transform: translate(-50%, -50%) rotate(90deg); }

    /* ── Trace app UI (ap-). 1pt = --pt. ── */
    .ap { --pt: calc(100cqw / 402); position: absolute; inset: 0; display: flex; flex-direction: column; font-family: Atak, sans-serif; color: #323333; background: #fff; overflow: hidden; overflow: clip; }
    .fv-land .ap { --pt: calc(100cqw / 874); }
    .ap svg { display: block; width: 100%; height: 100%; }
    .ap video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; background: #2f3a2c; }
    .ap-sb { flex: 0 0 auto; height: calc(54 * var(--pt)); display: flex; align-items: center; justify-content: space-between; padding: calc(6 * var(--pt)) calc(30 * var(--pt)) 0 calc(44 * var(--pt));
             font: 600 calc(17 * var(--pt))/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; letter-spacing: -0.2px; color: #000; background: transparent; }
    .ap-sb svg { width: calc(70 * var(--pt)); height: calc(13 * var(--pt)); }
    .ap-sb.dark { background: #323333; color: #fff; }
    .ap-sb.light { background: #fff; position: relative; z-index: 2; }
    .ap-home { position: absolute; z-index: 4; left: 50%; bottom: calc(8 * var(--pt)); width: calc(140 * var(--pt)); height: calc(5 * var(--pt)); border-radius: 10px; background: #111; transform: translateX(-50%); }
    .ap-ic { width: calc(26 * var(--pt)); height: calc(26 * var(--pt)); flex: 0 0 auto; display: grid; place-items: center; }
    .ap-bar { flex: 0 0 auto; height: calc(54 * var(--pt)); display: flex; align-items: center; gap: calc(14 * var(--pt)); padding: 0 calc(16 * var(--pt)); background: #323333; color: #fff; }
    .ap-bar b { flex: 1 1 auto; text-align: center; font-size: calc(19 * var(--pt)); font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; padding-left: calc(30 * var(--pt)); }
    .ap-bar .ap-ic-on { width: calc(36 * var(--pt)); height: calc(36 * var(--pt)); border-radius: 50%; background: #fff; color: #323333; padding: calc(6 * var(--pt)); }
    .ap-video { position: relative; flex: 0 0 auto; background: #2f3a2c; }
    .ap-score, .ap-board { position: absolute; z-index: 2; top: calc(10 * var(--pt)); left: calc(10 * var(--pt)); display: flex; align-items: stretch; font-weight: 500; line-height: 1; }
    .ap-score span, .ap-board span { display: grid; place-items: center; }
    .ap-s1, .ap-s2 { width: calc(22 * var(--pt)); height: calc(26 * var(--pt)); font-size: calc(15 * var(--pt)); }
    .ap-s1 { background: #fff; color: #000; border-radius: calc(5 * var(--pt)) 0 0 calc(5 * var(--pt)); }
    .ap-s2 { background: #000; color: #fff; border-radius: 0 calc(5 * var(--pt)) calc(5 * var(--pt)) 0; }
    .ap-score .ap-clock { margin-left: calc(6 * var(--pt)); padding: 0 calc(9 * var(--pt)); border-radius: calc(5 * var(--pt)); background: rgba(80, 80, 80, .75); color: #fff; font-size: calc(15 * var(--pt)); font-weight: 400; }
    .ap-cam { position: absolute; z-index: 2; right: calc(10 * var(--pt)); bottom: calc(12 * var(--pt)); display: flex; align-items: center; gap: calc(8 * var(--pt)); }
    .ap-cam-pill { display: flex; align-items: center; gap: calc(14 * var(--pt)); height: calc(44 * var(--pt)); padding: 0 calc(5 * var(--pt)) 0 calc(24 * var(--pt)); border-radius: 100px; background: rgba(50, 51, 51, .82); color: #fff; font-size: calc(16 * var(--pt)); font-weight: 500; }
    .ap-cam-pill i { width: calc(34 * var(--pt)); height: calc(34 * var(--pt)); border-radius: 50%; background: rgba(0, 0, 0, .35); padding: calc(7 * var(--pt)); }
    .ap-save { height: calc(44 * var(--pt)); padding: 0 calc(20 * var(--pt)); border-radius: 100px; display: grid; place-items: center; background: #2a9d9f; color: #fff; font-size: calc(16 * var(--pt)); font-weight: 500; }

    /* PlayerCam */
    .ap-pc .ap-video { height: calc(402 * var(--pt)); }
    .ap-player { flex: 0 0 auto; height: calc(68 * var(--pt)); display: flex; align-items: center; gap: calc(12 * var(--pt)); padding: 0 calc(18 * var(--pt)); border-bottom: calc(2 * var(--pt)) solid #efefef; }
    .ap-player b { flex: 1 1 auto; font-size: calc(23 * var(--pt)); font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
    .ap-av { width: calc(28 * var(--pt)); height: calc(28 * var(--pt)); flex: 0 0 auto; border-radius: 50%; background: #323333; color: #fff; display: grid; place-items: center; font-size: calc(11 * var(--pt)); font-weight: 500; }
    .ap-av-lg { width: calc(32 * var(--pt)); height: calc(32 * var(--pt)); font-size: calc(12 * var(--pt)); }
    .ap-rows { list-style: none; margin: 0; padding: 0; }
    .ap-row { position: relative; display: flex; align-items: center; gap: calc(8 * var(--pt)); height: calc(56 * var(--pt)); padding: 0 calc(16 * var(--pt)) 0 calc(22 * var(--pt)); border-bottom: calc(1.5 * var(--pt)) solid #efefef; font-size: calc(15 * var(--pt)); list-style: none; margin: 0; transition: background 300ms; }
    .ap-row.is-on { isolation: isolate; }
    .ap-row.is-on::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--teal-10); transform: scaleX(var(--p, 0)); transform-origin: left; }   /* fills with clip progress */
    .ap-row.is-on::before { content: ""; position: absolute; z-index: 1; left: 0; top: 0; bottom: 0; width: calc(4 * var(--pt)); background: #3cc2b4; }
    .ap-t { width: calc(52 * var(--pt)); font-size: calc(19 * var(--pt)); color: #393c3c; }
    .ap-plus { font-size: calc(15 * var(--pt)); color: #5a5c5c; }
    .ap-run { width: calc(22 * var(--pt)); height: calc(22 * var(--pt)); color: #393c3c; }
    .ap-tag { padding: calc(5 * var(--pt)) calc(10 * var(--pt)); border-radius: calc(5 * var(--pt)); background: #efefef; font-size: calc(15 * var(--pt)); color: #393c3c; white-space: nowrap; }

    /* Full game film (landscape) */
    .ap-gc .ap-bar { height: calc(46 * var(--pt)); padding: 0 calc(54 * var(--pt)) 0 calc(60 * var(--pt)); }
    .ap-gc .ap-bar b { font-size: calc(18 * var(--pt)); padding-left: calc(40 * var(--pt)); }
    .ap-gc .ap-video { flex: 1 1 auto; min-height: 0; }
    .ap-gc .ap-video video { position: absolute; inset: 0; }
    .ap-board { top: calc(12 * var(--pt)); left: calc(64 * var(--pt)); height: calc(34 * var(--pt)); }
    .ap-team { padding: 0 calc(12 * var(--pt)); background: #fff; color: #000; font-size: calc(17 * var(--pt)); border-radius: calc(6 * var(--pt)) 0 0 calc(6 * var(--pt)); }
    .ap-team-b { background: #000; color: #fff; border-radius: 0 calc(6 * var(--pt)) calc(6 * var(--pt)) 0; }
    .ap-pts { width: calc(30 * var(--pt)); background: #9d9d9d; color: #fff; font-size: calc(17 * var(--pt)); }
    .ap-board .ap-clock { margin-left: calc(6 * var(--pt)); padding: 0 calc(10 * var(--pt)); border-radius: calc(6 * var(--pt)); background: rgba(120, 120, 120, .7); color: #fff; font-size: calc(16 * var(--pt)); font-weight: 400; font-variant-numeric: tabular-nums; }
    .ap-gc .ap-cam { right: calc(44 * var(--pt)); bottom: calc(14 * var(--pt)); }
    .ap-gc .ap-home { background: rgba(255, 255, 255, .85); bottom: calc(6 * var(--pt)); width: calc(200 * var(--pt)); }

    /* AI Reels */
    .ap-reel { background: #7cdcd1; }
    .ap-reel-head { flex: 0 0 auto; display: flex; align-items: center; gap: calc(8 * var(--pt)); padding: calc(6 * var(--pt)) calc(40 * var(--pt)) calc(14 * var(--pt)) calc(14 * var(--pt)); }
    .ap-reel-head div { flex: 1 1 auto; text-align: center; min-width: 0; }
    .ap-reel-head b { display: block; font-size: calc(18 * var(--pt)); font-weight: 500; color: #3a4a49; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ap-reel-head span { display: block; margin-top: calc(4 * var(--pt)); font-size: calc(13 * var(--pt)); color: #3d5654; }
    .ap-back { color: #323333; }
    .ap-reel-card { position: relative; flex: 0 0 auto; margin: 0 calc(12 * var(--pt)); height: calc(600 * var(--pt)); border-radius: calc(18 * var(--pt)); overflow: hidden; background: #2f3a2c; }
    .ap-count { position: absolute; z-index: 2; top: calc(12 * var(--pt)); left: calc(12 * var(--pt)); padding: calc(7 * var(--pt)) calc(9 * var(--pt)); border-radius: calc(8 * var(--pt)); background: rgba(80, 80, 70, .72); color: #fff; font-size: calc(17 * var(--pt)); font-weight: 600; font-variant-numeric: tabular-nums; }
    .ap-reel-actions { flex: 0 0 auto; display: flex; justify-content: center; gap: calc(44 * var(--pt)); padding-top: calc(26 * var(--pt)); color: #323333; }
    .ap-reel-actions .ap-ic { width: calc(30 * var(--pt)); height: calc(30 * var(--pt)); }

    /* Analytics */
    .ap-an { background: #fff; }
    .ap-scroll { position: absolute; z-index: 1; left: 0; right: 0; top: calc(54 * var(--pt)); padding: calc(4 * var(--pt)) calc(16 * var(--pt)) calc(40 * var(--pt)); }
    .fv-shot.is-on .ap-scroll { animation: ap-scroll 20s ease-in-out infinite; }
    @keyframes ap-scroll { 0%, 12% { transform: none; } 50%, 62% { transform: translateY(calc(-100% + 100cqh - 54 * var(--pt))); } 100% { transform: none; } }
    .ap-h { margin: 0 0 calc(14 * var(--pt)); font-size: calc(32 * var(--pt)); line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; color: #323333; }
    .ap-filters { display: flex; gap: calc(8 * var(--pt)); margin-bottom: calc(14 * var(--pt)); }
    .ap-kits { display: flex; padding: calc(4 * var(--pt)); border-radius: calc(10 * var(--pt)); background: #f2f2f2; }
    .ap-kits i { width: calc(34 * var(--pt)); height: calc(32 * var(--pt)); padding: calc(5 * var(--pt)); border-radius: calc(7 * var(--pt)); }
    .ap-kits i.on { background: #fff; }
    .ap-sel { flex: 1 1 auto; display: flex; align-items: center; justify-content: space-between; gap: calc(6 * var(--pt)); height: calc(40 * var(--pt)); padding: 0 calc(12 * var(--pt)) 0 calc(16 * var(--pt)); border-radius: calc(10 * var(--pt)); background: #f2f2f2; font-size: calc(17 * var(--pt)); white-space: nowrap; }
    .ap-sel:last-child { flex: 0 0 auto; }
    .ap-sel svg { width: calc(18 * var(--pt)); height: calc(18 * var(--pt)); }
    .ap-card { margin: 0 0 calc(14 * var(--pt)); padding: calc(18 * var(--pt)) calc(20 * var(--pt)); border: calc(1.5 * var(--pt)) solid #ececec; border-radius: calc(18 * var(--pt)); }
    .ap-card h5 { display: flex; align-items: center; gap: calc(6 * var(--pt)); margin: 0 0 calc(14 * var(--pt)); font-size: calc(23 * var(--pt)); font-weight: 500; letter-spacing: -0.02em; color: #323333; }
    .ap-card h5 i { width: calc(18 * var(--pt)); height: calc(18 * var(--pt)); }
    .ap .ap-chart, .ap .ap-pitch { width: 100%; height: auto; }
    .ap-chart .pl, .ap-pitch .pl { fill: none; stroke: #d9d9d9; stroke-width: 4; }
    .ap-chart .pd, .ap-pitch .pd { fill: none; stroke: #d9d9d9; stroke-width: 4; stroke-dasharray: 9 9; }
    .ap-pitch .pa { fill: none; stroke: #c9c9c9; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
    .ap-chart .pr { fill: none; stroke: #c8352e; stroke-width: 3.5; stroke-linejoin: round; }
    .ap-chart .pg { fill: none; stroke: #4a4c4c; stroke-width: 3.5; stroke-linejoin: round; }
    .ap-chart .pk { fill: #c9c9c9; }
    .ap-pitch .dt { fill: #d03b33; }
    .ap-axis { display: flex; justify-content: space-between; margin: calc(4 * var(--pt)) 0 calc(14 * var(--pt)); font-size: calc(13 * var(--pt)); color: #6b6d6d; }
    .ap-thirds { display: flex; justify-content: space-around; margin: calc(8 * var(--pt)) 0 calc(14 * var(--pt)); font-size: calc(13 * var(--pt)); color: #6b6d6d; text-align: center; }
    .ap-thirds b { display: block; margin-top: calc(6 * var(--pt)); font-size: calc(18 * var(--pt)); font-weight: 500; color: #393c3c; }
    .ap-kv { display: flex; justify-content: space-between; padding: calc(4 * var(--pt)) 0; font-size: calc(17 * var(--pt)); color: #5a5c5c; }
    .ap-kv b { font-weight: 500; color: #393c3c; }
    .ap-an .ap-home { background: #111; }

    .fv-card, .fv-dots { display: none; }

    @media (max-width: 1180px) {
      .fv { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 0 28px; padding: 44px 36px 44px 32px; }
      .fv-stage { height: 580px; }
      .fv-phone { --phone-w: 252px; --bz: 4px; }
    }
    @media (max-width: 960px) {
      /* Phones and small tablets: device on top, the active feature in a card below with arrows and dots. */
      .fv { grid-template-columns: minmax(0, 1fr); padding: 28px 12px 20px; border-radius: 24px; }
      .fv-list { display: none; }
      .fv-stage { height: 350px; }
      .fv-phone { --phone-w: 152px; --bz: 3px; box-shadow: 0 0 0 .75px #3c3f42, 0 0 0 1.75px #a3a7aa, 0 0 0 2.25px #5f6366, 0 24px 40px -22px rgba(31, 52, 56, .38); }
      .fv-key { width: 2px; } .fv-key.l { left: -3.5px; } .fv-key.r { right: -3.5px; }
      .fv-card { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 14px 0; margin-top: 20px; }
      .fv-card button { width: 44px; height: 44px; border-radius: 50%; background: var(--white); border: 1px solid var(--stroke); color: var(--teal-50); display: grid; place-items: center; }
      .fv-card svg { width: 18px; height: 18px; }
      .fv-card > button:first-child { grid-row: 2; grid-column: 1; }
      .fv-card > button:nth-of-type(2) { grid-row: 2; grid-column: 3; }
      .fv-card-text { grid-row: 1; grid-column: 1 / -1; min-width: 0; max-width: none; min-height: 120px; margin: 0; background: var(--white); border-radius: 20px; padding: 18px 20px; font-size: 15px; }
      .fv-dots { grid-row: 2; grid-column: 2; display: flex; justify-content: center; gap: 6px; }
      .fv-dots span { width: 6px; height: 6px; border-radius: 50%; background: #d7d8d8; transition: background 200ms, width 200ms; }
      .fv-dots span.is-on { width: 18px; border-radius: 3px; background: var(--teal-50); }
    }
    @media (prefers-reduced-motion: reduce) {
      .fv-phone, .fv-shot { transition: none; }
      .fv-item[aria-expanded="true"] .fv-desc { animation: none; }
      .fv-shot.is-on .ap-scroll { animation: none; }
    }

    