:root {
  color-scheme: dark;
  --panel: #1a1a1a;
  --panel-deep: #0e0e0e;
  --panel-raised: #222;
  --silk: #f2f2f2;
  --dim: #9b9b94;
  --line: #55554f;
  --line-soft: #343431;
  --red: #ff3b30;
  --orange: #ff9a00;
  --yellow: #ffd600;
  --white-step: #f2f2f2;
  --shell: 1440px;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", "Liberation Mono", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  background: var(--panel-deep);
  color: var(--silk);
  font-family: var(--mono);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, transparent 0 49.9%, rgb(255 255 255 / 2%) 50%, transparent 50.1%),
    var(--panel-deep);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img {
  max-width: 100%;
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

code,
pre {
  font-family: var(--mono);
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 8px;
  left: 8px;
  padding: 12px 16px;
  background: var(--yellow);
  color: var(--panel-deep);
  font-weight: 800;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.panel-bar,
.panel {
  width: min(100% - 32px, var(--shell));
  margin-inline: auto;
  border-inline: 1px solid var(--line);
}

.panel-bar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  min-height: 64px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgb(14 14 14 / 96%);
}

.brand,
.panel-bar nav,
.status {
  padding-inline: 24px;
}

.brand {
  display: inline-flex;
  min-height: 64px;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 32px;
  height: 32px;
}

.status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--dim);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.status span {
  width: 9px;
  height: 9px;
  background: var(--red);
}

.panel-bar nav {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
}

.panel-bar nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  text-underline-offset: 5px;
}

.hero {
  min-height: calc(100svh - 64px);
  padding: clamp(44px, 6vw, 84px) clamp(20px, 4vw, 64px) 32px;
  background: var(--panel);
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.46fr);
  align-items: end;
  gap: 32px;
  padding-bottom: clamp(32px, 5vw, 64px);
}

.silk,
.module-no {
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
}

.hero-copy .silk {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(5rem, 15vw, 13rem);
  font-weight: 900;
  line-height: 0.7;
  letter-spacing: -0.04em;
}

.hero-title {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  gap: clamp(12px, 2vw, 28px);
}

.hero-title img {
  display: block;
  width: clamp(76px, 10vw, 144px);
  height: auto;
  flex: 0 0 auto;
}

.hero-line {
  margin-bottom: 0;
  color: var(--dim);
  font-size: clamp(1rem, 1.7vw, 1.5rem);
  line-height: 1.5;
}

.hero-line strong {
  color: var(--silk);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 24px;
  border-block: 1px solid var(--line);
}

.hero-facts p {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 16px;
  border-right: 1px solid var(--line-soft);
  font-size: 0.7rem;
  line-height: 1.4;
}

.hero-facts p:last-child {
  border-right: 0;
}

.fact-led {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
}

.red {
  background: var(--red);
}

.orange {
  background: var(--orange);
}

.yellow {
  background: var(--yellow);
}

.white {
  background: var(--white-step);
}

.hero-actions,
.skill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-bottom: 36px;
}

.control {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--silk);
  border-radius: 0;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.control.primary {
  border-color: var(--red);
  background: var(--red);
  color: var(--panel-deep);
}

.control.secondary {
  background: transparent;
  color: var(--silk);
}

.control:hover,
.copy:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--panel-deep);
}

.signal {
  margin-bottom: 0;
  border: 1px solid var(--line);
  background: var(--panel-deep);
}

.signal figcaption,
.boundary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 10px 16px;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
}

.signal figcaption {
  border-bottom: 1px solid var(--line);
}

.signal figcaption strong,
.boundary b {
  color: var(--red);
}

.route {
  display: grid;
  min-height: 210px;
  grid-template-columns: 1fr minmax(50px, 0.7fr) 1fr minmax(50px, 0.7fr) 1fr minmax(50px, 0.7fr) 1.4fr;
  align-items: center;
  gap: 10px;
  padding: 28px clamp(16px, 4vw, 56px);
}

