/*
  The Last Suffer Whiteboard: the app's own UI, drawn as live HTML.
  Used inside the landing page's visuals (the hero window, the app frame, the cards, the phones)
  and by the two screen mockups (whiteboard.html, log-score.html). Everything is scoped under .tls,
  takes the page's fonts, and follows the page's light or dark grade through the tokens below.
*/
.tls {
  --a-bg: #ffffff;
  --a-sunk: #f4f4f1;
  --a-line: rgb(0 0 0 / .08);
  --a-line-2: rgb(0 0 0 / .14);
  --a-ink: #141413;
  --a-text: #3b3b38;
  --a-muted: #6b6b66;
  --a-accent: #d0106f;
  --a-accent-soft: #fbe3ee;
  --a-accent-ink: #9c0a52;
  --a-rx: #17673f; --a-rx-bg: #e3f3e9;
  --a-pr: #8a4b00; --a-pr-bg: #fdecd2;
  --a-shadow: 0 0 0 1px rgb(0 0 0 / .07), 0 28px 64px -32px rgb(0 0 0 / .45);
  color: var(--a-ink);
  font: 400 14px/1.45 var(--font-text);
  text-align: left;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tls {
    --a-bg: #19191a; --a-sunk: #111112; --a-line: rgb(255 255 255 / .08); --a-line-2: rgb(255 255 255 / .16);
    --a-ink: #f3f3f0; --a-text: #d4d4cf; --a-muted: #a2a29c;
    --a-accent: #ff4c9b; --a-accent-soft: rgb(255 76 155 / .16); --a-accent-ink: #ff8cbf;
    --a-rx: #7fd8a4; --a-rx-bg: rgb(127 216 164 / .14); --a-pr: #ffc46b; --a-pr-bg: rgb(255 196 107 / .15);
    --a-shadow: 0 0 0 1px rgb(255 255 255 / .09), 0 30px 70px -30px rgb(0 0 0 / .85);
  }
}
:root[data-theme="dark"] .tls {
  --a-bg: #19191a; --a-sunk: #111112; --a-line: rgb(255 255 255 / .08); --a-line-2: rgb(255 255 255 / .16);
  --a-ink: #f3f3f0; --a-text: #d4d4cf; --a-muted: #a2a29c;
  --a-accent: #ff4c9b; --a-accent-soft: rgb(255 76 155 / .16); --a-accent-ink: #ff8cbf;
  --a-rx: #7fd8a4; --a-rx-bg: rgb(127 216 164 / .14); --a-pr: #ffc46b; --a-pr-bg: rgb(255 196 107 / .15);
  --a-shadow: 0 0 0 1px rgb(255 255 255 / .09), 0 30px 70px -30px rgb(0 0 0 / .85);
}
.tls *, .tls *::before, .tls *::after { box-sizing: border-box; }
.tls h3, .tls h4, .tls p { margin: 0; }
.tls .mono, .tls .tls-score { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* the window: the browser's chrome round one page of the app */
.tls-win { background: var(--a-bg); border-radius: 14px; overflow: hidden; box-shadow: var(--a-shadow); }
.tls-win__bar { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 16px; border-bottom: 1px solid var(--a-line); color: var(--a-muted); font-size: 13px; }
.tls-win__dots { display: flex; gap: 6px; } .tls-win__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--a-line-2); }
.tls-win__url { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 12px; border-radius: 8px; background: var(--a-sunk); white-space: nowrap; }
.tls-win__body { display: grid; grid-template-columns: 168px minmax(0, 1fr); }
.tls-side { display: grid; align-content: start; gap: 2px; padding: 14px 10px; border-right: 1px solid var(--a-line); font-size: 13px; color: var(--a-text); }
.tls-side span { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border-radius: 8px; white-space: nowrap; }
.tls-side span.is-on { background: var(--a-sunk); color: var(--a-ink); font-weight: 500; }
.tls-side span.is-on::before { background: var(--a-accent); opacity: 1; }
.tls-side span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .35; flex: none; }
.tls-main { padding: 18px 20px; display: grid; align-content: start; gap: 14px; min-width: 0; }
.tls-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tls-head h3 { font: 500 18px/1.2 var(--font-text); letter-spacing: -0.01em; }
.tls-head p { font-size: 13px; color: var(--a-muted); }
.tls-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--a-ink); color: var(--a-bg); font-size: 13px; font-weight: 500; white-space: nowrap; }
.tls-btn--accent { background: var(--a-accent); color: #fff; }
.tls-btn--ghost { background: transparent; color: var(--a-ink); box-shadow: inset 0 0 0 1px var(--a-line-2); }
.tls-btn--lg { height: 44px; padding: 0 18px; font-size: 15px; border-radius: 10px; }

/* the next-workout card on the whiteboard */
.tls-next { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--a-accent-soft); }
.tls-next small { display: block; font-size: 13px; color: var(--a-accent-ink); font-weight: 500; }
.tls-next b { display: block; font: 500 17px/1.25 var(--font-text); }
.tls-next span { font-size: 13px; color: var(--a-text); }

