:root {
  --dirt: #5b3a1e;
  --dirt-dark: #3d2612;
  --dirt-mid: #6e4724;
  --grass: #5d9c3d;
  --grass-dark: #3f6b29;
  --grass-light: #8bc34a;
  --ink: #f4f4f4;
  --ink-dim: #bdbdbd;
  --gold: #f1c232;
  --font-pixel: "Pixelify Sans", sans-serif;
  --font-ui: "Figtree", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-ui);
  background: var(--dirt-dark);
  position: relative;
  display: flex;
  flex-direction: column;
}

a { color: var(--gold); text-underline-offset: 0.15em; }
a:hover { color: #ffe082; }

.world-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #1a120c;
  background-image:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(93, 156, 61, 0.22), transparent 58%),
    radial-gradient(ellipse 70% 50% at 85% 80%, rgba(241, 194, 50, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 45% at 10% 70%, rgba(110, 71, 36, 0.45), transparent 50%),
    linear-gradient(180deg, rgba(12, 8, 5, 0.25) 0%, rgba(12, 8, 5, 0.55) 100%),
    repeating-linear-gradient(
      45deg,
      #2a1b10 0 14px,
      #23160d 14px 28px,
      #312012 28px 42px,
      #1c120b 42px 56px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent 0 18px,
      rgba(0, 0, 0, 0.12) 18px 36px
    );
  background-size: auto, auto, auto, auto, 56px 56px, 56px 56px;
}

.topbar, main, .foot { position: relative; z-index: 1; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 8px 14px;
  border-bottom: 4px solid var(--dirt-dark);
  background: linear-gradient(180deg, #7a5230 0%, var(--dirt) 40%, var(--dirt-dark) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.12), 0 4px 0 rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid #000;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.2),
    2px 2px 0 rgba(0, 0, 0, 0.4);
  image-rendering: auto;
}

.hero-icon {
  display: block;
  width: clamp(72px, 16vw, 104px);
  height: clamp(72px, 16vw, 104px);
  margin: 0 auto 0.85rem;
  object-fit: cover;
  border: 3px solid #000;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.15),
    4px 4px 0 rgba(0, 0, 0, 0.45);
}

.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-name {
  font-family: var(--font-pixel);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 2px 2px 0 #1a1a1a;
  line-height: 1;
}
.tagline {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #e0c090;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 14px;
}
.nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.nav a:hover { color: #fff; }

.mc-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 72px;
  padding: 0 14px;
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  text-shadow: 1px 1px 0 #1a1a1a;
  background: linear-gradient(180deg, #8a8a8a 0%, #6e6e6e 48%, #5a5a5a 52%, #4a4a4a 100%);
  border: 2px solid #000;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.28),
    inset -2px -2px 0 rgba(0, 0, 0, 0.35);
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}
.mc-btn:hover { filter: brightness(1.08); color: #fff; }
.mc-btn:active {
  box-shadow: inset -1px -1px 0 rgba(255, 255, 255, 0.15), inset 2px 2px 0 rgba(0, 0, 0, 0.4);
  transform: translateY(1px);
}
.mc-btn-green {
  background: linear-gradient(180deg, #7cb342 0%, #558b2f 48%, #447025 52%, #33691e 100%);
}
.mc-btn.is-active {
  background: linear-gradient(180deg, #5d9c3d 0%, #3f6b29 100%);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.35);
}

.center-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
  gap: 2rem;
}

.hero-install {
  width: min(760px, 100%);
  text-align: center;
  animation: rise 0.7s ease-out both;
}

.hero-brand {
  margin: 0 0 0.4rem;
  font-family: var(--font-pixel);
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  font-weight: 700;
  line-height: 0.95;
  color: #fff;
  text-shadow: 3px 3px 0 #1a1a1a;
}

.hero-install h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-pixel);
  font-size: clamp(1.1rem, 2.8vw, 1.45rem);
  font-weight: 600;
  color: #e0c090;
  text-shadow: 2px 2px 0 #1a1a1a;
}

.lede {
  margin: 0 auto 1.35rem;
  max-width: 36rem;
  color: var(--ink-dim);
  font-size: 1.02rem;
}

.os-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 0.85rem;
}

.cmd-panel[hidden] { display: none !important; }
.cmd-panel { text-align: left; margin-bottom: 1.25rem; }

.panel-label {
  margin: 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #e0c090;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.cmd {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 0.95rem 1rem;
  background: #2a2a2a;
  border: 2px solid #111;
  box-shadow: inset 1px 1px 0 #555, 4px 4px 0 rgba(0, 0, 0, 0.35);
}

.cmd-hero {
  border-width: 3px;
  border-color: #000;
  padding: 1.1rem 1.15rem;
}

.cmd code {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 2vw, 0.92rem);
  line-height: 1.55;
  color: #eee;
  text-align: left;
}

.panel {
  background: linear-gradient(180deg, #6e4724 0%, var(--dirt) 30%, var(--dirt-dark) 100%);
  border: 3px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.12), 4px 4px 0 rgba(0, 0, 0, 0.35);
  padding: 1.1rem 1.2rem 1.25rem;
  text-align: left;
}

.llm-note { margin-bottom: 1.25rem; }

.panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}

.panel-title h2 {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 1.35rem;
  color: #fff;
  text-shadow: 2px 2px 0 #1a1a1a;
}

.panel-sub {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #e0c090;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.2rem 0.45rem;
}

.llm-note p { margin: 0 0 0.75rem; color: var(--ink-dim); }

.llm-list {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  color: var(--ink-dim);
}
.llm-list li + li { margin-top: 0.35rem; }
.llm-list .who { color: var(--gold); font-weight: 700; }
.llm-list code, .after code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: #eee;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.05rem 0.3rem;
  border: 1px solid #111;
}

.hint { margin: 0; font-size: 0.92rem; }

.after {
  margin: 0 auto;
  max-width: 40rem;
  padding-left: 1.2rem;
  color: var(--ink-dim);
  text-align: left;
}
.after li + li { margin-top: 0.35rem; }

.links { width: min(760px, 100%); }
.section-inner { width: 100%; }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-top: 1px solid rgba(0, 0, 0, 0.35); }
.link-list li:first-child { border-top: 0; }
.link-list a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.9rem 0.1rem;
  color: inherit;
  text-decoration: none;
}
.link-list a:hover { color: var(--gold); }
.link-title {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  font-weight: 700;
  text-shadow: 1px 1px 0 #1a1a1a;
}
.link-meta { color: var(--ink-dim); font-family: var(--font-mono); font-size: 0.78rem; }

.foot {
  padding: 1.25rem 14px 1.75rem;
  border-top: 4px solid #000;
  background: linear-gradient(180deg, var(--dirt) 0%, var(--dirt-dark) 100%);
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.foot a { color: var(--ink-dim); }
.foot a:hover { color: var(--gold); }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .nav a { display: none; }
  .cmd { grid-template-columns: 1fr; }
  .mc-btn.copy { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-install { animation: none; }
}
