/* Supplier directory + per-vendor pages (server-rendered by routes/suppliers.js).
   Same article styling as the guides, plus a stats grid, category bars and a table. */
:root {
  --bg: #0b100e; --surface: #111815; --raised: #18211c; --line: #26322b;
  --text: #eef3ef; --muted: #93a49a; --profit: #34cf7d; --brass: #e6b450;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, Menlo, monospace;
  --glow: radial-gradient(1100px 500px at 80% -10%, rgba(52,207,125,0.08), transparent 60%);
}
:root[data-theme="light"] {
  --bg: #f4f7f3; --surface: #ffffff; --raised: #eef3ee; --line: #dde5df;
  --text: #10190f; --muted: #566b5e; --profit: #0f7a44; --brass: #8a6216;
  --glow: radial-gradient(1100px 500px at 80% -10%, rgba(16,134,75,0.07), transparent 60%);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; background: var(--glow); }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 40px; position: relative; z-index: 1; }
a { color: var(--profit); }
.nav { display: flex; align-items: center; gap: 20px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; text-decoration: none; color: var(--text); }
.brand svg { width: 22px; height: 22px; display: block; }
.nav .spacer, .foot .spacer { flex: 1; }
.nav .navlink { text-decoration: none; color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.nav .navlink:hover { color: var(--text); }
.theme-toggle { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 6px 10px; cursor: pointer; font-size: 0.95rem; line-height: 1; }
.theme-toggle:hover { border-color: var(--muted); }
.btn { font-family: var(--font-body); font-weight: 600; text-decoration: none; border-radius: 10px; padding: 10px 18px; font-size: 0.92rem; background: var(--profit); color: #04160c; display: inline-block; }
.crumbs { font-size: 0.82rem; color: var(--muted); margin: 8px auto 0; max-width: 820px; font-family: var(--font-mono); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.doc { max-width: 820px; margin: 6px auto 0; }
.doc h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin: 18px 0 8px; }
.updated { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); margin-bottom: 26px; }
.doc h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; margin: 44px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin: 24px 0 8px; color: var(--text); }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc .lead { color: var(--muted); font-size: 1.08rem; }
.muted { color: var(--muted); }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--profit); border-radius: 12px; padding: 18px 20px; margin: 24px 0; }
.callout strong { color: var(--brass); }
.cta { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px; margin: 40px 0 10px; text-align: center; }
.cta h2 { border: 0; padding: 0; margin: 0 0 8px; }
.cta p { color: var(--muted); margin: 0 0 16px; }
.rel { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.rel a { text-decoration: none; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; color: var(--text); font-weight: 600; font-size: 0.92rem; background: var(--surface); }
footer { border-top: 1px solid var(--line); margin-top: 60px; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 30px 0; color: var(--muted); font-size: 0.85rem; }
.foot a { color: var(--muted); text-decoration: none; margin-left: 20px; }
.foot a.brand { margin-left: 0; color: var(--text); }
.foot a:hover { color: var(--text); }
.foot .fine { width: 100%; font-size: 0.78rem; opacity: 0.85; margin-top: 6px; }

/* stats grid */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stat .k { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; letter-spacing: -0.02em; margin-top: 4px; color: var(--profit); }
.stat .s { font-size: 0.78rem; color: var(--muted); }

/* category bars */
.cats { list-style: none; padding: 0; margin: 10px 0 0; }
.cats li { display: grid; grid-template-columns: 180px 1fr 110px; align-items: center; gap: 12px; margin-bottom: 8px; }
.cats .cat { font-weight: 600; font-size: 0.92rem; }
.cats .cnt { font-family: var(--font-mono); font-size: 0.82rem; text-align: right; }
progress.bar { width: 100%; height: 10px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 6px; background: var(--raised); overflow: hidden; }
progress.bar::-webkit-progress-bar { background: var(--raised); border-radius: 6px; }
progress.bar::-webkit-progress-value { background: var(--profit); border-radius: 6px; }
progress.bar::-moz-progress-bar { background: var(--profit); border-radius: 6px; }

/* tables */
.tbl-wrap { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow-x: auto; margin: 18px 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 560px; }
.tbl th { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-family: var(--font-mono); font-size: 0.85rem; white-space: nowrap; }
.tbl .sub { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.tbl a { text-decoration: none; color: var(--text); }
.tbl a:hover { color: var(--profit); }
.lock { font-size: 0.8em; opacity: 0.8; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 720px) {
  .wrap { padding: 0 22px; } .nav { gap: 12px; } .nav .navlink { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cats li { grid-template-columns: 1fr; gap: 4px; } .cats .cnt { text-align: left; }
}
