/* gto.cgovind.com
 *
 * One screen, and it has to hold a six-handed table, five faces, a board, a
 * pot, a stack of controls and a review panel without any of it fighting. The
 * table is an ellipse in a grid; seats are placed on it by angle in the
 * markup, so adding a seventh player is a change to one array and not to this
 * file.
 *
 * A seat's cards hang outside the felt - above it at the top of the table,
 * below it at the bottom - and they are a fixed number of pixels while the
 * ellipse is a percentage, so the felt is sized by the window's height as well
 * as its width. Without that cap the top player's cards go under the bar on
 * anything shorter than about 850px.
 *
 * Dark on purpose. It is the only sensible ground for a felt table, and it is
 * the room this game is actually played in.
 */

:root {
  --felt-1: #1b5e46;
  --felt-2: #0e3a2b;
  --rail: #3a2418;
  --rail-hi: #5c3823;
  --ink: #f2efe6;
  --ink-dim: #a9a294;
  --ink-faint: #6f6a60;
  --panel: #14161a;
  --panel-2: #1b1e24;
  --line: #2a2e36;
  --gold: #d8ae5e;
  --good: #5fbf7f;
  --warn: #e0a944;
  --bad: #e0685f;
  --exploit: #7fa8e0;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --r: 14px;
  --bar: 55px;          /* the sticky header, which the sidebar hangs from */
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 700px at 50% 8%, #1d2128 0%, #0c0e12 60%, #07080b 100%);
  color: var(--ink);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ chrome */

.bar {
  display: flex; align-items: center; gap: 18px;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 15, .72);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 40;
}
.brand { font-weight: 700; letter-spacing: .04em; text-decoration: none; color: var(--ink); }
.brand .pip { color: var(--gold); }
.bar nav { display: flex; gap: 14px; margin-left: 8px; }
.bar nav a, .who a { color: var(--ink-dim); text-decoration: none; font-size: 14px; }
.bar nav a:hover, .who a:hover, .bar nav a.on { color: var(--ink); }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who .name { font-size: 14px; color: var(--ink-dim); }
.gear {
  background: none; border: 1px solid var(--line); color: var(--ink-dim);
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 17px;
  transition: .16s;
}
.gear:hover { color: var(--gold); border-color: var(--gold); transform: rotate(35deg); }

/* ------------------------------------------------------------------- table */

.room {
  --side: 236px;
  /* Centred in the window while the felt can stay 900px - below that the seat
   * plates, which are a fixed size, start colliding with each other, so the
   * left gutter clamps to the sidebar and the felt goes back to filling what
   * is left of the window rather than shrinking to keep both gutters equal. */
  --felt: min(1040px,
              max(900px, calc(100vw - 2 * var(--side) - 40px)),
              calc(100vw - var(--side) - 56px),
              max(864px, calc((100dvh - 260px) * 16 / 9)));
  display: grid;
  grid-template-columns: minmax(calc(var(--side) + 16px), 1fr) var(--felt) 1fr;
}
.felt-wrap {
  grid-column: 2; justify-self: center; width: var(--felt);
  margin-top: 44px; position: relative; aspect-ratio: 16 / 9;
}

/* A column of the room, not a card floating in it: it runs the height of the
 * window against the left edge and the felt centres in what is left. */
.session {
  position: fixed; left: 0; top: var(--bar); z-index: 30;
  width: var(--side); height: calc(100dvh - var(--bar));
  display: flex; flex-direction: column; overflow-y: auto;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2) 0, var(--panel) 200px);
  padding: 18px 18px 22px;
}
.session .shead { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.session h2 {
  font-size: 10px; text-transform: uppercase; letter-spacing: .16em;
  color: var(--ink-faint); margin: 0; font-weight: 600;
}
.session .shead button {
  margin-left: auto; background: none; border: 1px solid var(--line);
  color: var(--ink-faint); font: inherit; font-size: 10.5px;
  padding: 3px 9px; border-radius: 999px; cursor: pointer; transition: .14s;
}
.session .shead button:hover { color: var(--bad); border-color: var(--bad); }
.session .big { font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.session .big.up { color: var(--good); }
.session .big.down { color: var(--bad); }
.session .cap { font-size: 10px; color: var(--ink-faint); letter-spacing: .1em; text-transform: uppercase; margin-top: 2px; }
.session .grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 13px 12px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
}
.session .st { min-width: 0; }
.session .st .v { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ink); }
.session .st .k { font-size: 9.5px; color: var(--ink-faint); letter-spacing: .1em; text-transform: uppercase; }
.session .note {
  font-size: 11px; color: var(--ink-faint); line-height: 1.4;
  margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line);
}
.session .note + .note { margin-top: 7px; padding-top: 0; border-top: 0; }

