:root {
  --bg: #F5F2EB;
  --surface: #FFFFFF;
  --surface-2: #FAF8F3;
  --ink: #1F1D1A;
  --ink-2: #5B574F;
  --ink-3: #6E6A62; /* 4.5:1+ on cream and white (WCAG AA small text) */
  --line: rgba(31, 29, 26, .10);
  --line-2: rgba(31, 29, 26, .22);
  --accent: #C8402F;
  --good: #277953; /* 4.5:1+ on cream and white */
  --bad: #C2553B;
  --felt: #1B5240;
  --felt-hi: #2E7A5E;
  --felt-ink: #E9D8A6;
  --card: #FFFDF8;
  --suit-red: #C8402F;
  --card-back: #9E2B25;
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --ad-gap: 150px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font-ui);
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
kbd { font: 500 11px var(--font-ui); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); }

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px var(--gutter);
  max-width: 1440px;
  margin: 0 auto;
}
/* Logo C: "Str", a tilted ace of spades for the "a", "tegle". */
.logo {
  display: inline-flex;
  align-items: center;
  font: 600 26px/1 var(--font-display);
  letter-spacing: -.01em;
  text-decoration: none;
}
.logo-ace {
  display: inline-grid;
  align-content: start;
  justify-items: start;
  width: 18px; height: 25px;
  margin: 0 1px 0 2px;
  padding: 2px 0 0 3px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--card);
  transform: rotate(-8deg) translateY(-1px);
  box-shadow: 0 2px 4px rgba(31, 29, 26, .18);
}
.logo-ace b { font: 700 8px/1 var(--font-ui); }
.logo-ace svg { width: 10px; height: 10px; margin: 1px 0 0 1px; color: var(--ink); }
/* Back to the Everythingle hub: its "le" tile, the same as the site icon. */
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-text { min-width: 0; }
.hub-link { flex: none; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-3); text-decoration: none; }
.hub-back { width: 8px; height: 14px; transition: transform .15s; }
.hub-tile {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  padding-bottom: 3px;
  border-radius: 8px;
  background: #2AA0B0;
  color: #fff;
  font: 600 19px/1 var(--font-display);
  letter-spacing: -.03em;
  transition: background .15s;
}
.hub-link:hover { color: var(--ink); }
.hub-link:hover .hub-back { transform: translateX(-2px); }
.hub-link:hover .hub-tile { background: #23899A; }
.hub-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.issue { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; flex: none; align-items: center; gap: 16px; font-size: 13px; }
.nav a, .nav button { background: none; border: 0; padding: 4px 0; text-decoration: none; color: var(--ink); }
.nav a:hover, .nav button:hover { text-decoration: underline; text-underline-offset: 3px; }
.nav-help i {
  display: none;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-2);
  font-style: normal; line-height: 24px; text-align: center;
}
.coffee-top { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); }
@media (max-width: 520px) {
  .nav { gap: 12px; }
  .brand { gap: 10px; }
  .issue { font-size: 10px; letter-spacing: .1em; }
  .issue-arch { display: none; }
  .nav-archive { display: none; } /* Archive stays on the results screen and in the footer */
  .nav-help span { display: none; }
  .nav-help i { display: inline-block; }
}

/* Ad spots: fixed size per screen width so the page never jumps */
.ad-band { display: flex; justify-content: center; padding: 8px var(--gutter); }
.ad-band--top { margin-bottom: 8px; }
.ad-band--bottom { margin: 40px 0; }
.ad-slot { flex: none; position: relative; max-width: 100%; }
.ad-slot ins { display: block; width: 100%; height: 100%; }
.ad-slot.is-placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  background: rgba(31, 29, 26, .035);
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ad-slot.is-placeholder::after { content: "Ad · " var(--ad-label); }

