:root {
  --page: #f5f6f1;
  --surface: #ffffff;
  --ink: #19221e;
  --ink-soft: #53605a;
  --ink-muted: #65716b;
  --line: #dfe4dc;
  --green: #246b56;
  --green-soft: #e6f0eb;
  --amber: #914b1c;
  --amber-soft: #f8ede3;
  --red: #ad4f4a;
  --red-soft: #f7e9e7;
  --shadow: 0 1px 2px rgba(20, 33, 28, 0.04), 0 10px 30px rgba(20, 33, 28, 0.04);
  --radius: 16px;
}

*,
*::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;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
}

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 20;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: #14211c;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.brand strong {
  display: block;
  font-size: 0.95rem;
}

.brand small {
  color: var(--ink-muted);
  font-size: 0.75rem;
}

.top-nav {
  display: flex;
  gap: 0.5rem;
}

.top-nav a {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.top-nav a[href="/fantasy/football/"] {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.hero {
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
}

.lede {
  margin: 0;
  max-width: 40rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.settings-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.settings-bar label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.settings-bar select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  background: #fff;
}

.toggle input {
  accent-color: var(--green);
}

.calculator,
.rankings-panel,
.model-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.15rem 1.25rem;
  margin-bottom: 1.25rem;
}

.panel-head {
  margin-bottom: 1rem;
}

.panel-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.verdict,
.subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.verdict.is-a {
  color: var(--green);
  font-weight: 600;
}

.verdict.is-b {
  color: var(--amber);
}

.verdict.is-even {
  color: var(--ink);
  font-weight: 600;
}

.trade-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
}

.trade-grid-mid {
  display: flex;
  align-items: center;
  color: var(--ink-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
}

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

.team-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.team-head h3 {
  margin: 0;
  font-size: 1rem;
}

.totals {
  display: flex;
  gap: 0.85rem;
  text-align: right;
}

.totals .label {
  display: block;
  font-size: 0.7rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.totals strong {
  font-size: 1.25rem;
}

.player-search {
  position: relative;
  margin-bottom: 0.65rem;
}

.player-search input,
.rank-filter input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  background: #fff;
}

.suggestions {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow: auto;
}

.suggestions button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}

.suggestions button:hover,
.suggestions button:focus-visible {
  background: var(--green-soft);
}

.player-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 3rem;
}

.player-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
}

.player-chip .meta {
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.player-chip button {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.slot-note {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  min-height: 1.2em;
}

.fairness-bar {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.fairness-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.fairness-track {
  height: 8px;
  border-radius: 999px;
  background: #e8ebe4;
  overflow: hidden;
}

#fairness-fill {
  height: 100%;
  width: 0%;
  background: var(--green);
  transition: width 0.2s ease;
}

.trade-notes {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.45;
}

.rank-filter {
  display: block;
  margin-top: 0.75rem;
  max-width: 20rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--ink-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.model-grid h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.model-grid p,
.sources-list {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.sources-list {
  padding-left: 1.1rem;
  margin: 0 0 0.5rem;
}

.fineprint {
  font-size: 0.78rem !important;
  color: var(--ink-muted) !important;
}

.footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--green);
  font-weight: 600;
}

@media (max-width: 820px) {
  .trade-grid {
    grid-template-columns: 1fr;
  }

  .trade-grid-mid {
    justify-content: center;
  }

  .model-grid {
    grid-template-columns: 1fr;
  }
}
