/* The marketing pages' own layout: type, the blog, tables, the tools. Needs app.css and nav.css first. */

/* ── base ──────────────────────────────────────────────────────── */

html, body { height: auto; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 18px/1.62 var(--font-text); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
main { padding: clamp(36px, 7vw, 84px) 0 clamp(48px, 8vw, 96px); }
main > .wrap > :not(.wide):not(.rig):not(.panel):not(.lead-grid):not(.shots) { max-width: 40rem; }
main > .wrap > .rig { max-width: 56rem; }
main > .wrap > .panel { max-width: 40rem; }
main > .wrap > .lead-grid, main > .wrap > .shots { max-width: 60rem; }

h1 { font: 700 clamp(34px, 6.4vw, 60px)/1 var(--font-display); letter-spacing: -.045em; margin: 0 0 22px; text-wrap: balance; }
h2 { font: 700 clamp(26px, 3.6vw, 36px)/1.08 var(--font-display); letter-spacing: -.035em; margin: clamp(44px, 6vw, 68px) 0 14px; text-wrap: balance; }
h3 { font: 700 20px/1.25 var(--font-display); letter-spacing: -.02em; margin: 28px 0 6px; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 18px; padding-left: 1.3em; }
li { margin: 0 0 8px; padding-left: 4px; }
.meta { color: var(--ink-3); font-size: 14px; margin: -6px 0 22px; }
.note { color: var(--ink-3); font-size: 13px; margin: -8px 0 22px; }
.more { margin: 44px 0 0; font-size: 16px; }
.crumbs { margin: 0 0 18px; font-size: 14px; color: var(--ink-3); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { padding: 0 6px; }

/* ── the App Store call to action ──────────────────────────────── */
.cta { margin: 28px 0 8px; }
.cta p { margin: 12px 0 0; color: var(--ink-3); font-size: 14px; line-height: 1.45; }
.cta p.lead { font: 700 20px/1.3 var(--font-display); letter-spacing: -.02em; margin: 0 0 14px; color: var(--ink); }
.store { display: inline-block; line-height: 0; text-decoration: none; }
.store img { display: block; height: 48px; width: auto; }
.store:hover { transform: translateY(-1px); }

/* ── blog index ────────────────────────────────────────────────── */

.entries article { padding: 22px 0; border-bottom: 1px solid var(--line-2); }
.entries article:first-child { border-top: 1px solid var(--line-2); }
.entries h2 { font-size: clamp(22px, 3vw, 28px); margin: 0 0 8px; }
.entries h2 a { text-decoration: none; }
.entries h2 a:hover { text-decoration: underline; }
.entries p { margin: 0 0 6px; }
.entries .meta { margin: 6px 0 0; }

/* ── tables ────────────────────────────────────────────────────── */

table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line-2); }
table.facts { border-top: 1px solid var(--line-2); }
table.facts th { width: 9.5em; font-weight: 600; color: var(--ink-2); }
.wide { max-width: 1080px; overflow-x: auto; margin: 6px 0 18px; }
table.compare { min-width: 860px; font-size: 15px; }
table.compare thead th { border-bottom: 1px solid var(--ink); font: 600 13px/1.3 var(--font-text); color: var(--ink-2); }
table.compare td:first-child { font-weight: 600; }
.faq { display: grid; gap: 10px; margin: 14px 0 8px; }
.faq .qa { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--ring-strong); padding: 18px 20px 20px; }
.faq .qa h3 { margin: 0 0 8px; font: 700 18px/1.3 var(--font-display); letter-spacing: -.01em; }
.faq .qa p { margin: 0; color: var(--ink-2); }
caption { caption-side: bottom; text-align: left; padding-top: 10px; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.wide { margin: 8px 0 22px; }
table.nums { min-width: 0; font-size: 14.5px; font-variant-numeric: tabular-nums; width: 100%; }
table.nums th, table.nums td { padding: 9px 6px; text-align: right; }
table.nums th:first-child, table.nums td:first-child { text-align: left; padding-left: 0; font-weight: 600; }
table.nums thead th { font: 600 12.5px/1.25 var(--font-text); color: var(--ink-2); vertical-align: bottom; }
table.nums thead tr:first-child th { text-align: center; border-bottom: 1px solid var(--ink); padding-bottom: 6px; }
table.nums tr.hit td, table.nums tr.hit th { background: var(--surface-3); }
table.nums td.err { color: var(--ink-3); }
table.nums td.err.hi { color: var(--accent); font-weight: 600; }

/* ── footer ────────────────────────────────────────────────────── */

footer { border-top: 1px solid var(--line-2); padding: 28px 0 48px; color: var(--ink-3); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .wide { overflow: visible; }
  table.compare { min-width: 0; }
  table.compare thead { display: none; }
  table.compare, table.compare tbody, table.compare tr, table.compare td { display: block; width: 100%; }
  table.compare tr { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
  table.compare td { border: 0; padding: 3px 0; }
  table.compare td::before { content: attr(data-label); display: block; font: 600 12px/1.3 var(--font-text); color: var(--ink-3); margin-top: 6px; }
  table.compare td:first-child { font-size: 18px; }
  table.compare td:first-child::before { display: none; }
  table.facts th, table.facts td { display: block; width: 100%; border: 0; padding: 0; }
  table.facts th { padding-top: 12px; font-size: 13px; }
  table.facts td { padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
  table.nums { font-size: 13px; }
  table.nums th, table.nums td { padding: 8px 3px; }
}

/* ── tools: the instrument ─────────────────────────────────────── */

.rig { margin: 28px 0 8px; display: grid; gap: 28px; padding: 24px 20px 22px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--ring-strong), var(--lift); grid-template-areas: "answer" "controls"; }
.rig .answer { grid-area: answer; min-width: 0; }
.rig .controls { grid-area: controls; min-width: 0; display: grid; gap: 18px; align-content: start; }
@media (min-width: 880px) {
  .rig { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 44px; padding: 34px 36px 30px; grid-template-areas: "controls answer"; }
  .rig .answer { position: sticky; top: 20px; align-self: start; }
}
.eyebrow { font: 700 12px/1.2 var(--font-display); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.result { min-height: 21rem; }
.result:has(.idle), .result:has(.problem) { min-height: 0; }
.big.word.idle { font-size: clamp(30px, 7vw, 44px); letter-spacing: -.035em; color: var(--ink-3); margin-bottom: 10px; }
.verdict.idle { color: var(--ink-3); }
.verdict.idle { font-weight: 500; font-size: 17px; }
.cards.ghost { gap: 8px; }
.ghostcard { --w: 56px; width: 56px; aspect-ratio: 5 / 7; }
.big { display: block; font: 700 clamp(76px, 24vw, 128px)/.88 var(--font-display); letter-spacing: -.055em; font-variant-numeric: tabular-nums lining-nums; margin: 0 0 12px -.04em; }
.big.word { font-size: clamp(44px, 12.5vw, 76px); line-height: .98; letter-spacing: -.045em; text-wrap: balance; margin-bottom: 14px; }
.verdict { margin: 0 0 18px; font: 700 20px/1.3 var(--font-display); letter-spacing: -.015em; text-wrap: balance; }
.verdict.yes { color: var(--good); }
.verdict.no { color: var(--accent); }
.problem { color: var(--accent); font-weight: 600; margin: 0; }

.chart { margin: 8px 0 6px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 500 12px var(--font-text); fill: var(--ink-3); }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .exact { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chart .rule { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-dasharray: 1 6; stroke-linecap: round; }
.chart .gap { fill: var(--accent); opacity: .12; stroke: none; }
.chart .mark line { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .mark circle.a { fill: var(--ink); }
.chart .mark circle.b { fill: var(--accent); }
.chart .lab-exact { fill: var(--ink); font-weight: 600; }
.chart .lab-rule { fill: var(--accent); font-weight: 600; }
.chart .mark { transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.gauge { position: relative; height: 12px; margin: 22px 0 8px; border-radius: var(--r-pill); background: var(--surface-3); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .06); }
.gauge .fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--v, 0%); min-width: 12px; border-radius: var(--r-pill); background: var(--ink); transition: width var(--slow) var(--ease); }
.gauge .tick { position: absolute; top: -7px; bottom: -7px; width: 3px; margin-left: -1.5px; left: var(--t, 0%); border-radius: 2px; background: var(--accent); transition: left var(--slow) var(--ease); }
.gauge-labels { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-3); margin: 0 0 18px; }
.gauge-labels b { color: var(--ink); font-weight: 600; }
.gauge-labels .need b { color: var(--accent); }

dl.figs { margin: 0 0 16px; border-top: 1px solid var(--line-2); }
dl.figs > div { display: grid; grid-template-columns: 8.5em 1fr; gap: 4px 14px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
dl.figs dt { font-size: 14px; color: var(--ink-3); padding-top: 2px; }
dl.figs dd { margin: 0; font-size: 16px; line-height: 1.45; }
dl.figs dd b { font-weight: 600; font-variant-numeric: tabular-nums; }
dl.figs dd span { color: var(--ink-2); }
@media (max-width: 420px) { dl.figs > div { grid-template-columns: 1fr; } }
.fine { font-size: 14px; line-height: 1.5; color: var(--ink-3); margin: 0 0 12px; }
.dirty { margin: 14px 0 8px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.dirty b { color: var(--ink); }
.trap { margin: 4px 0 10px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.trap b { color: var(--accent); }

/* outs as status pills: a dot and a card, the dot red when the out is dirty */
ul.outlist { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
ul.outlist li { margin: 0; padding: 0 14px 0 12px; min-height: 34px; background: var(--surface-2); border-radius: var(--r-pill); box-shadow: var(--ring); font-size: 14px; line-height: 1.3; display: inline-flex; gap: 8px; align-items: center; }
ul.outlist li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
ul.outlist li.dirty-out::before { background: var(--accent); }
ul.outlist li b { font-family: var(--font-display); font-weight: 700; }
ul.outlist li i { font-style: normal; color: var(--accent); font-weight: 600; font-size: 12px; letter-spacing: .02em; }

/* inputs: capsules */
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font: 700 14px/1.2 var(--font-display); color: var(--ink-2); padding: 0; }
.field .hint { font-size: 13px; color: var(--ink-3); margin: 0; line-height: 1.4; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.step { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; height: 52px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: var(--ring); overflow: hidden; }
.step:focus-within { box-shadow: var(--ring), 0 0 0 2px var(--ink); }
.step button { border: 0; background: transparent; color: var(--ink); font: 500 24px/1 var(--font-display); cursor: pointer; padding: 0; touch-action: manipulation; transition: background-color var(--fast) var(--ease); }
.step button:hover { background: var(--surface-3); }
.step button:active { background: var(--surface-4); }
.step button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.step input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); text-align: center; font: 700 24px/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; padding: 0; border-radius: 0; outline: none; -moz-appearance: textfield; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; gap: 4px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: var(--ring); }
.seg label { position: relative; display: grid; place-items: center; min-height: 44px; padding: 0 10px; border-radius: var(--r-pill); font: 600 15px/1.2 var(--font-display); color: var(--ink-2); cursor: pointer; text-align: center; touch-action: manipulation; transition: background-color var(--med) var(--ease), color var(--med) var(--ease); }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--ink); color: var(--ink-inv); box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, .18), inset 0 -1px 0 0 rgba(0, 0, 0, .35); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
select, .text { width: 100%; min-height: 52px; padding: 0 18px; border: 0; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: var(--ring); color: var(--ink); font: 600 16px/1 var(--font-display); }
select:focus-visible, .text:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nojs-only { display: none; }

/* cards: the app's face (CardFace.swift). Paper, a jumbo rank and its suit in the corner, a large pip opposite, a frame line just inside the edge. */
.pc { --w: 52px; position: relative; display: block; width: var(--w); aspect-ratio: 5 / 7; border-radius: calc(var(--w) * var(--card-r)); background: linear-gradient(to bottom, var(--card-paper-top), var(--card-paper-bottom)); color: var(--card-ink); font-family: var(--font-display); overflow: hidden; flex: none; }
.pc::after { content: ""; position: absolute; inset: calc(var(--w) * .05); border-radius: calc(var(--w) * .14); box-shadow: inset 0 0 0 max(.5px, calc(var(--w) * .009)) var(--card-frame); pointer-events: none; }
.pc[data-color="red"] { color: var(--card-red); }
.pc-index { position: absolute; top: calc(var(--w) * .06); left: calc(var(--w) * .09); display: flex; flex-direction: column; align-items: center; }
.pc-rank { font-weight: 700; font-size: calc(var(--w) * .48); line-height: 1.21; letter-spacing: calc(var(--w) * -.01); font-variant-numeric: lining-nums; }
.pc-index:has(.pc-rank[data-long="true"]) { left: calc(var(--w) * .05); }
.pc-rank[data-long="true"] { font-size: calc(var(--w) * .40); letter-spacing: calc(var(--w) * -.032); }
.pc-suit-s { width: calc(var(--w) * .22); height: calc(var(--w) * .22); fill: currentColor; margin-top: calc(var(--w) * -.03); }
.pc-pip { position: absolute; right: calc(var(--w) * .08); bottom: calc(var(--w) * .08); width: calc(var(--w) * .40); height: calc(var(--w) * .40); fill: currentColor; }
.pc.dim { opacity: .35; }

/* the table: felt under anything that holds cards */
.cardpick { border: 0; margin: 0; min-width: 0; }
.cardpick > legend, .cardpick > .cplabel { display: block; color: var(--on-felt); padding: 0; margin-bottom: 12px; font: 700 14px/1.2 var(--font-display); }
.cardpick .hint, .cardpick .clear { color: var(--on-felt-2); }
.cards { display: flex; gap: 8px; align-items: flex-end; }
.cardpick .cards { flex-wrap: wrap; gap: 14px 22px; }
.cardpick .cards > .cgroup:only-child { flex: 1 1 100%; }
.cgroup { display: grid; gap: 6px; min-width: 0; max-width: 100%; }
.cgroup > span { font: 700 13px/1.2 var(--font-display); color: var(--on-felt-2); letter-spacing: .02em; }
.cslots { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 52px)); gap: 7px; }
.cslot { container-type: inline-size; width: 100%; aspect-ratio: 5 / 7; padding: 0; border-radius: 10px; border: 1.5px dashed var(--felt-line); background: rgba(0, 0, 0, .12); color: var(--on-felt-2); cursor: pointer; display: grid; place-items: center; font: 400 22px/1 var(--font-text); touch-action: manipulation; }
.cslot:hover { border-color: var(--on-felt-2); color: var(--on-felt); }
.cslot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cslot.has { border: 0; background: transparent; box-shadow: 0 6px 10px -6px rgba(0, 0, 0, .55); border-radius: calc(var(--w, 52px) * .19); }
.cslot .pc { width: 100%; --w: 100cqw; }
.clear { border: 0; background: none; color: var(--ink-3); font: 500 14px/1 var(--font-text); text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; cursor: pointer; }
.cardpick .clear { display: block; margin: 0 auto; }
.cards.five, .split { margin: 6px 0 14px; }
.split { display: grid; grid-template-columns: auto auto; gap: 12px 26px; justify-content: start; }
.qgroup { display: grid; gap: 6px; }
.qlab { font: 700 12px/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.table .qlab { color: var(--on-felt-2); }
.example-cards { padding: 18px; margin: 4px 0 20px; }
.example-cards .pc, .cards.five .pc { box-shadow: 0 6px 10px -6px rgba(0, 0, 0, .5); }

/* the picker: a rank, then a suit */
dialog.pick { width: min(92vw, 560px); max-height: 92vh; padding: 20px 18px 18px; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--ink); overflow: auto; box-shadow: var(--ring-strong), var(--lift-lg); }
dialog.pick::backdrop { background: rgba(0, 0, 0, .5); }
@media (max-width: 600px) { dialog.pick { margin: auto 0 0; width: 100%; max-width: none; border-radius: var(--r-lg) var(--r-lg) 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); } }
.pick header { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 12px; }
.pick h2 { margin: 0; font: 700 20px/1.2 var(--font-display); letter-spacing: -.02em; }
.pick .close { border: 0; background: none; color: var(--ink-2); font: 500 15px/1 var(--font-text); padding: 10px 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ranks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ranks button { min-height: 56px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: var(--ring); color: var(--ink); font: 700 22px/1 var(--font-display); cursor: pointer; touch-action: manipulation; transition: transform var(--fast) var(--spring), background-color var(--med) var(--ease); }
.ranks button:hover { background: var(--surface-3); }
.ranks button:active { transform: scale(.955); }
.ranks button:focus-visible, .suits button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.suits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.suits button { padding: 0; border: 0; background: none; cursor: pointer; border-radius: var(--r-sm); touch-action: manipulation; }
.suits button .pc { --w: 100%; width: 100%; box-shadow: var(--ring-strong), var(--lift); transition: transform var(--fast) var(--spring); }
.suits button .pc-rank { font-size: clamp(30px, 9vw, 46px); }
.suits button .pc-rank[data-long="true"] { font-size: clamp(24px, 7vw, 36px); }
.suits button .pc-suit-s { width: 26%; height: 18%; }
.suits button:hover .pc { transform: translateY(-3px); }
.suits button[disabled] { opacity: .2; cursor: not-allowed; }
.pick .clear { display: block; margin: 14px 0 0; }

/* hand rankings and the quiz */
.ranking { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line-2); counter-reset: r; }
.ranking li { counter-increment: r; display: grid; grid-template-columns: 1fr; gap: 8px; align-items: center; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.rk-name { display: grid; gap: 1px; }
.rk-name b { font: 700 19px/1.2 var(--font-display); letter-spacing: -.02em; }
.rk-name b::before { content: counter(r) "."; display: inline-block; width: 1.7em; color: var(--ink-3); font-weight: 500; }
.rk-name span { color: var(--ink-3); font-size: 15px; padding-left: 1.7em; }
.cards.mini { gap: 5px; flex-wrap: nowrap; }
.cards.mini .pc { --w: 42px; box-shadow: var(--ring-strong); }
@media (min-width: 640px) { .ranking li { grid-template-columns: 1fr auto; gap: 24px; } .cards.mini .pc { --w: 46px; } }
.panel { margin: 14px 0 8px; padding: 22px 20px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--ring-strong), var(--lift); }
.quiz { display: grid; gap: 16px; }
.quiz .table { padding: 16px; display: grid; gap: 14px; }
.qhands { display: flex; flex-wrap: wrap; gap: 14px 30px; }
.qbtns { display: flex; gap: 10px; flex-wrap: wrap; }
.qbtns .btn { min-width: 8.5em; }
.qbtns .btn:disabled { opacity: .5; cursor: default; filter: none; }
.qbtns .btn.chosen { opacity: 1; outline: 2px solid var(--ink); outline-offset: 2px; }
.qresult { margin: 0; padding: 12px 16px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: var(--ring); font-size: 16px; line-height: 1.5; }
.qresult.yes { color: var(--good); }
.qresult.no { color: var(--accent); }
.qfoot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qfoot .btn { min-height: 42px; padding: 0 16px; font-size: 14px; }
.reveal { font-size: 16px; }

