:root {
  --bg: #f4efe7;
  --panel: rgba(255, 252, 247, 0.94);
  --panel-border: rgba(97, 74, 49, 0.14);
  --text: #201712;
  --muted: #6d5b4b;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --warn: #9a3412;
  --shadow: 0 24px 60px rgba(74, 51, 31, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(191, 90, 42, 0.16), transparent 28%),
    linear-gradient(180deg, #efe3d2 0%, var(--bg) 42%, #f8f4ee 100%);
}

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

.hero {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
}

h2 {
  font-size: 1.4rem;
}

.intro,
.panel p,
.helper,
.feedback {
  color: var(--muted);
}

.panel {
  margin-top: 18px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.panel.compact {
  padding-top: 20px;
  padding-bottom: 20px;
}

.panel-head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.status-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.92rem;
  white-space: nowrap;
}

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

.field,
.field-toggle {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

.field span,
.field-toggle strong {
  font-size: 0.98rem;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(92, 68, 45, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
}

input:focus,
select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  border-color: var(--accent);
}

.field-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.field-toggle {
  min-height: 140px;
  padding: 16px;
  border: 1px solid rgba(92, 68, 45, 0.15);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.field-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.34);
  box-shadow: 0 12px 28px rgba(74, 51, 31, 0.08);
}

.field-toggle label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.field-toggle input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(32, 23, 18, 0.06);
  color: var(--muted);
  font-size: 0.84rem;
}

.custom-fields {
  display: grid;
  gap: 14px;
}

.custom-card {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(92, 68, 45, 0.15);
}

.preview-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preview-tag {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-strong);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.secondary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
}

.secondary-button {
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-strong);
}

.ghost-button {
  background: rgba(154, 52, 18, 0.1);
  color: var(--warn);
  min-width: 110px;
}

button:hover {
  transform: translateY(-1px);
}

.feedback {
  min-height: 24px;
  margin: 16px 0 0;
}

.feedback.is-error {
  color: var(--warn);
}

.feedback.is-success {
  color: var(--accent-strong);
}

.hidden {
  display: none;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(32, 23, 18, 0.06);
}

@media (max-width: 860px) {
  .form-grid,
  .custom-card {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
  }
}
