/* HistoryRoots — base.css
   Reset, tokens, typography primitives */

:root {
  /* Colour tokens (see TZ section 8.1) */
  --color-slate: #38434F;
  --color-slate-muted: #6B7684;
  --color-rust: #A2521D;
  --color-bg: #EFEAE2;
  --color-bg-alt: #E4DDD1;
  --color-text: #22262B;
  --color-text-on-slate: #EFEAE2;
  --color-border: #D3CBBC;
  --color-focus: #A2521D;

  /* Typography */
  --font-heading: "Zilla Slab", Georgia, serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --content-max: 1120px;
  --radius-card: 4px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-slate);
  margin: 0 0 var(--space-2);
  line-height: 1.2;
}

h1 {
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw + 1rem, 2.5rem);
}

h2 {
  font-weight: 600;
  font-size: clamp(1.35rem, 2vw + 1rem, 1.75rem);
  margin-top: var(--space-4);
}

h3 {
  font-weight: 600;
  font-size: 1.15rem;
}

p { margin: 0 0 var(--space-2); }

a {
  color: var(--color-rust);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover { text-decoration-thickness: 2px; }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

strong { font-weight: 600; }

.verify {
  font-size: 0.85em;
  color: var(--color-slate);
  font-style: italic;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0;
  top: -3rem;
  background: var(--color-slate);
  color: var(--color-text-on-slate);
  padding: var(--space-1) var(--space-2);
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  text-align: left;
  padding: var(--space-1) var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

th { font-family: var(--font-heading); font-weight: 600; color: var(--color-slate); }

caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: var(--space-1);
}

[hidden] { display: none !important; }

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
  background: rgba(34, 38, 43, 0.82);
}

.age-gate__box {
  max-width: 440px;
  width: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-3);
  box-shadow: 0 12px 40px rgba(34, 38, 43, 0.35);
  text-align: center;
}

.age-gate__box h2 {
  margin-top: 0;
  color: var(--color-slate);
}

.age-gate__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: var(--space-3) 0 var(--space-2);
}

.age-gate__actions button {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-card);
  cursor: pointer;
  border: 2px solid transparent;
}

#age-gate-yes {
  background: var(--color-rust);
  color: var(--color-text-on-slate);
  border-color: var(--color-rust);
}

#age-gate-yes:hover { background: #8a4518; }

#age-gate-no {
  background: transparent;
  color: var(--color-slate);
  border-color: var(--color-slate);
}

#age-gate-no:hover { background: var(--color-bg-alt); }

.age-gate__note {
  font-size: 0.82em;
  color: var(--color-slate-muted);
  margin-bottom: 0;
}
