:root {
  --ink: #1d1b22;
  --muted: #6b6775;
  --line: #e6e2ea;
  --paper: #fbfaf7;
  --card: #ffffff;
  --brand: #3d5afe;
  --brand-ink: #ffffff;
  --brand-soft: #eef1ff;
  --good: #1f8a5b;
  --bad: #c2413a;
  --warn: #b7791f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 16, 30, .06), 0 6px 20px rgba(20, 16, 30, .06);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); line-height: 1.55; font-size: 16px; }
img, svg { max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.02em; }
h2 { font-size: 1.45rem; margin-top: 1.6em; }
code { font-family: "JetBrains Mono", Consolas, monospace; font-size: .86em; background: #f1eef4; padding: .1em .35em; border-radius: 4px; }
pre code { background: none; padding: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.tiny { font-size: .8rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin: .3em 0; }
main { padding: 28px 0 64px; min-height: 60vh; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.two { display: grid; gap: 28px; grid-template-columns: 1.1fr .9fr; }
@media (max-width: 820px) { .two { grid-template-columns: 1fr; } }

/* header */
#site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.bar { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo span { font-size: .7rem; font-weight: 700; background: var(--ink); color: #fff; padding: 2px 6px; border-radius: 20px; margin-left: 6px; vertical-align: 2px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; padding: 7px 10px; border-radius: 8px; font-size: .94rem; }
.nav a:hover { background: #f3f1f6; }
.nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav .guide-link { border: 1px solid var(--line); }
.cart-link b { background: var(--ink); color: #fff; border-radius: 20px; padding: 1px 7px; font-size: .78rem; margin-left: 3px; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: block; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font: inherit; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 60px; background: var(--card); flex-direction: column; align-items: stretch; padding: 8px 16px 14px; border-bottom: 1px solid var(--line); }
  .nav-open .nav { display: flex; }
}

/* buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--brand); color: var(--brand-ink);
  font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 10px; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.dark { background: var(--ink); }
.btn.small { padding: 6px 12px; font-size: .88rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 4px; }
label.check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.bad { border-color: var(--bad) !important; background: #fff6f5 !important; }
.err { color: var(--bad); font-size: .84rem; margin: 4px 0 0; }
.success { color: var(--good); font-weight: 600; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.note { background: var(--brand-soft); border-left: 4px solid var(--brand); padding: 12px 16px; border-radius: 8px; font-size: .93rem; }
.note.warn { background: #fff7e8; border-color: var(--warn); }

/* product art and cards */
.art { --tone: #ccc; height: 170px; border-radius: 10px; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--tone) 35%, #fff), color-mix(in srgb, var(--tone) 75%, #fff)); }
.art svg { width: 46%; fill: none; stroke: #1d1b22; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .two > div > .art { height: 220px !important; } }
.prod { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.prod h3 { font-size: 1rem; margin: 4px 0 0; }
.prod h3 a { color: var(--ink); text-decoration: none; }
.prod .price { font-weight: 700; }
.prod .row { margin-top: auto; }
.was { color: var(--muted); text-decoration: line-through; font-weight: 400; margin-left: 6px; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 20px; background: #f1eef4; color: var(--muted); }
.tag.out { background: #fdecea; color: var(--bad); }
.tag.sale { background: #e6f6ee; color: var(--good); }

/* home */
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: center; padding: 22px 0 10px; }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 36em; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }
.promos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 26px 0; }
.promo { border-radius: var(--radius); padding: 22px; color: #fff; text-decoration: none; display: block; min-height: 130px; }
.promo b { display: block; font-size: 1.25rem; margin-bottom: 4px; }
.promo.p1 { background: linear-gradient(135deg, #3d5afe, #7c4dff); }
.promo.p2 { background: linear-gradient(135deg, #00897b, #43a047); }
.promo.p3 { background: linear-gradient(135deg, #ef6c00, #d84315); }

/* shop toolbar */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 20px; }
.toolbar > * { flex: 1 1 160px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 3 1 300px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: .88rem; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* product page */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 30px; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--brand); font-weight: 600; }
.qty { width: 90px !important; }
.stars { color: #e0a800; letter-spacing: 2px; }

/* cart */
table.lines { width: 100%; border-collapse: collapse; }
.lines th, .lines td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lines th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.lines .mini { width: 56px; }
.lines .mini .art { height: 56px; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; }
.sum .total { font-size: 1.2rem; font-weight: 800; border-top: 1px solid var(--line); padding-top: 8px; }
@media (max-width: 640px) {
  .lines thead { display: none; }
  .lines tr { display: grid; grid-template-columns: 56px 1fr auto; gap: 4px 10px; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .lines td { border: 0; padding: 0; }
  .lines td.mini { grid-row: span 3; }
}

/* steps (checkout + quote) */
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 22px; counter-reset: s; flex-wrap: wrap; }
.steps li { flex: 1 1 110px; font-size: .84rem; color: var(--muted); padding-top: 10px; border-top: 4px solid var(--line); counter-increment: s; }
.steps li::before { content: counter(s) ". "; }
.steps li.done { border-color: var(--good); color: var(--ink); }
.steps li.on { border-color: var(--brand); color: var(--ink); font-weight: 700; }
fieldset { border: 0; padding: 0; margin: 0; }
.step-panel[hidden] { display: none; }
.choice { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 8px 0; font-weight: 400; cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice span { margin-left: auto; font-weight: 600; }
.nav-btns { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }

/* article */
.article { max-width: 720px; }
.article p { font-size: 1.06rem; }
.video { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #000; margin: 20px 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.offer { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 26px; margin: 40px 0; }
.offer a { color: #fff; }
.toc a { display: block; padding: 3px 0; }

/* guide */
.guide { display: grid; grid-template-columns: 240px 1fr; gap: 36px; }
.guide nav { position: sticky; top: 80px; align-self: start; font-size: .9rem; }
.guide nav a { display: block; color: var(--muted); text-decoration: none; padding: 4px 0; }
.guide nav a:hover { color: var(--brand); }
.guide section { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.guide h3 { margin-top: 1.4em; }
.guide ol li, .guide ul li { margin: .35em 0; }
.ex { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 14px 0; }
.ex > b:first-child { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin-bottom: 4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.tbl th { background: #f5f3f7; }
pre.code { background: #1d1b22; color: #ece9f1; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: .82rem; line-height: 1.5; }
@media (max-width: 860px) { .guide { grid-template-columns: 1fr; } .guide nav { position: static; columns: 2; } }

/* footer */
#site-footer { background: #f3f1f6; border-top: 1px solid var(--line); padding: 30px 0 90px; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; margin-bottom: 14px; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; } }

/* consent */
#consent { position: fixed; left: 16px; bottom: 16px; max-width: 460px; z-index: 50; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0,0,0,.18); padding: 16px 18px; font-size: .92rem; }
#consent p { margin-top: 0; }
#consent label { font-weight: 400; display: flex; gap: 8px; margin: 6px 0; }
.consent-opts { margin-bottom: 10px; }
@media (max-width: 520px) { #consent { left: 8px; right: 8px; bottom: 8px; } }

/* dataLayer inspector */
#dl-panel { position: fixed; right: 16px; bottom: 16px; z-index: 40; font-size: 13px; }
#dl-toggle { background: #1d1b22; color: #fff; border: 0; border-radius: 30px; padding: 10px 16px; font: 600 13px/1 Consolas, monospace; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.25); float: right; }
#dl-toggle b { background: #3d5afe; border-radius: 20px; padding: 2px 7px; margin-left: 4px; }
#dl-body { display: none; clear: both; width: min(440px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; background: #1d1b22; color: #ece9f1; border-radius: 12px; margin-bottom: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
#dl-panel.open #dl-body { display: block; }
#dl-panel { display: flex; flex-direction: column-reverse; align-items: flex-end; }
.dl-head { position: sticky; top: 0; background: #2a2731; padding: 8px 12px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.dl-head label { margin: 0; font-weight: 400; display: flex; gap: 4px; align-items: center; font-size: 12px; }
.dl-head code { background: #3a3642; color: #fff; }
.dl-head .warn { color: #ffcf70; font-weight: 700; }
#dl-list { margin: 0; padding: 6px 12px 10px 34px; font-family: Consolas, monospace; }
#dl-list li { margin: 3px 0; }
#dl-list li.k-event summary { color: #9fb4ff; font-weight: 700; }
#dl-list li.k-gtag summary { color: #ffcf70; }
#dl-list li.k-data summary { color: #a0dcb8; }
#dl-list li.k-gtm { display: none; color: #8a8494; }
#dl-panel.show-gtm #dl-list li.k-gtm { display: list-item; }
#dl-list summary { cursor: pointer; }
#dl-list pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; margin: 4px 0 8px; color: #d9d5e0; }
