:root {
  --green: #0c4a3c;
  --green-deep: #08352b;
  --green-mid: #1a6b56;
  --green-soft: #dce8e3;
  --paper: #f4f1ea;
  --paper-2: #ebe6db;
  --ink: #14211c;
  --ink-2: #3d4a45;
  --line: #cfc8b8;
  --orange: #c45a1a;
  --white: #fffcf7;
  --danger: #9b2c2c;
  --ok: #1d6b45;
  --shadow: 0 0 0 1px var(--line);
  --max: 1180px;
  --header: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; }

.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-mid);
}

/* Top bar */
.topbar {
  background: var(--green-deep);
  color: #e7efe9;
  font-size: 13px;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 34px;
}
.topbar a { color: #e7efe9; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.roles { display: flex; gap: 6px; flex-wrap: wrap; }
.roles button {
  border: 0;
  background: transparent;
  color: #c5d4cc;
  padding: 4px 8px;
  cursor: pointer;
}
.roles button.is-on { color: #fff; background: #145544; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  height: var(--header);
}
.header .wrap {
  height: 100%;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 24px;
  align-items: center;
}
.logo {
  display: flex;
  color: var(--green);
  text-decoration: none;
  height: 34px;
}
.logo svg { height: 100%; width: auto; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a {
  text-decoration: none;
  font-size: 15px;
  color: var(--ink-2);
}
.nav a:hover, .nav a.is-on { color: var(--green); }
.header-tools { display: flex; gap: 10px; align-items: center; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0 10px;
  height: 38px;
  min-width: 220px;
}
.search input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--green-deep); }
.btn.ghost {
  background: transparent;
  color: var(--green);
}
.btn.ghost:hover { background: var(--green-soft); }
.btn.wide { width: 100%; }
.btn.orange { background: var(--orange); border-color: var(--orange); }

/* Hero */
.hero {
  background: var(--green);
  color: #f3f7f4;
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  padding: 56px 0 48px;
  align-items: center;
}
.hero h1 {
  font-family: Syne, sans-serif;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 0.95;
  font-weight: 700;
  margin: 10px 0 16px;
  letter-spacing: -0.03em;
}
.hero p { max-width: 46ch; color: #d5e4dc; font-size: 18px; }
.hero-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.hero-visual {
  background: #0a3c31;
  min-height: 340px;
  position: relative;
}
.hero-visual img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}
.hero-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(8, 40, 32, 0.82);
  padding: 8px 10px;
  font-size: 12px;
  font-family: "IBM Plex Mono", monospace;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #1d5c4c;
}
.stat {
  padding: 18px 0;
  border-right: 1px solid #1d5c4c;
}
.stat:last-child { border-right: 0; }
.stat b {
  display: block;
  font-family: Syne, sans-serif;
  font-size: 28px;
}
.stat span { color: #b7cfc5; font-size: 13px; }

/* Sections */
section { padding: 64px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 28px;
}
h2 {
  font-family: Syne, sans-serif;
  font-size: 32px;
  margin: 6px 0 0;
  letter-spacing: -0.03em;
}
h3 { font-family: Syne, sans-serif; margin: 0 0 8px; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.entry, .card, .object, .doc {
  background: var(--white);
  border: 1px solid var(--line);
}
.entry { padding: 18px; min-height: 168px; text-decoration: none; display: flex; flex-direction: column; }
.entry:hover { border-color: var(--green); }
.entry strong { font-family: Syne, sans-serif; font-size: 20px; }
.entry span { margin-top: auto; color: var(--ink-2); font-size: 14px; padding-top: 18px; }
.entry .num { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--green-mid); }

.offer { list-style: none; padding: 0; margin: 0; }
.offer li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.offer li i {
  font-style: normal;
  font-family: "IBM Plex Mono", monospace;
  color: var(--green-mid);
}

.object img { height: 160px; width: 100%; object-fit: cover; }
.object { text-decoration: none; }
.object div { padding: 14px; }
.object small { color: var(--ink-2); }

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.photo-stack { display: grid; gap: 10px; }
.photo-stack img { width: 100%; height: 180px; object-fit: cover; border: 1px solid var(--line); }

footer {
  background: var(--green-deep);
  color: #d7e3dc;
  padding: 42px 0 24px;
  font-size: 14px;
}
footer a { color: #d7e3dc; }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.legal { margin-top: 28px; color: #93a79e; font-size: 12px; }

/* Catalog */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--white);
  height: 34px;
  padding: 0 12px;
  cursor: pointer;
}
.chip.is-on { background: var(--green); color: #fff; border-color: var(--green); }
.series-card {
  padding: 16px;
  text-decoration: none;
  display: grid;
  gap: 6px;
  min-height: 140px;
}
.series-card:hover { border-color: var(--green); }
.series-card .sku { font-family: Syne, sans-serif; font-size: 22px; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Product */
.crumbs { font-size: 13px; color: var(--ink-2); padding: 16px 0 0; }
.crumbs a { color: var(--ink-2); }
.product-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  padding: 20px 0 32px;
  align-items: start;
}
.gallery {
  background: #111;
  border: 1px solid var(--line);
  min-height: 380px;
  display: grid;
  place-items: center;
}
.gallery img { max-height: 400px; width: auto; margin: auto; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; }
.thumbs button {
  width: 72px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--line);
  background: #111;
  cursor: pointer;
}
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.fact {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 10px 12px;
}
.fact b { display: block; font-family: "IBM Plex Mono", monospace; font-size: 15px; }
.fact span { font-size: 12px; color: var(--ink-2); }

