:root {
  --bg: #07080a;
  --bg-2: #0c0e12;
  --fg: #eef2e6;
  --muted: #8b9180;
  --line: #1b1f18;
  --accent: #d6ff4b;
  --accent-2: #d6ff4b1f;
  --warn: #ffc14a;
  --bad: #ff6b5a;
  --device: #101319;
  --sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --display: "Syne", "Outfit", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --page: 76rem;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle at 1px 1px, #ffffff0c 1px, transparent 0);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 40%, transparent 78%);
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
dl {
  margin: 0;
}

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

code {
  font-size: 0.86em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.8rem;
  top: -4rem;
  z-index: 30;
  background: var(--accent);
  color: #111;
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
}

.skip:focus {
  top: 0.8rem;
}

.wrap {
  width: min(calc(100% - 2.5rem), var(--page));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 4rem;
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 2.5rem), var(--page));
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.mark {
  width: 22px;
  height: 22px;
}

.nav {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--fg);
}

.pill {
  background: var(--accent);
  color: #111;
  padding: 0.38rem 0.75rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.pill:hover {
  filter: brightness(1.08);
}

@media (max-width: 720px) {
  .nav a:not(.pill) {
    display: none;
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.92fr);
  gap: 2.25rem;
  align-items: center;
  padding: 2.25rem 0 2.75rem;
}

.hero-copy {
  max-width: 36rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 3.1vw, 2.85rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.038em;
  margin-bottom: 1rem;
}

.lede {
  max-width: 32rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 1.35rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.6rem;
}

a.ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.75rem;
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
}

a.ghost:hover {
  border-color: #3a4032;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chips span {
  display: block;
  width: 100%;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.chip {
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.38rem 0.55rem;
}

.chip:hover,
.chip.is-selected {
  border-color: var(--accent);
  color: var(--accent);
}

.stage {
  position: relative;
  background: #0c0e12;
  border: 1px solid var(--line);
  padding: 0.85rem 0.9rem 0.8rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.7rem;
}

.hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.hud b {
  display: block;
  color: var(--fg);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0;
  text-transform: none;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud b[data-tone="ok"] {
  color: var(--accent);
}

.hud b[data-tone="warn"] {
  color: var(--warn);
}

.viewport {
  display: grid;
  grid-template-columns: 15.25rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
  min-height: 0;
}

.device {
  position: relative;
  width: 15.25rem;
  aspect-ratio: 9 / 17.6;
  background: #0e1116;
  border: 1px solid #2a3038;
  border-radius: 1.55rem;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px #07090c;
}

.notch {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4.4rem;
  height: 9px;
  transform: translateX(-50%);
  background: #050607;
  border-radius: 999px;
  z-index: 4;
}

.home-bar {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 3.4rem;
  height: 4px;
  transform: translateX(-50%);
  background: #3a4048;
  border-radius: 999px;
  z-index: 4;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 1.85rem 0.85rem 1.35rem;
}

.screen[hidden] {
  display: none;
}

.status {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: #9aa193;
  margin-bottom: 0.85rem;
}

.app-title {
  font-family: var(--display);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.85rem;
}

.field,
.btn {
  height: 2.15rem;
  display: flex;
  align-items: center;
  width: 100%;
}

.field {
  border: 1px solid #2a2f28;
  background: #0c0f14;
  padding: 0 0.7rem;
  color: #6f7568;
  font-size: 0.78rem;
}

.btn {
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
}

.btn.solid {
  background: var(--accent);
  color: #111;
}

.btn.ghost {
  border: 1px solid #2a2f28;
  color: var(--fg);
}

.linkish {
  display: inline-block;
  padding: 0.2rem 0.15rem;
  font-size: 0.78rem;
  color: #8b9180;
}

.home-card {
  border: 1px solid #2a2f28;
  padding: 0.7rem 0.75rem;
  margin-bottom: 0.5rem;
}

.home-card strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.15rem;
}

.home-card span {
  color: var(--muted);
  font-size: 0.74rem;
}

.hit {
  position: relative;
  margin-bottom: 0.55rem;
}

.hit .app-title {
  margin-bottom: 0;
}

.hit-inline {
  align-self: start;
  width: max-content;
  margin-top: 0.15rem;
}

.hit i,
.hit .tag {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.hit i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-color: #86a83a;
  border-style: solid;
  z-index: 2;
}

.hit.is-on i,
.hit.is-on .tag,
.hit.is-hot i,
.hit.is-hot .tag {
  opacity: 1;
}

.hit.is-dim {
  opacity: 0.28;
}

.hit.is-hot {
  background: #d6ff4b14;
}

.hit.is-hot i {
  border-color: var(--accent);
}

.hit .tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.hit .tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.hit .bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.hit .br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.hit .tag {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-70%);
  background: #1b220e;
  color: #c6e86a;
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.03em;
  padding: 0.08rem 0.28rem;
  white-space: nowrap;
  z-index: 3;
}

.hit.is-hot .tag {
  background: var(--accent);
  color: #111;
}

.hit.is-tap {
  animation: tap 0.45s ease;
}

