:root {
    color-scheme: light;
    font: 16px/1.5 system-ui, sans-serif;
    color: #182d25;
    background: #f3f5ef;
    --green: #163d32;
    --border: #cbd6cc;
}
* { box-sizing: border-box; }
body { margin: 0; }
header { background: var(--green); color: white; }
.bar, main { width: min(100% - 2rem, 70rem); margin: auto; }
.bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem 1.5rem; padding: 1rem 0; }
.brand { font-size: 1.2rem; font-weight: 750; text-decoration: none; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; }
header a, header button { color: inherit; }
main { padding: 1.6rem 0 3rem; }
h1, h2, p { margin: 0 0 .75rem; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -.035em; }
h2 { font-size: 1.16rem; line-height: 1.3; }
a { color: var(--green); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #b56a13; outline-offset: 3px; }
.panel { background: white; border: 1px solid var(--border); border-radius: .8rem; padding: 1.15rem; margin-bottom: .85rem; }
.signin { max-width: 26rem; margin: 2rem auto; }
.install-help { margin-top: 1.3rem; padding-top: .8rem; border-top: 1px solid var(--border); }
.install-help summary { cursor: pointer; font-weight: 650; }
.install-help p, .install-help button { margin: .65rem 0 0; }
.stack { display: grid; gap: .85rem; }
.stack > * { margin: 0; }
.stack > button { justify-self: start; }
.fields, .catalogue { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .8rem; align-items: end; }
.fields h2 { grid-column: 1 / -1; }
.catalogue { align-items: stretch; }
.catalogue article { grid-template-rows: auto auto 1fr auto auto; scroll-margin-top: 4.5rem; }
.customer-tabs { position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; background: #fff; border-bottom: 1px solid var(--border); }
.customer-tabs a { text-align: center; text-decoration: none; font-weight: 650; padding: .85rem .25rem .7rem; border-bottom: .22rem solid transparent; }
.customer-tabs a[aria-current] { color: var(--green); border-color: #368769; background: #edf6f0; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.category-card { display: grid; align-content: start; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: .9rem; text-decoration: none; }
.category-card:hover strong { background: #e7f2ea; }
.category-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #dcecdf; }
.category-card strong { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: 1rem; font-size: 1.1rem; }
.product-photo { display: block; width: 100%; height: clamp(12rem, 57vw, 20rem); padding: .45rem; background: #f6f8f4; object-fit: contain; border-radius: .5rem; }
.quantity-form { display: grid; grid-template-columns: 2.75rem minmax(4rem, 7rem) 2.75rem; justify-content: center; align-items: end; gap: .35rem; }
.quantity-form input { text-align: center; }
.quantity-form .save-quantity { grid-row: 2; grid-column: 1 / -1; background: #e7f2ea; color: var(--green); }
button:disabled { opacity: .45; cursor: default; }
select { font: inherit; width: 100%; min-height: 2.75rem; padding: .5rem .65rem; border: 1px solid #8a9d92; border-radius: .45rem; background: #fff; color: inherit; }
@media (max-width: 36rem) {
    .category-grid, .catalogue { grid-template-columns: 1fr; }
}
.item, .inline, .search, .total { display: flex; align-items: end; flex-wrap: wrap; gap: .6rem 1rem; }
.item, .total { justify-content: space-between; }
.item p { margin: .25rem 0 0; }
.search { margin-bottom: 1.2rem; }
.search label { flex: 1 1 14rem; }
label { display: grid; gap: .25rem; font-size: .9rem; font-weight: 600; }
.check { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; }
input, textarea, button { font: inherit; }
input:not([type=checkbox]), textarea { width: 100%; min-height: 2.75rem; padding: .5rem .65rem; border: 1px solid #8a9d92; border-radius: .45rem; background: #fff; color: inherit; font-size: 1rem; }
textarea { resize: vertical; min-height: 5rem; }
.inline input[name=quantity] { width: 6rem; }
button { min-height: 2.75rem; padding: .5rem .85rem; border: 1px solid transparent; border-radius: .45rem; background: var(--green); color: white; font-weight: 650; cursor: pointer; }
button:hover { background: #245a49; }
button.plain { background: transparent; padding-inline: .2rem; text-decoration: underline; text-underline-offset: .18em; }
.message { padding: .65rem .9rem; border-radius: .45rem; background: #dcecdf; }
.error { background: #f9e5db; color: #782b19; }
.sku, small { color: #475b52; }
.reference { overflow-wrap: anywhere; font-weight: 650; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.lines { list-style: none; padding: 0; }
.lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--border); }
