/* NBA AI Filter Leaderboard: the list page and one filter's page (prefix nbf-). Loaded after nba.css and nba_pages.css, tokens only.
   Result marks carry shape and colour: Hit = filled green, Miss = red ring, rows locked but none decided = grey ring, no rows = a dot. */

/* The one dimming of a control that is off, a date outside the view's record, an arrow with nowhere to go (theme-independent). */
:root { --nbf-dim: 0.45; }

/* The one pill base (a bordered --radius-pill chip): variants set border style and colour tokens; a larger or icon pill also its padding
   and weight. Markup: class="nbf-pill nbf-<variant>". */
.nbf-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-sizing: border-box;
    padding: 1px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg-surface-alt);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    font-weight: 700;
    white-space: nowrap;
}
.nbf-pill .nbp-ico { width: var(--nbp-ico-xs); height: var(--nbp-ico-xs); }
.nbf-conds { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.nbf-cond { padding: 3px 10px; color: var(--text-primary); font-weight: 600; line-height: 1.35; white-space: normal; }
.nbf-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin: 8px 0 0;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}
.nbf-stat { border-color: var(--border-strong); background: var(--bg-surface); }
.nbf-stat.is-pts { border-color: var(--nba-stat-pts); background: var(--nba-stat-pts-soft); color: var(--nba-stat-pts); }
.nbf-stat.is-reb { border-color: var(--nba-stat-reb); background: var(--nba-stat-reb-soft); color: var(--nba-stat-reb); }
.nbf-stat.is-ast { border-color: var(--nba-stat-ast); background: var(--nba-stat-ast-soft); color: var(--nba-stat-ast); }
.nbf-push { margin-left: auto; }

.nbf-days { display: flex; align-items: flex-end; gap: 3px; }
.nbf-day { display: flex; flex: 0 0 8px; flex-direction: column; justify-content: flex-end; gap: 2px; }
.nbf-sq { display: block; width: 8px; height: 8px; box-sizing: border-box; border-radius: 2px; }
.nbf-sq.h { background: var(--nba-rec-hit); }
.nbf-sq.m { border: 2px solid var(--nba-rec-miss); }
.nbf-sq.n { width: 4px; height: 4px; margin: 0 2px; border-radius: 50%; background: var(--border-strong); opacity: 0.6; }
.nbf-sq.z { border: 2px solid var(--border-strong); }
.nbf-sqrow { display: inline-flex; gap: 3px; }
.nbf-sqrow .nbf-sq { width: 10px; height: 10px; }

.nbf-res { justify-content: center; min-width: 52px; padding: 3px 10px; }
.nbf-res.is-hit { background: var(--color-success-soft); border-color: var(--color-success-border); color: var(--color-success-strong); }
.nbf-res.is-miss { background: var(--color-danger-soft); border-color: var(--color-danger-border); color: var(--color-danger-strong); }

.nba-btn.nbf-btn-line,
.nba-btn.nbf-btn-line:hover,
.nba-btn.nbf-btn-line:focus-visible { border-color: var(--color-primary); color: var(--text-link); }
.nba-btn.nbf-btn-line:hover { background: var(--color-primary-soft); }

