html:has(.demo-dialog[open]) {
  overflow: hidden;
}

.demo-dialog {
  --text: #192338;
  --secondary: #465b77;
  width: min(1150px, calc(100% - 48px));
  max-height: calc(100% - 48px);
  max-width: none;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d8e4f5;
  border-radius: 23px;
  background:
    radial-gradient(ellipse 76% 68% at 13% 0%, #e6efff, transparent),
    #f7faff;
  color: var(--text);
  color-scheme: light;
  box-shadow: 0 25px 90px #07152e5c;
}

.demo-dialog::backdrop {
  background: #081227a6;
  backdrop-filter: blur(5px);
}

.demo-dialog-toolbar {
  position: sticky;
  z-index: 1;
  top: 0;
  height: 0;
}

.demo-dialog-close {
  position: absolute;
  inset: 10px 12px auto auto;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid #c9d9ef;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 25px;
  line-height: 1;
}

.demo-dialog-close:hover {
  background: #eaf2ff;
}

.demo-dialog-close:focus-visible {
  outline-color: #285ea7;
}

.demo-form {
  display: grid;
  min-width: 0;
  gap: 16px;
  color-scheme: light;
}

.demo-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 14px;
}

.demo-fields > label {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.demo-fields > label :is(input, select) {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 6px;
  padding: 0 11px;
  border: 1px solid #657eaa;
  border-radius: 9px;
  background: #a8c8fb0d;
  color: var(--text);
  font-weight: 400;
}

.demo-fields input::placeholder {
  color: var(--secondary);
  opacity: 1;
}

.demo-team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-inline-size: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid #395477;
  border-radius: 12px;
  background: #0b1526;
}

.demo-team legend,
.demo-team input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.demo-team label {
  position: relative;
  display: grid;
  min-inline-size: 0;
  cursor: pointer;
}

.demo-team label span {
  display: grid;
  align-items: center;
  min-height: 44px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--secondary);
  font-size: clamp(13px, 1.25vw, 15px);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
}

.demo-team label:hover span {
  color: var(--text);
}

.demo-team input:checked + span {
  border-color: #6799e9;
  background: #2a4a7e;
  color: var(--text);
  box-shadow: 0 3px 8px #060d1ba6;
}

.demo-team input:focus-visible + span {
  outline: 2px solid #94beff;
  outline-offset: -2px;
}

@media (forced-colors: active) {
  .demo-team input:checked + span {
    border-color: Highlight;
    color: Highlight;
  }
}

.demo-form :focus-visible {
  outline: 2px solid #94beff;
  outline-offset: 2px;
}

.demo-form .demo-submit {
  justify-self: start;
  min-height: 47px;
  padding: 8px 17px;
  border-radius: 9px;
  background: #2e6fd5;
  color: #fff;
  box-shadow: inset 0 0 0 1px #add0ff61;
}

.demo-form .demo-submit:hover:enabled {
  background: #2a68ce;
}

.demo-form .demo-submit:disabled {
  opacity: .65;
  pointer-events: none;
}

.demo-consent {
  margin: 0;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.4;
}

.demo-consent a {
  text-decoration: underline;
  text-underline-offset: .15em;
}

.demo-consent a {
  color: #23568f;
}

.demo-note,
.demo-feedback {
  margin: 0;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.45;
}

.demo-feedback {
  padding: 8px 10px;
  border-radius: 7px;
  background: #94beff1f;
  color: var(--text);
}

.demo-page-layout {
  display: grid;
  padding: clamp(38px, 5.5vw, 66px) clamp(26px, 4.4vw, 58px);
  grid-template-areas:
    "intro form"
    "guide form";
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: clamp(26px, 3vw, 40px) clamp(30px, 5vw, 63px);
}

.demo-page-intro {
  grid-area: intro;
}

.demo-page-intro h2 {
  margin: 0;
  font-size: clamp(42px, 5.1vw, 64px);
  line-height: 1.04;
  letter-spacing: -.06em;
  text-wrap: balance;
}

.demo-page-intro em {
  color: #2b64b8;
  font-style: normal;
}

