:root {
  color-scheme: light;
  --navy: #0f2b4a;
  --navy-deep: #091d32;
  --gold: #f59e0b;
  --paper: #f3f5f7;
  --panel: #ffffff;
  --ink: #17283a;
  --muted: #687789;
  --line: #d8e0e8;
  --green: #0e4a31;
  --public: #a66f0a;
  --widget: #304f89;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(15, 43, 74, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 43, 74, .035) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.login-mast {
  min-height: 90px;
  padding: 15px clamp(22px, 4vw, 66px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: var(--navy);
  color: white;
  border-bottom: 3px solid var(--gold);
}
.login-brand { display: flex; align-items: center; gap: 15px; }
.login-brand img {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 11px;
  object-fit: contain;
  filter: drop-shadow(0 5px 13px rgba(0,0,0,.2));
}
.login-brand span { display: grid; gap: 4px; }
.login-brand b {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  letter-spacing: .015em;
}
.login-brand small,
.security-state {
  color: #c1cfdb;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.security-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.security-state i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #49b98a;
  box-shadow: 0 0 0 4px rgba(73,185,138,.14);
}

.login-layout {
  width: min(1420px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(58px, 7vh, 90px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
  align-items: center;
  gap: clamp(70px, 9vw, 150px);
}
.login-intro { min-width: 0; }
.login-eyebrow {
  margin: 0 0 18px;
  color: #8a6210;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.login-intro h1 {
  max-width: 690px;
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(44px, 5.2vw, 76px);
  font-weight: 650;
  letter-spacing: -.045em;
  line-height: .98;
}
.login-lead {
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.product-register {
  width: 100%;
  max-width: 690px;
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.register-entry {
  --accent: var(--navy);
  min-width: 0;
  min-height: 78px;
  padding: 15px 18px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, white);
  border-left: 4px solid var(--accent);
  border-radius: 4px 12px 12px 4px;
  background: rgba(255,255,255,.78);
}
.register-entry.ra { --accent: var(--green); }
.register-entry.public { --accent: var(--public); }
.register-entry.widget { --accent: var(--widget); }
.register-entry > span {
  color: color-mix(in srgb, var(--accent) 58%, white);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}
.register-entry div { min-width: 0; display: grid; gap: 4px; }
.register-entry b {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1;
}
.register-entry small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.credential-panel {
  position: relative;
  padding: clamp(34px, 4vw, 52px);
  border: 1px solid #cbd6e0;
  border-radius: 3px 22px 22px 22px;
  background: var(--panel);
  box-shadow: 0 34px 80px -50px rgba(9,29,50,.65);
}
.credential-panel::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: -1px;
  height: 6px;
  border-radius: 0 0 21px 21px;
  background: var(--navy);
}
.panel-kicker {
  position: absolute;
  left: -1px;
  top: -34px;
  min-width: 230px;
  height: 34px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #cbd6e0;
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
  background: #e9eef4;
  color: var(--navy);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.panel-kicker b { color: #8a6210; font-family: var(--mono); }
.credential-panel h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(31px, 3vw, 43px);
  font-weight: 650;
  letter-spacing: -.03em;
}
.credential-panel > p {
  margin: 14px 0 30px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

form { display: grid; }
label {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid #c8d3de;
  border-radius: 10px;
  outline: 0;
  background: #f9fbfc;
  color: var(--ink);
  font-size: 15px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:focus {
  border-color: var(--navy);
  background: white;
  box-shadow: 0 0 0 4px rgba(15,43,74,.09);
}
input[aria-invalid="true"] {
  border-color: #a73737;
  box-shadow: 0 0 0 4px rgba(167,55,55,.08);
}
label[for="password"] { margin-top: 20px; }
.confirm-label { margin-top: 20px; }
.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}
.password-field { position: relative; }
.password-field input { padding-right: 86px; }
.password-field button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.password-field button:hover,
.password-field button:focus-visible {
  background: #e9eef4;
  color: var(--navy);
  outline: none;
}
.login-status {
  min-height: 21px;
  margin: 12px 0 8px;
  color: #a73737;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}
.login-status.pending { color: var(--muted); }
.login-submit {
  min-height: 54px;
  padding: 0 17px 0 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 11px;
  background: var(--navy);
  color: white;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 3px 0 var(--gold), 0 14px 28px -22px rgba(9,29,50,.8);
  transition: transform .16s ease, background .16s ease;
}
.login-submit:hover { transform: translateY(-2px); background: #143b64; }
.login-submit:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.login-submit:disabled { cursor: wait; opacity: .7; transform: none; }
.login-submit i { font-style: normal; font-size: 20px; }

.privacy-note {
  margin-top: 28px;
  padding-top: 22px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 11px;
  border-top: 1px solid var(--line);
}
.privacy-note > span { color: var(--gold); font-size: 11px; }
.privacy-note p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}
.privacy-note b { color: var(--ink); }

.activation-terms {
  margin-top: 24px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f6f8fa;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.activation-terms summary {
  color: var(--navy);
  font-weight: 800;
  cursor: pointer;
}
.activation-terms ol { margin: 12px 0 0; padding-left: 18px; }
.activation-terms li + li { margin-top: 5px; }
.terms-consent {
  margin: 16px 0 4px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.terms-consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
}

.login-foot {
  width: min(1420px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 26px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 980px) {
  .login-layout {
    width: min(720px, calc(100% - 32px));
    grid-template-columns: 1fr;
    align-items: start;
    gap: 82px;
  }
  .login-intro h1 { max-width: 620px; font-size: clamp(42px, 10vw, 66px); }
  .credential-panel { width: 100%; min-width: 0; }
  .login-foot { width: min(720px, calc(100% - 32px)); }
}

@media (max-width: 560px) {
  .login-mast { min-height: 76px; padding: 12px 16px; }
  .login-brand { gap: 11px; }
  .login-brand img { width: 48px; height: 48px; flex-basis: 48px; border-radius: 9px; }
  .login-brand b { font-size: 20px; }
  .login-brand small { font-size: 8.5px; letter-spacing: .12em; }
  .security-state { font-size: 0; }
  .login-layout { padding: 54px 0 64px; gap: 76px; }
  .login-intro h1 { overflow-wrap: anywhere; font-size: clamp(38px, 12vw, 52px); }
  .login-lead { font-size: 14px; }
  .product-register { grid-template-columns: 1fr; margin-top: 34px; }
  .credential-panel { padding: 32px 22px 36px; border-radius: 3px 17px 17px 17px; }
  .credential-panel::before { border-radius: 0 0 16px 16px; }
  .login-foot { flex-direction: column; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
