:root {
  --loan-ink: #17212b;
  --loan-text: #3f4a54;
  --loan-muted: #7a858f;
  --loan-line: #e5eaef;
  --loan-bg: #f6f8fb;
  --loan-panel: #ffffff;
  --loan-soft: #f1f5f7;
  --loan-primary: #0f766e;
  --loan-primary-dark: #0b5f59;
  --loan-link: #2563eb;
  --loan-warning: #d97706;
  --loan-danger: #dc2626;
  --loan-shadow: 0 8px 22px rgba(18, 30, 45, .06);
  --loan-radius: 8px;
  --loan-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

* {
  letter-spacing: 0;
}

body {
  color: var(--loan-ink);
  background: var(--loan-bg);
  font-family: var(--loan-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: 480px;
  padding-left: 16px;
  padding-right: 16px;
}

.hero,
.card,
.quota-card,
.product-card,
.notice-card,
.auth-card,
.modal,
.protocol-dialog {
  border: 1px solid var(--loan-line);
  border-radius: var(--loan-radius);
  background: var(--loan-panel);
  box-shadow: var(--loan-shadow);
}

.hero::after {
  content: none;
}

.hero,
.amount-card,
.section-card,
.quota-card,
.notice-card {
  padding: 18px;
}

.headline,
.title,
.quota-title,
.card-title,
.auth-header {
  color: var(--loan-ink);
  font-weight: 700;
}

.headline {
  max-width: none;
  font-size: 24px;
  line-height: 1.22;
}

.headline strong,
.amount-top strong,
.rate strong,
.quota-title span,
.card-boost,
.auth-header strong,
#cardBoostAmount {
  color: var(--loan-primary);
}

.hero-sub,
.amount-top,
.amount-hint,
.repay-summary,
.repay-date,
.repay-breakdown,
.quota-provider,
.quota-rail span,
.hero-rail span,
.product-metric span,
.statement,
.notice-card p {
  color: var(--loan-muted);
}

.hero-rail,
.quota-rail {
  border-color: var(--loan-line);
}

.hero-rail span::before,
.quota-rail span::before {
  background: var(--loan-primary);
  box-shadow: none;
}

.card,
.product-card,
.auth-card {
  overflow: hidden;
}

.amount-line,
.quota-lines,
.product-head,
.auth-row,
.item,
.card-header,
.auth-header {
  border-color: var(--loan-line);
}

#amount {
  color: var(--loan-ink);
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: 100%;
  font-size: clamp(42px, 12.5vw, 58px);
}

.currency {
  flex: 0 0 auto;
  color: var(--loan-ink);
}

.amount-line {
  gap: 8px;
}

.max-btn {
  flex: 0 0 auto;
  padding-left: 0;
}

.max-btn,
a,
.quota-provider strong,
.quota-more,
.result-protocol a,
.product-protocol a,
.sms-countdown {
  color: var(--loan-link);
}

.title::before {
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--loan-primary);
}

.term-list {
  gap: 8px;
  padding: 4px;
  border-radius: var(--loan-radius);
  background: var(--loan-soft);
}

.term-btn {
  min-height: 40px;
  border-radius: 6px;
  background: transparent;
  color: var(--loan-text);
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.term-btn.active {
  border-color: transparent;
  background: var(--loan-panel);
  color: var(--loan-primary);
  box-shadow: 0 2px 8px rgba(18, 30, 45, .08);
}

.repay-body,
.quota-lines {
  border-radius: 6px;
  background: var(--loan-soft);
}

.phone,
.auth-input,
.sms-input {
  color: var(--loan-ink);
}

.sms-input {
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}

.sms-input:focus,
.sms-input:focus-visible,
.auth-input:focus,
.auth-input:focus-visible {
  outline: 0;
  box-shadow: none;
}

.phone {
  height: 56px;
  border: 1px solid var(--loan-line);
  border-radius: var(--loan-radius);
  background: var(--loan-panel);
  box-shadow: none;
}

.phone:focus,
.sms-input-wrap:focus-within {
  border-color: var(--loan-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .10);
}

.auth-row:focus-within {
  border-bottom-color: var(--loan-primary);
  background: #fbfdfd;
  box-shadow: none;
}

.submit,
.modal-primary,
.quota-primary,
.product-apply,
.protocol-confirm,
.submit-btn {
  border-radius: var(--loan-radius);
  background: var(--loan-primary);
  box-shadow: none;
  font-weight: 700;
  transition: background .16s ease, transform .16s ease;
}

.submit:hover,
.modal-primary:hover,
.quota-primary:hover,
.product-apply:hover,
.protocol-confirm:hover,
.submit-btn:hover {
  background: var(--loan-primary-dark);
}

.submit:active,
.modal-primary:active,
.quota-primary:active,
.product-apply:active,
.protocol-action:active,
.submit-btn:active,
.term-btn:active,
.option-btn:active {
  transform: translateY(1px);
}

.check,
.result-protocol::before,
.product-protocol::before {
  border-radius: 4px;
}

.check {
  display: grid;
  place-items: center;
  align-self: center;
  margin-top: 0;
  line-height: 0;
}

.check.checked,
.result-protocol.checked::before,
.product-protocol.checked::before {
  border-color: var(--loan-primary);
  background: var(--loan-primary);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 9.2 7.2 12.4 14 5.6' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 82% 82%;
  box-shadow: none;
}

.modal-mask,
.protocol-modal,
.city-picker {
  background: rgba(16, 24, 40, .42);
  backdrop-filter: none;
}

.modal,
.protocol-dialog,
.city-panel {
  box-shadow: 0 16px 40px rgba(16, 24, 40, .16);
}

.sms-input-wrap {
  border-radius: var(--loan-radius);
  background: var(--loan-soft);
}

.form-error {
  color: var(--loan-danger);
}

.quota-card {
  margin-top: 22px;
  padding-top: 42px;
}

.quota-badge {
  width: 64px;
  height: 64px;
  border: 1px solid var(--loan-line);
  border-radius: 14px;
  background: var(--loan-panel);
  box-shadow: var(--loan-shadow);
}

.quota-badge::before {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--loan-soft);
  color: var(--loan-primary);
}