.felt {
  position: absolute; inset: 0;
  border-radius: 50% / 50%;
  background:
    radial-gradient(120% 90% at 50% 30%, var(--felt-1) 0%, var(--felt-2) 72%);
  box-shadow:
    0 0 0 14px var(--rail),
    0 0 0 16px var(--rail-hi),
    inset 0 0 90px rgba(0, 0, 0, .55),
    var(--shadow);
}
.felt::after {
  /* The maker's mark in the middle of the cloth. Sits under everything. */
  content: "";
  position: absolute; inset: 26%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .05);
}

.middle {
  position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  z-index: 6; width: min(560px, 62%);
}
.board { display: flex; gap: 7px; min-height: 96px; align-items: center; justify-content: center; }
.pot {
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
  background: rgba(0, 0, 0, .34); border: 1px solid rgba(255, 255, 255, .10);
  padding: 5px 15px; border-radius: 999px; font-size: 14px; color: var(--ink);
}
.pot b { color: var(--gold); }
.street { font-size: 11px; text-transform: uppercase; letter-spacing: .18em; color: var(--ink-faint); }

/* --------------------------------------------------------------------- cards */

.card {
  width: var(--cw, 62px); aspect-ratio: 240 / 336;
  border-radius: calc(var(--cw, 62px) * .079);
  background: #faf9f6 center/100% 100% no-repeat;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .5);
  animation: deal .28s cubic-bezier(.2, .9, .3, 1) both;
}
.card.back { background-image: url("/static/cards/back.svg"); }
.card.small { --cw: 40px; }
.card.hero { --cw: 84px; }
@keyframes deal {
  from { opacity: 0; transform: translateY(-14px) scale(.9) rotate(-4deg); }
  to   { opacity: 1; transform: none; }
}
.card.still { animation: none; }        /* already on the table; do not re-deal it */
.muck { opacity: .34; filter: grayscale(.7); }

/* --------------------------------------------------------------------- seats */

.seat {
  position: absolute; transform: translate(-50%, -50%);
  width: 168px; text-align: center; z-index: 8;
}
.seat .plate {
  position: relative;
  background: linear-gradient(180deg, rgba(24, 27, 32, .96), rgba(16, 18, 22, .96));
  border: 1px solid var(--line); border-radius: 12px;
  padding: 7px 10px 8px; box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.seat.acting .plate { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow); }
.seat.folded { opacity: .42; }
.seat .who-row { display: flex; align-items: center; gap: 8px; justify-content: flex-start; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px;
  background: linear-gradient(140deg, #333a44, #20242b) center/cover no-repeat;
  border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--ink-dim);
}
.seat.acting .avatar { border-color: var(--gold); }
.seat .nm { font-size: 13px; font-weight: 600; line-height: 1.15; text-align: left; }
.seat .pos { font-size: 10px; color: var(--ink-faint); letter-spacing: .1em; text-transform: uppercase; }
.seat .stack { font-size: 13px; color: var(--gold); font-variant-numeric: tabular-nums; }
.seat .cards { display: flex; gap: 4px; justify-content: center; margin-bottom: 6px; min-height: 56px; align-items: flex-end; }
.seat .cards.empty { min-height: 0; margin-bottom: 0; }   /* mucked: no gap to hang chips in */
.seat .say {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -22px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-dim); background: rgba(0, 0, 0, .55); padding: 2px 9px; border-radius: 999px;
  white-space: nowrap;
}
.seat .bet {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--gold); font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, .5); border: 1px solid rgba(216, 174, 94, .35);
  border-radius: 999px; padding: 2px 9px 2px 6px;
}
.seat .bet::before {
  content: ""; width: 11px; height: 11px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 50% 32%, #f6e3b4, var(--gold) 58%, #9a7327);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 1px 2px rgba(0, 0, 0, .6);
}
.seat .bet.fresh { animation: chips .24s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes chips {
  from { opacity: 0; transform: translate(-50%, var(--from, -12px)) scale(.8); }
  to   { opacity: 1; transform: translateX(-50%) scale(1); }
}
.seat .stack.bump { animation: bump .34s ease-out both; }
@keyframes bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.13); color: var(--ink); }
  100% { transform: scale(1); }
}
/* The three markers that say whose deal it is and who is in for what. They
 * hang off the side of the plate facing the middle of the table, so a seat on
 * the right of the felt wears its marker on its left. */
