/* Playoff tracking (playoff-tracker.js): the Playoff Tracker page and the
   portfolio tracker's playoffs season. Needs bbm.css. */
.bbm-hero .bbm-tabs { margin-top: 18px; }
.po-sec { margin-bottom: 34px; }
.po-sec > h2 { font-size: 34px; margin-bottom: 6px; }
.po-sub { color: var(--muted); font-size: 16px; margin-bottom: 14px; max-width: 46em; }
.po-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.po-scroll { overflow-x: auto; }
#poFormats .bbm-table td:nth-child(2) { white-space: nowrap; }
.po-kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; font-size: 15px; margin-bottom: 12px; }
.po-kv dt { font-family: var(--cond); font-weight: 700; color: var(--muted); }
.po-kv dd { margin: 0; color: var(--ink); }
.po-note { font-size: 14px; color: var(--muted); margin-top: 10px; }
.po-note a { color: var(--purple); }
.po-flag { border-left: 5px solid var(--gold); background: var(--paper-3); padding: 8px 12px; font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.po-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 2px solid var(--ink); border-radius: 6px; background: var(--paper-3); margin-bottom: 18px; }
.po-strip div { padding: 12px 14px; border-right: 1px solid var(--paper-line); }
.po-strip div:last-child { border-right: 0; }
.po-strip b { display: block; font-family: var(--display); font-weight: 900; font-size: 32px; line-height: 1; }
.po-strip span { font-family: var(--cond); font-weight: 600; font-size: 14px; color: var(--muted); }
.po-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.po-conf { padding: 4px 0; }
.po-conf h4 { font-family: var(--cond); font-weight: 700; font-size: 16px; padding: 6px 14px; border-bottom: 2px solid var(--ink); }
.po-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 6px 14px; border-bottom: 1px dotted var(--paper-line); font-size: 15px; }
.po-row .sd { font-family: var(--display); font-weight: 800; font-size: 18px; }
.po-row .rec { font-variant-numeric: tabular-nums; color: var(--muted); }
.po-st { font-family: var(--cond); font-weight: 700; font-size: 12px; padding: 1px 6px; border-radius: 2px; white-space: nowrap; }
.st-in, .st-alive, .st-bye, .st-champion { background: #DCEBDD; color: var(--rb); }
.st-hunt { background: #F3E6C8; color: #8A5E00; }
.st-outside { background: #ECE7DC; color: var(--muted); }
.st-out, .st-eliminated { background: #F1D9DB; color: var(--te); }
.po-team { border: 2px solid var(--ink); border-radius: 6px; background: var(--paper-2); margin-bottom: 14px; overflow: hidden; }
.po-team-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--paper-line); }
.po-team-head h3 { font-family: var(--cond); font-weight: 700; font-size: 19px; }
.po-team-head .meta { font-size: 14px; color: var(--muted); }
.po-team-body { padding: 10px 14px 12px; }
.po-live { font-family: var(--cond); font-weight: 700; font-size: 16px; }
.po-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.po-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--paper-line); background: var(--paper-3); border-radius: 3px; padding: 3px 7px; font-size: 14px; }
.po-chip.dead, tr.dead td { opacity: .5; text-decoration: line-through; }
.po-chip.p2, tr.p2 td { opacity: .85; }
.po-chip.p3, tr.p3 td { opacity: .62; }
.po-chip.p4, tr.p4 td { opacity: .45; }
.po-chip.p3, .po-chip.p4 { background: transparent; border-style: dashed; }
.po-stack { display: grid; gap: 18px; }
.po-ttable .sd { font-family: var(--display); font-weight: 800; font-size: 18px; width: 40px; }
.po-ttable .rec { color: var(--muted); font-size: 14px; white-space: nowrap; }
.po-trow { cursor: pointer; }
.po-trow:hover td { background: rgba(94,44,165,.06); }
.po-cut td { border-bottom: 2px dashed var(--ink); }
.po-sched td { background: var(--paper-3); }
.po-games { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.po-game { white-space: nowrap; }
.po-d { font-family: var(--cond); font-weight: 700; font-size: 12px; }
.po-d.up { color: var(--rb); } .po-d.dn { color: var(--te); }
.po-chip .tm { font-family: var(--cond); font-weight: 600; font-size: 12px; color: var(--muted); }
.po-rounds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.po-rounds div { border: 1px solid var(--paper-line); border-radius: 3px; padding: 5px 8px; background: var(--paper-3); }
.po-rounds span { display: block; font-family: var(--cond); font-weight: 600; font-size: 12px; color: var(--muted); }
.po-rounds b { font-variant-numeric: tabular-nums; font-size: 17px; }
.po-link { background: none; border: 0; color: var(--purple); font-weight: 700; cursor: pointer; font-size: 14px; padding: 2px 4px; }
.po-link.danger { color: var(--te); }
.po-empty { border: 2px dashed var(--paper-line); border-radius: 6px; padding: 24px; text-align: center; color: var(--muted); }
/* Add / edit dialog */
.po-modal { position: fixed; inset: 0; background: rgba(12,22,36,.6); display: flex; align-items: flex-start; justify-content: center; padding: 30px 12px; z-index: 60; overflow-y: auto; }
.po-modal[hidden] { display: none; }
.po-dialog { background: var(--paper-2); border: 2px solid var(--ink); border-radius: 6px; width: 100%; max-width: 640px; }
.po-dialog .bbm-panel-bar button { background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; }
.po-form { padding: 16px; display: grid; gap: 12px; }
.po-form label { font-family: var(--cond); font-weight: 700; font-size: 15px; display: block; margin-bottom: 4px; }
.po-form input, .po-form select { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 3px; background: #fff; color: var(--ink); }
.po-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.po-sugg { border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 3px 3px; background: #fff; max-height: 220px; overflow-y: auto; }
.po-sugg button { display: flex; width: 100%; justify-content: space-between; gap: 8px; background: none; border: 0; border-bottom: 1px solid var(--paper-line); padding: 8px 10px; font: inherit; font-size: 15px; text-align: left; cursor: pointer; color: var(--ink); }
.po-sugg button:hover, .po-sugg button:focus { background: var(--paper-3); }
.po-picked { display: grid; gap: 4px; }
.po-picked div { display: grid; grid-template-columns: 38px 1fr auto auto; gap: 8px; align-items: center; padding: 5px 8px; background: var(--paper-3); border: 1px solid var(--paper-line); border-radius: 3px; font-size: 15px; }
.po-warn { color: var(--te); font-size: 14px; }
@media (max-width: 860px) { .po-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
    .po-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .po-strip div:nth-child(2) { border-right: 0; }
    .po-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--paper-line); }
    .po-rounds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .po-form .two { grid-template-columns: 1fr; }
    .po-kv { grid-template-columns: 90px 1fr; }
    .bbm-table td, .bbm-table th { padding: 8px 8px; font-size: 14px; }
    .po-hide-sm { display: none; }
}

/* Embedded (portfolio tracker): the platform tabs sit on their own navy strip. */
.po-tabbar { background: var(--navy) var(--grain); border-radius: 6px; padding: 8px; margin-bottom: 20px; }
.po-root { color: var(--ink); }
.po-root h2 { font-family: var(--display); text-transform: uppercase; }


/* Round-by-round team entry */
.po-csvbox { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 2px dashed var(--paper-line); border-radius: 6px; padding: 10px 12px; font-size: 14px; color: var(--ink-2); background: var(--paper-3); }
.po-slots { display: grid; gap: 5px; max-height: 52vh; overflow-y: auto; padding-right: 2px; }
.po-slot { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto 28px; gap: 8px; align-items: center; padding: 4px 6px; border: 1px solid var(--paper-line); border-radius: 3px; background: var(--paper-3); }
.po-slot.filled { background: #fff; }
.po-rd { font-family: var(--cond); font-weight: 700; font-size: 15px; color: var(--ink); line-height: 1; }
.po-rd small { display: block; font-weight: 600; font-size: 12px; color: var(--muted); margin-top: 2px; }
.po-slot-in { position: relative; min-width: 0; }
.po-slot-in input { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 6px 8px; border: 2px solid var(--ink); border-radius: 3px; background: #fff; color: var(--ink); }
.po-slot.filled .po-slot-in input { border-color: transparent; background: transparent; font-weight: 600; padding-left: 0; }
.po-slot-in .po-sugg { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; border-top: 2px solid var(--ink); }
.po-sugg button.hi { background: var(--paper-3); }
.po-slot-info { display: flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 13px; }
.po-slot-info .tm { color: var(--muted); font-family: var(--cond); font-weight: 600; }
.po-x { background: none; border: 0; font-size: 20px; color: var(--te); cursor: pointer; line-height: 1; }
@media (max-width: 560px) {
    .po-slot { grid-template-columns: 44px minmax(0, 1fr) 24px; }
    .po-slot-info { grid-column: 2; grid-row: 2; }
    .po-csvbox { flex-direction: column; align-items: flex-start; }
}

/* Super Bowl lineup check, depth curve, stack map (team cards) */
.po-sbline { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.po-sbline > b { font-family: var(--display); font-size: 22px; font-weight: 900; margin-right: 4px; }
.po-sbline > b.ok { color: var(--rb); } .po-sbline > b.mid { color: #8A5E00; } .po-sbline > b.low { color: var(--te); }
.po-sbline .rec, .po-stack .rec { color: var(--muted); font-size: 13px; }
.po-best { font-size: 14px; margin-top: 2px; }
.po-depth { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.po-depth > div { border: 1px solid var(--paper-line); border-radius: 3px; background: var(--paper-3); padding: 6px 8px; display: grid; grid-template-columns: 14px 1fr; grid-template-rows: auto auto auto; column-gap: 8px; align-items: end; }
.po-depth span { grid-column: 1 / 3; font-family: var(--cond); font-weight: 700; font-size: 12px; color: var(--muted); }
.po-depth .bar { grid-row: 2 / 4; height: 34px; background: var(--paper-line); border-radius: 2px; position: relative; }
.po-depth .bar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--purple); border-radius: 2px; }
.po-depth b { font-variant-numeric: tabular-nums; font-size: 17px; line-height: 1; }
.po-depth em { font-style: normal; font-size: 12px; color: var(--muted); }
.po-stacks { display: grid; gap: 8px; margin-top: 12px; }
.po-stack-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; }
.po-stack-o { margin-left: auto; }
.po-stack .po-chips { margin-top: 4px; }
.po-tag { font-family: var(--cond); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; padding: 1px 6px; border-radius: 2px; }
.po-tag.core { background: var(--purple); color: #fff; }
.po-tag.orphan { background: #ECE7DC; color: var(--muted); }

/* Super Bowl coverage grid (portfolio) */
.po-cov { margin-bottom: 18px; }
.po-strip.po-strip3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.po-grid-t { border-collapse: separate; border-spacing: 3px; font-variant-numeric: tabular-nums; }
.po-grid-t th { font-family: var(--cond); font-weight: 700; font-size: 14px; padding: 4px 6px; text-align: center; white-space: nowrap; }
.po-grid-t th small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); }
.po-grid-t tbody th { text-align: left; }
.po-grid-t td { min-width: 70px; padding: 6px; text-align: center; border-radius: 3px; border: 2px solid transparent; background: color-mix(in srgb, var(--purple) var(--h, 0%), var(--paper-3)); }
.po-grid-t td b { display: block; font-size: 14px; }
.po-grid-t td span { display: block; font-family: var(--cond); font-weight: 600; font-size: 12px; }
.po-grid-t td.cov { border-color: var(--rb); box-shadow: inset 0 -4px 0 var(--rb); }
.po-grid-t td.gap { border-color: var(--gold); }
@media (max-width: 560px) {
    .po-strip.po-strip3 { grid-template-columns: 1fr; }
    .po-strip.po-strip3 div { border-right: 0; border-bottom: 1px solid var(--paper-line); }
    .po-depth { gap: 4px; }
    .po-depth > div { padding: 5px; column-gap: 5px; }
}

/* Next-draft guide */
.po-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.po-guide h4 { font-family: var(--cond); font-weight: 700; font-size: 17px; color: var(--purple); margin-bottom: 6px; }
.po-guide ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.po-guide li { border-left: 4px solid var(--gold); background: var(--paper-3); padding: 7px 10px; font-size: 14px; color: var(--ink-2); }
.po-guide li b { color: var(--ink); }
.po-guide .rec { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) { .po-guide { grid-template-columns: 1fr; } }
