/* Dark Market Watch — conversion and onboarding overhaul */

:root {
  --cro-text-muted: #c8bda5;
  --cro-text-soft: #a99d84;
  --cro-panel: rgba(14, 12, 10, 0.92);
  --cro-panel-raised: rgba(24, 20, 16, 0.96);
  --cro-brass: #c9a45c;
  --cro-brass-light: #e2c47e;
  --cro-discord: #5865f2;
  --cro-success: #8eb37d;
}

/* Logged-out conversion experience */
.logged-out-landing[hidden] {
  display: none !important;
}

body.is-logged-out .hub-layout {
  display: none;
}

body.is-logged-out .site-header {
  margin-bottom: 18px;
}

.logged-out-landing {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 32px;
}

.landing-hero,
.landing-proof,
.landing-how {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201, 164, 92, 0.34);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.025), transparent 42%),
    linear-gradient(180deg, rgba(25, 21, 17, 0.98), rgba(11, 9, 8, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    inset 0 -18px 30px rgba(0, 0, 0, 0.23),
    0 14px 34px rgba(0, 0, 0, 0.34);
}

.landing-hero::before,
.landing-proof::before,
.landing-how::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--cro-brass), transparent);
  opacity: 0.76;
}

.landing-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 470px;
  padding: clamp(28px, 5vw, 62px);
}

.landing-kicker,
.proof-kicker {
  margin: 0 0 10px;
  color: var(--cro-brass-light);
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.landing-hero h2 {
  max-width: 760px;
  margin: 0;
  color: #f0e5cb;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(2.35rem, 5.4vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.landing-lede {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--cro-text-muted);
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  line-height: 1.56;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.landing-cta,
.landing-secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 11px 17px;
  border-radius: 3px;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 140ms ease, filter 140ms ease, border-color 140ms ease;
}

.landing-cta {
  color: #fff;
  border: 1px solid #7f8aff;
  background: linear-gradient(180deg, #6875f3, #4d59ce);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -4px 9px rgba(26, 29, 88, 0.34),
    0 8px 18px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(88, 101, 242, 0.18);
}

.landing-secondary-cta {
  color: #e9dfc8;
  border: 1px solid rgba(201, 164, 92, 0.48);
  background: rgba(38, 32, 26, 0.84);
}

.landing-cta:hover,
.landing-secondary-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.landing-trust {
  display: grid;
  gap: 7px;
  margin: 22px 0 0;
  padding: 15px 16px;
  color: var(--cro-text-muted);
  border: 1px solid rgba(142, 179, 125, 0.25);
  background: rgba(43, 66, 37, 0.15);
  font-size: 0.94rem;
  line-height: 1.45;
}

.landing-trust strong {
  color: #dcebd4;
}

.landing-trust span {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.landing-trust span::before {
  content: "✓";
  color: var(--cro-success);
  font-weight: 800;
}

.landing-proof {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 470px;
  padding: clamp(22px, 3vw, 38px);
}

.landing-proof h3 {
  margin: 0 0 18px;
  color: #eadfc5;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.discord-proof-window {
  overflow: hidden;
  border: 1px solid #313338;
  border-radius: 10px;
  background: #313338;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42);
}

.discord-proof-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  color: #b5bac1;
  background: #2b2d31;
  font: 600 0.78rem/1 system-ui, sans-serif;
}

.discord-proof-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4e5058;
}

.discord-proof-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  padding: 18px 16px 21px;
  font-family: system-ui, sans-serif;
}

.discord-proof-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #f2dfb2;
  border: 1px solid #7d6537;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #55482f, #191714 72%);
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.7rem;
  font-weight: 800;
}

.discord-proof-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: baseline;
  color: #f2f3f5;
  font-size: 0.93rem;
  font-weight: 650;
}

.discord-proof-bot {
  padding: 2px 5px;
  color: #fff;
  border-radius: 3px;
  background: #5865f2;
  font-size: 0.62rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.discord-proof-time {
  color: #949ba4;
  font-size: 0.7rem;
  font-weight: 400;
}

.discord-alert-card {
  margin-top: 8px;
  padding: 14px;
  border-left: 4px solid #f0b232;
  border-radius: 4px;
  background: #2b2d31;
}

.discord-alert-title {
  color: #f2f3f5;
  font-size: 1rem;
  font-weight: 750;
}

.discord-alert-copy {
  margin-top: 6px;
  color: #dbdee1;
  font-size: 0.86rem;
  line-height: 1.42;
}

.discord-alert-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
}

.discord-alert-field span {
  display: block;
  color: #b5bac1;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.discord-alert-field strong {
  display: block;
  margin-top: 3px;
  color: #f2f3f5;
  font-size: 0.86rem;
}

.discord-alert-footer {
  margin-top: 13px;
  color: #949ba4;
  font-size: 0.7rem;
}

.landing-how {
  grid-column: 1 / -1;
  padding: 24px clamp(20px, 4vw, 46px) 27px;
}

.landing-how h3 {
  margin: 0;
  color: #ebdfc4;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.25rem;
  text-align: center;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.landing-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 15px;
  border: 1px solid rgba(201, 164, 92, 0.18);
  background: rgba(0, 0, 0, 0.15);
}

