@import url('https://fonts.googleapis.com/css2?family=Anonymous+Pro:ital,wght@0,400;0,700;1,400;1,700&family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap');

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f6f4fc;
  --fg: #2a2a33;
  --muted: #6c6c78;
  --accent: #7c6df2;
  --danger: #cf5c52;
  --console-bg: #131319;
  --heading: #1b1b22;
  --gold: #dd9a3f;
  --sage: #2fae95;
  --navy: #1b1b22;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", "Roboto Mono", Consolas, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
}
body {
  font-family: "Anonymous Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.55;
  display: flex;
  justify-content: center;
  background: var(--bg);
  color: var(--fg);
}
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 3rem);
}
h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 650; letter-spacing: -0.015em; margin-bottom: 0.5rem; color: var(--heading); }

.console, .hero-terminal, .how-terminal, code, .code-block, .settings-table code, .instances-table {
  font-family: var(--mono);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  margin-bottom: 2rem;
}
.top-nav {
  display: flex; gap: 1.8rem; justify-content: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 50%, transparent);
}
.top-nav-link {
  color: var(--heading); text-decoration: none; font-size: 0.95rem; letter-spacing: 0.01em;
  padding-bottom: 0.5rem; opacity: 0.6; border-bottom: 2px solid transparent;
}
.top-nav-link:hover { opacity: 0.85; }
.top-nav-link.active { opacity: 1; font-weight: 600; border-bottom-color: var(--accent); }
.top-nav--sub .top-nav-link { font-size: 0.85rem; }

.notice {
  display: inline-block;
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
}

.launch-screen {
  max-width: 800px;
  margin: 10vh auto 0;
  text-align: left;
}
.launch-screen h1 { text-align: center; }
.launch-screen p { opacity: 0.85; font-size: 1rem; }

.intro-columns {
  display: flex;
  gap: 2rem;
  margin: 1.5rem 0 2rem;
}
.intro-col { flex: 1 1 0; min-width: 0; }
.intro-col h2 { font-size: 0.95rem; color: var(--gold); margin: 0 0 0.5rem; }
.intro-col p { font-size: 1rem; opacity: 0.85; margin: 0; }
@media (max-width: 560px) {
  .intro-columns { flex-direction: column; gap: 1.2rem; }
}
.launch-screen form {
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
}
.launch-screen label {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 280px;
}
.launch-screen select {
  font: inherit; padding: 0.5rem 0.6rem; border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--muted) 70%, transparent);
  background: var(--bg-soft); color: inherit; width: 100%;
  text-align: center;
}
.launch-screen button { align-self: center; }
.launch-ttl-note { text-align: center; font-size: 0.8rem; }
.launch-error {
  text-align: center;
  color: var(--danger);
  font-weight: 600;
}

.instances-list { margin-top: 2.5rem; }
.instances-list h2 {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin: 0 0 0.6rem;
}
.instances-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.instances-table th, .instances-table td {
  text-align: left; padding: 0.4rem 0.6rem;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
}
.instances-table th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }
.instances-table td:last-child { text-align: right; }
.instances-table button { padding: 0.3rem 0.7rem; font-size: 0.75rem; }

.prep-screen {
  max-width: 640px;
  margin: 16vh auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
/* author `display: flex` above otherwise always beats the `hidden`
   attribute's default UA display:none -- this is what makes hidden win. */
.prep-screen[hidden] { display: none; }
.prep-message { opacity: 0.85; font-size: 1rem; min-height: 1.4em; }
.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

header p { opacity: 0.85; font-size: 1rem; }

.sysinfo {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid color-mix(in srgb, var(--muted) 50%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--muted) 8%, transparent);
  font-size: 0.8rem;
}
.sysinfo-item { display: flex; gap: 0.5rem; align-items: baseline; }
.sysinfo-item .k { text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.sysinfo-item .v { font-weight: 600; }
.sysinfo-note {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}

.layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .panel-stack { order: -1; }
}

