:root {
  --page: #f5f6f1;
  --surface: #ffffff;
  --surface-soft: #f9faf7;
  --surface-strong: #eef1eb;
  --sidebar: #14211c;
  --sidebar-soft: #21312a;
  --ink: #19221e;
  --ink-soft: #53605a;
  --ink-muted: #65716b;
  --line: #dfe4dc;
  --line-strong: #cbd2c8;
  --green: #246b56;
  --green-dark: #18503f;
  --green-soft: #e6f0eb;
  --lime: #b8d56a;
  --amber: #914b1c;
  --amber-soft: #f8ede3;
  --red: #ad4f4a;
  --red-soft: #f7e9e7;
  --blue: #4d6e9f;
  --shadow: 0 1px 2px rgba(20, 33, 28, 0.04), 0 10px 30px rgba(20, 33, 28, 0.035);
  --shadow-raised: 0 18px 55px rgba(15, 29, 23, 0.18);
  --radius: 16px;
  --radius-small: 11px;
  --sidebar-width: 248px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  background: var(--page);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--page);
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

[hidden] {
  display: none !important;
}

::selection {
  background: #cfe2d8;
}

:focus-visible {
  outline: 3px solid rgba(36, 107, 86, 0.28);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  color: #fff;
  background: var(--sidebar);
  transform: translateY(-150%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  padding: 1.25rem 0.9rem 1rem;
  color: #dfe9e3;
  background: var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0 0.55rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--sidebar);
  background: var(--lime);
  border-radius: 10px;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}

