:root {
  /* Generic default brand scale (same indigo as the Next.js template) — swap for the
     real target app's brand color once one is known. */
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-800: #3730a3;
  --brand-900: #312e81;

  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-900: #171717;

  --success: #15803d;
  --success-bg: #f0fdf4;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  color: var(--neutral-900);
  background: #fff;
}

main {
  max-width: 56rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

code,
pre {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

code {
  background: var(--neutral-100);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.85em;
}

a {
  color: var(--brand-600);
}

/* Nav */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
}

/* Eyebrow / heading */
.eyebrow {
  margin: 2rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-600);
}

h1 {
  margin: 0.5rem 0 0;
  font-size: 1.9rem;
}

.subtext {
  max-width: 40rem;
  color: var(--neutral-600);
  line-height: 1.6;
}

/* Flow diagram */
.flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .flow {
    flex-direction: row;
    align-items: stretch;
  }
}

.flow-step {
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .flow-step {
    flex-direction: row;
    align-items: center;
  }
}

.flow-card {
  width: 100%;
  border: 1px solid var(--neutral-200);
  background: var(--neutral-50);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.flow-number {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--brand-600);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.flow-label {
  margin: 0.75rem 0 0;
  font-weight: 600;
}

.flow-detail {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--neutral-500);
}

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0;
  color: var(--neutral-300);
}

@media (min-width: 768px) {
  .flow-arrow {
    padding: 0 0.75rem;
  }
}

/* Section cards */
.grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

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

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 3rem 0 0;
}

.section-note {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--neutral-500);
}

/* Components */
.card {
  border: 1px solid var(--neutral-200);
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.card-title {
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.card-body {
  font-size: 0.9rem;
  color: var(--neutral-600);
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-600);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-700);
}

.btn-secondary {
  background: var(--brand-50);
  color: var(--brand-700);
}
.btn-secondary:hover {
  background: var(--brand-100);
}

.btn-ghost {
  background: transparent;
  color: var(--neutral-700);
}
.btn-ghost:hover {
  background: var(--neutral-100);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-brand {
  background: var(--brand-50);
  color: var(--brand-700);
}
.badge-success {
  background: var(--success-bg);
  color: var(--success);
}
.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
}
.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.badge-neutral {
  background: var(--neutral-100);
  color: var(--neutral-600);
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--neutral-700);
  margin-bottom: 0.25rem;
}

.field input {
  width: 100%;
  border: 1px solid var(--neutral-300);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.field input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 1px var(--brand-500);
}

/* Swatches */
.swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .swatches {
    grid-template-columns: repeat(10, 1fr);
  }
}

.swatch {
  height: 3.5rem;
  border-radius: 0.5rem;
}

.swatch-label {
  margin: 0.25rem 0 0;
  text-align: center;
  font-size: 0.7rem;
  color: var(--neutral-500);
}

/* Dark code block */
.codebox {
  background: var(--neutral-900);
  border-radius: 0.75rem;
  padding: 1.25rem;
  color: #fff;
}

.codebox pre {
  margin: 0;
  overflow-x: auto;
  font-size: 0.85rem;
  color: #f5f5f5;
}

.codebox .hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--neutral-400);
}

/* CTA row */
.cta {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--neutral-200);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