/* --- console: brighter than the page background so it pops --- */
.console {
  background: var(--console-bg);
  color: var(--sage);
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  /* A grid item otherwise refuses to shrink below its content's intrinsic
     width — a long unwrapped JSON line would blow out the whole page layout
     instead of scrolling inside the console. */
  min-width: 0;
}
.console-inner {
  height: min(72vh, 640px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.2rem;
  font-size: 0.85rem;
}
.console .line { white-space: pre-wrap; word-break: break-word; margin: 0 0 0.3rem; }
.console .line.boot { color: inherit; opacity: 0.75; }
.console .prompt { color: var(--accent); font-weight: 600; }
.console .line.pending { color: var(--muted); }
.console .out { padding-left: 1.4rem; }
.console .out .pct { opacity: 0.85; }
.console .out.conflict { color: var(--danger); }
.console .out.corroborated { color: var(--muted); }
.console .out.rejected { color: var(--muted); }
.console .out.error { color: var(--danger); }
.console .tag { font-weight: 600; }
.console pre.json-output {
  margin: 0;
  padding-left: 1.4rem;
  font-family: inherit;
  font-size: inherit;
  white-space: pre;
  overflow-x: auto;
}
.console .json-key { color: inherit; }
.console .json-val { color: var(--gold); }

/* --- right-hand action panels --- */
.panel-stack { display: flex; flex-direction: column; gap: 1rem; }
.side-tabs {
  display: flex; gap: 0.4rem; margin-bottom: 0.3rem;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 50%, transparent);
}
.side-tab-btn {
  background: none; border: none; cursor: pointer;
  padding: 0.5rem 0.8rem; font-size: 0.85rem; font-family: inherit; color: inherit; opacity: 0.6;
  border-bottom: 2px solid transparent;
}
.side-tab-btn.active { opacity: 1; border-bottom-color: var(--accent); font-weight: 600; }
.side-tab-panel { display: none; flex-direction: column; gap: 1rem; }
.side-tab-panel.active { display: flex; }
.panel {
  border: 1px solid color-mix(in srgb, var(--muted) 50%, transparent);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}
.panel h2 {
  font-size: 0.8rem;
  margin: 0 0 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

form { display: flex; flex-direction: column; gap: 0.9rem; margin: 0; }
label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; }
input, textarea {
  font: inherit; padding: 0.5rem 0.6rem; border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--muted) 70%, transparent); background: transparent; color: inherit;
  width: 100%;
}
button {
  align-self: flex-start; font: inherit; font-weight: 600; cursor: pointer;
  padding: 0.55rem 1.1rem; border-radius: 6px; border: none;
  background: var(--accent); color: var(--bg);
}
button:disabled { opacity: 0.5; cursor: default; }
.hint { font-size: 0.8rem; opacity: 0.8; margin: 0; }
.hint-list { font-size: 0.8rem; opacity: 0.8; margin: 0; padding-left: 1.2rem; }
code { background: color-mix(in srgb, var(--muted) 25%, transparent); padding: 0.1rem 0.35rem; border-radius: 4px; }

/* --- shared terminal/code-snippet look: every command block on the site
   (hero, how-it-works, docs) renders identically --- */
.hero-terminal, .how-terminal, .code-block {
  background: var(--console-bg);
  color: #d7dade;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.3rem 1.5rem;
  font-size: 0.82rem;
  line-height: 1;
  box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.55);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── home page ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  font: inherit; font-weight: 600; text-decoration: none;
  padding: 0.7rem 1.4rem; border-radius: 8px; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, black); }
