/* ==========================================================================
   gateway.css — 登录 / 注册 / 建档 / 发起决策 全屏引导
   ========================================================================== */

.gateway {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: minmax(320px, 42%) minmax(0, 1fr);
  background: var(--bg);
  overflow-y: auto;
}

body[data-gateway="open"] .app {
  filter: blur(1px);
  pointer-events: none;
}

.gw-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 34px 38px;
  background: radial-gradient(120% 90% at 0% 0%, #16345c 0%, var(--navy) 55%, #081426 100%);
  color: var(--nav-text);
  overflow: hidden;
}

.gw-aside::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -140px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 1px solid rgba(200, 161, 90, 0.28);
  box-shadow: 0 0 0 40px rgba(200, 161, 90, 0.04), 0 0 0 80px rgba(200, 161, 90, 0.025);
  pointer-events: none;
}

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

.gw-brand .brand-mark {
  width: 34px;
  height: 34px;
  font-size: 18px;
}

.gw-brand strong {
  display: block;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.gw-brand small {
  display: block;
  font-size: 10.5px;
  color: var(--gold-soft);
  letter-spacing: 0.08em;
  margin-top: 1px;
}

.gw-pitch {
  margin-top: 18px;
}

.gw-pitch h1 {
  font-size: 27px;
  line-height: 1.45;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #fff;
}

.gw-pitch p {
  margin-top: 12px;
  font-size: 12px;
  color: var(--nav-text-dim);
  letter-spacing: 0.04em;
}

.gw-points {
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #c9d4e5;
  max-width: 430px;
}

.gw-points li {
  position: relative;
  padding-left: 18px;
}

.gw-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 161, 90, 0.16);
}

.gw-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--nav-text-dim);
  padding-top: 18px;
  border-top: 1px solid var(--nav-line);
}

.gw-foot code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-soft);
  background: rgba(200, 161, 90, 0.12);
  border: 1px solid rgba(200, 161, 90, 0.28);
  border-radius: 4px;
  padding: 1px 6px;
}

.gw-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 24px;
}

.gw-card {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  border-top: 3px solid var(--gold);
  padding: 22px 24px 20px;
}

.gw-card-head h2 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.gw-card-head p {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 3px;
  line-height: 1.55;
}

.gw-error {
  margin-top: 12px;
  padding: 8px 11px;
  border-radius: 7px;
  background: var(--danger-soft);
  border: 1px solid rgba(180, 69, 60, 0.3);
  color: #7d2b25;
  font-size: 12px;
  line-height: 1.55;
}

.gw-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.gw-form--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 12px;
}

.gw-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

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

.gw-field > span {
  font-size: 11.5px;
  color: var(--text-2);
  font-weight: 550;
}

.gw-field > span b {
  color: var(--danger);
  font-weight: 700;
}

.gw-field input,
.gw-field select,
.gw-field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  padding: 7px 9px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

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

.gw-field input:focus,
.gw-field select:focus,
.gw-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-wash);
}

.gw-field input::placeholder,
.gw-field textarea::placeholder {
  color: var(--text-3);
}

.gw-field em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--text-3);
  line-height: 1.45;
}

.gw-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 10px;
}

.gw-submit {
  margin-top: 2px;
  padding: 9px 14px;
  font-size: 13px;
}

.gw-submit[data-busy="true"] {
  opacity: 0.7;
  cursor: progress;
}

.gw-alt {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.gw-consent {
  margin-top: 12px;
  font-size: 10.5px;
  color: var(--text-3);
  line-height: 1.55;
}

.gw-context {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 7px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
  color: var(--text-3);
}

.gw-context b {
  color: var(--text);
  font-weight: 600;
}

.gw-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--text-2);
}

.gw-errorbox {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--danger-soft);
  border: 1px solid rgba(180, 69, 60, 0.28);
  color: #7d2b25;
  font-size: 12px;
  line-height: 1.65;
}

.gw-errorbox code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.6);
  padding: 1px 5px;
  border-radius: 3px;
}

.gw-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.gw-legal {
  font-size: 10px;
  color: var(--text-3);
  text-align: center;
  max-width: 560px;
  line-height: 1.6;
}

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

  .gw-aside {
    gap: 14px;
    padding: 20px 22px;
  }

  .gw-pitch {
    margin-top: 4px;
  }

  .gw-pitch h1 {
    font-size: 20px;
  }

  .gw-points,
  .gw-foot {
    display: none;
  }

  .gw-main {
    justify-content: flex-start;
    padding: 18px 14px 40px;
  }

  .gw-card {
    padding: 18px 16px 16px;
  }

  .gw-form--grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gw-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
