:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #667085;
  --line: #d9e2ec;
  --soft: #f6f8fb;
  --paper: #ffffff;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --accent: #b45309;
  --danger: #b42318;
  --shadow: 0 12px 32px rgba(31, 41, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(246, 248, 251, 0) 260px),
    #f6f8fb;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.precheck-shell {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 18px 14px 24px;
}

.precheck-topbar {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 88px;
  padding: 16px 190px 18px;
  text-align: center;
}

.precheck-topbar img {
  position: absolute;
  left: 0;
  top: 18px;
  width: 160px;
  height: auto;
  max-height: 64px;
  object-fit: contain;
}

.precheck-title-block {
  min-width: 0;
}

.applicant-label {
  position: absolute;
  right: 0;
  top: 24px;
  max-width: 190px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: right;
}

.precheck-topbar h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.34;
  text-align: center;
}

.precheck-topbar h1 span {
  display: block;
}

.notice,
.progress-panel,
.precheck-form,
.result-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.notice {
  display: grid;
  gap: 6px;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.55;
}

.notice strong {
  color: var(--primary-strong);
}

.progress-panel {
  padding: 12px;
  margin-bottom: 12px;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #e8eef5;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #2563eb);
  transition: width 180ms ease;
}

.step-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.step-tab {
  min-width: 0;
  padding: 6px 2px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  background: var(--soft);
}

.step-tab.active {
  color: #ffffff;
  background: var(--primary);
}

.precheck-form,
.result-panel {
  padding: 16px;
}

#company {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.stage-title {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.3;
}

.stage-subtitle {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.field-grid {
  display: grid;
  gap: 18px 16px;
}

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

.field label,
.choice-title {
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  background: #ffffff;
  color: var(--ink);
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice-grid {
  display: grid;
  gap: 8px;
}

.choice-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.choice-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.choice-row span {
  min-width: 0;
  line-height: 1.35;
}

.plain-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  min-height: 44px;
  align-items: center;
}

.plain-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.4;
}

.plain-radio input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.full-field {
  grid-column: 1 / -1;
}

.phone-code-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
}

.code-btn {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary-strong);
  font-weight: 700;
}

.sms-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.privacy-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  font-size: 14px;
  line-height: 1.6;
}

.privacy-box p {
  margin: 0;
}

.error-box {
  display: none;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: 6px;
  color: var(--danger);
  background: #fff1f0;
  font-size: 14px;
  line-height: 1.5;
}

.error-box.show {
  display: block;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.form-actions.single {
  grid-template-columns: 1fr;
}

.primary-btn {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

.secondary-btn {
  background: #ffffff;
}

.result-code {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.result-code.manual {
  background: var(--accent);
}

.result-code.not-pass {
  background: var(--danger);
}

.result-panel h2 {
  margin: 10px 0 8px;
  font-size: 22px;
  line-height: 1.3;
}

.result-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
}

.result-message {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.result-message p {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.8;
}

.result-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.result-list li {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  line-height: 1.5;
}

.compact-result-list {
  margin-top: 12px;
}

.disclaimer-line {
  margin-top: 14px;
  padding: 10px;
  border-left: 4px solid var(--primary);
  background: var(--soft);
  color: var(--ink);
  line-height: 1.6;
}

.precheck-footer {
  padding: 14px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

@media (min-width: 680px) {
  .precheck-shell {
    padding-top: 24px;
  }

  .precheck-topbar h1 {
    font-size: 34px;
  }

  .precheck-form,
  .result-panel {
    padding: 22px;
  }

  .field-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 679px) {
  .precheck-shell {
    padding-top: 10px;
  }

  .precheck-topbar {
    min-height: 192px;
    padding: 82px 0 22px;
  }

  .precheck-topbar img {
    top: 10px;
    left: 0;
    width: 118px;
    max-height: 48px;
  }

  .applicant-label {
    position: static;
    max-width: none;
    margin-top: 10px;
    text-align: center;
  }

  .precheck-topbar h1 {
    font-size: 29px;
    line-height: 1.42;
  }

  .precheck-form {
    padding: 12px;
  }

  .stage-title {
    margin-bottom: 4px;
    font-size: 18px;
  }

  .stage-subtitle {
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.45;
  }

  .privacy-box {
    gap: 8px;
    padding: 10px;
    font-size: 12px;
    line-height: 1.45;
  }

  .privacy-box .choice-row {
    min-height: 38px;
    padding: 7px 8px;
  }

  .privacy-box .choice-row input {
    width: 16px;
    height: 16px;
  }

  .form-actions {
    margin-top: 10px;
  }

  .phone-code-grid {
    grid-template-columns: 1fr;
  }

  .plain-radio-group {
    gap: 14px 24px;
  }
}
