:root {
  color-scheme: light;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  --bg: #f4f6fb;
  --card-bg: #ffffff;
  --border: #e4e7ec;
  --text: #111827;
  --text-muted: #5c6370;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --success: #059669;
  --warning: #d97706;
  --info: #0ea5e9;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

pre {
  margin: 0;
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  border: 1px solid #1e293b;
  font-family: 'JetBrains Mono', Consolas, 'SFMono-Regular', monospace;
  font-size: 0.875rem;
}

code {
  font-family: 'JetBrains Mono', Consolas, 'SFMono-Regular', monospace;
  background: rgba(37, 99, 235, 0.08);
  color: var(--brand-dark);
  padding: 0.15rem 0.4rem;
  border-radius: 0.375rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.navbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: radial-gradient(circle at 20% 20%, #60a5fa, var(--brand));
  display: inline-block;
}

.navbar-actions {
  display: flex;
  gap: 0.75rem;
}

.content {
  padding: 3rem 1.5rem 4rem;
}

.page-intro {
  margin-bottom: 2rem;
}

.page-intro h1 {
  margin: 0.4rem 0 0.6rem;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.2;
}

.lead {
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0;
}

.card {
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.alert {
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.alert.success {
  border-color: rgba(5, 150, 105, 0.4);
  background: rgba(5, 150, 105, 0.12);
  color: var(--success);
}

.alert.danger {
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(248, 113, 113, 0.12);
  color: #b91c1c;
}

.config-form .muted-note {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--text);
}

.form-field input,
.form-field textarea {
  padding: 0.55rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background: #fff;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid transparent;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-label {
  font-weight: 600;
}

.form-field small {
  color: var(--text-muted);
}

.form-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0 0;
  padding: 0;
}

.config-grid-item {
  padding: 1rem;
  border-radius: 0.85rem;
  border: 1px dashed var(--border);
  background: rgba(37, 99, 235, 0.04);
}

.config-grid-item dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 0.2rem;
}

.config-grid-item dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.card + .card {
  margin-top: 1.5rem;
}

.card-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.status-card {
  background: var(--card-bg);
  border-radius: 0.75rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
}

.status-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  font-weight: 600;
}

.status-chip {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  display: inline-block;
  background: var(--text-muted);
}

.status-chip.success {
  background: var(--success);
}

.status-chip.warning {
  background: var(--warning);
}

.status-chip.info {
  background: var(--info);
}

.status-chip.muted {
  background: var(--text-muted);
}

.stack {
  margin-top: 1.75rem;
}

.stack .eyebrow {
  margin-bottom: 0.4rem;
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.flow-card {
  margin-top: 2rem;
}

.timeline {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-step {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  position: relative;
  margin-top: 0.2rem;
}

.timeline-content {
  flex: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.timeline-header small {
  color: var(--text-muted);
}

.flow-payload {
  margin-top: 1rem;
}

.flow-payload pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.steps {
  padding-left: 1.25rem;
  margin: 1rem 0 0;
  color: var(--text-muted);
}

.steps li {
  margin-bottom: 0.5rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  background: var(--card-bg);
  text-align: center;
  color: var(--text-muted);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.6rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
}

.button svg {
  fill: currentColor;
}

.button:hover {
  transform: translateY(-1px);
  background: var(--brand-dark);
}

.button.secondary {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
  box-shadow: none;
}

.button.secondary:hover {
  background: rgba(37, 99, 235, 0.08);
}

.button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 700px) {
  .navbar .container {
    flex-direction: column;
    gap: 0.75rem;
  }

  .navbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .content {
    padding-top: 2.5rem;
  }

  .card {
    padding: 1.5rem;
  }
}
