:root {
  --discover-max-width: 1480px;
  --discover-text-main: #f5f9ff;
  --discover-text-secondary: #d8e7ff;
  --discover-text-muted: #b7cce8;
  --discover-border-soft: rgba(156, 203, 255, 0.38);
  --discover-border-strong: rgba(196, 225, 255, 0.76);
  --discover-card-bg: rgba(8, 31, 58, 0.84);
  --discover-card-hover-glow: 0 24px 52px rgba(3, 12, 28, 0.55);
  --discover-bg-top: #04101f;
  --discover-bg-mid: #05182e;
  --discover-bg-bottom: #08182e;
  --discover-accent: #88cfff;
  --discover-cyan: #69e6d1;
  --discover-return-up: #58e7ad;
  --discover-return-down: #ff919b;
  --discover-surface-hero: linear-gradient(150deg, rgba(6, 26, 50, 0.96), rgba(9, 46, 84, 0.94) 56%, rgba(6, 23, 46, 0.96));
  --discover-surface-panel: linear-gradient(154deg, rgba(6, 24, 46, 0.97), rgba(10, 41, 74, 0.95) 56%, rgba(5, 21, 40, 0.98));
  --discover-surface-code: linear-gradient(162deg, rgba(8, 34, 64, 0.98), rgba(8, 28, 54, 0.97));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  color: var(--discover-text-main);
  font-family: var(--ct-font-sans, "Avenir Next", "SF Pro Display", "Segoe UI", sans-serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(54vw 52vw at 90% -16%, rgba(130, 193, 255, 0.28), transparent 72%),
    radial-gradient(56vw 54vw at 12% -22%, rgba(97, 171, 255, 0.22), transparent 72%),
    radial-gradient(44vw 40vw at 84% 96%, rgba(99, 229, 210, 0.13), transparent 76%),
    linear-gradient(118deg, rgba(136, 207, 255, 0.1), transparent 34%),
    linear-gradient(180deg, var(--discover-bg-top) 0%, var(--discover-bg-mid) 42%, var(--discover-bg-bottom) 100%);
  opacity: 0;
}

body.ready {
  opacity: 1;
  transition: opacity 180ms ease;
}

.page-shell,
main,
#discover-board,
#discover-sections {
  max-width: 100%;
  overflow-x: clip;
}

.top-btn {
  white-space: nowrap;
}

.top-btn.is-hidden {
  display: none;
}

.discover-stage {
  width: min(var(--discover-max-width), calc(100% - 24px));
  margin: 0 auto;
  padding: 14px 0 42px;
  min-width: 0;
}

.discover-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 30px 14px 26px 12px;
  border: 1px solid rgba(170, 212, 255, 0.56);
  background:
    radial-gradient(circle at 90% -8%, rgba(141, 204, 255, 0.34), rgba(141, 204, 255, 0) 46%),
    radial-gradient(circle at 16% 88%, rgba(90, 232, 205, 0.2), rgba(90, 232, 205, 0) 52%),
    var(--discover-surface-hero);
  box-shadow:
    inset 0 0 0 1px rgba(152, 210, 255, 0.12),
    0 26px 54px rgba(2, 10, 24, 0.46);
  padding: clamp(18px, 3vw, 30px);
  min-width: 0;
}

.discover-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.1), transparent 38%),
    radial-gradient(circle at 86% 8%, rgba(150, 216, 255, 0.24), transparent 38%);
  pointer-events: none;
}

.discover-hero > * {
  position: relative;
  z-index: 1;
}

