.public-demo-page {
  --demo-ink: #0f172a;
  --demo-muted: #64748b;
  --demo-blue: #2563eb;
  --demo-blue-soft: #eff6ff;
  --demo-green: #16a34a;
  color: var(--demo-ink);
  min-height: calc(100vh - 72px);
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, .15), transparent 28rem),
    radial-gradient(circle at 95% 15%, rgba(14, 165, 233, .12), transparent 24rem),
    #f8fafc;
}

.public-demo-hero {
  padding: 2rem 0 5rem;
}

.public-demo-container {
  max-width: 1120px;
}

.public-demo-container--narrow {
  max-width: 760px;
}

.public-demo-heading {
  max-width: 790px;
  margin: 0 auto 2.25rem;
}

.public-demo-kicker,
.public-demo-overline {
  color: var(--demo-blue);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.public-demo-kicker {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .85rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, .09);
  margin-bottom: 1rem;
}

.public-demo-heading h1 {
  font-size: clamp(2.35rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 850;
  margin-bottom: 1.1rem;
}

.public-demo-heading > p {
  color: var(--demo-muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
  margin: 0 auto;
  max-width: 720px;
}

.public-demo-type-fieldset {
  margin: 0 0 .9rem;
  padding: 0;
  border: 0;
}

.public-demo-type-fieldset legend,
.public-demo-field > label {
  display: block;
  margin: 0 0 .3rem;
  color: #334155;
  font-size: .76rem;
  font-weight: 750;
}

.public-demo-fields {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: .75rem;
}

.public-demo-field--half { grid-column: span 6; }
.public-demo-field--concept { grid-column: span 5; }
.public-demo-field--amount { grid-column: span 3; }
.public-demo-field--frequency { grid-column: span 4; }
.public-demo-form.is-one-time .public-demo-field--concept { grid-column: span 8; }
.public-demo-form.is-one-time .public-demo-field--amount { grid-column: span 4; }

.public-demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, .65fr);
  align-items: start;
  gap: 1.5rem;
}

.public-demo-card,
.public-demo-status-card,
.public-demo-request-card {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 1.5rem;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .10);
}

.public-demo-card {
  padding: clamp(1.4rem, 4vw, 2.5rem);
}

.public-demo-card-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.public-demo-card-heading h2,
.public-demo-preview h2,
.public-demo-card-data h2 {
  margin: 0;
  font-weight: 800;
}

.public-demo-card-heading p {
  color: var(--demo-muted);
  margin: .2rem 0 0;
}

.public-demo-step-number {
  width: 3rem;
  height: 3rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--demo-blue);
  color: #fff;
  border-radius: 1rem;
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .25);
}

.public-demo-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.public-demo-choice {
  cursor: pointer;
  margin: 0;
}

.public-demo-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.public-demo-choice span {
  min-height: 4.35rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: .8rem;
  align-content: center;
  padding: .7rem .85rem;
  border: 1px solid #dbe3ee;
  border-radius: .8rem;
  background: #fff;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.public-demo-choice span > i {
  grid-row: 1 / 3;
  align-self: center;
  font-size: 1.2rem;
  color: var(--demo-blue);
}

.public-demo-choice strong {
  font-size: .88rem;
}

.public-demo-choice small {
  color: var(--demo-muted);
  font-size: .75rem;
}