.dot-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  min-width: 27px; height: 27px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center; z-index: 9;
  font: 800 11px/1 ui-sans-serif, system-ui; letter-spacing: .01em;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .65), inset 0 -2px 5px rgba(0, 0, 0, .22);
}
.dot-btn.btn {
  background: linear-gradient(180deg, #fffdf5, #d9d1bd);
  border: 1px solid #fffef9; color: #17150f;
}
.dot-btn.sb {
  background: linear-gradient(180deg, #8dbcff, #2f6fd0);
  border: 1px solid #b9d6ff; color: #051429;
}
.dot-btn.bb {
  background: linear-gradient(180deg, #ffdd93, #dd9c22);
  border: 1px solid #ffeec2; color: #221600;
}

/* The bounty ladder as a counter on the seat: three cells that light one at a
 * time, and from the third one on it is paying. */
.streak {
  display: inline-flex; align-items: center; gap: 3px;
  margin-top: 4px; padding: 2px 3px; border-radius: 6px;
  background: #050608; border: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 3px rgba(0, 0, 0, .7);
}
.streak i {
  width: 13px; height: 15px; border-radius: 3px; flex: none;
  display: grid; place-items: center; font-style: normal;
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #4a4640; background: #101216;
}
.streak i.on { color: #17110a; background: var(--gold); }
.streak b {
  font-size: 9.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--gold); padding: 0 3px 0 2px;
}
.streak.paying { border-color: rgba(216, 174, 94, .55); }
.streak.paying i.on { box-shadow: 0 0 7px rgba(216, 174, 94, .6); }
/* The end of a hand, which the table used to say nothing about at all: the
 * winning plate lights, the money it took sits where its chips were, and at a
 * showdown every hand still in is named. */
.seat.won .plate { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 26px rgba(216, 174, 94, .3), var(--shadow); }
.seat.won .avatar { border-color: var(--gold); }
.seat .made {
  font-size: 10px; color: var(--ink-dim); letter-spacing: .02em;
  text-align: left; line-height: 1.25; margin-top: 1px;
}
.seat.won .made { color: var(--gold); }
.seat .took {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: #17110a; background: var(--gold); border-radius: 999px;
  padding: 2px 10px; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .55);
  animation: chips .3s cubic-bezier(.2, .9, .3, 1) both;
}
.pot.result {
  border-color: rgba(216, 174, 94, .45);
  background: rgba(0, 0, 0, .55);
  max-width: 100%; text-align: center; line-height: 1.35;
}
.pot.result b { color: var(--gold); font-weight: 700; }

.tiltbar { height: 2px; border-radius: 2px; background: var(--line); margin-top: 6px; overflow: hidden; }
.tiltbar i { display: block; height: 100%; background: var(--bad); width: 0; transition: width .4s; }

/* ------------------------------------------------------------------ actions */

.controls {
  grid-column: 2; justify-self: center; width: var(--felt); margin: 28px 0 40px;
  display: flex; flex-direction: column; gap: 12px;
}
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row[hidden] { display: none; }   /* a bare `hidden` loses to the rule above */
button.act {
  position: relative;
  flex: 1 1 0; min-width: 108px; padding: 15px 16px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  font-size: 15px; font-weight: 600; letter-spacing: .01em; transition: .14s;
}
button.act:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--ink-faint); }
button.act:disabled { opacity: .35; cursor: not-allowed; }
button.act.fold { border-color: rgba(224, 104, 95, .35); }
button.act.fold:hover:not(:disabled) { background: rgba(224, 104, 95, .13); border-color: var(--bad); }
button.act.go { border-color: rgba(95, 191, 127, .35); }
button.act.go:hover:not(:disabled) { background: rgba(95, 191, 127, .13); border-color: var(--good); }
button.act.raise { border-color: rgba(216, 174, 94, .4); }
button.act.raise:hover:not(:disabled) { background: rgba(216, 174, 94, .14); border-color: var(--gold); }
button.act small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-faint); }
.key {
  display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 5px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  font: 700 10px/15px ui-sans-serif, system-ui; letter-spacing: .04em;
  color: var(--ink-faint); text-align: center; vertical-align: middle;
}
button.act .key { position: absolute; top: 7px; right: 8px; }
button.act:hover:not(:disabled) .key, .chip:hover .key { color: var(--ink-dim); }

