:root {
  color-scheme: light;
  --accent-50: #E1F5EE;
  --accent-200: #5DCAA5;
  --accent-600: #0F6E56;
  --accent-800: #085041;
  --surface-page: #FAFAF9;
  --surface-card: #FFFFFF;
  --border: #E5E5E0;
  --text-primary: #1A1A18;
  --text-secondary: #6B6B66;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: var(--surface-page);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--surface-page);
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(29, 111, 113, 0.12);
  border-radius: 50%;
  content: "";
}

body::before {
  top: -9rem;
  right: 18%;
}

body::after {
  bottom: -11rem;
  left: 12%;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.68fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
  width: min(72rem, calc(100% - 3rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: 3rem 0 4.5rem;
}

.intro {
  max-width: 38rem;
  padding-left: clamp(0rem, 2vw, 1rem);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 1.25rem;
  border-radius: 9px;
  background: var(--accent-50);
  color: var(--accent-800);
}

.brand-mark svg {
  display: block;
  width: 20px;
  height: 20px;
}

.eyebrow,
.card-label {
  margin: 0 0 0.7rem;
  color: var(--accent-600);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.lead {
  max-width: 34rem;
  margin: 1.75rem 0 2rem;
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 2.2vw, 1.32rem);
  line-height: 1.55;
}

.modality-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.modality-list span {
  padding: 0.4rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent-50);
  color: var(--accent-600);
  font-size: 12px;
  font-weight: 500;
}

.login-card {
  width: min(100%, 22.5rem);
  justify-self: end;
  padding: clamp(1.6rem, 4vw, 2.35rem);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-card);
}

.lock-mark {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  margin-bottom: 1.15rem;
  border-radius: 8px;
  background: var(--accent-50);
  color: var(--accent-800);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
}

.card-copy {
  margin: 0.75rem 0 1.55rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.code-control {
  position: relative;
}

input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 6rem 0.75rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: var(--surface-card);
  color: var(--text-primary);
  font: inherit;
  letter-spacing: 0.04em;
  transition: border-color 150ms ease;
}

input:focus {
  border-color: var(--accent-200);
  box-shadow: none;
}

button {
  border: 0;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.show-code {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  background: transparent;
  color: var(--accent-600);
  font-size: 0.76rem;
  font-weight: 500;
  transform: translateY(-50%);
}

.submit {
  width: 100%;
  min-height: 3.2rem;
  margin-top: 0.9rem;
  border-radius: 8px;
  background: var(--accent-50);
  color: var(--accent-800);
  font-weight: 500;
  box-shadow: none;
}

.submit:hover {
  filter: none;
  background: color-mix(in srgb, var(--accent-50) 70%, var(--accent-200));
}

.submit:disabled {
  cursor: wait;
  opacity: 0.66;
}

.status {
  min-height: 1.3rem;
  margin: 0.7rem 0 0;
  color: #b13e3e;
  font-size: 0.82rem;
}

.status-ok {
  color: var(--accent-600);
}

[hidden] {
  display: none !important;
}

.auth-switch {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0;
  background: transparent;
  color: var(--accent-600);
  font-size: 0.84rem;
  font-weight: 500;
  text-align: left;
}

#loginName,
#loginEmail,
#resetPasswordConfirm {
  padding-right: 0.95rem;
  margin-bottom: 0.85rem;
  letter-spacing: 0;
}

#passwordBlock {
  margin-bottom: 0;
}

a.auth-switch {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--accent-600);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
}

.privacy-note {
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1.45;
}

.registration-agreements {
  margin: 0.8rem 0 1rem;
}

.agreement-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.55rem 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.agreement-row input {
  flex: none;
  width: 1rem;
  height: 1rem;
  min-height: 0;
  margin: 0.1rem 0 0;
  padding: 0;
}

.agreement-row a {
  color: var(--accent-600);
}

