:root {
  --ink: #17140e;
  --paper: #f3f5df;
  --surface: #fffef2;
  --surface-2: #ecefd2;
  --hood: #c6f006;
  --green: #1c8f48;
  --muted: #6f715e;
  --line: #d6dab4;
  --dark: #1b1610;
  --shadow: rgba(27, 22, 16, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(27, 22, 16, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 22, 16, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px, 44px 44px, auto;
}

a,
button {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

.shell-header {
  width: 224px;
  min-height: calc(100vh - 28px);
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 16px;
  border: 1px solid rgba(198, 240, 6, 0.35);
  border-radius: 8px;
  background: var(--dark);
  color: #f4f7df;
  box-shadow: 0 24px 70px var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--hood);
  font-weight: 900;
}

.brand img {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(198, 240, 6, 0.38);
  border-radius: 6px;
  object-fit: cover;
  background: #0c0b07;
}

.shell-header nav {
  display: grid;
  gap: 8px;
}

.shell-header nav a {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(198, 240, 6, 0.18);
  border-radius: 6px;
  color: #d8dec3;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.shell-header nav a:hover {
  color: var(--hood);
  background: rgba(198, 240, 6, 0.08);
}

.shell-header nav .primary {
  color: #16180b;
  background: var(--hood);
  border-color: var(--hood);
}

.app {
  width: calc(100% - 280px);
  max-width: 1280px;
  margin: 0 28px 72px 266px;
}

.hero {
  min-height: 76vh;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.62fr);
  align-items: center;
  gap: 28px;
  padding: 42px 0 24px;
}

.hero-copy {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--surface), #f8fae9);
  box-shadow: 0 24px 60px var(--shadow);
}

.eyebrow {
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--dark);
  color: var(--hood);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 790px;
  margin-bottom: 22px;
  font-size: clamp(3.2rem, 8vw, 8.4rem);
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lead {
  max-width: 720px;
  margin-bottom: 0;
  color: #4d4d3f;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 1.65;
  font-weight: 640;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--dark);
  border-radius: 6px;
  background: var(--dark);
  color: var(--surface);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-actions a:nth-child(2) {
  background: var(--hood);
  color: var(--dark);
}

.asset-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 60px var(--shadow);
  overflow: hidden;
}

.asset-top,
.panel-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.asset-top strong,
.panel-head strong {
  color: var(--green);
}

.asset-card img {
  width: calc(100% - 28px);
  display: block;
  margin: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--dark);
}

.asset-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0 14px 14px;
}

.asset-meta p,
.status-list p,
.sim-results p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfce9;
  color: var(--muted);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.76rem;
}

.asset-meta strong,
.status-list strong,
.sim-results strong {
  color: var(--dark);
}

.terminal {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.72fr);
  gap: 14px;
  margin-bottom: 14px;
}

.panel,
.mechanics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px var(--shadow);
}

.panel {
  padding: 0;
  overflow: hidden;
}

.vault-panel {
  grid-row: span 2;
}

.route-grid {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.route {
  min-height: 118px;
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: 1fr auto;
  column-gap: 14px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfce9;
  color: var(--ink);
  text-align: left;
}

.route.active {
  border-color: var(--dark);
  background: linear-gradient(90deg, var(--hood), #f5ffc0);
}

.route span {
  grid-row: 1 / 3;
  align-self: stretch;
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(27, 22, 16, 0.18);
  color: var(--green);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-weight: 950;
}

.route strong {
  font-size: 1.1rem;
  text-transform: uppercase;
}

.route small {
  color: #535544;
  font-size: 0.78rem;
  font-weight: 750;
}

.simulator,
.status-panel {
  padding-bottom: 14px;
}

.simulator label {
  display: block;
  margin: 16px 14px 8px;
  color: var(--muted);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.input-row {
  margin: 0 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfce9;
}

.input-row input {
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  outline: none;
}

.input-row span {
  min-width: 92px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  color: var(--green);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 950;
}

input[type="range"] {
  width: calc(100% - 28px);
  margin: 18px 14px 16px;
  accent-color: var(--green);
}

.sim-results,
.status-list {
  display: grid;
  gap: 8px;
  padding: 0 14px;
}

.mechanics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.mechanics article {
  min-height: 210px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mechanics span,
.num {
  color: var(--green);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 950;
}

.mechanics h2,
.docs h2 {
  margin: 10px 0 12px;
  font-size: 1rem;
  text-transform: uppercase;
}

.mechanics p,
.doc-page p {
  margin-bottom: 0;
  color: #535544;
  font-size: 0.88rem;
  line-height: 1.66;
  font-weight: 620;
}

.docs {
  padding-bottom: 14px;
  margin-bottom: 72px;
}

.doc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.doc-tab {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfce9;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.doc-tab.active {
  color: var(--dark);
  background: var(--hood);
  border-color: var(--dark);
}

.doc-body {
  min-height: 210px;
  margin: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfce9;
}

.doc-page {
  display: none;
}

.doc-page.active {
  display: block;
}

@media (max-width: 1120px) {
  .shell-header {
    width: calc(100% - 28px);
    min-height: auto;
    flex-direction: row;
  }

  .shell-header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .app {
    width: min(100% - 28px, 900px);
    margin: 0 auto 72px;
    padding-top: 78px;
  }

  .hero,
  .terminal,
  .mechanics {
    grid-template-columns: 1fr 1fr;
  }

  .hero-copy,
  .asset-card,
  .vault-panel,
  .docs {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .shell-header {
    align-items: flex-start;
  }

  .brand span {
    display: none;
  }

  .hero,
  .terminal,
  .mechanics {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 420px;
    padding: 24px;
  }
}