.btn-ghost { color: var(--heading); border-color: color-mix(in srgb, var(--muted) 45%, transparent); }
.btn-ghost:hover { border-color: var(--heading); }
.btn-sage { background: var(--sage); color: #fff; }
.btn-sage:hover { background: color-mix(in srgb, var(--sage) 85%, black); }
.btn-invert { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn-invert:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.home-page { width: 100%; padding-top: clamp(1rem, 4vw, 3rem); }
.home-page .site-header .container { padding-top: 0; padding-bottom: 0; }

.band { width: 100%; }
.band-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 5.5rem clamp(1rem, 4vw, 3rem);
}
.band-dark { background: var(--navy); color: #f2f1f6; }
.band-soft { background: var(--bg-soft); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 0.3rem 0.8rem; border-radius: 999px;
  margin-bottom: 1rem;
}
.band-dark .eyebrow { color: #cabfff; background: rgba(255, 255, 255, 0.1); }

.section-header { max-width: 640px; margin: 0 0 3rem; }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 0.7rem; color: var(--heading); }
.band-dark .section-title { color: #fff; }
.section-sub { font-size: 1.05rem; opacity: 0.78; margin: 0; }

/* --- hero --- */
.hero-band { padding-top: 3.5rem; }
.hero {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  flex-wrap: wrap;
}
.hero-text { flex: 1 1 420px; }
.hero-title {
  text-align: left; font-size: clamp(2.4rem, 5.2vw, 3.6rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 1.1rem;
  background: linear-gradient(100deg, #ffffff 30%, #cabfff 145%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 1.15rem; opacity: 0.82; max-width: 42ch; margin-bottom: 1.8rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual { flex: 1 1 420px; min-width: 300px; position: relative; }
.hero-visual::before {
  content: ""; position: absolute; inset: -15% -10%; z-index: 0;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--accent) 55%, transparent), transparent),
    radial-gradient(closest-side, color-mix(in srgb, var(--sage) 45%, transparent), transparent);
  background-position: 15% 20%, 85% 80%;
  background-repeat: no-repeat;
  background-size: 65% 65%, 55% 55%;
  filter: blur(50px);
  opacity: 0.55;
}

.hero-terminal { position: relative; z-index: 1; }
.hero-terminal .prompt { color: #cabfff; font-weight: 600; }
.hero-terminal .out { padding-left: 1.4rem; opacity: 0.92; }
.hero-terminal .out.ok { color: var(--sage); }
.hero-terminal .out.warn { color: var(--gold); }
.hero-terminal .val { color: var(--gold); }

/* --- status strip --- */
.status-band { padding: 2.6rem clamp(1rem, 4vw, 3rem) 0; }
.badge-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; }
.badge-pill {
  font-size: 0.85rem; font-weight: 600; color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
  border-radius: 999px; padding: 0.5rem 1rem;
}

/* --- problem section --- */
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.problem-card {
  background: var(--bg);
  border-radius: 14px;
  padding: 1.8rem 1.7rem;
  box-shadow: 0 20px 45px -32px rgba(20, 18, 40, 0.35);
}
.problem-card .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); font-weight: 700; margin-bottom: 1rem;
}
.problem-card h3 { font-size: 1.05rem; font-weight: 650; margin: 0 0 0.5rem; color: var(--heading); }
.problem-card p { margin: 0; opacity: 0.78; font-size: 0.98rem; }

/* --- why / feature grid --- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}
.feature {
  display: flex; flex-direction: column; gap: 0.8rem;
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 1.7rem 1.6rem;
}
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 9px;
  background: var(--navy);
}
.feature-icon svg { width: 1.4rem; height: 1.4rem; }
.feature-icon.icon-a { color: var(--accent); }
.feature-icon.icon-b { color: var(--sage); }
.feature-icon.icon-c { color: var(--gold); }
.feature-icon.icon-d { color: #cabfff; }
.feature h3 { font-size: 1.05rem; font-weight: 650; margin: 0; color: var(--heading); }
.feature p { font-size: 0.98rem; opacity: 0.78; margin: 0; }

/* --- how it works: alternating rows --- */
.how-row {
  display: flex; align-items: center; gap: 3.5rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}
.how-row:last-child { margin-bottom: 0; }
.how-row.reverse { flex-direction: row-reverse; }
.how-text { flex: 1 1 360px; }
.how-visual { flex: 1 1 400px; min-width: 280px; }
.how-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
  font-size: 0.85rem; font-weight: 700; margin-bottom: 1rem;
}
.how-text h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 0.7rem; color: var(--heading); }
.how-text p { font-size: 1.02rem; opacity: 0.78; margin: 0; max-width: 46ch; }
.how-terminal .prompt { color: #cabfff; font-weight: 600; }
.how-terminal .out { padding-left: 1.4rem; opacity: 0.92; }
.how-terminal .out.ok { color: var(--sage); }
.how-terminal .out.warn { color: var(--gold); }
.how-terminal .val { color: var(--gold); }

/* --- who it's for --- */
.who-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.8rem; }
.who-card {
  border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
  border-radius: 14px; padding: 2rem;
}
.who-card h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 0.6rem; color: var(--heading); }
.who-card p { margin: 0; opacity: 0.78; font-size: 1rem; }

