/* Curious Koko — stylesheet for the static, crawlable content pages
   (about / learning / parents / privacy / terms / cookies / contact).

   These pages are deliberately plain HTML served straight from Firebase
   Hosting: no JavaScript, no framework, no build step. A crawler that never
   runs a line of JS still sees every word. The game itself lives at "/". */

:root {
  --ink: #1a2a1f;
  --ink-soft: #46584c;
  --paper: #fff8ec;
  --paper-edge: #ffe7bf;
  --surface: #ffffff;
  --forest-deep: #0f3d24;
  --forest-mid: #1f6b3a;
  --forest-leaf: #3aa05a;
  --violet: #6b3fd4;
  --rule: #e6dcc8;
  --font: "Fredoka", "Baloo 2", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f6f0;
    --ink-soft: #b9c9bd;
    --paper: #10241a;
    --paper-edge: #1b3a29;
    --surface: #16311f;
    --forest-deep: #9be7a6;
    --forest-mid: #7fd8a0;
    --violet: #c3a7ff;
    --rule: #26492f;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

/* ---- Header & navigation ------------------------------------------------ */

.site-header {
  background: var(--forest-deep);
  border-bottom: 4px solid var(--forest-leaf);
}

@media (prefers-color-scheme: dark) {
  .site-header { background: #0a1a12; }
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff8ec;
  text-decoration: none;
}

.brand:hover { text-decoration: underline; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
}

.site-nav a {
  color: #d8f3dd;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible { border-bottom-color: #9be7a6; }

.site-nav a[aria-current="page"] {
  color: #fff8ec;
  border-bottom-color: #9be7a6;
}

.nav-play {
  background: var(--forest-leaf);
  color: #06180e !important;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.3rem 1rem !important;
  border-bottom: none !important;
}

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

main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

main.wide { max-width: 62rem; }

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 0.4rem;
  color: var(--forest-deep);
}

@media (prefers-color-scheme: dark) {
  h1 { color: var(--forest-deep); }
}

h2 {
  font-size: clamp(1.35rem, 3.2vw, 1.7rem);
  margin: 2.5rem 0 0.6rem;
  padding-top: 0.4rem;
  border-top: 2px solid var(--rule);
  color: var(--forest-mid);
}

h3 {
  font-size: 1.15rem;
  margin: 1.6rem 0 0.4rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0 0 2rem;
}

.updated {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 2rem;
}

p, ul, ol, dl { margin: 0 0 1rem; }

ul, ol { padding-left: 1.4rem; }

li { margin-bottom: 0.4rem; }

a { color: var(--violet); }

strong { font-weight: 700; }

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

.card {
  background: var(--surface);
  border: 2px solid var(--paper-edge);
  border-radius: 16px;
  padding: 1.1rem 1.3rem;
  margin: 0 0 1.25rem;
}

.card h3 { margin-top: 0; }

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

.callout {
  background: var(--surface);
  border-left: 6px solid var(--forest-leaf);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
}

.table-scroll { overflow-x: auto; margin-bottom: 1.25rem; }
.table-scroll table { margin-bottom: 0; }

th, td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th {
  font-weight: 700;
  color: var(--forest-mid);
  border-bottom-width: 2px;
}

.toc {
  background: var(--surface);
  border: 2px solid var(--paper-edge);
  border-radius: 16px;
  padding: 1rem 1.3rem;
  margin-bottom: 2rem;
}

.toc ul { margin-bottom: 0; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }

.btn {
  display: inline-block;
  background: var(--forest-leaf);
  color: #06180e;
  font-weight: 700;
  text-decoration: none;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
}

.btn:hover { background: var(--forest-mid); color: #fff8ec; }

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

.site-footer {
  background: var(--forest-deep);
  color: #d8f3dd;
  padding: 2rem 1.25rem;
  font-size: 0.95rem;
}

@media (prefers-color-scheme: dark) {
  .site-footer { background: #0a1a12; }
}

.site-footer-inner { max-width: 68rem; margin: 0 auto; }

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

.site-footer a { color: #9be7a6; }

.site-footer p { margin-bottom: 0.5rem; }

/* ---- Ad slots ----------------------------------------------------------- */

/* Reserved space for a Google AdSense unit. Kept well clear of any control the
   child taps, and never inside the game canvas — accidental clicks are an
   AdSense policy violation, and this site's readers are children. */
.ad-slot {
  margin: 2.5rem 0;
  min-height: 90px;
  text-align: center;
}

.ad-slot::before {
  content: "Advertisement";
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

/* Screen-reader-only text (table captions that would be redundant on screen). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
