:root {
  color-scheme: dark;
  --ink: #f2f3f5;
  --muted: #a9b0bb;
  --line: #303641;
  --soft: #171b23;
  --paper: #0e1117;
  --brand: #30df25;
  --brand-dark: #4bea40;
  --good: #55b88a;
  --good-soft: #153528;
  --warn: #e0a451;
  --warn-soft: #382814;
  --danger: #e16b73;
  --danger-soft: #3b1d22;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }

.topbar {
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px max(24px, calc((100vw - 1180px) / 2));
  background: var(--paper);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 650; }
.brand:hover { text-decoration: none; }
.brand img { width: 58px; height: 58px; object-fit: contain; border-radius: 50%; }
.brand span { border-left: 1px solid var(--line); padding-left: 12px; }
.topnav { display: flex; align-items: center; gap: 20px; font-size: 0.9rem; }
.topnav form { margin: 0; }

.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 70px; }
.auth-shell { width: min(420px, calc(100% - 32px)); min-height: calc(100vh - 68px); display: grid; align-items: center; padding: 48px 0 88px; }
.auth-panel { border-top: 4px solid var(--brand); padding-top: 28px; }
.auth-summary { margin: 13px 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.subscribe-shell { width: min(900px, calc(100% - 48px)); padding-top: 28px; }
.access-intro { padding: 12px 0 30px; }
.access-lead { max-width: 760px; margin: 16px 0 30px; color: var(--ink); font-size: 1.02rem; line-height: 1.55; }
.access-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.access-summary div { min-width: 0; padding: 18px 16px; border-right: 1px solid var(--line); }
.access-summary div:first-child { padding-left: 0; }
.access-summary div:last-child { border-right: 0; }
.access-summary span, .market-columns span { display: block; color: var(--muted); font-size: 0.75rem; line-height: 1.45; }
.access-summary strong { display: block; margin-bottom: 6px; font-size: 0.85rem; line-height: 1.35; }
.market-band { padding: 38px 0; border-bottom: 1px solid var(--line); }
.market-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.market-columns strong { display: block; margin-bottom: 7px; font-size: 0.9rem; }
.process-band { padding: 38px 0; border-bottom: 1px solid var(--line); }
.process-band .eyebrow { margin-bottom: 8px; color: var(--brand); }
.process-band p { max-width: 760px; margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.6; }
.process-band p + p { margin-top: 10px; color: var(--ink); }
.checkout-band { padding: 38px 0; border-bottom: 1px solid var(--line); }
.checkout-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.price-line { display: flex; align-items: baseline; gap: 8px; }
.price-line strong { font-size: 1.8rem; }
.price-line span { color: var(--muted); font-size: 0.82rem; }
.membership-copy { max-width: 680px; margin: -10px 0 24px; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
.checkout-button { display: inline-flex; align-items: center; justify-content: center; }
.checkout-note { margin: 14px 0 0; color: var(--muted); font-size: 0.76rem; line-height: 1.5; }
.access-footer { margin: 22px 0 0; color: var(--muted); font-size: 0.86rem; }

h1, h2 { margin: 0; letter-spacing: 0; }
h1 { font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.1; }
h2 { font-size: 1.08rem; line-height: 1.2; }
.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 0.72rem; font-weight: 750; letter-spacing: 0; }
.section-heading { margin-bottom: 24px; }
.section-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.notice { width: min(1180px, calc(100% - 48px)); margin: 18px auto -18px; padding: 12px 14px; border-left: 3px solid; font-size: 0.9rem; }
.notice-success { border-color: var(--good); background: var(--good-soft); color: #a8e2c5; }
.notice-error { border-color: var(--danger); background: var(--danger-soft); color: #f0a3a8; }
.inline-alert { background: var(--warn-soft); color: #f0c98e; border-left: 3px solid var(--warn); padding: 12px 14px; margin: 22px 0; }

.form-stack { display: grid; gap: 18px; }
.form-stack label { display: grid; gap: 7px; color: var(--ink); font-size: 0.84rem; font-weight: 620; }
.input-help { color: var(--muted); font-size: 0.72rem; font-weight: 450; line-height: 1.45; }
.input-help code { color: #c7ccd4; font-size: 0.7rem; }
input, select, textarea {
  width: 100%;
  border: 1px solid #4b5260;
  border-radius: 5px;
  background: #141922;
  color: var(--ink);
  min-height: 43px;
  padding: 9px 11px;
  outline: none;
}
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(48, 223, 37, 0.12); }
.form-note { margin: -7px 0 0; color: var(--muted); font-size: 0.76rem; line-height: 1.45; }
.locked-field { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 43px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.84rem; }
.locked-field strong { color: var(--ink); font-size: 0.82rem; }

.button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 5px;
  min-height: 40px;
  padding: 9px 15px;
  cursor: pointer;
  font-weight: 680;
  font-size: 0.86rem;
  white-space: nowrap;
}
.button:hover { text-decoration: none; }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.button-primary { background: var(--brand); color: #071006; }
.button-primary:hover:not(:disabled) { background: var(--brand-dark); }
.button-secondary { border-color: #4b5260; background: var(--paper); color: var(--ink); }
.button-secondary:hover { background: var(--soft); }
.button-quiet { padding: 6px 0; min-height: auto; background: transparent; color: var(--muted); }
.button-danger { background: var(--paper); border-color: #80464b; color: var(--danger); }
.button-full { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.auth-switch { border-top: 1px solid var(--line); margin: 26px 0 0; padding-top: 20px; color: var(--muted); font-size: 0.9rem; }

.account-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 26px; }
.account-header h1 { overflow-wrap: anywhere; }
.account-status { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9a969f; margin-right: 6px; }
.status-ok { background: var(--good); }
.status-warn { background: var(--warn); }

.metrics-band { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric { padding: 21px 18px; border-right: 1px solid var(--line); min-width: 0; }
.metric:first-child { padding-left: 0; }
.metric:last-child { border-right: 0; }
.metric span { display: block; color: var(--muted); font-size: 0.76rem; margin-bottom: 7px; }
.metric strong { font-size: 1.35rem; font-weight: 680; }
.membership-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.membership-actions { display: flex; align-items: center; gap: 12px; }
.membership-actions form { margin: 0; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; padding: 42px 0; border-bottom: 1px solid var(--line); }
.workspace-section { min-width: 0; }
.execution-summary { margin: -10px 0 20px; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.environment-label, .mode-label, .row-count { border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; font-weight: 700; }
.mode-live { border-color: #98cdb6; background: var(--good-soft); color: var(--good); }
.mode-ready { border-color: #e7c993; background: var(--warn-soft); color: var(--warn); }
.connection-details { margin: 0 0 22px; }
.connection-details div { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.connection-details dt { color: var(--muted); font-size: 0.8rem; }
.connection-details dd { margin: 0; font-size: 0.82rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; overflow-wrap: anywhere; }

.risk-selector { border: 0; padding: 0; margin: 0; }
.risk-selector legend { margin-bottom: 8px; color: var(--ink); font-size: 0.84rem; font-weight: 620; }
.risk-selector { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.risk-selector label { display: block; }
.risk-selector input { position: absolute; opacity: 0; pointer-events: none; }
.risk-selector span { display: grid; place-items: center; gap: 3px; min-height: 62px; padding: 7px 4px; border: 1px solid #4b5260; border-radius: 5px; cursor: pointer; font-size: 0.78rem; font-weight: 680; text-align: center; }
.risk-selector small { color: var(--muted); font-size: 0.65rem; font-weight: 550; line-height: 1.25; }
.risk-selector input:checked + span { border-color: var(--brand); background: #2c1b31; color: #d7a8dc; box-shadow: inset 0 0 0 1px var(--brand); }
.sizing-explanation { margin: 16px 0 0; padding: 15px 17px; border-left: 2px solid var(--brand); background: var(--soft); color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.sizing-explanation strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 0.8rem; }
.sizing-explanation strong:not(:first-child) { margin-top: 13px; }
.sizing-explanation ul { margin: 0; padding-left: 18px; }
.sizing-explanation li + li { margin-top: 3px; }
.field-note { margin: -5px 0 0; color: var(--warn); font-size: 0.78rem; line-height: 1.4; }

.table-section { padding: 38px 0 0; }
.table-wrap { width: 100%; overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; background: var(--soft); }
th:first-child, td:first-child { padding-left: 12px; }
.ticker { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; font-size: 0.76rem; }
.empty-row { color: var(--muted); text-align: center; padding: 25px; }
.status-pill { display: inline-block; padding: 4px 7px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; text-transform: capitalize; }
.status-filled { background: var(--good-soft); color: var(--good); }
.status-failed, .status-missed-price, .status-missed-stale { background: var(--danger-soft); color: var(--danger); }

@media (max-width: 760px) {
  .topbar { padding: 10px 16px; }
  .topnav > a { display: none; }
  .shell { width: min(100% - 32px, 1180px); padding-top: 28px; }
  .account-header { align-items: start; flex-direction: column; gap: 14px; }
  .subscribe-shell { width: min(100% - 32px, 900px); padding-top: 36px; }
  .access-summary { grid-template-columns: 1fr; }
  .access-summary div, .access-summary div:first-child { padding: 14px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .access-summary div:last-child { border-bottom: 0; }
  .market-columns { grid-template-columns: 1fr; gap: 22px; }
  .checkout-heading { align-items: start; flex-direction: column; }
  .checkout-button { width: 100%; }
  .membership-band { align-items: start; flex-direction: column; }
  .metrics-band { grid-template-columns: 1fr 1fr; }
  .metric { border-bottom: 1px solid var(--line); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(3), .metric:nth-child(4) { border-bottom: 0; }
  .metric:nth-child(3) { padding-left: 0; }
  .workspace-grid { grid-template-columns: 1fr; gap: 44px; }
  .risk-selector { grid-template-columns: 1fr 1fr; }
  .table-section { padding-top: 32px; }
}

@media (max-width: 420px) {
  .metrics-band { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); padding-left: 0; }
  .metric:nth-child(3) { border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .button-row .button { flex: 1 1 auto; }
}

.sports-list { display:flex; flex-wrap:wrap; gap:12px 22px; margin:22px 0 28px; color:var(--ink); font-size:.92rem; }
.process-band h2 { margin-bottom:14px; }
.process-band .setup-note { color:var(--muted); font-size:.8rem; }
@media(max-width:640px){.subscribe-shell{padding-top:20px}.brand span{font-size:.88rem}.brand img{width:48px;height:48px}.market-columns{grid-template-columns:1fr;gap:20px}.sports-list{gap:12px 18px;font-size:.85rem}}
