/* Base styling for Chess Ladder.
   Deliberately small and system-font based — the board is the interface, and
   the chrome around it should stay out of its way. Board-specific rules live
   in chess.css. */

:root {
  --ink: #22201d;
  --ink-soft: #5f5a53;
  --paper: #f7f5f1;
  --panel: #ffffff;
  --line: #e0dbd2;
  --accent: #6b4f2a;
  --good: #1a7f37;
  --bad: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.25rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

.site-header nav { display: flex; gap: 1rem; }
.site-header nav a { color: var(--ink-soft); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); text-decoration: underline; }

main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }

h1 { font-size: 1.6rem; margin: 0 0 0.5rem; }

a { color: var(--accent); }

button, select, input {
  font: inherit;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}

button { cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

label { display: block; margin: 0.75rem 0 0.25rem; font-weight: 600; font-size: 0.9rem; }

/* Registration and sign-in */
.account-form { max-width: 26rem; margin: 2rem auto; }
.account-form input { width: 100%; }
.account-form button { width: 100%; margin-top: 1rem; }
.field-hint { color: var(--ink-soft); font-size: 0.85rem; margin: 0.25rem 0 0; }
.form-error {
  color: var(--bad);
  font-weight: 600;
  background: #fdf0ef;
  border: 1px solid #f3c9c5;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
}

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
th { font-size: 0.85rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem 1.25rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer .build { margin: 0.35rem 0 0; font-size: 0.78rem; opacity: 0.75; }
