/* ---------------------------------------------------------------
   UChicago Chess Club Alumni — Berkshire-style minimal design
   --------------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: "Times New Roman", Times, serif;
  background: #fff;
  color: #000;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* ---- page shell ---- */
.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

/* ---- header ---- */
header h1 {
  font-size: 1.75rem;
  font-weight: normal;
  line-height: 1.3;
  margin: 0 0 10px;
}

nav {
  font-size: 0.92rem;
  margin-bottom: 4px;
}

nav a {
  color: #000;
  text-decoration: none;
}

nav a:hover,
nav a.active {
  text-decoration: underline;
}

header hr {
  border: none;
  border-top: 1px solid #000;
  margin: 12px 0 28px;
}

/* ---- search ---- */
.controls {
  margin-bottom: 24px;
}

.controls input {
  font-family: inherit;
  font-size: 0.92rem;
  border: 1px solid #999;
  padding: 6px 10px;
  width: 100%;
  max-width: 400px;
  outline: none;
}

.controls input:focus {
  border-color: #000;
}

/* ---- main table ---- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

thead th {
  text-align: left;
  font-weight: normal;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #555;
  border-bottom: 1px solid #000;
  padding: 4px 8px 6px;
}

tbody td {
  padding: 5px 8px;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

.year-row td {
  font-weight: bold;
  padding: 18px 8px 4px;
  border-bottom: none;
  color: #000;
  font-size: 1rem;
}

.year-row:first-child td {
  padding-top: 4px;
}

.col-year {
  width: 58px;
  text-align: right;
}

thead .col-year {
  text-align: right;
}

.col-del {
  width: 28px;
}

/* ---- links ---- */
a[href^="mailto"] {
  color: #8b0000;
  text-decoration: none;
}

a[href^="mailto"]:hover {
  text-decoration: underline;
}

/* ---- by-year page ---- */
#yearIndex h2 {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 28px 0 6px;
}

#yearIndex h2:first-child {
  margin-top: 0;
}

#yearIndex ul {
  margin: 0 0 8px;
  padding-left: 20px;
  list-style: disc;
}

#yearIndex li {
  font-size: 0.92rem;
  margin-bottom: 3px;
}

.note {
  color: #555;
  font-style: italic;
}

/* ---- admin: login ---- */
.admin-note {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 16px;
}

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

.login-form input {
  font-family: inherit;
  font-size: 0.92rem;
  border: 1px solid #999;
  padding: 6px 10px;
  width: 260px;
  outline: none;
}

.login-form input:focus {
  border-color: #000;
}

/* ---- admin: buttons ---- */
button {
  font-family: inherit;
  font-size: 0.88rem;
  background: #000;
  color: #fff;
  border: none;
  padding: 6px 16px;
  cursor: pointer;
}

button:hover {
  background: #333;
}

.btn-secondary {
  background: transparent;
  color: #000;
  border: 1px solid #000;
  padding: 4px 12px;
}

.btn-secondary:hover {
  background: #f5f5f5;
}

/* ---- admin: form ---- */
.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  font-size: 0.88rem;
  color: #333;
  gap: 4px;
}

.form-grid label.full {
  grid-column: 1 / -1;
}

.form-grid input {
  font-family: inherit;
  font-size: 0.92rem;
  border: 1px solid #999;
  padding: 5px 8px;
  outline: none;
}

.form-grid input:focus {
  border-color: #000;
}

.req {
  color: #8b0000;
}

/* ---- admin: delete link ---- */
.del-link {
  color: #999;
  text-decoration: none;
  font-size: 0.85rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.del-link:hover {
  color: #8b0000;
}

/* ---- messages ---- */
.error {
  color: #8b0000;
  font-size: 0.88rem;
  margin-top: 10px;
}

.msg {
  font-size: 0.88rem;
  margin-top: 10px;
}

.msg.success { color: #2a7d2a; }
.msg.fail    { color: #8b0000; }

.loading, .empty {
  color: #666;
  font-style: italic;
  font-size: 0.92rem;
}

/* ---- footer ---- */
footer hr {
  border: none;
  border-top: 1px solid #000;
  margin: 40px 0 12px;
}

.footer-note {
  font-size: 0.78rem;
  color: #888;
  margin: 0;
}

/* ---- responsive ---- */
@media (max-width: 600px) {
  .page {
    padding: 32px 16px 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.82rem;
  }

  thead th, tbody td {
    padding-left: 4px;
    padding-right: 4px;
  }
}
