/* =============================================================================
   Kotova Books overview: the OTC hero "Swaps" (every language but German)
   <!--SWAP-HERO:START--> … <!--SWAP-HERO:END--> in books/index*.html; load after product.css.
   All classes are prefixed bksw-; nothing here changes books.css, product.css or styles.css.

   <section class="bk-hero bkp-hero bkp-hero--swaps"><div class="container bk-hero-inner">
     <div class="bk-hero-copy bksw-copy">h1, lead, CTA, chips</div>
     <div class="bk-hero-visual bksw-visual">
       <figure class="bksw-fig" role="img">
         <span class="bksw-glow"></span>
         <div class="bksw-win-wrap"><div class="bk-app bksw-win">  the Exchange page, desktop layout, no browser chrome
         <div class="bksw-net-wrap"><div class="bk-app bksw-net">  net positions card (derivatives hint)
         <div class="bkp-phone bksw-phone"><div class="bkp-phone-screen"><div class="bk-app bksw-phoneapp">  phone layout
       </figure><p class="bkp-snap-cap">…</p><script>reveal</script></div></div></section>

   The visual is the app's Exchange module page (/fx-swaps) the way the
   app draws it: app bar, page head, buttons, KPI cards, list of swaps (paired
   coin marks, "A → B", "date · counterparty", P&L right in mono), pager, and on
   the phone the bottom tab bar with the gold camera button. Nothing is scaled.

   Layouts by viewport:
     >= 1024  the copy in two columns (headline | lead, button, chips), the visual
              below at the container's width: the window at the left (no browser
              chrome; below ~1100 px with the app's icon rail instead of the sidebar), the net
              positions card hanging from its lower-left edge, the phone at the lower right
              overlapping the window's right edge (the window keeps 44 px of padding at its
              right, so no content touches the phone).
     900-1023 the copy in two columns as well (a narrower lead column); the visual
              stacked in a 940 px figure: the window at full width, under it the net
              positions card (centred against the phone) and the phone (cropped to 660 px),
              the phone overlapping the window's lower edge.
     720-899  the copy stacked, the visual as above; from 768 px the card and the phone
              share a row, below 768 px the phone, then the card, in one centred column.
     <= 719   the phone board (like the German hero's): no window; the phone in full
              (all seven swaps and the pager) with the card under it. At <= 600 the
              phone is the column's width, no bezel.

   The list shows the app's real columns (Swap, Fee, P&L); on the phone only the P&L.
   The window is its own container ("bkswin", not "bkapp"): books.css §16's
   responsive rules (icon rail below 1100 px, ...) never apply to it, so it keeps
   the app's full desktop layout at any width; this file sets its density. The
   phone keeps container "bkapp": at <= 600 px wide the kit lays it out as the app's
   phone layout. Every size is >= 11 px.
   ========================================================================== */

/* ---------------------------------------------------------------- copy */

.bkp-hero--swaps .bk-hero-inner {
    display: block;
    gap: 0;
}

.bkp-hero--swaps .bk-h1 {
    font-family: "Space Grotesk", "bkp Space Grotesk Fallback", "Inter", sans-serif;
    font-size: clamp(2.25rem, 4.6vw, 3.5rem);
}

.bkp-hero--swaps .bk-lead {
    max-width: 40rem;
    margin-top: var(--spacing-lg);
    text-wrap: pretty;
}

.bkp-hero--swaps .bk-hero-cta {
    margin-top: var(--spacing-xl);
}

.bkp-hero--swaps .bk-chips {
    margin-top: var(--spacing-lg);
}

/* 601-899: the copy stacked; the first screen keeps the nav's offset plus 40 px */
@media (min-width: 601px) and (max-width: 899.98px) {
    .bkp-hero.bkp-hero--swaps {
        padding-top: calc(var(--bk-offset) + 40px);
    }
}

