:root {
  color-scheme: light;
  --navy: #172c43;
  --paper: #ffffff;
  --ground: #f3f6f8;
  --teal: #146b66;
  --muted: #536579;
  --line: #ccd5df;
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--navy);
  background: var(--ground);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: var(--teal); text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 1; padding: 12px; background: var(--paper); }
.skip-link:focus { top: 12px; }
.masthead { background: var(--paper); border-top: 4px solid var(--navy); border-bottom: 1px solid var(--line); }
.masthead-inner { max-width: 1040px; min-height: 84px; padding: 16px 32px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: baseline; gap: 12px; white-space: nowrap; font-size: 15px; font-weight: 600; }
.wordmark { font-size: 29px; font-weight: 750; letter-spacing: -1.3px; line-height: 1; }
.domain { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.gateway { width: min(100% - 40px, 472px); margin: clamp(32px, 9vh, 96px) auto 40px; padding: 36px 36px 24px; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--teal); border-radius: 6px; }
.heading { margin-bottom: 28px; }
h1 { margin: 0 0 10px; font-size: 27px; line-height: 1.35; font-weight: 650; letter-spacing: -.5px; }
.heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.field { margin-bottom: 20px; }
.field label, .field-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.field input { display: block; width: 100%; min-height: 48px; padding: 11px 13px; color: var(--navy); background: var(--paper); border: 1px solid #9aaabd; border-radius: 4px; line-height: 1.5; font-size: 16px; }
.field input:hover { border-color: var(--muted); }
.field input:focus { border-color: var(--teal); }
.field input[aria-invalid="true"] { border-color: #aa3836; }
.field input:disabled { color: var(--muted); background: var(--ground); }
.hint { margin: 8px 0 0; font-size: 13px; line-height: 1.65; color: var(--muted); }
.account { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.account .field-label { flex-shrink: 0; margin: 0; color: var(--muted); }
.account strong { text-align: right; overflow-wrap: anywhere; font-size: 15px; }
.reveal { display: flex; align-items: center; gap: 9px; width: fit-content; min-height: 44px; margin: -6px 0 14px; color: var(--muted); font-size: 14px; cursor: pointer; }
.reveal input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); }
.primary-button, .secondary-button { width: 100%; min-height: 48px; padding: 12px 18px; border-radius: 4px; font-weight: 600; font-size: 15px; cursor: pointer; }
.primary-button { border: 1px solid var(--teal); color: var(--paper); background: var(--teal); }
.primary-button:hover:not(:disabled) { background: #105752; }
.primary-button:disabled { opacity: .7; cursor: wait; }
.secondary-button { color: var(--navy); background: var(--paper); border: 1px solid var(--line); }
.secondary-button:hover { background: var(--ground); }
.notice, .error { margin: 0 0 22px; padding: 12px 14px; border-radius: 3px; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.notice { background: #edf6f4; color: #175954; border-left: 3px solid var(--teal); }
.error { background: #fff2f1; color: #8e2e2a; border-left: 3px solid #aa3836; }
.back-link { display: block; width: fit-content; margin: 16px auto 0; padding: 10px 6px; font-size: 14px; }
.gateway-footer { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 480px) {
  .masthead-inner { min-height: 76px; padding: 16px 20px; flex-wrap: wrap; gap: 8px 20px; }
  .domain { font-size: 12px; }
  .gateway { margin-top: 32px; padding: 28px 22px 22px; }
  h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
