/* Sports betting line + event page + coupon. Same tokens and components as the rest of the site. */
.sb { display: grid; grid-template-columns: 230px minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.sb--event { grid-template-columns: minmax(0, 1fr) 340px; }

/* sports nav */
.sb-nav { position: sticky; top: calc(var(--tier2) + 20px); padding: 1rem; border-radius: var(--r-lg); background: linear-gradient(160deg, color-mix(in oklch, var(--surface-2) 70%, transparent), transparent 60%), var(--surface-1); box-shadow: 0 0 0 1px var(--line); }
.sb-nav .sb-nav__title { margin-top: 0;  font: 600 .74rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin: .2rem .4rem .8rem; }
.sb-nav ul { list-style: none; display: grid; gap: 2px; }
.sb-nav a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; min-height: 42px; padding: 0 .6rem; border-radius: var(--r-md); text-decoration: none; color: var(--text-2); font-weight: 600; font-size: .94rem; transition: background-color var(--dur), color var(--dur); }
.sb-nav a:hover { background: var(--surface-2); color: var(--text-1); }
.sb-nav a[aria-current="true"] { background: var(--surface-3); color: var(--text-1); box-shadow: inset 3px 0 0 var(--color-brand); }
.sb-nav__ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); flex: none; }
.sb-nav__ic .icon { width: 19px; height: 19px; }