/* >= 900: headline left, the lead with the button and chips right: the product shot
   below starts as high as it can. The lead column widens with the screen (28 / 34 / 38 rem):
   at 1280 px the lead is three lines, so the first rows of the window show on a laptop. */
@media (min-width: 900px) {
    .bkp-hero.bkp-hero--swaps {
        padding-top: calc(var(--bk-offset) + 16px);
        padding-bottom: 72px;
    }

    .bksw-copy {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 28rem);
        grid-template-areas:
            "h l"
            "h a"
            "h c";
        column-gap: 40px;
        align-items: start;
    }

    .bksw-copy .bk-h1 {
        grid-area: h;
        align-self: center;
    }

    .bksw-copy .bk-lead {
        grid-area: l;
        margin-top: 0;
        max-width: none;
    }

    .bksw-copy .bk-hero-cta {
        grid-area: a;
    }

    .bksw-copy .bk-chips {
        grid-area: c;
    }
}

@media (min-width: 1200px) {
    .bkp-hero.bkp-hero--swaps {
        padding-top: calc(var(--bk-offset) + 14px);
    }

    .bksw-copy {
        grid-template-columns: minmax(0, 1fr) minmax(0, 34rem);
        column-gap: 56px;
    }
}

@media (min-width: 1280px) {
    .bksw-copy {
        grid-template-columns: minmax(0, 1fr) minmax(0, 38rem);
    }
}

/* phone: the copy, the visual, the caption, then the chips (one flex column; the two
   wrappers step aside with display: contents), as on the German hero */
@media (max-width: 359.98px) {
    .bkp-hero--swaps .bk-h1 {
        font-size: 2.05rem;     /* "Book every swap." stays on one line in the 288 px column */
    }
}

@media (max-width: 600px) {
    .bkp-hero.bkp-hero--swaps {
        padding-top: calc(var(--bk-offset) + 32px);
    }

    .bkp-hero--swaps .bk-lead {
        line-height: 1.55;
    }

    .bkp-hero--swaps .bk-hero-cta {
        margin-top: var(--spacing-lg);
    }

    .bkp-hero--swaps .bk-hero-inner {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .bksw-copy,
    .bksw-visual {
        display: contents;
    }

    .bkp-hero--swaps .bk-chips {
        order: 1;
        margin-top: 20px;
    }
}

/* ---------------------------------------------------------------- the composition */

.bksw-visual {
    margin-top: var(--spacing-2xl);
}

.bksw-fig {
    --bksw-ph-w: 394px;      /* the 380 px phone screen + 2 x 7 px bezel */
    --bksw-ph-h: 790px;      /* the phone screen's height: the top five swaps show */
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--bksw-ph-w);
    margin: 0;
}

/* soft light behind the composition: the app's azure into the page's gold */
.bksw-glow {
    position: absolute;
    z-index: 0;
    top: -6%;
    left: 8%;
    width: 84%;
    height: 96%;
    border-radius: 50%;
    background:
        radial-gradient(closest-side, rgba(90, 168, 247, 0.15), transparent 74%),
        radial-gradient(closest-side at 72% 58%, rgba(197, 165, 114, 0.13), transparent 80%);
    filter: blur(14px);
    pointer-events: none;
}

