/* The strategy chart: three real tables and the coach's rail. */
.chart-area { margin-top: 30px; }
html:not(.js) .js-only, html:not(.js) .coachbox { display: none !important; }

html.js .nojs-only { display: none !important; }
.showing { font-size: 14px; color: var(--muted); margin-bottom: 18px; }

/* the sign: the table's rules, set like the placard by the chair, and their price */
.sign { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; margin-bottom: 26px; padding: 16px;
  border-radius: 18px; background: rgba(14, 22, 54, .92); border: 1px solid rgba(201, 162, 94, .22); }
@media (min-width: 640px) { .sign { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 18px 20px; } }
@media (min-width: 1000px) { .sign { grid-template-columns: auto auto auto auto auto minmax(0, 1fr); gap: 0 22px; align-items: end; } }
.sign fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.sign legend, .se-h { padding: 0; margin-bottom: 8px; font: 600 11px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brass); }
.seg { display: flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--hair); }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: block; min-width: 2.6em; padding: 9px 11px; border-radius: 999px; text-align: center; font: 650 14px/1 var(--sans);
  color: var(--soft); white-space: nowrap; transition: background .15s ease, color .15s ease; pointer-events: none; }
.seg label:hover span { color: var(--cream); }
.seg input:checked + span { background: var(--brass); color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--brass-lt); outline-offset: 2px; }
.sign-edge { min-width: 0; }
@media (min-width: 1000px) { .sign-edge { text-align: right; } }
.se-n { font: 700 30px/1 var(--serif); color: var(--cream); font-variant-numeric: tabular-nums; }
.se-alt { margin-top: 5px; font-size: 13px; line-height: 1.2; color: var(--muted); font-variant-numeric: tabular-nums; }
.se-h { margin-bottom: 5px; }
.legend li[hidden] { display: none; }
table.chart td.moved { animation: moved .9s ease-out; }
@keyframes moved { 0% { box-shadow: 0 0 0 2px var(--navy), 0 0 0 4px var(--brass-lt); filter: brightness(1.25); } 100% { box-shadow: 0 0 0 2px transparent, 0 0 0 4px transparent; filter: none; } }
@media (prefers-reduced-motion: reduce) { .seg span { transition: none; } }
.showing b { color: var(--cream); }
.other-table { font-size: 14.5px; color: var(--muted); margin-top: -8px; }

.chart-grid { display: grid; gap: 28px; }
@media (min-width: 1000px) { .chart-grid { grid-template-columns: minmax(0, 1fr) 330px; gap: 36px; align-items: start; } }
.tables { display: grid; gap: 30px; min-width: 0; }

.legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13.5px; color: var(--soft); }
.legend li { display: flex; align-items: center; gap: 7px; }
.legend i { font: normal 700 12px/1 var(--sans); width: 28px; height: 22px; display: grid; place-items: center; border-radius: 5px; }
.hint { font-size: 14px; color: var(--brass-lt); margin-top: -12px; }

table.chart { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 2px; font: 700 14px/1 var(--sans); }
table.chart caption { padding-left: 2px; }
table.chart thead th { font: 700 13px/1 var(--sans); color: var(--brass-lt); height: 30px; }
table.chart th.corner { width: 3.6em; font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; }
table.chart tbody th { vertical-align: middle; text-align: left; padding-left: 4px; font: 700 13.5px/1 var(--sans); color: var(--cream); white-space: nowrap; }
table.chart td { height: 36px; text-align: center; border-radius: 6px; position: relative; letter-spacing: -.01em; }
@media (min-width: 700px) { table.chart td { height: 38px; font-size: 15px; } table.chart th.corner { width: 4.4em; } }
.a-hit { background: #e8dec9; color: var(--ink); }
.a-stand { background: var(--brass); color: var(--ink); }
.a-dbl { background: var(--felt-hi); color: var(--cream); }
.a-split { background: #34519a; color: var(--cream); }
.a-sur { background: #8c2b39; color: var(--cream); }
html.js table.chart td { cursor: pointer; transition: filter .12s ease; }
html.js table.chart td:hover { filter: brightness(1.1); }
table.chart td:focus-visible { outline: 2px solid var(--cream); outline-offset: 1px; }
table.chart td[data-sel] { box-shadow: 0 0 0 2px var(--navy), 0 0 0 4px var(--cream); z-index: 1; }
table.chart tr.on th, table.chart th.on { color: var(--brass-lt); }

/* the coach: a sticky aside on wide screens, a rail docked over the page on phones */
.coachbox { position: relative; padding: 18px 18px 18px; border-radius: 20px; background: rgba(14, 22, 54, .92); border: 1px solid rgba(201, 162, 94, .22); }
@media (min-width: 1000px) { .coachbox { position: sticky; top: 92px; } }
.cb-hand { font: 600 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brass); padding-right: 28px; }
.coachbox .rail { margin-top: 14px; --tab: 52px; }
.coachbox .rail p { font-size: 16.5px; }
.cb-more { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.cb-close { display: none; position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06);
  color: var(--cream); font: 400 24px/1 var(--sans); cursor: pointer; }
@media (max-width: 999px) {
  html.js .coachbox { display: none; }
  html.js .coachbox.docked { display: block; position: fixed; z-index: 60; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom));
    max-width: 34rem; margin: 0 auto; padding: 14px 14px 14px; background: rgba(10, 16, 40, .96);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 14px 40px rgba(0, 0, 0, .55); }
  .coachbox.docked .cb-close { display: block; }
  .coachbox.docked .rail { margin-top: 12px; }
  .coachbox.docked .rail p { font-size: 15.5px; }
  .coachbox.docked .cb-more { font-size: 13.5px; }
  body.cb-room { padding-bottom: 240px; }
}

/* the variants and the dealer table */
.prose ul.variants li + li { margin-top: 10px; }
table.bust { border-collapse: collapse; font: 600 14px/1 var(--sans); min-width: 560px; width: 100%; }
table.bust th, table.bust td { padding: 10px 6px; text-align: center; border-top: 1px solid var(--hair); }
table.bust thead th { color: var(--brass-lt); border-top: 0; }
table.bust th[scope="row"], table.bust thead th:first-child { text-align: left; color: var(--cream); white-space: nowrap; padding-left: 0; }
table.bust td { color: var(--cream); }

@media print {
  .chart-grid { display: block; }
  .sign { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.chart td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.chart caption, table.chart th { color: #000 !important; }
}
@media (min-width: 1000px) { .hint { display: none; } }
