/* Chill Creatures site. Calorie Tape pages use its brand ramp (calorie-tape/docs/brand.md). */
:root {
  color-scheme: light dark;
  --page: #f8eef1;
  --card: #ffffff;
  --ink: #3a111d;
  --text: #2a1017;
  --muted: #6e4652;
  --accent: #7b2d41;
  --rule: #ead6dc;
  --display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #3a111d;
    --card: #4a1826;
    --ink: #eed7de;
    --text: #f6e9ed;
    --muted: #c9a3af;
    --accent: #f4a6bd;
    --rule: #5a2233;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 1rem 5rem;
  animation: rise 0.5s ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
}

/* Header: the app's mark and wordmark. */
header.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 3rem;
}

header.brand img { width: 2.25rem; height: 2.25rem; }

header.brand a {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}

h1, h2 {
  color: var(--ink);
  font-family: var(--display);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.15; margin: 0 0 0.75rem; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 0 0 0.75rem; }
h3 { font-size: 1.0625rem; margin: 1.5rem 0 0.25rem; }

p, ul { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.lede { color: var(--muted); font-size: 1.1875rem; line-height: 1.5; margin-bottom: 2.5rem; }
.updated { color: var(--muted); font-size: 0.9375rem; margin-bottom: 2.5rem; }

/* Legal pages: one section per topic, secondary text like praybara's legal layout. */
section { margin-bottom: 2.5rem; }
section p, section li { color: var(--muted); }
section strong, section h3 { color: var(--text); }

.card {
  background: var(--card);
  border-radius: 1.25rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.card h2 { margin-top: 0; }

nav.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-weight: 500;
}

footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding-top: 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

footer nav.links { margin-bottom: 1rem; }
footer nav.links a { color: var(--muted); text-decoration: none; }
footer nav.links a:hover { color: var(--text); }

.mark-dark { display: none; }

@media (prefers-color-scheme: dark) {
  .mark-light { display: none; }
  .mark-dark { display: inline; }
}