.nbf-big,
.nbf-funnel b { font-size: 1.55rem; font-weight: 700; line-height: 1.1; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.nbf-big { margin: 1px 0 6px; white-space: nowrap; }
.nbf-big small { font-size: var(--font-size-sm); font-weight: 400; color: var(--text-secondary); }
.nbf-sub { margin: 6px 0 0; font-size: var(--font-size-xs); line-height: 1.45; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.nbf-sub b { color: var(--text-primary); }

/* ── List page: the band (intro + funnel, then the day line), the control bar, the ranked filter cards ───── */

.nbp-band.nbf-band { display: block; }
.nbf-bandtop { display: flex; gap: 20px 32px; align-items: center; }
.nbf-intro { flex: 1 1 auto; min-width: 0; }
.nbf-kick { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; color: var(--text-link); }
.nbf-kick .nbp-band-ico { width: 32px; height: 32px; border-radius: var(--radius-md); }
.nbf-kick .nbp-band-ico .nbp-ico { width: var(--nbp-ico-md); height: var(--nbp-ico-md); }
.nbf-title { font-size: 1.9rem; }
.nbf-funnel { flex: none; display: grid; gap: 6px; justify-items: center; width: 360px; margin: 0; padding: 0; list-style: none; }
.nbf-funnel li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 2px 8px;
    box-sizing: border-box;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    text-align: center;
}
.nbf-funnel .nbp-kicker { flex-basis: 100%; margin: 0; }
.nbf-funnel .is-mid { width: 91%; }
.nbf-funnel .is-tip { width: 82%; border-color: var(--color-primary); background: var(--color-primary-soft); }
.nbf-funnel .is-tip .nbp-kicker { color: var(--text-link); }
.nbf-dayline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 12px 18px;
    align-items: start;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
}
.nbf-stage { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; }
.nbf-stage p { margin: 0; min-width: 0; }
.nbf-stage b { display: block; font-size: var(--font-size-sm); color: var(--text-primary); }
.nbf-stage p > span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin-top: 3px;
    font-size: var(--font-size-xs);
    line-height: 1.45;
    color: var(--text-secondary);
}
/* The one step dot (the band's day line and the day timeline): 28 px, .is-lg 32 px; done = green check, now = primary, ahead = dashed. */
.nbf-dot {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    box-sizing: border-box;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    background: var(--bg-surface);
    color: var(--text-muted);
}
.nbf-dot .nbp-ico { width: var(--nbp-ico-sm); height: var(--nbp-ico-sm); }
.nbf-dot.is-lg { width: 32px; height: 32px; }
.nbf-dot.is-lg .nbp-ico { width: var(--nbp-ico-md); height: var(--nbp-ico-md); }
.is-now > .nbf-dot { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--text-link); }
.is-now > .nbf-dot { box-shadow: 0 0 0 3px var(--color-primary-soft); }
/* A stage that has happened (nbf_step_icon() draws the check): one rule for every stage and stop, the lock stop included. */
.is-done > .nbf-dot,
.nbf-st.is-lock.is-done > .nbf-dot {
    border-color: var(--color-success-strong);
    background: var(--color-success-soft);
    color: var(--color-success-strong);
}
.is-ahead > .nbf-dot { border-style: dashed; }
.nbf-daymeta { display: grid; gap: 6px; margin: 0; padding-left: 18px; border-left: 1px solid var(--border-soft); }
.nbf-daymeta dt { margin: 0; white-space: nowrap; }
.nbf-daymeta dd { margin: 0; font-weight: 700; color: var(--text-primary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nbf-daymeta small { font-size: var(--font-size-xs); font-weight: 400; color: var(--text-muted); }

.nbf-barnote { margin-left: auto; font-size: var(--font-size-xs); color: var(--text-muted); white-space: nowrap; }
.nbf-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.nba-pages .nbf-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 164px 240px auto;
    grid-template-areas: "rank body fig hist act";
    gap: 8px 22px;
    align-items: center;
    margin: 0;
    padding: 14px 18px;
}
.nbf-rank {
    grid-area: rank;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--text-link);
    font-size: var(--font-size-md);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.nbf-body { grid-area: body; min-width: 0; }
.nbf-fig { grid-area: fig; min-width: 0; }
.nbf-hist { grid-area: hist; min-width: 0; }
.nbf-hist .nbf-days { min-height: 28px; margin-top: 6px; }
.nbf-act { grid-area: act; display: flex; flex-direction: column; gap: 6px; }
/* The one-line hint under the slate button on all three pages: what "Use on … slate" opens (a live view, not the record). */
.nbf-act-hint { max-width: 224px; margin: 0; font-size: var(--font-size-xs); line-height: 1.5; color: var(--text-muted); }
.nbp-actions .nbf-act-hint { flex-basis: 100%; max-width: none; }

/* The board's view (Rank on, Record, View): a stepper with its word or unit, faded while its choice is off; the bar's last line names
   the view; a card's dates outside the view's record are drawn faint; a view that ranks nothing shows one card. */
.nbf-bar .num-stepper { flex: none; }
.nbf-ctl-pair { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nbf-ctl-word { font-size: var(--font-size-xs); color: var(--text-secondary); white-space: nowrap; }
.nbf-ctl-pair.is-dim { opacity: var(--nbf-dim); }
/* The unit pill stretches to the stepper beside it (.num-stepper sets the row's height). */
.nbf-ctl-pair .nbp-since.nba-pill { height: auto; align-self: stretch; }
.nbf-rankline { margin-left: auto; font-size: var(--font-size-xs); color: var(--text-secondary); }
.nbf-rankline b { color: var(--text-primary); }
.nbf-day.is-out { opacity: 0.25; }
.nbf-noneyet .nba-btn { margin-top: 12px; }

/* ── Filter page: head and record, the date tiles, one date's rows ─────────────────────────────── */

.nbf-top-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.nbf-top-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px 32px; align-items: start; }
.nbf-top-grid .nbp-h1 { margin: 2px 0 12px; }
.nbf-top-grid .nbp-actions { margin-top: 14px; }
.nbf-lead { margin-top: 12px; line-height: 1.5; }
.nbf-hero {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-lg);
    background: linear-gradient(100deg, var(--color-primary-soft), var(--bg-surface) 75%);
}
.nbf-hero-big {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin: 4px 0 10px;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
.nbf-hero-big b { font-size: 2.5rem; line-height: 1; }
.nbf-hero-big span { font-size: var(--font-size-md); color: var(--text-secondary); }
.nbf-hero-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.nbf-hero-facts dt { font-size: var(--font-size-xs); line-height: 1.3; color: var(--text-secondary); }
.nbf-hero-facts dd { margin: 3px 0 0; font-size: 1.05rem; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* A long season of tiles scrolls inside the card; the padding keeps the tiles' shadows from being cut. */
.nbf-dgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 8px;
    max-height: 290px;
    margin: -3px;
    padding: 3px;
    overflow-y: auto;
}
.nbf-date {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--nba-pc-bg);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-decoration: none;
}
a.nbf-date:hover { background: var(--bg-surface-alt); color: var(--text-primary); text-decoration: none; }
.nbf-date-r {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.nbf-date.is-on,
.nbf-date.is-on:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
    box-shadow: inset 0 -4px 0 var(--color-primary), var(--shadow-md);
}
.nbf-date.is-pending { border-style: dashed; box-shadow: none; color: var(--text-secondary); }
.nbf-date.is-pending.is-on { box-shadow: inset 0 -4px 0 var(--color-primary); color: var(--text-primary); }
.nbf-date.is-pending .nbf-date-r { font-weight: 400; white-space: normal; }
/* Outside the view's record = faint; a date before the filter was made (replayed) = flat, under its own heading. */
.nbf-date.is-out:not(.is-on) { opacity: var(--nbf-dim); }
.nbf-date.is-replay:not(.is-on) { background: transparent; box-shadow: none; }
.nbf-dgrid-div { grid-column: 1 / -1; margin: 6px 0 0; }
.nbf-added { margin-top: 10px; }

