:root {
  --bg: #fbfcf9;
  --surface: #ffffff;
  --ink: #16211b;
  --muted: #55625a;
  --line: #dfe6dc;
  --accent: #1b6b3a;
  --accent-ink: #ffffff;
  --accent-soft: #e9f4ec;
  --notice-bg: #fff8dd;
  --notice-line: #e3c558;
  --notice-ink: #3d3200;
  --radius: 12px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1411;
    --surface: #161d18;
    --ink: #e8f0ea;
    --muted: #a5b3a9;
    --line: #2a362d;
    --accent: #7dd69b;
    --accent-ink: #0c1a11;
    --accent-soft: #16261b;
    --notice-bg: #2a2410;
    --notice-line: #6f5f1e;
    --notice-ink: #f1e6b5;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.1rem; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 0.5rem 0.9rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { padding-top: 0.8rem; padding-bottom: 0.5rem; }
.site-name { text-decoration: none; color: var(--ink); display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.5rem; }
.site-title { font-weight: 750; font-size: 1.08rem; letter-spacing: -0.01em; }
.site-tagline { color: var(--muted); font-size: 0.85rem; }
.main-nav ul { list-style: none; display: flex; gap: 0.2rem 1.15rem; margin: 0 auto; padding-top: 0; padding-bottom: 0.6rem; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; padding: 0.2rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.disclosure { background: var(--notice-bg); border-bottom: 1px solid var(--notice-line); color: var(--notice-ink); }
.disclosure p { margin: 0; padding: 0.6rem 0; font-size: 0.95rem; line-height: 1.5; }
.disclosure a { color: inherit; font-weight: 600; }

main { padding-top: 1.4rem; padding-bottom: 3rem; }
.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.6rem; }
.breadcrumbs a { color: var(--muted); }
h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5rem; text-wrap: balance; }
h2 { font-size: 1.4rem; line-height: 1.25; letter-spacing: -0.01em; margin: 2.3rem 0 0.6rem; text-wrap: balance; }
h3 { font-size: 1.12rem; line-height: 1.3; margin: 1.6rem 0 0.4rem; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
.byline { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.3rem; }

.answer { background: var(--accent-soft); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.15rem 0.4rem; margin-bottom: 1.6rem; }
.answer-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.3rem; }
.answer p[data-long-form] { font-size: 0.95rem; color: var(--muted); }

.toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0.85rem 1.1rem 0.3rem; margin-bottom: 1.6rem; }
.toc-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.3rem; }
.toc ol { margin-bottom: 0.6rem; font-size: 0.97rem; }

.content strong { font-weight: 650; }
.content blockquote { margin: 0 0 1rem; padding: 0.2rem 1rem; border-left: 4px solid var(--line); color: var(--muted); }
.content code { background: var(--accent-soft); border-radius: 5px; padding: 0.08em 0.35em; font-size: 0.92em; }
.formula { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 0.8rem 1rem; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; margin: 0 0 0.9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; }
.badge { display: inline-block; background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em; padding: 0.12rem 0.55rem; margin-right: 0.3rem; white-space: nowrap; vertical-align: 0.1em; }
.product-block { margin: 1.2rem 0 1.6rem; }
.product-name { display: block; margin-top: 0.3rem; }
.product-meta { display: block; font-weight: 400; font-size: 0.82rem; color: var(--muted); }
table.products td { white-space: nowrap; }
table.products td a { font-weight: 600; }
/* Certificate list: always shown as one card per product, because the THC line is long. */
table.cards thead { position: absolute; left: -9999px; }
table.cards, table.cards tbody, table.cards tr, table.cards th, table.cards td { display: block; width: 100%; }
table.cards tr { padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); }
table.cards tbody tr:last-child { border-bottom: 0; }
table.cards th, table.cards td { border: 0; padding: 0.14rem 0; }
table.cards tbody th { font-size: 1rem; margin-bottom: 0.3rem; }
table.cards td { display: flex; justify-content: space-between; gap: 1.2rem; white-space: normal; text-align: right; }
table.cards td::before { content: attr(data-label); color: var(--muted); text-align: left; flex: 0 0 auto; }
.criteria { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.5rem; }
.prices-note, .disclaimer, .stock-note { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.45rem; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  table.products thead { position: absolute; left: -9999px; }
  table.products, table.products tbody, table.products tr, table.products th, table.products td { display: block; width: 100%; }
  table.products tr { padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--line); }
  table.products tbody tr:last-child { border-bottom: 0; }
  table.products th, table.products td { border: 0; padding: 0.12rem 0; }
  table.products tbody th { font-size: 1rem; margin-bottom: 0.3rem; }
  table.products td { display: flex; justify-content: space-between; gap: 1rem; white-space: normal; }
  table.products td::before { content: attr(data-label); color: var(--muted); }
}

.label-diagram { margin: 1.2rem 0 1.4rem; }
.label-diagram svg { width: 100%; height: auto; max-width: 32rem; display: block; margin: 0 auto; }
.label-diagram figcaption { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 0.4rem; }
.ld-label { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.ld-band { fill: var(--accent); }
.ld-brand { fill: var(--accent-ink); font: 700 20px system-ui, sans-serif; letter-spacing: 0.12em; }
.ld-big { fill: var(--ink); font: 800 64px system-ui, sans-serif; }
.ld-mid { fill: var(--ink); font: 600 24px system-ui, sans-serif; }
.ld-small { fill: var(--muted); font: 500 17px system-ui, sans-serif; }
.ld-tiny { fill: var(--muted); font: 400 14px system-ui, sans-serif; }
.ld-rule { stroke: var(--line); stroke-width: 2; }
.ld-dot { fill: var(--ink); }
.ld-num { fill: var(--bg); font: 700 14px system-ui, sans-serif; }

.caveats { background: var(--notice-bg); border: 1px solid var(--notice-line); border-radius: var(--radius); color: var(--notice-ink); padding: 0.9rem 1.1rem 0.1rem; margin-bottom: 1.6rem; font-size: 0.97rem; }
.content > p[data-own-note], .content > ul > li[data-own-note] { color: var(--muted); }
.content > p[data-own-note] { border-left: 3px solid var(--line); padding-left: 0.85rem; }
.ref { font-size: 0.72em; line-height: 0; }
.ref a { text-decoration: none; padding: 0 0.1em; }
.sources { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 0.4rem; font-size: 0.9rem; color: var(--muted); }
.sources h2, .continue h2 { font-size: 1.05rem; margin-top: 1.2rem; }
.sources li { overflow-wrap: anywhere; }
.continue ul { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.continue a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; text-decoration: none; font-weight: 600; }
.continue a:hover { border-color: var(--accent); }
.continue a::after { content: " →"; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 1.6rem 0 2.2rem; font-size: 0.88rem; color: var(--muted); }
.footer-nav { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; }
.footer-nav a { color: var(--muted); }
.footer-short { color: var(--ink); }
.footer-legal { margin-top: 1rem; }
@media print { .main-nav, .continue, .skip { display: none; } body { font-size: 12pt; } }
