/* Growers by Nature — PPWR packaging documentation
   Brand: navy #12293D, lime #AFC836, leaf red #EF3C40, font Onest (self-hosted, no Google requests). */

@font-face { font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/onest-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/onest-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/onest-latin-600-normal.woff2") format("woff2"); }

:root {
  --navy: #12293d;
  --lime: #afc836;          /* backgrounds/accents only — too light for text on white */
  --lime-soft: #f3f7e1;
  --leaf: #ef3c40;
  --accent: var(--lime);    /* config.js may override */
  --bg: #ffffff;
  --surface: #f6f8f4;
  --text: var(--navy);
  --muted: #56677a;
  --line: #e2e7e9;
  --radius: 14px;
  --wrap: 780px;
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.5; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; width: 100%; min-width: 0; }
.site-header, .site-footer { width: 100%; }
a { color: var(--navy); text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--navy); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.brand { display: flex; align-items: center; text-decoration: none; color: var(--text); }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* the logo already says it */
.header-tag { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); background: var(--lime); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }

/* intro */
.intro { padding: 32px 0 6px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 0 10px 0 10px; background: var(--leaf); } /* nod to the logo leaf */
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.12; margin: 0 0 12px; letter-spacing: -.02em; font-weight: 600; }
.lede { margin: 0; color: var(--muted); max-width: 62ch; }

/* search + tabs */
.tools { position: sticky; top: 0; background: var(--bg); padding: 18px 0 12px; z-index: 2; }
.search { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 18px; background: var(--bg); }
.search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 4px var(--lime-soft); }
.search-icon { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { border: 0; outline: 0; font: inherit; font-size: 1rem; padding: 13px 0; width: 100%; background: transparent; color: var(--text); }
.search input::placeholder { color: #8795a3; }
.tabs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: .93rem; font-weight: 500; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); color: var(--navy); cursor: pointer; transition: background .15s, border-color .15s; }
.tab:hover { border-color: var(--lime); background: var(--lime-soft); }
.tab .count { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--navy); }
.tab[aria-pressed="true"] .count { color: var(--navy); opacity: .75; }
.tab:focus-visible, .doc-main:focus-visible, .doc-download:focus-visible, a:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

.status { min-height: 1.5em; color: var(--muted); font-size: .925rem; margin: 4px 0 8px; }

/* categories + documents */
.category { margin: 14px 0 40px; }
.category h2 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; line-height: 1.3; margin: 0 0 16px; font-weight: 600; letter-spacing: -.01em; }
.category h2::after { content: ""; flex: 1; height: 2px; background: var(--lime); border-radius: 2px; }
.category > .docs { margin-bottom: 18px; }
.group { margin: 0 0 20px; }
.group h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.docs { list-style: none; margin: 0; padding: 0; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.doc { display: flex; align-items: stretch; border-top: 1px solid var(--line); }
.doc:first-child { border-top: 0; }
.doc-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: var(--text); }
.doc-main:hover { background: var(--surface); }
.pdf-badge { flex: none; display: grid; place-items: center; width: 38px; height: 44px; border-radius: 6px 12px 6px 6px; background: #fdecec; color: var(--leaf); font-size: .66rem; font-weight: 700; letter-spacing: .04em; }
.doc-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-name { font-weight: 500; overflow-wrap: anywhere; }
.doc-meta { font-size: .84rem; color: var(--muted); }
.doc-download { flex: none; display: flex; align-items: center; justify-content: center; width: 56px; border-left: 1px solid var(--line); color: var(--navy); }
.doc-download:hover { background: var(--lime); }
.doc-download svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.empty { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0; }
.notice { border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 4px 18px; }

/* loading skeleton */
.skeleton .doc { padding: 20px 16px; }
.skeleton .bar { display: block; height: 14px; width: 70%; border-radius: 4px; background: var(--surface); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }

/* footer */
.site-footer { background: var(--navy); color: #d5dde4; margin-top: 32px; font-size: .875rem; }
.site-footer a { color: #fff; }
.site-footer .muted { color: #a9b6c2; }
.footer-inner { padding: 22px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.footer-inner p { margin: 0; }

/* privacy page */
.prose { padding: 32px 0 8px; max-width: 68ch; }
.prose h2 { font-size: 1.1rem; margin: 26px 0 6px; font-weight: 600; }
.prose p, .prose li { color: var(--text); }

@media (prefers-reduced-motion: reduce) { .skeleton .bar { animation: none; } .tab { transition: none; } }
@media print { .tools, .doc-download, .site-footer, .header-tag { display: none; } }

/* small phones: keep the four packaging-level tabs on one line */
@media (max-width: 480px) {
  .header-inner { min-height: 64px; }
  .brand-logo { height: 34px; }
  .header-tag { font-size: .7rem; padding: 5px 10px; }
  .tabs { gap: 6px; }
  .tab { padding: 8px 12px; gap: 6px; font-size: .9rem; }
  .tab .count { display: none; }
}
