:root {
  color-scheme: light;
  --ink: #202728;
  --muted: #7c898a;
  --line: #e5ebeb;
  --panel: rgba(255, 255, 255, 0.86);
  --mint: #dff3ed;
  --mint-strong: #37a78d;
  --mint-deep: #176b5d;
  --blue: #4c84a9;
  --amber: #f6b91f;
  --amber-deep: #e5a500;
  --danger: #c54444;
  --shadow: 0 26px 75px rgba(43, 65, 66, 0.11);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f5f9f8;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 13% 10%, rgba(196, 236, 226, 0.72), transparent 30rem),
    radial-gradient(circle at 88% 35%, rgba(218, 238, 246, 0.86), transparent 31rem),
    linear-gradient(145deg, #fbfdfc 0%, #f3f8f7 52%, #f8fbfb 100%);
}

button,
input {
  font: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

.page-glow {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(2px);
}

.page-glow--one {
  top: 22%;
  left: -10rem;
  width: 25rem;
  height: 25rem;
  background: rgba(150, 218, 202, 0.13);
}

.page-glow--two {
  right: -13rem;
  bottom: 3%;
  width: 33rem;
  height: 33rem;
  background: rgba(125, 182, 205, 0.11);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100% - 38px, 920px);
  margin: 0 auto;
  padding: 42px 0 34px;
}

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

.brand__mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #344451, #182329);
  box-shadow: 0 10px 28px rgba(23, 35, 40, 0.2);
}

.brand__mark svg {
  width: 38px;
  fill: #eafaf8;
}

.brand__title {
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.brand__subtitle {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 8px 12px;
  border: 1px solid rgba(87, 139, 129, 0.13);
  border-radius: 999px;
  color: #58706e;
  background: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(14px);
}

.local-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #42ad91;
  box-shadow: 0 0 0 4px rgba(66, 173, 145, 0.11);
}

.hero {
  padding: 82px 8px 40px;
  text-align: center;
}

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--mint-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.hero h1 {
  margin: 0;
  color: #1f292b;
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 760;
  line-height: 1.06;
  letter-spacing: -0.065em;
}

.hero p {
  max-width: 600px;
  margin: 20px auto 0;
  color: #718080;
  font-size: 15px;
  line-height: 1.8;
}

.target-choice {
  width: min(100%, 590px);
  margin-top: 26px;
  margin-right: auto;
  margin-left: auto;
  padding: 15px;
  border: 1px solid rgba(100, 129, 127, 0.12);
  border-radius: 21px;
  color: #526364;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 10px 32px rgba(43, 65, 66, 0.06);
  text-align: left;
  backdrop-filter: blur(12px);
}

.target-choice__heading {
  display: flex;
  margin: 0 2px 11px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #506362;
  font-size: 11px;
  font-weight: 720;
}

