/* Agent Looper landing — Ink on terminal black (loopChrome / setupTui) */

:root {
  --terracotta: #D65D2E;
  --verify: #76A17B;
  --tan: #C4A574;
  --muted: #8A8580;
  --ghost: #4A4542;
  --white: #FFFFFF;
  --black: #000000;

  --bg: var(--black);
  --border: var(--ghost);
  --text: var(--white);
  --text-muted: var(--muted);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  --max-width: 68rem;
  --space: 1.5rem;
}

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

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--verify);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--black);
  padding: 0.12em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--ghost);
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--ghost);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background: var(--black);
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo:hover { text-decoration: none; }

/* LooperMark — loopChrome.tsx */

.looper-mark {
  font-family: var(--font-mono);
}

.looper-mark-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
}

.looper-word {
  color: var(--white);
  font-weight: 700;
  white-space: pre;
}

.looper-mark--compact .looper-word {
  font-size: 0.9rem;
}

.looper-mark--compact .figure8 {
  font-size: 0.72rem;
  margin: 0 0.15rem;
}

.figure8 {
  display: inline-grid;
  grid-template-columns: repeat(5, 1ch);
  grid-template-rows: repeat(3, 1.15em);
  line-height: 1;
  flex-shrink: 0;
  margin: 0 0.25rem;
  vertical-align: middle;
}

.figure8 .cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.figure8 .o { color: var(--terracotta); }
.figure8 .dot { color: var(--verify); }
.figure8 .empty { color: transparent; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.875rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover { color: var(--white); text-decoration: none; }

/* Hero */

.hero {
  padding: 5rem 0 2.5rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  max-width: 18ch;
}

.definition {
  font-size: 1.125rem;
  color: var(--white);
  max-width: 42rem;
  margin: 0 0 1.25rem;
  line-height: 1.7;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 42rem;
  margin: 0 0 2rem;
  line-height: 1.7;
}

.promise {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.promise li { color: var(--verify); }
.promise li::before { content: "✓ "; opacity: 0.7; }

.anti-promise {
  font-size: 0.9rem;
  color: var(--ghost);
  margin: 0 0 2rem;
  font-style: italic;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: opacity 0.15s;
}

.btn:hover { text-decoration: none; opacity: 0.9; }

.btn-primary {
  background: var(--terracotta);
  color: var(--white);
}

.btn-ghost {
  border-color: var(--ghost);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--muted);
}

/* CoverFrame + SelectPrompt (setupTui / loopChrome) */

.tui-section {
  padding: 1rem 0 4rem;
}

.cover-frame {
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 2vw, 0.82rem);
  background: var(--black);
  border: 1px solid var(--terracotta);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  overflow-x: auto;
  line-height: 1.35;
}

.tui-mark {
  margin-bottom: 0.2rem;
}

.tui-mark .looper-mark-row {
  flex-wrap: wrap;
}

.tui-pipeline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.3rem;
  margin-left: 0.35rem;
}

.stage-pill {
  border: 1px solid;
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
  font-size: 0.72em;
  font-weight: 600;
  white-space: nowrap;
}

.stage-pill.grey {
  color: var(--muted);
  border-color: var(--muted);
}

.stage-pill.verify {
  color: var(--verify);
  border-color: var(--verify);
}

.stage-arrow {
  color: var(--muted);
  font-size: 0.85em;
}

.tui-tagline {
  color: var(--muted);
  margin: 0 0 0.45rem;
}

.tui-rail {
  margin: 0 0 0.55rem;
  letter-spacing: -0.05em;
}

.tui-rail .filled { color: var(--terracotta); }
.tui-rail .empty { color: var(--muted); }

.tui-loop-line {
  margin: 0.15rem 0 0;
}

.tui-loop-line.fail { color: var(--terracotta); }
.tui-loop-line.pass { color: var(--verify); }

.tui-beat {
  color: var(--muted);
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
}

