:root {
  --brand: #0b5d3b;
  --brand-dark: #07442b;
  --brand-tint: #e7f2ec;
  --brand-tint-2: #cfe6d9;
  --accent: #e8a317;
  --ink: #14211b;
  --muted: #56665e;
  --line: #d9e2dd;
  --bg: #ffffff;
  --bg-alt: #f4f7f5;
  --ok: #1d7a4c;
  --warn: #9a5b00;
  --danger: #b42318;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(16, 40, 28, .06), 0 4px 16px rgba(16, 40, 28, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.icon--sm { width: 1em; height: 1em; vertical-align: -.15em; }
.icon--lg { width: 2.5rem; height: 2.5rem; }

/* Top bar */
.topbar { background: var(--brand-dark); color: #dcebe3; font-size: .85rem; }
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__inner { display: flex; gap: 8px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.topbar__contact { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; }
.topbar__partner { font-weight: 600; color: #fff !important; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand); margin-right: auto; }
.logo__img { display: block; height: 42px; width: auto; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 10px 14px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; }
.site-nav a:hover { background: var(--bg-alt); color: var(--brand); }
.site-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-tint); }
.basket-link { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; background: var(--brand); color: #fff; text-decoration: none; font-weight: 600; }
.basket-link:hover { background: var(--brand-dark); color: #fff; }
.basket-link__count { min-width: 1.5em; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: .8rem; text-align: center; line-height: 1.5; }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px; color: var(--ink); cursor: pointer; }

.demo-banner { background: #fff6e0; color: #6b4500; text-align: center; font-size: .85rem; padding: 6px 16px; border-bottom: 1px solid #f1dfb0; }

@media (max-width: 900px) {
  .topbar__partner { width: 100%; }
  .topbar__contact li:first-child { display: none; }
  .nav-toggle { display: inline-flex; order: 3; }
  .basket-link { order: 2; padding: 10px; }
  .basket-link__label { display: none; }
  .site-nav { order: 4; flex-basis: 100%; display: none; padding-bottom: 12px; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-header__inner { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 420px) {
  .logo__img { height: 34px; }
  .topbar__contact li:last-child { display: none; }
}

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; border: 2px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2; transition: background-color .15s, border-color .15s, color .15s; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: #d18f08; color: var(--ink); }
.btn--ghost { background: #fff; color: var(--brand); border-color: var(--brand-tint-2); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn--sm { padding: 8px 12px; font-size: .9rem; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.is-added { background: var(--brand-tint); color: var(--brand-dark); }
.r-add .btn { min-width: 9.5em; }

label { font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field small { color: var(--muted); font-weight: 400; }
input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #bfccc5; border-radius: 10px; padding: 11px 14px;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid var(--brand-tint-2); outline-offset: 0; }
textarea { min-height: 120px; resize: vertical; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.checkbox input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } }
.hp { position: absolute; left: -5000px; }

.alert { padding: 14px 18px; border-radius: var(--radius); border: 1px solid; margin: 0 0 20px; }
.alert--ok { background: #ecf7f0; border-color: #b6dfc6; color: #134d31; }
.alert--error { background: #fdf0ef; border-color: #f2c4bf; color: #7a1a12; }
.alert--info { background: #fff8e6; border-color: #f1dfb0; color: #6b4500; }

/* Sections */
.section { padding: 56px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section__head p { margin: 0; color: var(--muted); max-width: 60ch; }
.page-head { background: linear-gradient(180deg, var(--brand-tint), #fff); padding: 40px 0 28px; border-bottom: 1px solid var(--line); }
.page-head--overlap { padding-bottom: 64px; }
.page-head p { color: var(--muted); max-width: 70ch; font-size: 1.1rem; margin: 0; }
.breadcrumb { font-size: .875rem; margin-bottom: 10px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }

/* Hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, #1a7a52 0%, transparent 60%), linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; padding: 64px 0 56px; }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero__lead { font-size: 1.15rem; color: #d9ece2; max-width: 52ch; }
.hero__art { justify-self: center; width: min(340px, 100%); color: rgba(255, 255, 255, .9); }
.hero-search { margin-top: 28px; background: #fff; border-radius: var(--radius-lg); padding: 8px; display: flex; gap: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); max-width: 640px; }
.hero-search input { border: 0; font-size: 1.1rem; padding: 12px 14px; }
.hero-search input:focus { outline: none; }
.hero-search:focus-within { outline: 3px solid var(--accent); }
.hero__examples { margin-top: 14px; font-size: .9rem; color: #cfe5d9; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none; font-weight: 600; border: 1px solid rgba(255, 255, 255, .25); }
.chip:hover { background: rgba(255, 255, 255, .22); color: #fff; }
@media (max-width: 860px) { .hero__inner { grid-template-columns: 1fr; } .hero__art { display: none; } }
@media (max-width: 520px) { .hero-search { flex-direction: column; } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -32px; position: relative; }
.fact { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px; display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); }
.fact .icon { width: 28px; height: 28px; color: var(--brand); }
.fact strong { display: block; font-size: 1.15rem; }
.fact span { color: var(--muted); font-size: .9rem; }
.fact--logo img { display: block; width: 170px; height: auto; margin-bottom: 6px; }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; margin-top: 24px; } }

/* Product cards */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.product-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.product-card:hover { border-color: var(--brand-tint-2); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.product-card__icon { width: 52px; height: 52px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; }
.product-card__icon .icon { width: 36px; height: 36px; }
.product-card h3 { margin: 0; }
.product-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.product-card__meta { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: .875rem; font-weight: 600; color: var(--brand); }

/* Feature list */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature .icon { width: 32px; height: 32px; color: var(--brand); margin-bottom: 8px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; }
@media (max-width: 800px) { .features { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.card--brand { background: var(--brand); color: #fff; border: 0; }
.card--brand a:not(.btn) { color: #fff; }
.card--brand .muted { color: #cfe5d9; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list .icon { margin-top: 3px; }

.cta-band { background: var(--brand-tint); border-radius: var(--radius-lg); padding: 28px; display: flex; gap: 16px 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 4px; font-size: 1.4rem; }
.cta-band p { margin: 0; color: var(--muted); }
.cta-band__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Data tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.data-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.data-table th, .data-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { background: var(--bg-alt); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.prose { max-width: 72ch; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .3em; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 1em; }
.tag-list li { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .9rem; }

/* Stock search */
.search-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px; margin-top: -36px; position: relative; }
.search-main { display: flex; gap: 10px; }
.search-main .search-input { position: relative; flex: 1; }
.search-main .search-input .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-main input { font-size: 1.15rem; padding: 14px 14px 14px 46px; }
.search-filters { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 16px; align-items: start; }
.search-filters__row { display: flex; gap: 16px; flex-wrap: wrap; }
.search-filters__row .field { min-width: 160px; flex: 1; }
.material-chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.material-chips legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.material-chips label { font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid #bfccc5; cursor: pointer; user-select: none; }
.material-chips input { position: absolute; opacity: 0; pointer-events: none; }
.material-chips input:checked + span { color: var(--brand-dark); }
.material-chips label:has(input:checked) { background: var(--brand-tint); border-color: var(--brand); }
.material-chips label:has(input:focus-visible) { outline: 3px solid var(--accent); }
.search-hint { margin: 12px 0 0; font-size: .875rem; color: var(--muted); }
.search-hint code { background: var(--bg-alt); padding: 1px 6px; border-radius: 4px; font-size: .85em; color: var(--ink); }
@media (max-width: 860px) { .search-filters { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .search-main { flex-direction: column; } }

.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 28px 0 12px; }
.results-head h2 { font-size: 1.2rem; margin: 0; }
.results-note { background: #fff8e6; border: 1px solid #f1dfb0; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; font-size: .9rem; }

.results { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.results th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg-alt); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.results td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.results tr:last-child td { border-bottom: 0; }
.results tr:hover td { background: #fbfdfc; }
.r-title { font-weight: 700; }
.r-title small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 2px; }
.r-dims { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.r-type { display: inline-block; font-size: .78rem; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: var(--bg-alt); border: 1px solid var(--line); margin-right: 4px; white-space: nowrap; }
.r-stock { white-space: nowrap; font-weight: 700; color: var(--ok); }
.r-stock--low { color: var(--warn); }
.r-stock--none { color: var(--muted); }
.r-stock::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.r-add { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.r-add input { width: 72px; padding: 7px 8px; text-align: right; }
.results-more { text-align: center; margin: 16px 0 0; }
.empty-state { text-align: center; padding: 40px 20px; background: #fff; border: 1px dashed #bfccc5; border-radius: var(--radius-lg); }
.empty-state h3 { margin-bottom: 6px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

@media (max-width: 760px) {
  .results, .results tbody, .results tr, .results td { display: block; width: 100%; }
  .results thead { display: none; }
  .results { border: 0; background: none; }
  .results tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
  .results td { border: 0; padding: 0; }
  .results td.r-title-cell { grid-column: 1 / -1; }
  .results td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 400; font-size: .85rem; }
  .results td.r-add-cell { grid-column: 1 / -1; margin-top: 8px; }
  .r-add { justify-content: stretch; }
  .r-add .btn { flex: 1; }
  .r-add input { width: 90px; }
  .results tr:hover td { background: none; }
  .basket-table td.r-title-cell { grid-column: 1; grid-row: 1; }
  .basket-table td:last-child { grid-column: 2; grid-row: 1; }
}

/* Quote basket */
.basket-table .r-add input { width: 90px; }
.basket-empty { padding: 28px; text-align: center; background: var(--bg-alt); border-radius: var(--radius-lg); }
.custom-item { display: grid; grid-template-columns: 1fr 120px auto; gap: 10px; align-items: end; margin-top: 16px; }
@media (max-width: 640px) { .custom-item { grid-template-columns: 1fr; } }

/* Technical guides */
.guide-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.guide-toc { position: sticky; top: 92px; font-size: .93rem; }
.guide-toc__title { font-weight: 700; margin-bottom: 8px; }
.guide-toc li { margin-bottom: 6px; }
.guide-toc a { color: var(--muted); text-decoration: none; }
.guide-toc a:hover { color: var(--brand); text-decoration: underline; }
.guide-content { min-width: 0; }
.guide { padding: 28px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.guide:first-child { padding-top: 0; }
.guide h3 { font-size: 1.3rem; }
.guide__body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.guide__body--text { grid-template-columns: 1fr; max-width: 72ch; }
.guide__figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; }
.guide__figure img { display: block; width: 100%; height: auto; }
.guide__steps { padding-left: 1.3em; margin: 0; }
.guide__steps li { margin-bottom: .6em; padding-left: .2em; }
.guide__tips { margin: 16px 0 0; padding: 16px 20px 16px 2.2em; background: var(--brand-tint); border-radius: var(--radius); max-width: 90ch; }
.guide__tips li { margin-bottom: .45em; }
.guide__tips li:last-child { margin-bottom: 0; }
.guide__search { margin: 14px 0 0; font-size: .93rem; }
.profile-table td { vertical-align: middle; }
.profile-cell { width: 116px; }
.profile-cell img { display: block; width: 100px; height: auto; }
.profile-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.profile-grid figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; text-align: center; font-weight: 700; }
.profile-grid img { display: block; }
.materials-table td { min-width: 140px; }
.materials-table td:first-child { min-width: 120px; }
@media (max-width: 960px) { .guide-layout { grid-template-columns: 1fr; } .guide-toc { position: static; } }
@media (max-width: 760px) { .guide__body { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: #0f1f18; color: #c3d3ca; margin-top: 64px; font-size: .93rem; }
.site-footer a { color: #e5efe9; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.site-footer__brand { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.site-footer__title { font-weight: 700; color: #fff; margin-bottom: 10px; }
.site-footer .plain-list li { margin-bottom: 6px; }
.site-footer__legal { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 18px; padding-bottom: 24px; font-size: .82rem; color: #8fa69a; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.site-footer__legal p { margin: 0; }
.site-footer__legal a { color: #c3d3ca; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* Admin */
.admin-box { max-width: 720px; margin: 40px auto; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 16px 0; }
.stat-grid div { background: var(--bg-alt); border-radius: 8px; padding: 8px 12px; display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; }
