/* Shared styles for the guide pages (basic strategy chart, Hi-Lo, true count,
   trainer demo, responsible play). Same tokens, type and header/footer as
   site/index.html, so every page reads as one site. */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2191-2193, U+2212, U+2215, U+2265, U+2660-2667, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: dark;
  --bg: #0D1420;
  --panel: #111827;
  --panel-2: #151E2E;
  --line: #2C3648;
  --line-soft: #1E2738;
  --fg: #E9EEF8;
  --muted: #94A3B8;
  --cyan: #22D3EE;
  --gold: #F3B640;
  --pink: #F472B6;
  --hcell: #1C2434;
  --ink: #0D1420;
  --glow-maroon: rgba(122, 30, 52, 0.30);
  --glow-teal: rgba(14, 86, 104, 0.32);
  --shadow: rgba(3, 6, 12, 0.55);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-eyebrow: 0.75rem;
  --t-small: 0.875rem;
  --t-body: 1.0625rem;
  --t-lead: 1.1875rem;
  --t-h2: clamp(1.45rem, 2.8vw, 1.9rem);
  --t-h1: clamp(2.1rem, 5vw, 3.2rem);

  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--fg);
  background:
    radial-gradient(70vw 55vw at -10% 105%, var(--glow-maroon), transparent 62%),
    radial-gradient(70vw 55vw at 110% 90%, var(--glow-teal), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--cyan); text-underline-offset: 0.18em; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }

.eyebrow {
  margin: 0;
  font-size: var(--t-eyebrow);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: var(--t-h1); line-height: 1.06; font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: var(--t-h2); line-height: 1.2; font-weight: 700; }
h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: var(--t-lead); color: var(--muted); }
.fine { font-size: var(--t-small); color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.4rem;
  border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none; letter-spacing: 0.005em;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { transform: translateY(-1px); background: #F7C463; }
.btn-ghost { border: 1px solid var(--line); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-sm { min-height: 40px; padding: 0 1.1rem; font-size: 0.9375rem; }

/* Header */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(13, 20, 32, 0.82);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.top-in { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.mark { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; gap: 0.3rem; color: var(--fg); }
.mark-1 { font-weight: 700; font-size: 1.25rem; letter-spacing: 0.01em; }
.spade { color: var(--cyan); font-size: 0.72em; vertical-align: 0.32em; margin-left: 0.3em; }
.mark-2 { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 0.9375rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
@media (max-width: 820px) {
  .nav { display: none; }
  .top-in .btn { margin-left: auto; }
}

/* Article */
.article { padding-block: clamp(2.2rem, 5vw, 4rem) 0; display: grid; gap: clamp(2rem, 4vw, 2.8rem); }
.article-head { display: grid; gap: 1rem; }
.prose { display: grid; gap: 1.1rem; }
.prose h2 { margin-top: 0.8rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.45rem; }
.prose li::marker { color: var(--cyan); }
.prose strong { font-weight: 650; }
.prose .muted { color: var(--muted); }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.4rem);
}
.panel > * + * { margin-top: 0.7rem; }

.shot { margin: 0; display: grid; gap: 0.7rem; }
.shot img { width: 100%; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 24px 60px var(--shadow); }
.shot figcaption { color: var(--muted); font-size: var(--t-small); }

/* Hi-Lo value buckets */
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.values li { border-radius: 12px; padding: 0.8rem 0.5rem; text-align: center; font-weight: 700; color: var(--ink); line-height: 1.25; }
.values li small { display: block; font-size: 0.8125rem; font-weight: 600; opacity: 0.8; }
.values .p { background: var(--cyan); }
.values .z { background: #94A3B8; }
.values .m { background: var(--pink); }

/* Worked examples */
.examples { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.examples th, .examples td { border-bottom: 1px solid var(--line); padding: 0.55rem 0.5rem; text-align: left; }
.examples th { color: var(--muted); font-weight: 600; font-size: var(--t-small); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Strategy chart (generated by tools/gen_strategy_chart.py) */
.chart-block { display: grid; gap: 0.6rem; }
.chart { border-collapse: separate; border-spacing: 4px; font-size: 0.9375rem; margin-left: -4px; }
.chart caption { text-align: left; font-weight: 700; font-size: 1.125rem; padding: 0 4px 0.35rem; }
.chart th { color: var(--muted); font-weight: 600; text-align: center; padding: 0.15rem 0.2rem; }
.chart thead th:first-child, .chart tbody th { text-align: left; white-space: nowrap; padding-right: 0.6rem; color: var(--fg); font-weight: 650; }
.chart tbody th small { color: var(--muted); font-weight: 500; }
.chart td { text-align: center; font-weight: 800; border-radius: 7px; min-width: 2.4rem; padding: 0.4rem 0.2rem; }
.chart td abbr { text-decoration: none; }
.p-H { background: var(--hcell); color: var(--fg); }
.p-S { background: var(--cyan); color: var(--ink); }
.p-D, .p-Ds { background: var(--gold); color: var(--ink); }
.p-P { background: var(--pink); color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--t-small); }
.legend li { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend b { display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.6rem; border-radius: 6px; font-size: 0.8125rem; padding: 0 0.3rem; }
@media (max-width: 560px) {
  .chart { border-spacing: 2px; font-size: 0.75rem; margin-left: -2px; }
  .chart caption { font-size: 1rem; }
  .chart td { min-width: 1.55rem; padding: 0.32rem 0.05rem; border-radius: 5px; }
  .chart th { padding: 0.1rem 0.05rem; }
  .chart thead th:first-child, .chart tbody th { padding-right: 0.3rem; }
  .chart tbody th small { display: block; font-size: 0.6875rem; }
}

/* Related links + call to action */
.related { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.related a { display: block; text-decoration: none; color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0.85rem 1rem; }
.related a:hover { border-color: var(--cyan); }
.related a span { display: block; color: var(--muted); font-size: var(--t-small); }
.cta {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(1.2rem, 3.5vw, 1.8rem); display: grid; gap: 0.9rem; justify-items: start;
  box-shadow: 0 24px 60px var(--shadow);
}
.cta .btn { max-width: 100%; }

/* Footer (same as the home page) */
.foot { margin-top: clamp(4rem, 9vw, 6rem); border-top: 1px solid var(--line-soft); background: rgba(10, 15, 24, 0.6); }
.foot-in { padding-block: 2.4rem 2.8rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.5rem 3rem; align-items: start; }
.foot-txt { display: grid; gap: 0.6rem; color: var(--muted); font-size: 0.875rem; max-width: 40rem; }
.foot-txt .by { color: var(--fg); font-weight: 600; }
.foot-txt .nc-tag { height: 1.6rem; width: auto; display: block; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.35rem 1.2rem; }
.foot-links a { color: var(--fg); text-decoration: none; }
.foot-links a:hover { color: var(--cyan); }
@media (max-width: 640px) { .foot-in { grid-template-columns: minmax(0, 1fr); } }