.sizer { display: flex; gap: 10px; align-items: center; flex: 1 1 100%; }
.sizer input[type=range] { flex: 1; accent-color: var(--gold); }
.chip {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-dim); font-size: 12px; cursor: pointer;
}
.chip:hover { color: var(--ink); border-color: var(--ink-faint); }
.amount { font-variant-numeric: tabular-nums; min-width: 96px; text-align: right; color: var(--gold); font-weight: 600; }

/* ------------------------------------------------------------------ panels */

.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(460px, 100vw);
  background: var(--panel); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .8, .3, 1);
  z-index: 60; display: flex; flex-direction: column; box-shadow: -20px 0 50px rgba(0, 0, 0, .5);
}
.drawer.open { transform: none; }
.drawer header {
  display: flex; align-items: center; gap: 10px; padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer header h2 { margin: 0; font-size: 15px; letter-spacing: .02em; }
.drawer header button {
  margin-left: auto; background: none; border: 0; color: var(--ink-dim);
  font-size: 22px; cursor: pointer; line-height: 1;
}
.drawer .scroll { overflow-y: auto; padding: 16px 18px 40px; }

.mark { border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px; margin-bottom: 12px; background: var(--panel-2); }
.mark > summary {
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  cursor: pointer; list-style: none; margin: -13px -14px; padding: 13px 14px 13px 30px;
  border-radius: var(--r); position: relative;
}
.mark[open] > summary { margin-bottom: 0; }
.mark > summary::-webkit-details-marker { display: none; }
.mark > summary::before {
  content: ""; position: absolute; left: 14px; top: 50%;
  width: 0; height: 0; border-left: 5px solid var(--ink-faint);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transform: translateY(-50%); transition: transform .13s ease;
}
.mark[open] > summary::before { transform: translateY(-50%) rotate(90deg); }
.mark > summary:hover { background: rgba(255, 255, 255, .03); }
.mark .st { font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-faint); }
.mark .did { font-size: 14px; font-weight: 600; }
.mark > summary .cost { font-size: 12.5px; font-weight: 600; color: var(--bad); }
.mark > summary .tag { margin-left: auto; }
.tag { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.tag.correct { background: rgba(95, 191, 127, .16); color: var(--good); }
.tag.mixed { background: rgba(216, 174, 94, .14); color: var(--gold); }
.tag.thin { background: rgba(224, 169, 68, .16); color: var(--warn); }
.tag.error { background: rgba(224, 104, 95, .16); color: var(--bad); }
.tag.exploit { background: rgba(127, 168, 224, .16); color: var(--exploit); }
.tag.unpriced { background: rgba(255, 255, 255, .07); color: var(--ink-faint); }
.mark .headline { font-size: 13.5px; color: var(--ink); margin: 12px 0 10px; }

.line { border-top: 1px solid var(--line); padding: 9px 0 0; margin-top: 9px; }
.line .lab { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint); display: flex; gap: 8px; align-items: center; }
.line .txt { font-size: 13px; color: var(--ink-dim); margin-top: 3px; }
.line .note { font-size: 12px; color: var(--ink-faint); margin-top: 5px; font-style: italic; }
.line .note > summary {
  cursor: pointer; font-style: normal; letter-spacing: .1em; font-size: 9.5px;
  text-transform: uppercase; color: var(--ink-faint); opacity: .7;
}
.line .note > summary:hover { opacity: 1; }
.line .note[open] > summary { margin-bottom: 5px; }
.src { font-size: 9px; letter-spacing: .08em; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); text-transform: uppercase; }
.src.solver { color: var(--good); border-color: rgba(95, 191, 127, .35); }
.src.derived { color: var(--gold); border-color: rgba(216, 174, 94, .3); }
.src.heuristic { color: var(--warn); border-color: rgba(224, 169, 68, .3); }
.src.model { color: var(--exploit); border-color: rgba(127, 168, 224, .3); }
.src.arithmetic { color: var(--ink-faint); }

.legend { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--panel); }
.legend summary { cursor: pointer; font-size: 12px; color: var(--ink-dim); letter-spacing: .02em; }
.legend summary::marker { color: var(--ink-faint); }
.legend .lrow { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--ink-dim); }
.legend .lrow .src { flex: none; min-width: 74px; text-align: center; }

/* -------------------------------------------------------------------- coach
 *
 * Deliberately not in any of the five `.src` colours. Every one of those means
 * "here is where this number came from", and the whole trainer turns on nothing
 * ever being labelled better than it is. This is the one block on the page
 * whose numbers were checked against nothing, so it is grey, it sits under
 * every labelled line, and it says so in words at the top.
 */

