:root {
  --page: #f7f5fb;
  --paper: #ffffff;
  --ink: #15131d;
  --muted: #6f6a7b;
  --line: #dfdbea;
  --violet: #5c1eec;
  --violet-soft: #eee9ff;
  --shadow: 0 22px 70px rgba(39, 29, 75, 0.12);
  color: var(--ink);
  background: var(--page);
  font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(18px, 6vw, 104px);
  border-bottom: 1px solid rgba(21, 19, 29, 0.08);
  background: rgba(247, 245, 251, 0.92);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.preview-nav { display: flex; align-items: center; gap: 16px; color: rgba(21, 19, 29, 0.66); font-size: 13px; font-weight: 600; }
.nav-cta, .build-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--violet);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease;
}
.nav-cta:hover, .build-button:hover { transform: translateY(-1px); background: #4820bb; }
.build-button:disabled { opacity: 0.6; cursor: default; transform: none; }

.builder-hero {
  width: min(880px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(52px, 8vw, 96px) 0 clamp(28px, 4vw, 48px);
  text-align: center;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--violet);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.builder-hero h1 {
  margin: 0 auto;
  max-width: 720px;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero-copy {
  margin: 18px auto 0;
  max-width: 600px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.builder-card {
  width: min(880px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.template-notice {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid rgba(32, 94, 79, 0.22);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(230, 244, 239, 0.96), rgba(255, 255, 255, 0.92));
  color: #194c40;
}
.template-notice div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.template-notice span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(32, 94, 79, 0.12);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.template-notice strong { font-size: 14px; }
.template-notice p { margin: 0; color: rgba(25, 76, 64, 0.78); font-size: 13px; line-height: 1.55; }
.healthcare-privacy-note { color: #205e4f !important; font-weight: 600; }
body.healthcare-template .builder-hero .eyebrow { color: #205e4f; }
body.healthcare-template .build-button { background: #205e4f; }
body.healthcare-template .build-button:hover { background: #16463b; }
#buildForm { display: grid; gap: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .field-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.field > span, .field legend {
  font-size: 13px;
  font-weight: 600;
}
.field b { color: var(--violet); }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  background: #fbfaff;
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border 160ms ease, box-shadow 160ms ease;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-soft);
}
.field small { color: var(--muted); font-size: 12px; line-height: 1.5; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { position: relative; }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swatch i {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c);
  border: 3px solid transparent;
  transition: border 160ms ease, transform 160ms ease;
}
.swatch input:checked + i {
  border-color: var(--ink);
  transform: scale(1.08);
}
.swatch input:focus-visible + i { outline: 2px solid var(--violet); outline-offset: 2px; }

.privacy-note { align-content: center; gap: 8px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.privacy-note p { margin: 0; }
.privacy-note .quiet { color: rgba(111, 106, 123, 0.8); }

.honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.form-error { margin: 0; color: #b3261e; font-size: 13px; font-weight: 600; }
.build-button { min-height: 46px; padding: 0 26px; font-size: 14px; }
.spinner {
  width: 16px;
  height: 16px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.demo-footer {
  width: min(880px, calc(100% - 36px));
  margin: 0 auto;
  padding: 44px 0 56px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}
.demo-footer a { text-decoration: underline; text-underline-offset: 3px; }
.demo-footer p { margin: 6px 0; }

.unavailable {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}
.unavailable-card {
  max-width: 460px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}
.unavailable-card h1 { margin: 0 0 10px; font-family: "IBM Plex Serif", Georgia, serif; font-size: 26px; }
.unavailable-card p { margin: 0 0 22px; color: var(--muted); line-height: 1.6; }
