@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #18332e;
  --muted: #697b71;
  --line: #dce5d8;
  --forest: #18362f;
  --lime: #b9ed6a;
  --gold: #e7ad4f;
  --paper: #f2f3e9;
  --field: #fafbf5;
  --error: #b44440;
  --success: #526c50;
  font-family: "Manrope", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--paper); }
body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", "Trebuchet MS", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input { color: inherit; font: inherit; }
button { cursor: pointer; border: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

.account-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  justify-content: center;
  background: var(--paper);
}
.account-card {
  width: min(100%, 560px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
}

.welcome-panel {
  position: relative;
  min-height: 0;
  padding: 19px 22px 18px;
  overflow: hidden;
  isolation: isolate;
  color: #f2f5e9;
  background: linear-gradient(145deg, #1d4137, #142c27 75%);
}
.welcome-panel::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: .2;
  pointer-events: none;
  background-image: radial-gradient(#c9e2b3 .65px, transparent .65px);
  background-size: 17px 17px;
  mask-image: linear-gradient(transparent, #000 40%, transparent);
}
.brand-row, .brand { display: flex; align-items: center; }
.brand-row { position: relative; justify-content: space-between; gap: 12px; }
.brand { gap: 8px; color: #f2f5e9; text-decoration: none; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand > span { font-size: 22px; font-weight: 800; letter-spacing: -.09em; }
.page-tag {
  color: #b1c0b0;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.page-tag span { padding: 0 3px; color: var(--gold); }
.welcome-copy { position: relative; z-index: 1; margin: 34px 0 0; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--lime);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: .15em;
}
.eyebrow-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.welcome-copy h1 {
  margin: 14px 0 9px;
  color: #f2f5e9;
  font-size: clamp(30px, 8vw, 42px);
  font-weight: 650;
  letter-spacing: -.075em;
  line-height: .94;
}
.welcome-copy h1 em { color: var(--lime); font-style: normal; }
.welcome-detail { max-width: 290px; margin: 11px 0 0; color: #becdc0; font-size: 11px; line-height: 1.6; }
.orbit-art {
  position: absolute;
  top: 83px;
  right: 30px;
  width: 72px;
  height: 72px;
  border: 1px solid rgb(119 151 101 / 33%);
  border-radius: 50%;
  pointer-events: none;
}
.orbit-halo { position: absolute; inset: 12px -7px; border: 1px solid rgb(185 237 106 / 34%); border-radius: 50%; transform: rotate(-37deg); }
.orbit-path { position: absolute; inset: 20px -13px; border: 1px solid rgb(231 173 79 / 55%); border-radius: 50%; transform: rotate(44deg); }
.orbit-planet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 25%, #efffc8, var(--lime) 48%, #649642);
  transform: translate(-50%, -50%);
}
.welcome-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: #9aafa1;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: .1em;
}
.footer-rule { width: 20px; height: 1px; background: #71877a; }

.form-panel { padding: 18px 21px 25px; }
.form-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-kicker {
  color: #718177;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: .1em;
}
.form-kicker span { color: #c49c53; }
.back-link {
  color: #718177;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
}
.back-link span { margin-left: 4px; color: #a17936; }
.back-link:hover { color: #36563d; }
.auth-card { margin-top: 20px; }
.form-heading { margin-bottom: 18px; }
.form-eyebrow { color: #76847a; font-size: 9px; }
.step-number {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  color: #34503d;
  background: #e1e9d6;
  font-size: 9px;
  letter-spacing: 0;
}
.step-rule { width: 24px; height: 1px; background: #bdc9b8; }
.form-heading h2 {
  max-width: 360px;
  margin: 12px 0 5px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.065em;
  line-height: 1.04;
}
.form-heading h2 span { display: block; }
.form-description { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.mode-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 15px;
  border-bottom: 1px solid var(--line);
}
.mode-switch button {
  position: relative;
  min-height: 34px;
  padding: 0 0 10px;
  color: #6f8074;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  transition: color .16s ease;
}
.mode-switch button[aria-pressed="true"] { color: #2a493c; }
.mode-switch button[aria-pressed="true"]::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: #83a94b;
}
.mode-switch button:hover { color: #365c27; }
.mode-switch button span { margin-left: 4px; color: #a17936; }

.field { min-width: 0; margin: 0 0 12px; }
.field label { display: block; margin-bottom: 5px; color: #31483e; font-size: 12px; font-weight: 700; }
.field input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d4ded3;
  border-radius: 4px;
  outline: none;
  color: #213d32;
  background: var(--field);
  font-size: 14px;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.field input::placeholder { color: #98a398; opacity: 1; }
.field input:hover { border-color: #aabca4; }
.field input:focus-visible { border-color: #719b43; background: #fffef7; box-shadow: 0 0 0 3px rgb(113 155 67 / 15%); }
.field-note { display: block; margin: 5px 0 0; color: #87948a; font-size: 10px; line-height: 1.5; }
.forgot-password { margin: -4px 0 13px; text-align: right; font-size: 10px; }
.forgot-password a { color: #557e38; font-weight: 700; text-decoration: none; }
.forgot-password a:hover { text-decoration: underline; text-underline-offset: 3px; }
.input-with-action { position: relative; }
.input-with-action input { padding-right: 82px; }
.password-toggle, .send-code {
  position: absolute;
  top: 50%;
  right: 7px;
  min-height: 30px;
  padding: 0 7px;
  color: #648b3d;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  transform: translateY(-50%);
}
.password-toggle:hover, .send-code:hover { color: #365c27; }
.send-code { right: 3px; padding: 0 8px; border-left: 1px solid #dce3d8; }
.send-code:disabled { cursor: wait; opacity: .55; }
.code-hint { min-height: 15px; }

.invite-field { margin: 1px 0 13px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.invite-field summary {
  display: flex;
  min-height: 41px;
  align-items: center;
  justify-content: space-between;
  color: #435a4d;
  font-size: 11px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.invite-field summary::-webkit-details-marker { display: none; }
.optional { margin-left: 4px; color: #88948a; font-size: 10px; font-weight: 500; }
.invite-mark { color: #89968a; font-size: 16px; font-weight: 400; transition: transform .16s ease; }
.invite-field[open] .invite-mark { transform: rotate(45deg); }
.invite-field .field { padding: 0 0 10px; }

.age-check { display: flex; align-items: flex-start; gap: 9px; margin: 1px 0 13px; color: #607066; font-size: 11px; line-height: 1.6; cursor: pointer; }
.age-check input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.checkmark {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
  border: 1px solid #a9b7a5;
  border-radius: 3px;
  background: var(--field);
  transition: background-color .16s ease, border-color .16s ease;
}
.age-check input:checked + .checkmark { border-color: #789a46; background: #789a46; }
.age-check input:checked + .checkmark::after {
  position: absolute;
  top: 1px;
  left: 4px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
}
.age-check input:focus-visible + .checkmark { outline: 2px solid #719b43; outline-offset: 3px; }
.age-copy a { color: #557e38; font-weight: 700; text-underline-offset: 2px; }

.form-feedback { margin: 0; font-size: 11px; line-height: 1.5; }
.form-error { color: var(--error); }
.form-message { color: var(--success); }
.form-error:empty, .form-message:empty { display: none; }
.form-error:not(:empty), .form-message:not(:empty) { margin-bottom: 9px; }
.submit-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border: 1px solid #b9e66c;
  border-radius: 4px;
  color: #243a2a;
  background: #b9e66c;
  font-size: 13px;
  font-weight: 800;
  transition: background-color .16s ease, transform .16s ease;
}
.submit-button:hover { background: #c9f184; transform: translateY(-1px); }
.submit-button:active { transform: translateY(0); }
.submit-button:disabled { cursor: wait; opacity: .6; transform: none; }
.submit-arrow { font-size: 19px; font-weight: 400; }
.recovery-panel .field { margin-bottom: 14px; }
.back-to-login {
  display: block;
  min-height: 36px;
  margin: 7px auto 0;
  padding: 0 12px;
  color: #557e38;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}
.back-to-login:hover { text-decoration: underline; text-underline-offset: 3px; }

.trust-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid #e0e7d9;
  border-radius: 4px;
  background: #eaf0e2;
}
.trust-icon {
  display: grid;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  place-items: center;
  border: 1px solid #9caf86;
  border-radius: 50%;
  color: #607b42;
  font-family: Georgia, serif;
  font-size: 10px;
  font-style: italic;
}
.trust-note p { margin: 0; color: #657568; font-size: 10px; line-height: 1.55; }

.connection {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 19px 21px 0;
  color: #77857a;
  font-size: 10px;
  line-height: 1.5;
}
.connection-indicator { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #c39b52; }
.connection-indicator[data-state="connected"] { background: #83a94b; }
.connection-indicator[data-state="error"] { background: #c34d45; }
.connection button { margin-left: auto; padding: 3px 0 3px 8px; color: #557e38; background: transparent; font-size: 10px; font-weight: 700; }
.connection button:hover { text-decoration: underline; text-underline-offset: 3px; }
.form-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 17px 18px 0; color: #839087; font-size: 10px; line-height: 1.5; text-align: center; }
.footer-separator { color: #c49c53; }
.form-footer a { color: #66776c; text-decoration: underline; text-decoration-color: #c3cec0; text-underline-offset: 3px; }

.password-toggle:focus-visible, .send-code:focus-visible, .mode-switch button:focus-visible,
.connection button:focus-visible, .invite-field summary:focus-visible,
button:focus-visible, a:focus-visible { outline: 2px solid #709744; outline-offset: 3px; }

@media (min-width: 700px) {
  .account-shell { padding: 26px 20px; }
  .account-card { min-height: 0; overflow: hidden; border: 1px solid #dce3d4; border-radius: 12px; box-shadow: 0 18px 48px rgb(41 67 49 / 9%); }
  .welcome-panel { padding: 22px 30px 24px; }
  .welcome-copy { margin-top: 31px; }
  .welcome-copy h1 { max-width: 360px; font-size: 42px; }
  .orbit-art { top: 88px; right: 34px; }
  .welcome-footer { margin-top: 20px; }
  .form-panel { padding: 22px 30px 26px; }
  .auth-card { margin-top: 22px; }
  .connection { margin-right: 30px; margin-left: 30px; }
  .form-footer { margin: 17px 26px 0; }
}

@media (max-width: 380px) {
  .welcome-panel { padding-right: 18px; padding-left: 18px; }
  .form-panel { padding-right: 17px; padding-left: 17px; }
  .orbit-art { right: 23px; transform: scale(.84); transform-origin: center; }
  .welcome-footer { font-size: 7px; }
  .form-topline { align-items: flex-start; }
  .form-kicker { font-size: 8px; }
  .back-link { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