.coach { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 11px; }
.coach .ask {
  background: none; border: 1px solid var(--line); color: var(--ink-dim);
  font: inherit; font-size: 12px; padding: 6px 12px; border-radius: 999px;
  cursor: pointer; transition: color .13s ease, border-color .13s ease;
}
.coach .ask:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-faint); }
.coach .ask:disabled { opacity: .55; cursor: default; }
.coach .who {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .11em;
  color: var(--ink-faint); margin-bottom: 7px;
}
.coach .answer p { font-size: 13px; color: var(--ink-dim); margin: 0 0 7px; }
.coach .answer ul { margin: 0; padding-left: 17px; }
.coach .answer li { font-size: 13px; color: var(--ink-dim); margin-bottom: 5px; }
.coach .answer .failed { color: var(--warn); }
.coach .bill {
  font-size: 10.5px; color: var(--ink-faint); margin-top: 9px;
  letter-spacing: .02em;
}

/* ----------------------------------------------------------------- settings */

.set { margin-bottom: 20px; }
.set h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--ink-faint); margin: 0 0 10px; }
.field { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 13.5px; }
.field label { flex: 1; color: var(--ink-dim); }
.field input[type=number], .field select {
  width: 110px; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--ink); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 13px;
}
.field input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--gold); }
.field input[type=range] { flex: 1; accent-color: var(--gold); }
.who-card { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin-bottom: 10px; background: var(--panel-2); }
.who-card .h { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.who-card .blurb { font-size: 12px; color: var(--ink-faint); line-height: 1.45; }
.who-card .nums { font-size: 12px; color: var(--gold); font-variant-numeric: tabular-nums; margin-top: 6px; }

.primary {
  width: 100%; padding: 13px; border-radius: 11px; border: 1px solid var(--gold);
  background: rgba(216, 174, 94, .13); color: var(--gold); font-weight: 700;
  cursor: pointer; font-size: 14px;
}
.primary:hover { background: rgba(216, 174, 94, .22); }
.warnbox { font-size: 12px; color: var(--ink-faint); border-left: 2px solid var(--line); padding-left: 10px; margin-top: 10px; }

/* -------------------------------------------------------------------- stats */

.page { max-width: 980px; margin: 0 auto; padding: 26px 18px 60px; }
.head { font-size: 21px; font-weight: 700; margin: 0 0 6px; }
.sub { color: var(--ink-dim); font-size: 14px; margin: 0 0 24px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.stat { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--panel-2); }
.stat .k { font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-faint); }
.stat .v { font-size: 25px; font-weight: 700; margin-top: 5px; font-variant-numeric: tabular-nums; }
.stat .ci { font-size: 12px; color: var(--ink-faint); margin-top: 3px; }
.stat.wide { grid-column: 1 / -1; }

/* -------------------------------------------------------------------- toast */

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);
  padding: 11px 18px; border-radius: 999px; font-size: 13px; z-index: 80;
  opacity: 0; pointer-events: none; transition: .22s; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .room { grid-template-columns: 1fr; padding-top: 12px; }
  .felt-wrap, .controls { grid-column: 1; margin-inline: 10px; }
  /* Narrow: the panel goes above the felt rather than beside it, full width. */
  .session {
    position: static; width: auto; height: auto;
    grid-column: 1; grid-row: auto; justify-self: stretch; margin: 0 10px 12px; order: -1;
    border: 1px solid var(--line); border-radius: var(--r);
    background: var(--panel); padding: 12px 14px 13px;
  }
  .felt-wrap, .controls { justify-self: stretch; width: auto; }
  .felt-wrap { margin-top: 0; }
  .felt-wrap { aspect-ratio: 1 / 1.15; }
  .seat { width: 118px; }
  .seat .nm { font-size: 11px; }
  .card { --cw: 42px; }
  .card.hero { --cw: 62px; }
  .card.small { --cw: 30px; }
  button.act { padding: 13px 10px; min-width: 84px; font-size: 14px; }
  .key { display: none; }
}

/* ------------------------------------------------------- curves and buckets */