.public-demo-choice input:checked + span {
  border-color: var(--demo-blue);
  background: var(--demo-blue-soft);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.public-demo-choice input:focus-visible + span {
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: 2px;
}

.public-demo-form .form-control,
.public-demo-form .form-select,
.public-demo-form .input-group-text {
  border-color: #cbd5e1;
  border-radius: .7rem;
  min-height: 2.65rem;
  font-size: .9rem;
}

.public-demo-form .input-group .form-control {
  border-radius: .7rem 0 0 .7rem;
}

.public-demo-form .input-group-text {
  border-radius: 0 .7rem .7rem 0;
}

.public-demo-form .form-control:focus,
.public-demo-form .form-select:focus {
  border-color: var(--demo-blue);
  box-shadow: 0 0 0 .22rem rgba(37, 99, 235, .13);
}

.public-demo-consent {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin: .85rem 0 .75rem;
  padding: .65rem .8rem .65rem 2.35rem;
  border-radius: .75rem;
  font-size: .8rem;
  line-height: 1.35;
}

.public-demo-consent--optional {
  margin-top: -.35rem;
  background: #fff;
  border-style: dashed;
}

.public-demo-consent--optional small {
  display: block;
  margin-top: .3rem;
  color: var(--demo-muted);
  font-size: .7rem;
}

.public-demo-optional-label {
  display: inline-block;
  margin-right: .3rem;
  padding: .08rem .38rem;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 999px;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.public-demo-form > .btn {
  min-height: 2.75rem;
  border-radius: .72rem;
}

.public-demo-privacy-note {
  margin: .6rem 0 0;
  color: var(--demo-muted);
  text-align: center;
  font-size: .72rem;
}

.public-demo-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.public-demo-preview {
  position: sticky;
  top: 6.5rem;
  padding: 1.6rem;
  border-radius: 1.35rem;
  background: var(--demo-ink);
  color: #fff;
  box-shadow: 0 20px 55px rgba(15, 23, 42, .18);
}

.public-demo-preview h2 {
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
}

.public-demo-preview ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.public-demo-preview li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}

.public-demo-preview li > span {
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #93c5fd;
  font-weight: 800;
}

.public-demo-preview strong,
.public-demo-preview small {
  display: block;
}

.public-demo-preview small {
  color: #cbd5e1;
  margin-top: .2rem;
  line-height: 1.45;
}

.public-demo-status-card {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem);
}

.public-demo-form-card {
  padding: clamp(1.35rem, 4vw, 2.25rem);
}

.public-demo-form-card .public-demo-form {
  max-width: 700px;
  margin: 1.25rem auto 0;
}

.public-demo-form-heading {
  margin-bottom: .25rem;
}

.public-demo-logo-placeholder {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin: 0 auto .85rem;
  padding: .6rem .8rem;
  color: #334155;
  background: #f8fafc;
  border: 1px dashed #93c5fd;
  border-radius: .9rem;
  text-align: left;
}

.public-demo-logo-placeholder > span {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--demo-blue);
  background: var(--demo-blue-soft);
  border-radius: .65rem;
  font-size: 1.1rem;
}

.public-demo-logo-placeholder strong,
.public-demo-logo-placeholder small {
  display: block;
}

.public-demo-logo-placeholder strong {
  font-size: .83rem;
}

.public-demo-logo-placeholder small {
  margin-top: .08rem;
  color: var(--demo-muted);
  font-size: .68rem;
}

.public-demo-status-heading h2,
.public-demo-form-heading h2,
.public-demo-request-header h1,
.public-demo-unavailable h1,
.public-demo-unavailable h2 {
  font-weight: 850;
  letter-spacing: -.025em;
}

.public-demo-status-heading > p:not(.public-demo-overline),
.public-demo-form-heading > p:not(.public-demo-overline),
.public-demo-request-header > p,
.public-demo-unavailable > p {
  color: var(--demo-muted);
  font-size: 1.08rem;
}

