/* Shared, minimal styling for every RosterBook page. No framework — see
   CLOUDFLARE_PORT.md §5. */

:root {
  color-scheme: light dark;
  --border: #ccc;
  --hint: #555;
  --confirm: #1a7f37;
  --match: #ffe9a8;
  --coach-bg: #e8eefb;
  --coach-fg: #1a3a6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  background: Canvas;
  color: CanvasText;
}

header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

header h1 { font-size: 1.1rem; margin: 0; }
header nav a { margin-right: 0.75rem; }
header nav a[aria-current="page"] { font-weight: bold; text-decoration: none; }

main { padding: 1rem; max-width: 1100px; margin: 0 auto; }

.controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.controls label { display: flex; flex-direction: column; font-size: 0.8rem; gap: 0.2rem; }
.controls select, .controls input[type="text"] {
  font-size: 1rem;
  padding: 0.3rem 0.4rem;
}

#find { min-width: 10rem; }

.tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 700px) {
  .tables { grid-template-columns: 1fr; }
}

.team h2 {
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.team h2 button { font-size: 0.75rem; }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.25rem 0.4rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
th:first-child, td:first-child { width: 3.5rem; }

tr.match td { background: var(--match); color: #1a1a1a; }
tr.coach td { background: var(--coach-bg); color: var(--coach-fg); font-weight: 600; }
tr.coach.match td { background: var(--match); color: #1a1a1a; }

#hint {
  margin-top: 1rem;
  color: var(--hint);
  min-height: 1.4em;
}
#hint.confirmed { color: var(--confirm); font-weight: 600; }