.node {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.node-label,
.node-name {
  font-size: 0.65rem;
  line-height: 1.3;
}

.node-label {
  color: var(--dim);
}

.node-name {
  min-height: 2.6em;
  overflow-wrap: anywhere;
}

.node-icon {
  position: relative;
  display: block;
  width: 58px;
  height: 46px;
  border: 2px solid var(--silk);
}

.laptop::after {
  position: absolute;
  right: -8px;
  bottom: -8px;
  left: -8px;
  height: 4px;
  background: var(--silk);
  content: "";
}

.router {
  height: 24px;
  margin-top: 22px;
  border-top: 0;
}

.router::before,
.router::after {
  position: absolute;
  bottom: 20px;
  width: 2px;
  height: 28px;
  background: var(--silk);
  content: "";
}

.router::before {
  left: 8px;
}

.router::after {
  right: 8px;
}

.phone {
  width: 30px;
  height: 55px;
}

.terminal {
  display: grid;
  width: 70px;
  place-items: center;
  color: var(--yellow);
  font-size: 1rem;
}

.route-wire {
  height: 4px;
  background-size: 16px 4px;
}

.red-wire {
  background-image: linear-gradient(90deg, var(--red) 0 9px, transparent 9px 16px);
}

.orange-wire {
  background-image: linear-gradient(90deg, var(--orange) 0 9px, transparent 9px 16px);
}

.yellow-wire {
  background-image: linear-gradient(90deg, var(--yellow) 0 9px, transparent 9px 16px);
}

.steps {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: clamp(4px, 0.9vw, 12px);
  padding: 0 clamp(16px, 4vw, 56px) 28px;
}

.steps i {
  height: clamp(16px, 2.2vw, 28px);
  background: var(--red);
  animation: step-pulse 4s var(--ease) infinite;
}

.steps i:nth-child(n + 5) {
  background: var(--orange);
}

.steps i:nth-child(n + 9) {
  background: var(--yellow);
}

.steps i:nth-child(n + 13) {
  background: var(--white-step);
}

.steps i:nth-child(2) { animation-delay: 100ms; }
.steps i:nth-child(3) { animation-delay: 200ms; }
.steps i:nth-child(4) { animation-delay: 300ms; }
.steps i:nth-child(5) { animation-delay: 400ms; }
.steps i:nth-child(6) { animation-delay: 500ms; }
.steps i:nth-child(7) { animation-delay: 600ms; }
.steps i:nth-child(8) { animation-delay: 700ms; }
.steps i:nth-child(9) { animation-delay: 800ms; }
.steps i:nth-child(10) { animation-delay: 900ms; }
.steps i:nth-child(11) { animation-delay: 1000ms; }
.steps i:nth-child(12) { animation-delay: 1100ms; }
.steps i:nth-child(13) { animation-delay: 1200ms; }
.steps i:nth-child(14) { animation-delay: 1300ms; }
.steps i:nth-child(15) { animation-delay: 1400ms; }
.steps i:nth-child(16) { animation-delay: 1500ms; }

.boundary {
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: end;
  gap: 40px;
  padding: clamp(72px, 9vw, 132px) clamp(20px, 4vw, 64px) clamp(40px, 6vw, 72px);
}

.section-head .silk {
  grid-column: 1 / -1;
}

.section-head h2,
.skill h2,
.llms h2 {
  max-width: 17ch;
  margin-bottom: 0;
  font-size: clamp(2.35rem, 5vw, 5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.feature-board,
.download,
.screens,
.mcp,
.skill,
.source,
.llms,
.footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.download-heading > p {
  max-width: 52ch;
  margin-bottom: 0;
  color: var(--dim);
  font-size: 0.9rem;
  line-height: 1.65;
}

.download-heading > p a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--yellow);
  text-underline-offset: 5px;
}

.download-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.download-strip article {
  display: flex;
  min-width: 0;
  min-height: 340px;
  align-items: flex-start;
  flex-direction: column;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
}

.download-strip article:last-child {
  border-right: 0;
}

.download-strip h3 {
  margin-bottom: 16px;
  font-size: clamp(1.5rem, 2.4vw, 2.4rem);
  line-height: 1.1;
}

.download-strip article > p:not(.module-no) {
  flex: 1;
  color: var(--dim);
  font-size: 0.82rem;
  line-height: 1.6;
}

.download-strip .control {
  width: 100%;
}

.install-command {
  display: grid;
  width: 100%;
  gap: 8px;
  margin-bottom: 12px;
}

.install-command code {
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--panel-deep);
  color: var(--silk);
  font-size: 0.68rem;
  line-height: 1.5;
  white-space: nowrap;
}

