:root {
  --ink: #161616;
  --paper: #fffdf8;
  --paper-2: #f3f0e8;
  --red: #d51f2e;
  --red-dark: #94131f;
  --blue: #84cdee;
  --green: #8add45;
  --muted: #686868;
  --line: #1c1c1c;
  --shadow: 6px 6px 0 #161616;
  --radius: 14px;
  --sidebar: 220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper-2);
  color: var(--ink);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  line-height: 1.6;
}
a { color: var(--red-dark); }
a:hover { color: var(--red); }
img { max-width: 100%; }

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-areas:
    "header header"
    "sidebar main"
    "footer footer";
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
}

.site-header {
  grid-area: header;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  grid-template-areas: "banner logo";
  min-height: 170px;
  border-bottom: 4px solid var(--line);
  background: var(--blue);
}

.banner {
  grid-area: banner;
  position: relative;
  min-height: 170px;
  background-image: linear-gradient(90deg, rgba(132,205,238,.05), rgba(132,205,238,.05)), url("assets/header.jpg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.banner-title {
  position: absolute;
  left: 22px;
  top: 16px;
  margin: 0;
  color: #fff;
  font: 900 clamp(2rem, 5vw, 4.6rem)/.95 "Arial Black", Impact, sans-serif;
  letter-spacing: .055em;
  -webkit-text-stroke: 2px #111;
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--red);
}

.banner-subtitle {
  position: absolute;
  left: 24px;
  top: 92px;
  margin: 0;
  max-width: 580px;
  display: inline-block;
  padding: 3px 8px;
  background: rgba(255,255,255,.9);
  border: 2px solid var(--line);
  font-weight: 800;
}

.logo-box {
  grid-area: logo;
  display: grid;
  place-items: center;
  padding: 8px;
  background: #fff;
  border-left: 4px solid var(--line);
}
.logo-box img { width: 96px; height: 96px; object-fit: contain; }