.brand > span:last-child {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.brand strong {
  color: #f7faf8;
  font-size: 0.97rem;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.brand small {
  color: #8fa098;
  font-size: 0.68rem;
  letter-spacing: 0.01em;
}

.primary-nav {
  margin-top: 2rem;
}

.nav-label {
  margin: 0 0.55rem 0.55rem;
  color: #778a81;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-label-secondary {
  margin-top: 1.65rem;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.16rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: #aab8b1;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 530;
  text-align: left;
  transition: color 140ms ease, background 140ms ease;
}

.nav-item:hover {
  color: #f6faf7;
  background: rgba(255, 255, 255, 0.055);
}

.nav-item.is-active {
  color: #f8fbf9;
  background: var(--sidebar-soft);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-count {
  min-width: 23px;
  margin-left: auto;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  color: #cfe59a;
  background: rgba(184, 213, 106, 0.12);
  font-size: 0.66rem;
  line-height: 1.35;
  text-align: center;
}

.sidebar-bottom {
  display: grid;
  gap: 0.75rem;
}

.league-switcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.league-switcher:focus-within {
  border-color: rgba(184, 213, 106, 0.7);
  box-shadow: 0 0 0 3px rgba(184, 213, 106, 0.12);
}

.league-switcher select {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.team-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #f8fbf9;
  background: #3a6253;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.league-switcher-copy {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.league-switcher-copy strong,
.league-switcher-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-switcher-copy strong {
  color: #edf3ef;
  font-size: 0.75rem;
  font-weight: 620;
}

.league-switcher-copy small {
  color: #899b92;
  font-size: 0.64rem;
}

.league-switcher > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-left: auto;
  color: #768b81;
  pointer-events: none;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  color: #81938a;
  font-size: 0.7rem;
}

.back-link:hover {
  color: #dce6e1;
}

.back-link svg {
  width: 15px;
  height: 15px;
}

.workspace {
  width: calc(100% - var(--sidebar-width));
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 35;
  top: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.8rem clamp(1.25rem, 3vw, 2.5rem);
  border-bottom: 1px solid rgba(212, 219, 210, 0.8);
  background: rgba(245, 246, 241, 0.9);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-title p {
  margin: 0 0 0.13rem;
  color: var(--ink-muted);
  font-size: 0.65rem;
  font-weight: 620;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-title h1 {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.data-state-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.65rem;
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.74rem;
  font-weight: 560;
}

.data-state-button:hover {
  background: var(--surface-strong);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-muted);
  box-shadow: 0 0 0 3px rgba(124, 135, 129, 0.12);
}

.status-dot-demo {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(182, 106, 47, 0.12);
}

.status-dot-live {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(36, 107, 86, 0.12);
}

.button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 620;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 130ms var(--ease),
    background 130ms ease,
    border-color 130ms ease;
}

.button svg {
  width: 16px;
  height: 16px;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.button-primary {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 5px 14px rgba(36, 107, 86, 0.13);
}

.button-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.button-secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.button-secondary:hover {
  border-color: var(--line-strong);
}

.button-quiet {
  color: var(--ink-soft);
  background: transparent;
  border-color: transparent;
}

.button-quiet:hover {
  color: var(--ink);
  background: var(--surface-strong);
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
}

.icon-button:hover {
  color: var(--ink);
  background: var(--surface-strong);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.menu-button {
  display: none;
}

.data-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem clamp(1.25rem, 3vw, 2.5rem);
  border-bottom: 1px solid #eadac8;
  color: #7d5536;
  background: #fbf3e9;
  font-size: 0.72rem;
}

.data-notice > div {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.data-notice svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.data-notice p {
  margin: 0;
}

.data-notice button {
  padding: 0.2rem 0;
  color: #7b4c29;
  background: transparent;
  border-bottom: 1px solid currentColor;
  font-size: 0.7rem;
  font-weight: 650;
  white-space: nowrap;
}

.main-content {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.page {
  animation: page-in 260ms var(--ease);
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.overview-hero {
  position: relative;
  min-height: 246px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  padding: clamp(1.7rem, 4vw, 2.7rem);
  border-radius: 20px;
  color: #f4f8f5;
  background:
    radial-gradient(circle at 84% 10%, rgba(184, 213, 106, 0.16), transparent 32%),
    var(--sidebar);
  box-shadow: 0 14px 40px rgba(20, 33, 28, 0.1);
}

.overview-hero::after {
  content: "";
  position: absolute;
  right: -4rem;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  box-shadow:
    0 0 0 48px rgba(255, 255, 255, 0.02),
    0 0 0 96px rgba(255, 255, 255, 0.012);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 670px;
}

.eyebrow,
.section-label {
  margin: 0 0 0.55rem;
  color: var(--green);
  font-size: 0.64rem;
  font-weight: 720;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: #a9c27a;
}

.hero-copy h2 {
  max-width: 630px;
  margin: 0;
  color: #f7faf8;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 660;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 600px;
  margin: 1rem 0 0;
  color: #afbeb6;
  font-size: 0.9rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.55rem;
}

.hero-actions .button-primary {
  color: #17211d;
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: none;
}

.hero-actions .button-primary:hover {
  background: #c7df87;
  border-color: #c7df87;
}

.hero-actions .button-quiet {
  color: #b8c5be;
}

.hero-actions .button-quiet:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.outlook-card {
  position: relative;
  z-index: 2;
  min-width: 225px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(8px);
}

.outlook-ring {
  --score: 72;
  width: 73px;
  height: 73px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(
    var(--lime) calc(var(--score) * 1%),
    rgba(255, 255, 255, 0.09) 0
  );
}

.outlook-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 61px;
  height: 61px;
  border-radius: 50%;
  background: #1c2b25;
}

.outlook-ring > div {
  z-index: 1;
  grid-area: 1 / 1;
  display: flex;
  align-items: baseline;
}

.outlook-ring strong {
  color: #fff;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.outlook-ring span {
  color: #82958b;
  font-size: 0.54rem;
}

.outlook-card > div:last-child {
  display: grid;
  gap: 0.16rem;
}

.outlook-card p,
.outlook-card span {
  margin: 0;
  color: #91a39a;
  font-size: 0.65rem;
}

.outlook-card strong {
  color: #f5f8f6;
  font-size: 0.9rem;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.85rem;
}

.summary-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
}

.summary-icon svg {
  width: 18px;
  height: 18px;
}

.summary-card > div:last-child {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.summary-card span,
.summary-card small {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-card strong {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.dashboard-grid,
.dashboard-lower-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.dashboard-lower-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.panel {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.panel-heading .section-label {
  margin-bottom: 0.25rem;
}

.panel-heading h3,
.connector-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.subtle-badge {
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-muted);
  background: var(--surface-soft);
  font-size: 0.61rem;
  font-weight: 620;
  white-space: nowrap;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  color: var(--green);
  background: transparent;
  font-size: 0.69rem;
  font-weight: 650;
}

.text-button:hover {
  color: var(--green-dark);
}

.text-button svg {
  width: 14px;
  height: 14px;
}

.category-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.4rem;
  row-gap: 0.95rem;
}

.category-row {
  min-width: 0;
}

.category-row.is-punted {
  opacity: 0.72;
}

.category-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.36rem;
}

.category-meta span {
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 620;
}

.category-meta strong {
  color: var(--ink-muted);
  font-size: 0.63rem;
  font-weight: 580;
  white-space: nowrap;
}

.category-meta strong[data-rank="strong"] {
  color: var(--green);
}

.category-meta strong[data-rank="weak"] {
  color: var(--amber);
}

.category-meta strong[data-rank="punt"] {
  color: var(--ink-muted);
}

.category-rank-plan {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.category-rank-plan label {
  display: flex;
}

.category-rank-plan select {
  min-height: 26px;
  padding: 0.18rem 1.35rem 0.18rem 0.42rem;
  border-radius: 7px;
  color: var(--ink-soft);
  background-position: right 0.35rem center;
  font-size: 0.56rem;
  font-weight: 650;
  text-transform: uppercase;
}

.category-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
}

.category-track span {
  display: block;
  width: var(--width);
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.category-track span[data-tone="strong"] {
  background: var(--green);
}

.category-track span[data-tone="middle"] {
  background: #8aa096;
}

.category-track span[data-tone="weak"] {
  background: #ca8a54;
}

.category-track span[data-tone="punt"] {
  background: #aab3ae;
}

.category-inference {
  margin: 0.3rem 0 0;
  color: var(--ink-muted);
  font-size: 0.54rem;
  line-height: 1.35;
}

.overview-opportunities {
  display: grid;
}

.mini-opportunity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  color: inherit;
  background: transparent;
  text-align: left;
}

.mini-opportunity:first-child {
  padding-top: 0.1rem;
  border-top: 0;
}

.mini-opportunity:last-child {
  padding-bottom: 0;
}

.mini-opportunity:hover .mini-opportunity-title {
  color: var(--green);
}

.mini-opportunity-main {
  min-width: 0;
}

.mini-opportunity-team {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.28rem;
  color: var(--ink-muted);
  font-size: 0.61rem;
}

.mini-team-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--team-color);
}

.mini-opportunity-title {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 0.77rem;
  font-weight: 640;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 130ms ease;
}

.mini-opportunity-reason {
  overflow: hidden;
  margin: 0.3rem 0 0;
  color: var(--ink-muted);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grade-chip {
  min-width: 41px;
  display: grid;
  place-items: center;
  padding: 0.38rem 0.5rem;
  border-radius: 9px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.71rem;
  font-weight: 760;
}

.grade-chip[data-tone="neutral"] {
  color: #675d3f;
  background: #f4f0df;
}

.grade-chip[data-tone="weak"],
.grade-chip[data-tone="bad"] {
  color: var(--red);
  background: var(--red-soft);
}

.priority-needs {
  display: grid;
  gap: 0.8rem;
}

.need-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.need-rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 0.68rem;
  font-weight: 730;
}

.need-copy {
  min-width: 0;
}

.need-copy strong {
  display: block;
  color: var(--ink);
  font-size: 0.73rem;
}

.need-copy span {
  display: block;
  margin-top: 0.14rem;
  color: var(--ink-muted);
  font-size: 0.63rem;
}

.need-score {
  color: var(--amber);
  font-size: 0.67rem;
  font-weight: 680;
}

.market-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.signal-card {
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.signal-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.signal-source-group {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.2rem;
}

.signal-source {
  color: var(--ink-muted);
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

a.signal-source {
  padding: 0.18rem 0;
  text-decoration: underline;
  text-underline-offset: 0.14rem;
}

a.signal-source:hover {
  color: var(--ink);
}

.signal-trend {
  color: var(--green);
  font-size: 0.62rem;
  font-weight: 700;
}

.signal-trend.is-down {
  color: var(--red);
}

.signal-card strong {
  display: block;
  overflow: hidden;
  margin-top: 0.55rem;
  color: var(--ink);
  font-size: 0.71rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-card p {
  margin: 0.25rem 0 0;
  color: var(--ink-muted);
  font-size: 0.61rem;
  line-height: 1.45;
}

.page-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin: 0.15rem 0 1.4rem;
}

.page-heading-row .section-label {
  margin-bottom: 0.35rem;
}

.page-heading-row h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  font-weight: 680;
  letter-spacing: -0.045em;
}

.page-heading-row p:not(.section-label) {
  max-width: 650px;
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.79rem;
  line-height: 1.6;
}

.page-heading-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.finder-controls {
  display: grid;
  grid-template-columns:
    minmax(190px, 1.2fr)
    repeat(3, minmax(135px, 1fr))
    minmax(175px, 1fr);
  align-items: end;
  gap: 0.7rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.finder-controls label,
.field,
.partner-select-label {
  display: grid;
  gap: 0.38rem;
  color: var(--ink-muted);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.compact-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.compact-search-field svg {
  position: absolute;
  left: 0.7rem;
  width: 15px;
  height: 15px;
  color: var(--ink-muted);
  pointer-events: none;
}

.compact-search-field input {
  width: 100%;
  padding-left: 2.1rem;
}

select,
input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 0.75rem;
  letter-spacing: normal;
  text-transform: none;
  transition:
    border-color 130ms ease,
    box-shadow 130ms ease,
    background 130ms ease;
}

select {
  min-height: 39px;
  padding: 0 2.2rem 0 0.72rem;
}

input {
  min-height: 41px;
  padding: 0 0.75rem;
}

select:focus,
input:focus {
  outline: 0;
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(36, 107, 86, 0.1);
}

.toggle-control {
  min-height: 39px;
  display: flex !important;
  align-items: center;
  gap: 0.58rem !important;
  padding: 0 0.25rem;
  color: var(--ink-soft) !important;
  font-size: 0.7rem !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.toggle-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-track {
  position: relative;
  width: 34px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #c8d0c8;
  transition: background 130ms ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 33, 28, 0.2);
  transition: transform 160ms var(--ease);
}

.toggle-control input:checked + .toggle-track {
  background: var(--green);
}

.toggle-control input:checked + .toggle-track::after {
  transform: translateX(14px);
}

.toggle-control input:focus-visible + .toggle-track {
  outline: 3px solid rgba(36, 107, 86, 0.25);
  outline-offset: 2px;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0 0.75rem;
}

.results-toolbar p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.69rem;
}

.results-toolbar #finder-results-summary {
  color: var(--ink);
  font-weight: 640;
}

.results-method {
  color: var(--ink-muted) !important;
}

.finder-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.trade-card {
  min-width: 0;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition:
    transform 160ms var(--ease),
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.trade-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 34px rgba(20, 33, 28, 0.07);
}

.trade-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.partner-name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.67rem;
  font-weight: 610;
}

.partner-name span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--team-color);
}

.likelihood {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  color: var(--ink-muted);
  font-size: 0.61rem;
}

.likelihood b {
  color: var(--green);
  font-size: 0.64rem;
}

.trade-card-body {
  padding: 1rem;
}

.trade-sides {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
}

.trade-side {
  min-width: 0;
}

.trade-side > span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--ink-muted);
  font-size: 0.58rem;
  font-weight: 660;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.trade-player {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.trade-player-stack {
  display: grid;
  gap: 0.55rem;
}

.player-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #dce5de;
  border-radius: 10px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.player-avatar.is-pitcher {
  color: #4b6087;
  background: #e9edf5;
  border-color: #dce1eb;
}

.trade-player-copy {
  min-width: 0;
}

.trade-player-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-player-copy small {
  display: block;
  overflow: hidden;
  margin-top: 0.12rem;
  color: var(--ink-muted);
  font-size: 0.59rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-muted);
  background: var(--surface-strong);
}

