/* Shadowdark West Marches — Rumor Board
   Dark fantasy, sober. Brass on near-black. */

:root {
  --bg: #14110f;
  --bg-soft: #1b1714;
  --panel: #201b16;
  --panel-2: #292219;
  --border: #3b3025;
  --border-soft: #2e261d;
  --text: #e9dfce;
  --text-dim: #b7a488;
  --muted: #8b7a63;
  --accent: #c9a24b;
  --accent-bright: #e3bd63;
  --accent-dim: #7a6231;

  --st-open: #c9a24b;
  --st-progress: #6f97b5;
  --st-confirmed: #7fa65b;
  --st-debunked: #a86a52;
  --st-resolved: #8a8378;

  --radius: 6px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --serif-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --serif-body: "EB Garamond", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif-body);
  font-size: 18px;
  line-height: 1.55;
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 600px at 50% -200px, rgba(201, 162, 75, 0.06), transparent 70%);
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
}

.brand h1 {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
  color: var(--text);
}

.tagline {
  margin: 2px 0 0;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ---------- buttons / controls ---------- */

.btn {
  font-family: var(--serif-body);
  font-size: 15px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  letter-spacing: 0.03em;
}

.btn:hover {
  border-color: var(--accent-dim);
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  border-color: var(--accent-dim);
  color: #1a1409;
  font-weight: 600;
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
}

.btn-ghost {
  background: transparent;
}

.btn-small {
  font-size: 13px;
  padding: 4px 10px;
}

.btn-danger:hover {
  border-color: var(--st-debunked);
  color: #e7b6a3;
}

input,
select,
textarea {
  font-family: var(--serif-body);
  font-size: 16px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(201, 162, 75, 0.18);
}

textarea {
  resize: vertical;
  width: 100%;
  line-height: 1.5;
}

/* ---------- toolbar ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 22px 0 10px;
}

.toolbar #search {
  flex: 1 1 220px;
  min-width: 160px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-dim);
  font-size: 15px;
  cursor: pointer;
  user-select: none;
}

.check input {
  accent-color: var(--accent);
}

.status-line {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
  margin: 6px 2px 14px;
  min-height: 1em;
}

/* ---------- board ---------- */

.board {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.empty {
  color: var(--muted);
  text-align: center;
  font-style: italic;
  padding: 40px 0;
}

.rumor {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 40%),
    var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.rumor.archived {
  opacity: 0.62;
}

.rumor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 10px;
}

.rumor-title {
  font-family: var(--serif-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
  letter-spacing: 0.02em;
}

.badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge[data-status="open"] { color: var(--st-open); }
.badge[data-status="in progress"] { color: var(--st-progress); }
.badge[data-status="confirmed"] { color: var(--st-confirmed); }
.badge[data-status="debunked"] { color: var(--st-debunked); }
.badge[data-status="resolved"] { color: var(--st-resolved); }

.rumor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 0 18px 12px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.rumor-meta .k {
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
  margin-right: 4px;
}

.rumor-body {
  padding: 4px 18px 16px;
  border-top: 1px solid var(--border-soft);
  color: var(--text);
}

.rumor-body p:first-child { margin-top: 10px; }
.rumor-body p { margin: 10px 0; }
.rumor-body h3, .rumor-body h4, .rumor-body h5 {
  font-family: var(--serif-display);
  font-weight: 600;
  margin: 14px 0 6px;
}
.rumor-body ul, .rumor-body ol { margin: 10px 0; padding-left: 22px; }
.rumor-body blockquote {
  margin: 10px 0;
  padding: 4px 14px;
  border-left: 3px solid var(--accent-dim);
  color: var(--text-dim);
  font-style: italic;
}
.rumor-body code {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.9em;
}
.rumor-body a { color: var(--accent-bright); }

/* updates thread */

.updates {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-soft);
  padding: 8px 18px 14px;
}

.updates h4 {
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 8px 0;
}

.update {
  padding: 8px 0;
  border-top: 1px dashed var(--border-soft);
  font-size: 15.5px;
}

.update:first-of-type { border-top: none; }

.update-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.update-del {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
}

.update-del:hover { color: var(--st-debunked); }

.rumor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--border-soft);
}

.rumor-actions .spacer { flex: 1; }

.rumor-actions select {
  font-size: 13px;
  padding: 4px 8px;
}

.inline-update {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

.inline-update input { flex: 1; }

/* ---------- dialogs ---------- */

dialog {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0;
  max-width: 620px;
  width: calc(100vw - 32px);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(8, 6, 4, 0.66);
  backdrop-filter: blur(2px);
}

dialog form {
  padding: 22px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

dialog h2 {
  font-family: var(--serif-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0 0 4px;
  font-size: 20px;
}

dialog label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

dialog label input,
dialog label select,
dialog label textarea {
  text-transform: none;
  letter-spacing: normal;
  font-size: 16px;
  color: var(--text);
}

dialog .row {
  display: flex;
  gap: 12px;
}

dialog .row label {
  flex: 1;
}

.hint {
  text-transform: none;
  letter-spacing: normal;
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
}

.form-error {
  color: #e7a690;
  font-size: 14px;
  margin: 0;
}

.form-ok {
  color: var(--st-confirmed);
  font-size: 14px;
  margin: 0;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  padding: 18px 0 28px;
}

.site-footer .wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dot { color: var(--accent-dim); }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--accent-dim);
  color: var(--text);
  padding: 10px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 15px;
  z-index: 50;
  max-width: calc(100vw - 32px);
}

.toast.error {
  border-color: var(--st-debunked);
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  dialog .row { flex-direction: column; gap: 12px; }
  .header-inner { flex-wrap: wrap; }
  .rumor-head { flex-direction: column; gap: 8px; }
}
