:root {
  --brand: #f14635;
  --brand-press: #d63a2b;
  --ink: #16161a;
  --ink-soft: #5b6270;
  --line: #e6e8ec;
  --line-strong: #d3d7de;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --danger: #d93a2b;
  --ok: #1f9d55;
  --focus: rgba(241, 70, 53, 0.16);
  --radius: 16px;
  --radius-lg: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 40px 16px;
}

.card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: 0 12px 40px rgba(20, 22, 30, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 12px;
}

.brand__logo {
  width: 46px;
  height: 46px;
  flex: none;
  display: block;
}

.card__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card__sub {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.45;
  background: #fff4e5;
  border: 1px solid #ffd9a8;
  color: #8a5300;
}

.notice--error {
  background: #fde8e8;
  border-color: #f5b5b5;
  color: #a11f1f;
}

.field { margin-bottom: 16px; }

.field__label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field__input {
  width: 100%;
  padding: 13px 15px;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field__input::placeholder { color: #a6acb8; }

.field__input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus);
}

.field__input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(217, 58, 43, 0.12);
}

.field__error {
  margin: 6px 2px 0;
  min-height: 15px;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--danger);
}

.phone {
  position: relative;
}

.phone__prefix {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  padding-right: 11px;
  font-size: 16px;
  line-height: 20px;
  color: var(--ink-soft);
  border-right: 1px solid var(--line-strong);
  pointer-events: none;
}

.phone__input {
  padding-left: 57px;
  letter-spacing: 0.02em;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 20px 0 6px;
  cursor: pointer;
}

.consent__box {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--brand);
  cursor: pointer;
}

.consent__text {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.turnstile {
  margin-top: 18px;
}

.turnstile:not([hidden]) {
  min-height: 65px;
}

.submit {
  position: relative;
  width: 100%;
  margin-top: 20px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.submit:hover { background: var(--brand-press); }
.submit:active { transform: translateY(1px); }

.submit:disabled {
  background: #e5e7eb;
  color: #9aa1ad;
  cursor: not-allowed;
}

.submit:disabled:hover { background: #e5e7eb; }

.submit[aria-busy="true"] { color: transparent; pointer-events: none; }

.submit[aria-busy="true"] .submit__spinner {
  display: block;
}

.submit__spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2.5px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.done {
  text-align: center;
  padding: 12px 4px 8px;
}

.done__icon {
  color: var(--ok);
  background: rgba(31, 157, 85, 0.12);
  border-radius: 999px;
  padding: 12px;
}

.done__title {
  margin: 16px 0 6px;
  font-size: 19px;
  font-weight: 700;
}

.done__sub {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.link {
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: none;
  cursor: pointer;
}

.done .link {
  display: block;
  margin: 16px auto 0;
  text-decoration: none;
}

.done .link--btn {
  margin-top: 12px;
  color: var(--ink-soft);
}

.faq {
  width: 100%;
  max-width: 560px;
}

.faq__title {
  margin: 0 0 14px;
  padding-left: 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.faq__cat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
}

.faq__cat-title {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq__cat-title::-webkit-details-marker { display: none; }

.faq__cat-title::after,
.faq__q::after {
  content: "";
  flex: none;
  margin-right: 4px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.faq__cat-title::after { width: 9px; height: 9px; }

.faq__cat[open] > .faq__cat-title::after { transform: rotate(-135deg); }

.faq__cat-body { padding: 0 18px 6px; }

.faq__item { border-top: 1px solid var(--line); }

.faq__q {
  list-style: none;
  cursor: pointer;
  padding: 13px 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq__q::-webkit-details-marker { display: none; }

.faq__q::after { width: 7px; height: 7px; border-color: #a6acb8; }

.faq__item[open] > .faq__q::after { transform: rotate(-135deg); }

.faq__a {
  padding: 0 2px 13px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.faq__a p { margin: 0; }

.site-footer {
  flex: none;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 40px 20px 24px;
}

.footer__cols {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 32px;
}

.footcol {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footcol__title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footcol__link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.4;
  padding: 7px 0;
}

.footcol__link:hover { color: var(--ink); }

.footcol__link--sep { margin-top: 12px; }

.footcol__strong {
  margin: 6px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.footcol__pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  background: rgba(241, 70, 53, 0.1);
  border-radius: 999px;
  padding: 3px 10px;
  text-decoration: none;
}

.footer__bottom {
  max-width: 1160px;
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__legal { max-width: 640px; }

.footer__copy { margin: 0 0 12px; font-size: 13px; color: var(--ink); }

.footer__license {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.footer__license a { color: var(--ink-soft); text-decoration: underline; }

.footer__corp { font-size: 13px; color: #9aa1ad; text-decoration: none; }

.footer__social { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.social {
  color: #9aa1ad;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.social:hover { color: var(--ink); }

@media (max-width: 720px) {
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 440px) {
  .footer__cols { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page {
    gap: 18px;
    padding: 22px max(12px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  }

  .card {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .card__title { font-size: 20px; }

  .card__sub { margin-bottom: 20px; }

  .faq { max-width: 100%; }

  .turnstile:not([hidden]) {
    display: flex;
    justify-content: center;
    margin-left: -18px;
    margin-right: -18px;
  }

  .faq__cat-body { padding: 0 14px 6px; }

  .faq__cat-title,
  .faq__q { overflow-wrap: anywhere; }

  .faq__q { padding: 15px 2px; }

  .site-footer {
    padding: 32px max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }

  .footer__bottom {
    margin-top: 26px;
    gap: 18px;
  }

  .footcol__link { padding: 13px 0; }

  .footcol__link--sep { margin-top: 8px; }

  .footcol__pill { padding: 6px 12px; }

  .footer__corp {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .done .link { padding: 13px 8px; }

  .social {
    width: 44px;
    height: 44px;
  }

  .footer__social { gap: 6px; }
}

@media (max-width: 360px) {
  .page {
    padding-left: max(8px, env(safe-area-inset-left, 0px));
    padding-right: max(8px, env(safe-area-inset-right, 0px));
  }
}
