/* Palette mirrors the app's design tokens (packages/ui/src/theme/tokens.ts). */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f3eee7;
  --border: #e6ded4;
  --text: #1f1b18;
  --text-muted: #6b625b;
  --primary: #b85c38;
  --primary-soft: #f6e3d8;
  --on-primary: #ffffff;
  --radius: 14px;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171412;
    --surface: #211d1a;
    --surface-2: #2a2521;
    --border: #3a332e;
    --text: #f3eee7;
    --text-muted: #b5aaa0;
    --primary: #e08a63;
    --primary-soft: #3b2a22;
    --on-primary: #1f1b18;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  z-index: 10;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
}

.wordmark {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.wordmark .dot {
  color: var(--primary);
}

nav.site {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

a {
  color: var(--primary);
  text-underline-offset: 0.15em;
}
a:hover {
  text-decoration-thickness: 2px;
}
a:focus-visible,
.skip:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: var(--measure);
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.05rem;
  margin: 1.75rem 0 0.5rem;
}

p,
li {
  max-width: var(--measure);
}

.lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: var(--measure);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: 2.5rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.note {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 2rem 0;
}
.note p {
  margin: 0;
}

.meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

details {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  padding-right: 1.5rem;
  position: relative;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  position: absolute;
  right: 0.25rem;
  color: var(--primary);
  font-weight: 400;
}
details[open] summary::after {
  content: '\2212';
}
details p:first-of-type {
  margin-top: 0.6rem;
}

footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: space-between;
}
footer.site nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