.harness-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 1.75rem;
  margin-top: 2rem;
  padding: 0 0.25rem;
}

.harness-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-width: 4.25rem;
}

.harness-logo__icon {
  display: block;
  width: 30px;
  height: 30px;
  background-color: var(--muted);
  mask: var(--logo) center / contain no-repeat;
  -webkit-mask: var(--logo) center / contain no-repeat;
  transition: background-color 0.15s ease;
}

.harness-logo:hover .harness-logo__icon,
.harness-logo:focus-within .harness-logo__icon {
  background-color: var(--white);
}

.harness-logo__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}

.harness-logo:hover .harness-logo__label,
.harness-logo:focus-within .harness-logo__label {
  color: var(--white);
}

a.harness-logo {
  color: inherit;
  text-decoration: none;
}

a.harness-logo:hover {
  text-decoration: none;
}

.harness-section-label {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--verify);
}

.harness-section-title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.harness-operator {
  margin: 2.5rem 0 3rem;
  border: 1px solid #2a5c30;
  border-radius: 0.75rem;
  overflow: hidden;
  scroll-margin-top: 5rem;
}

.harness-operator .harness-section-label {
  padding: 1.1rem 1.25rem 0.35rem;
  margin: 0;
}

.harness-operator__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.25rem 1.5rem 1.75rem;
  background:
    radial-gradient(ellipse 70% 90% at 50% 35%, rgba(118, 225, 123, 0.28) 0%, rgba(47, 138, 56, 0.08) 55%, transparent 100%),
    linear-gradient(180deg, #0f1f12 0%, var(--black) 100%);
}

.harness-operator__shot {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 0 1rem;
  border-radius: 0.75rem;
  object-fit: contain;
}

.harness-operator__title {
  margin: 0 0 0.65rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.harness-operator__tagline {
  margin: 0 0 1.25rem;
  max-width: 28rem;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.55;
}

.harness-operator__cta {
  margin: 0;
}

.harness-operator__add {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--black);
  background: var(--white);
  border-radius: 9999px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.harness-operator__add:hover {
  text-decoration: none;
  opacity: 0.92;
}

.harness-operator__body {
  padding: var(--space);
  border-top: 1px solid #2a5c30;
}

.harness-operator__body h3 {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.25rem 0 0.5rem;
}

.harness-operator__body h3:first-of-type {
  margin-top: 0;
}

.harness-runtimes {
  margin: 0 0 2rem;
}

.harness-runtimes__intro {
  margin: 0 0 1.5rem;
  color: var(--muted);
  max-width: 44rem;
}

.harness-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.harness-card {
  border: 1px solid var(--ghost);
  padding: 1.25rem;
  scroll-margin-top: 5rem;
}

.harness-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin: 0 0 0.85rem;
}

.harness-card__logo {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  margin-top: 0.1rem;
  background-color: var(--white);
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}

.harness-card__titles h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.harness-card__pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.harness-card__pill code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

.harness-card__job {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.harness-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
}

.harness-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  border: 1px solid var(--ghost);
  border-radius: 9999px;
  line-height: 1.4;
}

.harness-chip code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

.harness-card__run {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

.harness-card__run code {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}

.harness-card__note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

@media (min-width: 960px) {
  .harness-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 1.5rem;
  }
}

.tui-answers {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  margin-top: 2.5rem;
}

.tui-answer {
  border-left: 2px solid var(--terracotta);
  padding-left: 1.25rem;
  max-width: 42rem;
}

.tui-answer--presets { border-left-color: var(--tan); }
.tui-answer--budget { border-left-color: var(--verify); }
.tui-answer--escalation { border-left-color: var(--ghost); }
.tui-answer--reverse { border-left-color: var(--terracotta); }
.tui-answer--alive { border-left-color: var(--verify); }
.tui-answer--report { border-left-color: var(--tan); }

