:root {
  --bg: #e6e6e6;
  --panel: #dddddd;
  --panel-2: #d4d4d4;
  --ink: #2f2f2f;
  --muted: #6d6d6d;
  --line: #9a9a9a;
  --line-soft: #bdbdbd;
  --white-soft: #f1f1f1;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.35), rgba(255,255,255,0) 220px),
    var(--bg);
  color: var(--ink);
  font-family: "Rajdhani", "Arial Narrow", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.015em;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.site-wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(230, 230, 230, 0.92);
}

.topbar-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-mini {
  display: inline-flex;
  align-items: center;
  width: 42px;
  height: 42px;
}

.brand-mini img {
  width: 42px;
  height: 42px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  background: transparent;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links a:hover,
.btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary:hover {
  background: transparent;
  color: var(--ink);
}

.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: block;
}

.hero-content {
  max-width: none;
  margin: 0;
}

.wordmark {
  width: 100%;
  max-width: none;
  margin-bottom: 44px;
}

.tagline {
  width: 100%;
  max-width: none;
  margin: 0 0 18px;
  font-size: clamp(1.35rem, 2.35vw, 2.05rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.hero-faceplates {
  width: 100%;
  margin: 26px 0 28px;
  border: 1px solid var(--ink);
  background: var(--panel);
  padding: 8px;
}

.hero-faceplates img {
  width: 100%;
  height: auto;
}

.hero-copy {
  width: 100%;
  max-width: none;
  margin: 0 0 28px;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.35;
  color: var(--muted);
  font-weight: 600;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line-soft);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-note {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.4;
}

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

.card {
  min-height: 220px;
  padding: 20px;
  border: 1px solid var(--ink);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 600;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.small-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--ink);
  padding: 6px 10px;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  font-weight: 900;
}

.small-link:hover {
  color: var(--bg);
  background: var(--ink);
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.big-block {
  border: 1px solid var(--ink);
  background: var(--panel);
  padding: 24px;
}

.big-block h3 {
  margin: 0 0 14px;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.big-block p {
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.42;
  font-weight: 600;
}

.download-box {
  border: 1px solid var(--ink);
  background: var(--panel-2);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.download-box p {
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.42;
  font-weight: 600;
}

.footer {
  padding: 32px 0 40px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  font-size: 0.8rem;
}

.footer strong {
  color: var(--ink);
  letter-spacing: 0.12em;
}

/* Manual pages */
.manual-hero {
  padding: 44px 0 28px;
  border-bottom: 1px solid var(--line);
}

.manual-title {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  line-height: 0.88;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 900;
}

.manual-subtitle {
  margin: 16px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 600;
}

.manual-layout {
  padding: 42px 0 56px;
}

.manual-image {
  border: 1px solid var(--ink);
  background: var(--panel);
  margin-bottom: 30px;
}

.manual-text {
  border: 1px solid var(--ink);
  background: var(--panel);
  padding: 28px;
}

.manual-text h2 {
  margin: 0 0 14px;
  font-size: 2rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.manual-text h3 {
  margin: 30px 0 10px;
  font-size: 1.35rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.manual-text p,
.manual-text li {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.45;
  font-weight: 600;
}

.manual-text p {
  margin: 0 0 16px;
}

.manual-text ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.manual-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.manual-index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 42px 0 56px;
}

.terminal {
  border: 1px solid var(--ink);
  background: #d8d8d8;
  padding: 22px;
  font-family: "Courier New", monospace;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
}

.terminal p {
  margin: 0;
}

@media (max-width: 900px) {
  .download-box {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .split-grid,
  .manual-index-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .section-note {
    margin-top: 12px;
  }
}

@media (max-width: 560px) {
  .site-wrap {
    width: min(100% - 20px, var(--max));
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .hero {
    padding: 42px 0 34px;
  }
  .section {
    padding: 40px 0;
  }

  .card,
  .big-block,
  .manual-text,
  .download-box {
    padding: 18px;
  }

  .hero-faceplates {
    padding: 6px;
  }
}

.manual-wide-image {
  display: block;
  width: 100%;
  max-width: 920px;
  height: auto;
  margin: 0 auto 26px;
  border: 1px solid var(--ink);
}

.manual-module-image {
  display: block;
  width: auto;
  max-width: min(360px, 100%);
  max-height: 720px;
  height: auto;
  margin: 0 0 18px;
}

@media (max-width: 560px) {
  .manual-wide-image {
    margin-bottom: 20px;
  }

  .manual-module-image {
    max-width: 78%;
  }
}

.manual-image-frame {
  display: inline-block;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid var(--ink);
  background: var(--panel);
}

.manual-image-frame img {
  margin: 0;
  cursor: zoom-in;
}

.manual-image-frame figcaption {
  margin-top: 7px;
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.exp-image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(0, 0, 0, 0.84);
}

.exp-image-modal.is-open {
  display: flex;
}

.exp-image-modal img {
  display: block;
  max-width: 96vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border: 1px solid #dedede;
  background: #dedede;
}

.exp-image-modal-close {
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 10000;
  border: 1px solid #dedede;
  background: #2c2c2c;
  color: #dedede;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  padding: 7px 11px 9px;
  cursor: pointer;
}

@media (max-width: 560px) {
  .manual-image-frame {
    padding: 6px;
  }

  .exp-image-modal {
    padding: 18px;
  }
}

.footer a {
  color: inherit;
}
