/* The dashboard's look: system font and the app's muted palette (docs/DESIGN.md). */
:root {
  --page: #f4f4f1;
  --card: #ffffff;
  --text: #1f2326;
  --muted: #6a7178;
  --line: #dcdcd6;
  --accent: #3f6587;      /* tileSlate */
  --good: #5e8466;        /* tileSage */
  --bad: #b5654a;         /* tileTerracotta */
  --warn: #c08a3e;        /* tileOchre */
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #151719;
    --card: #1f2326;
    --text: #ececea;
    --muted: #9aa1a8;
    --line: #353b40;
    --accent: #7fa3c4;
    --good: #86ab8e;
    --bad: #d98f75;
    --warn: #d9ae6a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

nav form { margin: 0; }
nav .who { margin-left: auto; color: var(--muted); font-size: 14px; }

a, button.link { color: var(--accent); text-decoration: none; }
a:hover, button.link:hover { text-decoration: underline; }
button.link { background: none; border: 0; padding: 0; font: inherit; width: auto; cursor: pointer; }

main { max-width: 760px; margin: 0 auto; padding: 24px 20px 48px; }
h1 { font-size: 24px; margin: 8px 0 16px; }
h2 { font-size: 18px; margin: 32px 0 8px; }

form { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }

input, select {
  font: inherit;
  padding: 10px 12px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

button {
  font: inherit;
  padding: 10px 16px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 10px; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.actions form { flex-direction: row; flex-wrap: wrap; max-width: none; margin-bottom: 6px; }
td.actions input { width: 140px; padding: 6px 8px; }
td.actions button { padding: 6px 10px; }

.error, .bad { color: var(--bad); }
.note, .good { color: var(--good); }
.warn { color: var(--warn); }
.bad, .good, .warn { font-weight: 600; }
.small { color: var(--muted); font-size: 14px; }

.key, .codes {
  font: 15px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

.link-box {
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--card);
  border-left: 4px solid var(--warn);
  border-radius: 10px;
}

table.facts th { width: 45%; }
.moves { padding-left: 20px; color: var(--muted); font-size: 14px; }