.public-demo-form-heading h2 {
  margin-bottom: .35rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.public-demo-form-heading > p:not(.public-demo-overline) {
  margin-bottom: 0;
  font-size: .95rem;
}

.public-demo-icon {
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  color: var(--demo-blue);
  background: var(--demo-blue-soft);
  border-radius: 1.35rem;
  font-size: 2rem;
}

.public-demo-icon--muted {
  color: #475569;
  background: #f1f5f9;
}

.public-demo-email {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: .88rem;
}

.public-demo-timeline {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.public-demo-timeline li {
  position: relative;
  text-align: center;
  padding: 0 .45rem;
}

.public-demo-timeline li:not(:last-child)::after {
  content: '';
  position: absolute;
  z-index: 0;
  top: 1rem;
  left: calc(50% + 1rem);
  width: calc(100% - 2rem);
  height: 3px;
  background: #e2e8f0;
}

.public-demo-timeline li > span {
  position: relative;
  z-index: 1;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  margin: 0 auto .7rem;
  border-radius: 50%;
  color: #94a3b8;
  background: #f1f5f9;
  border: 3px solid #e2e8f0;
}

.public-demo-timeline strong,
.public-demo-timeline small {
  display: block;
}

.public-demo-timeline small {
  color: var(--demo-muted);
  line-height: 1.35;
  margin-top: .25rem;
}

.public-demo-timeline li.is-complete > span {
  background: var(--demo-green);
  border-color: var(--demo-green);
  color: #fff;
}

.public-demo-timeline li.is-complete:not(:last-child)::after {
  background: var(--demo-green);
}

.public-demo-timeline li.is-error > span {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.public-demo-status-actions {
  max-width: 460px;
  margin: 0 auto;
  display: grid;
  gap: .5rem;
  text-align: center;
}

.public-demo-update-error {
  max-width: 600px;
  margin: 1rem auto 0;
  padding: .8rem 1rem;
  color: #991b1b;
  background: #fef2f2;
  border-radius: .75rem;
  text-align: center;
}

.public-demo-request-card {
  padding: clamp(1.4rem, 5vw, 2.6rem);
}

.public-demo-safe-notice {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1rem;
  margin: 1.8rem 0;
  border-radius: 1rem;
  color: #166534;
  background: #ecfdf5;
  border: 1px solid #86efac;
}

.public-demo-safe-notice > i {
  font-size: 1.8rem;
}

.public-demo-safe-notice strong,
.public-demo-safe-notice span {
  display: block;
}

.public-demo-safe-notice span {
  font-size: .9rem;
  margin-top: .15rem;
}

.public-demo-summary {
  margin: 0 0 1.8rem;
  border-top: 1px solid #e2e8f0;
}

.public-demo-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.public-demo-summary dt {
  color: var(--demo-muted);
  font-weight: 600;
}

.public-demo-summary dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.public-demo-card-data {
  margin: 1.8rem 0;
  padding: 1.35rem;
  border-radius: 1.15rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.public-demo-card-data-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.public-demo-card-data-heading h2 {
  font-size: 1.2rem;
}

.public-demo-card-data-heading > i {
  color: #c2410c;
  font-size: 2rem;
}

.public-demo-card-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.public-demo-card-data-grid > div {
  position: relative;
  padding: .85rem;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(251, 146, 60, .28);
  border-radius: .8rem;
}

.public-demo-card-data-grid span,
.public-demo-card-data-grid strong {
  display: block;
}

.public-demo-card-data-grid span {
  color: #9a3412;
  font-size: .78rem;
  font-weight: 700;
}

.public-demo-card-data-grid strong {
  margin: .25rem 0 .55rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .95rem;
}

.public-demo-card-data-grid button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--demo-blue);
  font-weight: 700;
  font-size: .78rem;
}

.public-demo-back-link {
  display: block;
  margin-top: 1rem;
  color: var(--demo-muted);
  text-align: center;
  text-decoration: none;
}

.public-demo-unavailable {
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 991.98px) {
  .public-demo-layout {
    grid-template-columns: 1fr;
  }

  .public-demo-preview {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .public-demo-hero {
    padding: 2rem 0 3.5rem;
  }

  .public-demo-fields {
    gap: .65rem;
  }

  .public-demo-field--concept { grid-column: span 7; }
  .public-demo-field--amount { grid-column: span 5; }
  .public-demo-field--frequency { grid-column: span 12; }

  .public-demo-choice-grid,
  .public-demo-card-data-grid {
    grid-template-columns: 1fr;
  }

  .public-demo-timeline {
    grid-template-columns: 1fr;
    gap: .9rem;
  }

  .public-demo-timeline li {
    display: grid;
    grid-template-columns: 2.2rem 1fr;
    align-items: start;
    gap: .75rem;
    padding: 0;
    text-align: left;
  }

  .public-demo-timeline li > span {
    margin: 0;
  }

  .public-demo-timeline li:not(:last-child)::after {
    top: 2.1rem;
    left: 1rem;
    width: 3px;
    height: calc(100% + .9rem);
  }

  .public-demo-summary > div {
    align-items: flex-start;
  }
}

@media (max-width: 575.98px) {
  .public-demo-field--half,
  .public-demo-field--concept,
  .public-demo-field--amount,
  .public-demo-form.is-one-time .public-demo-field--concept,
  .public-demo-form.is-one-time .public-demo-field--amount {
    grid-column: span 12;
  }

}

@media (prefers-reduced-motion: reduce) {
  .public-demo-choice span {
    transition: none;
  }
}
