:root {
  color-scheme: dark;
  --bg: #101412;
  --surface: #171d1a;
  --surface-2: #1e2722;
  --line: #2b3830;
  --text: #edf4ef;
  --muted: #9cac9f;
  --accent: #46d37d;
  --accent-2: #5aa7ff;
  --warn: #ffd166;
  --bad: #ff6b6b;
  --ok: #57e08a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(70, 211, 125, 0.08), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select,
.link-button {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 29, 26, 0.94);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin-bottom: 2px;
}

.login-panel button {
  width: 100%;
}

.login-error {
  min-height: 20px;
  color: #ffd1d1;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

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

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 44px;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 16px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(23, 29, 26, 0.78);
  color: var(--muted);
  white-space: nowrap;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

.status-pill.live .dot {
  background: var(--ok);
  box-shadow: 0 0 18px rgba(87, 224, 138, 0.85);
}

.status-pill.error .dot {
  background: var(--bad);
}

.control-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 120px 112px auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 29, 26, 0.9);
  box-shadow: var(--shadow);
}

.tab-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.page-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 21, 18, 0.92);
}

.page-tab {
  min-height: 36px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.page-tab.active {
  background: var(--accent);
  color: #07100b;
}

.page-view:not(.active),
.page-view[hidden] {
  display: none;
}

.page-view.active {
  margin-top: 12px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f1512;
  color: var(--text);
  outline: none;
  padding: 0 12px;
}

input:focus,
select:focus {
  border-color: rgba(70, 211, 125, 0.8);
  box-shadow: 0 0 0 3px rgba(70, 211, 125, 0.13);
}

button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
}

a.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

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

.primary {
  background: var(--accent);
  color: #07100b;
}

.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.danger {
  background: #3a1818;
  border-color: rgba(255, 107, 107, 0.6);
  color: #ffd5d5;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  min-height: 38px;
  padding: 0 14px;
  border-color: rgba(70, 211, 125, 0.48);
  background: rgba(23, 29, 26, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
}

.back-to-top:hover {
  border-color: rgba(70, 211, 125, 0.86);
}

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

.score-panel,
.tail-card,
.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 29, 26, 0.88);
}

.score-panel {
  grid-column: 1 / -1;
  padding: 16px;
}

.teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

.teams > div:last-child {
  text-align: right;
}

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

.teams strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 22px;
}

.scoreline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

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

.pitch {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  margin-top: 16px;
  border: 1px solid rgba(237, 244, 239, 0.25);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 50%, transparent 50%),
    repeating-linear-gradient(90deg, rgba(70, 211, 125, 0.13), rgba(70, 211, 125, 0.13) 64px, rgba(70, 211, 125, 0.07) 64px, rgba(70, 211, 125, 0.07) 128px),
    #163824;
}

.pitch-line.center {
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  background: rgba(237, 244, 239, 0.5);
}

.pitch-box {
  position: absolute;
  top: 28px;
  bottom: 28px;
  width: 84px;
  border: 1px solid rgba(237, 244, 239, 0.48);
}

.pitch-box.left {
  left: -1px;
}

.pitch-box.right {
  right: -1px;
}

