:root {
    --green: #2f5d3f;
    --green-dark: #23452f;
    --green-light: #e8f0e9;
    --sand: #f7f6f2;
    --ink: #22262a;
    --muted: #5d6670;
    --line: #e2e0da;
    --max: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 78px;
}
.brand {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--green);
    text-decoration: none;
    line-height: 1.2;
}
.brand small {
    display: block;
    font-size: .62rem;
    letter-spacing: .18em;
    color: var(--muted);
    font-weight: 500;
    margin-top: 3px;
}
.nav { display: flex; gap: 34px; align-items: center; }
.nav a {
    text-decoration: none;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--green); }
.nav a.active { color: var(--green); border-bottom-color: var(--green); }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 9px 12px;
    font-size: .9rem;
    cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--green-dark); }
.hero img { width: 100%; height: 340px; object-fit: cover; opacity: .9; }
.hero-no-image { height: 150px; }
.hero-caption {
    background: var(--green);
    color: #fff;
    padding: 30px 0;
}
.hero-caption h1 {
    font-size: 1.95rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: .01em;
}
.hero-caption p { margin-top: 10px; color: #d7e4d9; max-width: 720px; }

/* ---------- Sections ---------- */
section { padding: 62px 0; }
section.tinted { background: var(--sand); }
h2 {
    font-size: 1.5rem;
    letter-spacing: .03em;
    margin-bottom: 8px;
    color: var(--green-dark);
}
h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--green-dark); }
.lede { color: var(--muted); max-width: 760px; margin-bottom: 34px; }
p + p { margin-top: 14px; }

/* ---------- Category cards ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 26px;
}
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.card img { height: 190px; width: 100%; object-fit: cover; }
.card-body { padding: 22px; border-top: 3px solid var(--green); }
.card-body p { color: var(--muted); font-size: .95rem; }

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 46px;
    align-items: start;
}
.about-grid img { border-radius: 6px; }

/* ---------- Downloads ---------- */
.downloads { display: grid; gap: 14px; margin: 26px 0 10px; }
.download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--green);
    border-radius: 5px;
    padding: 16px 20px;
}
.download strong { display: block; font-size: 1rem; }
.download span { font-size: .85rem; color: var(--muted); }
.btn {
    display: inline-block;
    background: var(--green);
    color: #fff;
    text-decoration: none;
    padding: 11px 22px;
    border-radius: 4px;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
}
.btn:hover { background: var(--green-dark); }
.btn-light {
    background: #fff;
    color: var(--green);
    border: 1px solid var(--green);
}
.unavailable { color: var(--muted); font-size: .88rem; font-style: italic; }

/* ---------- Species table ---------- */
.table-tools {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin: 22px 0 16px;
}
.table-tools input[type=search] {
    flex: 1 1 280px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}
.chip {
    padding: 10px 16px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    font-size: .85rem;
    cursor: pointer;
    font-family: inherit;
}
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.count { font-size: .85rem; color: var(--muted); }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th {
    background: var(--green-light);
    text-align: left;
    padding: 13px 16px;
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--green-dark);
    white-space: nowrap;
}
td { padding: 12px 16px; border-top: 1px solid var(--line); }
tbody tr:nth-child(even) { background: #fafaf8; }
td.botanical { font-style: italic; }
.tag-edible {
    display: inline-block;
    background: var(--green-light);
    color: var(--green-dark);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}
.field textarea { min-height: 150px; resize: vertical; }
.detail { margin-bottom: 24px; }
.detail h4 {
    font-size: .76rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 4px;
}
.notice {
    padding: 14px 18px;
    border-radius: 5px;
    margin-bottom: 22px;
    font-size: .95rem;
}
.notice.ok { background: var(--green-light); border-left: 4px solid var(--green); }
.notice.err { background: #fdecea; border-left: 4px solid #c0392b; }
.notice.info { background: #fdf6e3; border-left: 4px solid #d4a017; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--green-dark);
    color: #cfdbd2;
    padding: 46px 0 34px;
    margin-top: 10px;
    font-size: .92rem;
}
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.15);
    margin-top: 28px;
    padding-top: 18px;
    font-size: .82rem;
    color: #a9bdb0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

@media (max-width: 860px) {
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
    .about-grid img { max-width: 280px; }
}
@media (max-width: 720px) {
    body { font-size: 16px; }
    .nav {
        display: none;
        position: absolute;
        top: 78px; left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--line);
        padding: 8px 24px 18px;
    }
    .nav.open { display: flex; }
    .nav a { padding: 13px 0; width: 100%; border-bottom: 1px solid var(--line); }
    .nav a.active { border-bottom-color: var(--line); }
    .nav-toggle { display: block; }
    .hero img { height: 210px; }
    .hero-caption h1 { font-size: 1.5rem; }
    section { padding: 44px 0; }
}

/* ---------- About page ---------- */
.about-grid-wide { grid-template-columns: 1fr 380px; }
.figure { margin: 0; }
.figure img { border-radius: 6px; width: 100%; }
.figure figcaption {
    font-size: .85rem;
    color: var(--muted);
    margin-top: 10px;
    line-height: 1.5;
}
.photo-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 10px;
}
.photo-pair img { border-radius: 6px; height: 320px; width: 100%; object-fit: cover; }

/* ---------- Gallery ---------- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 28px;
}
.gallery button {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    display: block;
    position: relative;
    line-height: 0;
}
.gallery img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    transition: transform .35s ease;
}
.gallery button:hover img { transform: scale(1.05); }
.gallery button:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(18, 26, 20, .94);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; text-align: center; max-width: 1000px; }
.lightbox img { max-width: 100%; max-height: 78vh; border-radius: 4px; margin: 0 auto; }
.lightbox figcaption { color: #e3ece5; margin-top: 16px; font-size: .95rem; }
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next {
    position: absolute;
    background: rgba(255,255,255,.12);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}
.lightbox .lb-close { top: 24px; right: 24px; }
.lightbox .lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox button:hover { background: rgba(255,255,255,.26); }

@media (max-width: 860px) {
    .about-grid-wide { grid-template-columns: 1fr; }
    .about-grid-wide .figure { max-width: 340px; }
    .photo-pair { grid-template-columns: 1fr; }
    .photo-pair img { height: 230px; }
}
@media (max-width: 720px) {
    .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .gallery img { height: 120px; }
    .lightbox { padding: 16px; }
    .lightbox .lb-prev { left: 8px; }
    .lightbox .lb-next { right: 8px; }
}
