* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: linear-gradient(180deg, #f8f3e8 0%, #efe2c6 100%);
  color: #1d2a33;
}

a {
  color: #0f5c4a;
  text-decoration: none;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.flash {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.flash.success {
  background: #ddefe7;
}

.flash.error {
  background: #f7d8d8;
}

.hero,
.card,
table,
form {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(29, 42, 51, 0.1);
  border-radius: 16px;
}

.hero,
.card,
form {
  padding: 20px;
  margin-bottom: 20px;
}

.hero h1,
.card h2 {
  margin-top: 0;
}

.actions,
.grid {
  display: grid;
  gap: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat {
  padding: 16px;
  border-radius: 14px;
  background: rgba(15, 92, 74, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  margin-bottom: 20px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid rgba(29, 42, 51, 0.1);
  vertical-align: top;
  text-align: left;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

input,
select,
button {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(29, 42, 51, 0.2);
  border-radius: 10px;
  font: inherit;
}

input[type="checkbox"] {
  width: auto;
}

button,
.button {
  background: #0f5c4a;
  color: #fff;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  background: #1d2a33;
}

.button.danger,
button.danger {
  background: #a92828;
}

.button {
  display: inline-block;
  width: auto;
}

.inline-form {
  display: inline;
}

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

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

.muted {
  color: #5f6c74;
}

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

.matchup-team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.team-flag {
  width: 22px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(29, 42, 51, 0.14);
  box-shadow: 0 1px 3px rgba(29, 42, 51, 0.12);
  flex: 0 0 auto;
}

.team-flag-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8dcc2;
  color: #5b4b2a;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.team-name {
  font-weight: 600;
}

.matchup-versus {
  color: #7a6950;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 92, 74, 0.14);
  margin-right: 6px;
  margin-bottom: 4px;
}

.pill.warning {
  background: rgba(158, 101, 22, 0.18);
}

.callout {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  background: rgba(15, 92, 74, 0.08);
}

.callout.warning {
  background: rgba(158, 101, 22, 0.14);
}

.callout.error {
  background: rgba(169, 40, 40, 0.14);
}

.stack {
  display: grid;
  gap: 12px;
}

.nowrap {
  white-space: nowrap;
}

pre.payload {
  max-height: 340px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(29, 42, 51, 0.06);
  padding: 12px;
  border-radius: 12px;
}

@media (max-width: 720px) {
  .topbar,
  .row-2,
  .row-3 {
    grid-template-columns: 1fr;
    display: grid;
  }

  .nav {
    flex-direction: column;
  }
}
