:root {
  --ink: #14211d;
  --ink-soft: #243832;
  --paper: #f5f6f1;
  --panel: #ffffff;
  --line: #d8ddd4;
  --green: #16825f;
  --green-deep: #0d6148;
  --amber: #c6862a;
  --steel: #47637b;
  --muted: #64716d;
  --shadow: rgba(20, 33, 29, 0.16);
  --agbis-red: #d20220;
  --agbis-charcoal: #252c37;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(90deg, rgba(20, 33, 29, 0.04) 1px, transparent 1px), linear-gradient(rgba(20, 33, 29, 0.04) 1px, transparent 1px), var(--paper);
  background-size: 28px 28px;
  font-family: Arial, Helvetica, sans-serif;
}
a { color: inherit; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 12px clamp(18px, 5vw, 72px);
  color: var(--panel);
  background: rgba(20, 33, 29, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 800; text-decoration: none; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; color: rgba(255, 255, 255, 0.82); font-size: 14px; }
.nav a, .lang a { text-decoration: none; }
.lang { display: inline-flex; border: 1px solid rgba(255,255,255,.55); border-radius: 6px; overflow: hidden; }
.lang a { min-width: 42px; padding: 8px 10px; text-align: center; color: var(--panel); font-weight: 800; }
.lang a.active { color: var(--ink); background: var(--panel); }
.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(360px, 1.12fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(42px, 7vh, 78px) clamp(18px, 5vw, 72px);
}
.hero-copy { max-width: 720px; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--green-deep);
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; letter-spacing: 0; }
h1 { margin-bottom: 20px; font-size: clamp(54px, 7vw, 96px); line-height: .92; }
h2 { margin-bottom: 0; font-size: clamp(31px, 4vw, 54px); line-height: 1.02; }
h3 { margin-bottom: 12px; font-size: 22px; }
.lead { max-width: 680px; margin-bottom: 28px; color: var(--ink-soft); font-size: clamp(19px, 2vw, 25px); line-height: 1.42; }
.version-line { margin: -12px 0 24px; color: var(--muted); font-size: 15px; }
.version-line strong { color: var(--green-deep); font-family: Consolas, "Courier New", monospace; }
.hero-actions, .guide-downloads { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
}
.button.primary { color: var(--panel); background: var(--ink); }
.button.secondary { color: var(--ink); background: rgba(255,255,255,.5); }
.button.full { width: 100%; }
.counter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
.counter-row span {
  min-width: 82px;
  color: rgba(255,255,255,.65);
  font-size: 12px;
}
.counter-row b { display: block; color: var(--panel); font-size: 18px; line-height: 1.1; }
.hero-shot, .guide-shot {
  margin: 0;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 12px 12px 0 var(--shadow);
  overflow: hidden;
}
.hero-shot img, .guide-shot img, .media-band img { display: block; width: 100%; height: auto; }
.hero-shot figcaption, .guide-shot figcaption { padding: 12px 16px; color: var(--muted); font-size: 14px; }
.section { padding: 76px clamp(18px, 5vw, 72px); border-top: 1px solid var(--line); }
.section-head { max-width: 900px; margin-bottom: 32px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-grid article {
  min-height: 245px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.feature-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 24px;
  border-radius: 999px;
  color: var(--panel);
  background: var(--green-deep);
  font-family: Consolas, "Courier New", monospace;
  font-weight: 800;
}
.feature-grid p, .plain-list p, .guide-promo p, .download p, .download li, .guide-content p, .guide-content li { color: var(--ink-soft); line-height: 1.58; }
.showcase { padding-top: 64px; }
.web-showcase { background: rgba(255,255,255,.42); }
.product-gallery { display: grid; gap: 18px; }
.desktop-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.desktop-gallery .wide-shot { grid-column: 1 / -1; }
.web-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-gallery figure { margin: 0; min-width: 0; }
.product-gallery img { display: block; width: 100%; height: auto; border: 1px solid var(--ink); border-radius: 8px; background: var(--panel); box-shadow: 8px 8px 0 var(--shadow); }
.product-gallery figcaption { padding: 16px 4px 0; color: var(--muted); line-height: 1.45; }
.split, .guide-promo, .download { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 430px); gap: clamp(24px, 5vw, 64px); align-items: start; }
.plain-list, .download-panel { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.guide-promo { background: rgba(255,255,255,.42); }
.download {
  margin: 0 clamp(18px, 5vw, 72px) 76px;
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 10px 10px 0 var(--shadow);
}
.download-panel { background: #edf2ee; }
.download-count { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 14px; }
.download-count strong { color: var(--green-deep); font-family: Consolas, "Courier New", monospace; }
.hero-download-count { max-width: 250px; text-align: left; }
.download-panel h3 { margin: 24px 0 10px; font-size: 18px; }
.quick-start { max-width: 70ch; margin: 24px 0 0; padding-left: 24px; color: var(--ink-soft); line-height: 1.58; }
.quick-start li + li { margin-top: 8px; }
.download ul { margin: 18px 0 0; padding-left: 22px; }
.download li + li { margin-top: 8px; }
.bulk-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.bulk-section .section-head { margin-bottom: 0; }
.bulk-section .section-head > p:not(.eyebrow) { max-width: 850px; }
.donation-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: clamp(28px, 6vw, 80px); align-items: center; background: rgba(255,255,255,.42); }
.donation-copy p:not(.eyebrow) { max-width: 650px; color: var(--ink-soft); font-size: 18px; line-height: 1.58; }
.donation-card { margin: 0; padding: 18px; border: 1px solid var(--ink); border-radius: 8px; background: #fff; box-shadow: 8px 8px 0 var(--shadow); }
.donation-card img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.donation-card figcaption { padding: 12px 4px 0; color: var(--muted); text-align: center; line-height: 1.4; }
.text-link { display: inline-block; margin-top: 18px; color: var(--accent); font-weight: 800; }
.attribution-section { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 850px); align-items: center; gap: clamp(32px, 6vw, 84px); background: var(--ink); color: var(--panel); }
.agbis-brand { display: flex; align-items: flex-start; flex-direction: column; gap: 14px; color: var(--agbis-red); font-size: 18px; font-weight: 800; }
.agbis-logo { width: min(100%, 260px); aspect-ratio: 366 / 99; background: var(--agbis-red); -webkit-mask: url('assets/agbis-logo.png') center / contain no-repeat; mask: url('assets/agbis-logo.png') center / contain no-repeat; }
.attribution-copy { max-width: 850px; }
.attribution-section h2 { margin: 0 0 12px; }
.attribution-section p:not(.eyebrow) { margin: 0; color: rgba(255,255,255,.76); }
.contact-section { background: rgba(255,255,255,.42); }
.contact-form { max-width: 900px; padding: clamp(20px, 4vw, 34px); border: 1px solid var(--ink); border-radius: 8px; background: var(--panel); box-shadow: 10px 10px 0 var(--shadow); }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.contact-field { display: grid; gap: 8px; min-width: 0; color: var(--ink-soft); font-weight: 700; }
.contact-field.full { grid-column: 1 / -1; }
.contact-field input, .contact-field textarea { width: 100%; min-width: 0; padding: 12px 13px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fbfcf8; font: inherit; }
.contact-field textarea { min-height: 170px; resize: vertical; }
.contact-field input:focus, .contact-field textarea:focus { outline: 2px solid var(--green); outline-offset: 2px; }
.captcha-area { display: grid; grid-template-columns: minmax(220px, 300px) 44px minmax(150px, 1fr); gap: 12px; align-items: end; grid-column: 1 / -1; }
.captcha-image { display: block; width: 100%; height: 84px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.captcha-refresh { width: 44px; height: 44px; border: 1px solid var(--ink); border-radius: 6px; color: var(--ink); background: var(--panel); font-size: 24px; cursor: pointer; }
.captcha-refresh:hover { background: #edf2ee; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 20px; }
.contact-actions button { cursor: pointer; }
.contact-actions button:disabled { cursor: wait; opacity: .58; }
.contact-status { min-height: 22px; margin: 0; color: var(--muted); }
.contact-status.error { color: #9f2f2f; }
.contact-status.success { color: var(--green-deep); }
.contact-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.guide-layout {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}
.guide-toc {
  position: sticky;
  top: 68px;
  align-self: start;
  max-height: calc(100vh - 68px);
  overflow: auto;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,.58);
}
.guide-toc strong { display: block; margin-bottom: 12px; color: var(--green-deep); font-family: Consolas, "Courier New", monospace; font-size: 12px; text-transform: uppercase; }
.guide-toc ol { margin: 0; padding: 0; list-style: none; }
.guide-toc a { display: block; padding: 6px 0; color: var(--ink); text-decoration: none; }
.guide-toc a:hover { color: var(--green-deep); text-decoration: underline; }
.guide-toc .toc-level-3 a { padding-left: 14px; color: var(--muted); font-size: 14px; }
.guide-content { min-width: 0; max-width: 1040px; padding: 42px clamp(18px, 5vw, 72px) 84px; }
.guide-content h1, .guide-content h2, .guide-content h3 { scroll-margin-top: 92px; }
.guide-content h1 { font-size: clamp(36px, 5vw, 62px); }
.guide-content h2 { margin: 48px 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); font-size: clamp(27px, 3vw, 38px); }
.guide-content h3 { margin: 32px 0 12px; font-size: 22px; }
.guide-content p, .guide-content ul, .guide-content ol { max-width: 86ch; }
.guide-content code { padding: 2px 5px; border-radius: 4px; color: #8c302a; background: #edf0ee; font-family: Consolas, "Courier New", monospace; overflow-wrap: anywhere; }
.guide-content pre { width: 100%; min-width: 0; max-width: 100%; overflow: auto; padding: 16px; border-left: 4px solid var(--green-deep); color: #e9f5f0; background: #101714; white-space: pre-wrap; overflow-wrap: anywhere; }
.guide-content pre code { padding: 0; color: inherit; background: transparent; }
.guide-shot { max-width: 900px; margin: 22px 0 30px; box-shadow: 8px 8px 0 var(--shadow); }
.guide-downloads { margin-bottom: 28px; }
footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: 24px clamp(18px, 5vw, 72px); color: rgba(255,255,255,.78); background: var(--ink); }
footer > span { font-weight: 800; color: var(--panel); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
@media (max-width: 980px) {
  .hero, .split, .guide-promo, .download, .donation-section { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desktop-gallery { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { position: static; grid-template-columns: 1fr auto; align-items: start; }
  .nav { grid-column: 1 / -1; justify-content: flex-start; }
  h1 { font-size: 52px; }
  .web-gallery, .feature-grid { grid-template-columns: 1fr; }
  .contact-grid, .captcha-area { grid-template-columns: 1fr; }
  .attribution-section { grid-template-columns: 1fr; align-items: start; }
  .captcha-refresh { align-self: start; }
  .guide-layout { display: block; }
  .guide-toc { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .guide-toc .toc-level-3 { display: none; }
  .guide-content { padding: 28px 18px 56px; }
  .download { margin-bottom: 42px; }
}