.ad-slot[data-spot="top"] { width: 320px; height: 100px; --ad-label: "320 × 100"; }
.ad-slot[data-spot="bottom"] { width: 300px; height: 250px; --ad-label: "300 × 250"; }
.ad-slot--inline { width: 300px; height: 250px; --ad-label: "300 × 250"; }
.ad-slot--rail { width: 160px; height: 600px; --ad-label: "160 × 600"; }
@media (min-width: 768px) {
  .ad-slot[data-spot="top"], .ad-slot[data-spot="bottom"] { width: 728px; height: 90px; --ad-label: "728 × 90"; }
}
@media (min-width: 1280px) {
  .ad-slot[data-spot="top"] { width: 970px; height: 90px; --ad-label: "970 × 90"; }
}
@media (min-width: 1440px) {
  .ad-slot--rail { width: 300px; --ad-label: "300 × 600"; }
}
.ad-inline { display: flex; justify-content: center; padding: 0 var(--gutter); margin: 24px 0 8px; }
/* Live site: a spot without an AdSense id is hidden instead of leaving a gap (js/ads.js). */
.no-ad-top .ad-band--top, .no-ad-bottom .ad-band--bottom, .no-ad-middle .rail, .no-ad-middle .ad-inline { display: none; }
@media (min-width: 1280px) { .no-ad-middle .stage { display: block; } }

/* Stage: rail + game */
.stage { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.rail { display: none; }
@media (min-width: 1280px) {
  .stage { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--ad-gap); align-items: start; padding: 0 24px; }
  .rail { display: block; position: sticky; top: 24px; }
  .ad-inline { display: none; }
}

.game { min-width: 0; }
.status {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  min-height: 40px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-2);
}
.dots { display: flex; gap: 8px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.dots i.current { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 29, 26, .12); }
.dots i.right { background: var(--good); border-color: var(--good); }
.dots i.wrong { background: var(--bad); border-color: var(--bad); }
.status .today b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }

.ghost-title {
  margin: 4px 0 22px;
  text-align: center;
  font: 400 clamp(44px, 8.4vw, 120px)/1 var(--font-display);
  letter-spacing: -.02em;
  color: rgba(31, 29, 26, .07);
  user-select: none;
}
@media (max-width: 767px) {
  .ad-band--top { margin-bottom: 0; }
  .status { margin-top: 26px; }
  .ghost-title { font-size: 40px; margin: 10px 0 28px; }
}
/* Phones: the dots already say which hand this is, so the table goes straight to the felt
   and the move buttons stay in the first screen. */
@media (max-width: 559px) {
  .panel .panel-head--table { display: none; }
  .table-grid .felt { margin-top: 0; }
}

.play { display: grid; grid-template-columns: minmax(0, 520px); justify-content: center; }

/* Panel */
.panel {
  width: 100%;
  background: var(--surface);
  border-radius: 22px;
  padding: 16px 16px 18px;
  box-shadow: 0 1px 2px rgba(31, 29, 26, .05), 0 24px 48px -28px rgba(31, 29, 26, .35);
}
.panel-loading { margin: 0; color: var(--ink-3); font-size: 14px; }
.panel-head { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }

/* The felt table */
.felt {
  position: relative;
  margin-top: 12px;
  padding: 12px 12px 12px;
  border-radius: 18px;
  background: radial-gradient(120% 90% at 50% 35%, var(--felt-hi), var(--felt) 72%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), inset 0 3px 20px rgba(0, 0, 0, .28);
  display: grid;
  justify-items: center;
  overflow: hidden;
}
.felt::before {
  content: "";
  position: absolute; inset: 7px;
  border: 1px solid rgba(233, 216, 166, .22);
  border-radius: 13px;
  pointer-events: none;
}
.seat { display: grid; justify-items: center; gap: 6px; }
.seat--dealer .seat-label { position: absolute; top: 16px; left: 18px; }
.seat-label {
  margin: 0;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
}
.seat-label b {
  margin-left: 4px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font: 600 13px/1 var(--font-ui); letter-spacing: .02em; text-transform: none;
  color: #fff;
}
.seat--you { margin-top: -4px; }
.felt-rules { width: 100%; max-width: 380px; height: auto; margin: -4px 0 -2px; overflow: visible; }
.felt-rules text { font: 700 12px var(--font-ui); letter-spacing: .22em; fill: var(--felt-ink); fill-opacity: .7; }

