/* ==========================================================================
   BancBridge "How TreasuryAgent works" hub + the 4 animation viewer pages
   Ported from design handoff: "How TreasuryAgent Works.dc.html",
   "How It Works - Screen 1-4.dc.html"

   Hub page uses the shared page-shell classes (.bb-page-header,
   .bb-cta-band, .bb-footer) plus the numbered walkthrough list below.
   Viewer pages use a deliberately minimal chrome (logo only, no full nav)
   matching the source design's focused animation-viewing layout.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hub page: numbered walkthrough list
   -------------------------------------------------------------------------- */
.hiw-list {
    padding: 56px;
    max-width: 1000px;
    margin: 0 auto;
}

.hiw-row {
    display: grid;
    grid-template-columns: 76px 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 26px 4px;
    border-top: 1px solid var(--card-border);
    transition: background var(--duration-fast) var(--ease-out);
}

.hiw-list .hiw-row:last-child {
    border-bottom: 1px solid var(--card-border);
}

.hiw-row:hover {
    background: var(--bg-gray);
}

.hiw-num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 34px;
    color: #c3ced9;
    line-height: 1;
}

.hiw-title {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 23px;
    color: var(--text-dark);
}

.hiw-desc {
    display: block;
    font-size: 15px;
    line-height: 1.55;
    color: #5b6b7a;
    margin-top: 6px;
}

.hiw-arrow {
    font-size: 20px;
    color: var(--primary-blue);
}

/* --------------------------------------------------------------------------
   Viewer pages: minimal chrome
   -------------------------------------------------------------------------- */
.hiwv-page {
    min-height: 100vh;
    background: var(--bg-gray);
    padding: 28px 32px 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hiwv-bar {
    display: flex;
    align-items: center;
    max-width: 1570px;
    width: 100%;
    margin: 0 auto;
}

.hiwv-caption {
    max-width: 1570px;
    width: 100%;
    margin: 0 auto;
}

.hiwv-step {
    font: 700 12px 'Public Sans', sans-serif;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.hiwv-caption h1 {
    font-size: 38px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    margin: 10px 0 0;
}

.hiwv-hint {
    font: 400 15px 'Public Sans', sans-serif;
    color: #6b7784;
    margin: 10px 0 0;
}

.hiwv-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.hiwv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 5px;
    font: 600 15px 'Public Sans', sans-serif;
    white-space: nowrap;
}

.hiwv-btn--back {
    background: #ffffff;
    border: 1px solid #ccd7e2;
    color: var(--primary-blue);
}

.hiwv-btn--back:hover {
    border-color: var(--primary-blue);
}

.hiwv-btn--replay {
    background: var(--primary-blue);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.hiwv-btn--replay:hover {
    background: #00284f;
}

.hiwv-frame {
    max-width: 1570px;
    width: 100%;
    margin: 0 auto;
    background: repeating-linear-gradient(#fdfdfa, #fdfdfa 27px, #e9eef6 27px, #e9eef6 28px);
    border: 1px solid #e4e9f1;
    border-radius: 2px;
    overflow: hidden;
}

.hiwv-frame svg {
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
}

.bb-explainer-fallback {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    .bb-explainer-fallback {
        position: static;
        width: auto;
        height: auto;
        clip: auto;
        white-space: normal;
        padding: 24px;
        font-size: 15px;
        line-height: 1.6;
        color: var(--text-body);
    }
}

@media (max-width: 900px) {
    .hiw-list {
        padding: 40px 24px;
    }

    .hiwv-page {
        padding: 20px 16px 32px;
    }
}
