/* Colors match apps/ios/SleepDebtCore/Sources/SleepDebtCore/ColorTokens.swift. */
:root {
  --background: rgb(246 242 235);
  --card: rgb(255 253 249);
  --text: rgb(33 27 20);
  --secondary: rgb(107 97 86);
  --accent: rgb(176 82 30);
  --on-accent: rgb(255 253 249);
  --rule: rgb(33 27 20 / 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: rgb(0 0 0);
    --card: rgb(26 20 14);
    --text: rgb(230 190 140);
    --secondary: rgb(170 130 95);
    --accent: rgb(214 120 70);
    --on-accent: rgb(20 14 8);
    --rule: rgb(230 190 140 / 0.16);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main,
header,
footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 24px;
}

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

.wordmark {
  font-family: ui-serif, "New York", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

h1,
h2 {
  font-family: ui-serif, "New York", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  margin: 64px 0 16px;
}

h2 {
  font-size: 1.6rem;
  margin: 0 0 16px;
}

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

p {
  margin: 0 0 16px;
}

.lede {
  font-size: 1.2rem;
  color: var(--secondary);
  max-width: 34rem;
}

.badge {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

section {
  padding: 48px 0;
  border-top: 1px solid var(--rule);
}

section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.card {
  margin: 40px 0 0;
  padding: 24px;
  border-radius: 20px;
  background: var(--card);
  max-width: 22rem;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
}

.card .time {
  font-family: ui-serif, "New York", Georgia, serif;
  font-size: 3.2rem;
  font-weight: 600;
  line-height: 1.1;
  margin: 4px 0 12px;
}

.card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  margin: 0;
  color: var(--secondary);
}

.card dd {
  margin: 0;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.card small,
.note {
  display: block;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--secondary);
}

.points {
  display: grid;
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.points p {
  margin: 0;
  color: var(--secondary);
}

.sources {
  padding: 0;
  margin: 0;
  list-style: none;
}

.sources li {
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}

.sources cite {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--secondary);
}

footer {
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--secondary);
}

footer nav {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

@media (min-width: 40rem) {
  .points {
    grid-template-columns: repeat(3, 1fr);
  }
}
