﻿:root { --bg:#0f1115; --ink:#e8edf2; --muted:#98a2ad; --brand:#2fe88a; --line:#2a3140; --danger:#ff4757; --danger-soft:rgba(255,71,87,0.25); --focus:#66aaff; }
*,*::before,*::after { box-sizing:border-box; }
html,body { height:100%; margin:0; }
body { color:var(--ink); background:var(--bg); font-family:"Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height:1.5; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
button,input,select,textarea { font-family:inherit; }

/* Fixed hero slideshow area */
.hero { position:relative; width:100%; height:100vh; overflow:hidden; background:var(--bg); }
.hero-layer { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity 1.5s ease; }
.hero-layer.on { opacity:1; }
.hero-layer.stretch { object-fit:cover; }

/* Skip link */
.skip-link { position:absolute; left:-999px; top:-999px; background:#fff; color:#000; padding:8px 12px; border-radius:8px; z-index:1000; }
.skip-link:focus { left:8px; top:8px; outline:2px solid var(--focus); outline-offset:2px; }

/* Overlay form */
.overlay-form { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); width:clamp(280px,90vw,420px); max-width:95%; max-height:calc(100vh - 150px); background:rgba(18,22,30,0.78); border:1px solid var(--line); border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,0.7); padding:clamp(16px,4vw,24px); backdrop-filter:saturate(120%) blur(10px); -webkit-backdrop-filter:saturate(120%) blur(10px); z-index:10; overflow-y:auto; }
.overlay-form[hidden] { display:none !important; }

/* Copy and foot */
.copy { text-align:center; margin-bottom:0; }
.copy h1 { margin:0 0 9px 0; font-size:clamp(24px,6vw,36px); line-height:1; text-shadow:0 2px 8px rgba(0,0,0,0.5); }
.copy .tagline { margin:0 auto -24px auto; font-size:clamp(13px,3.2vw,15px); color:var(--muted); line-height:1; text-shadow:0 1px 4px rgba(0,0,0,0.4); }
.foot { margin-top:24px; text-align:center; }
.foot a { color:#9fb0bf; margin:0 8px; font-size:clamp(12px,3vw,13px); text-decoration:none; cursor:pointer; display:inline-block; padding:8px 4px; }
.foot a:hover { text-decoration:underline; }

/* Field groups */
.field-group { display:flex; flex-direction:column; gap:4px; margin-bottom:12px; }
.field-label { font-size:0.8rem; font-weight:600; color:#e3e7f0; text-transform:uppercase; letter-spacing:0.05em; }

/* Input wrapper */
.input-wrapper { position:relative; display:flex; align-items:center; width:100%; padding:11px 13px; border-radius:10px; border:2px solid #e6e9ef; min-height:44px; background:#fff; }
.input-wrapper input { flex:1; border:none; outline:none; background:transparent; color:#000; font-size:clamp(15px,3.5vw,16px); padding:0; }
.input-wrapper + .input-wrapper { margin-top:8px; }

/* Show password button */
.show-password-btn { all:unset; box-sizing:border-box; position:absolute; top:50%; right:8px; transform:translateY(-50%); width:36px; height:36px; padding:6px; display:none; cursor:pointer; z-index:1; color:black; }
.show-password-btn.visible { display:flex; align-items:center; justify-content:center; }
.show-password-btn:is(:focus, :focus-visible, :active) { outline:2px solid var(--focus); outline-offset:2px; }
.show-password-btn svg { width:24px; height:24px; }

/* Buttons */
.btn { width:100%; padding:12px; border-radius:10px; border:1px solid var(--brand); background:var(--brand); color:#072014; font-weight:700; font-size:clamp(15px,3.5vw,16px); cursor:pointer; margin-top:18px; min-height:44px; line-height:1.2; display:block; box-sizing:border-box; position:relative; transition:background-color 0.2s ease, color 0.2s ease; }
.btn:hover { background:var(--brand); color:#072014; }
.btn:active { background:#22d978; color:#072014; }
.btn:focus { outline: none; }

/* Back to login link styling (no box outline on hover) */
/* Back to login link — plain text, no border, no hover/focus visuals */
#recoveryDeck .recover-alt-link {
  display: inline-block;
  padding: 0;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  color: #ffffff;
  text-decoration: underline;
}
#recoveryDeck .recover-alt-link:hover,
#recoveryDeck .recover-alt-link:focus,
#recoveryDeck .recover-alt-link:focus-visible {
  color: #ffffff !important;
  text-decoration: underline !important;
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}

/* Consent */
.consent { margin-top:14px; padding:10px; border-radius:10px; border:1px solid #444; background:rgba(0,0,0,0.2); display:flex; gap:8px; align-items:flex-start; }
.consent.invalid { border-color:var(--danger); box-shadow:0 0 0 4px var(--danger-soft); }
.consent input[type="checkbox"] { width:18px; height:18px; cursor:pointer; accent-color:var(--brand); }

/* Inline links */
.forgot-wrapper { margin-top:12px; text-align:center; }
.link-inline { background:none; border:none; padding:0; font:inherit; color:var(--brand); font-weight:600; cursor:pointer; text-decoration:underline; }
.link-inline:hover, .link-inline:focus { text-decoration:none; outline:2px solid var(--brand); outline-offset:2px; }

/* Recovery deck */
#recoveryDeck { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); width:clamp(280px,90vw,420px); max-width:95%; max-height:calc(100vh - 150px); background:rgba(18,22,30,0.78); border:1px solid var(--line); border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,0.7); padding:clamp(16px,4vw,24px); backdrop-filter:saturate(120%) blur(10px); -webkit-backdrop-filter:saturate(120%) blur(10px); z-index:20; overflow-y:auto; }
.step[hidden] { display:none !important; }
.step { display:block; }

.recover-card { display:block; width:100%; text-align:center; margin:0 0 0.75rem; padding:0.85rem 1rem; border:1px solid var(--line); background:rgba(42,49,64,0.45); color:var(--ink); cursor:pointer; border-radius:10px; transition:border-color 0.2s ease, box-shadow 0.2s ease; }
.recover-card[aria-checked="true"] { border-color:var(--brand); box-shadow:0 0 0 3px rgba(47,232,138,0.25); }
.recover-card:focus { outline:2px solid var(--brand); outline-offset:2px; }

#recoveryDeck label { font-weight:600; color:var(--ink); }
#recoveryDeck input { width:100%; min-height:44px; border:2px solid #e6e9ef; background:#f3f8ff; border-radius:8px; padding:8px 12px; font-size:clamp(14px,3.2vw,15px); color:#0d1016; outline:none; }
#recoveryDeck input:focus { border-color:var(--brand); box-shadow:0 0 0 3px rgba(47,232,138,0.25); }
#recoveryDeck .recovery-separator { margin:18px 0 12px; height:1px; background:var(--line); border-radius:1px; }
#recoveryDeck .recover-alt-link:hover, #recoveryDeck .recover-alt-link:focus { color:var(--brand); }
#recoveryDeck .btn-recovery-cancel { background:transparent; color:var(--muted); border:1px solid var(--line); }
#recoveryDeck .btn-recovery-cancel:hover, #recoveryDeck .btn-recovery-cancel:focus { border-color:var(--brand); color:var(--brand); outline:none; box-shadow:0 0 0 3px rgba(47,232,138,0.25); }

/* Password hints */
.password-hints { display:none; margin-top:12px; padding-left:1.2rem; font-size:clamp(12px,2.8vw,14px); color:var(--muted); list-style:disc; }
.password-hints.is-active { display:grid; gap:6px; grid-template-columns:minmax(0, 1fr); }
@media (min-width:480px) { .password-hints.is-active { grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); } }
.password-hints li { transition:color 0.2s ease; }
.password-hints li.ok { color:var(--brand); }
.password-hints li.bad { color:var(--danger); }

/* Disabled forgot password link */
#forgotPwdBtn[disabled] { opacity:0.55; }

/* Responsive tweaks */
@media (min-width:768px) { .overlay-form { width:clamp(380px,50vw,460px); padding:24px; } #recoveryDeck { width:clamp(380px,50vw,460px); padding:24px; } }
@media (min-width:1024px) { .overlay-form { width:420px; } #recoveryDeck { width:420px; } }

/* Desktop/Tablet: Add border, preserve entire image */
@media (min-width: 768px) {
  html {
    transform: none !important;
  }

  .hero {
    padding: 2.5vh 2.5vw;
    background: var(--bg);
  }

  .hero-layer {
    top: 2.5vh;
    left: 2.5vw;
    width: 95vw;
    height: 95vh;
    object-fit: contain;
    border: 3px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }

  .hero-layer.stretch {
    object-fit: cover;
  }
}

/* Large desktop */
@media (min-width: 1440px) {
  .hero {
    padding: 5vh 5vw;
  }

  .hero-layer {
    top: 5vh;
    left: 5vw;
    width: 90vw;
    height: 90vh;
  }
}

.overlay-form {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(280px, 90vw, 420px);
  max-width: 95%;
  max-height: calc(100vh - 150px);
  background: rgba(18, 22, 30, 0.73);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  padding: clamp(16px, 4vw, 24px);
  backdrop-filter: saturate(120%) blur(10px);
  -webkit-backdrop-filter: saturate(120%) blur(10px);
  z-index: 10;
  transition: all 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #36343f rgba(0, 0, 0, 0.25);
}

/* Form content wrapper for fade out */
.form-content {
  transition: opacity 0.3s ease;
}

.overlay-form.loading .form-content {
  opacity: 0;
  pointer-events: none;
}

/* Loading state */
.loading-state {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay-form.loading .loading-state {
  opacity: 1;
  pointer-events: all;
}

#createAccountHead {
  margin-bottom: -20px;
}

#primaryBtn {
  margin-bottom: 20px;
}

/* Swirling loader animation */
.loader {
  width: 80px;
  height: 80px;
  position: relative;
}

.loader-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--brand);
  animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
  transition: border-top-color 0.3s ease;
}

.loader-ring:nth-child(2) {
  width: 90%;
  height: 90%;
  top: 5%;
  left: 5%;
  border-top-color: rgba(47, 232, 138, 0.6);
  animation-delay: -0.4s;
  animation-duration: 1.5s;
}

.loader-ring:nth-child(3) {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border-top-color: rgba(47, 232, 138, 0.3);
  animation-delay: -0.8s;
  animation-duration: 1.8s;
}

/* Error state - red spinner */
.overlay-form.error .loader-ring {
  border-top-color: var(--danger);
}

.overlay-form.error .loader-ring:nth-child(2) {
  border-top-color: rgba(255, 71, 87, 0.6);
}

.overlay-form.error .loader-ring:nth-child(3) {
  border-top-color: rgba(255, 71, 87, 0.3);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading-text {
  margin-top: 24px;
  font-size: clamp(14px, 3.5vw, 16px);
  color: var(--muted);
  text-align: center;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

.copy {
  text-align: center;
  margin-bottom: 0;
}

.copy h1 {
  margin: 0 0 9px 0;
  font-size: clamp(24px, 6vw, 36px);
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.copy .tagline {
  margin: 0 auto -24px auto;
  font-size: clamp(13px, 3.2vw, 15px);
  color: var(--muted);
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  opacity: 1;
  max-height: 50px;
  overflow: hidden;
  transition: opacity 0.5s ease;
}

.copy .tagline.fade-out {
  opacity: 0;
}

.overlay-form.expanded .copy .tagline {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.copy p {
  margin: 4px auto 0;
  max-width: 56ch;
  font-size: clamp(14px, 3.5vw, 16px);
  color: var(--muted);
  line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.copy p.fade-out {
  opacity: 0;
}

.overlay-form.expanded .copy p {
  max-height: 200px;
  opacity: 1;
  margin: 4px auto -20px;
}

.field {
  margin-top: 0;
}

/* add a small gap ONLY when a message is shown */
.field:has(.error-message.visible),
.field:has(.success-message.visible) {
  margin-top: 32px; /* or 6–10px to taste */
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px; /* label → input gap */
  margin-bottom: 12px; /* spacing between groups */
}

.field-group[hidden] {
  display: none !important;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e3e7f0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Error message box */
.error-message {
  padding: 10px 12px;
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid var(--danger);
  border-radius: 8px;
  color: var(--danger);
  font-size: clamp(13px, 3vw, 14px);
  font-weight: 600;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.error-message.visible {
  max-height: 100px;
  opacity: 1;
  margin-bottom: -6px;
}

#createAccountErrorMsg {
  margin-bottom: 18px;
  margin-top: -16px;
}

/* Success message box */
.success-message {
  padding: 10px 12px;
  background: rgba(31, 78, 3, 0.15);
  border: 1px solid #10a330;
  border-radius: 8px;
  color: #10a330;
  font-size: clamp(13px, 3vw, 14px);
  font-weight: 600;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.success-message.visible {
  max-height: 100px;
  opacity: 1;
  margin-bottom: 16px;
  margin-top: -20px;
}

.error-message.visible + .success-message.visible {
  margin-top: 16px;
}

/* Phone wrapper with +1 prefix */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 2px solid #e6e9ef;
  overflow: hidden;
  min-height: 44px;
  background-color: #ffffff;
}

.input-wrapper input {
  position: relative;
  z-index: 1;
  flex: 1;
  border: none;
  outline: none;
  background: transparent !important;
  background-color: transparent !important;
  color: #000000 !important;
  font-size: clamp(15px, 3.5vw, 16px);
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}

.input-wrapper[hidden] {
  display: none !important;
}

.input-wrapper.collapsed {
  max-height: 0;
  padding: 0;
  border-width: 0;
  margin: 0;
  overflow: hidden;
}

.input-wrapper:focus-within .show-password-btn {
  display: flex;
}

.input-wrapper input::-ms-reveal,
.input-wrapper input::-ms-clear {
  display: none;
}

.input-wrapper + .input-wrapper {
  margin-top: 8px;
}

#phone:placeholder-shown {
  -webkit-text-fill-color: #00000052 !important;
}

.phone-prefix {
  position: relative;
  z-index: 1;
  color: #0d1016;
  font-size: clamp(15px, 3.5vw, 16px);
  font-weight: 600;
  margin-right: 4px;
  user-select: none;
}

#passwordInput:placeholder-shown {
  -webkit-text-fill-color: #00000052 !important;
}

.link-phone {
  color: green;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.link-phone:hover {
  color: rgb(3, 168, 3);
}

button.show-password-btn,
.show-password-btn[type="button"],
.show-password-btn[type="submit"] {
  all: unset; /* wipe UA styles (including background & borders) */
  box-sizing: border-box;
  background: transparent;
  box-shadow: none;

  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 6px; /* hit area */

  display: none; /* default hidden */
  cursor: pointer;
  z-index: 1;
  color: black;

  background: transparent;
  -webkit-tap-highlight-color: transparent; /* kill blue tap highlight on mobile */
}

/* 2. When you want it visible */
.show-password-btn.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

.show-password-btn:hover svg {
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.6));
}

/* 3. Focus styles – cover BOTH :focus and :focus-visible */
.show-password-btn:is(:focus, :focus-visible, :active) {
  background: transparent;
  box-shadow: none;
  outline: 2px solid #66aaff;
  outline-offset: 2px; /* keep accessible focus */
}

/* 4. Icon size */
.show-password-btn svg {
  width: 24px;
  height: 24px;
}

.btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #072014;
  font-weight: 700;
  font-size: clamp(15px, 3.5vw, 16px);
  cursor: pointer;
  margin-top: 18px;
  min-height: 44px;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(47, 232, 138, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.consent {
  margin-top: 14px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #444;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, max-height 0.3s ease,
    opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 10px;
  margin-top: 0;
}

.overlay-form.expanded .consent {
  max-height: 200px;
  opacity: 1;
  padding: 10px;
  margin-top: 14px;
}

.overlay-form[hidden] {
  display: none !important;
}

.consent.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}

/* Checkbox styling */
.consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  cursor: pointer;
  accent-color: var(--brand);
  transition: outline 0.2s ease, box-shadow 0.2s ease;
  margin-top: 2px;
}

/* Red outline and glow for invalid checkbox */
.consent.invalid input[type="checkbox"] {
  outline: 2px solid var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}

.consent label {
  font-size: clamp(13px, 3vw, 14px);
  line-height: 1.4;
}

/* Terms link same color as button, no underline, never changes color */
.consent a,
.consent a:visited,
.consent a:hover,
.consent a:active,
.consent a:focus {
  color: var(--brand) !important;
  text-decoration: none !important;
  outline: none;
  font-weight: 700;
  cursor: pointer;
}

.foot {
  margin-top: 24px;
  text-align: center;
  opacity: 1;
  max-height: 100px;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.overlay-form.expanded .foot {
  max-height: 100px;
  opacity: 1;
  margin-top: 24px;
}

.foot a {
  color: #9fb0bf;
  margin: 0 8px;
  font-size: clamp(12px, 3vw, 13px);
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  padding: 8px 4px;
}

.foot a:hover {
  text-decoration: underline;
}

/* Visually hidden list used in header nav for semantics */
.visually-hidden-list {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

/* Terms overlay */
.terms-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

.terms-overlay.visible {
  display: flex;
}

.terms-content {
  position: relative;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(20px, 5vw, 40px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #36343f rgba(0, 0, 0, 0.25);
}

.terms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.terms-header h2 {
  margin: 0;
  font-size: clamp(22px, 5vw, 28px);
  color: var(--ink);
}

.close-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  padding: 0;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--brand);
  transform: scale(1.05);
}

.terms-body {
  color: var(--muted);
  line-height: 1.7;
  font-size: clamp(14px, 3.5vw, 16px);
}

.terms-body h3 {
  color: var(--ink);
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: clamp(18px, 4vw, 20px);
}

.terms-body p {
  margin: 12px 0;
}

/* Style all links in overlay bodies with brand green color */
.terms-body a,
.terms-body a:visited {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.terms-body a:hover,
.terms-body a:focus {
  color: var(--brand);
  text-decoration: underline;
}

.terms-body ul {
  margin: 12px 0;
  padding-left: 24px;
}

.terms-body li {
  margin: 8px 0;
}

/* Responsive breakpoints for optimal sizing */
@media (max-width: 375px) {
  .overlay-form {
    width: 92%;
    padding: 14px;
  }
}

@media (min-width: 768px) {
  .overlay-form {
    width: clamp(380px, 50vw, 460px);
    padding: 24px;
    background: rgba(18, 22, 30, 0.78);
  }
}

@media (min-width: 1024px) {
  .overlay-form {
    width: 420px;
  }
}

/* Force desktop layout on tablets even in landscape - NO rotation effects */
@media (min-width: 768px) and (orientation: landscape) {
  html,
  body {
    transform: none !important;
    width: 100vw !important;
    height: 100vh !important;
  }
}

/* Landscape mobile phones only */
@media (max-width: 767px) and (max-height: 600px) and (orientation: landscape) {
  .overlay-form {
    max-height: 90vh;
    overflow-y: auto;
    padding: 12px;
  }

  .copy h1 {
    font-size: 22px;
  }

  .copy p {
    font-size: 13px;
  }
}

/* Hero Arrow Button */
.hero-arrow {
  position: fixed;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(47, 232, 138, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #072014;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: bounce 2s infinite;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-arrow:hover {
  background: rgba(47, 232, 138, 1);
  transform: translateX(-50%) translateY(-4px);
  box-shadow: 0 8px 20px rgba(47, 232, 138, 0.4);
}

.hero-arrow svg {
  width: 24px;
  height: 24px;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

/* Desktop/Tablet positioning */
@media (min-width: 768px) {
  .hero-arrow {
    bottom: calc(2.5vh + 5px);
  }
}

@media (min-width: 1440px) {
  .hero-arrow {
    bottom: calc(5vh + 5px);
  }
}

/* Expanded Content Section */
.expanded-content {
  position: relative;
  background: var(--bg);
  min-height: 100vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.expanded-content.visible {
  opacity: 1;
  visibility: visible;
}

.content-container {
  padding: clamp(40px, 8vw, 80px) clamp(20px, 5vw, 40px);
  max-width: 1200px;
  margin: 0 auto;
}

.content-container h2 {
  color: var(--ink);
  font-size: clamp(28px, 6vw, 42px);
  margin-bottom: clamp(30px, 6vw, 50px);
  text-align: center;
}

.content-container > h3 {
  color: var(--ink);
  font-size: clamp(24px, 5vw, 32px);
  margin: clamp(40px, 6vw, 60px) 0 clamp(20px, 4vw, 30px) 0;
  text-align: center;
}

.content-intro {
  margin-bottom: clamp(30px, 6vw, 50px);
}

.content-intro p {
  color: var(--muted);
  font-size: clamp(15px, 3.5vw, 17px);
  line-height: 1.7;
  margin-bottom: 20px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 4vw, 30px);
  margin-bottom: clamp(40px, 6vw, 60px);
}

.content-card {
  background: rgba(42, 49, 64, 0.4);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(20px, 4vw, 30px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(47, 232, 138, 0.15);
  border-color: var(--brand);
}

.content-card h3 {
  color: var(--brand);
  font-size: clamp(18px, 4vw, 22px);
  margin: 0 0 12px 0;
}

.content-card p {
  color: var(--muted);
  font-size: clamp(14px, 3.5vw, 16px);
  line-height: 1.6;
  margin: 0 0 12px 0;
}

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

.content-section {
  margin: clamp(40px, 6vw, 60px) 0;
}

.content-section h3 {
  color: var(--ink);
  font-size: clamp(22px, 5vw, 28px);
  margin-bottom: clamp(20px, 4vw, 30px);
}

.content-section p {
  color: var(--muted);
  font-size: clamp(15px, 3.5vw, 16px);
  line-height: 1.7;
  margin-bottom: 20px;
}

.content-section p strong {
  color: var(--brand);
  font-weight: 600;
}

.content-features {
  background: rgba(47, 232, 138, 0.05);
  border: 1px solid rgba(47, 232, 138, 0.2);
  border-radius: 12px;
  padding: clamp(24px, 5vw, 40px);
}

.content-features h3 {
  color: var(--ink);
  font-size: clamp(20px, 4vw, 26px);
  margin: 0 0 20px 0;
  text-align: center;
}

.content-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.content-features li {
  color: var(--muted);
  font-size: clamp(14px, 3.5vw, 16px);
  padding: 8px 0;
}
/* Make hero images scrollable when content expands */
.hero-layer.scrollable {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: -1 !important;
}

/* Desktop/Tablet scrollable adjustments */
@media (min-width: 768px) {
  .hero-layer.scrollable {
    top: 2.5vh !important;
    left: 2.5vw !important;
    z-index: -1 !important;
  }
}

@media (min-width: 1440px) {
  .hero-layer.scrollable {
    top: 5vh !important;
    left: 5vw !important;
    z-index: -1 !important;
  }
}

/* Hidden accessible labels */
.vis-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}
.names-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.names-group .input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  padding: 11px 13px;
  border-radius: 10px;
  border: 2px solid #e6e9ef;
  background: #f3f8ff;
  min-height: 44px;
}

.names-group input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: clamp(15px, 3.5vw, 16px);
  color: #0d1016;
}

.recover-card {
  display: block;
  width: 100%;
  text-align: center;
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: rgba(42, 49, 64, 0.45);
  color: var(--ink);
  cursor: pointer;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.recover-card[aria-checked="true"] {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 232, 138, 0.25);
}
.recover-card:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

/* Forgot password link inline styling aligned with theme */
.forgot-wrapper {
  margin-top: 12px;
  text-align: center;
}

.link-inline {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.link-inline:hover,
.link-inline:focus {
  text-decoration: none;
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Security group – always visible when form expands, readable */
/* Security question styles removed */

/* Step visibility */
.step[hidden] {
  display: none !important;
}
.step {
  display: block;
}

/* Recovery deck overlay (ensure it's above main form and not behind) */
#recoveryDeck {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(280px, 90vw, 420px);
  max-width: 95%;
  max-height: calc(100vh - 150px);
  background: rgba(18, 22, 30, 0.78);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  padding: clamp(16px, 4vw, 24px);
  backdrop-filter: saturate(120%) blur(10px);
  -webkit-backdrop-filter: saturate(120%) blur(10px);
  z-index: 20; /* higher than .overlay-form (10) */
  overflow-y: auto;
}

/* Status/live regions default */
#site-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}
#recoveryDeck .recovery-code-group,
#recoveryDeck .recovery-password-group {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: clamp(13px, 3vw, 14px);
}

#recoveryDeck label {
  font-weight: 600;
  color: var(--ink);
}

#recoveryDeck input {
  width: 100%;
  min-height: 44px;
  border: 2px solid #e6e9ef;
  background: #f3f8ff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: clamp(14px, 3.2vw, 15px);
  color: #0d1016;
  outline: none;
}

#recoveryDeck input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 232, 138, 0.25);
}

.password-hints {
  display: none;
  margin-top: 12px;
  padding-left: 1.2rem;
  font-size: clamp(12px, 2.8vw, 14px);
  color: var(--muted);
  list-style: disc;
}

.password-hints.is-active {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 480px) {
  .password-hints.is-active {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

.password-hints li {
  margin-left: 0;
  padding-left: 0;
  transition: color 0.2s ease;
}

.password-hints li.ok {
  color: var(--brand);
}

.password-hints li.bad {
  color: var(--danger);
}

.recovery-status-message {
  margin-top: 12px;
  font-size: clamp(13px, 3vw, 14px);
  min-height: 1.5rem;
  color: var(--ink);
}

.recovery-status-message.highlight {
  background: rgba(47, 232, 138, 0.12);
  border: 1px solid rgba(47, 232, 138, 0.4);
  border-radius: 10px;
  padding: 10px 12px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

#recoveryDeck .btn-recovery-primary {
  margin-top: 4px;
}

#recoveryMethodCard {
  text-align: center;
}

#recoveryDeck .recovery-separator {
  margin: 18px 0 12px;
  height: 1px;
  background: var(--line);
  border-radius: 1px;
}

#recoveryDeck .recovery-secondary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
  min-height: 80px; /* ensures equidistance between the two links */
}

#recoveryDeck .recover-alt-link {
  display: inline-block;
  padding-top: 2px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: #ffffff;
}

#recoveryDeck .recover-alt-link:hover,
#recoveryDeck .recover-alt-link:focus {
  margin: 20px 0 14px;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
  display: block;
  width: 100%;
  text-align: center;
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
  border: 2px solid #e6e9ef; /* lighter border for better contrast */
  background: rgba(255, 255, 255, 0.08); /* lighter box for accessibility */
  color: var(--ink);
  cursor: pointer;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: not-allowed;
}

  border-color: var(--brand);
  background: rgba(47, 232, 138, 0.12);
  box-shadow: 0 0 0 3px rgba(47, 232, 138, 0.25);
  color: var(--muted);
  border: 1px solid var(--line);
}
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  background: rgba(255, 255, 255, 0.12);
#recoveryDeck .btn-recovery-cancel:focus {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(255, 255, 255, 0.08); /* improve contrast for transparent buttons */
  color: var(--ink);
  border: 2px solid #e6e9ef;

/* Disabled forgot password link styling */
#forgotPwdBtn[disabled] {
  opacity: 0.55;
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
  background: rgba(47, 232, 138, 0.12);
  box-shadow: 0 0 0 3px rgba(47, 232, 138, 0.25);
#forgotPwdBtn:not([disabled]):focus {
  text-decoration: none;
}

@media (min-width: 768px) {
  #recoveryDeck {
    width: clamp(380px, 50vw, 460px);
    padding: 24px;
  }
}

@media (min-width: 1024px) {
  #recoveryDeck {
    width: 420px;
  }
}

/* --- Recovery overrides: restore pre-change styles --- */
#recoveryDeck .recovery-separator {
  margin: 18px 0 12px;
  height: 1px;
  background: var(--line);
  border-radius: 1px;
}

.recover-card {
  display: block;
  width: 100%;
  text-align: center;
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: rgba(42, 49, 64, 0.45);
  color: var(--ink);
  cursor: pointer;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.recover-card[aria-checked="true"] {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 232, 138, 0.25);
}

.recover-card:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

#recoveryDeck .recover-alt-link:hover,
#recoveryDeck .recover-alt-link:focus {
  color: var(--brand);
}

#recoveryDeck .btn-recovery-cancel {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

#recoveryDeck .btn-recovery-cancel:hover,
#recoveryDeck .btn-recovery-cancel:focus {
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 232, 138, 0.25);
}