footer {
  position: fixed;
  left: clamp(1rem, 3vw, 1.5rem);
  bottom: 1rem;
  z-index: 1;
  color: var(--text-secondary);
  font-size: 0.72rem;
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .login-shell {
    grid-template-columns: 1fr;
    gap: 2.2rem;
    width: min(31rem, calc(100% - 2rem));
    min-height: auto;
    padding: 2rem 0 5rem;
  }

  .intro {
    padding: 0 0.4rem;
  }

  .login-card {
    justify-self: stretch;
    width: 100%;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    margin-bottom: 1rem;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 2.6rem);
  }

  .lead {
    margin: 1.15rem 0 1.35rem;
  }

  footer {
    position: static;
    width: calc(100% - 2rem);
    margin: 0 auto;
    padding: 0 1rem 1.2rem;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Approved calm registration and sign-in treatment; form behavior stays in login.js. */
:root {
  --accent-50: #e3f1e9;
  --accent-200: #8db8a4;
  --accent-600: #0b6249;
  --accent-800: #073b2e;
  --surface-page: #fbfaf5;
  --surface-card: #fffefb;
  --border: #e3e7df;
}

body {
  position: relative;
  isolation: isolate;
}

body::before {
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  border: 0;
  border-radius: 0;
  background: url('/assets/forest.png') center bottom / auto 120px repeat-x;
  opacity: 0.13;
  pointer-events: none;
}

body::after {
  display: none;
}

.login-shell {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.8fr);
  width: min(1180px, calc(100% - 48px));
  gap: clamp(36px, 6vw, 90px);
}

.intro {
  min-width: 0;
}

.brand-mark {
  position: relative;
  overflow: hidden;
  width: 40px;
  height: 40px;
  border: 1px solid #e8e9df;
  border-radius: 9px;
  background: #fffefb;
}

.brand-mark img {
  position: absolute;
  top: -8px;
  left: -12px;
  width: 66px;
  height: 66px;
  max-width: none;
}

h1 {
  color: #102a22;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: clamp(36px, 4.1vw, 58px);
}

.lead {
  color: #52615a;
}

.login-card {
  width: min(100%, 430px);
  padding: clamp(24px, 3vw, 36px);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(7, 59, 46, 0.05);
}

.login-card h2 {
  color: #102a22;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(26px, 2.3vw, 34px);
  font-weight: 700;
}

input {
  min-width: 0;
  font-size: 16px;
}

.show-code,
.submit,
.auth-switch {
  min-height: 44px;
}

.show-code {
  display: inline-flex;
  align-items: center;
}

.submit {
  background: var(--accent-800);
  color: white;
  font-weight: 600;
}

.submit:hover {
  background: var(--accent-600);
  color: white;
}

.auth-switch {
  display: flex;
  align-items: center;
}

.privacy-note a {
  display: inline-block;
  padding-block: 5px;
}

@media (max-width: 760px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr);
    width: min(520px, calc(100% - 32px));
    gap: 24px;
    padding-top: max(22px, env(safe-area-inset-top));
    padding-bottom: 54px;
  }

  .intro {
    padding: 0;
  }

  .lead {
    margin: 14px 0;
    font-size: 17px;
  }

  .login-card {
    justify-self: stretch;
    width: 100%;
    padding: 24px;
  }

  body::before {
    height: 80px;
    background-size: auto 80px;
  }
}

@media (max-width: 360px) {
  .login-shell {
    width: calc(100% - 24px);
  }

  .login-card {
    padding: 20px 16px;
  }
}

/* Local readability audit; authentication behavior is unchanged. */
.privacy-note,.agreement-row,.status,.auth-switch,a.auth-switch,footer,.eyebrow,.hint{font-size:14px;line-height:1.55}
input:not([type=checkbox]),select,textarea{font-size:16px;max-width:100%;min-width:0}
label{font-size:14px;line-height:1.5}
button{font-size:16px;white-space:normal;overflow-wrap:anywhere;line-height:1.4;min-height:40px}
.show-code{font-size:14px;min-width:80px;min-height:40px}
.code-wrap input{padding-right:105px}
.login-card,.intro{min-width:0}
.agreement-row input{min-width:20px;width:20px;height:20px;flex-shrink:0}
footer{position:static;padding:16px;text-align:center}
@media(max-width:760px){.login-shell{padding-bottom:24px}.login-card{padding:24px 20px}}