.target-choice__status {
  overflow: hidden;
  color: #79908d;
  font-size: 10px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-choice__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.target-choice__loading {
  grid-column: 1 / -1;
  padding: 18px 12px;
  border: 1px dashed #d8e4e2;
  border-radius: 14px;
  color: #8a9a99;
  text-align: center;
}

.ipa-option {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 64px;
  padding: 11px 34px 11px 11px;
  align-items: center;
  gap: 10px;
  border: 1px solid #dfe9e7;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease,
    transform 160ms ease;
}

.ipa-option:hover {
  border-color: #b9d8d0;
  transform: translateY(-1px);
}

.ipa-option.is-selected {
  border-color: #68b7a3;
  background: #f4fcf8;
  box-shadow: 0 7px 20px rgba(55, 145, 121, 0.11);
}

.ipa-option:has(input:focus-visible) {
  outline: 3px solid rgba(55, 167, 141, 0.2);
  outline-offset: 2px;
}

.ipa-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ipa-option__icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: linear-gradient(145deg, #405462, #1e2c33);
  box-shadow: 0 6px 14px rgba(30, 44, 51, 0.13);
  font-size: 13px;
  font-weight: 800;
}

.ipa-option__copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.ipa-option__copy b {
  overflow: hidden;
  color: #334647;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ipa-option__copy span {
  overflow: hidden;
  color: #879796;
  font-size: 9px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ipa-option__check {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1.5px solid #cbd8d6;
  border-radius: 50%;
  background: white;
  transition: border-color 160ms ease, background 160ms ease;
}

.ipa-option__check svg {
  width: 12px;
  fill: none;
  stroke: white;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0;
}

.ipa-option.is-selected .ipa-option__check {
  border-color: #38a78d;
  background: #38a78d;
}

.ipa-option.is-selected .ipa-option__check svg {
  opacity: 1;
}

.ipa-option:has(input:disabled) {
  cursor: wait;
  opacity: 0.68;
}

.unsigned-download {
  display: flex;
  width: min(100%, 590px);
  margin: 15px auto 0;
  padding: 9px 10px 9px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(100, 129, 127, 0.1);
  border-radius: 17px;
  color: #7d8d8c;
  background: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  line-height: 1.5;
  text-align: left;
  backdrop-filter: blur(12px);
}

.unsigned-download__copy b {
  display: block;
  color: #526363;
  font-size: 12px;
  font-weight: 680;
}

.unsigned-download__button {
  display: inline-flex;
  height: 39px;
  flex: 0 0 auto;
  padding: 0 14px;
  align-items: center;
  gap: 7px;
  border: 1px solid #d5e7e2;
  border-radius: 12px;
  color: #287463;
  background: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 680;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.unsigned-download__button:hover {
  border-color: #a9d4c9;
  box-shadow: 0 7px 18px rgba(42, 118, 99, 0.1);
  transform: translateY(-1px);
}

.unsigned-download__button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sign-card {
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.field-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.field-heading > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.field-heading__step {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: var(--mint-deep);
  background: #e0f4ee;
  font-size: 10px;
  font-weight: 800;
}

.field-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.field-heading__hint {
  color: #91a09f;
  font-size: 11px;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.dropzone {
  position: relative;
  display: flex;
  min-height: 208px;
  padding: 22px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1.5px dashed #dfe6e6;
  border-radius: 22px;
  background: rgba(252, 254, 254, 0.68);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.dropzone--profile {
  border-color: #74cbb9;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: #57b49f;
  background: rgba(239, 250, 247, 0.96);
  transform: translateY(-2px);
}

.dropzone.has-file {
  border-style: solid;
  border-color: #74cbb9;
  background: linear-gradient(145deg, rgba(239, 251, 247, 0.96), rgba(250, 254, 253, 0.96));
}

.document-icon {
  position: relative;
  display: block;
  width: 58px;
  height: 70px;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 8px 8px 10px 10px;
  background: #eff8f7;
  box-shadow: 0 10px 25px rgba(58, 91, 91, 0.1);
}

.document-icon::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  border-radius: 0 0 0 7px;
  background: rgba(112, 180, 169, 0.34);
  content: "";
}

.document-icon span {
  position: absolute;
  top: 18px;
  left: 13px;
  width: 25px;
  height: 3px;
  border-radius: 4px;
  background: #b9cecb;
  box-shadow: 0 8px 0 #ccdcda, 0 16px 0 #ccdcda;
}

.document-icon b {
  position: absolute;
  right: 8px;
  bottom: 7px;
  left: 8px;
  padding: 5px 2px 4px;
  border-radius: 6px;
  color: white;
  background: #24a68e;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.document-icon--profile b {
  background: #5e9fc5;
}

.dropzone__title {
  color: #3f4c4d;
  font-size: 15px;
  font-weight: 680;
}

.dropzone__hint {
  margin-top: 5px;
  color: #9ba7a7;
  font-size: 11px;
}

.dropzone__file {
  display: none;
  max-width: 100%;
  margin-top: 9px;
  overflow: hidden;
  color: var(--mint-deep);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropzone.has-file .dropzone__file {
  display: block;
}

.password-field {
  display: flex;
  height: 54px;
  margin-top: 18px;
  padding: 0 15px;
  align-items: center;
  border: 1px solid #dfe8e7;
  border-radius: 17px;
  background: rgba(250, 253, 253, 0.9);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.password-field:focus-within {
  border-color: #75b8aa;
  box-shadow: 0 0 0 4px rgba(76, 165, 147, 0.1);
}

.password-field__icon,
.password-field__toggle {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  padding: 0;
  place-items: center;
  border: 0;
  color: #93a3a2;
  background: transparent;
}

.password-field__icon svg,
.password-field__toggle svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.password-field input {
  width: 100%;
  height: 100%;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.password-field input::placeholder {
  color: #a8b3b2;
}

.password-field__toggle {
  cursor: pointer;
}

.form-note {
  display: flex;
  margin: 14px 2px 0;
  align-items: flex-start;
  gap: 8px;
  color: #879594;
  font-size: 11px;
  line-height: 1.55;
}

.form-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: #5ba995;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.sign-button {
  position: relative;
  display: flex;
  width: 100%;
  height: 58px;
  margin-top: 23px;
  padding: 0 24px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  color: white;
  background: linear-gradient(145deg, #ffc83e, #f3ae08);
  box-shadow: 0 13px 28px rgba(241, 174, 15, 0.22);
  font-size: 15px;
  font-weight: 740;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.sign-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 17px 32px rgba(241, 174, 15, 0.29);
}

.sign-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  box-shadow: none;
}

.sign-button.is-loading {
  pointer-events: none;
}

.sign-button__arrow {
  position: absolute;
  right: 23px;
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sign-button__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.sign-button.is-loading .sign-button__spinner {
  display: block;
}

.sign-button.is-loading .sign-button__arrow {
  display: none;
}

.progress-panel {
  margin-top: 18px;
  padding: 16px 17px;
  border: 1px solid #e5eeed;
  border-radius: 16px;
  background: rgba(248, 252, 251, 0.8);
}

.progress-panel__row {
  display: flex;
  margin-bottom: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-panel__row > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.progress-panel__label {
  color: #4d5e5e;
  font-size: 12px;
  font-weight: 650;
}

.progress-panel__percent {
  color: #78908d;
  font-size: 10px;
}

.progress-panel__stage {
  color: #8c9d9b;
  font-size: 10px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6eeed;
}

.progress-track__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6bc5b0, #38a78d);
  transition: width 260ms ease;
}

.result-panel {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #cceade;
  border-radius: 20px;
  background: linear-gradient(145deg, #f4fcf8, #fbfefd);
  animation: rise 400ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.result-panel__success {
  display: flex;
  align-items: center;
  gap: 13px;
}

.result-panel__check {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: #42ae90;
  box-shadow: 0 9px 22px rgba(65, 173, 143, 0.2);
}

.result-panel__check svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.result-panel h3,
.error-panel h3 {
  margin: 0;
  font-size: 15px;
}

.result-panel p,
.error-panel p {
  margin: 4px 0 0;
  color: #7b8c89;
  font-size: 11px;
  line-height: 1.5;
}

.install-button,
.download-button {
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 680;
  text-decoration: none;
}

.install-button {
  margin-top: 16px;
  color: white;
  background: #157f98;
  box-shadow: 0 10px 24px rgba(21, 127, 152, 0.2);
}

.download-button {
  height: 44px;
  margin-top: 10px;
  border: 1px solid #cce4dd;
  color: #39776b;
  background: rgba(255, 255, 255, 0.72);
}

.install-button svg,
.download-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.install-hint {
  margin: 8px 4px 0;
  color: #7b8c89;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.again-button {
  display: block;
  margin: 12px auto 0;
  padding: 4px 8px;
  border: 0;
  color: #80908e;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.error-panel {
  display: flex;
  margin-top: 18px;
  padding: 17px;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #f0d3d3;
  border-radius: 16px;
  background: #fff7f7;
  animation: rise 300ms ease;
}

.error-panel[hidden],
.result-panel[hidden],
.progress-panel[hidden] {
  display: none;
}

.error-panel__icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 9px;
  color: white;
  background: #d36464;
  font-size: 13px;
  font-weight: 800;
}

.error-panel h3 {
  color: #a53e3e;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 26px 0 0;
  overflow: hidden;
  border: 1px solid rgba(215, 227, 225, 0.72);
  border-radius: 18px;
  background: rgba(219, 230, 228, 0.74);
}

.trust-row > div {
  display: flex;
  min-height: 74px;
  padding: 15px 18px;
  align-items: center;
  gap: 10px;
  color: #879391;
  background: rgba(250, 252, 251, 0.88);
  font-size: 10px;
  line-height: 1.45;
}

.trust-row svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: #61a695;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.trust-row b {
  display: block;
  color: #52625f;
  font-size: 11px;
  font-weight: 700;
}

footer {
  display: flex;
  padding: 22px 4px 0;
  justify-content: space-between;
  gap: 15px;
  color: #9ba7a5;
  font-size: 10px;
}

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 24px, 560px);
    padding-top: 20px;
  }

  .brand__mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .brand__mark svg {
    width: 34px;
  }

  .brand__title {
    font-size: 16px;
  }

  .local-badge {
    padding: 7px 10px;
    font-size: 10px;
  }

  .hero {
    padding: 56px 4px 28px;
  }

  .hero h1 {
    font-size: clamp(36px, 12vw, 48px);
  }

  .hero p {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.7;
  }

  .password-field input {
    font-size: 16px;
  }

  .target-choice {
    margin-top: 20px;
    padding: 11px;
  }

  .ipa-option {
    min-height: 60px;
    padding: 9px 28px 9px 9px;
    gap: 8px;
  }

  .ipa-option__icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 9px;
  }

  .ipa-option__copy b {
    font-size: 11px;
  }

  .ipa-option__copy span {
    font-size: 8px;
  }

  .ipa-option__check {
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
  }

  .unsigned-download {
    padding: 13px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .unsigned-download__button {
    width: 100%;
    justify-content: center;
  }

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

  .field-heading {
    margin-bottom: 16px;
  }

  .field-heading__hint {
    display: none;
  }

  .upload-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dropzone {
    min-height: 162px;
    padding: 17px;
    border-radius: 19px;
  }

  .document-icon {
    width: 49px;
    height: 59px;
    margin-bottom: 12px;
  }

  .document-icon span {
    top: 15px;
    left: 11px;
    width: 21px;
    box-shadow: 0 7px 0 #ccdcda, 0 14px 0 #ccdcda;
  }

  .document-icon b {
    padding: 4px;
    font-size: 10px;
  }

  .sign-button {
    height: 55px;
  }

  .trust-row {
    grid-template-columns: 1fr;
  }

  .trust-row > div {
    min-height: 58px;
  }

  footer {
    flex-direction: column;
    gap: 4px;
  }
}

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