.pitch-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78px;
  height: 78px;
  border: 1px solid rgba(237, 244, 239, 0.45);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.match-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(16, 20, 18, 0.82);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.pitch-players {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.pitch-player {
  position: absolute;
  width: 132px;
  min-height: 44px;
  padding: 6px 7px;
  border: 1px solid rgba(237, 244, 239, 0.35);
  border-radius: 6px;
  background: rgba(10, 20, 14, 0.82);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  transform: translate(-50%, -50%);
  overflow: hidden;
}

.pitch-player.away {
  background: rgba(17, 33, 45, 0.84);
}

.pitch-player small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.pitch-player .cards {
  color: var(--warn);
}

.formation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.formation-row span:last-child {
  text-align: right;
}

.match-clock {
  color: var(--text);
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.tail-card,
.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 168px;
  padding: 16px;
}

.tail-card strong,
.metric-card strong {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.05;
}

.tail-card.ready {
  border-color: rgba(87, 224, 138, 0.7);
  background: linear-gradient(180deg, rgba(87, 224, 138, 0.15), rgba(23, 29, 26, 0.88));
}

.tail-card.blocked {
  border-color: rgba(255, 107, 107, 0.55);
  background: linear-gradient(180deg, rgba(255, 107, 107, 0.13), rgba(23, 29, 26, 0.88));
}

.tail-card p,
.metric-card small {
  color: var(--muted);
  line-height: 1.45;
}

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

.panel {
  min-height: 170px;
  padding: 16px;
}

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

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

.panel-head span {
  color: var(--muted);
  font-size: 12px;
}

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

.chip {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.chip.bad {
  border-color: rgba(255, 107, 107, 0.45);
  color: #ffd1d1;
}

.chip.ok {
  border-color: rgba(87, 224, 138, 0.45);
  color: #c9ffd9;
}

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

.event-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.event-list div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.stats-table {
  display: grid;
  gap: 8px;
}

.trend-grid,
.discipline-list {
  display: grid;
  gap: 10px;
}

.trend-row,
.discipline-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  min-height: 34px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.trend-row strong,
.discipline-row strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.trend-row span,
.discipline-row span {
  overflow-wrap: anywhere;
}

.poly-layout {
  margin-top: 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: 24px;
}

.trade-mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.toggle-line {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--text);
}

.toggle-line input {
  width: 16px;
  min-height: 16px;
}

.poly-tools,
.market-panel,
.watch-panel,
.positions-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 29, 26, 0.88);
  padding: 14px;
}

.source-form {
  display: grid;
  grid-template-columns: 140px minmax(360px, 1fr) 140px 190px;
  gap: 10px;
  align-items: end;
}

.source-form button {
  padding: 0 12px;
  white-space: nowrap;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.source-list-label {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.source-list {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.source-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111713;
}

.source-item code {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.source-item button {
  min-height: 30px;
  padding: 0 10px;
}

.market-panel {
  margin-top: 12px;
}

.watch-panel,
.positions-panel,
.basket-panel {
  margin-top: 12px;
}

.positions-panel {
  grid-column: 1 / -1;
}

.positions-list {
  overflow-x: auto;
}

.positions-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101713;
}

.positions-table th,
.positions-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(43, 56, 48, 0.78);
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
}

.positions-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #17211c;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.positions-table tbody tr:nth-child(even) {
  background: rgba(30, 39, 34, 0.38);
}

.positions-table tbody tr:hover {
  background: rgba(90, 167, 255, 0.08);
}

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