.sticky-cta {
  position: sticky;
  top: calc(var(--header) + 12px);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 16px;
  display: grid;
  gap: 10px;
}
.sku-live {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  background: var(--paper);
  padding: 8px;
  word-break: break-all;
}

.tabs {
  position: sticky;
  top: var(--header);
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0;
  overflow: auto;
}
.tabs a {
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs a.is-on, .tabs a:hover { color: var(--green); border-bottom-color: var(--green); }

.panel { padding: 36px 0; }
.panel h2 { margin-bottom: 12px; }

.builder {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 14px;
  margin: 16px 0;
}
.builder label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); }
.builder select, .filterbar input, .filterbar select {
  height: 36px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0 8px;
}

.filterbar {
  display: grid;
  grid-template-columns: 1.4fr repeat(5, 1fr) auto;
  gap: 8px;
  margin: 12px 0 10px;
  align-items: end;
}
.filterbar label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); }
.table-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }

.table-wrap {
  overflow: auto;
  max-height: 480px;
  border: 1px solid var(--line);
  background: var(--white);
}
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td {
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  text-align: right;
}
th { position: sticky; top: 0; background: var(--paper-2); font-weight: 600; text-align: right; }
th:first-child, td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--white);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}
th:first-child { background: var(--paper-2); }
tr.is-on td { background: #e7f1ec; }
tr.is-on td:first-child { background: #e7f1ec; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: #f6f3ea; }

.chart-box {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 12px;
}
.chart-box canvas { width: 100%; height: 360px; display: block; }

.scheme {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 16px;
  min-height: 280px;
}
.accessories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.accessories article { background: var(--white); border: 1px solid var(--line); padding: 14px; }

.note {
  border-left: 3px solid var(--orange);
  padding: 8px 12px;
  background: #f7efe6;
  font-size: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 16, 0.55);
  display: none;
  place-items: center;
  z-index: 80;
  padding: 20px;
}
.modal.is-on { display: grid; }
.modal form, .sheet {
  background: var(--white);
  width: min(460px, 100%);
  padding: 22px;
  display: grid;
  gap: 10px;
}
.modal input, .modal textarea, .modal select {
  height: 38px;
  border: 1px solid var(--line);
  padding: 0 10px;
  background: var(--paper);
}
.modal textarea { height: 90px; padding: 8px 10px; }

.menu-btn, .search-btn { display: none; }
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--green);
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
}
.skip:focus { left: 8px; }
.scroll-hint { display: none; }
.mobile-cta { display: none; }
.icon-btn {
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--green);
  cursor: pointer;
}

