/* The Bandeja Lab: the whole look.
   Warm paper, hard ink, one court blue and one ball yellow. Everything sits on a
   1.5px ink outline with a solid offset shadow, so the page reads like a printed
   card game rather than a dashboard. Nothing bounces unless you did something. */

:root {
  --paper:   #fdf4e3;
  --paper-2: #fffaf0;
  --ink:     #16192b;
  --ink-2:   #4b5068;
  --line:    #16192b;
  --blue:    #2f7fe0;
  --blue-d:  #1c5cb0;
  --ball:    #e3f04a;
  --coral:   #ff5c72;
  --green:   #2f9d63;
  --shadow:  #16192b;
  --card:    #fffaf0;
  --rule:    rgba(22,25,43,.14);
  --dot:     rgba(22,25,43,.09);
  --radius:  16px;
  --disp: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:   #12131f;
    --paper-2: #1a1c2c;
    --ink:     #f4f1e6;
    --ink-2:   #b3b8cd;
    --line:    #060710;
    --card:    #1c1e30;
    --shadow:  #05060d;
    --rule:    rgba(244,241,230,.16);
    --dot:     rgba(244,241,230,.07);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper:   #12131f;
  --paper-2: #1a1c2c;
  --ink:     #f4f1e6;
  --ink-2:   #b3b8cd;
  --line:    #060710;
  --card:    #1c1e30;
  --shadow:  #05060d;
  --rule:    rgba(244,241,230,.16);
  --dot:     rgba(244,241,230,.07);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--disp); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5.4vw, 52px); font-weight: 800; }
h2 { font-size: clamp(23px, 3.4vw, 32px); font-weight: 800; }
h3 { font-size: clamp(19px, 2.4vw, 23px); font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ball); color: #16192b;
  padding: 10px 16px; z-index: 99; font-weight: 700; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* ── chrome ─────────────────────────────────────────────────────── */