.tui-answer h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 0 0 0.75rem;
  line-height: 1.35;
}

.tui-answer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

@media (min-width: 960px) {
  .tui-answers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 2.5rem;
    max-width: none;
  }

  .tui-answer {
    max-width: none;
  }
}

@media (min-width: 1200px) {
  .tui-answers {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Sections — black page, no warm cards */

.section {
  padding: 4rem 0;
}

.section-alt {
  border-top: 1px solid var(--ghost);
  border-bottom: 1px solid var(--ghost);
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--white);
}

.section-intro {
  color: var(--muted);
  max-width: 44rem;
  margin: 0 0 2rem;
  line-height: 1.7;
}

.howto-steps {
  max-width: 44rem;
  margin: 0 0 1.5rem;
  padding-left: 1.35rem;
  color: var(--muted);
  line-height: 1.65;
}

.howto-steps li {
  margin: 0 0 0.55rem;
}

.howto-steps li:last-child {
  margin-bottom: 0;
}

.grid.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.card {
  background: var(--black);
  border: 1px solid var(--ghost);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
}

.card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.card--goal h3 { color: var(--terracotta); }
.card--verify h3 { color: var(--verify); }
.card--judge h3 { color: var(--tan); }

.card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.optional {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--ghost);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.compare th,
.compare td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--ghost);
}

.compare th {
  color: var(--ghost);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.compare td:first-child {
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.compare td:last-child {
  color: var(--ghost);
}

.pull-quote {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.45;
  max-width: 32rem;
  border-left: 3px solid var(--terracotta);
  padding-left: 1.5rem;
  color: var(--white);
}

.install-switcher {
  margin-top: 1.5rem;
}

.install-switcher__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.install-switcher__tabs {
  display: inline-flex;
  gap: 0;
  margin-bottom: 0.75rem;
  border: 1px solid var(--ghost);
  border-radius: 6px;
  background: var(--black);
  overflow: hidden;
}

.install-switcher__tab {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.45rem 0.9rem;
  color: var(--ghost);
  cursor: pointer;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.install-switcher__tab:hover {
  color: var(--muted);
}

.install-switcher__tab:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: -2px;
}

#install-view-agent:checked ~ .install-switcher__tabs label[for="install-view-agent"],
#install-view-human:checked ~ .install-switcher__tabs label[for="install-view-human"] {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}

.install-panel {
  display: none;
}

#install-view-agent:checked ~ #install-panel-agent,
#install-view-human:checked ~ #install-panel-human {
  display: block;
}

.install-section .code-block {
  background: var(--black);
  border: 1px solid var(--ghost);
  border-radius: 8px;
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--ghost);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ghost);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--ghost);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--muted);
  color: var(--white);
}

.code-block pre {
  margin: 0;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
}

.install-links {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--ghost);
}

.runtime-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.5rem;
}

.runtime-list li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 1rem;
  border-left: 2px solid var(--ghost);
}

.runtime-list strong {
  color: var(--white);
  font-weight: 500;
}

.docs-pointer {
  font-size: 0.875rem;
  color: var(--ghost);
  margin: 0;
}

.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--ghost);
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ghost);
}

.site-footer .footer-nav {
  margin-top: 0.65rem;
}

.logo-text {
  font-family: var(--font-mono);
  color: var(--white);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo-text:hover { color: var(--terracotta); text-decoration: none; }

.prose {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.prose h1 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  max-width: 28ch;
}

.prose p, .prose li {
  color: var(--muted);
  max-width: 44rem;
  line-height: 1.7;
}

.prose p { margin: 0 0 1rem; }

.prose ul, .prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.md-404 {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
  white-space: pre-wrap;
  margin: 0;
}

@media (max-width: 600px) {
  .hero { padding-top: 3rem; }
  .nav { gap: 0.85rem; font-size: 0.8rem; }
  .cover-frame { padding: 0.55rem; }
}