.curve { width: 100%; border-collapse: collapse; margin: 8px 0 2px; font-size: 12px; }
.curve th, .curve td { padding: 2px 6px 2px 0; font-weight: 400; color: var(--ink-dim); }
.curve thead th {
  font-size: 9px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-faint); padding-bottom: 4px;
}
.curve tbody th { text-align: left; white-space: nowrap; color: var(--ink-dim); }
.curve .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.curve .bar { width: 42%; position: relative; padding: 0 8px; }
.curve .bar::before {
  content: ""; position: absolute; left: calc(8px + var(--zero) * .84); top: 1px; bottom: 1px;
  width: 1px; background: var(--line);
}
.curve .bar i {
  position: absolute; top: 4px; bottom: 4px; border-radius: 2px;
  background: var(--ink-faint); opacity: .5;
}
.curve .ev { color: var(--ink-dim); }
.curve tr.best th, .curve tr.best .ev { color: var(--good); font-weight: 600; }
.curve tr.best .bar i { background: var(--good); opacity: .85; }
.curve tr.yours th::after { content: " ← you"; color: var(--gold); font-size: 10px; }
.curve tr.yours .bar i { background: var(--gold); opacity: .85; }
.curve tr.yours.best .bar i { background: var(--good); }

.buckets { display: flex; gap: 3px; margin: 8px 0 2px; flex-wrap: wrap; }
.bk {
  min-width: 96px; border-radius: 4px; padding: 6px 8px 7px;
  background: rgba(255, 255, 255, .04); border-top: 2px solid var(--ink-faint);
}
.bk.b0 { border-top-color: var(--good); }
.bk.b1 { border-top-color: var(--warn); }
.bk.b2 { border-top-color: var(--bad); }
.bk b { font-size: 14px; font-weight: 700; color: var(--ink); }
.bk span { font-size: 11px; color: var(--ink-dim); margin-left: 5px; font-variant-numeric: tabular-nums; }
.bk em {
  display: block; font-style: normal; font-size: 10px; line-height: 1.3;
  color: var(--ink-faint); margin-top: 2px;
}

/* --------------------------------------------------------------- the proof */

.page { max-width: 820px; margin: 0 auto; padding: 26px 20px 60px; }
.page h1 { font-size: 24px; margin: 6px 0 10px; }
.page h2 { font-size: 15px; margin: 28px 0 8px; color: var(--ink-dim); }
.page .lede { font-size: 14px; line-height: 1.55; color: var(--ink-dim); margin: 0 0 14px; }
.page .sub { font-size: 12.5px; color: var(--ink-faint); margin: 0 0 18px; }
.page code { font-size: 12px; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.check > summary .tag { margin-left: auto; }
.check.fail { border-color: rgba(224, 104, 95, .4); }
.curve.rowsy td, .curve.rowsy th { padding: 3px 10px 3px 0; }
.curve.rowsy tbody td:first-child { color: var(--ink-dim); white-space: nowrap; }
.page a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(216, 174, 94, .3); }
.page a:hover { border-bottom-color: var(--gold); }

/* The habits the coach says a hand shows. Counted across months, which is why
 * a repeat wears its tally: the ninth time is a different fact from the first. */
.coach .leaks { margin-top: 11px; }
.coach .leaks ul { margin: 0; padding: 0; list-style: none; }
.coach .lk {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ink-dim); padding: 4px 0;
  border-left: 2px solid var(--line); padding-left: 9px; margin-bottom: 4px;
}
.coach .lk.moderate { border-left-color: rgba(224, 169, 68, .5); }
.coach .lk.major { border-left-color: rgba(224, 104, 95, .55); }
.coach .lk .tg {
  font-size: 9px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-faint); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 6px; flex: none;
}
.coach .lk .lb { flex: 1 1 auto; }
.coach .lk .ct { font-size: 11px; font-weight: 700; color: var(--warn); flex: none; }

/* One numbered decision's verdict, sitting under that decision's own marking
 * rather than in a list at the foot that has to be read back against the panel.
 * Grey like the rest of the coach: unchecked numbers, wherever they appear. */
.spotv {
  display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap;
  margin-top: 9px; padding: 7px 9px; border-radius: 8px;
  background: rgba(255, 255, 255, .025); border-left: 2px solid var(--line);
  font-size: 12.5px; color: var(--ink-dim);
}
.spotv .who {
  font-size: 9px; text-transform: uppercase; letter-spacing: .11em;
  color: var(--ink-faint); flex: none;
}
.spotv b { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.spotv.right { border-left-color: rgba(95, 191, 127, .5); }
.spotv.right b { color: var(--good); }
.spotv.close { border-left-color: rgba(216, 174, 94, .5); }
.spotv.close b { color: var(--gold); }
.spotv.wrong { border-left-color: rgba(224, 104, 95, .55); }
.spotv.wrong b { color: var(--bad); }