.trade-arrow svg {
  width: 15px;
  height: 15px;
}

.trade-reason {
  min-height: 40px;
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.5;
}

.trade-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.trade-score {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.trade-score-copy {
  display: grid;
  gap: 0.05rem;
}

.trade-score-copy strong {
  color: var(--ink);
  font-size: 0.66rem;
}

.trade-score-copy span {
  color: var(--ink-muted);
  font-size: 0.58rem;
}

.details-button {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem;
  color: var(--green);
  background: transparent;
  font-size: 0.66rem;
  font-weight: 650;
}

.details-button svg {
  width: 14px;
  height: 14px;
}

.empty-list {
  grid-column: 1 / -1;
  padding: 3.5rem 1.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.empty-list h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.empty-list p {
  max-width: 430px;
  margin: 0.5rem auto 0;
  font-size: 0.72rem;
  line-height: 1.55;
}

.saved-trades {
  margin-bottom: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.saved-trades-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.saved-trades-heading .section-label {
  margin-bottom: 0.2rem;
}

.saved-trades-heading h3 {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: -0.02em;
}

.saved-trades-heading > span {
  color: var(--ink-muted);
  font-size: 0.61rem;
}

.saved-trades-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.saved-trade-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.saved-trade-copy {
  min-width: 0;
  flex: 1;
}

.saved-trade-copy strong,
.saved-trade-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-trade-copy strong {
  color: var(--ink);
  font-size: 0.67rem;
}

.saved-trade-copy span {
  margin-top: 0.18rem;
  color: var(--ink-muted);
  font-size: 0.56rem;
}

.saved-trade-actions {
  display: flex;
  gap: 0.2rem;
}

.saved-trade-actions button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--ink-muted);
  background: #fff;
}

.saved-trade-actions button:hover {
  color: var(--green);
  background: var(--green-soft);
}

.saved-trade-actions button[data-action="delete-saved-trade"]:hover {
  color: var(--red);
  background: var(--red-soft);
}

.saved-trade-actions svg {
  width: 14px;
  height: 14px;
}

.trade-lab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 0.9rem;
  align-items: start;
}

