/* Shelf Life website. One stylesheet for every page.
   Type: Bricolage Grotesque (headings, wordmark) and Atkinson Hyperlegible Next
   (everything you read; designed by the Braille Institute for low-vision readers).
   Color: the app's herb green, with the same date colors the app uses
   (amber = use soon, tomato = today/expired). */
:root {
  --bg: #f5f8f6;          /* fridge white */
  --surface: #ffffff;
  --text: #16241d;        /* ink */
  --muted: #4f5f56;
  --line: #d6dfda;
  --brand: #2f6b4f;       /* herb */
  --brand-strong: #24583f;
  --brand-soft: #e3efe8;  /* mint wash */
  --link: #24583f;
  --amber: #8a5300;
  --amber-soft: #fbedd6;
  --tomato: #a3241b;
  --tomato-soft: #fbe3e0;
  --fresh: #2f6b4f;
  --fresh-soft: #e3efe8;
  --on-brand: #ffffff;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wide: 1120px;
  --read: 70ch;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1613;
    --surface: #17201b;
    --text: #e6eee9;
    --muted: #a9b7af;
    --line: #2a3530;
    --brand: #7cc4a0;
    --brand-strong: #9ad6b6;
    --brand-soft: #1c2b24;
    --link: #8fd3b0;
    --amber: #f2b45a;
    --amber-soft: #33270f;
    --tomato: #f2a39b;
    --tomato-soft: #3a1c19;
    --fresh: #8fd3b0;
    --fresh-soft: #1c2b24;
    --on-brand: #0f1613;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 18px/1.65 var(--body);
  font-optical-sizing: auto;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.skip {
  position: absolute; left: -999px; top: 8px; z-index: 10;
  background: var(--brand); color: var(--on-brand); padding: 10px 14px; border-radius: 8px; font-weight: 700;
}
.skip:focus { left: 8px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* ---------- Header ---------- */
header.site {
  max-width: var(--wide); margin: 0 auto; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
  font: 800 23px/1 var(--display); letter-spacing: -0.02em; font-stretch: 90%;
}
.wordmark svg { width: 30px; height: 30px; flex: none; }
header.site nav { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: 16px; padding: 6px 0; }
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
header.site nav a.nav-cta {
  color: var(--on-brand); background: var(--brand); padding: 8px 16px; border-radius: 999px; font-weight: 700;
}
header.site nav a.nav-cta:hover, header.site nav a.nav-cta[aria-current="page"] { color: var(--on-brand); background: var(--brand-strong); text-decoration: none; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--display); color: var(--text); font-optical-sizing: auto; }
h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 800; margin: 8px 0 16px; text-wrap: balance; }
h2 { font-size: clamp(26px, 3vw, 32px); line-height: 1.15; letter-spacing: -0.015em; font-weight: 750; margin: 56px 0 12px; text-wrap: balance; }
h3 { font-size: 21px; line-height: 1.3; font-weight: 700; margin: 28px 0 6px; }
p, ul, ol, table, dl { margin: 0 0 14px; }
li { margin-bottom: 6px; }
li::marker { color: var(--muted); }
strong { font-weight: 700; }
.lead { font-size: 21px; line-height: 1.55; color: var(--text); max-width: 60ch; }
.updated { color: var(--muted); font-size: 16px; margin: 0 0 24px; }
.small { color: var(--muted); font-size: 16px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 12px 22px; border-radius: 999px; background: var(--brand); color: var(--on-brand);
  font: 700 17px/1.2 var(--body); text-decoration: none; border: 2px solid var(--brand); cursor: pointer;
}
.button:hover { background: var(--brand-strong); border-color: var(--brand-strong); text-decoration: none; }
.button.plain { background: transparent; color: var(--link); border-color: var(--line); }
.button.plain:hover { border-color: var(--brand); background: var(--brand-soft); }
.button[disabled] { opacity: .5; cursor: default; }

/* ---------- Page frames ---------- */
main { max-width: var(--wide); margin: 0 auto; padding: 8px 24px 0; }
.page-head { max-width: var(--read); padding: 24px 0 8px; }
.page-head .lead { margin-bottom: 0; }

/* Long documents: reading column, with "On this page" beside it on wide screens. */
.doc { display: grid; gap: 0 56px; }
.doc .body { max-width: var(--read); min-width: 0; }
.doc .body > h2:first-child { margin-top: 24px; }
.toc { font-size: 16px; }
.toc h2 { font: 700 15px/1.3 var(--body); color: var(--muted); margin: 0 0 8px; letter-spacing: 0; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--text); border-left-color: var(--brand); }
.toc details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 8px 0 8px; }
.toc summary { cursor: pointer; font-weight: 700; color: var(--text); }
.toc details ol { margin-top: 10px; }
.doc .body h2 { padding-top: 20px; border-top: 1px solid var(--line); }
@media (min-width: 1000px) {
  .doc { grid-template-columns: minmax(0, 1fr) 240px; }
  .toc { grid-column: 2; grid-row: 1; }
  .doc .body { grid-column: 1; grid-row: 1; }
  .toc .sticky { position: sticky; top: 24px; padding-top: 32px; }
  .toc details { background: none; border: 0; padding: 0; margin: 0; }
  .toc summary { display: none; }
}
@media (max-width: 999px) {
  .toc h2 { display: none; }
}

