/* Guide pages (rules, doubling cube, grading, glossary). Same colours and fonts as the app. */
:root {
  color-scheme: dark;
  --bg: #1f0f0f;
  --panel: #2c1716;
  --panel-2: #361d1b;
  --line: #4b2c28;
  --ink: #f2e7d7;
  --muted: #bfa898;
  --brass: #d9b48a;
  --primary: #eadcc2;
  --on-primary: #3b1613;
  --best: #73d18a;
  --good: #a9d66b;
  --inacc: #e8c64a;
  --mistake: #ef9145;
  --blunder: #ef5f55;
  --title: "Fraunces", Georgia, serif;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
/* Light mode, the default (Settings > Dark mode in the app, kept in localStorage "bgcoach.theme"). */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f1e8d9;
  --panel: #fbf7ef;
  --panel-2: #f0e6d6;
  --line: #ddcdb6;
  --ink: #2a1513;
  --muted: #7a5f52;
  --brass: #8a5a2b;
  --primary: #6e2624;
  --on-primary: #f8efe0;
  --best: #2a7f45;
  --good: #4f7410;
  --inacc: #876500;
  --mistake: #ad4f0c;
  --blunder: #bf3a32;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--body);
}
a {
  color: var(--brass);
  text-underline-offset: 3px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 16px;
}
.brand {
  font: 600 22px/1.2 var(--title);
  color: var(--ink);
  text-decoration: none;
}
.play {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-primary);
  font: 700 15px/1.2 var(--display);
  text-decoration: none;
  white-space: nowrap;
}
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 40px;
}
.crumbs {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
}
.crumbs a {
  color: var(--muted);
}
h1 {
  margin: 0 0 12px;
  font: 800 clamp(30px, 6vw, 42px) / 1.15 var(--display);
  letter-spacing: -0.01em;
}
h2 {
  margin: 36px 0 10px;
  font: 700 24px/1.25 var(--display);
}
h3 {
  margin: 24px 0 6px;
  font: 600 19px/1.3 var(--display);
}
.lede {
  font-size: 19px;
  color: var(--ink);
}
p,
ul,
ol {
  margin: 0 0 14px;
}
li {
  margin-bottom: 6px;
}
strong {
  font-weight: 600;
}
code,
.mv {
  font: 500 0.92em var(--mono);
}
table {
  width: 100%;
  margin: 6px 0 18px;
  border-collapse: collapse;
  font-size: 16px;
}
th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-weight: 600;
}
td.n,
th.n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.box {
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.box p:last-child {
  margin-bottom: 0;
}
.cta {
  margin: 36px 0 0;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--brass) 45%, var(--line));
  background: var(--panel);
}
.cta p {
  margin: 0 0 12px;
}
dl.terms dt {
  margin-top: 18px;
  font: 700 18px/1.3 var(--display);
  scroll-margin-top: 16px;
}
dl.terms dd {
  margin: 4px 0 0;
}
.toc {
  columns: 2 160px;
  padding-left: 18px;
}
.related {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.related h2 {
  margin-top: 0;
  font-size: 19px;
}
.related ul {
  padding-left: 18px;
}
footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 32px;
  font-size: 14px;
  color: var(--muted);
}
footer a {
  color: var(--muted);
}
.g-best {
  color: var(--best);
}
.g-good {
  color: var(--good);
}
.g-inacc {
  color: var(--inacc);
}
.g-mistake {
  color: var(--mistake);
}
.g-blunder {
  color: var(--blunder);
}
