:root {
  --bg: #fafaf7;
  --fg: #16181d;
  --muted: #565b66;
  --card: #ffffff;
  --line: #e3e1da;
  --accent: #c2410c;
  --accent-fg: #ffffff;
  --soft: #f1efe8;
  --focus: #1d4ed8;
  --radius: 10px;
  --max: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #eceef2;
    --muted: #a3a9b6;
    --card: #171a21;
    --line: #2a2f3a;
    --accent: #fb923c;
    --accent-fg: #111111;
    --soft: #151820;
    --focus: #93c5fd;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.skip {
  position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-fg);
  padding: 0.6rem 1rem; z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--card); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.brand {
  font-weight: 800; letter-spacing: 0.04em; font-size: 1.15rem; color: var(--fg); text-decoration: none;
}
.brand span { color: var(--accent); }
.brand.small { font-size: 1rem; margin: 0 0 0.4rem; }
.nav { list-style: none; display: flex; gap: 0.25rem 1.1rem; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { color: var(--fg); text-decoration: none; padding: 0.3rem 0.1rem; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* content */
main { padding: 2.25rem 0 3rem; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.15; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; line-height: 1.25; margin: 2.2rem 0 0.6rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 0.4rem; }
p, ul, ol, table { margin: 0 0 1rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46rem; }
main .wrap > * { max-width: 46rem; }
main .wrap > .hero, main .wrap > .cards, main .wrap > .product-grid, main .wrap > .band, main .wrap > table { max-width: none; }
.hero > * { max-width: 46rem; }
.updated { color: var(--muted); font-size: 0.95rem; margin: 0 0 0.5rem; }
.note {
  border-left: 4px solid var(--accent); background: var(--soft); padding: 0.8rem 1rem; border-radius: 0 var(--radius) var(--radius) 0;
}
code { background: var(--soft); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.95em; }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
th, td { border: 1px solid var(--line); padding: 0.5rem 0.7rem; text-align: left; vertical-align: top; }
th { background: var(--soft); }

/* home */
.hero { padding: 1.5rem 0 0.5rem; }
.hero .lead { margin-bottom: 1.4rem; }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 0 0 1rem; }
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-fg); padding: 0.7rem 1.2rem;
  border-radius: var(--radius); font-weight: 700; text-decoration: none; border: 2px solid var(--accent);
}
.btn:hover { filter: brightness(1.08); }
.btn.alt { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.alt:hover { border-color: var(--accent); }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.2rem 0 2rem; padding: 0; list-style: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--muted); }
.tag { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.35rem; }
.band { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1.5rem 0; }
.band h2 { margin-top: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.steps li::before { content: counter(s); display: inline-block; font-weight: 800; color: var(--accent); margin-right: 0.4rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--card); padding: 1.8rem 0 2.2rem; font-size: 0.97rem; }
.cols { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.cols p { margin: 0 0 0.4rem; }
.foot-h { font-weight: 700; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.fine { color: var(--muted); font-size: 0.88rem; margin-top: 1.4rem; max-width: 60rem; }

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .bar { flex-direction: column; align-items: flex-start; }
  main { padding-top: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .site-footer .cols, .skip, .actions { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}

/* Product gallery, lightbox (CSS :target, no scripts) and PDF viewer */
.gallery { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); margin: 1rem 0 .4rem; }
.gallery .thumb { display: block; border: 1px solid var(--line, #cfd4da); border-radius: .4rem; overflow: hidden; background: #fff; }
.gallery .thumb img { display: block; width: 100%; height: auto; }
.gallery .thumb:hover, .gallery .thumb:focus { outline: 2px solid currentColor; }
.lb { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .9); overflow: auto; }
.lb:target { display: block; }
.lb-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; padding: .6rem 1rem; background: #111; color: #fff; }
.lb-bar a, .lb-bar span { color: #fff; font-size: .95rem; }
.lb-bar a { text-decoration: underline; }
.lb-img { display: block; text-align: center; padding: .5rem; cursor: zoom-in; }
.lb-img img { max-width: 100%; max-height: calc(100vh - 4rem); width: auto; height: auto; background: #fff; }
.lb.zoom .lb-img { cursor: zoom-out; text-align: left; }
.lb.zoom .lb-img img { max-width: none; max-height: none; }
.pdf-viewer { width: 100%; height: 70vh; min-height: 24rem; border: 1px solid var(--line, #cfd4da); border-radius: .4rem; background: #fff; }
@media print { .lb, .pdf-viewer { display: none !important; } }

/* Product catalog cards and product page hero image */
.product-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); margin: 1rem 0 2rem; padding: 0; list-style: none; }
.pcard { border: 1px solid var(--line, #cfd4da); border-radius: .5rem; overflow: hidden; background: var(--bg, #fff); }
.pcard a { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.pcard img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #eee; }
.pcard .pname { padding: .7rem .8rem .2rem; font-weight: 600; line-height: 1.3; }
.pcard .pprice { padding: 0 .8rem .8rem; margin-top: auto; font-size: 1.05rem; }
.pcard a:hover, .pcard a:focus { outline: 2px solid currentColor; outline-offset: -2px; }
.hero-img { display: block; margin: 1rem 0; border: 1px solid var(--line, #cfd4da); border-radius: .5rem; overflow: hidden; cursor: zoom-in; }
.hero-img img { display: block; width: 100%; height: auto; }
