/* DoubleGame Official — Premium & Classic themes */

:root {
  /* Body: Lora — classic, readable. Display: Libre Baskerville — clear, bold. */
  --font-sans: "Lora", Georgia, "Times New Roman", serif;
  --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 4.25rem;
}

/* Premium (default) */
body.theme-premium {
  --bg: #08080c;
  --bg-elevated: #101018;
  --bg-hero: radial-gradient(ellipse 120% 80% at 50% -20%, #1a1528 0%, #08080c 55%);
  --text: #e8e6ed;
  --text-muted: #9894a6;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #c9a962;
  --accent-soft: rgba(201, 169, 98, 0.15);
  --accent-glow: rgba(201, 169, 98, 0.35);
  --btn-primary-bg: linear-gradient(145deg, #d4b56e 0%, #a37f3a 100%);
  --btn-primary-text: #0c0a06;
  --card-bg: rgba(16, 16, 24, 0.7);
  --footer-bg: #050507;
  --link-hover: #e4d4a8;
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-border: rgba(255, 255, 255, 0.12);
  --title-weight: 700;
  --header-blur: 16px;
}

/* Classic */
body.theme-classic {
  --bg: #f4f0e8;
  --bg-elevated: #fffcf5;
  --bg-hero: radial-gradient(ellipse 100% 70% at 50% 0%, #e8e0d4 0%, #f4f0e8 50%);
  --text: #1c1a16;
  --text-muted: #5c564c;
  --border: rgba(44, 36, 28, 0.12);
  --accent: #6b1c23;
  --accent-soft: rgba(107, 28, 35, 0.08);
  --accent-glow: rgba(107, 28, 35, 0.2);
  --btn-primary-bg: linear-gradient(145deg, #7a222a 0%, #4a1218 100%);
  --btn-primary-text: #faf8f4;
  --card-bg: #fffcf5;
  --footer-bg: #ebe5da;
  --link-hover: #4a1218;
  --input-bg: #fff;
  --input-border: rgba(44, 36, 28, 0.18);
  --title-weight: 700;
  --header-blur: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.012em;
  color: var(--text);
  background: var(--bg);
  transition: background 0.45s var(--ease), color 0.45s var(--ease);
  padding-top: var(--header-h);
}

h1,
h2,
h3,
.section__title,
.brand-name {
  font-family: var(--font-serif);
  font-weight: var(--title-weight);
  line-height: 1.22;
  letter-spacing: 0.02em;
  font-synthesis: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--btn-primary-text);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  /* No backdrop-filter here: it creates a containing block in WebKit/Blink and breaks
     viewport-fixed mobile nav (links appear in-flow under the logo). */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 max(1.25rem, env(safe-area-inset-left)) 0 max(1.25rem, env(safe-area-inset-right));
  height: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand nav trailing";
  align-items: center;
  gap: 1rem 1.25rem;
  position: relative;
  z-index: 5;
}

@media (min-width: 1024px) {
  .header-inner {
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }
}

.header-trailing {
  grid-area: trailing;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: var(--accent-soft);
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-menu-toggle__bars {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.site-nav-backdrop {
  display: none;
}

.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  min-width: 0;
}

.brand-mark {
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.brand-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 600;
}

.main-nav {
  grid-area: nav;
  justify-self: center;
  align-self: center;
  min-width: 0;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem 1.75rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.main-nav a:hover {
  color: var(--link-hover);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem 0.35rem 0.35rem;
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-toggle__track {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  transition: background 0.3s var(--ease);
}

.theme-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.5rem - 6px);
  height: calc(1.5rem - 6px);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  transition: transform 0.35s var(--ease);
}

body.theme-classic .theme-toggle__thumb {
  transform: translateX(1.2rem);
}

.theme-toggle__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  min-width: 4.2rem;
}

.theme-toggle__name--classic,
body.theme-classic .theme-toggle__name--premium {
  display: none;
}

body.theme-classic .theme-toggle__name--classic {
  display: block;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 3rem 1.5rem 4rem;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--bg-hero);
  pointer-events: none;
}

body.theme-premium .hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 80% 20%,
    rgba(201, 169, 98, 0.07) 0%,
    transparent 45%
  );
}

body.theme-classic .hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 20% 80%,
    rgba(107, 28, 35, 0.06) 0%,
    transparent 50%
  );
}

.hero__content {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 1.25rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  margin: 0 0 1.25rem;
}

.hero__lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto 2rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border-radius: 0.4rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
}

.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn--primary:hover {
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--link-hover);
}

/* Sections */
.section {
  padding: 4.5rem 1.5rem;
}

