:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171717;
  background: #f4f4f4;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px clamp(18px, 5vw, 64px);
  color: #fff;
  background: #111;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 22px; letter-spacing: -.03em; }
h2 { margin-bottom: 16px; font-size: 20px; letter-spacing: -.02em; }
h3 { margin-bottom: 4px; font-size: 16px; }
.eyebrow { margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.muted { color: #6b6b6b; font-size: 13px; }
.site-header .muted { color: #d4d4d4; }

main { width: min(1180px, 100%); margin: 0 auto; padding: 32px clamp(14px, 4vw, 40px) 64px; }
.panel { margin-bottom: 20px; padding: clamp(18px, 3vw, 28px); border: 1px solid #d8d8d8; border-radius: 10px; background: #fff; }
.login-panel { max-width: 560px; margin: 5vh auto 0; }
.onboarding-divider { margin: 28px 0; border-top: 1px solid #ddd; }
.order-details { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.order-details code { display: block; padding: 10px; background: #f1f1f1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack .button { margin-top: 6px; }

label { margin-top: 6px; font-size: 13px; font-weight: 650; }
input, textarea, select {
  width: 100%;
  border: 1px solid #bdbdbd;
  border-radius: 6px;
  padding: 11px 12px;
  color: #111;
  background: #fff;
  outline: none;
}
textarea { resize: vertical; min-height: 150px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
input:focus, textarea:focus, select:focus { border-color: #111; box-shadow: 0 0 0 2px #1111; }

.button {
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid #111;
  border-radius: 6px;
  color: #fff;
  background: #111;
  font-weight: 650;
}
.button:hover { background: #333; }
.button.secondary { color: #111; background: #fff; border-color: #bcbcbc; }
.button.secondary:hover { background: #eee; }
.site-header .button.secondary { color: #fff; background: #222; border-color: #666; }
.button.danger { color: #fff; background: #333; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.actions, .header-controls, .section-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-heading { justify-content: space-between; margin-bottom: 12px; }
.section-heading h2 { margin-bottom: 0; }

.summary-grid, .admin-grid, .payment-grid, .payment-form { display: grid; gap: 20px; }
.summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-grid, .payment-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.payment-form .button { grid-column: 1 / -1; justify-self: start; }
.metric { display: flex; flex-direction: column; gap: 8px; }
.metric strong { font-size: clamp(24px, 4vw, 36px); }
.payment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.payment-card { padding: 16px; border: 1px solid #ddd; border-radius: 8px; overflow-wrap: anywhere; }
.payment-card p { margin-bottom: 8px; }
.payment-card code { display: block; margin-top: 8px; white-space: pre-wrap; }

.progress-wrap { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
progress { flex: 1; height: 8px; accent-color: #111; }
.error { min-height: 18px; margin: 12px 0 0; color: #333; font-size: 13px; font-weight: 650; }
.results { display: grid; gap: 14px; margin-top: 20px; }
.result-card { border: 1px solid #ccc; border-radius: 8px; overflow: hidden; }
.result-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #eee; }
.result-header strong { font-size: 14px; }
.result-body { padding: 14px; }
.result-field { margin-bottom: 12px; }
.result-field:last-child { margin-bottom: 0; }
.result-field span { display: block; margin-bottom: 4px; color: #666; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }
.api-example { margin: 16px 0; padding: 14px; border: 1px solid #ddd; border-radius: 7px; background: #f4f4f4; white-space: pre-wrap; overflow-wrap: anywhere; }

.secret-box { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; padding: 16px; border: 2px solid #111; border-radius: 8px; }
.secret-box code { padding: 12px; background: #eee; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 10px; border-bottom: 1px solid #e2e2e2; text-align: left; vertical-align: middle; white-space: nowrap; }
th { color: #666; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
td:last-child { display: flex; gap: 6px; }
td .button { min-height: 32px; padding: 5px 9px; font-size: 12px; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: min(420px, calc(100vw - 40px)); padding: 13px 16px; border-radius: 7px; color: #fff; background: #111; box-shadow: 0 8px 30px #0003; }

@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .header-controls { width: 100%; }
  .summary-grid, .admin-grid, .payment-grid, .payment-form { grid-template-columns: 1fr; }
  .payment-form .button { grid-column: auto; }
  main { padding-top: 20px; }
  .actions .button { flex: 1; }
}
