:root {
  color-scheme: light;
  --page-bg: #f5efe4;
  --panel-bg: rgba(255, 252, 247, 0.9);
  --border: rgba(64, 46, 28, 0.14);
  --text: #1f1a14;
  --muted: #6d6155;
  --accent: #a44b2f;
  --accent-strong: #7c331d;
  --shadow: 0 24px 48px rgba(53, 36, 24, 0.12);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(164, 75, 47, 0.16), transparent 30%),
    linear-gradient(180deg, #fbf7f1 0%, var(--page-bg) 100%);
  color: var(--text);
}

.page-shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.page-header,
.wizard-step {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.page-header {
  padding: 32px;
  margin-bottom: 24px;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow,
.step-number,
.snippet-label {
  color: var(--accent-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  margin-top: 12px;
}

.lede {
  max-width: 44rem;
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.wizard-step {
  padding: 28px;
}

.wizard-step + .wizard-step {
  margin-top: 20px;
}

.step-heading {
  display: flex;
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(164, 75, 47, 0.1);
}

.step-heading p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.panel-form,
#knowledge-fieldset {
  display: grid;
  gap: 16px;
}

#knowledge-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.96rem;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(64, 46, 28, 0.16);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

textarea {
  resize: vertical;
}

button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff9f2;
  cursor: pointer;
}

button:disabled,
#knowledge-fieldset:disabled button {
  cursor: not-allowed;
  opacity: 0.6;
}

.status-text {
  margin-top: 14px;
  color: var(--muted);
  min-height: 1.5em;
}

.status-text[data-state="error"] {
  color: #a12626;
}

.status-text[data-state="success"] {
  color: #235b34;
}

#embed-snippet {
  margin-top: 10px;
  min-height: 150px;
  font-family: "SFMono-Regular", "Menlo", "Monaco", monospace;
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 960px);
    padding: 20px 0 40px;
  }

  .page-header,
  .wizard-step {
    padding: 22px;
    border-radius: 20px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}