/*
  Stylesheet for the static content pages generated by scripts/build-content.ts.
  These pages ship no JavaScript, so this is plain CSS.

  This is NOT the front page's design. The root URL still serves the game; the
  content pages are reading surfaces (long-form text and strategy tables), so
  they are light and typographic rather than dark like the game table.

  Kept in public/ (not src/) so the generator can link one deterministic,
  unhashed URL.
*/

:root {
  --felt-dark: #061f10;
  --felt: #0d4420;
  --gold: #c9a84c;
  --gold-dim: #a08030;
  --cream: #f4efe4;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --paper: #fbf9f4;
  --rule: #e2dccd;

  --act-hit: #14622f;
  --act-hit-bg: rgba(46, 204, 113, 0.18);
  --act-stand: #a8231a;
  --act-stand-bg: rgba(231, 76, 60, 0.15);
  --act-double: #7a5c00;
  --act-double-bg: rgba(241, 196, 15, 0.22);
  --act-split: #1b5f90;
  --act-split-bg: rgba(52, 152, 219, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

h1,
h2,
h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: normal;
  line-height: 1.2;
  color: var(--felt-dark);
}

h1 {
  font-size: 2.4rem;
  letter-spacing: -0.015em;
}

h2 {
  font-size: 1.75rem;
  margin-top: 2.6rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.2rem;
  margin-top: 1.8rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.1rem;
}

a {
  color: var(--felt);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--gold-dim);
}

strong {
  font-weight: 600;
}

/* ---------- Header / nav ---------- */

.site-header {
  background: var(--felt-dark);
  color: var(--cream);
  border-bottom: 2px solid var(--gold);
}

.site-header .inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand em {
  font-style: normal;
  color: var(--gold);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  font-size: 0.92rem;
}

.site-nav a {
  color: rgba(244, 239, 228, 0.86);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* ---------- Layout ---------- */

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

main.wide {
  max-width: 980px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--ink-soft);
}

.byline {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--gold);
  color: var(--felt-dark);
  border: 2px solid var(--gold);
}

.btn:hover {
  background: #dcbb63;
  border-color: #dcbb63;
  color: var(--felt-dark);
}

/* ---------- Content blocks ---------- */

.callout {
  background: #fff;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  padding: 1.1rem 1.3rem;
  margin: 1.75rem 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  font-size: 0.9rem;
  margin: 1rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.swatch {
  display: inline-block;
  width: 1.6rem;
  text-align: center;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.1rem 0;
}

/* ---------- Strategy chart tables ---------- */

.table-scroll {
  overflow-x: auto;
  margin: 1rem 0 2rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #fff;
}

table.chart {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.92rem;
}

table.chart caption {
  caption-side: top;
  text-align: left;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  color: var(--felt);
  padding: 0.9rem 1rem 0.6rem;
}

table.chart th,
table.chart td {
  border: 1px solid var(--rule);
  padding: 0.5rem 0.35rem;
  text-align: center;
  white-space: nowrap;
}

table.chart thead th {
  background: var(--felt);
  color: var(--cream);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

table.chart tbody th {
  background: #f2eee3;
  font-weight: 600;
  text-align: right;
  padding-right: 0.75rem;
}

td.a-H {
  background: var(--act-hit-bg);
  color: var(--act-hit);
  font-weight: 700;
}

td.a-S {
  background: var(--act-stand-bg);
  color: var(--act-stand);
  font-weight: 700;
}

td.a-D {
  background: var(--act-double-bg);
  color: var(--act-double);
  font-weight: 700;
}

td.a-P {
  background: var(--act-split-bg);
  color: var(--act-split);
  font-weight: 700;
}

table.plain {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0 2rem;
  font-size: 0.95rem;
  background: #fff;
}

table.plain th,
table.plain td {
  border: 1px solid var(--rule);
  padding: 0.6rem 0.8rem;
  text-align: left;
}

table.plain thead th {
  background: var(--felt);
  color: var(--cream);
  font-size: 0.85rem;
}

/* ---------- FAQ ---------- */

.faq {
  margin: 1.5rem 0 2rem;
}

.faq details {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  padding: 0;
}

.faq summary {
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  color: var(--felt);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: ' +';
  color: var(--gold-dim);
  font-weight: 700;
}

.faq details[open] summary::after {
  content: ' \2212';
}

.faq details > p {
  padding: 0 1.1rem 1rem;
  margin: 0;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--felt-dark);
  color: rgba(244, 239, 228, 0.7);
  font-size: 0.88rem;
  margin-top: 3rem;
}

.site-footer .inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.site-footer a {
  color: rgba(244, 239, 228, 0.85);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-bottom: 1rem;
}

.site-footer .disclaimer {
  border-top: 1px solid rgba(244, 239, 228, 0.16);
  padding-top: 1rem;
  max-width: 640px;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  body {
    font-size: 17px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.45rem;
  }
}

@media print {
  .site-header,
  .site-footer {
    display: none;
  }
}
