:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #dde5f0;
  --primary: #1473e6;
  --primary-dark: #0f5ec0;
  --accent: #15b8a6;
  --danger: #d92d20;
  --shadow: 0 20px 45px rgba(20, 39, 73, 0.14);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  color: var(--text);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(20, 115, 230, 0.18), transparent 28rem),
    linear-gradient(180deg, #eaf2ff 0%, #f6f8fb 42%, #edf2f7 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 16px 34px;
}

.hero {
  padding: 18px 4px 24px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(20, 115, 230, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 10px;
  max-width: 680px;
  font-size: clamp(30px, 8vw, 54px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.panel {
  display: grid;
  gap: 18px;
}

.form,
.tips {
  border: 1px solid rgba(221, 229, 240, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.form {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span {
  font-size: 14px;
  font-weight: 700;
}

.field input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 110px 0 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.field input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(20, 115, 230, 0.12);
}

.input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
}

.input-group input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 110px 0 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(20, 115, 230, 0.12);
}

.input-group__btn {
  position: absolute;
  right: 0;
  top: 0;
  min-height: 48px;
  min-width: 96px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
  background: rgba(20, 115, 230, 0.09);
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.16s ease;
}

.input-group__btn:active {
  background: rgba(20, 115, 230, 0.16);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.segmented label {
  position: relative;
  min-width: 0;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.segmented input:checked + span {
  border-color: rgba(20, 115, 230, 0.28);
  background: rgba(20, 115, 230, 0.1);
  color: var(--primary);
}

.primary-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(20, 115, 230, 0.24);
}

.primary-btn:active {
  background: var(--primary-dark);
}

.primary-btn.is-loading .btn-text {
  opacity: 0;
}

.loader {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.8s linear infinite;
}

.primary-btn.is-loading .loader {
  opacity: 1;
}

.tips {
  padding: 18px;
}

.tips h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.tips ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 30;
  max-width: min(88vw, 420px);
  padding: 11px 15px;
  border-radius: 8px;
  background: rgba(23, 32, 51, 0.94);
  color: #ffffff;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 16px));
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  padding: 18px;
}

.modal.is-open {
  display: grid;
  place-items: center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}

.modal__card {
  position: relative;
  width: min(100%, 440px);
  border-radius: 8px;
  background: #ffffff;
  padding: 22px 18px 18px;
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.28);
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f2f4f7;
  color: #475467;
  font-size: 24px;
  line-height: 1;
}

.modal__eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.modal h2 {
  margin: 0;
  padding-right: 38px;
  font-size: 22px;
  line-height: 1.25;
}

.modal__desc {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.modal__actions {
  display: grid;
  gap: 10px;
}

.action-btn {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-weight: 800;
}

.action-btn--accent {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

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

@media (min-width: 760px) {
  .page {
    padding-top: 54px;
  }

  .panel {
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
    align-items: start;
  }

  .form,
  .tips {
    padding: 24px;
  }

}
