:root {
  color-scheme: light;
  --bg: #f3f6f1;
  --ink: #182018;
  --muted: #66715f;
  --panel: #ffffff;
  --line: #dfe7dc;
  --accent: #176b4d;
  --accent-dark: #0f4d37;
  --gold: #f1b84b;
  --danger: #b63d3d;
  --shadow: 0 18px 45px rgba(24, 32, 24, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.topbar div:first-child {
  display: grid;
  gap: 2px;
}

.topbar strong {
  color: var(--accent-dark);
  font-size: 1.05rem;
}

.topbar span {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.plan-badge {
  border-radius: 999px;
  padding: 7px 11px;
  color: #173122 !important;
  background: #dceadc;
  font-weight: 900;
}

.ghost-button {
  min-height: 34px;
  padding: 7px 11px;
  color: var(--accent-dark);
  border: 1px solid #bdd0b8;
  background: transparent;
}

.tiny-button {
  min-height: 30px;
  width: fit-content;
  padding: 6px 9px;
  color: var(--accent-dark);
  border: 1px solid #bdd0b8;
  background: #f6fbf3;
  font-size: 0.82rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
  padding: 34px;
  border-radius: 8px;
  color: #f8fff9;
  background:
    linear-gradient(115deg, rgba(12, 41, 31, 0.94), rgba(23, 107, 77, 0.86)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='460' viewBox='0 0 900 460'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.18'%3E%3Cpath d='M40 70h820M40 150h820M40 230h820M40 310h820M40 390h820'/%3E%3Cpath d='M120 30v400M260 30v400M400 30v400M540 30v400M680 30v400M820 30v400'/%3E%3C/g%3E%3Cg fill='%23f1b84b' fill-opacity='.38'%3E%3Ccircle cx='160' cy='110' r='26'/%3E%3Ccircle cx='650' cy='260' r='38'/%3E%3Ccircle cx='760' cy='140' r='18'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  box-shadow: var(--shadow);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.plan-card {
  display: grid;
  gap: 8px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(24, 32, 24, 0.07);
}

.plan-card.featured {
  border-color: #87b58f;
  background: #f8fcf6;
}

.plan-card span {
  color: var(--accent-dark);
  font-weight: 900;
}

.plan-card strong {
  font-size: 1.55rem;
}

.plan-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.plan-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 4px;
  border-radius: 7px;
  padding: 10px 13px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.plan-link:hover {
  background: var(--accent-dark);
}

.stripe-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.usage-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 14px;
  margin-top: 18px;
}

.usage-strip > div {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.usage-strip span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.usage-strip strong {
  font-size: 1.25rem;
}

.usage-strip small {
  color: var(--muted);
}

.meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7efe4;
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.account-panel {
  display: grid;
  gap: 15px;
  margin-top: 18px;
  padding: 19px;
  border: 1px solid #cfd9ca;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(24, 32, 24, 0.07);
}

.account-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.account-head h2 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 1.65rem;
}

.account-head p {
  max-width: 790px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.account-disclaimer {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid #c9dcc4;
  border-radius: 8px;
  background: #f8fcf6;
}

.account-disclaimer label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #354033;
  font-weight: 750;
  line-height: 1.45;
}

.account-disclaimer input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.account-disclaimer small {
  color: var(--muted);
}

.login-card {
  display: grid;
  gap: 14px;
  padding: 15px;
  border: 1px solid #c9dcc4;
  border-radius: 8px;
  background: #fbfcfa;
}

.login-card span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.login-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.2rem;
}

.login-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.login-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.account-grid article {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.account-grid span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-grid strong {
  color: var(--ink);
  font-size: 1.12rem;
}

.account-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.legal-panel {
  display: grid;
  gap: 15px;
  margin-top: 22px;
  padding: 19px;
  border: 1px solid #d8dfd4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(24, 32, 24, 0.06);
}

.legal-panel h2 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 1.55rem;
}

.legal-panel p {
  max-width: 900px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.legal-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.legal-grid strong {
  color: var(--ink);
}

.legal-grid p {
  margin-top: 7px;
  font-size: 0.9rem;
}

.weekly-edge {
  display: grid;
  gap: 15px;
  margin-top: 18px;
  padding: 19px;
  border: 1px solid #bdd5b8;
  border-radius: 8px;
  background: #fbfdf8;
  box-shadow: 0 12px 28px rgba(24, 32, 24, 0.07);
}

.weekly-edge-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.weekly-edge h2 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 1.8rem;
}

.weekly-edge p {
  max-width: 740px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.edge-sport {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 12px;
  color: #173122;
  background: #dceadc;
  font-weight: 900;
}

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

.edge-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.edge-card span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.edge-card strong {
  color: var(--ink);
  line-height: 1.25;
}

.edge-card p {
  margin: 0;
  color: #596554;
  font-size: 0.9rem;
  line-height: 1.45;
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(248, 255, 249, 0.84);
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.metric-label,
.summary span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-panel .metric-label {
  color: rgba(248, 255, 249, 0.7);
}

.hero-panel strong {
  font-size: 1.35rem;
}

.hero-panel span:last-child {
  color: rgba(248, 255, 249, 0.78);
}

.workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
}

.controls,
.results {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 18px;
}

.file-drop {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 2px dashed #a9b8a2;
  border-radius: 8px;
  background: #f9fbf7;
  cursor: pointer;
}

.file-drop input {
  width: 100%;
}

.file-drop span {
  color: var(--accent-dark);
  font-weight: 900;
}

.file-drop small {
  color: var(--muted);
}

label {
  display: grid;
  gap: 7px;
  color: #354033;
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd9ca;
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
  line-height: 1.35;
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.toggles {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-radius: 8px;
  background: #f6f8f4;
}

.toggles label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.toggles input {
  width: 18px;
  min-height: 18px;
}

.strategy-tuner {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid #c9dcc4;
  border-radius: 8px;
  background: #f8fcf6;
}

.strategy-tuner strong {
  display: block;
  margin-top: 4px;
  color: var(--accent-dark);
}

.strategy-tuner label {
  gap: 8px;
}

.strategy-tuner output {
  justify-self: end;
  margin-top: -25px;
  color: var(--accent-dark);
  font-weight: 900;
}

.strategy-tuner input[type="range"] {
  min-height: 26px;
  padding: 0;
  accent-color: var(--accent);
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 11px 14px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

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

.secondary {
  color: var(--accent-dark);
  border: 1px solid #bdd0b8;
  background: #eef5eb;
}

.secondary:hover {
  background: #e2ecdd;
}

.message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.message.warn {
  color: var(--danger);
}

.insight-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #c9dcc4;
  border-radius: 8px;
  background: #f8fcf6;
}

.insight-box strong {
  display: block;
  margin-top: 4px;
  color: var(--accent-dark);
}

.insight-box p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.insight-output {
  padding: 11px;
  border-radius: 7px;
  color: #465041;
  background: #fff;
  font-size: 0.9rem;
  line-height: 1.4;
}

.results {
  min-width: 0;
  overflow: hidden;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.preflight {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.preflight span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.preflight strong {
  display: block;
  margin-top: 5px;
  color: var(--accent-dark);
  font-size: 1.05rem;
}

.preflight ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0;
  padding-left: 18px;
}

.preflight li {
  color: #4d5949;
  line-height: 1.35;
}

.summary div {
  display: grid;
  gap: 5px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.summary div:last-child {
  border-right: 0;
}

.summary strong {
  font-size: 1.3rem;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.tab {
  min-height: 36px;
  padding: 8px 13px;
  color: var(--accent-dark);
  background: transparent;
}

.tab.active {
  color: #fff;
  background: var(--accent);
}

.view {
  display: none;
  padding: 16px;
}

.view.active {
  display: block;
}

.lineups {
  display: grid;
  gap: 14px;
}

.lineup-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.lineup-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  color: #fff;
  background: #21362c;
}

.lineup-head strong {
  font-size: 1.02rem;
}

.lineup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border-radius: 999px;
  padding: 5px 9px;
  color: #173122;
  background: #dceadc;
  font-size: 0.8rem;
  font-weight: 900;
}

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

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1ea;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #f8faf6;
  font-size: 0.78rem;
  text-transform: uppercase;
}

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

.table-wrap {
  overflow: auto;
}

.validation {
  display: grid;
  gap: 14px;
}

.validation-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 8px;
  color: #123023;
  background: #e5f3e5;
}

.validation-head.fail {
  color: #6f2323;
  background: #f8e5e5;
}

.validation-head strong {
  font-size: 1.2rem;
}

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

.validation-item {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid #cfe2ca;
  border-radius: 8px;
  background: #fbfdf9;
}

.validation-item span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.validation-item.fail {
  border-color: #e8b6b6;
  background: #fff8f8;
}

.validation-item.fail span {
  color: var(--danger);
}

.validation-issues {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.validation-issues ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.validation-issues li,
.validation-issues p {
  color: var(--muted);
  line-height: 1.45;
}

.player-control {
  min-width: 120px;
}

.exposure-input {
  width: 78px;
  min-height: 34px;
  padding: 6px 8px;
}

.control-select {
  min-width: 112px;
  min-height: 34px;
  padding: 6px 8px;
}

.tag-love {
  color: #0f4d37;
  font-weight: 900;
}

.tag-fade,
.tag-exclude {
  color: var(--danger);
  font-weight: 900;
}

.tag-lock {
  color: #7a4b00;
  font-weight: 900;
}

.empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed #cdd8c8;
  border-radius: 8px;
  background: #fbfcfa;
}

@media (max-width: 950px) {
  .app-shell {
    padding: 14px;
  }

  .hero,
  .workspace,
  .plans,
  .usage-strip,
  .account-grid,
  .legal-grid,
  .edge-grid {
    grid-template-columns: 1fr;
  }

  .account-head,
  .weekly-edge-head {
    flex-direction: column;
  }

  .controls {
    position: static;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding: 22px;
  }

  .control-grid,
  .summary,
  .validation-grid,
  .preflight,
  .preflight ul {
    grid-template-columns: 1fr;
  }

  .summary div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tabs {
    overflow-x: auto;
  }
}