.nbf-dc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 12px; }
.nbf-dc-title { margin: 0; font-size: 1.3rem; font-weight: 700; line-height: 1.2; color: var(--text-primary); }
.nbf-rows { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.nbf-row {
    display: grid;
    grid-template-columns: 18px 44px minmax(0, 1.15fr) minmax(0, 1.9fr) minmax(64px, auto);
    grid-template-areas: "n logo who kpis res";
    gap: 8px 14px;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--nba-pc-bg);
}
.nbf-row.is-hit { border-left-color: var(--nba-rec-hit); }
.nbf-row.is-miss { border-left-color: var(--nba-rec-miss); }
.nbf-row-n { grid-area: n; font-size: var(--font-size-sm); font-weight: 700; color: var(--text-muted); text-align: center; }
.nbf-logo {
    grid-area: logo;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    box-sizing: border-box;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: var(--nba-logo-plate);
}
.nbf-logo img { display: block; width: 80%; height: 80%; object-fit: contain; }
.nbf-who { grid-area: who; min-width: 0; }
.nbf-who > .nbf-name {
    display: block;
    overflow: hidden;
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nbf-who > .nba-btn.nbf-name { display: inline-block; max-width: 100%; height: auto; margin-left: -4px; padding: 4px 10px; vertical-align: top; }
.nbf-who > span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin-top: 4px;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}
.nbf-kpis {
    grid-area: kpis;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}
