body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: #f5f6f8;
  text-align: center;
  line-height: 1.5;
}

.page {
  width: min(100%, 960px);
  max-width: 960px;
  margin: 40px auto;
  padding: 24px;
  background: transparent;
}

/* Card container */
.board-card {
  display: inline-block;
  background: #fcfcfd;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

/* Wrapper */
.board-wrapper {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 0;
  max-width: 100%;
}

/* Corner diagonal */
.corner-diagonal {
  grid-column: 1;
  grid-row: 1;
  background: linear-gradient(
    to bottom left,
    #002244 0%,
    #002244 50%,
    #002A5C 50%,
    #002A5C 100%
  );
  width: 70px;
  align-self: stretch;
}

/* Team labels */
.top-team {
  background: #002244; /* Patriots navy */
  color: #FFFFFF;
  font-weight: 600;
  font-size: 2.9rem;
  padding: 8px 12px;
  margin-bottom: 0;
  grid-column: 2;
  grid-row: 1;
  justify-self: stretch;
  border-radius: 0;
  letter-spacing: 0.4px;
  text-transform: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
}


.left-team {
  background: #002A5C; /* Seahawks navy */
  color: #FFFFFF;
  font-weight: 600;
  font-size: 2.9rem;
  padding: 12px 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  grid-column: 1;
  grid-row: 2;
  border-radius: 0;
  letter-spacing: 0.4px;
  text-transform: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  gap: 12px;
  width: 70px;
  box-sizing: border-box;
  overflow: visible;
}

.team-logo {
  width: clamp(24px, 3.6vw, 34px);
  height: clamp(24px, 3.6vw, 34px);
  object-fit: contain;
}

.seahawks-logo {
  transform: rotate(270deg);
}

.top-team .team-logo {
  height: 1em;
  width: auto;
}

.left-team .team-logo {
  width: 75px;
  height: 75px;
  flex-shrink: 0;
}

.team-name {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.vertical-name {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  line-height: 1;
}

/* Layout row */
.board-row {
  display: contents;
}

table {
  grid-column: 2;
  grid-row: 2;
}

.search-panel {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.search-box {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: #6b7280;
  pointer-events: none;
}

.search-box input {
  padding: 10px 12px 10px 40px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  min-width: min(280px, 80vw);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box input:focus {
  outline: none;
  border-color: #002244;
  box-shadow: 0 0 0 3px rgba(0, 34, 68, 0.1);
}

.search-box input::placeholder {
  color: #9ca3af;
}

/* Board */
table {
  border-collapse: collapse;
  max-width: 90vw;
  border: none;
}

td, th {
  border: 1px solid #e5e7eb;
  width: clamp(40px, 8vw, 70px);
  height: clamp(40px, 8vw, 70px);
  text-align: center;
  vertical-align: middle;
  background: #fcfcfd;
  font-size: clamp(11px, 2.1vw, 15px);
}

tr:nth-child(even) td {
  background: #f9fafb;
}

td.highlight,
tr:nth-child(even) td.highlight {
  background: #374151;
  color: #ffffff;
  box-shadow: inset 0 0 0 2px #111827;
}

.highlight-header,
tr:first-child th.highlight-header,
tr:not(:first-child) th.highlight-header:first-child {
  background: #374151;
  color: #ffffff;
  box-shadow: inset 0 0 0 2px #111827;
}

.name-first,
.name-last {
  display: block;
}

th {
  background: #B0B7BC; /* silver */
  color: #002244;
  font-weight: bold;
}

/* Top row numbers only */
tr:first-child th {
  background: #C60C30; /* Patriots red */
  color: #FFFFFF;
  font-size: clamp(16px, 3.2vw, 22px);
  border-bottom: 3px solid #002244;
}

tr:first-child th:first-child {
  background: linear-gradient(
    to bottom left,
    #C60C30 0%,
    #C60C30 50%,
    #7AC142 50%,
    #7AC142 100%
  );
  border: none;
}

/* Remove outer borders from the table edges */
tr:first-child th {
  border-top: none;
}

tr th:first-child {
  border-left: none;
}

/* Remove border between diagonal and first number cells */
tr:first-child th:nth-child(2) {
  border-left: none;
}

tr:nth-child(2) th:first-child {
  border-top: none;
}

/* Left column numbers */
tr:not(:first-child) th:first-child {
  background: #7AC142; /* Seahawks green */
  color: #FFFFFF;
  font-size: clamp(16px, 3.2vw, 22px);
  border-right: 3px solid #002A5C;
}

/* Remove outer borders on right and bottom edges */
tr:first-child th:last-child {
  border-right: none;
}

tr td:last-child {
  border-right: none;
}

tr:last-child td,
tr:last-child th {
  border-bottom: none;
}