.top {
  border-bottom: 2px solid var(--line);
  background: var(--paper-2);
  position: sticky; top: 0; z-index: 40;
}
.top-in { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand {
  display: flex; align-items: center; gap: 9px; font-family: var(--disp);
  font-weight: 800; font-size: 19px; letter-spacing: -.03em; text-decoration: none; white-space: nowrap;
}
.brand .dot {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--ball); display: grid; place-items: center; flex: none;
  box-shadow: 2px 2px 0 var(--shadow);
}
.brand .dot::after { content: ""; width: 12px; height: 12px; border: 2px solid var(--line); border-radius: 50%; border-left-color: transparent; border-right-color: transparent; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  text-decoration: none; font-weight: 650; font-size: 15px; padding: 7px 11px; border-radius: 9px;
  border: 2px solid transparent; white-space: nowrap;
}
@media (max-width: 1000px) { .nav a { padding: 7px 8px; font-size: 14px; } .nav a.hide-sm { display: none; } }
.nav a:hover { background: var(--ball); border-color: var(--line); color: #16192b; }
.nav a[aria-current="page"] { border-color: var(--line); background: var(--card); }
.themer {
  border: 2px solid var(--line); background: var(--card); border-radius: 9px; cursor: pointer;
  width: 36px; height: 34px; font-size: 15px; line-height: 1; display: grid; place-items: center;
  box-shadow: 2px 2px 0 var(--shadow); color: inherit;
}
.themer:active { transform: translate(2px, 2px); box-shadow: none; }
@media (max-width: 700px) {
  .top-in { gap: 8px; height: 56px; }
  .brand { font-size: 16px; gap: 7px; }
  .nav { gap: 0; }
  .nav a { padding: 6px 7px; font-size: 13.5px; white-space: nowrap; }
  .nav a.hide-sm { display: none; }
  .themer { width: 32px; height: 30px; margin-left: 5px; }
}
/* below this the wordmark stops fitting next to the nav, so the ball carries the brand */
@media (max-width: 430px) { .brand .name { display: none; } .nav { gap: 2px; } .nav a { padding: 6px 5px; font-size: 12.5px; } }
@media (max-width: 520px) {
  .datestamp { font-size: 11px; letter-spacing: .05em; padding: 5px 11px; }
}

/* ── the game ───────────────────────────────────────────────────── */
main { padding: 26px 0 60px; }
.game { display: grid; grid-template-columns: minmax(320px, 465px) minmax(0, 1fr); gap: 34px; align-items: start; }
@media (max-width: 900px) { .game { grid-template-columns: 1fr; gap: 22px; } }

.datestamp {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-family: var(--disp); font-weight: 800; font-size: 13px; letter-spacing: .1em;
  text-transform: uppercase; border: 2px solid var(--line); background: var(--ball); color: #16192b;
  padding: 6px 13px; border-radius: 999px; box-shadow: 3px 3px 0 var(--shadow);
  transform: rotate(-1.4deg);
}
.datestamp b { font-weight: 800; }

.courtcard {
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--card);
  box-shadow: 6px 6px 0 var(--shadow); padding: 12px; position: relative;
}
.courtcard canvas { display: block; width: 100%; height: auto; border-radius: 9px; }
.courtcard .legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 11px 4px 2px; font-size: 12.5px;
  color: var(--ink-2); font-weight: 600;
}
.legend i { width: 11px; height: 11px; border: 1.5px solid var(--line); border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }
.legend .you { background: #f6f9ff; }
.legend .ally { background: #8fb6ee; }
.legend .opp { background: #e2445f; }
.legend .bl { background: var(--ball); border-radius: 50%; }

.qhead { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.pill {
  font-family: var(--disp); font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; border: 2px solid var(--line); border-radius: 999px;
  padding: 4px 11px; background: var(--card);
}
.pill.beginner { background: #c9f7c0; color: #14522a; }
.pill.intermediate { background: #ffe08a; color: #6a4708; }
.pill.advanced { background: #ffb3c1; color: #7d1330; }
.pill.tag { font-weight: 700; letter-spacing: .02em; text-transform: none; background: transparent; border-style: dashed; color: var(--ink-2); }

.question { font-family: var(--disp); font-size: clamp(22px, 3.2vw, 31px); font-weight: 800; line-height: 1.14; margin: 0 0 20px; letter-spacing: -.02em; }

.opts { display: grid; gap: 11px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: o; }
.opt {
  display: flex; gap: 13px; align-items: flex-start; width: 100%; text-align: left;
  border: 2px solid var(--line); border-radius: 13px; background: var(--card); color: inherit;
  padding: 14px 15px; font: inherit; cursor: pointer; box-shadow: 4px 4px 0 var(--shadow);
  transition: transform .08s ease, box-shadow .08s ease, background .12s ease;
}
.opt:hover:not(:disabled) { background: var(--paper-2); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow); }
.opt:active:not(:disabled) { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--shadow); }
.opt .k {
  flex: none; width: 30px; height: 30px; border: 2px solid var(--line); border-radius: 8px;
  display: grid; place-items: center; font-family: var(--disp); font-weight: 800; font-size: 15px;
  background: var(--paper); color: var(--ink);
}
.opt .body { flex: 1; }
.opt .txt { font-weight: 650; line-height: 1.35; }
.opt .note { display: none; font-size: 14.5px; color: var(--ink-2); margin-top: 7px; line-height: 1.5; }
.opt[disabled] { cursor: default; }
.answered .opt .note { display: block; }
.answered .opt { box-shadow: 3px 3px 0 var(--shadow); }
.opt.right { background: #dcf8d4; border-color: #14522a; }
.opt.right .k { background: var(--green); color: #fff; border-color: #14522a; }
.opt.right .note { color: #1c5c2e; }
.opt.wrong { background: #ffe1e6; border-color: #7d1330; }
.opt.wrong .k { background: var(--coral); color: #fff; border-color: #7d1330; }
.opt.wrong .note { color: #7d1330; }
.opt.dim { opacity: .62; }
:root[data-theme="dark"] .opt.right { background: #17351f; border-color: #48c07a; }
:root[data-theme="dark"] .opt.right .note { color: #a7e6bd; }
:root[data-theme="dark"] .opt.wrong { background: #3a1620; border-color: #ff8fa1; }
:root[data-theme="dark"] .opt.wrong .note { color: #ffb9c4; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .opt.right { background: #17351f; border-color: #48c07a; }
  :root:not([data-theme="light"]) .opt.right .note { color: #a7e6bd; }
  :root:not([data-theme="light"]) .opt.wrong { background: #3a1620; border-color: #ff8fa1; }
  :root:not([data-theme="light"]) .opt.wrong .note { color: #ffb9c4; }
}

.verdict {
  display: none; align-items: center; gap: 12px; border: 2px solid var(--line); border-radius: 13px;
  padding: 12px 15px; margin-bottom: 16px; font-family: var(--disp); font-weight: 800; font-size: 18px;
  box-shadow: 4px 4px 0 var(--shadow);
}
.answered .verdict:not(:empty), .verdict.hit, .verdict.miss { display: flex; animation: pop .32s cubic-bezier(.2,1.6,.4,1); }
.verdict.hit { background: var(--green); color: #fff; }
.verdict.miss { background: var(--coral); color: #fff; }
.verdict .em { font-size: 24px; }
@keyframes pop { 0% { transform: scale(.9) rotate(-1deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ── the teaching half ──────────────────────────────────────────── */
.reveal { display: none; }
.answered .reveal { display: block; animation: rise .34s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.keyline {
  border: 2px solid var(--line); border-left-width: 9px; border-radius: 13px; background: var(--card);
  padding: 15px 17px; margin: 0 0 18px; box-shadow: 4px 4px 0 var(--shadow);
  font-family: var(--disp); font-weight: 700; font-size: 19px; line-height: 1.28;
}
.panel {
  border: 2px solid var(--line); border-radius: 13px; background: var(--card);
  padding: 17px 19px; margin: 0 0 18px; box-shadow: 4px 4px 0 var(--shadow);
}
.panel > h3 { margin-top: 0; }
.panel p:last-child { margin-bottom: 0; }

.levels { display: grid; gap: 0; border: 2px solid var(--line); border-radius: 13px; overflow: hidden; box-shadow: 4px 4px 0 var(--shadow); margin-bottom: 18px; background: var(--card); }
.levels .lv { padding: 14px 17px; border-bottom: 2px solid var(--line); }
.levels .lv:last-child { border-bottom: 0; }
.levels .lv h4 {
  margin: 0 0 5px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 7px;
}
.levels .lv h4::before { content: ""; width: 10px; height: 10px; border: 2px solid var(--line); border-radius: 50%; }
.levels .b h4::before { background: #7ede91; }
.levels .i h4::before { background: #ffd45e; }
.levels .a h4::before { background: #ff8fa1; }
.levels .lv p { margin: 0; font-size: 15.5px; line-height: 1.55; }

.fact {
  border: 2px dashed var(--line); border-radius: 13px; padding: 13px 16px; margin: 0 0 18px;
  background: transparent; font-size: 15.5px;
}
.fact b { font-family: var(--disp); letter-spacing: .04em; text-transform: uppercase; font-size: 12px; display: block; margin-bottom: 4px; color: var(--ink-2); }

.after { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--line);
  border-radius: 11px; padding: 11px 16px; font-family: var(--disp); font-weight: 800; font-size: 15px;
  background: var(--card); color: inherit; cursor: pointer; text-decoration: none;
  box-shadow: 4px 4px 0 var(--shadow); transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow); }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }
.btn.primary { background: var(--ball); color: #16192b; }
.btn.blue { background: var(--blue); color: #fff; }

/* ── streak strip ───────────────────────────────────────────────── */
.streak {
  display: flex; gap: 0; border: 2px solid var(--line); border-radius: 13px; overflow: hidden;
  margin: 0 0 20px; background: var(--card); box-shadow: 4px 4px 0 var(--shadow);
}
.streak div { flex: 1; padding: 10px 8px; text-align: center; border-right: 2px solid var(--line); }
.streak div:last-child { border-right: 0; }
.streak b { display: block; font-family: var(--disp); font-size: 22px; font-weight: 800; line-height: 1; }
.streak span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }

/* ── generic content ────────────────────────────────────────────── */
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: .5em; }
.lede { font-size: 19px; color: var(--ink-2); }
hr.rule { border: 0; border-top: 2px solid var(--rule); margin: 34px 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 16px; }
.tile {
  border: 2px solid var(--line); border-radius: 13px; background: var(--card); padding: 15px 16px;
  box-shadow: 4px 4px 0 var(--shadow); text-decoration: none; display: block; color: inherit;
  transition: transform .1s ease, box-shadow .1s ease;
}
.tile:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); }
.tile h3 { margin: 7px 0 6px; font-size: 18px; }
.tile p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }

.faq { border-top: 2px solid var(--rule); }
.faq details { border-bottom: 2px solid var(--rule); padding: 4px 0; }
.faq summary { cursor: pointer; font-family: var(--disp); font-weight: 700; font-size: 18px; padding: 13px 0; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: var(--ink-2); }

/* ── ads: labelled, boxed, never dressed up as content ──────────── */
.ad { margin: 30px auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad > span {
  display: block; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 6px; opacity: .75;
}
.ad-slot { min-height: 90px; display: block; }
.ad.rail { position: sticky; top: 84px; }

/* ── footer ─────────────────────────────────────────────────────── */
.foot { border-top: 2px solid var(--line); background: var(--paper-2); padding: 30px 0; margin-top: 50px; font-size: 15px; }
.foot .cols { display: flex; flex-wrap: wrap; gap: 30px 50px; }
.foot h4 { font-family: var(--disp); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 9px; color: var(--ink-2); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 5px; }
.foot a { text-decoration: none; font-weight: 600; }
.foot a:hover { text-decoration: underline; }
.foot .fine { margin-top: 26px; color: var(--ink-2); font-size: 13.5px; }

.crumbs { font-size: 13.5px; color: var(--ink-2); margin-bottom: 14px; }
.crumbs a { text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ── the technique stage ────────────────────────────────────────── */
.courtcard.stage canvas { background: transparent; }
.courtcard.stage .legend span { position: relative; padding-left: 15px; }
.courtcard.stage .legend span::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 9px; height: 9px;
  border: 1.5px solid var(--line); border-radius: 2px; background: var(--ball);
}
.courtcard.stage .legend span:nth-child(2)::before { border-radius: 50%; background: transparent; border-style: dashed; }
.courtcard.stage .legend span:nth-child(3)::before { background: var(--blue); border-radius: 50%; }

ol.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 10px; }
ol.steps .step {
  counter-increment: s; position: relative; padding: 13px 15px 13px 52px;
  border: 2px solid var(--line); border-radius: 13px; background: var(--card);
  box-shadow: 4px 4px 0 var(--shadow); transition: background .2s ease, transform .2s ease;
}
ol.steps .step::before {
  content: counter(s); position: absolute; left: 13px; top: 12px;
  width: 27px; height: 27px; border: 2px solid var(--line); border-radius: 8px;
  display: grid; place-items: center; font-family: var(--disp); font-weight: 800; font-size: 14px;
  background: var(--paper); color: var(--ink); transition: background .2s ease;
}
ol.steps .step b { display: block; font-family: var(--disp); font-size: 17px; margin-bottom: 3px; }
ol.steps .step span { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
/* the step the swing has reached lights up */
ol.steps .step.on { background: var(--ball); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); }
ol.steps .step.on b, ol.steps .step.on span { color: #16192b; }
ol.steps .step.on::before { background: #16192b; color: var(--ball); }
@media (prefers-reduced-motion: reduce) { ol.steps .step.on { transform: none; } }

/* a padel word linked to the page that explains it */
a.gl { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--blue); font-weight: 600; }
a.gl:hover { background: var(--ball); color: #16192b; text-decoration: none; border-radius: 3px; }
.dontknow { font-size: 14.5px; color: var(--ink-2); margin: -8px 0 18px; }
.dontknow a { font-weight: 650; }
.levelpick { font-size: 14.5px; color: var(--ink-2); margin: -6px 0 20px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.levelpick a {
  text-decoration: none; font-weight: 700; font-size: 13px; padding: 3px 10px;
  border: 2px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink);
}
.levelpick a:hover { background: var(--ball); color: #16192b; }

/* ── the games ──────────────────────────────────────────────────── */
.rf-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 14.5px; margin: 8px 0; }
.rf-row b { font-family: var(--disp); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); min-width: 64px; }
.rf-row label { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font-weight: 650; font-size: 13.5px; }
.rf-row label:has(input:checked) { background: var(--ball); color: #16192b; }
.rf-row input[type=radio] { accent-color: var(--blue); margin: 0; }
.rf-best { font-size: 14px; color: var(--ink-2); align-self: center; }
.rf-bar { height: 10px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); overflow: hidden; margin: 0 0 14px; }
.rf-bar i { display: block; height: 100%; width: 100%; background: var(--ball); }
.rf-missed { list-style: none; padding: 0; margin: 12px 0 18px; display: grid; gap: 8px; }
.rf-missed li { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); font-size: 14.5px; }
.rf-missed a { font-weight: 700; }
.rf-missed span { color: var(--ink-2); }
.lt-band { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 0 0 10px; }
.lt-band b { font-family: var(--disp); font-size: 48px; font-weight: 800; line-height: 1; background: var(--ball); color: #16192b; padding: 6px 16px; border: 2px solid var(--line); border-radius: 14px; box-shadow: 5px 5px 0 var(--shadow); }
.lt-band span { font-family: var(--disp); font-weight: 700; font-size: 18px; }
.ways { margin-top: 22px; }

/* ── settle it ──────────────────────────────────────────────────── */
.search { width: 100%; max-width: 560px; font: inherit; font-size: 17px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: 4px 4px 0 var(--shadow); }
.search:focus { outline: 3px solid var(--blue); outline-offset: 2px; }
.verdicts { display: grid; gap: 10px; }
.verdict-card { border: 2px solid var(--line); border-radius: 13px; background: var(--card); box-shadow: 4px 4px 0 var(--shadow); padding: 0 16px; }
.verdict-card summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 13px 0; }
.verdict-card summary::-webkit-details-marker { display: none; }
.verdict-card .vq { font-weight: 650; line-height: 1.35; }
.verdict-card .va { font-family: var(--disp); font-weight: 700; font-size: 14.5px; color: #16192b; background: var(--ball); padding: 6px 10px; border-radius: 9px; border: 2px solid var(--line); line-height: 1.3; }
.verdict-card p { margin: 0 0 12px; font-size: 15px; line-height: 1.55; }
.verdict-card[open] summary { border-bottom: 2px dashed var(--rule); margin-bottom: 10px; }
@media (max-width: 640px) { .verdict-card summary { grid-template-columns: 1fr; gap: 8px; } }

/* ── glossary ───────────────────────────────────────────────────── */
.gl-index a { font-weight: 700; text-decoration: none; font-size: 13px; padding: 3px 10px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); }
.gl-index a:hover { background: var(--ball); color: #16192b; }
.gloss { display: grid; gap: 12px; margin: 0 0 8px; }
.term { border: 2px solid var(--line); border-radius: 13px; background: var(--card); box-shadow: 4px 4px 0 var(--shadow); padding: 14px 18px; scroll-margin-top: 80px; }
.term:target { background: var(--ball); color: #16192b; }
.term dt { font-family: var(--disp); font-weight: 800; font-size: 20px; margin: 0 0 4px; }
.term dt small { font-family: var(--body); font-weight: 600; font-size: 13.5px; color: var(--ink-2); margin-left: 8px; }
.term:target dt small { color: #3d4a08; }
.term dd { margin: 0; font-size: 15.5px; line-height: 1.55; }
.gl-see { font-weight: 700; white-space: nowrap; }

/* ── racket finder ──────────────────────────────────────────────── */
.rk-steps .rk-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rk-steps .rk-opts label { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; font-weight: 650; font-size: 13.5px; color: var(--ink); }
.rk-steps .rk-opts label:has(input:checked) { background: var(--blue); color: #fff; border-color: var(--blue-d); }
.rk-steps .step.on .rk-opts label:has(input:checked) { background: #16192b; color: var(--ball); }
.rk-steps .rk-opts input { accent-color: var(--blue); margin: 0; }
.rk-spec { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0 0 14px; }
.rk-cell { border: 2px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 4px 4px 0 var(--shadow); padding: 10px 12px; }
.rk-cell small { display: block; font-family: var(--disp); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.rk-cell b { font-family: var(--disp); font-size: 17px; }

/* ── newsletter ─────────────────────────────────────────────────── */
.nl { border-top: 2px solid var(--line); background: var(--ball); color: #16192b; }
.nl-in { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; padding: 22px 0; }
.nl h3 { margin: 0 0 4px; } .nl p { margin: 0; font-size: 15px; }
.nl-form { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-form input { font: inherit; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; min-width: 240px; background: #fffaf0; color: #16192b; }

/* phones: the game court stays compact so the question and the chips share the screen */
@media (max-width: 760px) {
  .rapid .courtcard, .level .courtcard { max-width: 250px; margin: 0 auto; }
  .rapid .courtcard canvas, .level .courtcard canvas { height: auto; }
  .lt-band b { font-size: 36px; }
}
.game { scroll-margin-top: 72px; }

/* ── brand mark, embed mode, print sheet, rail ──────────────────── */
.brand .mark { width: 28px; height: 28px; flex: none; }
.logo-wrap { margin: 0 0 18px; color: var(--ink); } .logo-wrap .logo { width: 260px; height: 260px; max-width: 100%; }
pre.code { white-space: pre-wrap; word-break: break-all; font-size: 13px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 4px 4px 0 var(--shadow); }
body.embed .top, body.embed .foot, body.embed .nl, body.embed .skip { display: none; }
body.embed main { padding-top: 10px; }
.embed-foot { text-align: center; font-size: 14px; margin: 18px 0 0; }
.embed-foot a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); }
.embed-foot .mark { width: 22px; height: 22px; }
.prose-rail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
@media (min-width: 1180px) { .prose-rail:has(.ad.rail) { grid-template-columns: minmax(0, 720px) 300px; } }
.ad.rail { margin: 0; }
.tile-ad { grid-column: 1 / -1; margin: 6px 0; }
.sheet { border-top: 2px dashed var(--rule); padding-top: 18px; margin-top: 22px; }
.sheet h2 small { display: block; font-family: var(--body); font-weight: 600; font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.sheet-grid { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 22px; align-items: start; }
.sheet-opts { padding-left: 22px; font-size: 16px; } .sheet-opts li { margin-bottom: 8px; }
.sheet.answers { break-before: page; }
@media (max-width: 640px) { .sheet-grid { grid-template-columns: 1fr; } }
@media print {
  .top, .foot, .nl, .noprint, .ad, .skip { display: none !important; }
  body { background: #fff; color: #000; } main { padding: 0; }
  .sheet { break-inside: avoid; border-top-color: #bbb; }
  .courtcard { box-shadow: none; }
}

/* ── technique frames ───────────────────────────────────────────── */
.view-h { margin: 26px 0 10px; font-size: 20px; }
.frames { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.frames.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.frame { margin: 0; border: 2px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 4px 4px 0 var(--shadow); overflow: hidden; }
.frame canvas { display: block; width: 100%; background: var(--paper-2); border-bottom: 2px solid var(--line); }
.frame figcaption { padding: 10px 12px 12px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.frame figcaption b { display: block; color: var(--ink); font-family: var(--disp); font-size: 14px; margin-bottom: 3px; }
.lefty { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.lefty input { accent-color: var(--blue); width: 15px; height: 15px; margin: 0; }
@media (max-width: 760px) { .frames, .frames.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .frame figcaption { font-size: 12.5px; } }

/* ── the rally ──────────────────────────────────────────────────── */
.rl-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.rl-status { font-size: 14px; color: var(--ink-2); font-weight: 650; }
.rl-menu .rf-bar { margin-bottom: 10px; } .rl-menu .rf-bar i { transition: none; }
.rl-coach { font-style: normal; font-family: var(--disp); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; background: var(--ball); color: #16192b; padding: 2px 7px; border-radius: 999px; margin-left: 6px; border: 1.5px solid var(--line); }
.rl-opt .note { display: block; }
.rl-dirs { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 8px; align-items: center; margin-top: 10px; }
.rl-dirlabel { font-family: var(--disp); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.rl-dirs .btn { padding: 10px 6px; font-size: 14px; justify-content: center; flex-direction: column; gap: 2px; line-height: 1.1; }
.rl-dirs .btn i { font-style: normal; font-size: 22px; line-height: 1; }
.rl-dirs .btn.on { background: var(--ball); color: #16192b; box-shadow: 2px 2px 0 var(--shadow); transform: translate(2px, 2px); }
.rl-lessons { margin-top: 16px; } .rl-lessons li span { color: var(--ink-2); }
@media (max-width: 480px) { .rl-dirs { grid-template-columns: 1fr 1fr 1fr; } .rl-dirlabel { grid-column: 1 / -1; } }
@media (max-width: 760px) { .rally .courtcard { max-width: 380px; margin: 0 auto; } }

/* ── premium ────────────────────────────────────────────────────── */
[data-premium-only] { display: none !important; }
html[data-premium="1"] [data-premium-only] { display: revert !important; }
html[data-premium="1"] [data-free-only] { display: none !important; }
html[data-premium="1"] .nav a[data-premium-only] { display: inline-block !important; }
html[data-premium="1"] .grid[data-premium-only] { display: grid !important; }
html[data-premium="1"] .game[data-premium-only] { display: grid !important; }
html[data-premium="1"] .reveal[data-premium-only] { display: block !important; }
.lock { border: 2px dashed var(--line); border-radius: 14px; padding: 16px 18px; margin: 18px 0; background: var(--card); }
.lock h3 { margin: 0 0 6px; } .lock p { margin: 0 0 10px; color: var(--ink-2); font-size: 15px; }
.lock .nl-form input { min-width: 200px; background: var(--paper); color: var(--ink); }
.trainer .tr-day .game { margin-top: 12px; }
.rl-mute { margin-left: auto; padding: 6px 10px; font-size: 12.5px; }

/* racket finder: the three picks, notes under questions, the catalogue table */
.rk-note { display: block; color: var(--ink-2); font-size: 13px; font-weight: 500; margin-top: 3px; line-height: 1.4; }
.rk-picks { display: grid; gap: 14px; margin: 0 0 22px; }
.rk-pick { position: relative; border: 2px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 5px 5px 0 var(--shadow); padding: 14px 16px 14px 54px; }
.rk-pick .rk-rank { position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--ball); color: #16192b; font-family: var(--disp); font-weight: 800; display: grid; place-items: center; border: 2px solid #16192b; }
.rk-pick h3 { margin: 0 0 6px; font-size: 20px; }
.rk-pick .rk-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
.rk-pick .rk-chips span { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--line); }
.rk-pick .rk-for { margin: 0 0 6px; }
.rk-pick .rk-note-p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.rk-pick .rk-shops { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.rk-pick .rk-shops .btn { padding: 6px 12px; font-size: 13.5px; }
.rk-table { overflow-x: auto; margin: 14px 0 0; }
.rk-table table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; }
.rk-table th, .rk-table td { text-align: left; padding: 7px 9px; border-bottom: 1.5px solid var(--line); vertical-align: top; }
.rk-table th { font-family: var(--disp); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
@media (max-width: 600px) { .rk-pick { padding-left: 16px; padding-top: 44px; } .rk-pick .rk-rank { left: 12px; top: 10px; } }

/* The Rally on a phone: the court shrinks to fit above the fold and the shot menu
   floats over the bottom of the screen, so the ball and the buttons are seen together */
@media (max-width: 700px) {
  .rally.playing .courtcard canvas { height: 42vh; width: auto; max-width: 100%; margin: 0 auto; }
  .rally.playing .courtcard .legend { display: none; }
  .rally.playing .rl-menu { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 2px solid var(--line); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(0, 0, 0, .2); max-height: 54vh; overflow-y: auto; }
  .rally.playing .rl-menu .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; }
  .rally.playing .rl-menu .opt { padding: 8px 10px; }
  .rally.playing .rl-menu .rl-opt .note { display: none; }
  .rally.playing .rl-dirs { margin-top: 8px; grid-template-columns: 1fr 1fr 1fr; }
  .rally.playing .rl-dirlabel { display: none; }
  .rally.playing .rl-dirs .btn { padding: 8px 6px; }
  .rally.playing .rl-menu .rf-bar { margin-bottom: 6px; }
}
.pill.pop, .btn.pop { animation: pop .38s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
.pill.streak { background: var(--ball); color: #16192b; border-color: #16192b; }
/* the shot menu says whose ball it is; a call to your partner is blue */
.rl-menu::before { content: 'Your shot'; display: block; font-family: var(--disp); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: var(--ink-2); margin-bottom: 6px; }
.rl-menu.calling::before { content: 'Call it for your partner'; color: var(--blue-d); }
.rl-menu.calling .rl-opt { border-color: var(--blue); }
.rl-menu.calling .rf-bar i { background: var(--blue); }
.rl-opt.rl-mine { background: #16192b; color: var(--ball); }
.rl-opt.rl-mine .note { color: #d9dcea; }
/* the decision score and the record kept on this device */
.rl-dscore { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; border: 2px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 5px 5px 0 var(--shadow); padding: 12px 16px; margin: 0 0 14px; }
.rl-dnum { grid-row: 1 / 3; font-family: var(--disp); font-size: 46px; font-weight: 800; line-height: 1; color: var(--blue-d); }
.rl-dlabel { font-family: var(--disp); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.rl-dgrade { font-size: 14.5px; }
.rl-dscore.pop { animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
.rl-record { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--ink-2); margin: 10px 0 0; }
.rl-record b { color: var(--ink); }
.rl-take { border-left: 4px solid var(--ball); padding-left: 10px; }
.courtcard canvas.shake { animation: shake .32s ease-out; }
@keyframes shake { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, -1px); } }
.rl-menu[data-head]::before { content: attr(data-head); }
.rl-times { font-weight: 800; color: var(--blue-d); }
.rl-play .verdict { font-size: 15.5px; }
.rl-play .verdict.pop { animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
.rl-guide { display: inline-block; margin-left: 6px; font-weight: 700; color: var(--blue-d); }
/* your last seven days */
.recent { margin: 26px 0 0; }
.recent ol { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.recent li { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); padding: 8px 12px; }
.recent li a { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 650; }
.recent .res { font-family: var(--disp); font-weight: 800; font-size: 13px; }
.recent .res.hit { color: #1f8f4e; } .recent .res.miss { color: #c2453a; } .recent .res.none { color: var(--ink-2); font-weight: 600; }