/* the rules card */
.rules .eyebrow { margin-bottom: 4px; }
.rule-group { margin: 22px 0 6px; font: 700 12px/1.2 var(--font-display); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.rules dl.figs { margin-bottom: 0; }
.rules dl.figs > div { grid-template-columns: 9em 1fr; padding: 8px 0; }
.rules dl.figs dd { font-size: 15px; }
.rules dl.figs > div:not(.changed) dd b { font-weight: 500; color: var(--ink-2); }
.rules dl.figs dd span { display: block; font-size: 13.5px; color: var(--ink-3); }
.result.rules { min-height: 0; }
.rule-set { border-top: 1px solid var(--line-2); padding: 0; }
.rule-set summary { cursor: pointer; padding: 14px 0; font: 700 16px/1.2 var(--font-display); letter-spacing: -.01em; list-style: none; }
.rule-set summary::-webkit-details-marker { display: none; }
.rule-set summary::after { content: "+"; float: right; color: var(--ink-3); font-weight: 400; }
.rule-set[open] summary::after { content: "\2212"; }
.rule-fields { display: grid; gap: 16px; padding: 0 0 18px; }
.multi { display: grid; gap: 8px; }
.print-btn { margin: 8px 0 0; }

/* starting hands: the grid */
.grid-wrap { max-width: 40rem; margin: 10px 0 8px; }
table.hgrid { border-collapse: separate; border-spacing: 2px; table-layout: fixed; width: 100%; font-size: 11px; }
table.hgrid th, table.hgrid td { padding: 0; border: 0; text-align: center; font: 600 11px/1.4 var(--font-text); color: var(--ink-3); }
table.hgrid caption { padding: 0 0 8px; text-align: left; caption-side: top; }
.gc { display: block; width: 100%; aspect-ratio: 1; border: 0; border-radius: 3px; padding: 0; cursor: pointer; background: color-mix(in srgb, var(--felt) calc(var(--k) * 90% + 6%), var(--surface-2)); }
.gc:hover { outline: 2px solid var(--accent); }
.gc.sel { outline: 3px solid var(--accent); outline-offset: 1px; position: relative; z-index: 1; }
.gc.vs { outline: 3px dashed var(--accent); outline-offset: 1px; }
.gc:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }

/* the random hand generator, the equity calculator and the combos calculator */
.rig [hidden] { display: none !important; }
.rig.stack { grid-template-columns: minmax(0, 1fr); grid-template-areas: "answer" "controls"; gap: 24px; }
.rig.stack .answer { position: static; }
@media (min-width: 720px) { .rig.stack .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; align-items: end; } .rig.stack .controls > .saved, .rig.stack .controls > .nojs-only { grid-column: 1 / -1; } }
.deal-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.saved { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: var(--ring); }
.saved code { font: 600 14px/1.45 var(--font-text); color: var(--ink); overflow-wrap: anywhere; word-break: break-all; }
.saved .btn { justify-self: start; min-height: 42px; padding: 0 18px; font-size: 14px; }

.pc.back { background: repeating-linear-gradient(45deg, var(--card-frame) 0 1px, transparent 1px 6px), linear-gradient(to bottom, var(--card-paper-top), var(--card-paper-bottom)); }
.sc { container-type: inline-size; display: block; width: 100%; aspect-ratio: 5 / 7; }
.sc .pc { width: 100%; --w: 100cqw; box-shadow: 0 6px 10px -6px rgba(0, 0, 0, .55); }
.sc.empty { border-radius: 10px; border: 1.5px dashed var(--felt-line); }
.boardrow { display: grid; grid-template-columns: repeat(5, minmax(0, 62px)); gap: 8px; justify-content: center; }
.seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.seats[data-hole="4"], .seats[data-hole="5"] { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .seats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .seats[data-hole="4"], .seats[data-hole="5"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 880px) { .seats[data-hole="4"], .seats[data-hole="5"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.deal-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0 0; }
.deal-foot .btn { min-height: 42px; padding: 0 18px; font-size: 14px; }
.deal-foot .fine { margin: 0; }
.deal-foot .fine:empty { display: none; }

.eqrows { list-style: none; margin: 4px 0 14px; padding: 0; display: grid; gap: 10px; }
.eqrows li { display: flex; align-items: center; gap: 14px; margin: 0; padding: 0; flex-wrap: wrap; }
.eqrows .cards.table { padding: 8px 10px; flex: none; border-radius: var(--r-sm); }
.eqrows .cards.table .pc { box-shadow: 0 4px 8px -5px rgba(0, 0, 0, .55); }
.eq-fig { display: grid; gap: 2px; min-width: 0; }
.eq-fig .qlab { margin-bottom: 1px; }
.eq-fig b { font: 700 28px/1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.eq-fig span:last-child { font-size: 14px; color: var(--ink-2); }
.cardpick[data-random] .cgroup[data-group="h2"], .cardpick[data-random] .cgroup[data-group="h3"], .cardpick[data-random] .cgroup[data-group="h4"] { display: none; }

.pickgrid { max-width: none; margin: 0; }
.pickgrid table.hgrid { font-size: 9px; }
.gc.pk { display: grid; place-items: center; background: var(--surface-2); box-shadow: var(--ring); color: var(--ink-2); border-radius: 4px; font: 700 8.5px/1 var(--font-display); letter-spacing: -.02em; }
.gc.pk:hover { outline: 2px solid var(--ink-3); }
.gc.pk.on { background: var(--ink); color: var(--ink-inv); box-shadow: none; }
@media (min-width: 560px) { .gc.pk { font-size: 10px; } }

/* the tools index and the footer's neighbours */
.tools-list { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--line-2); }
.tools-list li { margin: 0; padding: 0; border-bottom: 1px solid var(--line-2); }
.tools-list a { display: grid; gap: 4px; padding: 18px 0; text-decoration: none; }
.tools-list a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.tools-list strong { font: 700 22px/1.2 var(--font-display); letter-spacing: -.025em; }
.tools-list span { color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.neighbours { margin: 36px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line-2); font-size: 16px; }
.neighbours h2 { margin: 0 0 8px; font-size: 20px; }
.neighbours ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.neighbours li { margin: 0; }
.neighbours li a { display: block; height: 100%; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--ring); color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.35; }
.neighbours li a strong { display: block; font-weight: 700; }
.neighbours li a span { display: block; margin-top: 4px; color: var(--ink-2); font-weight: 500; font-size: 15px; }
.neighbours li a:hover { background: var(--surface-2); }

@media print {
  header.top, footer, .rig .controls, .print-btn, .cta, .neighbours, .crumbs, .faq, h2, main > .wrap > p { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; }
  .rig { box-shadow: none; padding: 0; display: block; }
  .rig .answer { position: static; }
}
@media (prefers-reduced-motion: reduce) { .gauge .fill, .gauge .tick, .btn, .ranks button, .suits button .pc { transition: none; } }

/* ── search landing pages: the answer, the phone beside it, real screens ── */
.lead-grid { display: grid; gap: 26px; align-items: start; margin: 0 0 8px; }
.lead-grid .lead-copy { min-width: 0; max-width: 40rem; }
.lead-grid .lead-copy > p:first-of-type { font-size: 20px; line-height: 1.5; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 26px; background: var(--surface-2); box-shadow: var(--ring-strong), var(--lift); }
.lead-grid .shot { width: min(100%, 14rem); }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 22px 0 6px; }
.shots > .shot:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 7px); }
@media (min-width: 860px) {
  .lead-grid { grid-template-columns: minmax(0, 1fr) 15rem; gap: 64px; }
  .lead-grid .shot { width: 100%; justify-self: end; }
  .shots { grid-template-columns: repeat(var(--n, 3), minmax(0, 14rem)); gap: 24px; }
  .shots > .shot:last-child:nth-child(odd) { grid-column: auto; justify-self: stretch; width: auto; }
}
table.compare.slim { min-width: 0; }
table.compare.slim td:first-child { white-space: nowrap; }
@media (max-width: 760px) { table.compare.slim td:first-child { white-space: normal; } }
.lead-grid .cta { margin-top: 22px; }