@media (max-width: 1280px) {
  .wrap { width: min(var(--max), calc(100% - 32px)); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1100px) {
  .header .wrap { grid-template-columns: 140px 1fr auto; gap: 12px; }
  .nav { gap: 14px; }
  .search { min-width: 160px; }
  .builder { grid-template-columns: repeat(3, 1fr); }
  .filterbar { grid-template-columns: repeat(3, 1fr); }
  .accessories { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  :root { --header: 60px; }
  .wrap { width: min(var(--max), calc(100% - 24px)); }
  .topbar .wrap {
    min-height: 40px;
    padding: 6px 0;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .topbar .contacts { width: 100%; }
  .header { position: sticky; }
  .header .wrap { grid-template-columns: 1fr auto; position: relative; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    z-index: 50;
    gap: 0;
  }
  .nav.open a {
    padding: 12px 4px;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--paper-2);
  }
  .search {
    display: none;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    z-index: 55;
    min-width: 0;
    height: 48px;
    border-left: 0;
    border-right: 0;
    padding: 0 16px;
  }
  .search.is-open { display: flex; }
  .search-btn, .menu-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  .header-tools .btn.ghost:not(.menu-btn):not(.search-btn),
  .header-tools .btn:not(.menu-btn):not(.search-btn) { display: none; }
  .hero .wrap, .product-hero, .split, footer .wrap, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .builder, .filterbar { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 14px 12px 14px 0; }
  .stat:nth-child(2n) { border-right: 0; }
  .sticky-cta { position: static; }
  .hero { padding-bottom: 8px; }
  .hero .wrap { gap: 20px; padding: 28px 0 20px; }
  .hero-visual, .hero-visual img { min-height: 200px; height: 220px; }
  .gallery { min-height: 240px; }
  .gallery img { max-height: 260px; }
  .product-hero h2 { font-size: clamp(28px, 8vw, 42px) !important; }
  section { padding: 40px 0; }
  h2 { font-size: clamp(24px, 6vw, 32px); }
  .section-head { flex-direction: column; align-items: start; }
  .filters {
    position: sticky;
    top: var(--header);
    z-index: 18;
    background: var(--paper);
    padding: 8px 0 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .chip { flex: 0 0 auto; min-height: 40px; }
  .tabs { -webkit-overflow-scrolling: touch; }
  .tabs a { padding: 14px 16px; min-height: 44px; }
  .scroll-hint {
    display: block;
    font-size: 12px;
    color: var(--ink-2);
    margin: 0 0 8px;
  }
  .table-wrap {
    max-height: 70vh;
    -webkit-overflow-scrolling: touch;
  }
  .chart-box canvas { height: 240px; }
  .mobile-cta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    position: sticky;
    bottom: 0;
    z-index: 30;
    background: var(--white);
    border-top: 1px solid var(--line);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }
  .mobile-cta .mono { font-size: 12px; word-break: break-all; }
  body.has-mobile-cta { padding-bottom: 0; }
  .modal { padding: 0; align-items: end; }
  .modal form, .sheet {
    width: 100%;
    max-height: 92vh;
    overflow: auto;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 640px) {
  .builder, .filterbar, .accessories, .facts { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid #1d5c4c; }
  .stat:last-child { border-bottom: 0; }
  .hero p { font-size: 16px; }
  .btn { min-height: 44px; }
  .roles { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .roles button { flex: 0 0 auto; min-height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .topbar, .header, .tabs, .mobile-cta, .modal, .menu-btn, .search-btn { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: inherit; }
}