.bksw-win-wrap {
    position: relative;
    z-index: 1;
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.bksw-net-wrap {
    position: relative;
    z-index: 2;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    min-width: 0;
    width: min(100%, 520px);
    margin: 24px 0 0;
}

.bksw-phone {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    justify-self: end;
}

/* >= 1024: the window leaves the phone's width minus 24 px of overlap; the card
   hangs from the window's lower-left edge, the phone stands at the lower right */
@media (min-width: 1024px) {
    /* the visual bleeds into the right margin by up to 120 px (always keeping a 24 px gutter) */
    .bksw-visual {
        margin-top: 24px;
        margin-right: calc(-1 * clamp(0px, (100vw - 1152px) / 2 - 24px, 120px));
    }

    .bksw-win-wrap {
        grid-column: 1 / span 2;
        width: calc(100% - var(--bksw-ph-w) + 24px);
        max-width: 920px;
        margin: 0;
    }

    .bksw-net-wrap {
        margin: -26px 0 0 36px;
        width: min(100% - 60px, 540px);
    }

    .bksw-phone {
        grid-row: 1 / span 2;
        align-self: end;
    }

    /* the phone covers the window's right 24 px: the content keeps 20 px clear of the bezel */
    .bksw-fig .bk-app.bksw-win .content {
        padding-right: 44px;
    }
}

/* 720-1023 (the portrait tablets): the visual stacked in a 940 px figure: the window at full width, under it the net
   positions card and the phone (cropped to 660 px, overlapping the window's lower edge), the card centred against the phone */
@media (min-width: 720px) and (max-width: 1023.98px) {
    .bksw-fig {
        --bksw-ph-h: 660px;
        max-width: 940px;
        margin: 0 auto;
    }

    .bksw-win-wrap {
        max-width: none;
        margin: 0;
    }

    .bksw-phone {
        margin-top: -30px;
    }

    .bksw-net-wrap {
        align-self: center;
        justify-self: start;
        width: min(100% - 24px, 520px);
        margin: 0;
    }
}

/* 720-767: one centred column: the window, the phone, the card (a card beside the phone would be under 300 px) */
@media (min-width: 720px) and (max-width: 767.98px) {
    .bksw-fig {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
    }

    .bksw-phone {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
    }

    .bksw-net-wrap {
        grid-column: 1;
        grid-row: 3;
        justify-self: center;
        width: min(100%, 520px);
        margin: 28px 0 0;
    }
}

/* the phone: the shared .bkp-phone frame (product.css §1) at this size */
@media (min-width: 601px) {
    .bksw-fig .bkp-phone {
        width: var(--bksw-ph-w);
        padding: 7px;
        border-radius: 44px;
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.08) inset,
            0 0 0 2px #05070C,
            0 60px 90px -30px rgba(0, 0, 0, 0.9),
            0 22px 40px -14px rgba(0, 0, 0, 0.6);
    }

    .bksw-fig .bkp-phone-screen {
        border-radius: 37px;
    }
}

/* < 720: the phone board: no window; the phone, the card under it */
@media (max-width: 719.98px) {
    .bksw-win-wrap {
        display: none;
    }

    .bksw-fig {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        max-width: 420px;
        margin: 0 auto;
    }

    .bksw-phone {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
    }

    .bksw-net-wrap {
        grid-column: 1;
        grid-row: 2;
        justify-self: stretch;
        width: auto;
        margin: 22px 0 0;
    }

    .bksw-glow {
        display: none;
    }
}

@media (max-width: 600px) {
    .bksw-visual {
        margin-top: 0;
    }

    .bksw-fig {
        margin-top: 20px;
        width: 100%;
    }

    .bksw-fig .bkp-phone {
        width: 100%;
    }
}

/* caption above the figure's shadows */
.bksw-cap {
    margin-top: 28px;
}

/* ---------------------------------------------------------------- shared app parts */

/* paired coin marks: from, then to (the app's swap list) */
.bk-app .bksw-pair {
    flex: none;
}

.bk-app .bksw-pair .coin {
    width: 26px;
    height: 26px;
}

.bk-app .bksw-pair .coin + .coin {
    margin-left: -9px;
    box-shadow: 0 0 0 2px var(--surface);
}

.bk-app .bksw-main {
    min-width: 0;
}

/* "A → B": bold, one line; the legs wrap whole where the screen is narrow */
.bk-app .bksw-t {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
}

.bk-app .bksw-t .nw {
    white-space: nowrap;
}

.bk-app .bksw-t .ar {
    color: var(--ink-3);
}

