/* Plain and dense. Three type sizes, one border weight, one radius; colour
   only where it carries meaning: red suits, vulnerability, the seat to move,
   and the sign of a comparison. */

:root {
  --bg: #ffffff;
  --surface: #f5f6f7;
  --ink: #17191c;
  --muted: #6a7078;
  --line: #e3e5e8;
  --line-strong: #c8ccd1;
  --accent: #1e5c42;
  --turn: #e0a400;
  --red: #c42b2b;
  --gain: #1e7a4b;
  --loss: #c42b2b;
  color-scheme: light dark;

  --text: 15px;
  --small: 13px;
  --title: 20px;

  --control: 36px;
  --radius: 4px;
  --gap: 8px;
  --column: 720px;

  font-family: Suits, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--text);
  line-height: 1.4;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

/* Dark when the system is. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131517;
    --surface: #1c1f22;
    --ink: #e6e8ea;
    --muted: #969da6;
    --line: #2a2e32;
    --line-strong: #40464c;
    --accent: #6cc299;
    --turn: #f2c94c;
    --red: #f07470;
    --gain: #62bf8c;
    --loss: #f07470;
  }
}

/* The four suits in a face of our own: systems draw theirs each their own
   way, some as emoji. */
@font-face {
  font-family: Suits;
  src: url("/suits.woff2") format("woff2");
  font-weight: 100 900;
  unicode-range: U+2660, U+2663, U+2665, U+2666;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
}

h1,
h2,
p {
  margin: 0;
  font-size: inherit;
}

h1 {
  font-size: var(--title);
  font-weight: 650;
  line-height: 1.2;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.numeric {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: var(--small);
}

.red {
  color: var(--red);
}

.error {
  color: var(--loss);
}

/* Controls share one height, one border and one radius. */
.button,
.input {
  height: var(--control);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-weight: 550;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

/* Hover only where a pointer hovers: a tap would leave it stuck. Kept below
   the pressed and primary styles, which it must not override. */
@media (hover: hover) {
  .button:where(:hover:not(:disabled)) {
    background: var(--surface);
  }
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.button.danger {
  color: var(--loss);
}

.button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* A toggle that is on. */
.button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.input {
  min-width: 0;
  padding: 0 8px;
}

/* iOS zooms into any field set smaller than 16px when it takes focus. */
@media (pointer: coarse) {
  .input {
    font-size: 16px;
  }
}

/* A text-coloured button, for actions inside a line of text. */
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 550;
  cursor: pointer;
}

/* Tables: the house style for anything listed. */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line-strong);
  font-size: var(--small);
  font-weight: 550;
  color: var(--muted);
  text-align: left;
}

.table td {
  padding: 6px;
  border-bottom: 1px solid var(--line);
}

.table th:first-child,
.table td:first-child {
  padding-left: 0;
}

.table th:last-child,
.table td:last-child {
  padding-right: 0;
}

.table a {
  text-decoration: none;
}

.table .number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table tbody tr[data-action] {
  cursor: pointer;
}

@media (hover: hover) {
  .table tbody tr[data-action]:hover {
    background: var(--surface);
  }
}
/* The bots, version by version. */

.since {
  white-space: nowrap;
}
/* The frame around every page, and the door: signing in. */

.bar {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--column);
  height: 48px;
  margin: 0 auto;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  gap: 16px;
  flex: 1;
}

.nav a {
  color: var(--muted);
  font-weight: 550;
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--ink);
}

.sign-out {
  white-space: nowrap;
}

.page {
  display: grid;
  gap: 16px;
  max-width: var(--column);
  margin: 0 auto;
  padding: 16px 16px 48px;
}

.door {
  display: grid;
  gap: 16px;
  justify-items: start;
  max-width: 360px;
  margin: 0 auto;
  padding: 96px 16px;
}

.google {
  gap: 8px;
}

.google svg {
  width: 18px;
  height: 18px;
}

.dev {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  width: 100%;
}

.dev .input {
  flex: 1 1 0;
}

.dev p {
  width: 100%;
}
/* Players and their emails. */

.add,
.editor {
  display: flex;
  gap: var(--gap);
}

.add .input,
.editor .input {
  flex: 1 1 0;
}