.demo-page-intro > p {
  max-width: 44ch;
  margin: 19px 0 0;
  color: var(--secondary);
  font-size: clamp(16px, 1.45vw, 18px);
  line-height: 1.55;
  text-wrap: pretty;
}

.demo-page-guide {
  grid-area: guide;
  padding-top: 22px;
  border-top: 1px solid #cfdcf0;
}

.demo-page-guide h3,
.demo-page-card h3 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.14;
  letter-spacing: -.04em;
}

.demo-page-guide ul {
  display: grid;
  gap: 16px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.demo-page-guide li {
  position: relative;
  padding-left: 27px;
}

.demo-page-guide li::before {
  position: absolute;
  top: 3px;
  left: 2px;
  width: 8px;
  height: 13px;
  transform: rotate(42deg);
  border: solid #2865c1;
  border-width: 0 2px 2px 0;
  content: "";
}

.demo-page-guide strong {
  display: block;
  font-size: 15px;
}

.demo-page-guide li p {
  max-width: 50ch;
  margin: 3px 0 0;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.48;
}

.demo-page-card {
  grid-area: form;
  padding: clamp(20px, 3.2vw, 36px);
  border: 1px solid #d8e4f5;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 42px #22508d10;
}

.demo-page-pricing {
  width: fit-content;
  margin: 12px 0 0;
  padding: 6px 10px;
  border: 1px solid #d7e6fa;
  border-radius: 8px;
  background: #edf4ff;
  color: #215496;
  font-size: 13px;
  font-weight: 700;
}

.demo-page-card .demo-form {
  gap: 15px;
  margin-top: 19px;
  color-scheme: light;
}

.demo-page-card .demo-team {
  border-color: #dbe5f4;
  background: #eaf1fb;
}

.demo-page-card .demo-team input:checked + span {
  border-color: #d0def4;
  background: #fff;
  color: #214f8c;
  box-shadow: 0 1px 3px #2f518a1c;
}

.demo-page-card .demo-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.demo-company {
  grid-column: 1 / -1;
}

.demo-page-card .demo-fields > label :is(input, select) {
  height: 44px;
  margin-top: 4px;
  border-color: #bdcde3;
  background: #fbfdff;
}

.demo-page-card .demo-fields input::placeholder {
  color: #59708e;
}

.demo-page-card .demo-fields select:invalid {
  color: #59708e;
}

.demo-page-card .demo-fields select option {
  color: #192338;
}

.demo-page-card :is(:focus-visible, .demo-team input:focus-visible + span) {
  outline-color: #285ea7;
}

.demo-page-card .demo-fields > label :is(input, select):focus {
  outline: none;
  border-color: #285ea7;
  background: #f2f7ff;
}

@media (forced-colors: active) {
  .demo-page-card .demo-fields > label :is(input, select):focus-visible {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}

.demo-page-submit {
  display: grid;
  gap: 7px;
}

.demo-page-submit .demo-submit {
  justify-self: stretch;
  background: #2865c1;
}

.demo-page-submit .demo-submit:hover:enabled {
  background: #2156a4;
}

@media (prefers-reduced-motion: reduce) {
  .demo-form .demo-submit {
    transition: none;
  }

  .demo-form .demo-submit:hover {
    transform: none;
  }
}

@media (max-width: 800px) {
  .demo-dialog {
    width: calc(100% - 20px);
    max-height: calc(100% - 20px);
    border-radius: 18px;
  }

  .demo-page-layout {
    grid-template-areas: "intro" "form" "guide";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 27px;
    padding: 54px 24px 26px;
  }

  .demo-page-intro h2 {
    max-width: 13em;
    font-size: clamp(37px, 7.8vw, 58px);
  }

  .demo-page-intro > p {
    margin-top: 13px;
  }
}

@media (max-width: 490px) {
  .demo-page-layout {
    padding-inline: 15px;
  }

  .demo-page-card .demo-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .demo-page-card .demo-fields > label :is(input, select) {
    font-size: 16px;
  }
}