.trade-builder {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  align-items: start;
  gap: 0.6rem;
}

.roster-column {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.roster-column-heading {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.side-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--green);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roster-column-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.85rem;
}

.selection-count {
  color: var(--ink-muted);
  font-size: 0.6rem;
}

.partner-select-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.partner-select-label select {
  min-height: 34px;
  flex: 1;
}

.roster-search-field {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.roster-search-field svg {
  position: absolute;
  left: 1.35rem;
  width: 15px;
  height: 15px;
  color: var(--ink-muted);
  pointer-events: none;
}

.roster-search-field input {
  width: 100%;
  min-height: 35px;
  padding-left: 2.05rem;
  background: var(--surface-soft);
}

.roster-list {
  max-height: 570px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.roster-empty {
  padding: 2rem 1rem;
  color: var(--ink-muted);
  font-size: 0.66rem;
  line-height: 1.5;
  text-align: center;
}

.roster-player {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: #fff;
  text-align: left;
}

.roster-player:last-child {
  border-bottom: 0;
}

.roster-player:hover {
  background: var(--surface-soft);
}

.roster-player.is-selected {
  background: #eef6f2;
}

.roster-player .player-avatar {
  width: 31px;
  height: 31px;
  border-radius: 8px;
}

.roster-player .trade-player-copy {
  flex: 1;
}

.player-value {
  display: grid;
  gap: 0.05rem;
  margin-left: auto;
  text-align: right;
}

.player-value strong {
  color: var(--ink);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.player-value span {
  color: var(--ink-muted);
  font-size: 0.51rem;
  text-transform: uppercase;
}

.selection-box {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin-left: 0.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: transparent;
  background: #fff;
}

.selection-box svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}

.roster-player.is-selected .selection-box {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.trade-direction {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-top: 7.5rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-muted);
  background: var(--surface);
}

.trade-direction svg {
  width: 19px;
  height: 19px;
}

.trade-result-card {
  position: sticky;
  top: 92px;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.empty-result {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.empty-result-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--green);
  background: var(--green-soft);
}

.empty-result-icon svg {
  width: 27px;
  height: 27px;
}

.empty-result h3 {
  margin: 1rem 0 0;
  color: var(--ink);
  font-size: 0.91rem;
}

.empty-result p {
  max-width: 220px;
  margin: 0.45rem 0 0;
  color: var(--ink-muted);
  font-size: 0.68rem;
  line-height: 1.55;
}

.result-grade-header {
  padding: 1.2rem;
  color: #f6faf7;
  background: var(--sidebar);
}

.result-grade-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.large-grade {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--sidebar);
  background: var(--lime);
  font-size: 1.15rem;
  font-weight: 780;
}

.result-grade-copy {
  flex: 1;
}

.result-grade-copy span {
  color: #8fa198;
  font-size: 0.59rem;
  font-weight: 620;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-grade-copy h3 {
  margin: 0.2rem 0 0;
  font-size: 0.94rem;
}

.result-grade-score {
  text-align: right;
}

.result-grade-score strong {
  display: block;
  color: #fff;
  font-size: 1.1rem;
}

.result-grade-score span {
  color: #83968d;
  font-size: 0.57rem;
}

.result-body {
  padding: 1rem;
}

.result-value-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.55rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.result-value-row > div {
  display: grid;
  gap: 0.1rem;
}

.result-value-row > div:last-child {
  text-align: right;
}

.result-value-row span {
  color: var(--ink-muted);
  font-size: 0.57rem;
}

.result-value-row strong {
  color: var(--ink);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.result-value-row > strong {
  color: var(--ink-muted);
  font-size: 0.65rem;
}

.result-section {
  margin-top: 0.95rem;
}

.result-section > span {
  color: var(--ink-muted);
  font-size: 0.57rem;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.impact-list {
  display: grid;
  gap: 0.46rem;
  margin-top: 0.55rem;
}

.impact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.66rem;
}

.impact-row strong {
  font-size: 0.65rem;
}

.impact-row strong.is-positive {
  color: var(--green);
}

.impact-row strong.is-negative {
  color: var(--red);
}

.impact-row strong.is-muted {
  color: var(--ink-muted);
}

.result-meter-row {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.result-meter {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 0.5rem;
}

.result-mutual-fit {
  padding: 0.72rem;
  border-radius: 10px;
  background: var(--surface-soft);
}

.result-mutual-fit p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.64rem;
  line-height: 1.5;
}

.result-meter span,
.result-meter strong {
  color: var(--ink-muted);
  font-size: 0.58rem;
}

.result-meter strong {
  color: var(--ink-soft);
  text-align: right;
}

.result-meter-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
}

.result-meter-track i {
  display: block;
  width: var(--meter);
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  margin-top: 1rem;
}

.market-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 0.65rem;
  margin-bottom: 0.8rem;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field svg {
  position: absolute;
  left: 0.72rem;
  width: 16px;
  height: 16px;
  color: var(--ink-muted);
}

.search-field input {
  width: 100%;
  padding-left: 2.25rem;
  background: var(--surface);
}

.market-toolbar select {
  height: 41px;
  background: var(--surface);
}

.market-table-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.market-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.market-table th,
.market-table td {
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.market-table th {
  color: var(--ink-muted);
  background: var(--surface-soft);
  font-size: 0.57rem;
  font-weight: 680;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.market-table th:first-child {
  width: 22%;
}

.market-table th:nth-child(2) {
  width: 15%;
}

.market-table th:nth-child(3) {
  width: 27%;
}

.market-table th:nth-child(4),
.market-table th:nth-child(5),
.market-table th:nth-child(6) {
  width: 10%;
}

.market-table th:last-child {
  width: 6%;
}

.market-table tr:last-child td {
  border-bottom: 0;
}

.market-table tbody tr:hover {
  background: var(--surface-soft);
}

.market-player {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.market-player-copy {
  min-width: 0;
}

.market-player-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.71rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-player-copy span {
  display: block;
  margin-top: 0.14rem;
  color: var(--ink-muted);
  font-size: 0.58rem;
}

.roster-cell,
.projection-cell,
.number-cell {
  color: var(--ink-soft);
  font-size: 0.66rem;
}

.projection-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.number-cell {
  font-variant-numeric: tabular-nums;
}

.trend-value {
  color: var(--green);
  font-weight: 670;
}

.trend-value.is-down {
  color: var(--red);
}

.market-value-badge {
  display: inline-grid;
  min-width: 34px;
  place-items: center;
  padding: 0.3rem 0.45rem;
  border-radius: 8px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.69rem;
  font-weight: 730;
  font-variant-numeric: tabular-nums;
}

.watch-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ink-muted);
  background: transparent;
}

.watch-button:hover {
  color: var(--green);
  background: var(--green-soft);
}

.watch-button.is-watched {
  color: var(--green);
  background: var(--green-soft);
}

.watch-button svg {
  width: 16px;
  height: 16px;
}

.watch-button.is-watched svg {
  fill: currentColor;
}

.table-empty {
  padding: 3rem 1rem;
  color: var(--ink-muted);
  font-size: 0.72rem;
  text-align: center;
}

.source-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.source-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.source-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.source-logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 0.6rem;
  font-weight: 760;
}

.source-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-muted);
  font-size: 0.57rem;
  font-weight: 630;
}