/* the week: one row per scheduled workout */
.tls-week { display: grid; border-top: 1px solid var(--a-line); }
.tls-wk { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 11px 2px; border-bottom: 1px solid var(--a-line); }
.tls-wk__day { display: grid; justify-items: center; line-height: 1.1; padding: 6px 0; border-radius: 10px; background: var(--a-sunk); }
.tls-wk__day small { font-size: 13px; color: var(--a-muted); }
.tls-wk__day b { font: 500 18px/1.15 var(--font-mono); }
.tls-wk.is-today .tls-wk__day { background: var(--a-ink); color: var(--a-bg); } .tls-wk.is-today .tls-wk__day small { color: inherit; opacity: .7; }
.tls-wk__what { min-width: 0; }
.tls-wk__what b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tls-wk__what span { display: block; font-size: 13px; color: var(--a-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tls-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 13px; font-weight: 500; white-space: nowrap; background: var(--a-sunk); color: var(--a-text); }
.tls-chip--live { background: var(--a-accent-soft); color: var(--a-accent-ink); }
.tls-chip--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tls-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 13px; font-weight: 600; line-height: 1; }
.tls-tag--rx { background: var(--a-rx-bg); color: var(--a-rx); }
.tls-tag--pr { background: var(--a-pr-bg); color: var(--a-pr); }

/* one workout: its head, its description, its leaderboard */
.tls-wo { display: grid; gap: 16px; padding: 20px 22px; min-width: 0; align-content: start; }
.tls-wo__type { font-size: 13px; color: var(--a-muted); }
.tls-wo__title { font: 500 24px/1.15 var(--font-text); letter-spacing: -0.02em; }
.tls-wo__desc { padding: 12px 14px; border-radius: 10px; background: var(--a-sunk); font: 400 13px/1.6 var(--font-mono); color: var(--a-text); white-space: pre-line; }
.tls-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tls-tabs span { height: 28px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--a-line-2); font-size: 13px; color: var(--a-text); }
.tls-tabs span.is-on { background: var(--a-ink); color: var(--a-bg); box-shadow: none; }
.tls-lb { display: grid; gap: 8px; }
.tls-lb__label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--a-muted); padding-top: 4px; }
.tls-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 11px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--a-line); }
.tls-row__rank { font: 500 14px/24px var(--font-mono); color: var(--a-muted); }
.tls-row__who { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 500; line-height: 24px; }
.tls-row__note { font-size: 13px; color: var(--a-muted); margin-top: 2px; }
.tls-row .tls-score { font-size: 16px; font-weight: 500; line-height: 24px; text-align: right; white-space: nowrap; }
.tls-reacts { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tls-react { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--a-line); font-size: 13px; color: var(--a-text); }
.tls-react.is-mine { background: var(--a-accent-soft); box-shadow: inset 0 0 0 1px transparent; color: var(--a-accent-ink); }

