/* PantryRun site — shared styles.
   Colour tokens mirror the app's theme (accent #10B981, dark surface #0B0F19). */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #059669;
  --accent-soft: #ecfdf5;
  --border: #e2e8f0;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f19;
    --surface: #141b2d;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --accent: #34d399;
    --accent-soft: #0f2f26;
    --border: #263349;
    --shadow: none;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  padding: 0 20px 64px;
}

.wrap { max-width: 720px; margin: 0 auto; }

/* ── Masthead ─────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.mark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.mark span { color: var(--accent); }

.masthead nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.masthead nav a { color: var(--muted); text-decoration: none; }
.masthead nav a:hover { color: var(--accent); }

/* ── Typography ───────────────────────────────────────────── */

h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 8px;
}

h2 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 36px 0 10px;
  padding-top: 8px;
  scroll-margin-top: 20px;
}

h3 {
  font-size: 15px;
  font-weight: 650;
  margin: 22px 0 6px;
}

p { margin-bottom: 14px; }

ul, ol { margin: 0 0 16px 22px; }
li { margin-bottom: 7px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--accent-soft);
  padding: 1px 5px;
  border-radius: 4px;
}

.lede { font-size: 17px; color: var(--muted); margin-bottom: 4px; }
.stamp { font-size: 13px; color: var(--muted); margin-bottom: 28px; }

/* ── Blocks ───────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 18px 0 22px;
}

.callout p:last-child { margin-bottom: 0; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px 16px 38px;
  margin-bottom: 8px;
  font-size: 15px;
}

.toc li { margin-bottom: 4px; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 20px;
  font-size: 14.5px;
  display: block;
  overflow-x: auto;
}

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

th {
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Footer ───────────────────────────────────────────────── */

.foot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.foot .spacer { margin-left: auto; }

/* ── Landing ──────────────────────────────────────────────── */

.hero { padding: 20px 0 8px; }
.hero h1 { font-size: 38px; margin-bottom: 12px; }
.hero .lede { font-size: 18px; line-height: 1.55; margin-bottom: 24px; }

.pills { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }

.pill {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 13px;
  background: var(--surface);
}

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 8px 0 4px; }
.grid h3 { margin-top: 0; }
.grid p { margin-bottom: 0; color: var(--muted); font-size: 14.5px; }

@media (max-width: 520px) {
  .hero h1 { font-size: 30px; }
  body { padding: 0 16px 48px; }
  .card { padding: 18px; }
}
