/* ==========================================================================
   App kit: the iOS app's building blocks on the site (2026-11-22), shared by
   the pages that mirror an app tab (/bets, /social, /markets, profiles).
   Drawn from the app's own views: TLPillPager pills, mono section labels,
   the feed's bet row (FeedBetRow) and its card, the actions row, the reply
   rail. Flat on the page, split by hairlines, as the app is.
   Script: js/app-kit.js (window.SIApp).
   ========================================================================== */

/* ---- Page: one centred column, a rail beside it on a wide screen ---- */
.ak-page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 14px 16px 48px; }
.ak-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.ak-main { min-width: 0; max-width: 680px; width: 100%; margin: 0 auto; }
.ak-rail { display: none; min-width: 0; }
@media (min-width: 1100px) {
  .ak-cols.has-rail { grid-template-columns: minmax(0, 680px) minmax(0, 320px); justify-content: center; }
  .ak-cols.has-rail .ak-main { margin: 0; }
  .ak-cols.has-rail .ak-rail { display: block; position: sticky; top: calc(var(--tl-topbar-h) + 14px); align-self: start; }
}
@media (max-width: 720px) { .ak-page { padding: 10px 14px 24px; } }

/* ---- Pills (TLPillPager): outlined, the picked one raised with an ink ring ---- */
.ak-pills { display: flex; gap: 8px; margin: 0 -14px 14px; padding: 2px 14px; overflow-x: auto; scrollbar-width: none; }
.ak-pills::-webkit-scrollbar { display: none; }
.ak-pill {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; margin: 0; padding: 0 15px;
  border-radius: 11px; border: 1px solid var(--tl-line-12); background: transparent;
  font: 600 14.5px/1 var(--tl-font); color: var(--tl-ink-65); white-space: nowrap; text-decoration: none; cursor: pointer;
}
.ak-pill:hover { color: var(--tl-ink); }
.ak-pill[aria-selected="true"], .ak-pill.is-on { color: var(--tl-ink); font-weight: 700; background: var(--tl-control); border-color: var(--tl-ink); }
.ak-pill:focus-visible { outline: 2px solid var(--tl-ink); outline-offset: 2px; }
.ak-pill img { width: 18px; height: 18px; border-radius: 5px; }

/* ---- Section label and head ---- */
.ak-label { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font: 650 10px/1 var(--tl-mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--tl-ink-90); }
.ak-label small { font: 400 10px/1 var(--tl-mono); letter-spacing: 0.06em; color: var(--tl-ink-50); }
.ak-label a { margin-left: auto; font: 600 10px/1 var(--tl-mono); color: var(--tl-ink-60); text-decoration: none; }
.ak-h { margin: 22px 0 12px; font: 700 19px/1.2 var(--tl-font); letter-spacing: -0.3px; color: var(--tl-ink); }
.ak-rule { height: 1px; margin: 0; border: 0; background: var(--tl-line-08); }

/* ---- Buttons ---- */
.ak-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 0; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--tl-line-18); background: transparent;
  font: 650 14.5px/1 var(--tl-font); color: var(--tl-ink); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.ak-btn:hover { border-color: var(--tl-ink-50); color: var(--tl-ink); }
.ak-btn.is-fill { background: var(--tl-ink); border-color: var(--tl-ink); color: var(--tl-on-ink); }
.ak-btn.is-fill:hover { background: var(--tl-ink-hover); color: var(--tl-on-ink); }
.ak-btn.is-sm { min-height: 36px; padding: 0 13px; border-radius: 10px; font-size: 13px; }
.ak-btn.is-wide { width: 100%; }
.ak-btn[disabled] { opacity: 0.5; cursor: default; }
.ak-btn img { width: 22px; height: 22px; border-radius: 6px; }

/* ---- Avatar ---- */
.ak-av { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--tl-fill-07); border: 1px solid var(--tl-line-12); }
.ak-av.is-sm { width: 28px; height: 28px; }
.ak-av.is-initial { display: grid; place-items: center; font: 700 14px/1 var(--tl-font); color: var(--tl-ink-70); text-transform: uppercase; }
.ak-av.is-sm.is-initial { font-size: 11px; }

/* ---- Feed row: avatar, then who and when, the words, the card, the actions ---- */
/* An <article> too: the base sheet's card look (ground, shadow, corners,
   margin) is reset here. */