/* events */
.sb-main { display: grid; gap: 28px; min-width: 0; }
.sb-sport__h { display: flex; align-items: center; gap: .7rem; margin-bottom: .8rem; font: 600 1.25rem/1.2 var(--font-display); letter-spacing: -.03em; }
.sb-list { display: grid; gap: 8px; }
.ev { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; padding: .85rem 1rem; border-radius: var(--r-md); background: linear-gradient(100deg, var(--surface-1), color-mix(in oklch, var(--surface-1) 70%, var(--surface-0))); box-shadow: 0 0 0 1px var(--line); transition: box-shadow var(--dur), transform .3s var(--spring); }
.ev:hover { box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-1); }
.ev__meta { display: grid; gap: .2rem; font-size: .8rem; color: var(--text-muted); }
.ev__meta time { color: var(--text-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.ev__teams { display: grid; gap: .25rem; min-width: 0; text-decoration: none; font-weight: 600; }
.ev__teams span { overflow-wrap: anywhere; line-height: 1.25; }
.ev__teams:hover span { color: var(--color-brand); }
.ev__odds { display: grid; gap: 6px; }
.ev__odds--2 { grid-template-columns: repeat(2, 66px); }
.ev__odds--3 { grid-template-columns: repeat(3, 66px); }
.ev__closed { grid-column: 1 / -1; font-size: .84rem; color: var(--text-muted); padding: 0 .4rem; }
.ev__more { display: inline-flex; align-items: center; gap: .2rem; min-height: 44px; padding: 0 .6rem; border-radius: var(--r-sm); text-decoration: none; font-weight: 700; font-size: .86rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ev__more:hover { color: var(--color-brand); background: var(--surface-2); }
.ev--closed { opacity: .7; }

/* odds button */
.odd { position: relative; display: grid; justify-items: center; align-content: center; gap: .1rem; min-height: 48px; padding: .35rem .5rem; border: 0; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-1); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background-color var(--dur), box-shadow var(--dur), transform .25s var(--spring); }
.odd small { font-size: .7rem; font-weight: 600; color: var(--text-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odd b { font: 700 .98rem/1 var(--font-body); font-variant-numeric: tabular-nums; }
.odd:hover { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong); transform: translateY(-1px); }
.odd[aria-pressed="true"] { background: var(--color-brand); color: var(--color-ink); box-shadow: none; }
.odd[aria-pressed="true"] small { color: color-mix(in oklch, var(--color-ink) 75%, transparent); }
.odd.is-added { animation: bump .35s var(--spring); }
@keyframes bump { 40% { transform: scale(1.08); } }
.odd--off { cursor: default; opacity: .55; }

/* event page */
.ev-head__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3em .5em; max-width: none; overflow-wrap: anywhere; }
.ev-head__vs { font-size: .5em; color: var(--text-muted); font-weight: 500; letter-spacing: 0; }
.mk-list { display: grid; gap: 12px; }
.mk { padding: 1rem; border-radius: var(--r-lg); background: linear-gradient(160deg, color-mix(in oklch, var(--surface-2) 60%, transparent), transparent 60%), var(--surface-1); box-shadow: 0 0 0 1px var(--line); }
.mk__h { font: 600 1rem/1.25 var(--font-display); letter-spacing: -.02em; margin-bottom: .75rem; }
.mk__sel { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mk__sel--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mk__sel--3, .mk__sel--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mk__sel--4, .mk__sel--8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mk .odd { grid-template-columns: minmax(0, 1fr) auto; justify-items: start; text-align: left; padding: .5rem .8rem; min-height: 52px; }
.mk .odd small { font-size: .86rem; color: var(--text-2); white-space: normal; overflow: visible; overflow-wrap: anywhere; line-height: 1.3; }   /* the pick must stay readable in full */
.mk .odd { gap: .6rem; }

/* coupon */
.coupon { position: sticky; top: calc(var(--tier2) + 20px); }
.coupon__panel { padding: 1.1rem; border-radius: var(--r-lg); background: linear-gradient(170deg, color-mix(in oklch, var(--color-brand) 7%, var(--surface-1)), var(--surface-1) 40%); box-shadow: var(--shadow-2), 0 0 0 1px var(--line-strong); }
.coupon__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; }
.coupon__head h2 { display: inline-flex; align-items: center; gap: .5rem; font: 600 1.1rem/1.2 var(--font-display); letter-spacing: -.03em; }
.coupon__close { display: none; }
.coupon__form { display: grid; gap: .8rem; }
.coupon__mode { display: grid; grid-template-columns: 1fr 1fr; }
.coupon__mode label { justify-content: center; }
.coupon__lines { list-style: none; display: grid; gap: 6px; max-height: 320px; overflow: auto; }
.cl { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .5rem; padding: .6rem .7rem; border-radius: var(--r-md); background: var(--surface-2); animation: pop .3s var(--spring); }
.cl__txt { display: grid; gap: .1rem; min-width: 0; font-size: .8rem; color: var(--text-muted); }
.cl__txt b { font-size: .92rem; color: var(--text-1); }
.cl__txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl__odd { font-weight: 700; font-variant-numeric: tabular-nums; padding: .25rem .5rem; border-radius: var(--r-pill); background: var(--surface-3); }
.cl__odd.is-changed { background: var(--color-coral-soft); box-shadow: inset 0 0 0 1px var(--color-accent-2); }
.cl__x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); font-size: 1.3rem; line-height: 1; }
.cl__x:hover { background: var(--surface-3); color: var(--text-1); }
.coupon__empty { padding: 1rem; border-radius: var(--r-md); border: 1px dashed var(--line-strong); color: var(--text-muted); font-size: .9rem; text-align: center; }
.coupon__stake label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.money { position: relative; display: flex; align-items: center; }
.money input { width: 100%; height: 48px; padding: 0 2.2rem 0 1rem; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface-0); color: var(--text-1); font: 600 1.05rem var(--font-body); font-variant-numeric: tabular-nums; }
.money input:focus { outline: 2px solid var(--color-brand); outline-offset: 2px; border-color: var(--color-brand); }
.money input[aria-invalid="true"] { border-color: var(--color-error); }
.money span { position: absolute; right: 1rem; color: var(--text-muted); font-weight: 600; }
.hint { margin-top: .3rem; font-size: .78rem; color: var(--text-muted); }
.field-error { font-size: .84rem; font-weight: 600; color: var(--color-error); }
.field-error--form { padding: .6rem .8rem; border-radius: var(--r-sm); background: var(--color-error-soft); }
.coupon__sum { display: grid; gap: .3rem; margin: 0; padding: .7rem .8rem; border-radius: var(--r-md); background: var(--surface-deep-2); }
.coupon__sum > div { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; }
.coupon__sum dt { color: var(--text-muted); }
.coupon__sum dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.coupon__payout dd { color: var(--color-brand); font-size: 1.05rem; }
.check { position: relative; display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: var(--text-2); cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--color-brand); }
.check input[aria-invalid="true"] { outline: 2px solid var(--color-error); outline-offset: 2px; }
.coupon__submit { width: 100%; }
.coupon__note { display: flex; gap: .5rem; align-items: flex-start; font-size: .76rem; color: var(--text-muted); }
.coupon__note .icon { flex: none; margin-top: .05rem; }
.coupon__done { display: grid; gap: .7rem; justify-items: start; outline: none; }
.coupon__done-ic .icon { width: 44px; height: 44px; color: var(--color-brand); }
.coupon__done h3 { font: 600 1.15rem/1.25 var(--font-display); letter-spacing: -.03em; }
.coupon__done [data-ref] { color: var(--color-brand); font-variant-numeric: tabular-nums; }
.coupon__done p { color: var(--text-2); font-size: .92rem; }

