:root {
  color-scheme: dark;
  --chrome: #151c27;
  --bg: #192536;
  --ink: #f1f5fa;
  --muted: #b4c1d1;
  --line: #425369;
  --field: #1a2534;
  --accent: #80c3ff;
  --error: #ffb6a9;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: radial-gradient(ellipse at 76% 20%, #223d58 0, var(--bg) 46%, #141d29 100%);
  color: var(--ink);
}

a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.header {
  background: var(--chrome);
  border-bottom: 1px solid #304054;
}

.header-inner, .layout {
  width: min(100% - 36px, 960px);
  margin-inline: auto;
}

.header-inner {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand, .login-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.brand { gap: 9px; font-size: 19px; letter-spacing: .04em; }
.brand img { flex: none; filter: hue-rotate(132deg) saturate(.82); }
.login-link { padding-inline: 4px; color: var(--accent); font-size: 14px; }
.login-link:hover { text-decoration: underline; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 406px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 5vw, 72px);
  padding-block: clamp(48px, 8vh, 88px) 48px;
}

.signup { min-width: 0; }
h1 {
  margin: 0 0 25px;
  font-size: clamp(29px, 5vw, 42px);
  line-height: 1.16;
  letter-spacing: -.045em;
  font-weight: 680;
}

.art {
  display: grid;
  place-items: center;
  align-self: center;
  min-height: 310px;
  isolation: isolate;
  overflow: hidden;
}

.art span {
  grid-area: 1 / 1;
  width: clamp(125px, 20vw, 226px);
  aspect-ratio: 1.24;
  border: 1px solid #547b9d;
  background: linear-gradient(145deg, #6da8dd16, #345b7e06 74%);
  transform: skewY(-13deg) translate(-23%, 13%);
}

.art span:nth-child(2) { border-color: #658eb2; transform: skewY(-13deg) translate(0, 0); }
.art span:nth-child(3) { border-color: #7aabc9; transform: skewY(-13deg) translate(23%, -13%); }

form { display: grid; gap: 17px; }
.field { min-width: 0; }
label {
  display: block;
  margin-bottom: 7px;
  color: #d7e4f3;
  font-size: 14px;
  font-weight: 640;
}

input, .phone-field, .password-field, .secondary {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--field);
  color: var(--ink);
}

input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0 12px;
  font-size: 16px;
}

input::placeholder { color: #a4b3c6; opacity: 1; }
input[aria-invalid="true"] { border-color: var(--error); }
.phone-field:has(input[aria-invalid="true"]), .password-field:has(input[aria-invalid="true"]) { border-color: var(--error); }

.phone-field, .password-field, .code-row {
  display: grid;
  align-items: stretch;
}

.phone-field { grid-template-columns: auto minmax(0, 1fr); }
.code-row, .password-field { grid-template-columns: minmax(0, 1fr) auto; }
.code-row { gap: 8px; }
.phone-field span {
  align-self: center;
  padding-inline: 12px;
  border-right: 1px solid var(--line);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.phone-field input, .password-field input { border: 0; border-radius: 0; background: transparent; }
.phone-field:has(input:focus-visible), .password-field:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.phone-field input:focus-visible, .password-field input:focus-visible { outline: none; }

.secondary {
  min-width: 108px;
  min-height: 50px;
  padding-inline: 10px;
  color: #b2d9ff;
  background: #24394f;
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.secondary:hover:enabled { background: #2b4964; }
.secondary:disabled { color: #9fb1c8; background: #233143; }
.password-field button {
  min-width: 52px;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: #b2d9ff;
  padding-inline: 10px;
  font-size: 13px;
}

.password-field button:focus-visible { outline-offset: -4px; }
.primary {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 52px;
  margin-top: 3px;
  padding: 10px 12px;
  border: 1px solid #5a9de8;
  border-radius: 3px;
  background: linear-gradient(105deg, #2868b7, #1c559c);
  color: #f8fbff;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
}

.primary:hover:not(:disabled) { background: #2b6dbd; }
.primary:disabled { border-color: #496381; background: #344b67; color: #d0ddec; }
.notice, .message, .demo-note, .success-copy { font-size: 13px; line-height: 1.6; }
.notice {
  margin: 0 0 16px;
  padding: 9px 11px;
  border-left: 2px solid var(--accent);
  background: #22354b;
  color: #d2e5f8;
}

.field .notice { margin: 7px 0 0; }
.message { margin: 6px 0 0; color: #bed9f4; }
form > .message { margin-top: -8px; }
.message:empty { display: none; }
.message[data-error="true"] { color: var(--error); }
.demo-note, .success-copy { margin: 12px 0; color: var(--muted); }

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(10px, 3vw, 24px);
  white-space: nowrap;
}

.privacy { position: relative; }
.privacy summary {
  display: grid;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
  cursor: pointer;
}
.privacy summary::-webkit-details-marker { display: none; }
.privacy summary:hover { text-decoration: underline; }
.privacy p {
  position: absolute;
  z-index: 1;
  inset-block-start: 100%;
  inset-inline-end: -28px;
  width: min(320px, 100vw - 72px);
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--chrome);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  white-space: normal;
}


@media (max-width: 720px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding-block: 30px 24px; }
  .signup { width: min(100%, 420px); margin-inline: auto; }
  .art { display: none; }
  h1 { margin-bottom: 20px; }
}

@media (max-width: 305px) {
  .code-row { grid-template-columns: minmax(0, 1fr); }
}
