/* Daily Formula Lab — visual language borrowed from the Supplement Facts panel:
   heavy black rules, condensed bold sans for labels, a calm serif for reading. */

:root {
  --paper: #f7f9f8;
  --ink: #15211d;
  --muted: #56645f;
  --rule: #15211d;
  --link: #1d6a57;
  --wash: #e4efea;
  --max: 42rem;
  --wide: 64rem;
  --sans: "Helvetica Neue", Helvetica, "Arial Nova", Arial, sans-serif;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--paper);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

/* Header */

.site-header {
  border-bottom: 8px solid var(--rule);
}

.site-header .inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.1rem 1.25rem 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.wordmark {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Layout */

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.prose {
  max-width: var(--max);
}

.prose h1,
.prose h2,
.prose h3,
.home h1,
.home h2 {
  font-family: var(--sans);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.prose h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
}

.prose h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.5rem 0 0.5rem;
  padding-top: 0.6rem;
  border-top: 3px solid var(--rule);
}

.prose h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.75rem 0 0.4rem;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1.1rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.lede {
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.byline {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.note {
  background: var(--wash);
  padding: 1rem 1.15rem;
  border-left: 6px solid var(--rule);
  font-size: 1rem;
}

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

/* Home */

.home .hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
  margin-bottom: 3.5rem;
}

.home h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  font-weight: 800;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}

.home .intro p {
  max-width: 34rem;
  margin: 0 0 1rem;
}

/* The facts panel: the one loud element on the site. */

.facts {
  border: 2px solid var(--rule);
  background: #fff;
  padding: 0.6rem 0.8rem 0.8rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.35;
}

.facts h2 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1;
}

.facts .serving {
  margin: 0.35rem 0 0;
  padding-bottom: 0.4rem;
  border-bottom: 10px solid var(--rule);
}

.facts dl {
  margin: 0;
}

.facts .row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule);
}

.facts .row:last-child {
  border-bottom: 5px solid var(--rule);
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  margin: 0;
}

.facts .foot {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.reading h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--rule);
  max-width: var(--max);
}

.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--max);
}

.article-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

.article-list a {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
}

.article-list a:hover {
  text-decoration: underline;
}

.article-list p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

/* Footer */

.site-footer {
  border-top: 8px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer .inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem 3rem;
}

.site-footer p {
  margin: 0 0 0.6rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.site-footer a {
  color: var(--ink);
}

.site-footer .copyright {
  margin-top: 0.8rem;
}

@media (max-width: 760px) {
  .home .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .site-footer .inner {
    grid-template-columns: 1fr;
  }

  .facts .row {
    grid-template-columns: 7rem 1fr;
  }
}

@media print {
  .site-nav,
  .skip {
    display: none;
  }
}
