/* CookCycle's website: the app's look (black and white, white cards on a soft grey page,
   pill buttons), its colours from src/lib/theme/tokens.js. System fonts only: nothing is
   loaded from anywhere else. */

:root {
  color-scheme: light dark;
  --background: #f2f2f2;
  --foreground: #0d0d0d;
  --muted: #0000000d;
  --muted-foreground: #6b6b6b;
  --border: #e0e0e0;
  --surface: #ffffff;
  --primary: #0d0d0d;
  --primary-foreground: #ffffff;
  --success: #067647;
  --success-soft: #dcfae6;
  --warning: #b54708;
  --warning-soft: #fdead7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #000000;
    --foreground: #ececec;
    --muted: #ffffff1a;
    --muted-foreground: #9b9b9b;
    --border: #333333;
    --surface: #1a1a1a;
    --primary: #ececec;
    --primary-foreground: #0d0d0d;
    --success: #47cd89;
    --success-soft: #103a26;
    --warning: #fdb022;
    --warning-soft: #3b240f;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family:
    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

.page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and footer */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.top nav {
  display: flex;
  gap: 18px;
  font-size: 15px;
}

.top nav a,
.bottom a {
  color: var(--muted-foreground);
  text-decoration: none;
}

.top nav a:hover,
.bottom a:hover {
  color: var(--foreground);
}

.bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 32px 0 48px;
  color: var(--muted-foreground);
  font-size: 14px;
}

/* Type */

h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.08;
  letter-spacing: -1px;
  font-weight: 600;
}

h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.2px;
}

h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.lead {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 20px;
  line-height: 1.5;
}

.muted {
  color: var(--muted-foreground);
}

.small {
  font-size: 14px;
}

/* Blocks */

.hero {
  display: grid;
  gap: 20px;
  padding: 48px 0 40px;
}

.hero .icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
}

.pill.secondary {
  background: var(--muted);
  color: var(--foreground);
}

.pill[hidden] {
  display: none;
}

.cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 22px;
  border-radius: 24px;
  background: var(--surface);
}

.card p {
  margin: 0;
  color: var(--muted-foreground);
}

.section {
  display: grid;
  gap: 16px;
  padding: 24px 0;
}

.notice {
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: 24px;
  background: var(--surface);
}

.badge {
  justify-self: start;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}

.badge.success {
  background: var(--success-soft);
  color: var(--success);
}

.badge.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

/* Questions and answers */

details {
  padding: 16px 22px;
  border-radius: 20px;
  background: var(--surface);
}

details + details {
  margin-top: 8px;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

details p {
  margin: 10px 0 2px;
  color: var(--muted-foreground);
}

/* Legal pages, made from docs/*.md */

.prose {
  padding: 8px 0 24px;
}

.prose h1 {
  font-size: 34px;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.prose h2 {
  margin: 36px 0 10px;
}

.prose h3 {
  margin: 24px 0 8px;
}

.prose p,
.prose li {
  color: var(--foreground);
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

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

.prose em {
  color: var(--muted-foreground);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--muted);
}

.table {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: 16px;
  background: var(--surface);
}

.table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.table th,
.table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

.table th {
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.table tr + tr td {
  border-top: 1px solid var(--border);
}
