:root {
    /* palette taken from the logo: leaf #387060, deep teal #184040, gold #a88848 */
    --bg: #f7f5ee;
    --surface: #ffffff;
    --text: #1c2e2b;
    --muted: #586a65;
    --line: #dde3dc;
    --ink: #184040;
    --accent: #2f6a5a;
    --accent-ink: #ffffff;
    --accent-soft: #e2eeea;
    --gold: #a88848;
    --warn: #8a5a12;
    --warn-soft: #f7eedb;
    --bad: #a83232;
    --bad-soft: #f8e1e1;
    --logo-tile: transparent;
    --radius: 10px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1c1b;
        --surface: #152625;
        --text: #e2ebe8;
        --muted: #98aaa5;
        --line: #26393a;
        --ink: #e2ebe8;
        --accent: #7cc0a8;
        --accent-ink: #0f1c1b;
        --accent-soft: #1d3633;
        --gold: #d2b06a;
        --warn: #e3b866;
        --warn-soft: #33291a;
        --bad: #ef8a8a;
        --bad-soft: #3a1e1e;
        /* the logo's deep teal outline disappears on a dark header, so sit it on a pale tile */
        --logo-tile: #eef2ec;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.3rem; margin-top: 1.8em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 28px; padding-bottom: 48px; min-height: 60vh; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); border-top: 3px solid var(--gold); }
.top-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.logo { font-weight: 700; font-size: 1.3rem; color: var(--ink); display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.logo:hover { text-decoration: none; }
.logo img { height: 38px; width: auto; display: block; background: var(--logo-tile); border-radius: 8px; padding: 2px; }
.logo .garden { color: var(--accent); }
.top-search { flex: 1 1 220px; }
.top-search input, .field input, .big-search input {
    width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
    background: var(--bg); color: var(--text); font: inherit;
}
.top-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.top-nav a { color: var(--text); }
.top-nav form { margin: 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-small { padding: 5px 12px; }
.top-nav a.btn { color: var(--accent-ink); }

.flash { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 14px; margin: 16px 0 0; }

/* home */
.hero { padding: 24px 0 8px; display: flex; align-items: center; gap: 32px; }
.hero-text { flex: 1 1 auto; min-width: 0; }
.hero-logo { flex: 0 0 auto; width: 190px; height: auto; background: var(--logo-tile); border-radius: 24px; padding: 8px; }
.hero h1 { color: var(--ink); }
.hero h1 { font-size: 2.4rem; max-width: 18em; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.big-search { display: flex; gap: 8px; max-width: 560px; margin: 20px 0; }
.big-search input { font-size: 1.05rem; padding: 12px 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 24px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .9rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.steps div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.steps h3 { font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); }

/* lists */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.chips a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--text); }
.chips a:hover { border-color: var(--accent); text-decoration: none; }
.chips .n { color: var(--muted); font-size: .85em; margin-left: 4px; }
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.letters a { min-width: 2em; text-align: center; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.cols { columns: 4 200px; column-gap: 24px; padding: 0; list-style: none; }
.cols li { break-inside: avoid; padding: 2px 0; }
.count { color: var(--muted); font-size: .85em; }
.crumbs { color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
.crumbs a { color: var(--muted); }

/* model page */
.model-head { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.model-meta { color: var(--muted); margin: 0 0 8px; }
.notice { background: var(--warn-soft); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.docs { width: 100%; border-collapse: collapse; }
table.docs th, table.docs td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.docs tr:last-child td { border-bottom: 0; }
table.docs th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.doc-title { font-weight: 600; }
.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.badge-missing { background: var(--warn-soft); color: var(--warn); }
.badge-possible, .badge-unverified { background: var(--accent-soft); color: var(--accent); }
.badge-verified { background: var(--accent); color: var(--accent-ink); }
.badge-disputed { background: var(--bad-soft); color: var(--bad); }
.specs { display: grid; grid-template-columns: minmax(140px, 30%) 1fr; margin: 0; }
.specs dt, .specs dd { margin: 0; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dt:last-of-type, .specs dd:last-of-type { border-bottom: 0; }
.variant-name { padding: 10px 14px 0; font-weight: 600; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-top: 1.8em; }
.section-head h2 { margin: 0 0 .5em; }
.fx-pick select { font: inherit; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
.alt-unit, .fx { color: var(--muted); }
.fx:not(:empty) { display: block; font-size: .9em; }

/* search */
.results { list-style: none; padding: 0; }
.results li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.results .brandname { color: var(--muted); }

/* forms */
.form-card { max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field .hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.error { color: var(--bad); font-size: .9rem; margin-top: 4px; }
.errors { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .9rem; }
.foot-inner { padding-top: 20px; padding-bottom: 28px; }
.foot p { margin: 0 0 6px; }

@media (max-width: 640px) {
    h1 { font-size: 1.6rem; }
    .hero h1 { font-size: 1.8rem; }
    .hero-logo { display: none; }
    .big-search { flex-direction: column; }
    table.docs thead { display: none; }
    table.docs tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
    table.docs tr:last-child { border-bottom: 0; }
    table.docs td { display: block; border: 0; padding: 2px 14px; }
    .specs { grid-template-columns: 1fr; }
    .specs dt { border-bottom: 0; padding-bottom: 0; }
}
