/* EventMaker visual tokens (mirror of the app's palette; no external fonts or trackers). */
:root {
  color-scheme: light;
  --background: #faf7f2;
  --surface: #ffffff;
  --text: #2f2b28;
  --text-secondary: #5c544d;
  --muted: #746c63;
  --primary: #a34f39; /* terracottaAccessible: contrast on cream */
  --primary-surface: #f6e6df;
  --border: #ddd5cb;
  --warning-surface: #faf0d8;
  --warning-text: #76531c;
  --radius: 16px;
  --max-width: 720px;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  padding: 8px 12px;
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 8px;
  z-index: 10;
}

header.site,
main,
footer.site {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

header.site {
  padding-top: 24px;
  padding-bottom: 8px;
}

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

main {
  padding-bottom: 32px;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
  margin: 16px 0 4px;
}

h2 {
  font-size: 1.35rem;
  margin: 40px 0 8px;
  scroll-margin-top: 16px;
}

h3 {
  font-size: 1.05rem;
  margin: 24px 0 4px;
}

p,
li {
  overflow-wrap: anywhere;
}

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

li + li {
  margin-top: 6px;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 24px;
}

.summary,
.toc,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0;
}

.summary h2,
.toc h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.toc ol {
  margin: 0;
}

.placeholder {
  background: var(--warning-surface);
  color: var(--warning-text);
  border-radius: 6px;
  padding: 0 4px;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.95rem;
  background: var(--surface);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border: 1px solid var(--border);
}

th {
  background: var(--primary-surface);
}

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

.links {
  list-style: none;
  padding: 0;
}

.links a {
  display: block;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

footer.site {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 400px) {
  h1 {
    font-size: 1.7rem;
  }
}