.install-command .copy {
  width: 100%;
}

.download-links {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.download-links a,
.release-link a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 700;
  text-underline-offset: 5px;
}

.release-link {
  margin: 0;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  text-align: right;
}

.feature-strip article {
  min-height: 290px;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
}

.feature-strip article:last-child {
  border-right: 0;
}

.feature-index {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  margin-bottom: 72px;
  background: var(--red);
  color: var(--panel-deep);
  font-size: 0.75rem;
  font-weight: 900;
}

.feature-strip article:nth-child(2) .feature-index {
  background: var(--orange);
}

.feature-strip article:nth-child(3) .feature-index {
  background: var(--yellow);
}

.feature-strip article:nth-child(4) .feature-index {
  background: var(--white-step);
}

.feature-strip h3,
.source-grid h3 {
  margin-bottom: 16px;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.2;
}

.feature-strip p,
.source-grid p,
.source-grid li,
.skill-copy > p,
.llms > p {
  color: var(--dim);
  font-size: 0.9rem;
  line-height: 1.65;
}

.screen-pair {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.screen-pair figure {
  margin-bottom: 0;
  padding: clamp(20px, 3vw, 40px);
  background: var(--panel-deep);
}

.screen-pair img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.82) contrast(1.04);
}

.screen-pair figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 3px solid var(--red);
  font-size: 0.72rem;
}

.screen-pair figure:nth-child(2) figcaption {
  border-color: var(--yellow);
}

.screen-pair figcaption span {
  color: var(--dim);
}

.mcp-heading > p,
.source-heading > p {
  max-width: 48ch;
  margin-bottom: 0;
  color: var(--dim);
  font-size: 0.9rem;
  line-height: 1.65;
}

.mcp-heading .silk,
.source-heading .silk {
  grid-column: auto;
}

.tool-rack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}

.tool-rack article {
  display: grid;
  min-height: 104px;
  align-content: center;
  gap: 9px;
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}

.tool-rack article:last-child {
  border-right: 0;
}

.tool-rack code {
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 800;
}

.tool-rack span {
  color: var(--dim);
  font-size: 0.72rem;
  line-height: 1.5;
}

.prompt-rack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}

.prompt-module {
  min-width: 0;
  padding: clamp(24px, 4vw, 48px);
  background: var(--panel-deep);
}

.prompt-module header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.prompt-module h3 {
  margin-bottom: 0;
  font-size: 1.4rem;
}

.copy {
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--silk);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.prompt-module pre,
.verify-module pre {
  overflow: auto;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  background: #080808;
  color: #d7d7d0;
  font-size: 0.75rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.prompt-summary {
  max-width: 58ch;
  margin-bottom: 18px;
  color: var(--dim);
  font-size: 0.82rem;
  line-height: 1.6;
}

.prompt-module details {
  margin-bottom: 10px;
}

.prompt-module summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--yellow);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.prompt-module details[open] summary {
  margin-bottom: 12px;
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 700;
  text-underline-offset: 5px;
}

.skill {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
}

.skill-file,
.skill-copy {
  min-height: 560px;
  padding: clamp(40px, 6vw, 88px);
}

.skill-file {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  border-right: 1px solid var(--line);
  background: var(--yellow);
  color: var(--panel-deep);
  font-size: 0.76rem;
  line-height: 1.5;
}

.skill-file strong {
  margin-top: 52px;
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
}

.skill-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
}

.skill-copy h2 {
  margin-bottom: 32px;
}

.skill-copy > p {
  max-width: 58ch;
  margin-bottom: 32px;
}

.source-grid {
  border-top: 1px solid var(--line);
}

.source-grid article {
  min-height: 360px;
  padding: clamp(28px, 4vw, 52px);
  border-right: 0;
}