.hand { display: flex; padding: 2px 0; }
.card {
  --w: 62px;
  position: relative;
  width: var(--w);
  aspect-ratio: 5 / 7;
  border-radius: 9px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .1), 0 8px 16px -6px rgba(0, 0, 0, .55);
  display: grid;
  place-items: center;
}
.hand .card + .card { margin-left: -16px; }
.seat--you .card:first-child { transform: rotate(-4deg); }
.seat--you .card:last-child { transform: rotate(4deg) translateY(3px); }
.seat--dealer .card:first-child { transform: rotate(-2deg); z-index: 1; }
.seat--dealer .card:last-child { transform: rotate(3deg) translateY(2px); }
.card.red { color: var(--suit-red); }
.c-corner { position: absolute; top: 6px; left: 7px; display: grid; justify-items: center; gap: 2px; line-height: 1; }
.c-corner b { font: 600 calc(var(--w) * .26)/.9 var(--font-display); letter-spacing: -.04em; }
.c-corner svg { width: calc(var(--w) * .15); height: calc(var(--w) * .15); }
.c-corner--br { top: auto; left: auto; bottom: 6px; right: 7px; transform: rotate(180deg); }
.c-center { display: grid; place-items: center; }
.c-center svg { width: calc(var(--w) * .44); height: calc(var(--w) * .44); }
.c-face b { font: italic 600 calc(var(--w) * .52)/1 var(--font-display); }
.card.back {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .16) 0 1.5px, transparent 1.5px 8px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .16) 0 1.5px, transparent 1.5px 8px),
    var(--card-back);
  border: 4px solid var(--card);
}
.card.deal { animation: deal .5s cubic-bezier(.2, .8, .25, 1) both; animation-delay: calc(var(--i) * 120ms); }
@keyframes deal { from { opacity: 0; transform: translate(60px, -80px) rotate(18deg); } }
@media (prefers-reduced-motion: reduce) { .card.deal { animation: none; } }
@media (min-width: 400px) {
  .card { --w: 68px; }
}
@media (min-width: 560px) {
  .card { --w: 88px; }
  .felt { padding: 16px 16px 18px; }
}