.email {
  color: var(--ink);
  font-weight: 400;
}
/* Sessions, and a session: its score sheet and the forms for recording it. */

.open {
  display: flex;
  gap: var(--gap);
}

.open .input {
  flex: 1 1 0;
}

.title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: var(--control);
}

.buttons {
  display: flex;
  gap: var(--gap);
}

.traveller td,
.traveller th {
  padding-left: 4px;
  padding-right: 4px;
  white-space: nowrap;
}

.players td {
  padding-top: 10px;
  font-size: var(--small);
  font-weight: 550;
}

.imps[data-sign="1"] {
  color: var(--gain);
}

.imps[data-sign="-1"] {
  color: var(--loss);
}

.seating {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px var(--gap);
}

.seat-choice {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

/* Every row is one control high, so the whole form fits a phone screen. */
.form {
  display: grid;
  gap: var(--gap);
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.form .button {
  padding: 0;
  min-width: 0;
}

.board {
  display: grid;
  grid-template-columns: auto 36px 56px 36px 1fr;
  align-items: center;
  gap: 6px;
}

.count {
  text-align: center;
  -moz-appearance: textfield;
}

.count::-webkit-inner-spin-button {
  appearance: none;
}

.seats {
  display: flex;
  justify-content: space-between;
  gap: var(--gap);
  min-height: var(--control);
  align-items: center;
}



.play {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr);
  gap: 12px;
}

.declarer,
.doubling,
.result {
  display: grid;
  gap: 4px;
}

.declarer {
  grid-template-columns: repeat(4, 1fr);
}

.doubling {
  grid-template-columns: repeat(2, 1fr);
}

.result {
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
}

.made {
  text-align: center;
  font-weight: 650;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.features label {
  display: grid;
  grid-template-columns: auto minmax(52px, 1fr);
  align-items: center;
  gap: 6px;
}


.form .actions .button {
  padding: 0 12px;
}

.dealt {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dealt input {
  width: 56px;
}

/* Standings, sortable by any column. */

.filters {
  display: flex;
  gap: var(--gap);
}

.filters .input {
  flex: 1 1 0;
}

.sort {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

th[aria-sort="descending"] .sort {
  color: var(--ink);
}

.signed[data-sign="1"] {
  color: var(--gain);
}

.signed[data-sign="-1"] {
  color: var(--loss);
}

/* Narrower than other tables, so that names fit beside every column on a phone. */
.standings th,
.standings td {
  padding-right: 3px;
  padding-left: 3px;
}
/* A deal played here: seats, hands, the auction and bidding box, tricks, and
   the place under the table for what may be done. The whole page is .deal,
   apart from the .table of tables. Whatever changes while a deal is played
   keeps its room, so that nothing else moves. */

.heading {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
}

/* Back to the session: a bare arrow, the room of a control around it. */
.back {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: var(--control);
  margin-left: -8px;
  border-radius: var(--radius);
  color: var(--muted);
}

@media (hover: hover) {
  .back:hover {
    color: var(--ink);
  }
}

/* The board: the edges of a vulnerable side red, the dealer on their edge. */
.board-box {
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 4px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-variant-numeric: tabular-nums;
}

.board-box[data-ends="true"] {
  border-top-color: var(--red);
  border-bottom-color: var(--red);
}

.board-box[data-sides="true"] {
  border-left-color: var(--red);
  border-right-color: var(--red);
}

/* The dealer: a dot on the middle of their edge. */
.board-dealer {
  position: absolute;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: var(--small);
  line-height: 1;
}

.board-dealer[data-edge="top"] {
  top: -13px;
  left: calc(50% - 9px);
}

.board-dealer[data-edge="bottom"] {
  bottom: -13px;
  left: calc(50% - 9px);
}

.board-dealer[data-edge="left"] {
  left: -13px;
  top: calc(50% - 9px);
}

.board-dealer[data-edge="right"] {
  right: -13px;
  top: calc(50% - 9px);
}

/* At the end of the heading, on a ground of its own: the contract and the
   tricks each side has won, a toggle for the auction, or the result once
   the deal is over. */
.scoreboard,
.outcome {
  margin-left: auto;
  height: 48px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--surface);
  white-space: nowrap;
}

.scoreboard {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  cursor: pointer;
}

@media (hover: hover) {
  .scoreboard:hover {
    border-color: var(--line-strong);
  }
}

.scoreboard[aria-pressed="true"] {
  border-color: var(--ink);
}

.outcome {
  display: grid;
  align-content: center;
  text-align: right;
}

.contract-name {
  margin-right: 4px;
  font-size: var(--title);
  font-weight: 650;
}

.contract-by {
  margin-left: 5px;
  font-size: var(--text);
  font-weight: 400;
  color: var(--muted);
}

.won {
  display: grid;
  text-align: center;
  line-height: 1.25;
}

.won .side {
  font-size: var(--small);
  color: var(--muted);
}

.won .tricks {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* The whole table. While a move is on its way, its buttons step back, so
   that it shows at once and cannot be made twice. */
.deal {
  display: grid;
  gap: 16px;
}

.deal[data-busy="true"] button {
  opacity: 0.5;
  pointer-events: none;
}

/* The auction, the table and what may be done there, then the tricks once
   the deal is over: the table beside the auction and the tricks, where
   there is room. */
.play-layout,
.play-area {
  display: grid;
  gap: 16px;
  min-width: 0;
}

@media (min-width: 720px) {
  .play-layout[data-over="true"] {
    grid-template-areas:
      "table auction"
      "table tricks";
    grid-template-columns: 340px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 16px 24px;
  }

  .play-layout[data-over="true"] .play-area {
    grid-area: table;
  }

  .play-layout[data-over="true"] .play-auction {
    grid-area: auction;
  }

  .play-layout[data-over="true"] .play-tricks {
    grid-area: tricks;
  }
}

/* The auction keeps room for five rounds, so that the hand below stays put. */
.auction-room {
  min-height: 176px;
}

/* The table, seen from the viewer's seat at the bottom. */
.compass {
  display: grid;
  grid-template-areas:
    "north north north"
    "west center east"
    "south south south";
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px 8px;
}

/* Dummy's cards laid down at one side take the room the other can spare. */
.compass[data-laid="left"] {
  grid-template-columns: minmax(0, 1fr) auto fit-content(88px);
}

.compass[data-laid="right"] {
  grid-template-columns: fit-content(88px) auto minmax(0, 1fr);
}

/* Where there is room, the trick keeps the middle all the same. */
@media (min-width: 720px) {
  .compass[data-laid] {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
}

.north {
  grid-area: north;
}

.west {
  grid-area: west;
}

.center {
  grid-area: center;
  align-self: center;
  display: grid;
  place-items: center;
  width: 136px;
  height: 116px;
  border-radius: var(--radius);
  background: var(--surface);
}

.east {
  grid-area: east;
}

.south {
  grid-area: south;
}

.place {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-content: start;
  min-width: 0;
}

.north .place,
.south .place,
.own .place {
  justify-items: center;
}

.west .place {
  justify-items: start;
}

.east .place {
  justify-items: end;
}

/* A seat's label: its letter on a ground, red when vulnerable as on a board. */
.label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 24px;
  padding: 0 6px 0 2px;
  border-radius: var(--radius);
  font-size: var(--small);
  white-space: nowrap;
  overflow: hidden;
}

.letter {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 650;
  line-height: 1;
}

.label[data-vulnerable="true"] .letter {
  background: var(--red);
  color: var(--bg);
}

.player {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The seat to move: a dot for a player, a spinner for a bot thinking, in
   one room whichever it is, kept empty at the seats not to move. */
.turn {
  flex: none;
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--turn);
  background-clip: padding-box;
}

.turn[data-mover="none"] {
  visibility: hidden;
}

.turn[data-mover="bot"] {
  border-color: var(--line-strong);
  border-top-color: var(--ink);
  background: none;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@media (prefers-reduced-motion: reduce) {
  .turn[data-mover="bot"] {
    animation-duration: 4s;
  }
}

.auction .turn {
  margin-left: 6px;
  vertical-align: -1px;
}

/* A hand written: each rank in a cell of its own, eight to a row, and wider
   only for a longer suit; a suit too long for the screen goes on under its
   own ranks. Hands at the side of the table let their ranks take their own
   width. */
.hand {
  display: grid;
  max-width: 100%;
}

.hand[data-layout="fixed"] {
  width: max-content;
  min-width: 194px;
}

.suit {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  line-height: 22px;
}

.ranks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.rank {
  flex: none;
  width: 22px;
  text-align: center;
}

.rank[data-played="true"] {
  color: var(--line-strong);
}

.hand[data-layout="side"] .rank {
  width: auto;
  margin-right: 5px;
  text-align: left;
}

/* A hand out of sight, in the room of four rows of its kind. */
.unseen {
  height: 88px;
  padding-top: 2px;
}

/* A hand held: a row of cards, each over the one before and closer where
   room is short, a little apart where a suit ends. The row keeps room above
   for the cards that may be played, which stand up out of it. */
.held {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 360px;
  height: 80px;
  padding-top: 8px;
}

.unseen[data-layout="held"] {
  height: 80px;
  padding-top: 10px;
}

/* Laps wide enough that thirteen cards fill the row, as wide as the
   bidding box, and close up where the screen is narrower. */
.lap {
  flex: 0 1 28px;
  min-width: 12px;
}

.lap[data-last="true"] {
  flex-basis: 34px;
}

.lap:last-child {
  flex: none;
  width: 48px;
}

/* Dummy's cards at the side of the table: a row for each suit, each over
   the one before with its rank and suit still showing, in the room of four. */
.laid {
  width: 100%;
  height: 222px;
}

.unseen[data-layout="laid"] {
  height: 222px;
}

.laid .held {
  justify-content: flex-start;
  max-width: none;
  height: 72px;
  padding-top: 0;
}

.east .laid .held {
  justify-content: flex-end;
}

.laid .held + .held {
  margin-top: -22px;
}

/* A card: its rank over its suit, in the corner left showing. Cards on the
   table, held, laid down or in the trick, are all written in one size. */
.face {
  position: relative;
  display: flex;
  align-items: flex-start;
  width: 48px;
  height: 72px;
  padding: 4px 0 0 1px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: var(--title);
  font-weight: 600;
  line-height: 1.1;
}

.index {
  width: 24px;
  text-align: center;
}

/* The cards that may be played stand up; the others step back. */
button.face:not(:disabled) {
  top: -8px;
  cursor: pointer;
}

/* A press on the row picks a card, so it neither scrolls the page nor
   selects text. The card pressed lifts above the others, larger. */
.held[data-playing="true"] {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

button.face[data-lifted="true"] {
  z-index: 1;
  transform: translateY(-12px) scale(1.25);
  transform-origin: bottom center;
}

.held[data-playing="true"] button.face:disabled {
  background: var(--surface);
  color: var(--muted);
}

@media (hover: hover) {
  button.face:not(:disabled):hover {
    border-color: var(--ink);
  }
}

.auction {
  table-layout: fixed;
}

.auction td,
.auction th {
  padding: 2px 4px;
}

.auction th:first-child,
.auction td:first-child {
  padding-left: 0;
}

.auction td {
  height: 30px;
  border-bottom: 0;
}

.auction th {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-letter {
  font-weight: 650;
}

.auction .seat-letter:not(.red) {
  color: var(--ink);
}

.name {
  font-weight: 400;
}

/* Where the next call or card goes. */
.next,
.spot[data-next="true"] {
  border: 1px dashed var(--ink);
}

.next {
  display: inline-block;
  width: 40px;
  height: 24px;
  border-radius: var(--radius);
  vertical-align: middle;
}

/* The bidding box: a pad of keys on their own ground, no wider than a phone. */
.box {
  display: grid;
  gap: 4px;
  width: 100%;
  max-width: 360px;
  justify-self: center;
}

.box .button {
  padding: 0;
  min-width: 0;
}

.box .button:not([aria-pressed="true"]) {
  border-color: transparent;
  background: var(--surface);
}

.box .button:disabled {
  background: none;
}

@media (hover: hover) {
  .box .button:where(:hover:not(:disabled)) {
    background: var(--line);
  }
}

.levels,
.strains,
.calls {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.strains {
  grid-template-columns: repeat(5, 1fr);
}

.calls {
  grid-template-columns: 2fr 1fr 1fr;
}

/* A trick on the table: each card in a place of its own on its player's
   side, the cards across the table between those along it. */
.cross {
  display: grid;
  grid-template-areas:
    "top top"
    "left right"
    "bottom bottom";
  grid-template-columns: repeat(2, 56px);
  grid-template-rows: repeat(3, 34px);
  gap: 0 8px;
  place-items: center;
  font-size: var(--title);
  font-weight: 600;
}

.spot {
  display: grid;
  place-items: center;
  width: 56px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  white-space: nowrap;
}

.spot[data-lead="true"] {
  border-color: var(--line-strong);
}

.top {
  grid-area: top;
}

.left {
  grid-area: left;
}

.right {
  grid-area: right;
}

.bottom {
  grid-area: bottom;
}

/* A card played to a trick: boxed if led, underlined if it won. */
.played[data-won="true"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tricks .played {
  display: inline-block;
  margin-left: -4px;
  padding: 0 3px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 550;
}

.tricks .played[data-lead="true"] {
  border-color: var(--line-strong);
}

.double-dummy {
  display: grid;
  gap: var(--gap);
}

.solved td,
.solved th {
  padding-top: 3px;
  padding-bottom: 3px;
}

/* The tricks listed: columns of fixed width, numbers set as the cards are. */
.tricks {
  table-layout: fixed;
}

.trick-number {
  width: 32px;
}

.total {
  width: 40px;
}

.tricks td,
.tricks th {
  padding: 3px 4px;
  white-space: nowrap;
}

.tricks td:first-child,
.tricks th:first-child {
  padding-left: 0;
  padding-right: 12px;
}

.tricks tbody tr[data-selected="true"] td {
  background: var(--surface);
}

/* What a card cost double dummy: small, so as not to widen its column, and
   clear of the boxes either side. */
.cost {
  margin-left: 2px;
  font-size: 10px;
  line-height: 0;
  vertical-align: super;
  color: var(--loss);
}

.cost.gain {
  color: inherit;
}

/* Under the tricks: the claim, and the play against double dummy. */
.tricks tfoot td {
  border-bottom: 0;
}

.tricks tfoot .loss {
  color: var(--loss);
}

.tricks tfoot tr:last-child td {
  border-top: 1px solid var(--line-strong);
}

/* The place for what may be done now: a row of buttons. */
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap);
  min-height: var(--control);
}

/* What asks for attention there: a request waiting for an answer, or a
   problem with a move. */
.notice {
  display: grid;
  gap: var(--gap);
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.notice.error {
  border-color: var(--loss);
}

/* A value between a step back and a step on, as one control. */
.stepper {
  display: inline-flex;
  height: var(--control);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.stepper button {
  width: var(--control);
  border: 0;
  background: var(--bg);
  font-weight: 550;
  cursor: pointer;
}

.stepper button:disabled {
  color: var(--line-strong);
  cursor: default;
}

@media (hover: hover) {
  .stepper button:hover:not(:disabled) {
    background: var(--surface);
  }
}

.stepper output {
  display: grid;
  place-items: center;
  min-width: 40px;
  padding: 0 8px;
  border-inline: 1px solid var(--line-strong);
  font-weight: 650;
}

/* Buttons in a row, as forms elsewhere end. */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap);
}

/* Once the deal is over, a call is a button that opens a menu to annotate
   it, looking as the call does until pointed at or open. */
.annotated {
  position: relative;
  display: inline-block;
  margin-left: -4px;
}

.call-button {
  padding: 2px 4px;
  border: 0;
  border-radius: var(--radius);
  background: none;
  cursor: pointer;
}

.call-button[aria-expanded="true"] {
  background: var(--surface);
}

@media (hover: hover) {
  .call-button:hover {
    background: var(--surface);
  }
}

.mark {
  font-weight: 650;
}

/* The menu beside a call, centred on it: to the right of the two calls on
   the left, to the left of the two on the right. Each choice is its mark
   and its meaning, in two columns. */
.annotations {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: calc(100% + 4px);
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 8px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  transform: translateY(-50%);
}

.auction td:nth-child(n + 3) .annotations {
  left: auto;
  right: calc(100% + 4px);
}

.annotations button {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  padding: 4px 8px;
  border: 0;
  background: none;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

@media (hover: hover) {
  .annotations button:hover {
    background: var(--surface);
  }
}

.annotations button[aria-checked="true"] {
  background: var(--line);
}