.bk-app .bksw-s {
    margin-top: 2px;
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bk-app .bksw-pnl {
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.bk-app .bksw-list {
    overflow: hidden;
}

.bk-app .bksw-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.bk-app .bksw-kpis .kpi {
    gap: 3px;
}

.bk-app .bksw-kpis .kl > span {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bk-app .bksw-kpis .kl svg {
    flex: none;
    color: var(--ink-4);
}

.bk-app .bksw-pager {
    justify-content: flex-start;
}

.bk-app .bksw-pager .abtn svg {
    width: 14px;
    height: 14px;
}

/* ---------------------------------------------------------------- the desktop window */

.bk-app.bksw-win {
    container: bkswin / inline-size;
    border: 1px solid var(--hairline-strong);
    border-radius: 14px;
    background: var(--canvas);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.35),
        0 70px 110px -34px rgba(0, 0, 0, 0.92),
        0 26px 46px -16px rgba(0, 0, 0, 0.62);
}

.bk-app.bksw-win .shell {
    grid-template-columns: 208px minmax(0, 1fr);
    height: auto;
    min-height: 0;
}

/* the sidebar never makes the window taller: it is cropped to the page's height */
.bk-app.bksw-win .side {
    contain: size;
    padding: 12px 10px;
}

.bk-app.bksw-win .side .brand {
    padding: 4px 8px 12px;
}

.bk-app.bksw-win .nav-i {
    padding: 6px 10px;
}

.bk-app.bksw-win .side .grp {
    padding: 12px 10px 5px;
    font-size: 11px;
}

/* top bar: switcher, search (takes what is left), then bell and profile at the right end */
.bk-app.bksw-win .top {
    gap: 8px;
    min-height: 56px;
    padding: 8px 24px 8px 24px;
}

.bk-app.bksw-win .top .sp {
    display: none;
}

.bk-app.bksw-win .top .search {
    max-width: 400px;
    padding: 7px 10px;
    font-size: 13.5px;
}

.bk-app.bksw-win .top .icon-btn {
    margin-left: auto;
}

.bk-app.bksw-win .content {
    gap: 18px;
    padding: 22px 28px 26px 24px;
}

.bk-app.bksw-win .page-h {
    align-items: center;
}

.bk-app.bksw-win .page-h .ph-t {
    flex: 1 1 240px;
}

.bk-app.bksw-win .page-h .h1 {
    font-size: 26px;
}

.bk-app.bksw-win .page-h .ph-d {
    margin-top: 4px;
}

.bk-app.bksw-win .bksw-kpis .kpi {
    padding: 12px 14px;
}

.bk-app.bksw-win .bksw-kpis .kv {
    font-size: 22px;
}

/* the list: a head row and rows of  pair | title + date · counterparty | fee | P&L
   (a hidden cell leaves the grid, so the later cells move up a column) */
.bk-app.bksw-win .bksw-hd,
.bk-app.bksw-win .bksw-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 84px 88px;
    align-items: center;
    column-gap: 12px;
    padding-left: 18px;
    padding-right: 18px;
}

.bk-app.bksw-win .bksw-hd {
    min-height: 34px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--hairline-strong);
    font: 600 11px/1 var(--f-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.bk-app.bksw-win .bksw-hd > :nth-child(3),
.bk-app.bksw-win .bksw-hd > :nth-child(4) {
    text-align: right;
}

.bk-app.bksw-win .bksw-row {
    min-height: 54px;
    padding-top: 7px;
    padding-bottom: 7px;
    border-top: 1px solid var(--hairline);
}

.bk-app.bksw-win .bksw-hd + .bksw-row {
    border-top: 0;
}

.bk-app.bksw-win .bksw-t {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* the fee: the app's own column, in the quiet ink (the P&L beside it carries the colour) */
.bk-app.bksw-win .bksw-fee {
    font-size: 13px;
    color: var(--ink-2);
    text-align: right;
}

.bk-app.bksw-win .bksw-pager {
    padding: 10px 18px;
}

/* medium (below 876 px: the 1200-1400 px viewports): a 200 px sidebar, no info marks on the KPI labels */
@container bkswin (max-width: 875.98px) {
    .bk-app.bksw-win .shell {
        grid-template-columns: 200px minmax(0, 1fr);
    }

    .bk-app.bksw-win .nav-i {
        gap: 9px;
        padding: 6px 9px;
        font-size: 13.5px;
    }

    .bk-app.bksw-win .top {
        padding-right: 20px;
    }

    .bk-app.bksw-win .content {
        gap: 16px;
        padding: 20px 28px 24px 20px;
    }

    .bk-app.bksw-win .bksw-kpis {
        gap: 10px;
    }

    .bk-app.bksw-win .bksw-kpis .kpi {
        padding: 11px 12px;
    }

    .bk-app.bksw-win .bksw-kpis .kl {
        gap: 5px;
        font-size: 12px;
    }

    .bk-app.bksw-win .bksw-kpis .kl svg {
        display: none;
    }

    .bk-app.bksw-win .bksw-kpis .kv {
        font-size: 20px;
    }

    .bk-app.bksw-win .bksw-hd,
    .bk-app.bksw-win .bksw-row {
        grid-template-columns: 44px minmax(0, 1fr) 76px 84px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .bk-app.bksw-win .bksw-pager {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* narrow (below 780 px: the 1100-1200 px viewports and the 720-827 px tablets): a 180 px sidebar, the fee column goes
   and the brand line its second row; the KPI cards give their labels the room ("Spread revenue" needs 84 px at 11 px) */
@container bkswin (max-width: 779.98px) {
    .bk-app.bksw-win .shell {
        grid-template-columns: 180px minmax(0, 1fr);
    }

    .bk-app.bksw-win .nav-i {
        gap: 8px;
        padding: 6px 8px;
        font-size: 13px;
    }

    .bk-app.bksw-win .side .brand-name small {
        display: none;
    }

    /* the title block gives way so Filter and New swap stay beside it */
    .bk-app.bksw-win .page-h .ph-t {
        flex-basis: 190px;
    }

    .bk-app.bksw-win .top .search .kbd {
        display: none;
    }

    .bk-app.bksw-win .bksw-hd,
    .bk-app.bksw-win .bksw-row {
        grid-template-columns: 44px minmax(0, 1fr) 84px;
    }

    .bk-app.bksw-win .bksw-hd > :nth-child(3),
    .bk-app.bksw-win .bksw-row > .bksw-fee {
        display: none;
    }

    .bk-app.bksw-win .content {
        padding-left: 18px;
    }

    .bk-app.bksw-win .bksw-kpis {
        gap: 8px;
    }

    .bk-app.bksw-win .bksw-kpis .kpi {
        padding: 10px 8px;
    }

    .bk-app.bksw-win .bksw-kpis .kl {
        font-size: 11px;
    }

    .bk-app.bksw-win .bksw-kpis .kv {
        font-size: 19px;
    }
}

/* rail (below 680 px: the 1024-1100 px viewports, where the window stands beside the phone): the app's tablet
   layout, an icon rail of 72 px instead of the sidebar (books.css §16, "tablet: icon rail"); the two extra
   items that only fill the full sidebar are dropped so the rail ends with the window */
@container bkswin (max-width: 679.98px) {
    .bk-app.bksw-win .shell {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .bk-app.bksw-win .side {
        align-items: center;
        padding: 12px 8px;
    }

    .bk-app.bksw-win .side .brand {
        padding: 4px 0 12px;
    }

    .bk-app.bksw-win .brand-name,
    .bk-app.bksw-win .side .grp,
    .bk-app.bksw-win .nav-i .lbl,
    .bk-app.bksw-win .nav-i.bksw-x {
        display: none;
    }

    .bk-app.bksw-win .side .grp + .nav-i {
        margin-top: 10px;
    }

    .bk-app.bksw-win .nav-i {
        justify-content: center;
        width: 48px;
        height: 42px;
        padding: 0;
    }

    .bk-app.bksw-win .nav-i .cnt {
        position: absolute;
        top: 2px;
        right: 0;
        padding: 0 5px;
        font-size: 10px;
    }

    .bk-app.bksw-win .nav-i.on::before {
        left: -8px;
    }
}

/* ---------------------------------------------------------------- net positions card (derivatives hint) */

.bk-app.bksw-net {
    container: bkswnet / inline-size;
    overflow: visible;
    background: none;
}

.bk-app.bksw-net .card {
    border-color: var(--hairline-strong);
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.35),
        0 44px 70px -26px rgba(0, 0, 0, 0.9),
        0 16px 30px -12px rgba(0, 0, 0, 0.55);
}

.bk-app.bksw-net .card-h {
    flex-wrap: nowrap;
    padding: 12px 18px;
}

.bk-app.bksw-net .card-h .ct {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bk-app.bksw-net .card-f {
    padding: 9px 18px;
    font-size: 12.5px;
}

.bk-app.bksw-net .bkp-net th,
.bk-app.bksw-net .bkp-net td {
    padding-top: 8px;
    padding-bottom: 8px;
}

.bk-app.bksw-net .bkp-net th {
    font-size: 11px;
}

.bk-app.bksw-net .bkp-net .net-hg {
    min-width: 96px;
}

@container bkswnet (max-width: 460px) {
    .bk-app.bksw-net .bkp-net th:first-child,
    .bk-app.bksw-net .bkp-net td:first-child {
        padding-left: 12px;
    }

    .bk-app.bksw-net .bkp-net th:last-child,
    .bk-app.bksw-net .bkp-net td:last-child {
        padding-right: 12px;
    }

    .bk-app.bksw-net .bkp-net th,
    .bk-app.bksw-net .bkp-net td {
        padding-left: 6px;
        padding-right: 6px;
    }

    .bk-app.bksw-net .bkp-net .net-hg {
        min-width: 70px;
    }

    .bk-app.bksw-net .bkp-net .net-inst .sub {
        display: none;
    }

    .bk-app.bksw-net .card-h {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@container bkswnet (max-width: 400px) {
    .bk-app.bksw-net .bkp-net th:nth-child(4),
    .bk-app.bksw-net .bkp-net td:nth-child(4) {
        display: none;
    }

    /* the hedge ratio is the last column here: it keeps the card's side padding */
    .bk-app.bksw-net .bkp-net th:nth-child(3),
    .bk-app.bksw-net .bkp-net td:nth-child(3) {
        padding-right: 12px;
    }

    .bk-app.bksw-net .bkp-net .net-hg {
        min-width: 60px;
    }
}

/* ---------------------------------------------------------------- the phone */

.bk-app.bksw-phoneapp {
    display: flex;
    flex-direction: column;
    height: var(--bksw-ph-h);
}

.bk-app.bksw-phoneapp .mtop {
    flex: none;
}

/* a window onto the page: the rest sits under the tab bar, as on a real phone; the last row fades out */
.bk-app.bksw-phoneapp .content {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0;
}

.bk-app.bksw-phoneapp .content > * {
    flex: none;
}

.bk-app.bksw-phoneapp .content::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 44px;
    background: linear-gradient(180deg, transparent, var(--canvas));
    pointer-events: none;
}

.bk-app.bksw-phoneapp .mtop .ttl small {
    font-size: 11.5px;
}

.bk-app.bksw-phoneapp .bksw-acts {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
    gap: 10px;
}

.bk-app.bksw-phoneapp .bksw-acts .abtn {
    padding: 9px 12px;
}

.bk-app.bksw-phoneapp .bksw-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.bk-app.bksw-phoneapp .bksw-kpis .kpi {
    gap: 2px;
    padding: 11px 13px;
}

.bk-app.bksw-phoneapp .bksw-kpis .kv {
    font-size: 20px;
}

.bk-app.bksw-phoneapp .bksw-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 9px;
    min-height: 62px;
    padding: 10px 12px;
    border-top: 1px solid var(--hairline);
}

.bk-app.bksw-phoneapp .bksw-pair .coin {
    width: 24px;
    height: 24px;
}

.bk-app.bksw-phoneapp .bksw-pair .coin + .coin {
    margin-left: -8px;
}

.bk-app.bksw-phoneapp .bksw-row:first-child {
    border-top: 0;
}

.bk-app.bksw-phoneapp .bksw-t {
    font-size: 13px;
}

.bk-app.bksw-phoneapp .bksw-s {
    font-size: 12px;
}

.bk-app.bksw-phoneapp .bksw-pnl {
    font-size: 12.5px;
}

/* the bottom tab bar: Overview, Review, the gold camera button, Books (here), More */
.bk-app.bksw-phoneapp .bksw-tabs {
    /* above the list's fade-out (.content::after is positioned): the camera button rises 26 px into the list, and
       without its own layer the fade covered the button's top edge (owner 29.11.2026) */
    position: relative;
    z-index: 2;
    flex: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    padding: 8px 6px 12px;
    border-top: 1px solid var(--hairline);
    background: color-mix(in srgb, var(--canvas) 88%, var(--surface));
}

.bk-app.bksw-phoneapp .bksw-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
    padding-top: 2px;
    font-size: 11.5px;
    line-height: 1.2;
    color: var(--ink-3);
    white-space: nowrap;
}

.bk-app.bksw-phoneapp .bksw-tab svg.lucide {
    width: 22px;
    height: 22px;
}

.bk-app.bksw-phoneapp .bksw-tab.is-on {
    color: var(--primary);
    font-weight: 600;
}

.bk-app.bksw-phoneapp .bksw-fab {
    display: grid;
    place-items: center;
    justify-self: center;
    width: 56px;
    height: 56px;
    margin-top: -26px;
    border-radius: 17px;
    background: var(--primary);
    color: var(--on-primary);
    box-shadow:
        0 0 0 5px color-mix(in srgb, var(--canvas) 88%, var(--surface)),
        0 10px 22px -6px rgba(217, 180, 114, 0.5);
}

.bk-app.bksw-phoneapp .bksw-fab svg.lucide {
    width: 25px;
    height: 25px;
}

/* the phone board (no window, below 720 px): the whole page, no crop and no fade: all seven swaps, the pager (1-7 of 7)
   and the bottom bar, so the Gross P&L card can be checked against the rows above it */
@media (max-width: 719.98px) {
    .bk-app.bksw-phoneapp {
        height: auto;
    }

    .bk-app.bksw-phoneapp .content {
        flex: none;
        overflow: visible;
        padding-bottom: 16px;
    }

    .bk-app.bksw-phoneapp .content::after {
        display: none;
    }

    .bk-app.bksw-phoneapp .bksw-list .bksw-pager {
        padding: 10px 12px;
    }
}

/* a screen narrower than the 380 px phone (the column of a 390 px phone): tighter sides, so the legs of a swap keep one line */
@container bkapp (max-width: 370px) {
    .bk-app.bksw-phoneapp .content {
        padding-left: 12px;
        padding-right: 12px;
    }

    .bk-app.bksw-phoneapp .bksw-row {
        column-gap: 8px;
        padding-left: 9px;
        padding-right: 9px;
    }

    .bk-app.bksw-phoneapp .bksw-t {
        font-size: 12.5px;
    }

    .bk-app.bksw-phoneapp .bksw-pnl {
        font-size: 12px;
    }
}

/* a screen narrower than a phone (the 288 px column at 320): the app bar drops its search button and the KPI labels their
   info marks; the legs of a swap wrap whole */
@container bkapp (max-width: 340px) {
    .bk-app.bksw-phoneapp .bksw-kpis .kl svg {
        display: none;
    }

    .bk-app.bksw-phoneapp .mtop .icon-btn {
        display: none;
    }

    /* the swap gets the whole width: title on top, counterparty and P&L under it (the date goes) */
    .bk-app.bksw-phoneapp .bksw-row {
        grid-template-areas:
            "pair t t"
            "pair s p";
        row-gap: 1px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .bk-app.bksw-phoneapp .bksw-main {
        display: contents;
    }

    .bk-app.bksw-phoneapp .bksw-pair { grid-area: pair; }
    .bk-app.bksw-phoneapp .bksw-t { grid-area: t; }
    .bk-app.bksw-phoneapp .bksw-s { grid-area: s; margin-top: 0; }
    .bk-app.bksw-phoneapp .bksw-pnl { grid-area: p; }

    .bk-app.bksw-phoneapp .bksw-d {
        display: none;
    }

    /* the pager keeps one line: "1-7 of 7", Previous, Next */
    .bk-app.bksw-phoneapp .bksw-pager {
        flex-wrap: nowrap;
        gap: 6px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .bk-app.bksw-phoneapp .bksw-pager .abtn {
        gap: 3px;
        padding-left: 7px;
        padding-right: 7px;
    }

    .bk-app.bksw-phoneapp .bksw-pager .abtn svg {
        width: 12px;
        height: 12px;
    }
}

/* ---------------------------------------------------------------- reveal */
/* Each step plays once, when its top is 40 px inside the viewport: 0 the window settles, 1 its rows stagger in,
   2 the phone rises, 3 the net positions card slides in. The inline script adds .js-reveal to the figure, then
   .is-in and --d (the delay) to each step; the hidden states keep every part inside its box, so the observer
   always sees it. Only opacity and transform move. No JS, reduced motion and print: the complete static state. */
.bksw-fig.js-reveal [data-step]:not(.is-in) {
    opacity: 0;
}

.bksw-fig.js-reveal [data-step].is-in {
    animation: bksw-in 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: var(--d, 120ms);
}

.bksw-fig.js-reveal .bksw-phone.is-in {
    animation-name: bksw-rise;
    animation-duration: 640ms;
}

.bksw-fig.js-reveal .bksw-net-wrap.is-in {
    animation-name: bksw-slide;
}

/* the list card is a step of its own only for its rows: it stays put, the rows come in one by one */
.bksw-fig.js-reveal .bksw-list[data-step] {
    opacity: 1;
}

.bksw-fig.js-reveal .bksw-list[data-step].is-in {
    animation: none;
}

.bksw-fig.js-reveal .bksw-list[data-step]:not(.is-in) .bksw-row {
    opacity: 0;
}

.bksw-fig.js-reveal .bksw-list[data-step].is-in .bksw-row {
    animation: bksw-row 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(var(--d, 120ms) + var(--i, 0) * 60ms);
}

@keyframes bksw-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes bksw-rise {
    from { opacity: 0; transform: translateY(32px); }
    to { opacity: 1; transform: none; }
}

@keyframes bksw-slide {
    from { opacity: 0; transform: translateX(-18px); }
    to { opacity: 1; transform: none; }
}

@keyframes bksw-row {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .bksw-fig [data-step],
    .bksw-fig .bksw-row {
        opacity: 1 !important;
        animation: none !important;
    }
}

/* Print: the complete static state; the shadows and the glow are smudges on paper, the gold words print in solid gold. */
@media print {
    .bksw-fig [data-step],
    .bksw-fig .bksw-row {
        opacity: 1 !important;
        animation: none !important;
    }

    .bksw-fig {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .bksw-glow {
        display: none;
    }

    .bk-app.bksw-win,
    .bk-app.bksw-net .card,
    .bksw-fig .bkp-phone {
        box-shadow: none;
    }

    .bkp-hero--swaps .bk-gold {
        background: none;
        -webkit-text-fill-color: currentColor;
        color: #9A7A40;
    }
}
