/* RickBot NFL board. Sloan design-kit tokens (sloan-tokens.css) with a sportsbook layout. */
:root {
  --rb-head: #001029; --rb-head-fg: #ffffff; --rb-head-muted: #b6c4da;
  --rb-odds-bg: #eef3fb; --rb-odds-bd: #e1e9f6; --rb-odds-fg: #1d4ed8; --rb-sel: #2563eb; --rb-sel-fg: #ffffff;
  --rb-chosen: #eff6ff; --rb-disabled: #94a3b8; --rb-backdrop: rgba(0, 10, 28, .5);
}
:root[data-theme="dark"] {
  --rb-head: #000a1c; --rb-odds-bg: #03183d; --rb-odds-bd: #0a2a5c; --rb-odds-fg: #6cc0ff; --rb-sel: #22a2ff; --rb-sel-fg: #001029;
  --rb-chosen: #002155; --rb-disabled: #33435f;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--dc-page); color: var(--dc-fg); font-family: var(--dc-font); font-size: var(--dc-text); line-height: 1.4; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--dc-accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--dc-muted); }
.fine { font-size: var(--dc-small); color: var(--dc-muted); line-height: 1.5; }
.center { text-align: center; }
.error { color: var(--dc-neg); font-size: 13px; }
.warn { color: var(--dc-warn); }
.pos { color: var(--dc-pos); }
.card { background: var(--dc-surface); border: 1px solid var(--dc-line); border-radius: var(--dc-radius-lg); }
.link { border: 0; background: none; padding: 6px 2px; color: var(--dc-accent); font-weight: 600; font-size: 12px; }
.primary, .secondary { display: block; width: 100%; height: 50px; border-radius: 10px; font-size: 15px; font-weight: 700; }
.primary { border: 0; background: var(--dc-accent); color: #fff; margin-top: 14px; }
.primary:disabled { background: var(--rb-disabled); }
.secondary { border: 1px solid var(--dc-line-strong); background: transparent; height: 44px; font-size: 14px; font-weight: 600; margin-top: 8px; }
input { width: 100%; height: 46px; border: 1px solid var(--dc-line-strong); border-radius: 8px; padding: 0 12px; background: var(--dc-surface); font-size: 16px; }

/* header */
.top { background: var(--rb-head); color: var(--rb-head-fg); }
.top-inner { max-width: 1280px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 10px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand-icon { width: 28px; height: 28px; border-radius: 8px; background: #2563eb; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.dry { font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: #fbbf24; color: #3a2a08; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a { color: #fff; text-decoration: none; font-weight: 600; padding: 8px 14px; border-radius: 8px; }
.tabs a[aria-current="page"] { background: rgba(255, 255, 255, .14); }
.balance { text-align: right; line-height: 1.25; margin-left: 12px; }
.balance span { display: block; font-size: 11px; color: var(--rb-head-muted); }
.balance strong { font-size: 13px; }

/* board */
.layout { max-width: 1280px; margin: 0 auto; padding: 20px 24px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.periods { display: flex; gap: 8px; }
.periods button { height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--dc-line-strong); background: var(--dc-surface); font-size: 13px; font-weight: 600; }
.periods button[aria-pressed="true"], .sizes button[aria-pressed="true"] { background: var(--dc-accent); border-color: var(--dc-accent); color: #fff; }
.sizes { display: flex; align-items: center; gap: 2px; margin-left: auto; padding: 3px; border-radius: 999px; background: var(--dc-surface); border: 1px solid var(--dc-line); }
.sizes > span:first-child { font-size: 11px; color: var(--dc-muted); padding: 0 6px 0 8px; }
.sizes button { height: 30px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; font-size: 12px; font-weight: 600; }
.status { flex-basis: 100%; font-size: 11px; color: var(--dc-muted); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 96px); gap: 6px; align-items: center; }
.day { margin-bottom: 18px; }
.day-head { padding: 0 13px 6px; align-items: end; }
.day-head h2 { font-size: 13px; font-weight: 700; }
.day-short { display: none; }
.day-head span { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dc-muted); text-align: center; }
.games { overflow: hidden; }
.game { padding: 12px 12px 8px; }
.game + .game { border-top: 1px solid var(--dc-line); }
.team { margin-bottom: 6px; }
.team-name { min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.team-name .full, .team-name .nick { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-name .nick { display: none; }
.team-name .code { font-size: 11px; color: var(--dc-muted); }
.cell { min-height: 54px; padding: 4px 2px; border-radius: 8px; border: 1px solid var(--rb-odds-bd); background: var(--rb-odds-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.cell-line { font-size: 12px; font-weight: 500; line-height: 1.2; min-height: 14px; }
.cell-odds { font-size: 13px; font-weight: 700; line-height: 1.2; color: var(--rb-odds-fg); }
.cell-max { font-size: 10px; line-height: 1.2; color: var(--dc-warn); }
.cell[aria-pressed="true"] { background: var(--rb-sel); border-color: var(--rb-sel); color: var(--rb-sel-fg); }
.cell[aria-pressed="true"] .cell-odds, .cell[aria-pressed="true"] .cell-max { color: var(--rb-sel-fg); }
.cell:disabled { color: var(--rb-disabled); }
.cell:disabled .cell-odds { color: var(--rb-disabled); }
.game-foot { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--dc-muted); }
.alts { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--dc-line); }
.alts > .fine { margin-bottom: 8px; }
.alt { grid-template-columns: minmax(0, 1fr) 96px 96px 96px; margin-bottom: 6px; }
.alt-label { font-size: 12px; color: var(--dc-muted); }
.alt.strong .alt-label { color: var(--dc-fg); font-weight: 600; }
.footnote { margin-top: 4px; font-size: 11px; color: var(--dc-muted); line-height: 1.5; }
.empty { padding: 32px 16px; text-align: center; color: var(--dc-muted); }

/* bet slip */
.slip { position: sticky; top: 16px; background: var(--dc-surface); border: 1px solid var(--dc-line); border-radius: 12px; max-height: calc(100vh - 32px); overflow-y: auto; }
.slip-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 0; }
.slip-head h2 { font-size: 16px; font-weight: 700; }
.grabber { display: none; }
.icon { width: 44px; height: 44px; margin: -10px -10px -10px auto; border: 0; background: transparent; color: var(--dc-muted); font-size: 24px; line-height: 1; }
.slip-body { padding: 12px 16px 16px; }
.empty-slip { padding: 24px 4px; text-align: center; color: var(--dc-muted); font-size: 13px; line-height: 1.5; }
.sel { margin-bottom: 14px; }
.sel-name { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.sel-sub { font-size: 12px; color: var(--dc-muted); margin-top: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--dc-subtle); }
.chip.warn { background: var(--dc-warn-soft); }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px; margin-bottom: 14px; border-radius: 10px; background: var(--dc-subtle); }
.stepper button { width: 44px; height: 40px; border: 0; border-radius: 7px; background: var(--dc-surface); font-size: 20px; }
.stepper button:disabled { color: var(--rb-disabled); }
.stepper-mid { text-align: center; }
.stepper-mid strong { display: block; font-size: 15px; }
.stepper-mid span { font-size: 11px; color: var(--dc-muted); }
.label { display: block; font-size: 12px; font-weight: 600; margin: 0 0 6px; }
.money { display: flex; align-items: center; height: 46px; border: 1px solid var(--dc-line-strong); border-radius: 8px; padding: 0 12px; background: var(--dc-surface); }
.money span { color: var(--dc-muted); margin-right: 6px; font-size: 16px; }
.money input { border: 0; height: 44px; padding: 0; font-size: 17px; font-weight: 600; background: transparent; }
.money input:focus { outline: none; }
.money:focus-within { outline: 2px solid var(--dc-accent); outline-offset: 1px; }
.amounts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.chip-btn { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--dc-line-strong); background: var(--dc-surface); font-size: 12px; font-weight: 600; }
.chip-btn[aria-pressed="true"] { border-color: var(--dc-accent); color: var(--dc-accent); background: var(--rb-chosen); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 10px; background: var(--dc-subtle); }
.segmented button { height: 38px; border: 0; border-radius: 7px; background: transparent; font-size: 13px; font-weight: 600; }
.segmented button[aria-pressed="true"] { background: var(--dc-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.odds-input { font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.result { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--dc-line); background: var(--rb-chosen); }
.result-top, .result-mid { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.result-top span { font-size: 12px; color: var(--dc-muted); }
.big { font-size: 22px; color: var(--rb-odds-fg); }
.result-mid { margin-top: 4px; font-size: 13px; font-weight: 600; }
.result .fine { margin-top: 6px; }
.note { font-size: 12px; color: var(--dc-muted); line-height: 1.5; margin-top: 8px; }
.review-head { padding: 12px; border-radius: 10px; background: var(--dc-subtle); margin-bottom: 8px; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--dc-line-soft); }
.kv span { font-size: 13px; color: var(--dc-muted); }
.kv strong { font-size: 14px; text-align: right; overflow-wrap: anywhere; }
.kv.small { padding: 4px 2px; border: 0; }
.kv.small span, .kv.small strong { font-size: 12px; font-weight: 500; }
.details h3 { font-size: 12px; margin: 10px 0 2px; }
.details .fine { margin-top: 8px; }
.done { text-align: center; padding: 12px 4px 4px; }
.done .check { width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 50%; border: 2px solid var(--dc-pos); color: var(--dc-pos); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.done h3 { font-size: 18px; }
.done p { margin-top: 6px; font-size: 13px; }
.backdrop { display: none; }

/* my bets, account */
.page { max-width: 760px; margin: 0 auto; padding: 24px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.page-head h1 { font-size: 18px; }
.page > .fine { margin-bottom: 12px; }
.bet { padding: 12px 14px; margin-bottom: 8px; }
.bet-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bet-top strong { font-size: 15px; }
.bet .muted { font-size: 12px; margin-top: 3px; }
.bet-nums { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 13px; }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--dc-subtle); color: var(--dc-muted); }
.tag.warn { background: var(--dc-warn-soft); color: var(--dc-warn); }
.rows { padding: 4px 14px; }
.rows > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--dc-line-soft); }
.rows > div:last-child { border-bottom: 0; }
.rows span { color: var(--dc-muted); font-size: 13px; }
.rows strong { font-size: 13px; text-align: right; }
.signout { margin-top: 16px; max-width: 200px; }
.page-head.sub { margin-top: 20px; }
.page-head h2 { font-size: 15px; }
#positions .kv { border-bottom: 1px solid var(--dc-line-soft); }
#positions .kv:last-child { border-bottom: 0; }
#positions > .fine { padding: 10px 0; }
.dry.live { background: #dc2626; color: #fff; }
.tag.live { background: var(--dc-pos-soft); color: var(--dc-pos); }
.leg-status { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--dc-line-soft); font-size: 12px; }
.kv.door-ok strong { color: var(--dc-pos); }
.kv.door-no strong { color: var(--dc-neg); }
.bottom-nav { display: none; }

/* phones and tablets: bet slip becomes a bottom sheet, navigation moves to the bottom */
@media (max-width: 1023px) {
  .tabs { display: none; }
  .balance { margin-left: auto; }
  .top-inner { padding: 10px 14px; }
  .layout { display: block; padding: 12px 12px 90px; }
  .page { padding: 16px 12px 90px; }
  .slip { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 30; max-height: 88vh; border-radius: 16px 16px 0 0; border: 0;
          box-shadow: 0 -12px 32px rgba(0, 0, 0, .28); transform: translateY(105%); transition: transform .2s ease; padding-bottom: env(safe-area-inset-bottom); }
  .slip.open { transform: none; }
  .grabber { display: block; position: absolute; left: 50%; top: 6px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--dc-line-strong); }
  .slip-head { position: relative; padding-top: 18px; }
  .backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: var(--rb-backdrop); }
  body.sheet-open { overflow: hidden; }
  .bottom-nav { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
                background: var(--dc-surface); border-top: 1px solid var(--dc-line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--dc-muted); text-decoration: none; font-size: 11px; font-weight: 600; }
  .bottom-nav a[aria-current="page"] { color: var(--dc-accent); }
  .bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .sizes { margin-left: 0; }
}
@media (max-width: 560px) {
  .grid, .alt { grid-template-columns: minmax(0, 1fr) repeat(3, 72px); gap: 5px; }
  .team-name .full, .day-full { display: none; }
  .team-name .nick, .day-short { display: inline; }
  .day-head { padding: 0 13px 6px; }
  .balance span { display: none; }
}

/* sign-in page */
.topbar { background: var(--rb-head); color: var(--rb-head-fg); display: flex; align-items: center; gap: 12px; padding: 12px 24px; }
.topbar-subtitle { color: var(--rb-head-muted); font-size: 13px; }
.topbar > .theme-toggle { margin-left: auto; color: var(--rb-head-fg); }
.text-button { border: 0; background: none; color: var(--dc-accent); font-weight: 600; }
.login-layout { min-height: calc(100vh - 56px); display: flex; align-items: flex-start; justify-content: center; padding: 64px 16px; }
.panel { background: var(--dc-surface); border: 1px solid var(--dc-line); border-radius: 12px; }
.login-panel { width: 100%; max-width: 400px; padding: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.login-panel h1 { font-size: 18px; }
.badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--dc-warn-soft); color: var(--dc-warn); }
.badge.neutral { background: var(--dc-subtle); color: var(--dc-muted); }
.login-panel form { margin: 16px 0 12px; }
.login-panel label { display: block; font-size: 12px; font-weight: 600; margin: 12px 0 6px; }
.login-panel .error { margin-top: 10px; }