.source-grid h3 {
  overflow-wrap: anywhere;
}

.source-grid ul {
  display: grid;
  gap: 10px;
  margin: 0 0 32px;
  padding-left: 18px;
}

.llms {
  padding: clamp(48px, 7vw, 96px) clamp(20px, 4vw, 64px);
  text-align: center;
}

.llms .control {
  min-width: min(100%, 220px);
}

.footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--panel-deep);
}

.footer p {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 20px 28px;
  border-right: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.7rem;
}

.footer p:last-child {
  border-right: 0;
}

.footer strong {
  color: var(--silk);
}

.copy-status {
  position: fixed;
  z-index: 40;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 16px;
  background: var(--yellow);
  color: var(--panel-deep);
  font-size: 0.75rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.copy-status.visible {
  opacity: 1;
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

@keyframes step-pulse {
  0%,
  6% {
    filter: brightness(1.45);
    transform: translateY(-3px);
  }
  12%,
  100% {
    filter: brightness(0.48);
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .panel-bar {
    grid-template-columns: 1fr auto;
  }

  .status {
    display: none;
  }

  .hero-copy,
  .section-head {
    grid-template-columns: 1fr;
  }

  .hero-copy .silk,
  .section-head .silk {
    grid-column: auto;
  }

  .hero-facts,
  .feature-strip,
  .download-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-facts p:nth-child(2) {
    border-right: 0;
  }

  .hero-facts p:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-soft);
  }

  .feature-strip article:nth-child(2) {
    border-right: 0;
  }

  .feature-strip article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .download-strip article:nth-child(2) {
    border-right: 0;
  }

  .download-strip article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .screen-pair,
  .prompt-rack,
  .skill {
    grid-template-columns: 1fr;
  }

  .skill-file {
    min-height: 390px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .skill-copy {
    min-height: 480px;
  }

}

@media (max-width: 700px) {
  .panel-bar,
  .panel {
    width: 100%;
    border-inline: 0;
  }

  .panel-bar {
    min-height: 58px;
  }

  .brand {
    min-height: 58px;
  }

  .brand,
  .panel-bar nav {
    padding-inline: 16px;
  }

  .panel-bar nav {
    gap: 12px;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
  }

  .hero-copy {
    gap: 22px;
  }

  h1 {
    font-size: clamp(4.3rem, 25vw, 7rem);
    line-height: 0.78;
  }

  .hero-title {
    align-items: center;
    gap: 8px;
  }

  .hero-title img {
    width: clamp(58px, 18vw, 88px);
  }

  .hero-facts,
  .feature-strip,
  .download-strip,
  .tool-rack,
  .source-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero-facts p,
  .feature-strip article,
  .download-strip article,
  .tool-rack article,
  .source-grid article,
  .footer p {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature-strip article {
    min-height: 230px;
  }

  .download-strip article {
    min-height: 280px;
  }

  .feature-index {
    margin-bottom: 44px;
  }

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

  .route-wire {
    display: block;
    width: 4px;
    height: 30px;
    justify-self: center;
    background-size: 4px 14px;
  }

  .red-wire {
    background-image: linear-gradient(180deg, var(--red) 0 8px, transparent 8px 14px);
  }

  .orange-wire {
    background-image: linear-gradient(180deg, var(--orange) 0 8px, transparent 8px 14px);
  }

  .yellow-wire {
    background-image: linear-gradient(180deg, var(--yellow) 0 8px, transparent 8px 14px);
  }

  .agent-node {
    grid-column: auto;
  }

  .steps {
    gap: 4px;
  }

  .signal figcaption,
  .boundary {
    align-items: flex-start;
    flex-direction: column;
  }

  .screen-pair {
    grid-template-columns: 1fr;
  }

  .screen-pair figcaption {
    align-items: flex-start;
    flex-direction: column;
  }

  .prompt-module header {
    align-items: flex-start;
    flex-direction: column;
  }

  .skill-file,
  .skill-copy {
    min-height: 420px;
  }

  .source-grid article,
  .source-grid article:last-child {
    min-height: auto;
    grid-column: auto;
  }

  .footer p:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
