@font-face {
  font-family: InterLocal;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: MarcellusLocal;
  src: url('/fonts/marcellus-latin.woff2') format('woff2');
  font-display: swap;
}

:root {
  font-family: InterLocal, Arial, sans-serif;
  color: #0b1f3a;
  background: #edf0f1;
  font-synthesis: none;
  --navy: #0b1f3a;
  --navy-light: #153050;
  --gold: #c6a063;
  --gold-light: #d9bc83;
  --paper: #fffdf8;
  --line: #d7dcdf;
  --muted: #667085;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

body:not(.legal-body) {
  background: linear-gradient(120deg, var(--navy) 0 42%, #edf0f1 42%);
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

button,
input {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(198, 160, 99, .5);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, .72fr) minmax(440px, 1fr);
  align-items: center;
  gap: clamp(40px, 8vw, 140px);
  padding: clamp(32px, 7vw, 112px);
}

.login-context {
  max-width: 520px;
  color: #fff;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(198, 160, 99, .65);
  color: var(--gold-light);
  font-family: MarcellusLocal, Georgia, serif;
  font-size: 24px;
}

.eyebrow,
.step {
  display: block;
  margin-top: 48px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.login-context h1,
.login-panel h2,
.legal-intro h1,
.legal-card h2 {
  font-family: MarcellusLocal, Georgia, serif;
  font-weight: 400;
}

.login-context h1 {
  max-width: 8ch;
  margin: 15px 0 22px;
  font-size: clamp(46px, 6vw, 78px);
  line-height: .98;
}

.login-context > p {
  max-width: 44ch;
  margin: 0;
  color: #c3ccd7;
  font-size: 15px;
  line-height: 1.7;
}

.ownership-card {
  max-width: 390px;
  display: grid;
  gap: 5px;
  margin-top: 30px;
  padding: 18px 20px;
  border-left: 2px solid var(--gold);
  background: rgba(255, 255, 255, .07);
}

.ownership-card span,
.legal-owner span {
  color: var(--gold-light);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ownership-card strong {
  color: #fff;
  font-family: MarcellusLocal, Georgia, serif;
  font-size: 25px;
  font-weight: 400;
}

.ownership-card small {
  color: #c3ccd7;
  font-size: 11px;
  line-height: 1.5;
}

.security-note {
  max-width: 310px;
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.security-note > span {
  color: #6fa17f;
}

.security-note p {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #aeb9c5;
  font-size: 12px;
  line-height: 1.5;
}

.security-note strong {
  color: #fff;
}

.login-panel {
  width: min(100%, 580px);
  padding: clamp(30px, 5vw, 58px);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 28px 70px rgba(11, 31, 58, .12);
}

.login-panel .step {
  margin: 0;
  color: #7c5b24;
}

.login-panel h2 {
  margin: 12px 0 9px;
  font-size: 34px;
}

.login-panel > div > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

form {
  display: grid;
  gap: 24px;
  margin-top: 34px;
}

fieldset {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

legend,
.password-field > span {
  display: block;
  width: 100%;
  margin-bottom: 9px;
  color: #344055;
  font-size: 11px;
  font-weight: 800;
}

.identity-option {
  position: relative;
}

.identity-option input {
  position: absolute;
  opacity: 0;
}

.identity-option span {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid #d8dcdf;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.identity-option input:checked + span {
  border-color: var(--gold);
  background: #f7f3eb;
  box-shadow: inset 0 -2px var(--gold);
}

.identity-option input:focus-visible + span {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.identity-option strong {
  font-size: 14px;
}

.identity-option small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.password-field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #cbd0d5;
  background: #fff;
}

.password-field input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}

.error {
  margin: -8px 0 0;
  padding: 10px 12px;
  background: #fbefec;
  color: #8b493d;
  font-size: 12px;
  line-height: 1.45;
}

#login-button {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border: 0;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

#login-button:hover {
  background: var(--navy-light);
}

#login-button:disabled {
  cursor: wait;
  opacity: .68;
}

#login-button span {
  color: var(--gold-light);
  font-size: 20px;
}

.legal-links {
  display: flex;
  gap: 18px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.legal-links a {
  color: #6f5325;
  font-size: 11px;
  font-weight: 800;
}

.legal-body {
  background: #f4f5f4;
  color: #17243a;
}

.legal-topbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  text-decoration: none;
}

.legal-brand > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  color: #7c5b24;
  font-family: MarcellusLocal, Georgia, serif;
  font-size: 19px;
}

.legal-brand strong {
  font-family: MarcellusLocal, Georgia, serif;
  font-size: 18px;
  font-weight: 400;
}

.back-link {
  color: #6f5325;
  font-size: 11px;
  font-weight: 800;
}

.legal-shell {
  width: min(1180px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  margin: 0 auto;
  padding: 48px 0 80px;
}

.legal-intro {
  position: sticky;
  top: 24px;
  padding: 34px;
  background: var(--navy);
  color: #fff;
}

.legal-intro .eyebrow {
  margin: 0 0 18px;
}

.legal-intro h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(35px, 3.7vw, 48px);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.legal-intro > p {
  margin: 0;
  color: #c3ccd7;
  font-size: 13px;
  line-height: 1.7;
}

.legal-owner {
  display: grid;
  gap: 5px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.legal-owner strong {
  color: #fff;
  font-family: MarcellusLocal, Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}

.legal-card {
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 24px 60px rgba(11, 31, 58, .07);
}

.legal-card section {
  padding: 0 0 28px;
  margin: 0 0 28px;
  border-bottom: 1px solid #e3e5e6;
}

.legal-card section:last-of-type {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.legal-card h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 23px;
}

.legal-card p,
.legal-card li {
  color: #4d5968;
  font-size: 13px;
  line-height: 1.75;
}

.legal-card p {
  margin: 0 0 12px;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-card a {
  color: #6f5325;
  font-weight: 700;
}

.legal-card code {
  padding: 2px 5px;
  background: #eef0ef;
  color: var(--navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em;
}

.legal-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.legal-page-links a {
  color: #6f5325;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 820px) {
  body:not(.legal-body) {
    background: var(--navy);
  }

  .login-shell {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 30px 20px 52px;
  }

  .login-context h1 {
    font-size: 48px;
  }

  .login-context .eyebrow {
    margin-top: 30px;
  }

  .ownership-card,
  .security-note {
    max-width: none;
  }

  .login-panel {
    width: 100%;
    padding: 26px;
  }

  .login-panel h2 {
    font-size: 29px;
  }

  .legal-shell {
    grid-template-columns: 1fr;
    padding-top: 24px;
  }

  .legal-intro {
    position: static;
  }
}

@media (max-width: 460px) {
  fieldset {
    grid-template-columns: 1fr;
  }

  .login-shell {
    padding-inline: 12px;
  }

  .login-panel {
    padding: 22px;
  }

  .legal-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .legal-shell {
    width: min(100% - 24px, 1180px);
    padding-bottom: 48px;
  }

  .legal-intro,
  .legal-card {
    padding: 24px;
  }

  .legal-intro h1 {
    font-size: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