.quota-badge.has-logo,
.quota-badge img {
  border-radius: 12px;
}

.quota-title {
  font-size: 22px;
  line-height: 1.25;
}

.quota-title span {
  display: block;
  margin: 8px 0 4px;
  font-size: 36px;
  line-height: 1;
}

.quota-rail {
  padding: 12px 0;
}

.quota-row strong {
  color: var(--loan-ink);
}

.product-head {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.product-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: none;
}

.product-name {
  grid-column: 2;
  margin-left: 0;
  font-size: 18px;
}

.product-title-wrap {
  grid-column: 2;
  margin-left: 0;
}

.product-metric strong {
  color: var(--loan-ink);
  font-size: 20px;
}

.notice-card {
  border-color: #f1dfc5;
  background: #fffaf2;
  box-shadow: none;
}

.notice-title {
  color: var(--loan-warning);
  font-weight: 700;
}

.header {
  margin-left: -16px;
  margin-right: -16px;
  padding: 28px 22px 58px;
  background: var(--loan-bg);
}

.subtitle::before {
  border-radius: 6px;
  background: var(--loan-primary);
}

.card-header,
.auth-header {
  background: var(--loan-panel);
}

.assessment-card {
  margin-top: -32px;
}

.assessment-card .item,
.assessment-card .item-options-wrap,
.assessment-card .option-btn,
.assessment-card .item.completed .item-value::after {
  transition: none;
}

.assessment-card .item.animate-show {
  animation: none;
}

.card-title,
.auth-header {
  font-size: 18px;
}

.item.active {
  background: var(--loan-soft);
}

.item-number {
  width: 22px;
  height: 22px;
  border: 1px solid var(--loan-line);
  border-radius: 50%;
  background: transparent;
  color: var(--loan-primary);
  font-size: 12px;
  font-weight: 650;
}

.item.completed .item-number {
  border-color: #b9d8d4;
  background: #f4faf9;
  color: var(--loan-primary);
}

.option-btn {
  min-height: 50px;
  border: 1px solid var(--loan-line);
  border-radius: var(--loan-radius);
  background: var(--loan-panel);
  color: var(--loan-text);
  box-shadow: none;
}

.option-btn.active {
  border-color: var(--loan-primary);
  background: #eef7f6;
  color: var(--loan-primary);
  box-shadow: none;
}

.auth-icon {
  border-radius: 8px;
  background: var(--loan-soft);
}

.auth-tip-mark {
  background: var(--loan-warning);
}

.city-panel {
  max-width: 480px;
  border-radius: 14px 14px 0 0;
}

.city-confirm {
  color: var(--loan-primary);
}

.city-wheel-line {
  background: rgba(15, 118, 110, .05);
  border-color: var(--loan-line);
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 3px;
}

@media (max-width: 390px) {
  #amount {
    font-size: clamp(40px, 11.5vw, 48px);
  }

  .currency {
    font-size: 28px;
  }

  .max-btn {
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  .page {
    padding-left: 12px;
    padding-right: 12px;
  }

  .headline {
    font-size: 22px;
  }

  .quota-title {
    font-size: 20px;
  }

  .quota-title span {
    font-size: 32px;
  }

  #amount {
    font-size: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