@keyframes tap {
  0% { background: #d6ff4b40; }
  100% { background: #d6ff4b14; }
}

.live-yaml {
  background: #08090c;
  border: 1px solid var(--line);
  padding: 0.55rem 0;
  overflow: auto;
  font-size: 0.68rem;
  line-height: 1.7;
  color: #9aa193;
  margin: 0;
}

.live-yaml [data-line] {
  display: block;
  padding: 0 0.7rem;
}

.live-yaml [data-line].is-active {
  color: var(--accent);
  background: var(--accent-2);
  box-shadow: inset 2px 0 0 var(--accent);
}

.stage-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  position: relative;
  z-index: 2;
}

.ticker {
  border-block: 1px solid var(--line);
  overflow: hidden;
  background: #0a0c10;
}

.ticker-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  padding: 0.85rem 0;
  width: max-content;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  animation: marquee 28s linear infinite;
}

.ticker-track span {
  flex: none;
  white-space: nowrap;
  padding: 0 1.35rem;
}

.ticker-track span + span {
  border-left: 1px solid #3a4032;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

section {
  padding: 5rem 0;
}

.section-kicker {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin-bottom: 0.8rem;
}

.sub {
  color: var(--muted);
  max-width: 38rem;
  margin-bottom: 2.2rem;
}

.pipe {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.pipe article {
  padding: 1.3rem 1.1rem 0 0;
  border-right: 1px solid var(--line);
}

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

.pipe span {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.7rem;
}

.pipe h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.pipe p {
  color: var(--muted);
  font-size: 0.92rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.split article {
  background: var(--bg);
  padding: 1.4rem 1.3rem 1.5rem;
}

.split .muted {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.bare {
  list-style: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.9;
}

.bare.dead {
  color: #5c6156;
  text-decoration: line-through;
}

.bare.live {
  color: var(--accent);
}

.write {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
  gap: 1rem;
}

.editor,
.side {
  background: #0a0c10;
  border: 1px solid var(--line);
  overflow: hidden;
}

.editor-top,
.side-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tabs {
  display: flex;
  gap: 0.2rem;
}

.tabs [role="tab"] {
  padding: 0.2rem 0.45rem;
  color: var(--muted);
}

.tabs [role="tab"][aria-selected="true"] {
  color: var(--accent);
}

.copy {
  color: var(--fg);
  text-transform: none;
  letter-spacing: 0;
}

.copy:hover {
  color: var(--accent);
}

pre {
  margin: 0;
  padding: 1rem 0.95rem 1.15rem;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.65;
  color: #cdd3c4;
}

.k { color: #d6ff4b; }
.p { color: #6f7568; }
.s { color: #eef2e6; }
.c { color: #6f7568; font-style: italic; }

.side pre {
  color: #b7beab;
  font-size: 0.75rem;
}

.note {
  padding: 0 0.95rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.gates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.gates article {
  background: var(--bg);
  padding: 1.2rem 1.1rem 1.3rem;
  border-top: 3px solid var(--line);
}

.gates .ok { border-top-color: var(--accent); }
.gates .warn { border-top-color: var(--warn); }
.gates .bad { border-top-color: var(--bad); }
.gates .idle { border-top-color: #4b5160; }

.gates h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.gates p {
  color: var(--muted);
  font-size: 0.9rem;
}

.loop {
  list-style: none;
  padding: 0;
  counter-reset: n;
  margin-top: 2.75rem;
}

.loop li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 1rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--line);
  counter-increment: n;
}

.loop li::before {
  content: counter(n, decimal-leading-zero);
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.8rem;
  padding-top: 0.2rem;
}

.loop h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.loop p {
  color: var(--muted);
}

.platforms {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.platforms article {
  background: var(--bg);
  padding: 1.3rem 1.15rem 1.4rem;
}

.platforms h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.45rem;
}

.platforms p {
  color: var(--muted);
  font-size: 0.92rem;
}

.cli {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 2rem;
}

.cli div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.8rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.cli dt {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.cli dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.start {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
}

.term {
  background: #07080a;
  border: 1px solid var(--line);
}

.aside {
  border: 1px solid var(--line);
  padding: 1.3rem 1.2rem;
  color: var(--muted);
}

.aside p + p {
  margin-top: 0.9rem;
}

.aside a {
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.foot-links {
  display: flex;
  gap: 1.1rem;
}

.foot-links a {
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--accent);
}

@media (max-width: 980px) {
  .hero,
  .viewport,
  .write,
  .start,
  .split,
  .cli {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 1.5rem;
  }

  .viewport {
    justify-items: center;
  }

  .pipe,
  .gates,
  .platforms {
    grid-template-columns: 1fr 1fr;
  }

  .pipe article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 1.2rem 0;
  }

  .hud {
    grid-template-columns: 1fr 1fr;
  }

  .live-yaml {
    min-height: 10rem;
  }
}

@media (max-width: 640px) {
  .pipe,
  .gates,
  .platforms {
    grid-template-columns: 1fr;
  }

  .cli div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .hero h1 {
    font-size: 1.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track,
  .hit.is-tap {
    animation: none;
  }
}
