:root {
  color-scheme: light;
  --ink: #141413;
  --muted: #5f5e57;
  --line: #e3e0d6;
  --paper: #ffffff;
  --wash: #faf9f5;
  --green: #788c5d;
  --blue: #6a9bcc;
  --gold: #d97757;
  --danger: #8a3a24;
  --shadow: 0 24px 60px rgba(23, 33, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 72px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand,
nav,
.hero-actions,
.metric-row {
  align-items: center;
  display: flex;
}

.brand {
  font-weight: 800;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--green);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

nav {
  gap: 22px;
}

nav a,
.github-link {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

.github-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: 10px 14px;
}

.hero {
  display: grid;
  gap: 52px;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  min-height: min(760px, calc(100vh - 70px));
  padding: clamp(52px, 7vw, 96px) clamp(20px, 5vw, 72px) 48px;
}

.hero-copy {
  align-self: center;
}

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

h1 {
  font-size: clamp(3.8rem, 8vw, 7.6rem);
  letter-spacing: 0;
  line-height: 0.92;
  margin-bottom: 22px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 14px;
}

h3 {
  font-size: 1.08rem;
  margin-bottom: 18px;
}

.lede {
  color: var(--muted);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.42;
  max-width: 680px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0;
}

.button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.98rem;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  min-height: 44px;
  padding: 14px 18px;
  text-decoration: none;
}

.button.primary {
  background: var(--green);
  color: white;
}

.button.secondary {
  background: #f0eee6;
  color: var(--green);
}

.proof-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  max-width: 560px;
}

.proof-grid div {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.proof-grid dt {
  font-size: 1.75rem;
  font-weight: 850;
}

.proof-grid dd {
  color: var(--muted);
  margin: 4px 0 0;
}

.dashboard-preview {
  align-self: center;
  background: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: white;
  min-height: 520px;
  overflow: hidden;
  padding: 24px;
}

.preview-header {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  justify-content: space-between;
  padding-bottom: 18px;
}

.preview-header strong {
  color: #b9c7a6;
}

.metric-row {
  gap: 14px;
  margin: 24px 0;
}

.metric-row article {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  flex: 1;
  padding: 16px;
}

.metric-row span,
.metric-row small {
  color: rgba(255, 255, 255, 0.7);
  display: block;
}

.metric-row strong {
  display: block;
  font-size: 1.45rem;
  margin: 8px 0;
}

.signal-chart {
  align-items: end;
  background: linear-gradient(180deg, rgba(47, 111, 171, 0.26), rgba(31, 111, 74, 0.18));
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(6, 1fr);
  height: 270px;
  padding: 20px;
}

.signal-chart span {
  background: linear-gradient(180deg, #6a9bcc, #788c5d);
  border-radius: 8px 8px 2px 2px;
}

.workbench,
.split-section,
.contribute {
  padding: 72px clamp(20px, 5vw, 72px);
}

.workbench {
  background: var(--wash);
}

.section-heading {
  max-width: 760px;
}

.section-heading p,
.split-section p,
.contribute p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.tool-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 30px;
}

.tool-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 390px;
  padding: 22px;
}

.tool-panel.wide {
  min-width: 0;
}

label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 8px;
}

input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  margin-bottom: 16px;
  min-height: 44px;
  padding: 11px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.result {
  background: #faf9f5;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  color: var(--ink);
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-top: 16px;
  min-height: 88px;
  padding: 14px;
  white-space: pre-wrap;
}

.result.error {
  border-left-color: var(--danger);
}

.split-section {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
}

pre {
  background: #141413;
  border-radius: 8px;
  color: #faf9f5;
  overflow: auto;
  padding: 24px;
}

.contribute {
  background: #f0eee6;
}

.contribute p {
  max-width: 840px;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    flex-wrap: wrap;
  }

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

  .dashboard-preview {
    min-height: 420px;
  }

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

@media (min-width: 901px) and (max-width: 1180px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .hero {
    padding-top: 38px;
  }

  .proof-grid,
  .metric-row {
    grid-template-columns: 1fr;
  }

  .metric-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