/* The four moves */
.moves { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.move {
  position: relative;
  height: 54px;
  border-radius: 14px;
  border: 1.5px solid color-mix(in srgb, var(--c) 55%, #fff);
  background: color-mix(in srgb, var(--c) 10%, #fff);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 40%, #fff);
  color: color-mix(in srgb, var(--c) 58%, #000);
  display: grid; place-items: center; align-content: center; gap: 3px;
  font: 600 15px/1 var(--font-ui);
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease, opacity .2s ease;
}
.move kbd { border: 0; background: none; padding: 0; font-size: 10px; letter-spacing: .1em; color: inherit; opacity: .55; }
.move:hover:not(:disabled) { background: color-mix(in srgb, var(--c) 20%, #fff); }
.move:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
.move:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.move:disabled { cursor: default; opacity: .32; }
.moves.locked .move:disabled { opacity: .32; }
.moves.locked .move.right, .moves.locked .move.picked { opacity: 1; }
.move.right { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 70%, #000); }
.move.wrong { background: #fff; border-style: dashed; text-decoration: line-through; text-decoration-thickness: 2px; }
.mark {
  position: absolute; top: -8px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 12px/1 var(--font-ui); font-style: normal; color: #fff;
  background: var(--good); box-shadow: 0 0 0 2px var(--surface);
  text-decoration: none;
}
.move.wrong .mark { background: var(--bad); }
.moves.locked kbd { display: none; }
@media (pointer: coarse) { .move kbd { display: none; } }
.table-note { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--ink-3); }

/* Wide screens: the moves sit beside the felt so they stay above the fold. */
.panel.is-done { max-width: 480px; margin: 0 auto; }
@media (min-width: 900px) {
  .play { grid-template-columns: minmax(0, 700px); }
  .table-grid { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 18px; align-items: start; margin-top: 12px; }
  .table-grid .felt { margin-top: 0; }
  .side .moves { grid-template-columns: 1fr; margin-top: 0; }
  .side .move { grid-auto-flow: column; justify-content: space-between; padding: 0 16px; height: 54px; font-size: 16px; }
  .side .mark { top: 50%; right: auto; left: -11px; transform: translateY(-50%); }
  .side .verdict { margin: 14px 0 12px; }
  .side .verdict-head { font-size: 18px; }
  .side .table-note { text-align: left; line-height: 1.9; }
  .side .moves.locked { grid-template-columns: 1fr 1fr; }
  .side .moves.locked .move { height: 42px; padding: 0 10px; justify-content: center; font-size: 14px; }
  .side .moves.locked .mark { left: auto; right: -7px; top: -7px; transform: none; width: 20px; height: 20px; font-size: 11px; }
  .ghost-title { font-size: clamp(44px, 6vw, 80px); margin: 2px 0 16px; }
}
/* Without the rail the headline is smaller, so it gets more room to keep the top ad 150px away. */
@media (min-width: 768px) and (max-width: 1279px) {
  .ghost-title { margin-bottom: 28px; }
}

.verdict { margin: 16px 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border-left: 4px solid var(--good); }
.verdict.bad { border-left-color: var(--bad); }
.verdict-head { margin: 0; font: 400 20px/1.25 var(--font-display); }
.verdict-head b { font-weight: 600; }
.verdict.ok .verdict-head b { color: var(--good); }
.verdict.bad .verdict-head b { color: var(--bad); }
.why { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.verdict .report { display: inline-block; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); text-underline-offset: 3px; }
.verdict .report:hover { color: var(--ink); }

.btn-primary {
  height: 48px; padding: 0 20px;
  border: 0; border-radius: 12px;
  background: var(--ink); color: #fff;
  font: 600 15px var(--font-ui);
}
.btn-primary:hover { background: #33302b; }
.btn-primary.wide { width: 100%; }
.btn-secondary {
  display: grid; place-items: center;
  height: 46px; margin-top: 10px; padding: 0 20px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--surface); color: var(--ink);
  font: 600 15px var(--font-ui); text-decoration: none;
}
.btn-secondary.wide { width: 100%; }
.btn-secondary:hover { border-color: var(--ink); }
/* The daily results' way into unlimited play: the strongest button on the screen, in felt green. */
.btn-unlimited {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 10px; padding: 12px 18px;
  border-radius: 12px;
  background: radial-gradient(140% 120% at 20% 0%, var(--felt-hi), var(--felt) 70%);
  color: #fff; text-decoration: none;
  box-shadow: 0 6px 16px -8px rgba(27, 82, 64, .8);
  transition: transform .15s, box-shadow .15s;
}
.btn-unlimited span { display: grid; gap: 1px; }
.btn-unlimited b { font: 600 16px var(--font-ui); }
.btn-unlimited small { font-size: 13px; color: var(--felt-ink); }
.btn-unlimited i { font-style: normal; font-size: 20px; transition: transform .15s; }
.btn-unlimited:hover { box-shadow: 0 8px 20px -8px rgba(27, 82, 64, .9); }
.btn-unlimited:hover i { transform: translateX(3px); }
.linkish { border: 0; background: none; padding: 4px 0; color: var(--ink-3); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* Results */
.total { margin: 14px 0 0; display: flex; align-items: baseline; gap: 8px; }
.total strong { font: 600 56px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.total span { color: var(--ink-3); font-size: 15px; }
.total-line { margin: 6px 0 0; font: italic 400 17px/1.4 var(--font-display); color: var(--ink-2); }
.results { list-style: none; margin: 14px 0 16px; padding: 0; }
.results li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.results li:last-child { border-bottom: 0; }
.results .dot { width: 12px; height: 12px; border-radius: 50%; }
.results .dot.right { background: var(--good); }
.results .dot.wrong { background: var(--bad); }
.r-main { display: grid; gap: 3px; }
.r-cards { display: flex; align-items: center; flex-wrap: wrap; }
.r-cards i { font: italic 14px var(--font-display); color: var(--ink-3); margin: 0 7px 0 3px; }
.mc {
  display: inline-flex; align-items: center; gap: 1px;
  padding: 2px 5px; margin-right: 3px;
  border-radius: 5px; border: 1px solid var(--line-2); background: var(--card);
  font: 600 13px/1.2 var(--font-ui); color: var(--ink);
}
.mc svg { width: 11px; height: 11px; }
.mc.red { color: var(--suit-red); }
.r-meta { font-size: 12px; color: var(--ink-3); }
.r-move { text-align: right; font-weight: 600; font-size: 15px; color: color-mix(in srgb, var(--c) 62%, #000); }
.r-move small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-3); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 0; text-align: center; }
.mini-stats div { padding: 10px 4px; border-radius: 12px; background: var(--surface-2); }
.mini-stats b { display: block; font: 600 20px var(--font-ui); }
.mini-stats span { font-size: 11px; color: var(--ink-3); letter-spacing: .06em; }
.next-in { margin: 16px 0 0; text-align: center; font-size: 13px; color: var(--ink-2); }
.next-in b { font-variant-numeric: tabular-nums; color: var(--ink); }
.coffee-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 14px; padding: 11px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--move-D, #E3A33A) 18%, #fff);
  text-decoration: none; font-weight: 500; font-size: 14px;
}
.panel-links { display: flex; justify-content: center; gap: 18px; margin-top: 14px; font-size: 13px; }
.panel-links a { color: var(--ink-2); }
.notice { margin: 14px 0 0; font-size: 15px; color: var(--ink-2); }

/* Text sections between game and lower ads */
.about { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter); color: var(--ink-2); font-size: 15px; }
.about:first-of-type { margin-top: 96px; }
.about h2 { font: 400 24px/1.25 var(--font-display); color: var(--ink); margin: 0 0 8px; }
.about--scoring { margin-top: 40px; }
.about ul { margin: 0; padding-left: 20px; }
.credits { font-size: 12px; color: var(--ink-3); }
@media (min-width: 1280px) {
  .about:first-of-type { margin-top: 120px; }
}

.footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; padding: 0 var(--gutter) 40px; font-size: 13px; color: var(--ink-3); }
.footer a { color: var(--ink-2); }

/* Dialogs and toast */
.dialog {
  width: min(460px, calc(100vw - 32px));
  border: 0; border-radius: 22px; padding: 26px 24px 22px;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px -30px rgba(31, 29, 26, .5);
}
.dialog::backdrop { background: rgba(245, 242, 235, .72); backdrop-filter: blur(4px); }
.dialog h2 { font: 400 34px/1.1 var(--font-display); margin: 4px 0 14px; }
.dialog p, .dialog li { font-size: 15px; color: var(--ink-2); }
.dialog ul { padding-left: 20px; }
.dialog strong { color: var(--ink); }
.dialog .btn-primary { margin-top: 8px; }
.help-moves { list-style: none; padding: 0 !important; display: grid; gap: 6px; margin: 0 0 14px; }
.help-moves li { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 10px; }
.help-moves b {
  padding: 5px 0; border-radius: 9px; text-align: center;
  background: color-mix(in srgb, var(--c) 12%, #fff);
  border: 1.5px solid color-mix(in srgb, var(--c) 55%, #fff);
  color: color-mix(in srgb, var(--c) 58%, #000);
  font-size: 14px;
}
.eyebrow { margin: 0; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3); }
.dialog-close { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; font-size: 22px; color: var(--ink-3); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; margin-bottom: 18px; }
.stat-grid b { display: block; font: 600 24px var(--font-ui); }
.stat-grid span { font-size: 11px; color: var(--ink-3); }
.hist { display: grid; gap: 6px; }
.hist div { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 12px; color: var(--ink-3); }
.hist i { display: block; height: 20px; min-width: 22px; border-radius: 6px; background: var(--ink-3); color: #fff; font-style: normal; font-size: 11px; line-height: 20px; padding: 0 7px; text-align: right; font-weight: 600; }
.hist i.top { background: var(--good); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 20;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Archive page */
.archive { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter); }
.archive h1 { font: 400 clamp(36px, 7vw, 56px)/1.05 var(--font-display); margin: 24px 0 6px; }
.archive > p { color: var(--ink-2); margin: 0 0 24px; }
.arch-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 22px; box-shadow: 0 1px 2px rgba(31, 29, 26, .05), 0 24px 48px -28px rgba(31, 29, 26, .35); }
.arch-list a { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px 20px; text-decoration: none; border-bottom: 1px solid var(--line); }
.arch-list li:last-child a { border-bottom: 0; }
.arch-list a:hover { background: var(--surface-2); }
.arch-no { font: 600 18px var(--font-display); }
.arch-date { color: var(--ink-2); font-size: 14px; }
.arch-date small { display: block; color: var(--ink-3); font-size: 12px; }
.arch-score { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.arch-score.todo { color: var(--accent); font-weight: 500; }

/* Privacy and 404 pages */
.legal { max-width: 680px; margin: 24px auto 64px; padding: 0 var(--gutter); color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.legal h1 { font: 400 clamp(34px, 6vw, 48px)/1.1 var(--font-display); color: var(--ink); margin: 0 0 6px; }
.legal h2 { font: 600 19px/1.3 var(--font-ui); color: var(--ink); margin: 32px 0 8px; }
.legal-updated { font-size: 13px; color: var(--ink-3); margin: 0 0 24px; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--felt); }

/* "Also today": links to the site's other games on the results screen */
.also:empty { display: none; }
.also { margin-top: 16px; }
.also-head { margin: 0 0 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.also-card {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--ink); text-decoration: none;
}
.also-card + .also-card { margin-top: 8px; }
.also-card:hover { border-color: var(--ink-3); background: #fff; }
.also-card img { display: block; width: 40px; height: 40px; }
.also-text b { display: block; font: 600 18px/1.2 var(--font-display); }
.also-text small { display: block; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.also-go { font-weight: 600; font-size: 14px; white-space: nowrap; }
.also-go.done { color: var(--good); }
.also-all { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--ink-2); }

/* Read by screen readers only (the live region that announces hands and verdicts) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Unlimited hands: which kind of hand to deal, and hands coming back after a miss */
.focus { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(31, 29, 26, .06); }
.focus button { border: 0; background: none; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.focus button:hover { color: var(--ink); }
.focus button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(31, 29, 26, .16); }
.table-note .again { color: var(--ink); font-weight: 600; }
.results.misses { margin: 0; }
.results.misses li { grid-template-columns: minmax(0, 1fr) auto; }
.results.misses .r-cards { font-weight: 600; font-size: 14px; }
@media (max-width: 400px) {
  .focus button { padding: 5px 9px; }
}

/* Strategy chart page (chart.html); tables written by tools/build_puzzles.py */
.chart-page h2 { margin-top: 36px; }
.chart-lede { font-size: 17px; color: var(--ink-2); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 18px 0 0; font-size: 14px; color: var(--ink-2); }
.chart-legend li { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend span { display: inline-grid; place-items: center; width: 26px; height: 24px; border-radius: 5px; font: 700 12px var(--font-ui); position: relative; }
.chart-legend .m-key { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); }
.chart-wrap { overflow-x: auto; margin: 22px 0 6px; }
.chart { border-collapse: separate; border-spacing: 2px; margin: 0; font: 700 13px/1 var(--font-ui); }
.chart caption { text-align: left; font: 600 17px var(--font-ui); color: var(--ink); padding: 0 0 10px; }
.chart th { font-weight: 600; color: var(--ink-2); font-size: 12.5px; padding: 5px 3px; }
.chart .chart-dealer { font-weight: 500; color: var(--ink-3); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; padding-bottom: 0; }
.chart .chart-you { text-align: right; padding-right: 9px; font-weight: 500; color: var(--ink-3); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }
.chart tbody th { text-align: right; padding-right: 9px; white-space: nowrap; }
.chart tbody th, .chart .chart-you { width: 84px; } /* same label column in all three tables, so the columns line up */
.chart td { width: 32px; height: 30px; text-align: center; border-radius: 5px; position: relative; }
.m-H { background: color-mix(in srgb, #2AA0B0 22%, #fff); color: #14606B; }
.m-S { background: color-mix(in srgb, #6670D4 24%, #fff); color: #363C8C; }
.m-D { background: color-mix(in srgb, #E3A33A 34%, #fff); color: #6E470B; }
.m-P { background: color-mix(in srgb, #D262A0 24%, #fff); color: #842858; }
.rd::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.chart-cta { margin-top: 28px; font-weight: 600; }
@media (max-width: 420px) {
  .chart { border-spacing: 1.5px; font-size: 12px; }
  .chart td { width: 25px; height: 26px; }
  .chart tbody th { padding-right: 6px; font-size: 12px; }
  .chart tbody th, .chart .chart-you { width: 66px; }
  .chart .chart-you { padding-right: 6px; }
}