/* the score form */
.tls-form { display: grid; gap: 14px; }
.tls-field { display: grid; gap: 6px; }
.tls-field label, .tls-field .tls-label { font-size: 13px; font-weight: 500; color: var(--a-text); }
.tls-input { display: flex; align-items: center; height: 46px; padding: 0 14px; border-radius: 10px; background: var(--a-bg); box-shadow: inset 0 0 0 1px var(--a-line-2); font: 500 18px/1 var(--font-mono); color: var(--a-ink); width: 100%; }
.tls-input--focus { box-shadow: inset 0 0 0 2px var(--a-accent); }
.tls-input--text { font: 400 14px/1.45 var(--font-text); height: auto; min-height: 64px; align-items: flex-start; padding: 11px 14px; }
.tls-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tls-check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.tls-check i { width: 20px; height: 20px; border-radius: 6px; background: var(--a-ink); display: grid; place-items: center; flex: none; }
.tls-check i::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--a-bg); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.tls-hint { font-size: 13px; color: var(--a-muted); }
.tls-toast { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--a-bg); box-shadow: var(--a-shadow); font-size: 14px; }
.tls-toast__tick { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--a-rx-bg); color: var(--a-rx); font-weight: 600; }
.tls-toast b { font-weight: 500; }
.tls-toast span { color: var(--a-muted); font-size: 13px; }

/* comments */
.tls-cmt { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
.tls-ava { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--a-sunk); color: var(--a-text); }
.tls-cmt__head { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--a-muted); }
.tls-cmt__head b { color: var(--a-ink); font-weight: 500; font-size: 14px; }
.tls-cmt p { font-size: 14px; color: var(--a-text); }

/* records and templates */
.tls-list { display: grid; border-top: 1px solid var(--a-line); }
.tls-li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--a-line); }
.tls-li b { display: block; font-weight: 500; }
.tls-li span { display: block; font-size: 13px; color: var(--a-muted); }
.tls-li .tls-score { font-size: 16px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.tls-search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 10px; background: var(--a-bg); box-shadow: inset 0 0 0 1px var(--a-line-2); font-size: 15px; }
.tls-search svg { width: 16px; height: 16px; flex: none; color: var(--a-muted); }

/* a card that sits loose on a lit panel */
.tls-card { background: var(--a-bg); border-radius: 14px; box-shadow: var(--a-shadow); padding: 16px 18px; display: grid; gap: 12px; }

/* a phone held upright: 390 wide screens drawn at a fixed scale */
.tls-phone { width: 300px; border-radius: 40px; padding: 10px; background: #0b0b0b; box-shadow: 0 0 0 1px rgb(255 255 255 / .12), 0 40px 80px -40px rgb(0 0 0 / .8); }
.tls-phone__screen { border-radius: 31px; overflow: hidden; background: var(--a-bg); height: 600px; position: relative; }
.tls-phone__bar { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--a-line); font-weight: 500; font-size: 14px; }
.tls-phone__bar .tls-burger { width: 32px; height: 32px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--a-line-2); display: grid; place-items: center; }
.tls-phone__bar .tls-burger i, .tls-phone__bar .tls-burger i::before { display: block; width: 14px; height: 1.5px; background: currentColor; position: relative; }
.tls-phone__bar .tls-burger i::before { content: ""; position: absolute; top: 5px; } .tls-phone__bar .tls-burger i { top: -2px; }
.tls-phone .tls-wo, .tls-phone .tls-main { padding: 16px; }
.tls-mark { display: inline-flex; align-items: center; gap: 8px; }
.tls-mark i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--a-accent); }
.tls .tls-h { display: block; font: 500 18px/1.2 var(--font-text); letter-spacing: -0.01em; }
.tls b.tls-wo__title { display: block; }
