/* Shared styles for content pages. Palette + fonts mirror the game. */

:root {
  --text: #3d4a35;
  --text-soft: #5a6b52;
  --page-bg: #f5f1e8;
  --card: #faf7ef;
  --card-border: #e0d8c6;
  --sage: #8fa583;
  --sage-deep: #7a9270;
  --terra: #d98b5f;
  --terra-dark: #c6774c;
  --forest: #3d4a35;
  --rule: #e0d8c6;
  --code-bg: #eae4d6;
}

[data-theme="dark"] {
  --text: #eef0e2;
  --text-soft: #a7b498;
  --page-bg: #191f14;
  --card: #232c1b;
  --card-border: #3c472e;
  --sage: #6f8560;
  --sage-deep: #86a877;
  --terra: #d98b5f;
  --terra-dark: #dd8f63;
  --forest: #a9c096;
  --rule: #3c472e;
  --code-bg: #1e2617;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--card);
}

.site-header__inner,
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--terra-dark);
}

/* ---------- Typography ---------- */

main {
  padding: 44px 0 64px;
}

h1, h2, h3 {
  font-family: Fraunces, Georgia, serif;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.1rem; margin: 0 0 10px; }
h2 { font-size: 1.42rem; margin: 2.4em 0 0.6em; }
h3 { font-size: 1.12rem; margin: 1.9em 0 0.5em; }

p, ul, ol { margin: 0 0 1.15em; }
ul, ol { padding-left: 1.35em; }
li { margin-bottom: 0.45em; }

a { color: var(--terra-dark); }

strong { font-weight: 800; }

.lede {
  font-size: 1.12rem;
  color: var(--text-soft);
  margin-bottom: 2em;
}

.updated {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin: 0 0 2.4em;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.6em 0;
}

/* ---------- Components ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 0 0 1.3em;
}

.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.callout {
  border-left: 3px solid var(--sage);
  background: var(--card);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 1.6em 0;
}

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

.word {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--code-bg);
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 0.92em;
  font-weight: 700;
  letter-spacing: 0.06em;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4em;
  font-size: 0.96rem;
}

th, td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
}

th {
  font-weight: 800;
  color: var(--text);
}

.table-scroll { overflow-x: auto; }

/* Article index */

.guide-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-list li {
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
  margin: 0;
}

.guide-list li:last-child { border-bottom: 0; }

.guide-list a {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.14rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  display: block;
  margin-bottom: 3px;
}

.guide-list a:hover { color: var(--terra-dark); }

.guide-list p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.97rem;
  line-height: 1.6;
}

.btn {
  display: inline-block;
  background: var(--sage);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  padding: 11px 22px;
  border-radius: 10px;
}

.btn:hover { background: var(--sage-deep); }

/* Ad slots: reserve space so ads don't shift layout when they load. */
.ad-slot {
  margin: 2.4em 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--card);
  padding: 30px 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}

.site-footer a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--terra-dark);
  text-decoration: underline;
}

.site-footer p { margin: 0; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.28rem; }
  main { padding: 32px 0 48px; }
  .site-header__inner { padding-top: 12px; padding-bottom: 12px; }
}