.landing-step-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--cro-brass-light);
  border: 1px solid rgba(201, 164, 92, 0.45);
  border-radius: 50%;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.72rem;
  font-weight: 800;
}

.landing-step strong {
  display: block;
  color: #e9dfc7;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.landing-step p {
  margin: 5px 0 0;
  color: var(--cro-text-muted);
  font-size: 0.9rem;
  line-height: 1.43;
}

/* Dashboard conversion improvements */
.helper-text,
.stat-filter-row .helper-text,
.item-range-source-note,
.stage-heading p,
.panel-heading p,
.section-heading p,
.watch-state p {
  color: var(--cro-text-muted) !important;
}

.form-actions {
  justify-content: space-between;
  align-items: center;
}

#cancel-btn.button--quiet {
  order: 2;
  min-height: 38px;
  padding: 7px 4px;
  color: var(--cro-text-soft);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
  text-decoration-color: rgba(169, 157, 132, 0.42);
  text-underline-offset: 4px;
}

#cancel-btn.button--quiet:hover {
  color: #dfd3b8;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.025);
}

.alerts-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -4px 0 13px;
}

.alerts-toolbar-copy {
  color: var(--cro-text-muted);
  font-size: 0.86rem;
}

.alert-view-toggle {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid rgba(201, 164, 92, 0.3);
  border-radius: 3px;
  background: rgba(10, 9, 8, 0.58);
}

.alert-view-toggle button {
  min-height: 36px;
  padding: 7px 11px;
  color: var(--cro-text-soft);
  border: 0;
  border-right: 1px solid rgba(201, 164, 92, 0.18);
  background: transparent;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.68rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.alert-view-toggle button:last-child {
  border-right: 0;
}

.alert-view-toggle button[aria-pressed="true"] {
  color: #f0e3c6;
  background: rgba(201, 164, 92, 0.16);
  box-shadow: inset 0 -2px 0 var(--cro-brass);
}

.alert-card .card-header {
  position: relative;
  padding-left: 48px;
  min-height: 42px;
}

.alert-item-icon {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  color: #e7d39f;
  border: 1px solid rgba(201, 164, 92, 0.38);
  border-radius: 4px;
  background:
    radial-gradient(circle at 35% 28%, rgba(201, 164, 92, 0.22), transparent 38%),
    linear-gradient(145deg, #2a241d, #12100e);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 4px 10px rgba(0, 0, 0, 0.32);
  font-size: 1.12rem;
  line-height: 1;
}

.alert-item-icon[data-category="magic"] {
  color: #bca8ff;
  border-color: rgba(151, 121, 255, 0.42);
}

.alert-item-icon[data-category="shield"] {
  color: #b9c7d8;
  border-color: rgba(160, 183, 208, 0.4);
}

.alert-item-icon[data-category="jewelry"] {
  color: #efd67d;
}

.alerts-grid.is-compact {
  grid-template-columns: 1fr !important;
}

.alerts-grid.is-compact .alert-card {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(280px, 1.35fr) auto;
  gap: 14px;
  align-items: center;
  padding-top: 11px;
  padding-bottom: 11px;
}

.alerts-grid.is-compact .alert-card .card-header,
.alerts-grid.is-compact .alert-card .card-body,
.alerts-grid.is-compact .alert-card .card-actions {
  margin: 0;
}

.alerts-grid.is-compact .alert-card .card-actions {
  justify-content: flex-end;
  padding-top: 0;
  border-top: 0;
}

.alerts-grid.is-compact .alert-card .card-actions .delete-btn {
  margin-left: 0;
}

.toast.toast--info {
  color: #e7e5ff;
  border-color: rgba(125, 134, 234, 0.8);
  background:
    linear-gradient(180deg, rgba(84, 95, 202, 0.35), rgba(28, 31, 72, 0.97)),
    #1b1e3f;
}

@media (max-width: 960px) {
  .logged-out-landing {
    grid-template-columns: 1fr;
  }

  .landing-hero,
  .landing-proof {
    min-height: 0;
  }

  .landing-how {
    grid-column: 1;
  }

  .alerts-grid.is-compact .alert-card {
    grid-template-columns: 1fr;
  }

  .alerts-grid.is-compact .alert-card .card-actions {
    justify-content: flex-start;
    padding-top: 9px;
    border-top: 1px solid rgba(201, 164, 92, 0.14);
  }
}

@media (max-width: 700px) {
  .logged-out-landing {
    gap: 12px;
  }

  .landing-hero,
  .landing-proof,
  .landing-how {
    padding: 20px 17px;
  }

  .landing-hero h2 {
    font-size: clamp(2.25rem, 13vw, 3.6rem);
  }

  .landing-actions {
    flex-direction: column;
  }

  .landing-cta,
  .landing-secondary-cta {
    width: 100%;
  }

  .landing-steps,
  .discord-alert-fields {
    grid-template-columns: 1fr;
  }

  .form-actions {
    align-items: stretch;
  }

  #cancel-btn.button--quiet {
    width: auto;
    align-self: center;
  }

  .alerts-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .alert-view-toggle {
    width: 100%;
  }

  .alert-view-toggle button {
    flex: 1;
  }
}