.ak-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 12px; margin: 0; padding: 16px 0 6px; border: 0; border-bottom: 1px solid var(--tl-line-08); border-radius: 0; background: none; box-shadow: none; }
.ak-row-head { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.ak-name { font: 650 15px/1.25 var(--tl-font); color: var(--tl-ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ak-name:hover { color: var(--tl-ink); text-decoration: underline; }
.ak-verified { flex: none; width: 13px; height: 13px; color: var(--tl-pro); align-self: center; }
.ak-time { margin-left: auto; flex: none; font: 400 10.5px/1 var(--tl-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--tl-ink-45); }
.ak-hit { margin: 3px 0 0; font: 650 15px/1.3 var(--tl-font); color: var(--tl-up); }
.ak-words { margin: 4px 0 0; font: 400 15px/1.45 var(--tl-font); color: var(--tl-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.ak-row > .ak-body { min-width: 0; }
.ak-row .ak-bet { margin-top: 9px; }

/* ---- The bet card: the venue photo with the pick over it, then the money ---- */
.ak-bet { display: block; border: 1px solid var(--tl-line-12); border-radius: 16px; overflow: hidden; background: transparent; color: var(--tl-ink); text-decoration: none; }
a.ak-bet:hover { border-color: var(--tl-line-20); color: var(--tl-ink); }
.ak-bet-art { position: relative; min-height: 132px; display: flex; align-items: flex-end; background: #1b1b1a center / cover no-repeat; }
.ak-bet-art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72)); }
.ak-bet-art.is-multi { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; min-height: 84px; background: none; }
.ak-bet-art.is-multi::before { content: none; }
.ak-bet-art.is-multi > i { position: relative; min-height: 84px; background: #1b1b1a center / cover no-repeat; }
.ak-bet-art.is-multi > i::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.55)); }
.ak-bet-art.is-multi { position: relative; min-height: 132px; }
.ak-bet-art.is-multi > i { min-height: 132px; }
.ak-bet-art.is-multi > .ak-pick.is-cap { position: absolute; left: 0; right: 0; bottom: 0; padding-top: 28px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78)); }
.ak-bet-art.is-multi > i > img { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; transform: translate(-50%, -50%); object-fit: contain; background: transparent !important; }
.ak-pick { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 14px; color: #fff; }
.ak-pick > img { flex: none; width: 38px; height: 38px; object-fit: contain; background: transparent !important; }
.ak-pick-text { min-width: 0; flex: 1; }
.ak-pick-text b { display: block; font: 750 21px/1.15 var(--tl-font); letter-spacing: -0.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-pick-text small { display: block; margin-top: 4px; font: 600 10.5px/1.2 var(--tl-font); letter-spacing: 0.07em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-pct { flex: none; font: 700 19px/1 var(--tl-font); letter-spacing: -0.3px; color: #fff; }

/* A parlay's legs under its art: how each ended, the pick, its chance. */
.ak-legs { margin: 0; padding: 4px 14px; list-style: none; }
.ak-leg { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--tl-line-06); }
.ak-leg:last-child { border-bottom: 0; }
.ak-leg > img { flex: none; width: 24px; height: 24px; object-fit: contain; background: transparent !important; }
.ak-leg-text { flex: 1; min-width: 0; }
.ak-leg-text b { display: block; font: 650 14px/1.2 var(--tl-font); color: var(--tl-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-leg-text small { display: block; margin-top: 2px; font: 500 10px/1.2 var(--tl-font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--tl-ink-50); }
.ak-leg-pct { flex: none; font: 650 13px/1 var(--tl-mono); color: var(--tl-ink-70); }
.ak-mark { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font: 700 10px/1 var(--tl-font); }
.ak-mark.is-won { background: var(--tl-up); color: #0b2a15; }
.ak-mark.is-lost { background: var(--tl-down); color: #2a0b0b; }
.ak-mark.is-push { background: var(--tl-line-20); color: var(--tl-ink); }
.ak-mark.is-open { width: 8px; height: 8px; margin: 0 5px; background: var(--tl-live); }

.ak-bet-foot { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; border-top: 1px solid var(--tl-line-08); }
.ak-money { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 7px; font: 650 14.5px/1.2 var(--tl-font); color: var(--tl-ink-70); white-space: nowrap; overflow: hidden; }
.ak-money .is-up { color: var(--tl-up); }
.ak-money .is-down { color: var(--tl-down); }
.ak-money small { font: 600 12px/1 var(--tl-mono); }
.ak-money .ak-arrow { color: var(--tl-ink-40); }
.ak-status { flex: none; display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--tl-line-20); font: 650 10.5px/1 var(--tl-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--tl-ink-70); }
.ak-status.is-won { border-color: var(--tl-up); color: var(--tl-up); }
.ak-status.is-lost { border-color: var(--tl-down); color: var(--tl-down); }
.ak-status.is-live { border-color: #e8b450; color: #e8b450; }
.ak-note { margin: 0; padding: 0 14px 10px; font: 500 12px/1.3 var(--tl-font); color: var(--tl-ink-55); }

/* ---- Actions under a post: upvote, replies, repost, share ---- */
.ak-acts { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 2px; max-width: 420px; }
.ak-act { display: inline-flex; align-items: center; gap: 6px; min-width: 44px; height: 36px; margin: 0; padding: 0 4px; border: 0; background: transparent; font: 600 11.5px/1 var(--tl-mono); color: var(--tl-ink-60); text-decoration: none; cursor: pointer; }
.ak-act:hover { color: var(--tl-ink); }
.ak-act svg { width: 17px; height: 17px; }
.ak-act.is-on { color: var(--tl-ink); }
.ak-act.is-on.is-vote { color: var(--tl-ink); font-weight: 700; }

/* ---- The reply rail under a post (one or two replies, then a way in) ---- */
.ak-thread { margin: 2px 0 6px; padding-left: 2px; }
.ak-reply { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0 9px; padding: 8px 0 4px; }
.ak-reply .ak-name { font-size: 13.5px; }
.ak-reply .ak-words { margin-top: 1px; font-size: 14.5px; }
.ak-reply-more { display: inline-block; margin: 2px 0 0 37px; font: 400 12px/1.3 var(--tl-font); color: var(--tl-ink-55); text-decoration: none; }
.ak-reply-more:hover { color: var(--tl-ink); }

/* ---- A plain list row (people, games, leaders) ---- */
.ak-item { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 0; border-bottom: 1px solid var(--tl-line-08); color: var(--tl-ink); text-decoration: none; }
a.ak-item:hover { color: var(--tl-ink); }
.ak-item-text { flex: 1; min-width: 0; }
.ak-item-text b { display: block; font: 650 15px/1.25 var(--tl-font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-item-text small { display: block; margin-top: 2px; font: 500 12.5px/1.3 var(--tl-font); color: var(--tl-ink-55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-rank { flex: none; width: 22px; font: 600 12px/1 var(--tl-mono); color: var(--tl-ink-45); text-align: center; }
.ak-stat { flex: none; text-align: right; font: 700 15px/1.1 var(--tl-font); color: var(--tl-ink); }
.ak-stat small { display: block; margin-top: 3px; font: 500 10px/1 var(--tl-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--tl-ink-50); }

/* ---- A boxed module (rail cards, offers) ---- */
.ak-box { border: 1px solid var(--tl-line-12); border-radius: 16px; padding: 14px; }
.ak-box + .ak-box { margin-top: 14px; }
.ak-box > .ak-label:first-child { margin-top: 0; }

/* ---- The base sheet styles bare article, section and li elements
   (margins, padding, a card ground). Kit elements on those tags opt out. ---- */
section.ak-box, article.ak-box { margin: 0; background: none; box-shadow: none; }
.ak-box + .ak-box { margin-top: 14px; }
li.ak-leg, li.ak-item { margin-bottom: 0; list-style: none; }
ul.ak-legs { margin: 0; }
.ak-pill:focus-visible, .ak-btn:focus-visible, .ak-act:focus-visible { box-shadow: var(--tl-focus-ring); }

/* ---- States ---- */
.ak-empty { margin: 0; padding: 56px 12px; text-align: center; font: 400 14.5px/1.5 var(--tl-font); color: var(--tl-ink-50); }
.ak-error { margin: 12px 0; font: 500 13px/1.4 var(--tl-font); color: var(--tl-down); }
.ak-skel { border-radius: 12px; background: var(--tl-fill-05); animation: ak-pulse 1.2s ease-in-out infinite alternate; }
.ak-skel.is-row { height: 148px; margin: 14px 0; }
.ak-skel.is-line { height: 44px; margin: 10px 0; }
@keyframes ak-pulse { from { opacity: 0.55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ak-skel { animation: none; } }
[hidden].ak-hide, .ak-page [hidden] { display: none !important; }