/* --- tester CTA band --- */
.cta-band {
  background: linear-gradient(120deg, var(--accent), #5a4bd6);
  color: #fff;
  text-align: center;
}
.cta-band .band-inner { padding: 4.5rem clamp(1rem, 4vw, 3rem); }
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 0.8rem; color: #fff; }
.cta-band p { font-size: 1.08rem; opacity: 0.92; max-width: 48ch; margin: 0 auto 1.8rem; }
.cta-band .hero-actions { justify-content: center; }
.cta-band .btn-primary { background: #fff; color: var(--accent); }
.cta-band .btn-primary:hover { background: color-mix(in srgb, #fff 90%, var(--accent)); }
.cta-band .btn-invert { border-color: rgba(255, 255, 255, 0.55); }

/* --- footer --- */
.site-footer .band-inner {
  padding: 3rem clamp(1rem, 4vw, 3rem);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.2rem;
}
.site-footer .brand { font-weight: 700; font-size: 1.05rem; color: #fff; }
.site-footer .tag { opacity: 0.6; font-size: 0.9rem; margin-top: 0.2rem; font-weight: 400; }
.footer-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer-links a { color: #cfcdd8; text-decoration: none; font-size: 0.92rem; opacity: 0.85; }
.footer-links a:hover { opacity: 1; }

@media (max-width: 900px) {
  .problem-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .who-grid { grid-template-columns: 1fr; }
  .how-row, .how-row.reverse { flex-direction: column; }
}
@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; }
  .band-inner { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}

/* ── docs pages ─────────────────────────────────────────────────────────── */

.docs-content {
  max-width: 760px;
  margin: 0 auto 6vh;
}
.docs-lede { opacity: 0.85; font-size: 1.05rem; margin: 0 0 2.4rem; max-width: 62ch; }

.runbook-step { margin-bottom: 2.4rem; }
.runbook-step h2 {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 1.1rem; color: var(--heading); margin: 0 0 0.8rem;
}
.runbook-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  font-size: 0.85rem; font-weight: 700;
}
.runbook-step p { margin: 0 0 0.8rem; opacity: 0.85; }
.runbook-step h3 { font-size: 0.95rem; color: var(--gold); margin: 1.4rem 0 0.6rem; }
.runbook-step h3:first-of-type { margin-top: 0.4rem; }
.runbook-step .code-block { white-space: pre; margin: 0 0 0.8rem; }

.docs-next {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  margin-top: 3rem; padding-top: 1.6rem;
  border-top: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
}

@media (max-width: 560px) {
  .docs-content { max-width: 100%; }
}

.about-portrait {
  float: right;
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 0 1rem 1.6rem;
  border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
}

@media (max-width: 560px) {
  .about-portrait { float: none; display: block; margin: 0 auto 1.4rem; }
}

.config-warning {
  display: flex; gap: 0.6rem; align-items: flex-start;
  margin: 0 0 0.8rem;
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--fg);
  font-size: 0.9rem;
}
.config-warning strong { color: var(--danger); }

.settings-table th, .settings-table td { vertical-align: top; }
.settings-table code { white-space: nowrap; }
