:root {
  --bg: #081012;
  --panel: #101a1e;
  --panel2: #142329;
  --text: #edf8f5;
  --muted: #9bb1ad;
  --line: rgba(255,255,255,0.12);
  --accent: #8fffd1;
  --accent2: #8cb7ff;
  --warn: #ffd38c;
  --danger: #ff9a9a;
  --ok: #b9ffbd;
  --shadow: 0 18px 45px rgba(0,0,0,0.35);
  --radius: 22px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(143,255,209,0.13), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(140,183,255,0.14), transparent 34%),
    linear-gradient(180deg, #071012 0%, #0b1417 55%, #070b0d 100%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
p { color: var(--muted); line-height: 1.65; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

.nav {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: 24px;
}
.logo span { color: var(--accent); }
.navlinks {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.navlinks a {
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 999px;
}
.navlinks a:hover { background: rgba(255,255,255,0.08); color: var(--text); }

.wrap { width: min(var(--max), calc(100% - 36px)); margin: 0 auto; }
.hero { padding: 68px 0 42px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 34px;
  align-items: center;
}
.kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}
h1 {
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.075em;
  margin: 22px 0 20px;
}
h2 {
  font-size: clamp(30px, 4vw, 50px);
  letter-spacing: -0.06em;
  line-height: 1.05;
  margin: 0 0 16px;
}
h3 { margin: 0 0 8px; letter-spacing: -0.03em; }
.lede {
  font-size: clamp(18px, 2vw, 23px);
  max-width: 780px;
  color: #c7dbd6;
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #071012; border: 0; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.72; cursor: wait; transform: none; }

.card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.035));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card.mini { padding: 16px; box-shadow: none; background: rgba(255,255,255,0.045); }
.stack { display: grid; gap: 14px; }
.visual {
  position: relative;
  min-height: 430px;
  overflow: hidden;
}
.orbit {
  position: absolute;
  inset: 42px;
  border: 1px solid rgba(143,255,209,0.20);
  border-radius: 50%;
}
.orbit:nth-child(2) { inset: 82px 54px 54px 82px; border-color: rgba(140,183,255,0.18); transform: rotate(-18deg); }
.orbit:nth-child(3) { inset: 128px 98px 96px 124px; border-color: rgba(255,211,140,0.16); transform: rotate(24deg); }
.node {
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(143,255,209,0.9);
}
.n1 { top: 82px; left: 78px; }
.n2 { top: 132px; right: 92px; background: var(--accent2); box-shadow: 0 0 22px rgba(140,183,255,0.9); }
.n3 { bottom: 96px; left: 132px; background: var(--warn); box-shadow: 0 0 22px rgba(255,211,140,0.9); }
.n4 { bottom: 72px; right: 114px; }
.center-badge {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143,255,209,0.20), rgba(140,183,255,0.08) 58%, rgba(255,255,255,0.04));
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
}
.center-badge strong { display: block; font-size: 40px; letter-spacing: -0.07em; }
.center-badge small { color: var(--muted); line-height: 1.45; }

.section { padding: 58px 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.badge {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.045);
  border-radius: 999px;
  padding: 8px 11px;
  color: #c9dad6;
  font-size: 13px;
}
.quote {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.055em;
  color: var(--text);
}
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}
.flow .arrow { color: var(--accent); font-weight: 900; font-size: 28px; text-align: center; }
ul.clean { padding-left: 19px; color: var(--muted); line-height: 1.7; }
.footer { padding: 48px 0; border-top: 1px solid var(--line); color: var(--muted); }

/* Demo */
.demo-shell { padding: 26px 0 60px; }
.demo-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}
.form-grid { display: grid; gap: 12px; }
.field label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 6px;
}
input[type="number"], input[type="text"], select {
  width: 100%;
  background: #081013;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
}
input[type="checkbox"] { transform: scale(1.15); }
.checkbox-row { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.status { min-height: 24px; color: var(--muted); font-size: 14px; margin-top: 12px; }
.status.error { color: var(--danger); }
.status.ok { color: var(--ok); }
.status.dirty { color: #ffd38c; }
.results { display: grid; gap: 18px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.metric-card { padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); }
.metric-card .label { color: var(--muted); font-size: 12px; }
.metric-card .value { font-size: 24px; font-weight: 900; letter-spacing: -0.05em; margin-top: 5px; }
.chart-card canvas { width: 100%; height: 260px; display: block; background: rgba(0,0,0,0.12); border-radius: 16px; }
.chart-title { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.chart-title small { color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; color: #cfe0dd; }
th, td { text-align: left; padding: 10px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text); font-size: 13px; }
td { color: var(--muted); font-size: 13px; }
.note { border-left: 3px solid var(--accent); padding-left: 14px; color: var(--muted); }
textarea {
  width: 100%; min-height: 180px; background: #081013; border: 1px solid var(--line); color: var(--text); border-radius: 14px; padding: 12px;
}

@media (max-width: 980px) {
  .hero-grid, .demo-grid, .grid3, .grid2 { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { transform: rotate(90deg); }
  .visual { min-height: 330px; }
}
@media (max-width: 600px) {
  .nav { align-items: flex-start; flex-direction: column; }
  .summary-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
}

/* BreedOS MVP v0.2 additions */
.sticky-panel {
  position: sticky;
  top: 14px;
}
.preset-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 14px 0 18px;
}
.btn.tiny {
  padding: 9px 10px;
  font-size: 12px;
  justify-content: center;
}
.btn.icon {
  border-radius: 12px;
  padding: 0 12px;
  min-width: 44px;
  justify-content: center;
}
.inline-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.button-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.field-like {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background: #081013;
}
.tip {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 5px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.24);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  cursor: help;
  position: relative;
}
.tip::after {
  content: attr(data-tip);
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-18%);
  width: min(320px, 72vw);
  padding: 10px 12px;
  background: #061013;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: #dbece8;
  font-size: 12px;
  line-height: 1.45;
  z-index: 20;
  text-align: left;
  font-weight: 500;
}
.tip:hover::after,
.tip:focus::after {
  display: block;
}
.notes-list {
  display: grid;
  gap: 8px;
}
.note-item {
  border-left: 3px solid var(--accent2);
  padding: 8px 10px;
  background: rgba(255,255,255,0.035);
  border-radius: 0 12px 12px 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}
.dash-sample {
  display: inline-block;
  width: 26px;
  height: 0;
  border-top: 2px dashed rgba(237,248,245,0.65);
}

@media (max-width: 980px) {
  .sticky-panel { position: static; }
}
@media (max-width: 600px) {
  .button-grid, .preset-row { grid-template-columns: 1fr; }
}

/* BreedOS MVP v0.6 decision-engine additions */
select {
  width: 100%;
  background: #081013;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 12px;
  outline: none;
}
.decision-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.decision-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  border-radius: 18px;
  padding: 14px;
}
.decision-card span,
.decision-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.decision-card strong {
  display: block;
  margin: 6px 0;
  font-size: 18px;
}
.decision-list {
  margin: 14px 0 8px 18px;
  color: var(--muted);
  line-height: 1.55;
}
.pareto-list { padding-top: 8px; color: var(--muted); }
.pill {
  display: inline-block;
  margin: 4px 4px 0 0;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  font-size: 12px;
}
td span { color: var(--muted); font-size: 12px; }
@media (max-width: 980px) { .decision-grid { grid-template-columns: 1fr; } }