/* mobile bar */
.coupon-bar { display: none; }

@media (max-width: 1360px) {
  .sb { grid-template-columns: minmax(0, 1fr) 320px; }
  .sb-nav { grid-column: 1 / -1; position: static; padding: .6rem; }
  .sb-nav .sb-nav__title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .sb-nav ul { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .sb-nav li { flex: none; }
  .sb-nav a { grid-template-columns: auto auto auto; }
}
@media (max-width: 1040px) {
  .sb, .sb--event { grid-template-columns: minmax(0, 1fr); }
  .coupon { position: fixed; inset: 0; z-index: var(--z-drawer); display: flex; align-items: flex-end; background: oklch(8% .02 200 / .6); opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility 0s linear .3s; }
  .coupon.is-open { opacity: 1; visibility: visible; transition: opacity .3s var(--ease); }
  .coupon__panel { width: 100%; max-height: 88svh; overflow: auto; border-radius: var(--r-xl) var(--r-xl) 0 0; transform: translateY(30px); transition: transform .35s var(--ease); }
  .coupon.is-open .coupon__panel { transform: none; }
  .coupon__close { display: inline-grid; }
  .coupon-bar { position: fixed; left: 50%; bottom: 14px; z-index: 55; transform: translateX(-50%); display: inline-flex; white-space: nowrap; align-items: center; gap: .6rem; min-height: 52px; padding: 0 1.2rem; border: 0; border-radius: var(--r-pill); background: linear-gradient(110deg, var(--color-brand), oklch(90% .17 125)); color: var(--color-ink); font: 700 .98rem var(--font-body); box-shadow: 0 16px 36px -12px oklch(5% .02 200 / .9); animation: pop .4s var(--spring); }
  .coupon-bar[hidden] { display: none; }
  .coupon-bar .count { background: var(--color-ink); color: var(--color-brand); }
  .coupon-bar .icon { color: var(--color-ink); --icon-duo: var(--color-ink); --icon-duo-o: .22; }
  main { padding-bottom: 80px; }
}
@media (max-width: 720px) {
  .ev { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "meta more" "teams teams" "odds odds"; gap: .55rem; }
  .ev__meta { grid-area: meta; grid-auto-flow: column; justify-content: start; gap: .6rem; }
  .ev__teams { grid-area: teams; }
  .ev__odds { grid-area: odds; }
  .ev__more { grid-area: more; min-height: 32px; }
  .ev__odds--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ev__odds--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk__sel, .mk__sel--3, .mk__sel--6 { grid-template-columns: minmax(0, 1fr); }
  .mk__sel--4, .mk__sel--8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk__sel--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
html:not(.js) .coupon__form { display: none; }
/* final pass: narrow screens — two-way picks stack so team names never split mid-word; footer clears the floating slip bar */
.mk .odd small { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 400px) { .mk__sel--2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1040px) { body:has(.coupon-bar:not([hidden])) .site-footer { padding-bottom: 84px; } }
