/* AllEcoHub — B2B directory of plastic-alternative suppliers.
   Layout idea: compact search-first header, then a dense card grid; kraft + leaf palette on a cool, slightly green neutral. */
:root {
  --bg: #F4F6F1;
  --surface: #FFFFFF;
  --ink: #1D3428;
  --muted: #5B6B61;
  --line: #DCE3D8;
  --accent: #2E7A4C;
  --accent-ink: #FFFFFF;
  --accent-soft: #E3F0E4;
  --kraft: #B9874E;
  --kraft-soft: #F3E8D8;
  --notice: #FFF4D6;
  --notice-ink: #6A4E0E;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121A15; --surface: #1A251E; --ink: #E4ECE5; --muted: #A2B2A7; --line: #2C3A31;
    --accent: #6BC28A; --accent-ink: #0E1A12; --accent-soft: #1F3527; --kraft: #D9AE7B; --kraft-soft: #2E2619;
    --notice: #2F2814; --notice-ink: #F0D79A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121A15; --surface: #1A251E; --ink: #E4ECE5; --muted: #A2B2A7; --line: #2C3A31;
  --accent: #6BC28A; --accent-ink: #0E1A12; --accent-soft: #1F3527; --kraft: #D9AE7B; --kraft-soft: #2E2619;
  --notice: #2F2814; --notice-ink: #F0D79A; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--kraft); outline-offset: 2px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; line-height: 1.15; margin: 0; }

/* preliminary notice */
.notice { background: var(--notice); color: var(--notice-ink); font-size: 14.5px; border-bottom: 1px solid var(--line); }
.notice .wrap { padding-top: 9px; padding-bottom: 9px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.notice strong { font-weight: 700; }
.notice a { color: inherit; font-weight: 600; }
.tag-pre { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; border: 1.5px solid currentColor; border-radius: 999px; padding: 1px 8px; }

/* header */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { font-family: var(--font-display); font-size: 22px; letter-spacing: -.01em; }
.brand b span { color: var(--accent); }
.nav { display: flex; gap: 6px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 7px 12px; border-radius: 8px; }
.nav a[aria-current="page"], .nav a:hover { background: var(--accent-soft); color: var(--accent); }

/* finder */
.finder { padding: 34px 0 22px; }
.finder h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 700; letter-spacing: -.015em; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.prod-select-wrap { position: relative; display: inline-flex; max-width: 100%; }
#product { font: inherit; font-size: inherit; color: var(--accent); background: var(--accent-soft); border: 2px solid var(--accent); border-radius: 12px;
  padding: 2px 46px 4px 14px; appearance: none; -webkit-appearance: none; cursor: pointer; max-width: 100%; text-overflow: ellipsis; }
.prod-select-wrap::after { content: ""; position: absolute; right: 16px; top: 50%; width: 11px; height: 11px; border-right: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
#product option, #product optgroup { font-size: 16px; color: #1D3428; background: #fff; font-family: var(--font-body); }
.lede { color: var(--muted); max-width: 70ch; margin: 12px 0 0; font-size: 17px; }

.controls { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: 10px; margin-top: 20px; align-items: center; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
#q, #state { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 14px; }
#q { padding-left: 42px; }
#q:focus, #state:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; white-space: nowrap; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip .n { font-weight: 400; opacity: .75; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* replace line + alternatives panel */
.replace-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(19px, 2.4vw, 25px); }
.prod-select-wrap.small select { font: inherit; color: var(--kraft); background: var(--kraft-soft); border: 2px solid var(--kraft); border-radius: 10px; padding: 2px 40px 3px 12px; appearance: none; -webkit-appearance: none; cursor: pointer; max-width: 100%; }
.prod-select-wrap.small::after { border-color: var(--kraft); right: 14px; width: 9px; height: 9px; }
.prod-select-wrap.small select option { font-size: 16px; color: #1D3428; background: #fff; font-family: var(--font-body); }
.alts { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.alts h2 { font-size: 19px; margin-bottom: 12px; }
.alts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.alt { font: inherit; text-align: left; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 0; cursor: pointer; display: grid; grid-template-columns: 84px 1fr; overflow: hidden; }
.alt:hover { border-color: var(--accent); }
.alt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.alt img { width: 84px; height: 100%; object-fit: cover; }
.alt span { padding: 10px 12px; display: grid; gap: 3px; min-width: 0; }
.alt b { font-size: 15.5px; }
.alt small { font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.alt em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--accent); }

/* results */
.results-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 6px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
#count { font-weight: 700; font-variant-numeric: tabular-nums; }
.reset { font: inherit; background: none; border: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .pic { aspect-ratio: 4 / 3; background: var(--kraft-soft); position: relative; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; left: 10px; top: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.loc { color: var(--muted); font-size: 14px; display: flex; gap: 6px; align-items: center; }
.loc svg { width: 14px; height: 14px; flex: none; }
.prods { font-size: 15px; margin: 0; overflow-wrap: anywhere; }
.about { font-size: 13.5px; color: var(--muted); margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 12.5px; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 2px 8px; font-weight: 600; }
.tags span.claim { background: var(--kraft-soft); color: var(--kraft); }
.card .foot { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.card .foot a { font-weight: 700; font-size: 14px; text-decoration: none; }
.card .foot a:hover { text-decoration: underline; }
.more-row { display: flex; justify-content: center; padding: 26px 0 10px; }
.btn { font: inherit; font-weight: 700; background: var(--accent); color: var(--accent-ink); border: none; border-radius: 10px; padding: 11px 22px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* footer */
.site-foot { margin-top: 40px; background: var(--surface); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.site-foot .wrap { padding-top: 26px; padding-bottom: 30px; display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.site-foot p { margin: 0 0 8px; max-width: 75ch; }

/* about page */
.page { padding: 36px 0 10px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 32px; align-items: start; }
.prose h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.prose h2 { font-size: 22px; margin: 28px 0 10px; }
.prose p, .prose li { max-width: 68ch; }
.prose ul { padding-left: 20px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 16px; }
.contact-card h2 { font-size: 20px; margin-bottom: 4px; }
.contact-card .who { font-size: 20px; font-weight: 700; margin: 14px 0 10px; }
.contact-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; }
.contact-card dt { color: var(--muted); font-size: 14px; }
.contact-card dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ref { margin-top: 16px; background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: 14.5px; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline b { color: var(--accent); }

@media (max-width: 760px) {
  .controls { grid-template-columns: 1fr; }
  .page { grid-template-columns: 1fr; }
  .contact-card { position: static; }
  .site-foot .wrap { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 420px) { .wrap { padding: 0 16px; } #product { padding-right: 40px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---- static list pages (products, replace, states, guide) ---- */
.page-one { padding-block: 26px 10px; }
.page-one > h1, .hero-row h1 { font-size: clamp(28px, 4vw, 40px); margin: 10px 0 12px; }
.page-one > h2, .browse h2 { font-size: 21px; margin: 30px 0 12px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 6px; }
.crumbs a { color: var(--muted); }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.hero-img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; height: auto; }
.facts { font-size: 16px; margin: 12px 0 16px; }
.facts b { font-variant-numeric: tabular-nums; }
.replaces { margin: 10px 0 0; }
a.chip { text-decoration: none; display: inline-flex; align-items: baseline; }
.chips.big .chip { font-size: 15.5px; padding: 7px 14px; }
.state-jump { margin: 20px 0 6px; }
.sgroup { margin-top: 26px; scroll-margin-top: 12px; }
.sgroup h2 { font-size: 21px; margin: 0 0 10px; display: flex; gap: 10px; align-items: baseline; }
.sgroup h2 .n, .chip .n { font-weight: 400; color: var(--muted); font-size: .85em; font-variant-numeric: tabular-nums; }
.srow { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; align-items: start; margin-bottom: 8px; }
.srow h3 { font-size: 17px; margin: 0; overflow-wrap: anywhere; }
.srow .loc { margin-top: 2px; }
.srow .prods { margin: 4px 0 6px; }
.srow .tags a { font-size: 12.5px; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 2px 8px; font-weight: 600; text-decoration: none; }
.srow .tags .cert { font-size: 12.5px; background: var(--accent); color: var(--accent-ink); border-radius: 6px; padding: 2px 8px; font-weight: 700; }
.srow .tags .claim { font-size: 12.5px; background: var(--kraft-soft); color: var(--kraft); border-radius: 6px; padding: 2px 8px; font-weight: 600; }
.srow .ask { font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.srow .ask:hover { text-decoration: underline; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tile { display: grid; grid-template-columns: 96px 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--accent); }
.tile img { width: 96px; height: 100%; object-fit: cover; }
.tile span { padding: 10px 12px; display: grid; gap: 3px; align-content: center; min-width: 0; }
.tile b { font-size: 15.5px; }
.tile em { font-style: normal; font-size: 13.5px; color: var(--muted); }
.tile.wide em { color: var(--accent); font-weight: 600; }
.alts-grid.static .alt { text-decoration: none; }
.browse { margin-top: 36px; padding-top: 6px; border-top: 1px solid var(--line); }
.guide { max-width: 760px; }
.guide table { border-collapse: collapse; width: 100%; font-size: 15px; }
.guide th, .guide td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
.guide th { background: var(--accent-soft); color: var(--ink); }
.table-scroll { overflow-x: auto; }
@media (max-width: 760px) {
  .hero-row { grid-template-columns: 1fr; }
  .hero-img { max-width: 320px; }
  .srow { grid-template-columns: 1fr; }
}
.ecoline { margin: 0 0 8px; font-weight: 700; color: var(--accent); font-size: 15px; letter-spacing: .01em; }
.guide h3 { font-size: 17px; margin: 18px 0 4px; }
