:root {
  color-scheme: light;
  --auth-forest: #153b31;
  --auth-ink: #18372f;
  --auth-muted: #6e8076;
  --auth-orange: #ec4714;
  --auth-line: #dfe7df;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  color: var(--auth-ink);
  background: #f8faf6;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.site-header--login { flex: none; }
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(440px, .92fr);
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px);
}

.auth-story {
  position: relative;
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  padding: 30px clamp(38px, 5vw, 90px) 24px;
  isolation: isolate;
  color: #f5f8f1;
  background:
    radial-gradient(circle at 68% 56%, rgba(73, 140, 111, .25), transparent 39%),
    radial-gradient(circle at 3% 100%, rgba(15, 65, 48, .72), transparent 42%),
    linear-gradient(139deg, #173e34 0%, #0d2d27 100%);
}
.auth-story__grain {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .25;
  background-image: radial-gradient(rgba(236, 246, 232, .32) .55px, transparent .55px);
  background-size: 17px 17px;
  mask-image: linear-gradient(160deg, transparent 10%, #000 70%);
}
.auth-story__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.auth-eyebrow, .auth-story__index, .auth-panel__kicker {
  color: #a8cab0;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .19em;
  line-height: 1.5;
}
.auth-story__live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #bdd7c2;
  font-size: 11px;
  white-space: nowrap;
}
.auth-story__live > span:first-child, .auth-access__footer-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #65c58a;
  box-shadow: 0 0 0 4px rgba(101, 197, 138, .12);
}
.auth-story__message { position: relative; z-index: 2; margin-top: clamp(30px, 5.2vh, 68px); }
.auth-story__index { color: #f09270; }
.auth-story h1 {
  margin: 14px 0 14px;
  font-size: clamp(38px, 3.7vw, 61px);
  font-weight: 600;
  letter-spacing: -.066em;
  line-height: 1.08;
}
.auth-story h1 em { color: #d2e6d0; font-style: normal; }
.auth-story__message p {
  max-width: 450px;
  margin: 0;
  color: #bbd0c2;
  font-size: clamp(15px, 1.13vw, 18px);
  line-height: 1.65;
}
/* Chinese lead sentence is longer than the English; drop the 450px cap so it stays one line. */
html[lang="zh-CN"] .auth-story__message p {
  max-width: min(100%, 36em);
}
.auth-preview {
  position: relative;
  display: flex;
  width: min(100%, 760px);
  flex: 1 1 auto;
  min-height: 220px;
  max-height: 450px;
  flex-direction: column;
  overflow: hidden;
  margin: 23px auto 18px;
  border: 1px solid rgba(221, 239, 222, .26);
  border-radius: 16px;
  background: #e9efe7;
  box-shadow: 0 20px 48px rgba(1, 23, 17, .28);
}
.auth-preview__bar, .auth-preview__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 35px;
  padding: 0 13px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  white-space: nowrap;
}
.auth-preview__bar { color: #4d6758; background: #f6faf5; }
.auth-preview__bar-status { margin-left: auto; color: #688677; }
.auth-preview__dots { display: flex; gap: 4px; }
.auth-preview__dots i { width: 6px; height: 6px; border-radius: 50%; background: #c8d6ca; }
.auth-preview__dots i:first-child { background: #ed5426; }
.auth-preview__map {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  background: url("/img/home/connected-network.png") 0% 50% / 120% auto no-repeat #294a3d;
}
.auth-preview__map::before {
  position: absolute;
  inset: 0 0 0 auto;
  width: 22%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(17, 50, 39, .96) 48%, #113227);
}
.auth-preview__map::after { position: absolute; inset: 48% 0 0; content: ""; background: linear-gradient(transparent, rgba(8, 31, 23, .52)); }
.auth-preview__badge {
  position: absolute;
  z-index: 1;
  bottom: 15px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 8px;
  color: #274d39;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 5px 18px rgba(10, 24, 14, .12);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
}
.auth-preview__badge > span:first-child { color: #ed4d1c; font-size: 16px; letter-spacing: -.04em; }
.auth-preview__foot { justify-content: space-between; color: #587365; background: #f6faf5; }
.auth-preview__foot > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.auth-preview__foot i { width: 6px; height: 6px; border-radius: 50%; background: #39a76a; }
.auth-preview__foot > span:last-child { color: #e34b1c; }
.auth-story__footer {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-top: 14px;
  border-top: 1px solid rgba(211, 235, 215, .18);
  color: #a9c7b0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
}
.auth-story__footer i { width: 26px; height: 1px; background: #6b947a; }
.auth-story__footer-mark { margin-left: auto; color: #739e82; }

.auth-access {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 18px clamp(30px, 5vw, 88px);
  background:
    radial-gradient(circle at 94% 5%, #eaf2e8 0, transparent 38%),
    #f8faf6;
}
.auth-access__inner { width: min(100%, 480px); }
.auth-access__top { display: inline-flex; align-items: center; gap: 10px; color: #587164; font-size: 10px; font-weight: 750; letter-spacing: .17em; }
.auth-access__top b { color: #ee5525; }
.auth-access__seal { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #d8e5da; border-radius: 9px; background: #fff; }
.auth-access__seal img { width: 20px; height: 20px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 20px 0 22px;
  padding: 4px;
  border: 1px solid #e4ebe2;
  border-radius: 12px;
  background: #edf2eb;
}
.auth-tabs a { display: grid; min-height: 35px; place-items: center; border-radius: 8px; color: #718278; font-size: 13px; font-weight: 650; transition: color .18s, background .18s, box-shadow .18s; }
.auth-tabs a:hover { color: var(--auth-ink); }
html:not([data-auth-mode="register"]) #sign-in-tab,
html[data-auth-mode="register"] #register-tab { color: var(--auth-ink); background: #fff; box-shadow: 0 1px 8px rgba(22, 58, 44, .1); }
.auth-panel--register, .auth-panel--reset { display: none; }
html[data-auth-mode="register"] .auth-panel--login, html[data-auth-mode="reset"] .auth-panel--login { display: none; }
html[data-auth-mode="register"] .auth-panel--register { display: block; }
html[data-auth-mode="reset"] .auth-panel--reset { display: block; }
.auth-secondary { display: block; margin: 10px auto 0; border: 0; background: none; color: #dc4b20; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.auth-secondary[hidden], .auth-field-group[hidden], #resetDetails[hidden] { display: none; }
.auth-consent { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 12px; color: #718278; font-size: 11px; line-height: 1.45; }
.auth-consent input { flex: 0 0 auto; margin-top: 2px; }
.auth-consent[hidden] { display: none; }
.auth-panel__kicker { color: #d75228; }
.auth-panel h2 { margin: 8px 0 9px; color: #193e33; font-size: clamp(29px, 2.2vw, 36px); font-weight: 650; letter-spacing: -.055em; line-height: 1.13; }
.auth-panel--register h2 { white-space: nowrap; }
.auth-panel__lede { margin: 0 0 20px; color: var(--auth-muted); font-size: 13px; line-height: 1.5; }
.auth-field-group { margin-bottom: 11px; }
.auth-field-group label { display: block; margin-bottom: 5px; color: #324e40; font-size: 12px; font-weight: 700; }
.auth-field-group__heading { display: flex; justify-content: space-between; align-items: flex-start; }
.auth-forgot { color: #dc4b20; font-size: 12px; font-weight: 650; }
.auth-forgot:hover, .auth-panel__switch a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-field-group input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 17px;
  outline: none;
  border: 1px solid #d7e2d8;
  border-radius: 11px;
  color: #1c3d32;
  background: #fff;
  font-size: 14px;
  transition: border-color .16s, box-shadow .16s;
}
.auth-field-group input::placeholder { color: #9aa9a0; }
.auth-field-group input:focus { border-color: #eb683e; box-shadow: 0 0 0 4px rgba(236, 71, 20, .1); }
.auth-field-group input[aria-invalid="true"] { border-color: #d64b35; }
.auth-password-wrap { position: relative; }
.auth-password-wrap input { padding-right: 72px; }
.auth-password-toggle { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); padding: 5px; border: 0; color: #71847a; background: transparent; font-size: 12px; font-weight: 650; }
.auth-password-toggle:hover { color: var(--auth-orange); }
.auth-error { margin: 6px 1px 0; color: #ba3f2d; font-size: 12px; line-height: 1.4; }
.auth-error[hidden], .auth-form-status[hidden] { display: none; }
.auth-submit {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  padding: 0 20px;
  border: 1px solid #ec4714;
  border-radius: 10px;
  color: #fff;
  background: #ec4714;
  box-shadow: 0 12px 25px rgba(236, 71, 20, .17);
  font-size: 14px;
  font-weight: 750;
  text-align: left;
  transition: transform .16s, background .16s, box-shadow .16s;
}
.auth-submit:hover { transform: translateY(-2px); background: #d84114; box-shadow: 0 17px 31px rgba(236, 71, 20, .2); }
.auth-submit:disabled { cursor: pointer; opacity: .68; transform: none; }
.auth-submit.is-loading > span:last-child { display: none; }
.auth-submit.is-loading::after, .auth-secondary.is-loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: auth-button-spin .75s linear infinite;
}
.auth-secondary.is-loading::after { width: 12px; height: 12px; margin-left: 8px; vertical-align: middle; }
@keyframes auth-button-spin { to { transform: rotate(360deg); } }
.auth-submit > span:last-child { font-size: 21px; font-weight: 400; }
.auth-panel__switch { margin: 16px 0 0; color: #829289; font-size: 12px; text-align: center; }
.auth-panel__switch a { color: #dc4b20; font-weight: 700; }
.auth-form-status { margin: 10px 0 0; padding: 12px 14px; border-radius: 8px; color: #1d6944; background: #e6f5eb; font-size: 12px; line-height: 1.5; }
.auth-form-status.is-error { color: #ae3c2b; background: #fdf0ea; }
.auth-access__footer { display: flex; align-items: center; gap: 11px; margin-top: 26px; padding-top: 12px; border-top: 1px solid var(--auth-line); color: #89998e; font-size: 11px; }
.auth-access__footer-dot { width: 6px; height: 6px; }

@media (max-width: 1050px) {
  .auth-layout { grid-template-columns: minmax(0, .9fr) minmax(410px, 1.1fr); }
  .auth-story { padding-inline: 42px; }
  .auth-story__live { display: none; }
  .auth-preview__bar-status, .auth-preview__foot > span:last-child { display: none; }
}
@media (min-width: 761px) and (max-height: 820px) {
  .auth-access { padding-block: 12px; }
  .auth-tabs { margin: 12px 0; }
  .auth-panel__lede { margin-bottom: 14px; }
  .auth-field-group { margin-bottom: 8px; }
  .auth-submit { margin-top: 12px; }
  .auth-panel__switch { margin-top: 10px; }
  .auth-access__footer { display: none; }
  .auth-story__message { margin-top: 25px; }
  .auth-story h1 { font-size: clamp(35px, 3.4vw, 54px); }
  .auth-preview { min-height: 170px; margin-top: 14px; margin-bottom: 10px; }
}
@media (min-width: 761px) and (max-height: 740px) {
  .auth-field-group input { height: 40px; }
  .auth-panel__lede { margin-bottom: 10px; }
  .auth-story__message { margin-top: 15px; }
  .auth-story__message p { font-size: 14px; }
  .auth-preview { min-height: 145px; }
}
@media (max-width: 760px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-access { min-height: calc(100dvh - 72px); padding: 24px 28px; }
  .auth-access__inner { width: min(100%, 490px); }
  .auth-tabs { margin: 20px 0 22px; }
  .auth-access__footer { display: none; }
}
@media (max-width: 440px) {
  .auth-access { padding-inline: 22px; }
  .auth-panel h2 { font-size: 28px; }
  .auth-panel__lede { margin-bottom: 16px; }
}
@media (max-width: 360px) {
  .auth-panel--register h2 { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-tabs a, .auth-field-group input, .auth-submit { transition: none; }
}
