/* FoodCostCalculators.com — base layer
   Reset + typography + the sitewide nav/footer/skip-link that every
   page shares, so header/footer markup (duplicated per page, since
   this is a no-build-step static site) always looks identical. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-serif); letter-spacing: -.01em; margin: 0; }
img, svg { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* skip link for keyboard/screen-reader users */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--herb-deep); color: var(--ivory);
  padding: 12px 18px; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* focus visibility (contrast beyond color alone, keyboard operability) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2.5px solid var(--marigold-deep);
  outline-offset: 2px;
}

/* screen-reader-only utility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --- sitewide nav ------------------------------------------------ */
nav.top { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 40; }
.navrow { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--herb); display: flex; align-items: center; justify-content: center; color: var(--ivory); font-family: var(--font-serif); font-weight: 700; font-size: 19px; }
.brand-name { font-family: var(--font-serif); font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.brand-name span { color: var(--herb-deep); }
.navlinks { display: flex; gap: 30px; font-size: 14.5px; font-weight: 600; }
.navlinks a { position: relative; padding: 6px 0; color: var(--ink); }
.navlinks a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--marigold-deep); transition: width .2s; }
.navlinks a:hover::after, .navlinks a[aria-current="page"]::after { width: 100%; }
@media (max-width: 860px) { .navlinks { display: none; } }

/* --- sitewide footer ---------------------------------------------- */
footer.site { background: var(--ink); color: #CFE0D5; padding: 52px 0 26px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
footer.site .brand-name { color: var(--ivory); }
footer.site .brand-name span { color: #8FCB9F; }
footer.site p { font-size: 13.5px; line-height: 1.6; color: #9FB6A6; max-width: 34ch; }
footer.site h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: #8FCB9F; margin: 0 0 14px; }
footer.site ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
footer.site ul a:hover, footer.site ul a:focus-visible { color: var(--ivory); }
.foot-bottom { border-top: 1px solid #2C3F34; padding-top: 20px; display: flex; justify-content: space-between; font-size: 12.5px; color: #7E9689; flex-wrap: wrap; gap: 8px; }

/* --- generic content page shell (legal/about/methodology pages) --- */
.content-page { max-width: 780px; margin: 0 auto; padding: 48px 24px 88px; }
.content-page .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); font-weight: 700; }
.content-page h1 { font-size: clamp(28px, 4vw, 40px); margin: 8px 0 6px; }
.content-page .updated { font-size: 13px; color: var(--ink-soft); margin-bottom: 32px; }
.content-page h2 { font-size: 21px; margin: 36px 0 12px; }
.content-page h3 { font-size: 16.5px; margin: 22px 0 8px; }
.content-page p { font-size: 15.5px; color: var(--ink); margin: 0 0 14px; }
.content-page ul, .content-page ol { font-size: 15.5px; color: var(--ink); padding-left: 22px; margin: 0 0 14px; }
.content-page li { margin-bottom: 6px; }
a.inline-link { color: var(--herb-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.content-page .callout { background: var(--herb-pale); border: 1px solid #D3E5D9; border-radius: var(--radius-md); padding: 16px 18px; font-size: 14.5px; margin: 18px 0; }
.content-page .callout.warn { background: var(--marigold-pale); border-color: #F0DBAE; }