.nbf-kpis > div { padding: 6px 6px; text-align: center; }
.nbf-kpis > div + div { border-left: 1px solid var(--border-soft); }
.nbf-kpis dt {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    white-space: nowrap;
}
.nbf-kpis dd { margin: 2px 0 0; font-size: 1.05rem; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.nbf-kpis dd.nba-up,
.nbf-kpis dd.nba-down { font-weight: 700; }
.nbf-row-res { grid-area: res; text-align: right; }

/* The one kicker + note head row (the well, the dated card, the moved-out rows): each head sets only its margins and rule. */
.nbf-head-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.nbf-head-row .nbp-kicker { margin: 0; }
.nbf-head-row .nbp-kicker .nbp-ico {
    display: inline-block;
    width: var(--nbp-ico-sm);
    height: var(--nbp-ico-sm);
    margin-right: 6px;
    vertical-align: -2px;
}

/* Moved out before the lock (plan nba-filter-lock-v2 §0.8c, design B): the same row, drawn lighter, under its own heading. */
.nbf-aside-head { margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.nbf-rows.is-aside .nbf-row { border-style: dashed; border-left-style: solid; background: transparent; }
.nbf-runpill { border-style: dashed; border-color: var(--border-strong); background: transparent; font-weight: 600; }

.nbf-dc-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
}
.nbf-dc-foot .nbp-note { flex: 1 1 320px; font-size: var(--font-size-xs); line-height: 1.5; }

/* ── Lists by date: the note, the date control and its 30-day calendar, the bar's second line, a dated card ── */

.nba-pages .nba-btn-xs .nbp-ico { width: var(--nbp-ico-xs); height: var(--nbp-ico-xs); }
.nba-btn[data-nbf-dates-btn][aria-expanded="true"],
.nba-btn[data-nbf-dates-btn][aria-expanded="true"]:hover {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
    color: var(--text-link);
}
.nbf-step { font-size: 1rem; }
span.nba-btn.is-off,
span.nba-btn.is-off:hover { background: var(--bg-surface); opacity: var(--nbf-dim); cursor: default; }
.nbf-firstnote { font-size: var(--font-size-xs); color: var(--text-muted); }

/* The large note: its own band under the page head */
.nba-pages .nbf-note {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-color: var(--status-slow-border);
    border-left: 4px solid var(--status-slow-text);
    background: var(--status-slow-bg);
}
.nbf-note-ico {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: var(--status-slow-text);
    color: var(--bg-surface);
}
.nbf-note-ico .nbp-ico { width: var(--nbp-ico-lg); height: var(--nbp-ico-lg); }
.nbf-note-big { margin: 0; font-size: 1.45rem; font-weight: 700; line-height: 1.25; color: var(--text-primary); }
.nbf-note-big span { display: block; font-weight: 400; color: var(--text-secondary); }

/* A date in the window without a list */
.nbf-empty { flex: 1 1 100%; padding: 6px 0; }
.nbf-empty-big { margin: 0 0 6px; font-size: 1.3rem; font-weight: 700; line-height: 1.25; color: var(--text-primary); }

/* The date control (first in the bar) and its calendar */
.nbf-datectl { position: relative; }
.nbf-datetxt { font-size: var(--font-size-sm); color: var(--text-primary); }
.nbf-cal {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    width: 336px;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    box-shadow: var(--shadow-lg);
}
.nbf-cal-head { margin: 0 0 10px; font-size: var(--font-size-xs); line-height: 1.4; color: var(--text-muted); }
.nbf-cal-head b { display: block; font-size: var(--font-size-md); color: var(--text-primary); }
.nbf-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.nbf-cal-wd {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-align: center;
}
.nbf-cal-mo { grid-column: 1 / -1; margin-top: 4px; font-size: var(--font-size-xs); font-weight: 700; color: var(--text-secondary); }
.nbf-cal-d,
.nba-btn.nbf-cal-d {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 26px;
    padding: 0;
    box-sizing: border-box;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-variant-numeric: tabular-nums;
}
.nbf-cal-d.is-none { border: 1px dashed var(--border); color: var(--text-muted); }
.nbf-cal-key {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--border-soft);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}
.nbf-cal-key > span { display: inline-flex; align-items: center; gap: 6px; }
.nbf-cal-key .nbf-cal-d { width: 40px; height: 22px; cursor: default; }

/* The bar's second line: when this list was listed, its state, the order */
.nbf-listline {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}
.nbf-hint { font-size: var(--font-size-xs); color: var(--text-muted); }
.nbf-now.is-none b { font-weight: 600; color: var(--text-muted); }