.section--tint {
  background: var(--accent-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.45s var(--ease);
}

.section__inner {
  max-width: 900px;
  margin: 0 auto;
}

.section__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  text-align: center;
  margin: 0 0 1.25rem;
}

.section__intro {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  padding: 1.75rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  transition: background 0.45s var(--ease);
}

.feature-card__icon {
  display: block;
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.feature-card h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: p;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.pillars li {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.pillars li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pillars__n {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 2.5rem;
}

.pillars h3 {
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
  font-family: var(--font-sans);
  font-weight: 600;
}

.pillars p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pullquote {
  margin: 0;
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-style: italic;
  color: var(--text-muted);
  border-left: 3px solid var(--accent);
  background: var(--card-bg);
  border-radius: 0 0.5rem 0.5rem 0;
  transition: background 0.45s var(--ease);
}

.cta-block {
  padding-bottom: 5rem;
}

.cta-block__inner {
  text-align: center;
  max-width: 520px;
}

.cta-block__text {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.waitlist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 22rem;
  margin: 0 auto 1.5rem;
}

@media (min-width: 500px) {
  .waitlist {
    flex-direction: row;
    max-width: 32rem;
  }

  .waitlist input {
    flex: 1;
  }
}

.waitlist input {
  padding: 0.9rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--input-border);
  border-radius: 0.4rem;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.waitlist input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.waitlist input:focus {
  outline: none;
  border-color: var(--accent);
}

.fine-print {
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem 2rem;
  transition: background 0.45s var(--ease);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  text-align: center;
}

@media (min-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    text-align: left;
  }

  .footer-copy {
    text-align: right;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

@media (min-width: 700px) {
  .footer-brand {
    justify-content: flex-start;
  }
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.footer-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 700px) {
  .footer-nav {
    justify-content: center;
  }
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-nav a:hover {
  color: var(--link-hover);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Mobile / tablet: drawer nav — one top bar; links in off-canvas panel */
@media (max-width: 1023px) {
  html {
    --header-h: 3.35rem;
  }

  /* Header hugs the top (safe area only where the device needs it); body offset matches total bar height */
  body {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  }

  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
    height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    box-sizing: border-box;
  }

  .nav-menu-toggle {
    display: inline-flex;
    position: relative;
    z-index: 62;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    pointer-events: auto;
    cursor: pointer;
  }

  .header-inner {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem;
    height: var(--header-h);
    min-height: var(--header-h);
  }

  .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .header-trailing {
    position: relative;
    z-index: 60;
    flex: 0 0 auto;
    gap: 0.35rem;
  }

  .theme-toggle {
    padding: 0.28rem 0.35rem;
    gap: 0.35rem;
  }

  .theme-toggle__label {
    display: none;
  }

  /* Keep drawer out of document flow (prevents About/Log in row under the logo) */
  .site-header > .header-inner > .main-nav {
    position: fixed !important;
    left: 0;
    right: auto;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    bottom: 0;
    width: min(17.5rem, calc(100vw - 2.5rem));
    max-width: 88vw;
    margin: 0;
    padding: 1rem 1rem 1.5rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    grid-column: auto;
    justify-self: stretch;
    z-index: 52;
    background: color-mix(in srgb, var(--bg-elevated) 96%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-right: 1px solid var(--border);
    box-shadow: 8px 0 36px rgba(0, 0, 0, 0.35);
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    pointer-events: none;
  }

  body.site-nav-open .site-header > .header-inner > .main-nav {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .site-header > .header-inner > .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .site-header > .header-inner > .main-nav a {
    display: block;
    padding: 0.78rem 0.65rem;
    border-radius: 0.45rem;
    font-size: 0.95rem;
  }

  .site-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 51;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.22s ease,
      visibility 0.22s ease;
  }

  body.site-nav-open .site-nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.site-nav-open {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: pan-y;
  }

  .site-header {
    z-index: 54;
  }

  .header-inner {
    z-index: 55;
  }
}

/* Auth: login, register, account */
.auth-page {
  min-height: calc(100vh - var(--header-h) - 8rem);
  min-height: calc(100dvh - var(--header-h) - 8rem);
  padding: 2.75rem max(1.35rem, env(safe-area-inset-left)) 4rem max(1.35rem, env(safe-area-inset-right));
  padding-bottom: max(4rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.auth-page__inner {
  width: 100%;
  max-width: 26rem;
}

.auth-page__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  text-align: center;
  margin: 0 0 0.5rem;
}

.auth-page__lede {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 1.75rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input {
  padding: 0.8rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--input-border);
  border-radius: 0.4rem;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.password-field {
  position: relative;
  width: 100%;
}

.form-group .password-field input.password-field__input {
  width: 100%;
  padding-right: 2.75rem;
  box-sizing: border-box;
}

.password-field__toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.password-field__toggle:hover {
  color: var(--text);
}

.password-field__toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.password-field__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.password-field__icon svg {
  display: block;
}

.password-field__icon--eye-off {
  display: none;
}

.password-field__toggle.password-field__toggle--visible .password-field__icon--eye {
  display: none;
}

.password-field__toggle.password-field__toggle--visible .password-field__icon--eye-off {
  display: inline-flex;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.auth-form__submit {
  width: 100%;
  margin-top: 0.25rem;
  border: none;
  cursor: pointer;
}

.auth-page__alt {
  text-align: center;
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-page__alt a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-page__alt a:hover {
  text-decoration: underline;
}

@media (max-width: 1023px) {
  .auth-page {
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding-top: clamp(1.75rem, 6vmin, 2.75rem);
    padding-bottom: clamp(2rem, 6vh, 3rem);
    padding-left: max(1.35rem, env(safe-area-inset-left));
    padding-right: max(1.35rem, env(safe-area-inset-right));
    min-height: calc(
      100dvh - var(--header-h) - env(safe-area-inset-top, 0px) - clamp(5rem, 14vh, 10rem)
    );
  }

  .auth-page__title {
    margin: 0 0 0.65rem;
  }

  .auth-page__lede {
    margin: 0 0 1.35rem;
  }

  .auth-form {
    gap: 1rem;
  }

  .auth-form input {
    font-size: max(16px, 1rem);
  }

  .auth-page__alt {
    margin: 1.35rem 0 0;
  }
}

.auth-page__alt .btn {
  display: inline-block;
  margin: 0.25rem 0.35rem;
  text-decoration: none;
  width: auto;
  min-width: 8rem;
}

.alert {
  border-radius: 0.4rem;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
}

.alert ul {
  margin: 0;
  padding-left: 1.1rem;
}

.alert--error {
  background: color-mix(in srgb, #c00 12%, var(--card-bg));
  border: 1px solid color-mix(in srgb, #c00 35%, var(--border));
  color: var(--text);
}

.theme-classic .alert--error {
  background: #fdeaea;
  border-color: #e8b4b4;
}

.alert--success {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--text);
}

.account-details {
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  display: grid;
  gap: 1rem;
}

.account-details div {
  display: grid;
  gap: 0.2rem;
}

.account-details dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0;
}

.account-details dd {
  margin: 0;
  font-size: 1.05rem;
}

/* User dashboard */
.dashboard {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.dashboard__header {
  margin-bottom: 2rem;
  text-align: center;
}

.dashboard__eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.dashboard__title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.dashboard__name {
  color: var(--accent);
}

.dashboard__lede {
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 auto;
  font-size: 1rem;
}

.dashboard__grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (min-width: 700px) {
  .dashboard__grid {
    grid-template-columns: 1fr 1fr;
  }

  .dash-card--wide {
    grid-column: 1 / -1;
  }
}

.dash-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem 1.35rem;
  transition: background 0.45s var(--ease);
}

.dash-card__title {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 1rem;
}

.dash-card__list {
  margin: 0;
  display: grid;
  gap: 1rem;
}

.dash-card__list div {
  display: grid;
  gap: 0.25rem;
}

.dash-card__list dt {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

.dash-card__list dd {
  margin: 0;
  font-size: 1.05rem;
  word-break: break-word;
}

.dash-card__status {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
}

.dash-card__note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.dash-card__bullets {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.dash-card__bullets a {
  color: var(--accent);
  font-weight: 600;
}

.dash-card__bullets a:hover {
  text-decoration: underline;
}

.dash-card__actions {
  margin: 1.25rem 0 0;
}

.dash-card--referral {
  margin-bottom: 1.25rem;
}

.referrals-table {
  min-width: 52rem;
}

.balance-log-summary {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--card-bg));
}

.balance-log-summary__label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.balance-log-summary__value {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 600;
  font-family: var(--font-serif);
  color: var(--text);
}

.balance-log-footnote {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.dashboard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 0;
}

.main-nav .nav-auth--out {
  font-weight: 600;
  color: var(--accent);
}

/* Dashboard stat strip */
.dashboard__stats {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 600px) {
  .dashboard__stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.25rem 1.15rem;
}

.stat-card__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 0.4rem;
}

.stat-card__value {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.stat-card__value--accent {
  color: var(--accent);
}

.stat-card__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

/* Static content pages (About) */
.page-shell {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.page-shell--wide {
  max-width: 56rem;
}

.page-shell__inner {
  width: 100%;
}

.page-shell__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 0.5rem;
  text-align: center;
}

.page-shell__lede {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

.markdown-block h2 {
  font-size: 1.15rem;
  font-family: var(--font-sans);
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.markdown-block p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Transaction table */
.tx-empty {
  text-align: center;
  color: var(--text-muted);
  margin: 2rem 0;
}

.tx-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card-bg);
}

.tx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tx-table th,
.tx-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.tx-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tx-table tbody tr:last-child td {
  border-bottom: none;
}

.tx-table__n {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tx-table__note {
  max-width: 20rem;
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-all;
}

.tx-addr {
  display: block;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8rem;
}

.tx-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.tx-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

body.theme-premium .tx-pill--deposit {
  color: #b8a060;
  background: var(--accent-soft);
}

body.theme-premium .tx-pill--withdraw {
  color: #c08080;
  background: rgba(200, 100, 100, 0.12);
}

body.theme-premium .tx-pill--profit {
  color: #2d8a5a;
  background: rgba(45, 138, 90, 0.12);
}

body.theme-premium .tx-pill--referral {
  color: #2a6a8a;
  background: rgba(42, 106, 138, 0.14);
}

body.theme-classic .tx-pill--deposit {
  color: #4a6b4a;
  background: rgba(74, 107, 74, 0.12);
}

body.theme-classic .tx-pill--withdraw {
  color: #6b1c23;
  background: var(--accent-soft);
}

body.theme-classic .tx-pill--profit {
  color: #1e5a3a;
  background: rgba(30, 90, 58, 0.1);
}

body.theme-classic .tx-pill--referral {
  color: #1a5a6e;
  background: rgba(26, 90, 110, 0.12);
}

/* Dashboard referral */
.ref-code {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.ref-link-block {
  margin: 0;
}
.ref-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
  max-width: 100%;
}
.ref-link-input {
  display: block;
  flex: 1 1 12rem;
  min-width: 0;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0.4rem 0.5rem;
  font-size: 0.78rem;
  font-family: ui-monospace, Consolas, monospace;
  color: var(--text);
  background: var(--card-bg, #fff);
  border: 1px solid var(--border);
  border-radius: 0.35rem;
}
.ref-link-btn {
  flex: 0 0 auto;
  align-self: stretch;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  white-space: nowrap;
}
.ref-link-status {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted, #666);
  min-height: 1.2em;
}
.ref-link-status:not([hidden]) {
  display: block;
}

/* Deposit: NOWPayments + demo */
.auth-page--wide .auth-page__inner {
  max-width: 34rem;
}

.deposit-layout {
  text-align: left;
}

.deposit-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem 1.35rem;
  margin-bottom: 1.5rem;
}

.deposit-panel--primary {
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
}

.deposit-panel__h {
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-sans);
  margin: 0 0 0.5rem;
}

.deposit-panel__p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 1rem;
}

.code-inline {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 0.2rem;
}

.code-block {
  display: block;
  font-size: 0.78rem;
  font-family: ui-monospace, Consolas, monospace;
  background: var(--input-bg);
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  border-radius: 0.35rem;
  margin: 0.4rem 0 0;
  word-break: break-all;
  line-height: 1.4;
}

.deposit-checklist {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.15rem 1.25rem;
  margin-top: 0.5rem;
}

.deposit-checklist__h {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  font-family: var(--font-sans);
}

.deposit-checklist__ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.deposit-checklist__ol a {
  color: var(--accent);
  font-weight: 500;
}

/* Landing: profit plan banner */
.profit-banner {
  scroll-margin-top: calc(var(--header-h, 4rem) + 0.5rem);
}

.profit-banner__inner {
  max-width: 52rem;
  margin: 0 auto;
}

.profit-banner__title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  text-align: center;
  margin: 0 0 1rem;
  color: var(--text);
}

.profit-banner__rules {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (min-width: 560px) {
  .profit-banner__rules {
    grid-template-columns: 1fr 1fr;
  }
}

.profit-banner__intro {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 1rem;
  text-align: center;
}

.profit-banner__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card-bg);
}

.profit-banner__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.profit-banner__table th,
.profit-banner__table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.profit-banner__table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.profit-banner__table tbody tr:last-child td {
  border-bottom: none;
}

.profit-banner__table td:last-child,
.profit-banner__table th:last-child {
  text-align: right;
}

.profit-banner__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.35rem;
}

/* Member withdraw: banner rules strip */
.withdraw-banner-rules {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 0.45rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.withdraw-banner-rules__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.withdraw-banner-rules__list strong {
  color: var(--text);
}
