:root {
  color-scheme: dark;
  --ink: #eef6f6;
  --muted: #8d9ca8;
  --line: #253241;
  --line-strong: #344657;
  --paper: #0b1118;
  --surface: #121a24;
  --surface-alt: #192432;
  --forest: #00ceb8;
  --forest-2: #36ead7;
  --gold: #f1bf4d;
  --red: #ff6b5f;
  --blue: #7c8cff;
  --green: #00ceb8;
  --pos-qb: #c55f8d;
  --pos-rb: #73c5a5;
  --pos-wr: #49a6cc;
  --pos-te: #d39548;
  --pos-def: #05080d;
  --pos-pick: #9ba8b7;
  --pos-other: #8290a8;
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(0, 206, 184, 0.12), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.sidebar {
  background: #080d13;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.brand-block {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 206, 184, 0.38);
  background: rgba(0, 206, 184, 0.12);
  color: var(--forest-2);
  font-weight: 800;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-block h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-block p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sidebar-toggle {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  color: var(--forest-2);
  background: rgba(0, 206, 184, 0.1);
  border: 1px solid rgba(0, 206, 184, 0.28);
  border-radius: 6px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  background: rgba(0, 206, 184, 0.16);
  border-color: var(--forest-2);
  outline: none;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #c8d4dc;
  text-align: left;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 650;
}

.nav-icon {
  display: inline-grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #8fa4b5;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav-icon-jersey svg {
  width: 23px;
  height: 23px;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item:hover,
.nav-item:focus-visible {
  background: rgba(0, 206, 184, 0.09);
  outline: none;
}

.nav-item.is-active {
  background: rgba(0, 206, 184, 0.15);
  color: var(--forest-2);
  font-weight: 700;
}

.nav-item:hover .nav-icon,
.nav-item:focus-visible .nav-icon,
.nav-item.is-active .nav-icon {
  color: var(--forest-2);
}

.source-note {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

@media (min-width: 981px) {
  .app-shell.sidebar-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .app-shell.sidebar-collapsed .sidebar {
    gap: 22px;
    padding: 18px 12px;
  }

  .app-shell.sidebar-collapsed .sidebar-header {
    display: grid;
    justify-items: center;
  }

  .app-shell.sidebar-collapsed .brand-block {
    justify-content: center;
  }

  .app-shell.sidebar-collapsed .brand-copy,
  .app-shell.sidebar-collapsed .source-note {
    display: none;
  }

  .app-shell.sidebar-collapsed .brand-mark {
    width: 42px;
    height: 42px;
  }

  .app-shell.sidebar-collapsed .sidebar-toggle {
    width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .app-shell.sidebar-collapsed .nav-list {
    gap: 8px;
  }

  .app-shell.sidebar-collapsed .nav-item {
    display: grid;
    height: 42px;
    padding: 0;
    place-items: center;
    text-align: center;
  }

  .app-shell.sidebar-collapsed .nav-label {
    display: none;
  }

  .app-shell.sidebar-collapsed .nav-icon {
    width: 26px;
    height: 26px;
  }

  .app-shell.sidebar-collapsed .nav-icon svg {
    width: 21px;
    height: 21px;
  }
}

.content-area {
  min-width: 0;
  padding: 26px 34px 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.topbar h2 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.12;
}

.topbar-title {
  min-width: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crumb-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.crumb-link:hover,
.crumb-link:focus-visible {
  color: var(--forest-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

.crumb-sep {
  color: var(--muted);
  font-size: 13px;
}

.crumb-current {
  color: var(--forest-2);
}

.identity-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 6px 14px 6px 7px;
  color: var(--ink);
  background: rgba(0, 206, 184, 0.08);
  border: 1px solid rgba(0, 206, 184, 0.28);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.identity-chip:hover,
.identity-chip:focus-visible {
  background: rgba(0, 206, 184, 0.16);
  border-color: var(--forest-2);
  outline: none;
}

.identity-chip .team-avatar {
  width: 26px;
  height: 26px;
  font-size: 9px;
  border-radius: 50%;
}

.identity-chip[hidden] {
  display: none;
}

.manager-picker-modal {
  width: min(560px, 100%);
}

.manager-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.manager-picker-option {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 14px 10px 12px;
  color: var(--ink);
  background: rgba(16, 24, 33, 0.62);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}

.manager-picker-option:hover,
.manager-picker-option:focus-visible {
  background: rgba(0, 206, 184, 0.1);
  border-color: var(--forest-2);
  outline: none;
}

.manager-picker-option.is-current {
  border-color: var(--forest-2);
  background: rgba(0, 206, 184, 0.14);
}

.manager-picker-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.manager-picker-foot {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

/* ------------------------------------------------------------------ */
/* "You" highlighting across tables, lists, and cards                  */
/* ------------------------------------------------------------------ */

tr.is-you td {
  background: rgba(0, 206, 184, 0.08);
}

tr.is-you td:first-child {
  box-shadow: inset 2px 0 0 var(--forest-2);
}

.leader-row.is-you,
.dna-row.is-you {
  background: rgba(0, 206, 184, 0.07);
  box-shadow: inset 2px 0 0 var(--forest-2);
}

.leader-row.is-you {
  padding-left: 8px;
  padding-right: 6px;
  border-radius: 4px;
}

.dna-row.is-you {
  padding-left: 8px;
  border-radius: 4px;
}

.team-card-button.is-you {
  border-color: rgba(0, 206, 184, 0.5);
  background: rgba(0, 206, 184, 0.06);
}

.draft-slot.is-you {
  background: rgba(0, 206, 184, 0.1);
  box-shadow: inset 0 -2px 0 var(--forest-2);
}

.draft-slot.is-you strong {
  color: var(--forest-2);
}

.trade-card.is-you {
  border-left: 2px solid var(--forest-2);
}

.you-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 7px;
  color: #061016;
  background: var(--forest-2);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 2px;
}

/* ------------------------------------------------------------------ */
/* Draft capital board                                                 */
/* ------------------------------------------------------------------ */

.capital-manager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.capital-manager .team-avatar {
  width: 26px;
  height: 26px;
  font-size: 9px;
}

.capital-table th,
.capital-table td {
  white-space: nowrap;
}

.capital-cell {
  min-width: 96px;
}

.capital-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 4px 2px 0;
  padding: 3px 9px;
  color: var(--muted);
  background: rgba(16, 24, 33, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.capital-pick-slot {
  color: var(--ink);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

button.capital-chip.is-acquired {
  color: var(--forest-2);
  background: rgba(0, 206, 184, 0.1);
  border-color: rgba(0, 206, 184, 0.4);
  cursor: pointer;
}

button.capital-chip.is-acquired:hover,
button.capital-chip.is-acquired:focus-visible {
  background: rgba(0, 206, 184, 0.2);
  border-color: var(--forest-2);
  outline: none;
}

.capital-chip.is-lost {
  color: #e08585;
  background: rgba(224, 133, 133, 0.08);
  border-color: rgba(224, 133, 133, 0.35);
}

.capital-total {
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.capital-total.is-rich {
  color: var(--forest-2);
}

.capital-total.is-poor {
  color: #e08585;
}

.settled-player {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.settled-pick-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* League facts: all-play, draft DNA, roster roots, trade matrix       */
/* ------------------------------------------------------------------ */

.luck-pos {
  color: var(--forest-2);
  font-weight: 800;
}

.luck-neg {
  color: #e08585;
  font-weight: 800;
}

.dna-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.dna-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.dna-toolbar .dna-legend {
  margin-bottom: 0;
}

.dna-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dna-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.dna-mode-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dna-toggle-control {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 16px;
  border: 1px solid rgba(151, 179, 204, 0.45);
  border-radius: 999px;
  background: rgba(11, 18, 27, 0.85);
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.dna-toggle-control::after {
  position: absolute;
  top: 1px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.dna-mode-toggle input:checked + .dna-toggle-control {
  border-color: rgba(0, 206, 184, 0.8);
  background: rgba(0, 206, 184, 0.22);
}

.dna-mode-toggle input:checked + .dna-toggle-control::after {
  background: var(--forest-2);
  transform: translateX(13px);
}

.dna-mode-toggle:has(input:focus-visible) {
  border-radius: 999px;
  outline: 2px solid rgba(0, 206, 184, 0.8);
  outline-offset: 4px;
}

.dna-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.dna-row:last-child {
  border-bottom: 0;
}

.dna-bar {
  display: flex;
  height: 22px;
  overflow: hidden;
  background: rgba(16, 24, 33, 0.6);
  border-radius: 4px;
}

.dna-seg {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  height: 100%;
  min-width: 0;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  transition:
    opacity 160ms ease,
    filter 160ms ease,
    box-shadow 160ms ease;
}

.dna-seg:focus-visible {
  outline: 2px solid var(--forest-2);
  outline-offset: -2px;
}

.dna-seg-label {
  max-width: 100%;
  overflow: hidden;
  padding: 0 3px;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(5, 8, 13, 0.65);
}

.dna-seg.is-tiny .dna-seg-label {
  display: none;
}

.dna-seg.pos-qb {
  background: var(--pos-qb);
}

.dna-seg.pos-rb {
  background: var(--pos-rb);
}

.dna-seg.pos-wr {
  background: var(--pos-wr);
}

.dna-seg.pos-te {
  background: var(--pos-te);
}

.dna-seg.pos-def {
  background: var(--pos-def);
  box-shadow: inset 0 0 0 1px rgba(238, 246, 246, 0.3);
}

.dna-seg.pos-other {
  background: var(--pos-other);
}

#appView[data-dna-highlight] .dna-seg {
  opacity: 0.28;
  filter: saturate(0.6);
}

#appView[data-dna-highlight="qb"] .dna-seg.pos-qb,
#appView[data-dna-highlight="rb"] .dna-seg.pos-rb,
#appView[data-dna-highlight="wr"] .dna-seg.pos-wr,
#appView[data-dna-highlight="te"] .dna-seg.pos-te,
#appView[data-dna-highlight="def"] .dna-seg.pos-def,
#appView[data-dna-highlight="other"] .dna-seg.pos-other {
  opacity: 1;
  filter: saturate(1.16) brightness(1.08);
  box-shadow: inset 0 0 0 2px rgba(238, 246, 246, 0.28);
}

.dna-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.survivor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.survivor-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 11px;
  background: rgba(16, 24, 33, 0.62);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.survivor-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.survivor-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.trade-matrix th,
.trade-matrix td {
  width: 48px;
  min-width: 48px;
  padding: 5px 4px;
  text-align: center;
  vertical-align: middle;
}

.trade-matrix th:first-child,
.trade-matrix td.trade-matrix-row {
  width: 146px;
  min-width: 146px;
  max-width: 146px;
}

.trade-matrix .team-avatar {
  width: 24px;
  height: 24px;
  margin: 0 auto;
  font-size: 8px;
}

.trade-matrix-row {
  text-align: left;
}

.trade-matrix-row .capital-manager {
  width: 100%;
  min-width: 0;
}

.trade-matrix-row .capital-manager strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-matrix-cell {
  display: grid;
  place-items: center;
  width: 30px;
  height: 26px;
  margin: 0 auto;
  border-radius: 4px;
  color: #061016;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.trade-matrix-cell.is-zero,
.trade-matrix-cell.is-self {
  color: var(--muted);
  background: transparent;
}

.eyebrow {
  margin: 0;
  color: var(--forest-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  padding: 10px 11px;
}

textarea {
  resize: vertical;
  min-height: 92px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--forest);
  outline: 3px solid rgba(0, 206, 184, 0.18);
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 13px;
  min-height: 40px;
  font-weight: 800;
}

.primary-button {
  background: var(--forest);
  color: #061016;
}

.primary-button:hover {
  background: var(--forest-2);
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled,
.ghost-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

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

.secondary-button:hover,
.ghost-button:hover {
  border-color: var(--forest-2);
}

.danger-button {
  background: var(--surface);
  color: var(--red);
  border-color: #e8c6bf;
}

.ghost-button {
  background: transparent;
  color: var(--forest);
  border-color: transparent;
}

.view-region {
  padding-top: 24px;
}

.alert-region {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.alert {
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.alert.error {
  border-color: #e3b0a7;
  color: #8b3528;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.section-heading h3 {
  margin: 0;
  font-size: 20px;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.band {
  margin-bottom: 30px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.facts-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card,
.tile,
.trade-card,
.vote-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.kpi-card {
  display: grid;
  align-content: center;
  padding: 15px;
  min-height: 96px;
}

.kpi-label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.kpi-value {
  margin: 9px 0 0;
  font-size: 32px;
  line-height: 1;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  hyphens: none;
  white-space: nowrap;
  word-break: keep-all;
}

.kpi-detail {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.facts-section {
  display: grid;
  gap: 14px;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.trade-story-grid {
  display: grid;
  gap: 12px;
}

.trade-story-grid.primary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trade-story-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
  background: linear-gradient(145deg, rgba(18, 26, 36, 0.94), rgba(14, 22, 31, 0.94));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.story-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.story-card-head .fact-label {
  margin: 0;
}

.story-card.compact {
  min-height: 188px;
}

.story-value {
  min-width: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.12;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.story-detail {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.rivalry-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.story-swap,
.story-chain-arrow {
  color: var(--muted);
  font-weight: 850;
}

.story-team-button,
.story-pick-button {
  min-width: 0;
  max-width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.story-team-button {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.12;
}

.story-pick-button {
  width: fit-content;
  font-size: 17px;
  line-height: 1.15;
}

.story-team-button:hover,
.story-team-button:focus-visible,
.story-pick-button:hover,
.story-pick-button:focus-visible {
  color: var(--forest-2);
  outline: none;
}

.story-team-missing {
  color: var(--muted);
  font-weight: 750;
}

.blockbuster-sides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.blockbuster-side {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 20, 29, 0.7);
}

.blockbuster-side .story-team-button {
  font-size: 16px;
}

.blockbuster-side span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.story-bar-list {
  display: grid;
  gap: 8px;
}

.story-bar-row {
  display: grid;
  grid-template-columns: minmax(86px, max-content) minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
}

.story-bar-label {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.story-bar-label small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.1;
}

.story-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #1b2a39;
}

.story-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest), var(--blue));
}

.story-bar-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

.pick-journey-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 7px;
  align-items: center;
}

.pick-journey-chain .story-team-button {
  color: var(--forest-2);
  font-size: 13px;
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.fact-card {
  min-width: 0;
  min-height: 128px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(18, 26, 36, 0.94), rgba(14, 22, 31, 0.94));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.fact-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fact-value {
  display: block;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  font-weight: 850;
}

.fact-list {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.team-fact-list {
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
}

.fact-list.expanded {
  margin-top: 8px;
}

.fact-list span {
  display: inline;
  margin: 0;
  color: var(--ink);
  font-size: inherit;
  font-weight: inherit;
}

.fact-team-button {
  display: block;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
  font-size: 19px;
  line-height: 1.15;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.fact-team-button:hover,
.fact-team-button:focus-visible {
  color: var(--forest-2);
  outline: none;
}

.fact-asset-button {
  font-size: 18px;
  line-height: 1.15;
}

.fact-expander {
  margin-top: 8px;
}

.fact-expander summary {
  color: var(--forest-2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.fact-expander[open] summary {
  display: none;
}

.fact-expander summary:focus-visible {
  outline: 1px solid var(--forest-2);
  outline-offset: 3px;
}

.fact-toggle-less {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--forest-2);
  font-size: 12px;
  font-weight: 850;
}

.fact-toggle-less:hover,
.fact-toggle-less:focus-visible {
  color: var(--blue);
  outline: none;
}

.fact-card .fact-detail {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.records-section {
  display: grid;
  gap: 16px;
}

.records-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dash-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hero-card {
  align-content: start;
  min-height: 108px;
}

.hero-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-top: 10px;
}

.hero-person .team-avatar {
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.hero-person strong {
  overflow: hidden;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.title-card {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 16px 12px 14px;
  color: var(--ink);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.title-card:hover,
.title-card:focus-visible {
  border-color: var(--forest-2);
  background: rgba(0, 206, 184, 0.05);
  outline: none;
}

.title-card.is-you {
  border-color: rgba(0, 206, 184, 0.5);
}

.title-year {
  color: var(--forest-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.title-card .team-avatar {
  width: 44px;
  height: 44px;
}

.title-card strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-runner {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.title-payout {
  font-size: 13px;
  font-weight: 800;
}

.leader-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.leader-name .team-avatar {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  font-size: 8px;
}

.leader-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-meta {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.records-list.compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.tile {
  padding: 18px;
  min-width: 0;
}

.tile h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.leader-row,
.pick-row {
  display: grid;
  grid-template-columns: minmax(142px, 1fr) minmax(0, 1.2fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.leader-row:last-child,
.pick-row:last-child {
  border-bottom: 0;
}

.weekly-score-meta {
  display: grid;
  grid-template-columns: 84px 48px 48px;
  gap: 10px;
  justify-items: end;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.bar-track {
  height: 9px;
  background: var(--surface-alt);
  overflow: hidden;
  border-radius: 999px;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--forest), var(--blue));
  min-width: 4px;
}

.muted {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #101821;
}

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

.place-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.table-team-link {
  display: inline;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  min-height: auto;
  text-align: left;
  font-weight: 850;
}

.table-team-link:hover,
.table-team-link:focus-visible {
  color: var(--forest-2);
  text-decoration: underline;
  outline: none;
}

.trophy-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.36));
}

.trophy-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.trophy-1 {
  color: #f1bf4d;
}

.trophy-2 {
  color: #c6d0da;
}

.trophy-3 {
  color: #c7825a;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 14px;
}

.result-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  margin: 0 0 10px;
}

.toolbar .field {
  min-width: 180px;
}

.toolbar .field.grow {
  flex: 1;
  min-width: 240px;
}

.asset-filter-field {
  flex-basis: 100%;
}

.asset-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  user-select: none;
}

.filter-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-check:hover {
  border-color: var(--forest-2);
}

.filter-check:focus-within {
  border-color: var(--forest-2);
  outline: 3px solid rgba(0, 206, 184, 0.18);
}

.filter-check.is-checked {
  color: var(--forest-2);
  background: rgba(0, 206, 184, 0.1);
  border-color: rgba(0, 206, 184, 0.5);
}

.filter-clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 13px;
  color: #e08585;
  background: transparent;
  border: 1px solid rgba(224, 133, 133, 0.35);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.filter-clear:hover,
.filter-clear:focus-visible {
  background: rgba(224, 133, 133, 0.1);
  border-color: #e08585;
  outline: none;
}

.filter-clear[hidden] {
  display: none;
}

.league-id-cell {
  max-width: 170px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-list,
.vote-list,
.pick-list {
  display: grid;
  gap: 12px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.team-card-button {
  display: grid;
  align-content: space-between;
  gap: 18px;
  width: 100%;
  min-width: 0;
  min-height: 142px;
  overflow: hidden;
  padding: 16px;
  text-align: left;
  color: var(--ink);
  background: linear-gradient(145deg, #121a24, #0f1720);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.team-card-button:hover,
.team-card-button:focus-visible {
  border-color: rgba(0, 206, 184, 0.62);
  outline: none;
}

.team-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.team-card-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.team-card-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-card-copy > span,
.team-card-stats {
  color: var(--muted);
}

.team-avatar {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  overflow: hidden;
  place-items: center;
  color: var(--forest-2);
  background:
    radial-gradient(circle at 28% 22%, rgba(246, 197, 77, 0.9), transparent 34%),
    linear-gradient(145deg, rgba(0, 206, 184, 0.32), rgba(42, 92, 86, 0.72));
  border: 1px solid rgba(0, 206, 184, 0.38);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.team-avatar.large {
  width: 76px;
  height: 76px;
  font-size: 24px;
}

.team-avatar-initials,
.team-avatar img {
  position: absolute;
  inset: 0;
}

.team-avatar-initials {
  display: grid;
  place-items: center;
}

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

.team-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.team-card-stats span {
  display: grid;
  min-width: 0;
  min-height: 34px;
  padding: 6px 4px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-alt);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-hero {
  display: grid;
  gap: 14px;
  padding-top: 6px;
}

.team-hero-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.team-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 16px;
}

.team-identity > div {
  min-width: 0;
}

.team-hero-main h3 {
  margin: 4px 0 0;
  font-size: 34px;
  overflow-wrap: anywhere;
}

.team-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-section-nav {
  margin-top: 14px;
}

.team-section-pill {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  min-height: 32px;
  padding: 6px 10px;
  background: rgba(25, 36, 50, 0.86);
  color: var(--forest-2);
  font-size: 12px;
  font-weight: 850;
}

.team-section-pill:hover,
.team-section-pill:focus-visible {
  border-color: var(--forest-2);
  background: rgba(0, 206, 184, 0.12);
  outline: none;
}

.team-section-anchor {
  scroll-margin-top: 24px;
}

.team-stat-strip {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(120px, 0.8fr) minmax(130px, 0.9fr) minmax(170px, 1.2fr);
  width: 100%;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(18, 26, 36, 0.86), rgba(14, 22, 31, 0.92));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.team-stat {
  min-width: 0;
  padding: 15px 16px;
  border-left: 1px solid var(--line);
}

.team-stat:first-child {
  border-left: 0;
}

.team-stat p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-stat strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  hyphens: none;
  white-space: nowrap;
  word-break: keep-all;
}

.team-stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.trade-card {
  position: relative;
  padding: 16px 16px 42px;
}

.trade-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.trade-title {
  margin: 0;
  font-size: 17px;
}

.trade-card-number {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: flex;
}

.trade-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(156, 178, 201, 0.44);
  border-radius: 999px;
  background: rgba(19, 32, 46, 0.72);
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.trade-number-badge:hover,
.trade-number-badge:focus-visible {
  border-color: var(--forest-2);
  color: var(--forest-2);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 206, 184, 0.12);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--forest-2);
  font-size: 12px;
  font-weight: 750;
}

.pill.warn {
  background: rgba(241, 191, 77, 0.16);
  color: #ffd983;
}

.pill.good {
  background: rgba(0, 206, 184, 0.16);
  color: var(--forest-2);
}

.season-pill {
  background: hsl(var(--season-hue), 78%, 20%);
  border: 1px solid hsl(var(--season-hue), 78%, 42%);
  color: hsl(var(--season-hue), 95%, 84%);
}

.season-jump-button {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}

.season-jump-button:hover,
.season-jump-button:focus-visible {
  outline: none;
}

.season-jump-button:hover .season-pill,
.season-jump-button:focus-visible .season-pill {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(0, 206, 184, 0.14);
}

.trade-sides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.trade-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #101821;
}

.trade-side h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.asset-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--ink);
}

.asset-list li {
  margin: 7px 0;
}

.asset-line-content {
  display: inline-flex;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 5px 8px;
  align-items: center;
  vertical-align: middle;
}

.position-marker {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--pos-other);
  box-shadow: 0 0 0 1px rgba(238, 246, 246, 0.12);
}

.position-marker.pos-qb {
  background: var(--pos-qb);
}

.position-marker.pos-rb {
  background: var(--pos-rb);
}

.position-marker.pos-wr {
  background: var(--pos-wr);
}

.position-marker.pos-te {
  background: var(--pos-te);
}

.position-marker.pos-def {
  background: var(--pos-def);
  box-shadow: 0 0 0 1px rgba(238, 246, 246, 0.3);
}

.position-marker.pos-pick {
  background: var(--pos-pick);
}

.asset-meta {
  color: var(--muted);
}

.asset-button {
  min-width: 0;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: var(--forest);
  padding: 0;
  text-align: left;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.asset-label {
  min-width: 0;
  max-width: 100%;
  color: var(--forest);
  font-weight: 750;
}

.asset-line-content .asset-button,
.asset-line-content .asset-label {
  overflow-wrap: anywhere;
}

.asset-label.asset-pick,
.asset-button.asset-pick {
  font-variant-numeric: tabular-nums;
}

.asset-label.asset-pick.is-pending,
.asset-button.asset-pick.is-pending {
  color: var(--pos-pick);
  font-weight: 500;
}

.asset-button.asset-pick.is-pending {
  text-decoration-color: rgba(155, 168, 183, 0.52);
}

.asset-label.asset-pick.is-resolved,
.asset-button.asset-pick.is-resolved {
  color: #00b39f;
  font-weight: 850;
}

.asset-button.asset-pick.is-resolved {
  text-decoration-thickness: 2px;
}

.asset-trade-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid rgba(156, 178, 201, 0.48);
  border-radius: 999px;
  background: rgba(16, 28, 40, 0.46);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.asset-trade-count svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.asset-button:hover,
.asset-button:focus-visible {
  color: var(--blue);
  outline: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px 24px;
  background: rgba(5, 10, 14, 0.78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.asset-modal {
  width: min(920px, 100%);
  max-height: min(760px, 88vh);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(12, 21, 17, 0.28);
}

.trade-detail-modal {
  max-height: calc(100vh - 32px);
  grid-template-rows: auto auto minmax(0, 1fr);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 4px 0 5px;
  font-size: 22px;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-title-row .eyebrow {
  margin: 0;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--forest);
  font-weight: 900;
}

.modal-body {
  overflow: auto;
  padding: 16px 22px 22px;
}

.modal-trade {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 14px 42px;
  margin-bottom: 12px;
  background: #101821;
}

.trade-detail-card {
  margin-bottom: 0;
}

.modal-trade-number {
  right: 14px;
  bottom: 12px;
}

.trade-detail-sides {
  margin-bottom: 0;
}

.modal-trade-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.modal-trade-head-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-pill-row {
  margin-top: 0;
}

.modal-trade-sides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.modal-trade-sides h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.draft-board-section {
  display: grid;
  gap: 12px;
}

.draft-board-scroll {
  overflow-x: auto;
  padding-bottom: 8px;
}

.draft-board-grid {
  display: grid;
  gap: 3px;
}

.draft-board-corner,
.draft-slot,
.draft-round-label {
  background: rgba(18, 26, 36, 0.86);
  border: 1px solid var(--line);
}

.draft-board-corner,
.draft-round-label {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.draft-slot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 8px;
}

.draft-slot .team-avatar {
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.draft-slot strong {
  overflow: hidden;
  color: #b6c7d6;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-pick {
  position: relative;
  display: grid;
  min-height: 88px;
  padding: 8px 9px;
  overflow: hidden;
  color: #091521;
  background: #4aa5c9;
  border: 1px solid rgba(6, 16, 22, 0.7);
  border-radius: 5px;
  text-align: left;
  box-shadow: inset 0 -18px 28px rgba(0, 0, 0, 0.08);
}

.draft-pick-button {
  width: 100%;
  cursor: pointer;
}

.draft-pick-button:hover,
.draft-pick-button:focus-visible {
  outline: 2px solid var(--forest-2);
  outline-offset: -2px;
}

.draft-pick.is-empty {
  background: rgba(18, 26, 36, 0.5);
  border-color: rgba(37, 50, 65, 0.6);
  box-shadow: none;
}

.draft-pick.is-traded {
  box-shadow:
    inset 0 -18px 28px rgba(0, 0, 0, 0.1),
    inset 0 0 0 2px rgba(238, 246, 246, 0.18);
}

.draft-pick.pos-qb {
  background: var(--pos-qb);
}

.draft-pick.pos-rb {
  background: var(--pos-rb);
}

.draft-pick.pos-wr {
  background: var(--pos-wr);
}

.draft-pick.pos-te {
  background: var(--pos-te);
}

.draft-pick.pos-def {
  background: var(--pos-def);
  box-shadow:
    inset 0 -18px 28px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(238, 246, 246, 0.3);
}

.draft-pick.pos-def strong {
  color: #eef6f6;
}

.draft-pick.pos-def .draft-player-meta {
  color: rgba(238, 246, 246, 0.72);
}

.draft-pick.pos-def .draft-pick-no {
  color: rgba(238, 246, 246, 0.58);
}

.draft-pick.pos-other {
  background: var(--pos-other);
}

.draft-pick-no {
  position: absolute;
  top: 8px;
  right: 9px;
  color: rgba(9, 21, 33, 0.58);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.draft-pick strong {
  align-self: end;
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: #081323;
  font-size: 16px;
  line-height: 1.08;
  overflow-wrap: normal;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.draft-player-meta {
  margin-top: 3px;
  color: rgba(9, 21, 33, 0.72);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
}

.draft-trade-chip {
  justify-self: end;
  align-self: end;
  max-width: 100%;
  margin: 7px -6px -5px 0;
  padding: 3px 7px;
  overflow: hidden;
  color: var(--ink);
  background: rgba(8, 13, 19, 0.58);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.pick-card h4 {
  margin: 0;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.small-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.small-value {
  display: block;
  margin-top: 4px;
  font-weight: 750;
}

.trophy-case {
  display: grid;
  gap: 16px;
}

.trophy-case-group {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(18, 26, 36, 0.92), rgba(12, 18, 25, 0.96));
  box-shadow: var(--shadow);
}

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

.performance-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(52, 70, 87, 0.72);
  border-radius: 8px;
  background: rgba(13, 21, 30, 0.62);
}

.performance-metric strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.trophy-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.trophy-case-grid.weekly {
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
}

.trophy-case-card {
  display: grid;
  min-height: 124px;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 14px 10px;
  border: 1px solid rgba(52, 70, 87, 0.78);
  border-radius: 8px;
  background: rgba(13, 21, 30, 0.74);
  text-align: center;
}

.case-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
}

.case-icon svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.trophy-case-icon {
  filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.42));
}

.football-icon {
  color: #8b5438;
  filter: drop-shadow(0 0 12px rgba(139, 84, 56, 0.22));
}

.football-laces {
  fill: none;
  stroke: #f0c7a8;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trophy-case-card strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.trophy-case-card > span:not(.case-icon) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.trophy-case-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.weekly-card {
  min-height: 82px;
  gap: 3px;
  padding: 9px 7px;
}

.weekly-card .case-icon {
  width: 26px;
  height: 26px;
}

.weekly-card .case-icon svg {
  width: 22px;
  height: 22px;
}

.weekly-card strong {
  font-size: 16px;
}

.weekly-card > span:not(.case-icon) {
  font-size: 11px;
}

.weekly-card small {
  font-size: 10px;
}

.trophy-case-empty {
  margin: 12px 0 0;
  color: var(--muted);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tab-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--forest);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
}

.tab-button.is-active {
  background: var(--forest);
  color: #061016;
  border-color: var(--forest);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.vote-card {
  padding: 16px;
}

.vote-summary {
  margin-bottom: 14px;
}

.vote-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.vote-summary-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101821;
}

.vote-summary-card.approved {
  border-color: rgba(0, 206, 184, 0.32);
}

.vote-summary-card.rejected {
  border-color: rgba(199, 130, 90, 0.32);
}

.vote-summary-card.other {
  border-color: rgba(113, 129, 255, 0.32);
}

.vote-summary-card h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vote-summary-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vote-summary-card li {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.vote-summary-card strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.vote-summary-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.vote-card h4 {
  margin: 0 0 12px;
  font-size: 15px;
}

.answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
}

.answer-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  overflow: hidden;
  margin-top: 5px;
}

.answer-bar span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.answer-row.is-winner strong {
  color: var(--forest-2);
}

.answer-row.is-winner .answer-bar span {
  background: var(--forest-2);
}

.prediction-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

@media (min-width: 1200px) {
  .prediction-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  }
}

.prediction-form,
.prediction-share-card,
.prediction-result-card,
.prediction-scoring-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.prediction-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.prediction-form-head {
  display: grid;
  gap: 4px;
}

.prediction-form h4,
.prediction-share-card h4,
.prediction-scoring-card h4 {
  margin: 0;
  font-size: 18px;
}

.prediction-sync-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.prediction-sync-badge.is-online {
  border-color: rgba(0, 206, 184, 0.45);
  color: var(--forest-2);
  background: rgba(0, 206, 184, 0.1);
}

.prediction-sync-badge.is-offline {
  border-color: rgba(255, 176, 32, 0.45);
  color: var(--gold, #e6b34a);
  background: rgba(255, 176, 32, 0.08);
  cursor: pointer;
}

.prediction-form-note {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.prediction-section-stack {
  display: grid;
  gap: 12px;
}

.prediction-section-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 22, 32, 0.68);
}

.prediction-section-title {
  display: grid;
  gap: 3px;
}

.prediction-section-title h5 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.prediction-section-title p,
.prediction-question-help {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.prediction-section-title p {
  font-size: 13px;
}

.prediction-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.prediction-question-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 15, 23, 0.72);
}

.prediction-question-card > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.prediction-question-help {
  display: block;
  font-size: 12px;
  font-weight: 650;
}

.prediction-position-pick {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.prediction-position-controls {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.prediction-question-card textarea {
  min-height: 104px;
}

.prediction-share-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.prediction-share-stat {
  display: grid;
  gap: 5px;
}

.prediction-share-stat strong {
  font-size: 42px;
  line-height: 1;
}

.prediction-share-stat span,
.prediction-share-list span {
  color: var(--muted);
  font-size: 13px;
}

.prediction-share-list {
  display: grid;
  gap: 8px;
}

.prediction-results-grid,
.prediction-scoring-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.prediction-result-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  min-height: 172px;
}

.prediction-result-card.frozen strong {
  font-size: 38px;
  line-height: 1;
}

.prediction-result-card.frozen span,
.prediction-empty {
  color: var(--muted);
  font-size: 13px;
}

.prediction-result-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prediction-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.prediction-result-row span,
.prediction-team-link {
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.15;
  text-align: left;
}

.prediction-team-link {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.prediction-team-link:hover {
  color: var(--forest-2);
}

.prediction-result-row strong {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.prediction-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-alt);
}

.prediction-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest), var(--blue));
}

.prediction-scoring-card {
  padding: 16px;
}

.prediction-scoring-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.award-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.award-grid .tile {
  display: grid;
  gap: 8px;
}

.award-grid strong {
  font-size: 19px;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  padding: 24px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(18, 26, 36, 0.72);
}

.loading {
  opacity: 0.7;
  pointer-events: none;
}

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

  /* The sidebar becomes a sticky top bar: compact brand row + a horizontally
     scrollable strip of nav pills, so content starts right below it. */
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 15;
    height: auto;
    gap: 10px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-toggle {
    display: none;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-block h1 {
    font-size: 15px;
  }

  .brand-block p {
    display: none;
  }

  .nav-list {
    display: flex;
    gap: 4px;
    margin: 0 -14px;
    padding: 0 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 11px;
    font-size: 14px;
    white-space: nowrap;
  }

  .source-note {
    display: none;
  }

  .content-area {
    padding: 22px;
  }

  .topbar,
  .dashboard-grid,
  .records-grid,
  .records-list.compact,
  .two-col,
  .trade-sides,
  .modal-trade-sides,
  .team-hero-main,
  .performance-grid,
  .pick-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions {
    justify-self: start;
    justify-content: flex-start;
  }

  .topbar .identity-chip {
    justify-self: start;
  }

  .team-grid,
  .award-grid,
  .vote-summary-grid,
  .team-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-stat {
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
  }

  .team-stat:nth-child(odd) {
    border-left: 0;
  }

  .team-stat:nth-child(-n + 2) {
    border-top: 0;
  }

  .kpi-grid,
  .facts-grid,
  .trade-story-grid.primary,
  .trade-story-grid.compact,
  .dash-hero-grid,
  .prediction-results-grid,
  .prediction-scoring-grid,
  .title-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .content-area {
    padding: 18px 14px 34px;
  }

  .kpi-grid,
  .dash-hero-grid,
  .facts-kpi-grid,
  .facts-grid,
  .trade-story-grid.primary,
  .trade-story-grid.compact,
  .team-grid,
  .award-grid,
  .vote-summary-grid,
  .prediction-layout,
  .prediction-section-grid,
  .prediction-results-grid,
  .prediction-scoring-grid,
  .team-stat-strip,
  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .team-identity {
    align-items: flex-start;
  }

  .team-avatar.large {
    width: 64px;
    height: 64px;
    font-size: 20px;
  }

  .team-hero-main h3 {
    font-size: 28px;
  }

  .team-stat,
  .team-stat:nth-child(odd),
  .team-stat:nth-child(-n + 2) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .team-stat:first-child {
    border-top: 0;
  }

  .primary-button,
  .secondary-button,
  .danger-button {
    width: 100%;
  }

  .leader-row,
  .pick-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

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

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

  .dna-mode-toggle {
    justify-content: center;
  }

  .dna-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .dna-meta {
    white-space: normal;
  }
}

/* ------------------------------------------------------------------ */
/* Trade trees & chain ledger                                          */
/* ------------------------------------------------------------------ */

.modal-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px 8px;
  background: rgba(16, 24, 33, 0.62);
}

.trade-detail-modal .modal-tabs {
  min-height: 48px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.modal-tab {
  min-height: 32px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(19, 32, 45, 0.72);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
}

.modal-tab:hover,
.modal-tab:focus-visible {
  color: var(--forest-2);
  outline: none;
}

.modal-tab.is-active {
  background: rgba(0, 206, 184, 0.14);
  border-color: rgba(0, 206, 184, 0.55);
  color: var(--ink);
}

.trade-detail-modal .modal-body {
  min-height: 0;
  overflow-y: auto;
  border-top: 0;
  overscroll-behavior: contain;
}

.trade-tree-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.trade-tree-button svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trade-card-number {
  gap: 6px;
}

.tree-manager-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tree-manager-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tree-manager-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tree-manager-pill:hover,
.tree-manager-pill:focus-visible {
  color: var(--forest-2);
  border-color: var(--forest-2);
  outline: none;
}

.tree-manager-pill.is-active {
  border-color: var(--forest);
  color: var(--forest-2);
  background: rgba(0, 206, 184, 0.1);
}

.chain-ledger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101821;
  padding: 14px;
}

.ledger-col h5 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.ledger-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.ledger-col li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  border-bottom: 1px dashed rgba(52, 70, 87, 0.55);
  padding-bottom: 7px;
}

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

.ledger-asset {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ledger-arrow {
  align-self: center;
  text-align: center;
  color: var(--forest);
  font-size: 20px;
  font-weight: 900;
}

.ledger-note {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.chain-summary {
  margin: 10px 2px 18px;
  font-size: 13px;
}

.chain-status {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.chain-status.is-held {
  color: #06231f;
  background: var(--forest);
}

.chain-status.is-pending {
  color: #8ff7ec;
  border-color: rgba(143, 247, 236, 0.42);
  background: rgba(0, 206, 184, 0.08);
}

.chain-status.is-exited {
  color: #c3ccd6;
  background: rgba(141, 156, 168, 0.16);
  border-color: rgba(141, 156, 168, 0.35);
}

.chain-status.is-neutral {
  color: var(--muted);
  border-color: var(--line-strong);
}

.chain-tree {
  margin-top: 6px;
}

.chain-tree-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-top: 14px;
  margin-bottom: 6px;
}

.chain-root-card {
  display: block;
  border-color: var(--line-strong);
}

.chain-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 22px;
}

.chain-list-root {
  padding-left: 26px;
  margin-top: 8px;
}

.chain-node {
  position: relative;
  padding: 10px 0 0 18px;
}

.chain-node::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(52, 70, 87, 0.85);
}

.chain-node:last-child::before {
  bottom: auto;
  height: 30px;
}

.chain-node::after {
  content: "";
  position: absolute;
  left: 0;
  top: 28px;
  width: 16px;
  height: 2px;
  background: rgba(52, 70, 87, 0.85);
}

.chain-node-card {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 8px 12px;
  max-width: 100%;
}

.chain-asset-card {
  font-size: 13.5px;
  font-weight: 700;
}

.chain-asset-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.chain-asset-label.asset-pick {
  font-variant-numeric: tabular-nums;
}

.chain-asset-label.asset-pick.is-resolved {
  color: #00b39f;
  font-weight: 850;
}

.chain-asset-label.asset-pick.is-pending {
  color: var(--pos-pick);
}

.chain-trade-card {
  display: block;
  background: #101821;
  border-color: var(--line-strong);
}

.chain-trade-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.chain-sent-line {
  font-size: 12px;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.chain-merge-card {
  border-style: dashed;
  color: var(--muted);
  font-size: 12.5px;
}

.chain-footnote {
  font-size: 12px;
  margin-top: 16px;
}

@media (max-width: 720px) {
  .chain-ledger {
    grid-template-columns: 1fr;
  }

  .ledger-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }

  .chain-list,
  .chain-list-root {
    padding-left: 12px;
  }
}

.chain-tree-tools {
  display: inline-flex;
  gap: 6px;
}

.chain-tool-button {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
}

.chain-tool-button:hover,
.chain-tool-button:focus-visible {
  color: var(--forest-2);
  border-color: var(--forest-2);
  outline: none;
}

.chain-asset-card.is-toggle {
  cursor: pointer;
}

.chain-asset-card.is-toggle:hover,
.chain-asset-card.is-toggle:focus-visible {
  border-color: var(--forest-2);
  outline: none;
}

.chain-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  color: var(--forest);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  transition: transform 140ms ease;
}

.chain-branch:not(.is-collapsed) > .chain-node-card .chain-caret {
  transform: rotate(90deg);
}

.chain-branch.is-collapsed > .chain-list {
  display: none;
}