/* A dated card: its locked list as the filter page draws it (the day block), under the card's head. */
.nba-pages .nbf-item.is-dated {
    grid-template-columns: 32px minmax(0, 1fr) 164px auto;
    grid-template-areas: "rank body fig act" "rows rows rows rows";
    align-items: start;
}
.nbf-dated { grid-area: rows; min-width: 0; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.nbf-dated-h { margin: 0 0 8px; }
.nbf-dated-h .nbp-kicker { color: var(--text-link); }
.nbf-dated-h .nbf-well-tally { margin-left: auto; }
.nbf-norows { padding: 0; }

/* ── The day block (design B "Day timeline", plan nba-filter-lock-v2): the lock line, the timeline (blue chips = the locked rows, dashed =
   moved out), the rows as slate cards in a framed well, the moved-out rows, the clipboard foot. Phone: the timeline runs down the page. */

.nbf-lockline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0 0 4px;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}
.nbf-lockline .nbp-ico { width: var(--nbp-ico-md); height: var(--nbp-ico-md); color: var(--status-slow-text); }
.nbf-lockline b { color: var(--text-primary); }
.nbf-tl {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    position: relative;
    margin: 4px 0 16px;
    padding: 14px 0 0;
    list-style: none;
}
.nbf-tl::before { content: ""; position: absolute; top: 27px; left: 14px; right: 14px; height: 2px; background: var(--border); }
.nbf-st { position: relative; min-width: 0; padding: 0 8px; }
.nbf-st.is-lock > .nbf-dot {
    width: 34px;
    height: 34px;
    margin-top: -3px;
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--text-inverse);
}
.nbf-st.is-lock.is-ahead > .nbf-dot { background: var(--bg-surface); color: var(--text-link); box-shadow: 0 0 0 4px var(--color-primary-soft); }
.nbf-st > b { display: block; margin-top: 6px; font-size: var(--font-size-sm); color: var(--text-primary); white-space: nowrap; }
.nbf-st.is-lock > b { color: var(--text-link); }
.nbf-st > small { display: block; font-size: var(--font-size-xs); line-height: 1.4; color: var(--text-muted); }
.nbf-spots { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; }
.nbf-sp {
    display: flex;
    gap: 6px;
    min-width: 0;
    padding: 3px 8px 3px 3px;
    background: var(--nba-pc-bg);
    color: var(--text-primary);
    font-weight: 600;
}
.nbf-sp i {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-surface-alt);
    font-size: 0.68rem;
    font-style: normal;
    color: var(--text-secondary);
}
.nbf-sp img { flex: none; width: 16px; height: 16px; }
.nbf-sp span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nbf-sp.is-locked { border-color: var(--color-primary); background: var(--color-primary-soft); }
.nbf-sp.is-locked i { background: var(--color-primary); color: var(--text-inverse); }
.nbf-sp.is-out { border-style: dashed; background: transparent; color: var(--text-muted); }

