/* Forever Salt: dark charcoal page, gold headings, red-to-green ratings. */
:root {
  --bg: #16161a;
  --panel: #1e1e23;
  --border: #34343c;
  --text: #e8e6e1;
  --muted: #9d9a93;
  --gold: #f0b54a;
  --link: #f0c96a;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: var(--link); }
h1, h2, h3 { color: var(--gold); margin: 0 0 12px; }
h3 { color: var(--text); font-size: 1.6em; }
p { margin: 0 0 8px; }
code { background: #26262c; padding: 4px 8px; border-radius: 4px; word-break: break-all; }
button { background: transparent; color: var(--text); border: 1px solid #77757c; padding: 6px 14px; border-radius: 6px; cursor: pointer; font: inherit; }
button:hover { border-color: var(--gold); }
input[type="search"], input[type="text"] { background: #222228; color: var(--text); border: 1px solid #4a4a52; border-radius: 6px; padding: 8px 12px; font: inherit; }
.muted { color: var(--muted); }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 32px; padding: 10px 24px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { border-radius: 6px; }
.brand-name { display: block; color: var(--gold); font-size: 1.6em; font-weight: 700; line-height: 1.1; }
.tagline { display: block; color: var(--muted); font-size: 0.85em; }
.topbar nav a { color: var(--text); text-decoration: none; margin-right: 24px; font-size: 1.1em; }
.topbar nav a:hover { color: var(--gold); }
.topsearch { margin-left: auto; }
.topsearch input { width: 280px; max-width: 100%; }

main { max-width: 1100px; margin: 0 auto; padding: 24px; }
footer { max-width: 1100px; margin: 32px auto 0; padding: 16px 24px; border-top: 1px solid var(--border); color: var(--muted); text-align: center; font-size: 0.9em; }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin-bottom: 16px; }

/* Home and search */
.bigsearch { display: flex; gap: 8px; }
.bigsearch input { flex: 1; font-size: 1.1em; }
.results { list-style: none; padding: 0; margin: 0 0 24px; }
.results li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.results .muted { margin-left: 8px; }

/* Player page */
.player { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
@media (max-width: 760px) { .player { grid-template-columns: 1fr; } }
.avatar { width: 100%; border-radius: 6px; margin-bottom: 12px; }
.armory-link { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }

.summary { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.badge { min-width: 180px; padding: 12px 20px; border-radius: 10px; text-align: center; border: 2px solid; }
.badge-number { display: block; font-size: 3.2em; font-weight: 800; line-height: 1.1; }
.badge-count { color: var(--text); }
.facts { flex: 1; }
.label { color: var(--muted); font-weight: 600; margin-right: 12px; }

.tags { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 4px 12px; border-radius: 6px; border: 1px solid; }
.tag-bad { background: #3a1c1e; border-color: #7a3236; }
.tag-bad b { color: #ff6a5e; }
.tag-good { background: #1d3322; border-color: #3c6b45; }
.tag-good b { color: #7fd36a; }

.note { display: flex; gap: 16px; align-items: center; }
.note-body { flex: 1; min-width: 0; }
.note-head { color: var(--muted); }
.note-head .sep { margin: 0 6px; }
.note-text { font-size: 1.1em; white-space: pre-line; overflow-wrap: anywhere; }
.report { display: flex; flex-direction: column; gap: 6px; width: 200px; }
.reply { margin: 10px 0 0 16px; padding-left: 12px; border-left: 2px solid var(--muted); }
.reply-form { display: flex; gap: 6px; margin-top: 10px; }
.reply-form textarea { flex: 1; min-width: 0; }
.notice { font-weight: bold; }
.claim { margin-top: 12px; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mod-actions form { display: flex; gap: 6px; }

/* Ratings: -5..-1 red shades, 0 grey, 1..5 green shades (text for notes, fill for the badge). */
.r-n5 { color: #ff3b30; }
.r-n4 { color: #ff5246; }
.r-n3 { color: #ff6a5e; }
.r-n2 { color: #ff8478; }
.r-n1 { color: #ff9e94; }
.r-0 { color: #a8a6a0; }
.r-p1 { color: #a6dc96; }
.r-p2 { color: #8fd47c; }
.r-p3 { color: #7fd36a; }
.r-p4 { color: #63c94c; }
.r-p5 { color: #48c030; }
.badge.r-n5 { background: #5a1414; border-color: #c0392b; }
.badge.r-n4 { background: #4e1818; border-color: #b0443a; }
.badge.r-n3 { background: #431c1c; border-color: #a04e46; }
.badge.r-n2 { background: #382020; border-color: #8e5852; }
.badge.r-n1 { background: #2f2424; border-color: #7c625e; }
.badge.r-0 { background: #2a2a2e; border-color: #5c5c64; }
.badge.r-p1 { background: #232d24; border-color: #5f7a5c; }
.badge.r-p2 { background: #20331f; border-color: #57864f; }
.badge.r-p3 { background: #1d3a1b; border-color: #4f9443; }
.badge.r-p4 { background: #1a4217; border-color: #46a237; }
.badge.r-p5 { background: #164a12; border-color: #3cb02b; }

/* About */
.prose h2 { margin-top: 20px; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin-bottom: 4px; }