.source-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a9b0ac;
}

.source-status[data-status="connected"] {
  color: var(--green);
}

.source-status[data-status="connected"]::before {
  background: var(--green);
}

.source-status[data-status="demo"],
.source-status[data-status="fixture"] {
  color: var(--amber);
}

.source-status[data-status="demo"]::before,
.source-status[data-status="fixture"]::before {
  background: var(--amber);
}

.source-status[data-status="stale"],
.source-status[data-status="error"] {
  color: var(--red);
}

.source-status[data-status="stale"]::before,
.source-status[data-status="error"]::before {
  background: var(--red);
}

.source-card h3 {
  margin: 0.8rem 0 0;
  color: var(--ink);
  font-size: 0.82rem;
}

.source-card p {
  min-height: 38px;
  margin: 0.35rem 0 0;
  color: var(--ink-muted);
  font-size: 0.63rem;
  line-height: 1.5;
}

.source-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.57rem;
}

.source-card-footer a {
  color: var(--green);
  font-weight: 650;
}

.evidence-panel {
  margin-top: 0.8rem;
}

.research-evidence-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.research-evidence-item {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.research-evidence-meta,
.research-evidence-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.research-evidence-item p {
  margin: 0.6rem 0 0;
  color: var(--ink);
  font-size: 0.7rem;
  line-height: 1.5;
}

.research-evidence-item blockquote {
  margin: 0.6rem 0;
  padding-left: 0.7rem;
  border-left: 2px solid var(--green-soft);
  color: var(--ink-muted);
  font-size: 0.64rem;
  line-height: 1.55;
}

.research-evidence-footer {
  margin-top: 0.7rem;
  color: var(--ink-muted);
  font-size: 0.58rem;
}

.research-evidence-footer a {
  color: var(--green);
  font-weight: 680;
}

.research-evidence-more {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--ink-muted);
  font-size: 0.65rem;
}