.nbf-well { padding: 14px; border: 1px solid var(--color-primary); border-radius: var(--radius-lg); background: var(--nba-pc-well); }
.nbf-well-h { margin: 0 0 10px; }
.nbf-well-h .nbp-kicker { display: block; color: var(--text-link); }
.nbf-well-tally { margin-left: auto; font-size: var(--font-size-sm); color: var(--text-secondary); white-space: nowrap; }
.nbf-well-tally b { font-size: 1.3rem; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.nbf-well-h .nbf-sqrow .nbf-sq { width: 14px; height: 14px; }
.nbf-well .nba-pcard.is-miss { box-shadow: inset 4px 0 0 var(--nba-rec-miss), var(--shadow-sm); }
.nba-pcard .nba-pc-head .nbf-spot { flex: none; width: 26px; height: 26px; font-size: var(--font-size-sm); }
.nba-pc-title a.nba-namebtn,
.nba-pc-title a.nba-namebtn:hover { text-decoration: none; }

.nbf-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nbf-copy .nbf-act-hint { flex: 1 1 260px; max-width: none; }
.nbf-act .nbf-copy { flex-direction: column; align-items: stretch; min-width: 0; }
.nbf-act .nbf-copy .nbf-act-hint { flex: none; max-width: 224px; }

/* Narrow desktop (721–1179 px): a card puts its body above the figures, the buttons in one row; listed rows wrap onto two lines. */
@media (max-width: 1179px) {
    .nbf-dayline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nbf-daymeta {
        grid-column: 1 / -1;
        grid-template-columns: auto auto;
        justify-content: start;
        gap: 6px 28px;
        padding: 10px 0 0;
        border-left: 0;
        border-top: 1px solid var(--border-soft);
    }
    .nba-pages .nbf-item {
        grid-template-columns: 32px 164px minmax(0, 1fr);
        grid-template-areas: "rank body body" "rank fig hist" "rank act act";
        column-gap: 14px;
    }
    .nba-pages .nbf-item.is-dated {
        grid-template-columns: 32px 164px minmax(0, 1fr);
        grid-template-areas: "rank body body" "rank fig act" "rows rows rows";
    }
    .nbf-act .nbf-copy { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .nbf-act .nbf-copy .nbf-act-hint { flex: 1 1 100%; }
    .nba-pages .nbf-item .nbf-act { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* Under 900 px the band's funnel moves under its intro, so the lead keeps a readable width. */
@media (max-width: 899px) {
    .nbf-bandtop { flex-direction: column; align-items: stretch; gap: 14px; }
    .nbf-funnel { align-self: center; width: 100%; max-width: 480px; }
}

/* ── Phone ─────────────────────────────────────────────────────────────────────────────────────── */

@media (max-width: 720px) {
    .nbf-title { font-size: 1.45rem; }
    .nbf-funnel .is-mid { width: 92%; }
    .nbf-funnel .is-tip { width: 84%; }
    .nbf-funnel b { font-size: 1.2rem; }
    .nbf-funnel .nbp-kicker { font-size: 0.66rem; }
    .nbf-dayline { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .nbf-daymeta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; }
    .nbf-daymeta dd { white-space: normal; }
    .nbp-bar.nbf-bar { position: static; }
    .nbf-bar .nbp-ctl { flex: 1 1 100%; }
    .nbf-bar .nbp-ctl-win { padding-left: 0; border-left: 0; }
    .nbf-bar .nbp-lbl { min-width: 78px; }
    .nbf-barnote { display: none; }
    .nbf-rankline { flex-basis: 100%; margin-left: 0; }
    .nba-pages .nbf-item {
        grid-template-columns: 30px minmax(0, 1fr);
        grid-template-areas: "rank fig" "body body" "hist hist" "act act";
        gap: 10px 12px;
        padding: 14px;
    }
    .nbf-rank { align-self: start; }
    .nbf-hist .nbf-days { justify-content: space-between; gap: 0; }
    .nbf-act { flex-direction: row; flex-wrap: wrap; }
    .nbf-act .nba-btn { flex: 1 1 0; }
    .nbf-act-hint { flex-basis: 100%; max-width: none; }
    .nbf-top-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .nbf-top-bar .nbp-lbl { display: none; }
    .nbf-hero { padding: 14px; }
    .nbf-hero-big b { font-size: 2.1rem; }
    .nbf-dgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: 372px; }
    .nbf-date { gap: 5px; padding: 7px 8px; font-size: var(--font-size-xs); }
    .nbf-date-r { gap: 4px; }
    .nbf-date .nbf-sqrow .nbf-sq { width: 8px; height: 8px; }
    .nbf-dc-title { font-size: 1.15rem; }
    .nbf-row {
        grid-template-columns: 14px 38px minmax(0, 1fr) auto;
        grid-template-areas: "n logo who res" "kpis kpis kpis kpis";
        gap: 8px 10px;
        padding: 10px;
    }
    .nbf-logo { width: 38px; height: 38px; }
    .nbf-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.1fr) minmax(0, 1fr); }
    .nbf-kpis dt { font-size: 0.62rem; letter-spacing: 0.02em; }
    .nba-pages .nbf-note { align-items: flex-start; padding: 16px 14px; }
    .nbf-note-ico { width: 38px; height: 38px; }
    .nbf-note-big { font-size: 1.25rem; }
    .nbf-cal { right: 0; width: auto; }
    .nba-pages .nbf-item.is-dated { grid-template-columns: 30px minmax(0, 1fr); grid-template-areas: "rank fig" "body body" "act act" "rows rows"; }
    .nbf-tl { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 0; }
    .nbf-tl::before { top: 14px; bottom: 14px; left: 13px; right: auto; width: 2px; height: auto; }
    .nbf-st { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; padding: 0; }
    .nbf-st > .nbf-dot { grid-row: 1 / span 3; }
    .nbf-st.is-lock > .nbf-dot { margin: -3px 0 0 -3px; }
    .nbf-st > b { margin-top: 4px; white-space: normal; }
    .nbf-spots { flex-direction: row; flex-wrap: wrap; margin-top: 6px; }
    .nbf-well { padding: 10px; }
    .nbf-copy .nba-btn { flex: 1 1 0; }
    .nbf-copy .nba-btn-primary,
    .nbf-copy .nbf-act-hint { flex-basis: 100%; }
    .nbf-act .nbf-copy .nbf-act-hint { max-width: none; }
}