/* Callouts and tables */
.box { background: var(--brand-soft); border-radius: 16px; padding: 18px 22px; margin: 20px 0; }
.box p:last-child, .box ul:last-child, .box ol:last-child { margin-bottom: 0; }
.box > :first-child { margin-top: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; margin: 0; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-size: 15px; color: var(--muted); font-weight: 700; background: var(--bg); }

/* ---------- Footer ---------- */
footer.site { margin-top: 96px; border-top: 1px solid var(--line); background: var(--surface); }
footer.site .inner {
  max-width: var(--wide); margin: 0 auto; padding: 40px 24px 48px;
  display: grid; gap: 28px; grid-template-columns: 1fr;
}
footer.site .about p { color: var(--muted); font-size: 16px; max-width: 36ch; margin: 10px 0 0; }
footer.site h2 { font: 700 15px/1.3 var(--body); color: var(--muted); margin: 0 0 8px; letter-spacing: 0; border: 0; padding: 0; }
footer.site ul { list-style: none; padding: 0; margin: 0; font-size: 16px; }
footer.site li { margin-bottom: 8px; }
footer.site .legal { grid-column: 1 / -1; color: var(--muted); font-size: 15px; margin: 0; }
@media (min-width: 760px) { footer.site .inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* ---------- Home ---------- */
.hero { display: grid; gap: 40px; align-items: center; padding: 32px 0 24px; }
.hero h1 { font-size: clamp(42px, 6.4vw, 72px); line-height: 1; letter-spacing: -0.035em; max-width: 13ch; }
.hero .lead { margin-bottom: 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .note { color: var(--muted); font-size: 16px; margin: 16px 0 0; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr 0.9fr; gap: 64px; padding: 56px 0 40px; } }

/* The "Use first" list: a little of what the app shows you. */
.shelf {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px 22px 10px;
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -32px rgba(22, 36, 29, .45);
  max-width: 460px; width: 100%; justify-self: center;
}
.shelf header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.shelf header strong { font: 750 22px/1.2 var(--display); letter-spacing: -0.01em; }
.shelf header span { color: var(--muted); font-size: 15px; }
.shelf ul { list-style: none; padding: 0; margin: 0; }
.shelf li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); margin: 0; }
.shelf li:first-child { border-top: 0; }
.shelf .what { flex: 1; min-width: 0; }
.shelf .what b { display: block; font-weight: 700; line-height: 1.3; }
.shelf .what small { color: var(--muted); font-size: 15px; }
.date {
  flex: none; font-weight: 700; font-size: 15px; line-height: 1; padding: 8px 12px; border-radius: 999px;
  border: 1.5px solid currentColor; white-space: nowrap;
}
.date.today { color: var(--tomato); background: var(--tomato-soft); }
.date.soon { color: var(--amber); background: var(--amber-soft); }
.date.fresh { color: var(--fresh); background: var(--fresh-soft); }

.features { display: grid; gap: 8px 48px; margin: 8px 0 0; padding: 0; list-style: none; }
.features li { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto 1fr; gap: 4px 16px; padding: 22px 0; border-top: 1px solid var(--line); margin: 0; }
.features svg { width: 32px; height: 32px; color: var(--brand); grid-row: span 2; margin-top: 2px; }
.features h3 { margin: 0; font-size: 22px; }
.features p { margin: 0; color: var(--muted); }
@media (min-width: 760px) { .features { grid-template-columns: 1fr 1fr; } }

.section-intro { max-width: 60ch; color: var(--muted); }
.band {
  margin: 72px 0 0; padding: 36px clamp(22px, 4vw, 48px); border-radius: 28px; background: var(--brand-soft);
  display: grid; gap: 20px 48px; align-items: center;
}
.band h2 { margin: 0 0 8px; }
.band p { margin: 0; max-width: 56ch; }
@media (min-width: 860px) { .band { grid-template-columns: 1fr auto; } }

.steps-inline { counter-reset: s; list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 0 40px; }
.steps-inline li { counter-increment: s; padding: 18px 0 18px 56px; position: relative; border-top: 1px solid var(--line); margin: 0; }
.steps-inline li::before {
  content: counter(s); position: absolute; left: 0; top: 16px; width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--brand); color: var(--brand); font: 800 18px/34px var(--display); text-align: center;
}
.steps-inline b { display: block; font-size: 19px; }
.steps-inline span { color: var(--muted); }
@media (min-width: 860px) { .steps-inline { grid-template-columns: repeat(3, 1fr); } }
footer.site ul a { text-decoration: none; }
footer.site ul a:hover { text-decoration: underline; }