.sidebar {
  grid-area: sidebar;
  padding: 18px 14px;
  background: #fff;
  border-right: 4px solid var(--line);
}
.sidebar-inner { position: sticky; top: 12px; }
.nav-title {
  margin: 0 0 8px;
  font: 900 1rem/1.1 "Arial Black", Impact, sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.nav-list { list-style: none; padding: 0; margin: 0 0 20px; }
.nav-list li + li { margin-top: 7px; }
.nav-list a {
  display: block;
  padding: 8px 10px;
  border: 2px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  font-weight: 800;
  box-shadow: 3px 3px 0 var(--line);
}
.nav-list a:hover,
.nav-list a[aria-current="page"] {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
  background: var(--red);
  color: #fff;
}

.language-box {
  border-top: 3px dashed var(--line);
  padding-top: 15px;
}
.language-box label { display: block; font-weight: 800; margin-bottom: 5px; }
.language-box select {
  width: 100%;
  border: 2px solid var(--line);
  background: #fff;
  padding: 8px;
  font: inherit;
}
.small-note { color: var(--muted); font-size: .82rem; }

main {
  grid-area: main;
  min-width: 0;
  padding: clamp(18px, 4vw, 48px);
  background:
    linear-gradient(rgba(255,255,255,.9), rgba(255,255,255,.9)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(0,0,0,.03) 30px 31px);
}

.content-wrap { max-width: 1120px; margin: 0 auto; }
.page-kicker {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 8px;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--line);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
h1, h2, h3 { line-height: 1.15; }
h1 {
  margin: .2em 0 .25em;
  font: 900 clamp(2.3rem, 6vw, 5rem)/.98 "Arial Black", Impact, sans-serif;
  letter-spacing: -.03em;
}
h2 {
  margin-top: 2.2rem;
  font: 900 clamp(1.6rem, 3.5vw, 2.45rem)/1.05 "Arial Black", Impact, sans-serif;
}
h3 { font-size: 1.14rem; }
.lede { max-width: 820px; font-size: clamp(1.05rem, 2vw, 1.25rem); }

.notice {
  margin: 22px 0;
  padding: 14px 16px;
  background: #fff3b8;
  border: 3px solid var(--line);
  box-shadow: 4px 4px 0 var(--line);
  font-weight: 800;
}

.patch-notice {
  background: #ffd9d9;
  border-color: var(--red-dark);
}
.patch-notice strong {
  font: 900 1.06rem/1.2 "Arial Black", Impact, sans-serif;
}

.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.button {
  display: inline-block;
  padding: 10px 14px;
  border: 3px solid var(--line);
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 4px 4px 0 var(--line);
}
.button:hover { color: #fff; background: var(--red-dark); transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--line); }
.button.secondary { background: #fff; color: var(--ink); }
.button.secondary:hover { background: var(--blue); color: var(--ink); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.card {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--line);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; font: 900 1.35rem/1.1 "Arial Black", Impact, sans-serif; }
.card-icon { width: 86px; height: 86px; object-fit: contain; float: right; margin: -8px -5px 8px 12px; }
.card .button { margin-top: 5px; }

.system-map {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 10px;
  margin: 28px 0;
}
.system-node {
  min-height: 120px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px 10px;
  background: #fff;
  border: 3px solid var(--line);
  box-shadow: 4px 4px 0 var(--line);
  font-weight: 900;
}
.system-arrow { display: grid; place-items: center; font-size: 2rem; font-weight: 900; }

.download-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, .75fr);
  gap: 18px;
  align-items: start;
  padding: 20px;
  margin: 24px 0;
  background: #fff;
  border: 3px solid var(--line);
  box-shadow: var(--shadow);
}
.status-pill {
  display: inline-block;
  padding: 4px 8px;
  border: 2px solid var(--line);
  background: #ffe0e0;
  font-size: .88rem;
  font-weight: 900;
}
.download-list { margin: 12px 0 0; padding-left: 18px; }

.tutorial {
  counter-reset: steps;
  display: grid;
  gap: 16px;
  margin: 20px 0;
}
.step {
  counter-increment: steps;
  position: relative;
  padding: 18px 18px 18px 68px;
  border: 3px solid var(--line);
  background: #fff;
}
.step::before {
  content: counter(steps);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: var(--red);
  color: #fff;
  font-weight: 900;
}
.step h3 { margin: 0 0 5px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 22px 0;
}
.shot {
  margin: 0;
  border: 3px solid var(--line);
  background: #fff;
  padding: 12px;
  box-shadow: 5px 5px 0 var(--line);
}
.shot img { display: block; margin: 0 auto; max-height: 620px; object-fit: contain; }
.shot figcaption { padding-top: 9px; font-weight: 800; }

.placeholder-shot {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 25px;
  border: 4px dashed #777;
  background: #eee;
  color: #666;
  font-weight: 800;
}

.details-stack { display: grid; gap: 12px; margin: 20px 0; }
details {
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: 4px 4px 0 var(--line);
}
summary { cursor: pointer; padding: 13px 15px; font-weight: 900; }
details > div { padding: 0 16px 16px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.feature {
  border-left: 7px solid var(--red);
  background: #fff;
  padding: 14px 16px;
  border-top: 2px solid var(--line);
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}
.feature h3 { margin: 0 0 4px; }

.app-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: center;
}
.app-hero-logo {
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(5px 5px 0 rgba(0,0,0,.15));
}

footer {
  grid-area: footer;
  padding: 16px 20px;
  border-top: 4px solid var(--line);
  background: var(--ink);
  color: #fff;
  text-align: center;
}
footer a { color: #fff; }

@media (max-width: 900px) {
  :root { --sidebar: 180px; }
  .cards { grid-template-columns: 1fr; }
  .system-map { grid-template-columns: 1fr; }
  .system-arrow { transform: rotate(90deg); min-height: 28px; }
  .download-panel { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .site-shell {
    grid-template-areas:
      "header"
      "sidebar"
      "main"
      "footer";
    grid-template-columns: 1fr;
  }
  .site-header { grid-template-columns: minmax(0, 1fr) 86px; min-height: 135px; }
  .banner { min-height: 135px; background-position: center; }
  .banner-title { left: 12px; top: 12px; -webkit-text-stroke-width: 1.5px; }
  .banner-subtitle { left: 13px; top: 75px; right: 10px; font-size: .78rem; }
  .logo-box img { width: 68px; height: 68px; }
  .sidebar { border-right: 0; border-bottom: 4px solid var(--line); padding: 10px; }
  .sidebar-inner { position: static; }
  .nav-title { display: none; }
  .nav-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 5px; margin-bottom: 10px; }
  .nav-list li + li { margin-top: 0; }
  .nav-list a { padding: 7px 4px; text-align: center; font-size: .77rem; box-shadow: none; }
  .language-box { border-top: 0; display: flex; align-items: center; gap: 8px; padding-top: 0; }
  .language-box label { margin: 0; white-space: nowrap; font-size: .8rem; }
  .language-box select { max-width: 210px; padding: 6px; }
  .language-box .small-note { display: none; }
  main { padding: 22px 14px 38px; }
  .gallery, .feature-grid { grid-template-columns: 1fr; }
  .app-hero { grid-template-columns: 1fr; }
  .app-hero-logo { width: 120px; height: 120px; order: -1; }
}

@media (max-width: 430px) {
  .nav-list { grid-template-columns: repeat(2, 1fr); }
  .banner-subtitle { display: none; }
  .site-header, .banner { min-height: 108px; }
  .banner-title { font-size: 2.1rem; }
}