.position-market-cell,
.position-price-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.position-market-cell strong {
  max-width: 420px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.position-market-cell code {
  max-width: 420px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.position-outcome {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(90, 167, 255, 0.42);
  border-radius: 999px;
  background: rgba(90, 167, 255, 0.1);
  color: #d7e9ff;
  font-weight: 850;
  white-space: nowrap;
}

.position-pnl {
  font-weight: 900;
  white-space: nowrap;
}

.position-pnl.positive {
  color: var(--ok);
}

.position-pnl.negative {
  color: var(--bad);
}

.position-price-cell strong {
  font-size: 13px;
  color: var(--text);
}

.position-price-cell span {
  color: var(--muted);
  font-size: 11px;
}

.positions-table .table-actions {
  justify-content: flex-start;
}

.positions-table .table-actions button {
  min-height: 32px;
  padding: 0 13px;
}

.order-workspace {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.market-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 240px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.watch-controls {
  display: grid;
  grid-template-columns: 120px repeat(6, minmax(0, auto));
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

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

.watch-list {
  overflow-x: auto;
}

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

.watch-list table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.market-table th,
.market-table td,
.watch-list th,
.watch-list td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  text-align: left;
  vertical-align: top;
}

.market-table th,
.watch-list th {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.market-table td,
.watch-list td {
  color: var(--text);
}

.market-table .market-info-cell {
  width: 42%;
}

.market-table .outcomes-cell {
  width: 58%;
}

.market-info-card {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 360px;
  min-height: 118px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #101713;
}

.market-info-card strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.market-info-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  min-width: 0;
}

.outcome-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #101713;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

.outcome-card:hover,
.outcome-card:focus-visible {
  border-color: rgba(70, 211, 125, 0.65);
  background: #122019;
  outline: none;
}

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

.outcome-card-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
}

.outcome-card-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.outcome-prices {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.outcome-prices span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
}

.outcome-prices strong {
  color: #c9d8cf;
  font-weight: 800;
  justify-self: end;
  white-space: nowrap;
}

.outcome-prices em {
  color: #8fa399;
  font-style: normal;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-actions button {
  min-height: 30px;
  padding: 0 9px;
}

.watch-feedback {
  flex: 1 0 100%;
  min-height: 18px;
  color: #46d37d;
  font-size: 11px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.watch-feedback.visible {
  opacity: 1;
  transform: translateY(0);
}

.ticket-body {
  display: grid;
  gap: 10px;
}

.ticket-target {
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111713;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.result-box {
  overflow: auto;
  max-height: 220px;
  min-height: 76px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b100d;
  color: #bfe8cc;
  font-size: 12px;
  line-height: 1.45;
}

.order-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
}

.order-modal[hidden] {
  display: none;
}

.order-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 6, 0.72);
}

.order-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-market-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.modal-order-list {
  display: grid;
  gap: 8px;
}

.modal-order-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 94px 96px 96px 92px 86px;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111713;
}

.modal-order-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.modal-order-info strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
}

.modal-order-info span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.modal-order-field {
  display: grid;
  gap: 4px;
}

.modal-order-field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-order-field input,
.modal-order-field select {
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.modal-order-notional {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--accent);
  font-size: 13px;
}

.basket-list {
  display: grid;
  gap: 8px;
  min-height: 54px;
}

.trade-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr) minmax(180px, 0.6fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111713;
}

.trade-history-item code {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
}

.trade-history-item span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.basket-toggle {
  margin-top: 10px;
}

.stat-row {
  display: grid;
  grid-template-columns: 70px 1fr 120px 1fr 70px;
  gap: 10px;
  align-items: center;
  min-height: 32px;
}

.stat-row strong {
  text-align: center;
}

.stat-detail-row {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  color: var(--muted);
  font-size: 12px;
}

.stat-detail-row strong {
  color: var(--text);
}

.stat-detail-row span {
  overflow-wrap: anywhere;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #0e1411;
}

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

.bar.away span {
  margin-left: auto;
  background: var(--accent);
}

.stat-name {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .control-band,
  .summary-grid,
  .content-grid,
  .source-form,
  .market-filters,
  .watch-controls,
  .modal-order-row,
  .trade-history-item {
    grid-template-columns: 1fr;
  }

  .compact {
    max-width: none;
  }

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

  .tab-row {
    align-items: stretch;
    flex-direction: column;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  h1 {
    font-size: 36px;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 14px;
  }

  h1 {
    font-size: 30px;
  }

  .page-tabs {
    display: grid;
    width: 100%;
  }

  .teams,
  .stat-row,
  .stat-detail-row,
  .trend-row,
  .discipline-row,
  .source-item {
    grid-template-columns: 1fr;
  }

  .modal-order-notional {
    justify-content: flex-start;
  }

  .pitch-player {
    width: 112px;
    font-size: 10px;
  }

  .teams > div,
  .teams > div:last-child,
  .scoreline {
    justify-content: start;
    text-align: left;
  }

  .stat-name,
  .stat-row strong {
    text-align: left;
  }
}