.model-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.model-weights {
  display: grid;
  gap: 0.8rem;
}

.model-weight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 0.65rem;
}

.model-weight-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 1 / -1;
}

.model-weight-meta span {
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.model-weight-meta strong {
  color: var(--ink);
  font-size: 0.66rem;
}

.model-weight-track {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
}

.model-weight-track span {
  display: block;
  width: var(--weight);
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.model-adjustments {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.61rem;
  line-height: 1.5;
}

.model-note {
  margin: 1.1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.64rem;
  line-height: 1.55;
}

.connector-panel .section-label {
  margin-bottom: 0.3rem;
}

.connector-panel ul {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.connector-panel li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.45;
}

.connector-panel li::before {
  content: "";
  position: absolute;
  top: 0.48rem;
  left: 0.15rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.connector-panel > p:not(.section-label) {
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-size: 0.64rem;
  line-height: 1.55;
}

.modal {
  width: min(620px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: transparent;
  box-shadow: var(--shadow-raised);
}

.modal::backdrop {
  background: rgba(15, 27, 22, 0.58);
  backdrop-filter: blur(3px);
}

.modal-card {
  margin: 0;
  padding: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: var(--surface);
}

.modal-heading,
.modal-heading > div {
  display: flex;
  align-items: center;
}

.modal-heading {
  justify-content: space-between;
  gap: 1rem;
}

.modal-heading > div {
  gap: 0.75rem;
}

.modal-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: #d2463d;
  font-size: 0.9rem;
  font-weight: 790;
}

.modal-heading .section-label {
  margin-bottom: 0.2rem;
}

.modal-heading h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.025em;
}

.modal-intro {
  margin: 1.1rem 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.6;
}

.connection-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.connection-mode label {
  position: relative;
  cursor: pointer;
}

.connection-mode input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.connection-mode label > span {
  position: relative;
  min-height: 62px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.75rem 2.2rem 0.75rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  transition:
    border-color 130ms ease,
    background 130ms ease,
    box-shadow 130ms ease;
}

.connection-mode label > span::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
}

.connection-mode strong {
  color: var(--ink);
  font-size: 0.7rem;
}

.connection-mode small {
  color: var(--ink-muted);
  font-size: 0.58rem;
}

.connection-mode input:checked + span {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 2px rgba(36, 107, 86, 0.08);
}

.connection-mode input:checked + span::after {
  border-color: var(--green);
  background: var(--green);
  box-shadow: inset 0 0 0 3px #fff;
}

.connection-mode input:disabled + span {
  cursor: not-allowed;
  opacity: 0.58;
}

.connection-mode input:focus-visible + span {
  outline: 3px solid rgba(36, 107, 86, 0.25);
  outline-offset: 2px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span {
  color: var(--ink-muted);
  font-size: 0.54rem;
  font-weight: 540;
  text-transform: none;
}

.field small {
  color: var(--ink-muted);
  font-size: 0.58rem;
  font-weight: 450;
  letter-spacing: normal;
  line-height: 1.45;
  text-transform: none;
}

.field code {
  padding: 0.08rem 0.2rem;
  border-radius: 4px;
  color: var(--ink-soft);
  background: var(--surface-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.private-credentials {
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px solid #ead7c6;
  border-radius: 12px;
  background: #fcf6ef;
}

.research-access-field {
  display: grid;
  margin-top: 0.8rem;
}

.private-credentials-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.private-credentials-heading .section-label {
  margin-bottom: 0.2rem;
  color: var(--amber);
}

.private-credentials-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
}

.private-credentials-heading > span {
  padding: 0.24rem 0.45rem;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.55rem;
  font-weight: 680;
  white-space: nowrap;
}

.credential-help {
  margin-top: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.63rem;
}

.credential-help summary {
  color: var(--green-dark);
  font-weight: 670;
  cursor: pointer;
}

.credential-help ol {
  display: grid;
  gap: 0.32rem;
  margin: 0.65rem 0;
  padding-left: 1.15rem;
  line-height: 1.45;
}

.credential-help p {
  margin: 0;
  color: var(--amber);
  line-height: 1.5;
}

.credential-help code {
  padding: 0.07rem 0.2rem;
  border-radius: 4px;
  background: rgba(145, 75, 28, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.privacy-note {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding: 0.75rem;
  border: 1px solid #d9e7df;
  border-radius: 10px;
  color: var(--green-dark);
  background: #f0f7f3;
}

.privacy-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 0.08rem;
}

.privacy-note p {
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.5;
}

.form-status {
  min-height: 1.1rem;
  margin: 0.75rem 0 0;
  color: var(--ink-muted);
  font-size: 0.65rem;
}

.form-status.is-error {
  color: var(--red);
}

.form-status.is-success {
  color: var(--green);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-top: 0.4rem;
}

.trade-modal {
  width: min(720px, calc(100vw - 2rem));
}

.trade-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.trade-detail-heading .section-label {
  margin-bottom: 0.3rem;
}

.trade-detail-heading h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.trade-detail-heading p:not(.section-label) {
  margin: 0.4rem 0 0;
  color: var(--ink-muted);
  font-size: 0.68rem;
}

.trade-detail-score {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: 13px;
  color: #fff;
  background: var(--sidebar);
}

.trade-detail-score .large-grade {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 1rem;
}

.trade-detail-score-copy {
  flex: 1;
}

.trade-detail-score-copy strong {
  display: block;
  font-size: 0.82rem;
}

.trade-detail-score-copy span {
  display: block;
  margin-top: 0.18rem;
  color: #8fa198;
  font-size: 0.61rem;
}

.trade-detail-number {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 750;
}

.detail-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.detail-side {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.detail-side > span {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--ink-muted);
  font-size: 0.57rem;
  font-weight: 680;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.detail-side .trade-player + .trade-player {
  margin-top: 0.55rem;
}

.detail-analysis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.detail-point {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.detail-point span {
  display: block;
  color: var(--ink-muted);
  font-size: 0.56rem;
  font-weight: 670;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-point p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.63rem;
  line-height: 1.5;
}

.detail-category-row {
  margin-top: 0.9rem;
}

.detail-category-row > span {
  color: var(--ink-muted);
  font-size: 0.57rem;
  font-weight: 680;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.5rem;
  border-radius: 8px;
  color: var(--ink-soft);
  background: var(--surface-strong);
  font-size: 0.6rem;
  font-weight: 620;
}

.category-chip.is-positive {
  color: var(--green-dark);
  background: var(--green-soft);
}

.category-chip.is-negative {
  color: var(--red);
  background: var(--red-soft);
}

.trade-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 1.25rem;
  bottom: 1.25rem;
  max-width: min(360px, calc(100vw - 2.5rem));
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  color: #f5f8f6;
  background: var(--sidebar);
  box-shadow: var(--shadow-raised);
  font-size: 0.69rem;
  animation: toast-in 220ms var(--ease);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.noscript-message {
  position: fixed;
  z-index: 200;
  inset: auto 1rem 1rem;
  padding: 1rem;
  border-radius: 10px;
  color: #fff;
  background: var(--red);
  text-align: center;
}

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

  .dashboard-grid,
  .dashboard-lower-grid {
    grid-template-columns: 1fr;
  }

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

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

  .trade-lab-layout {
    grid-template-columns: 1fr;
  }

  .saved-trades-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trade-result-card {
    position: static;
  }

  .empty-result {
    min-height: 240px;
  }
}

@media (max-width: 980px) {
  :root {
    --sidebar-width: 232px;
  }

  .overview-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .outlook-card {
    width: 100%;
    max-width: 310px;
  }

  .finder-list {
    grid-template-columns: 1fr;
  }

  .market-table th:nth-child(2),
  .market-table td:nth-child(2),
  .market-table th:nth-child(4),
  .market-table td:nth-child(4) {
    display: none;
  }

  .market-table th:first-child {
    width: 30%;
  }

  .market-table th:nth-child(3) {
    width: 38%;
  }
}

@media (max-width: 760px) {
  .sidebar {
    width: min(280px, calc(100vw - 3.5rem));
    visibility: hidden;
    pointer-events: none;
    overscroll-behavior: contain;
    transform: translateX(-102%);
    box-shadow: var(--shadow-raised);
    transition:
      transform 220ms var(--ease),
      visibility 0s linear 220ms;
  }

  .sidebar.is-open {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition-delay: 0s;
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 45;
    inset: 0;
    display: block;
    background: rgba(10, 20, 16, 0.48);
  }

  .workspace {
    width: 100%;
    margin-left: 0;
  }

  .menu-button {
    display: grid;
  }

  .topbar {
    min-height: 64px;
    padding: 0.65rem 1rem;
  }

  .data-state-button {
    display: none;
  }

  .sync-button span {
    display: none;
  }

  .sync-button {
    width: 38px;
    padding: 0;
  }

  .data-notice {
    align-items: flex-start;
    padding: 0.65rem 1rem;
  }

  .data-notice button {
    display: none;
  }

  .main-content {
    padding: 1rem;
  }

  .overview-hero {
    min-height: 0;
    padding: 1.5rem;
    border-radius: 16px;
  }

  .hero-copy h2 {
    font-size: 1.75rem;
  }

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

  .summary-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .category-list {
    grid-template-columns: 1fr;
  }

  .market-signals {
    grid-template-columns: 1fr;
  }

  .page-heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .page-heading-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .finder-controls {
    grid-template-columns: 1fr;
  }

  .results-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .trade-builder {
    grid-template-columns: 1fr;
  }

  .saved-trades-list {
    grid-template-columns: 1fr;
  }

  .trade-direction {
    margin: 0 auto;
    transform: rotate(90deg);
  }

  .roster-list {
    max-height: 390px;
  }

  .market-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .market-toolbar .search-field {
    grid-column: 1 / -1;
  }

  .market-table-shell {
    overflow-x: auto;
  }

  .market-table {
    min-width: 620px;
  }

  .market-table th:nth-child(2),
  .market-table td:nth-child(2),
  .market-table th:nth-child(4),
  .market-table td:nth-child(4) {
    display: table-cell;
  }

  .source-cards,
  .research-evidence-list,
  .model-grid {
    grid-template-columns: 1fr;
  }

  .source-card p {
    min-height: 0;
  }

  .detail-analysis {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .summary-card {
    padding: 0.85rem;
  }

  .summary-icon {
    width: 32px;
    height: 32px;
  }

  .panel {
    padding: 1rem;
  }

  .trade-sides {
    grid-template-columns: 1fr;
  }

  .trade-arrow {
    margin: 0.15rem 0;
    transform: rotate(90deg);
  }

  .form-grid,
  .detail-sides {
    grid-template-columns: 1fr;
  }

  .connection-mode {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .modal-card {
    padding: 1.1rem;
  }

  .market-toolbar {
    grid-template-columns: 1fr;
  }

  .market-toolbar .search-field {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