.discover-hero-title {
  margin: 0;
  color: #f2f7ff;
  font-size: clamp(30px, 4.8vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 730;
}

.discover-hero-copy {
  margin: 8px 0 0;
  color: var(--discover-text-secondary);
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.45;
}

.discover-hero-controls {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.window-switch {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(147, 191, 242, 0.42);
  background: linear-gradient(180deg, rgba(8, 31, 58, 0.88), rgba(8, 23, 45, 0.82));
  box-shadow: inset 0 0 0 1px rgba(144, 206, 255, 0.08);
  padding: 5px;
  min-width: 0;
}

.window-btn {
  min-height: 40px;
  min-width: 116px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #b7cff0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0 14px;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.window-btn:hover,
.window-btn:focus-visible {
  color: #e8f2ff;
  border-color: rgba(168, 200, 249, 0.3);
}

.window-btn.active {
  color: #f3f8ff;
  border-color: rgba(181, 217, 255, 0.6);
  background: linear-gradient(180deg, rgba(33, 93, 161, 0.7), rgba(18, 53, 94, 0.74));
  box-shadow: inset 0 0 0 1px rgba(146, 210, 255, 0.12);
}

.discover-search {
  height: 48px;
  width: min(420px, 100%);
  max-width: 420px;
  border-radius: 999px;
  border: 1px solid rgba(160, 202, 252, 0.4);
  background:
    linear-gradient(180deg, rgba(9, 35, 66, 0.9), rgba(7, 24, 48, 0.86)),
    rgba(8, 20, 39, 0.78);
  box-shadow: inset 0 0 0 1px rgba(146, 210, 255, 0.08);
  padding: 0 8px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.discover-search-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #eaf3ff;
  font-size: 14px;
  font-weight: 600;
}

.discover-search-input::placeholder {
  color: rgba(190, 212, 242, 0.76);
}

.discover-search-submit {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(176, 213, 255, 0.4);
  background: linear-gradient(180deg, rgba(16, 54, 98, 0.76), rgba(12, 38, 70, 0.74));
  color: rgba(236, 245, 255, 0.86);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.discover-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-top: 16px;
  border-radius: 30px 12px 28px 14px;
  border: 1px solid rgba(171, 214, 255, 0.52);
  background:
    radial-gradient(circle at 94% -12%, rgba(137, 201, 255, 0.28), rgba(137, 201, 255, 0) 52%),
    radial-gradient(circle at 10% 96%, rgba(95, 229, 206, 0.17), rgba(95, 229, 206, 0) 56%),
    var(--discover-surface-panel);
  box-shadow:
    inset 0 0 0 1px rgba(150, 210, 255, 0.12),
    0 22px 52px rgba(2, 10, 24, 0.46);
  padding: clamp(14px, 2.4vw, 24px);
  min-width: 0;
}

.discover-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(122deg, rgba(255, 255, 255, 0.08), transparent 36%),
    radial-gradient(circle at 84% 12%, rgba(156, 213, 255, 0.22), transparent 44%);
  pointer-events: none;
}

.discover-panel > * {
  position: relative;
  z-index: 1;
}

.discover-sort-note {
  margin: 0;
  color: rgba(225, 238, 255, 0.97);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.meta-note {
  margin: 8px 0 0;
  color: #cdddf6;
  font-size: 13px;
}

.discover-status {
  margin-top: 8px;
  min-height: 18px;
  color: rgba(222, 235, 253, 0.98);
  font-size: 13px;
}

.discover-sort-note,
.meta-note,
.discover-status {
  display: none;
}

.discover-status.error {
  display: block;
  color: #ffabab;
}

.discover-sections {
  margin-top: 14px;
  display: grid;
  gap: 22px;
  min-width: 0;
}

.discover-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.discover-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.discover-section-title {
  margin: 0;
  color: #eff6ff;
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.discover-section-note {
  margin: 0;
  color: rgba(160, 184, 220, 0.9);
  font-size: 12px;
}

.discover-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 14px;
  min-width: 0;
}

.discover-card {
  --card-tone-a: rgba(11, 43, 82, 0.97);
  --card-tone-b: rgba(16, 68, 121, 0.91);
  --card-tone-c: rgba(8, 29, 56, 0.97);
  --card-glow-a: rgba(148, 213, 255, 0.24);
  --card-glow-b: rgba(103, 234, 211, 0.2);
  --card-edge: rgba(170, 211, 255, 0.52);
  --card-radius: 28px 12px 24px 10px;
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius);
  border: 1px solid var(--card-edge);
  background: linear-gradient(152deg, var(--card-tone-a), var(--card-tone-b) 56%, var(--card-tone-c));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    inset 0 0 0 1px rgba(148, 208, 255, 0.1),
    0 14px 32px rgba(3, 12, 28, 0.42);
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
  min-height: 0;
  min-width: 0;
  opacity: 1;
  transform: translateY(0);
  animation: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.discover-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 38%),
    radial-gradient(circle at 88% 10%, var(--card-glow-a), transparent 40%),
    radial-gradient(circle at 18% 88%, var(--card-glow-b), transparent 46%);
  pointer-events: none;
}

.discover-card > * {
  position: relative;
  z-index: 1;
}

.discover-card.discover-card-tone-1 {
  --card-tone-a: rgba(11, 43, 82, 0.97);
  --card-tone-b: rgba(16, 68, 121, 0.91);
  --card-tone-c: rgba(8, 29, 56, 0.96);
  --card-glow-a: rgba(148, 213, 255, 0.24);
  --card-glow-b: rgba(103, 234, 211, 0.2);
  --card-edge: rgba(170, 211, 255, 0.52);
  --card-radius: 28px 12px 24px 10px;
}

.discover-card.discover-card-tone-2 {
  --card-tone-a: rgba(18, 39, 82, 0.96);
  --card-tone-b: rgba(39, 64, 126, 0.92);
  --card-tone-c: rgba(10, 24, 58, 0.97);
  --card-glow-a: rgba(188, 173, 255, 0.18);
  --card-glow-b: rgba(117, 203, 255, 0.18);
  --card-edge: rgba(182, 199, 255, 0.44);
  --card-radius: 16px 30px 12px 26px;
}

.discover-card.discover-card-tone-3 {
  --card-tone-a: rgba(9, 48, 70, 0.96);
  --card-tone-b: rgba(12, 86, 102, 0.88);
  --card-tone-c: rgba(7, 31, 53, 0.96);
  --card-glow-a: rgba(128, 242, 216, 0.22);
  --card-glow-b: rgba(142, 209, 255, 0.16);
  --card-edge: rgba(150, 225, 230, 0.46);
  --card-radius: 30px 18px 8px 24px;
}

.discover-card.discover-card-tone-4 {
  --card-tone-a: rgba(20, 34, 69, 0.97);
  --card-tone-b: rgba(56, 77, 129, 0.9);
  --card-tone-c: rgba(11, 28, 56, 0.97);
  --card-glow-a: rgba(164, 198, 255, 0.22);
  --card-glow-b: rgba(98, 222, 197, 0.15);
  --card-edge: rgba(170, 196, 246, 0.46);
  --card-radius: 14px 24px 30px 10px;
}

.discover-card.discover-card-tone-5 {
  --card-tone-a: rgba(13, 37, 77, 0.96);
  --card-tone-b: rgba(9, 73, 128, 0.92);
  --card-tone-c: rgba(8, 28, 60, 0.97);
  --card-glow-a: rgba(127, 223, 255, 0.2);
  --card-glow-b: rgba(86, 230, 191, 0.17);
  --card-edge: rgba(153, 212, 247, 0.48);
  --card-radius: 24px 8px 26px 18px;
}

.discover-card.discover-card-tone-6 {
  --card-tone-a: rgba(14, 32, 66, 0.97);
  --card-tone-b: rgba(27, 55, 108, 0.91);
  --card-tone-c: rgba(9, 27, 58, 0.97);
  --card-glow-a: rgba(177, 191, 255, 0.17);
  --card-glow-b: rgba(118, 210, 255, 0.18);
  --card-edge: rgba(166, 194, 241, 0.44);
  --card-radius: 12px 26px 14px 30px;
}

.discover-agent-link {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.discover-agent-link:focus-visible {
  outline: 2px solid rgba(168, 207, 255, 0.82);
  outline-offset: 3px;
}

.discover-agent-link:hover .discover-agent-name,
.discover-agent-link:focus-visible .discover-agent-name {
  color: #f6fbff;
  text-decoration: none;
}

.discover-agent-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.discover-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 999px;
  border: 1px solid rgba(182, 218, 255, 0.48);
  background:
    radial-gradient(circle at 30% 22%, rgba(149, 211, 255, 0.3), transparent 46%),
    linear-gradient(150deg, rgba(9, 34, 66, 0.86), rgba(8, 26, 52, 0.84));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(146, 210, 255, 0.1);
}

.discover-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discover-avatar > span:not(.discover-avatar-live-badge) {
  color: #e6f2ff;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 3px 10px rgba(71, 132, 214, 0.5);
}

.discover-avatar.is-live {
  position: relative;
  overflow: hidden;
}

.discover-avatar.is-live img {
  border-radius: inherit;
}

.discover-avatar .discover-avatar-live-badge {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  height: 12px;
  min-width: 24px;
  padding: 0 4px;
  border-radius: 999px;
  border: 1px solid rgba(146, 246, 198, 0.88);
  background: linear-gradient(180deg, rgba(48, 198, 133, 0.98), rgba(22, 126, 86, 0.98));
  color: #effff6;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 10px;
  text-align: center;
  box-shadow:
    0 3px 8px rgba(4, 18, 12, 0.34),
    inset 0 0 0 1px rgba(230, 255, 243, 0.18);
  text-shadow: none;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

.discover-avatar-sm .discover-avatar-live-badge {
  display: none;
}

.discover-agent-top {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.discover-agent-name {
  margin: 0;
  min-width: 0;
  color: #f3f8ff;
  font-size: clamp(18px, 1.45vw, 24px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discover-agent-sub {
  margin: 0;
  color: rgba(214, 234, 255, 0.96);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discover-rank-pill {
  margin-left: auto;
  border-radius: 999px;
  border: 1px solid rgba(194, 224, 255, 0.58);
  background: linear-gradient(180deg, rgba(31, 72, 125, 0.86), rgba(13, 34, 62, 0.9));
  color: rgba(229, 239, 255, 0.94);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
  padding: 4px 8px;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(146, 210, 255, 0.15);
}

.discover-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.discover-metric {
  border-radius: 12px;
  border: 1px solid rgba(173, 211, 255, 0.45);
  background:
    linear-gradient(145deg, rgba(11, 37, 68, 0.86), rgba(8, 28, 56, 0.78)),
    rgba(14, 31, 57, 0.72);
  padding: 8px 9px;
  display: grid;
  gap: 4px;
  min-width: 0;
  box-shadow: inset 0 0 0 1px rgba(144, 208, 255, 0.08);
}

.discover-metric.metric-primary {
  border-color: rgba(186, 221, 255, 0.56);
  background:
    radial-gradient(circle at 85% 18%, rgba(112, 206, 255, 0.24), rgba(112, 206, 255, 0) 46%),
    linear-gradient(144deg, rgba(10, 40, 76, 0.92), rgba(9, 31, 59, 0.86));
}

.discover-metric-k {
  color: rgba(221, 236, 255, 0.96);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discover-metric-v {
  color: #f5faff;
  font-size: 16px;
  font-weight: 680;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discover-metric-sub {
  color: rgba(189, 210, 236, 0.94);
  font-size: 11px;
  font-weight: 560;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discover-metric-sub.is-up {
  color: rgba(119, 236, 179, 0.98);
}

.discover-metric-sub.is-down {
  color: rgba(255, 170, 178, 0.98);
}

.discover-metric-sub.is-flat {
  color: rgba(194, 214, 238, 0.98);
}

.discover-return {
  font-size: clamp(28px, 3vw, 32px);
  letter-spacing: -0.02em;
  font-weight: 700;
  text-shadow: 0 6px 18px rgba(2, 14, 30, 0.42);
}

.discover-return-micro {
  display: none;
}

.discover-return.up {
  color: var(--discover-return-up);
}

.discover-return.down {
  color: var(--discover-return-down);
}

.discover-dna {
  border-radius: 14px;
  border: 1px solid rgba(169, 211, 255, 0.44);
  background:
    linear-gradient(144deg, rgba(10, 33, 62, 0.82), rgba(8, 29, 54, 0.78)),
    rgba(13, 30, 56, 0.72);
  padding: 10px 11px;
  display: grid;
  gap: 8px;
  min-width: 0;
  transition: border-color 180ms ease, background 180ms ease;
  box-shadow: inset 0 0 0 1px rgba(146, 210, 255, 0.08);
}

.discover-dna-title {
  margin: 0;
  color: rgba(228, 240, 255, 0.98);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.discover-dna-list {
  margin: 0;
  padding-left: 16px;
  color: rgba(241, 248, 255, 0.99);
  font-size: 13px;
  line-height: 1.48;
  display: grid;
  gap: 6px;
}

.discover-dna-list li {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.discover-dna-link {
  width: fit-content;
  border: 0;
  background: transparent;
  color: rgba(186, 225, 255, 0.96);
  font-size: 12px;
  font-weight: 640;
  letter-spacing: 0.01em;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.discover-dna-link:hover,
.discover-dna-link:focus-visible {
  color: #d8edff;
  text-decoration: underline;
}

.discover-dna-link:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  text-decoration: none;
}

.discover-agent-cta-row {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.discover-view-btn,
.discover-code-btn {
  appearance: none;
  -webkit-appearance: none;
  margin: 0 !important;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(177, 215, 255, 0.54);
  color: #f0f6ff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  box-sizing: border-box;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: border-color 140ms ease, filter 140ms ease, background 140ms ease, transform 140ms ease;
}

.discover-view-btn {
  background: linear-gradient(180deg, rgba(35, 101, 174, 0.84), rgba(20, 58, 102, 0.84));
  box-shadow: inset 0 0 0 1px rgba(146, 210, 255, 0.14);
}

.discover-code-btn {
  background: linear-gradient(180deg, rgba(20, 55, 96, 0.84), rgba(10, 34, 66, 0.84));
  box-shadow: inset 0 0 0 1px rgba(133, 206, 255, 0.12);
}

.discover-view-btn:hover,
.discover-view-btn:focus-visible,
.discover-code-btn:hover,
.discover-code-btn:focus-visible {
  filter: brightness(1.08);
  border-color: rgba(205, 229, 255, 0.72);
  transform: translateY(-1px);
}

.discover-code-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.discover-section-foot {
  min-height: 20px;
}

.discover-section-more {
  border: 0;
  background: transparent;
  color: #b7dcff;
  font-size: 13px;
  font-weight: 680;
  padding: 0;
  cursor: pointer;
}

.discover-section-more:hover,
.discover-section-more:focus-visible {
  color: #e6f2ff;
  text-decoration: underline;
}

.discover-recent-transactions {
  margin-top: 18px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.discover-recent-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.discover-recent-list {
  min-width: 0;
}

.discover-recent-items {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.discover-recent-foot {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}

.discover-recent-item {
  --recent-tone-a: rgba(8, 30, 56, 0.86);
  --recent-tone-b: rgba(12, 44, 78, 0.84);
  --recent-edge: rgba(169, 211, 255, 0.46);
  position: relative;
  overflow: hidden;
  border-radius: 18px 12px 16px 10px;
  border: 1px solid var(--recent-edge);
  background: linear-gradient(144deg, var(--recent-tone-a), var(--recent-tone-b));
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.5fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  box-shadow: inset 0 0 0 1px rgba(148, 210, 255, 0.08);
}

.discover-recent-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.07), transparent 42%),
    radial-gradient(circle at 86% 12%, rgba(142, 212, 255, 0.2), transparent 42%);
  pointer-events: none;
}

.discover-recent-item > * {
  position: relative;
  z-index: 1;
}

.discover-recent-item:nth-child(3n + 2) {
  --recent-tone-a: rgba(10, 28, 60, 0.86);
  --recent-tone-b: rgba(24, 50, 95, 0.84);
  --recent-edge: rgba(175, 200, 255, 0.44);
  border-radius: 12px 22px 14px 18px;
}

.discover-recent-item:nth-child(3n + 3) {
  --recent-tone-a: rgba(8, 35, 56, 0.84);
  --recent-tone-b: rgba(9, 61, 83, 0.8);
  --recent-edge: rgba(155, 220, 231, 0.44);
  border-radius: 20px 10px 18px 14px;
}

.discover-recent-agent {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.discover-recent-agent:hover .discover-recent-agent-name,
.discover-recent-agent:focus-visible .discover-recent-agent-name {
  color: #f4f9ff;
  text-decoration: underline;
}

.discover-avatar-sm {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.discover-avatar-sm span {
  font-size: 16px;
}

.discover-recent-agent-name {
  min-width: 0;
  color: rgba(241, 248, 255, 0.99);
  font-size: 13px;
  font-weight: 670;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discover-recent-trade {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.discover-recent-side {
  border-radius: 999px;
  border: 1px solid rgba(182, 213, 251, 0.6);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.discover-recent-side.buy {
  color: #8ef0b7;
  border-color: rgba(116, 239, 172, 0.68);
  background: rgba(9, 64, 36, 0.56);
}

.discover-recent-side.sell {
  color: #ffbec4;
  border-color: rgba(255, 145, 155, 0.66);
  background: rgba(79, 22, 33, 0.58);
}

.discover-recent-side.trade {
  color: #deecff;
  border-color: rgba(174, 209, 254, 0.58);
  background: rgba(15, 43, 82, 0.58);
}

.discover-recent-symbol {
  color: rgba(240, 247, 255, 0.99);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.discover-recent-meta {
  min-width: 0;
  color: rgba(210, 226, 247, 0.94);
  font-size: 12px;
  font-weight: 560;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discover-recent-time {
  color: rgba(187, 206, 233, 0.92);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}

.discover-empty {
  border-radius: 16px;
  border: 1px dashed rgba(170, 206, 252, 0.36);
  background: linear-gradient(148deg, rgba(8, 30, 56, 0.58), rgba(10, 37, 66, 0.58));
  color: rgba(190, 214, 243, 0.92);
  padding: 20px;
  font-size: 14px;
}

.discover-code-layer {
  position: fixed;
  inset: 0;
  z-index: 530;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.discover-code-layer.open {
  pointer-events: auto;
  opacity: 1;
}

.discover-code-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 14%, rgba(108, 190, 255, 0.22), transparent 42%),
    rgba(3, 8, 16, 0.46);
}

.discover-code-card {
  position: absolute;
  right: 0;
  top: 0;
  width: min(640px, calc(100vw - 24px));
  height: 100vh;
  border-left: 1px solid rgba(170, 214, 255, 0.56);
  background:
    radial-gradient(120% 120% at 8% -18%, rgba(126, 202, 255, 0.28), rgba(8, 18, 36, 0) 48%),
    radial-gradient(circle at 16% 92%, rgba(97, 231, 207, 0.14), rgba(97, 231, 207, 0) 56%),
    var(--discover-surface-code);
  box-shadow:
    inset 0 0 0 1px rgba(148, 210, 255, 0.1),
    -20px 0 46px rgba(2, 8, 18, 0.6);
  padding: 18px 16px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.discover-code-layer.open .discover-code-card {
  transform: translateX(0);
}

.discover-code-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(180, 216, 255, 0.56);
  background: linear-gradient(180deg, rgba(19, 57, 101, 0.82), rgba(12, 38, 70, 0.82));
  color: rgba(231, 240, 255, 0.96);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.discover-code-close:hover,
.discover-code-close:focus-visible {
  color: #f4f8ff;
}

.discover-code-title {
  margin: 0;
  padding-right: 38px;
  color: #f2f8ff;
  font-size: clamp(23px, 2.2vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 750;
}

.discover-code-meta {
  margin: 0;
  color: rgba(232, 242, 255, 0.98);
  font-size: 13px;
  line-height: 1.3;
}

.discover-code-meta[hidden],
.discover-code-note[hidden],
.discover-code-section[hidden] {
  display: none;
}

.discover-code-section {
  border-radius: 12px;
  border: 1px solid rgba(177, 212, 255, 0.42);
  background: linear-gradient(148deg, rgba(10, 34, 63, 0.82), rgba(8, 30, 57, 0.78));
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(148, 210, 255, 0.08);
}

.discover-overview {
  border-color: rgba(188, 220, 255, 0.56);
  background:
    linear-gradient(180deg, rgba(22, 61, 108, 0.56), rgba(9, 31, 59, 0.56)),
    rgba(5, 12, 24, 0.62);
}

.discover-code-section-title {
  margin: 0;
  color: rgba(232, 243, 255, 0.98);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.discover-overview-grid {
  margin: 8px 0 0;
  display: grid;
  gap: 6px;
}

.discover-overview-item {
  border-radius: 10px;
  border: 1px solid rgba(182, 216, 255, 0.5);
  background: linear-gradient(150deg, rgba(11, 34, 62, 0.84), rgba(8, 28, 54, 0.8));
  padding: 6px 8px;
  box-shadow: inset 0 0 0 1px rgba(148, 210, 255, 0.08);
}

.discover-overview-item dt {
  color: rgba(225, 237, 255, 0.98);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.discover-overview-item dd {
  margin: 5px 0 0;
  color: #f7fbff;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.discover-code-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: rgba(244, 250, 255, 0.99);
  font-size: 13px;
  line-height: 1.45;
  display: grid;
  gap: 4px;
}

.discover-code-list li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.discover-code-text {
  margin: 8px 0 0;
  color: rgba(243, 250, 255, 0.99);
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.discover-code-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.discover-code-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.discover-code-copy {
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(190, 220, 255, 0.56);
  background: linear-gradient(180deg, rgba(33, 93, 161, 0.8), rgba(18, 53, 94, 0.82));
  color: rgba(239, 248, 255, 0.98);
  font-size: 12px;
  font-weight: 650;
  padding: 0 12px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(148, 210, 255, 0.12);
}

.discover-code-copy:hover,
.discover-code-copy:focus-visible {
  border-color: rgba(209, 228, 255, 0.7);
  filter: brightness(1.08);
}

.discover-code-copy:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.discover-code-pre {
  margin: 6px 0 0;
  max-height: 220px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(181, 216, 255, 0.44);
  background: linear-gradient(170deg, rgba(4, 17, 35, 0.9), rgba(4, 14, 30, 0.94));
  padding: 10px 11px;
}

.discover-code-content {
  color: rgba(236, 246, 255, 0.99);
  font-size: 12px;
  line-height: 1.5;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  white-space: pre;
  tab-size: 2;
}

.discover-code-note {
  margin: 8px 0 0;
  color: rgba(194, 214, 242, 0.92);
  font-size: 12px;
  line-height: 1.35;
}

@media (hover: hover) {
  .discover-card:hover {
    transform: translateY(-3px);
    border-color: var(--discover-border-strong);
    box-shadow:
      inset 0 0 0 1px rgba(166, 219, 255, 0.18),
      var(--discover-card-hover-glow);
  }
}

@media (hover: none) {
  .discover-card:hover {
    transform: none;
    box-shadow: 0 1px 2px rgba(4, 12, 26, 0.22);
    border-color: var(--discover-border-soft);
  }
}

@media (max-width: 1200px) {
  .discover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .discover-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .discover-recent-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .discover-recent-time {
    justify-self: start;
  }

  .discover-recent-foot {
    justify-content: flex-start;
  }
}

@media (max-width: 639px) {
  .discover-hero-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
  }

  .window-switch {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  .window-btn {
    min-width: 0;
    width: 100%;
    min-height: 38px;
    font-size: 12px;
    padding: 0 8px;
    flex: none;
  }

  .discover-search {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 44px;
  }
}

@media (max-width: 430px) {
  html,
  body,
  .page-shell,
  main,
  #discover-board,
  #discover-sections {
    max-width: 100%;
    overflow-x: clip;
  }

  .discover-stage {
    width: calc(100% - 12px);
    padding-top: 8px;
    padding-bottom: 28px;
  }

  .discover-hero {
    border-radius: 22px 12px 20px 12px;
    padding: 16px;
  }

  .window-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .window-btn {
    min-width: 0;
    width: 100%;
    min-height: 36px;
    font-size: 12px;
    padding: 0 6px;
  }

  .discover-panel {
    border-radius: 22px 12px 20px 12px;
    padding: 14px;
  }

  .discover-card {
    --card-radius: 18px;
    padding: 16px;
  }

  .discover-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .discover-agent-cta-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .discover-view-btn,
  .discover-code-btn {
    min-height: 40px;
  }

  .discover-code-card {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(84vh, 740px);
    border-left: 0;
    border-top: 1px solid rgba(168, 212, 255, 0.5);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -20px 40px rgba(2, 8, 18, 0.56);
    transform: translateY(104%);
    padding: 13px 11px 12px;
  }

  .discover-code-layer.open .discover-code-card {
    transform: translateY(0);
  }

  .discover-code-title {
    font-size: clamp(20px, 6.2vw, 28px);
  }

  .discover-code-pre {
    max-height: 176px;
  }

  .discover-code-content {
    font-size: 11px;
  }
}

/* Strong overrides against discover-surface.css */
body[data-discover-version] .discover-card {
  background: linear-gradient(152deg, var(--card-tone-a), var(--card-tone-b) 56%, var(--card-tone-c));
  border-color: var(--card-edge);
  border-radius: var(--card-radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
}

body[data-discover-version] .discover-return {
  font-size: clamp(28px, 3vw, 32px);
}

body[data-discover-version] .discover-return.up {
  color: var(--discover-return-up);
}

body[data-discover-version] .discover-return.down {
  color: var(--discover-return-down);
}

body[data-discover-version] .discover-view-btn,
body[data-discover-version] .discover-code-btn {
  margin: 0 !important;
  min-width: 0 !important;
  height: 42px;
  border-radius: 12px;
  color: #f3f8ff;
}

body[data-discover-version] .discover-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-discover-version] .discover-recent-item {
  border-color: var(--recent-edge);
  background: linear-gradient(144deg, var(--recent-tone-a), var(--recent-tone-b));
}

body[data-discover-version] .discover-dna {
  border-color: rgba(169, 211, 255, 0.44);
  background: linear-gradient(144deg, rgba(10, 33, 62, 0.82), rgba(8, 29, 54, 0.78));
}

body[data-discover-version] .discover-code-card {
  border-left-color: rgba(170, 214, 255, 0.56);
}

body[data-discover-version] .discover-code-section {
  border-color: rgba(177, 212, 255, 0.42);
  background: linear-gradient(148deg, rgba(10, 34, 63, 0.82), rgba(8, 30, 57, 0.78));
}
