/* Valor Support's public site (src/support-web.ts): Valor's Fire & Slate colours (Valor Web src/kit/tokens.css), Cinzel titles,
   Source Sans 3 text, the slate ground from Valor Web's art. One dark look on purpose: it's the game's own. */
:root {
  color-scheme: dark;
  --slate: #141414; --panel: rgba(30, 32, 32, .92); --raised: #2a2c2c; --recess: #0b0c0c; --line: #3a3832;
  --gold: #d8bc7a; --metal: #ae843f; --ivory: #f0e6d2; --muted: #b9b1a2; --bad: #e07a6c; --warn: #d9a54e; --ok: #8dbb70;
  --display: "Cinzel", Georgia, serif; --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--slate); }
body { margin: 0; min-height: 100vh; color: var(--ivory); font: 17px/1.55 var(--body);
  background: linear-gradient(rgba(12, 12, 12, .55), rgba(12, 12, 12, .85)), url("slate.webp") center top / 520px repeat, var(--slate); }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #f1d692; }
h1, h2 { font-family: var(--display); color: var(--gold); letter-spacing: .03em; line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.15rem; display: flex; align-items: center; gap: .45em; }
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }
.dim { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ic { width: 1.4em; height: 1.4em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.top { background: rgba(8, 8, 8, .9); border-bottom: 1px solid var(--metal); position: sticky; top: 0; z-index: 2; }
.bar { max-width: 880px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand span { font-family: var(--display); color: var(--gold); font-weight: 700; letter-spacing: .08em; font-size: 1.05rem; }
.bar nav { display: flex; gap: 16px; font-weight: 600; font-size: .95rem; }
.bar nav a { text-decoration: none; color: var(--muted); }
.bar nav a:hover { color: var(--ivory); }

main { max-width: 880px; margin: 0 auto; padding: 28px 16px 40px; display: flex; flex-direction: column; gap: 18px; }
footer { max-width: 880px; margin: 0 auto; padding: 8px 16px 40px; font-size: .9rem; color: var(--muted); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.card.slim { padding: 14px 20px; }
.card.known { border-color: var(--warn); }
.card.known h2 { color: var(--warn); }
.card.done { border-color: var(--ok); }
.card.done h2 { color: var(--ok); }
.crumbs { color: var(--muted); font-size: .9rem; margin: 0; }
.crumbs a { color: var(--muted); }

.hero { text-align: center; padding: 18px 0 6px; }
.hero h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
form.search { display: flex; flex-direction: row; align-items: center; gap: 8px; background: var(--recess); border: 1px solid var(--metal); border-radius: 999px; padding: 6px 6px 6px 16px;
  max-width: 600px; margin: 0 auto; width: 100%; }
.search .ic { color: var(--muted); }
form.search input[type=search] { flex: 1; min-width: 0; width: auto; background: transparent; border: 0; border-radius: 0; color: var(--ivory); font: inherit; padding: 6px 0; }
form.search input[type=search]:focus { outline: none; }
.search:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.search button { border-radius: 999px; }

#topics > h2 { margin-top: 6px; }
.topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.topic { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: start; text-decoration: none; color: var(--ivory);
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; transition: border-color .15s, transform .15s; }
.topic .ic { grid-row: span 2; color: var(--gold); width: 1.8em; height: 1.8em; }
.topic strong { font-family: var(--display); color: var(--gold); letter-spacing: .02em; }
.topic span { color: var(--muted); font-size: .92rem; }
.topic:hover { border-color: var(--metal); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .topic { transition: none; } .topic:hover { transform: none; } }

.lead { display: flex; gap: 14px; align-items: center; }
.lead > .ic { width: 2.6em; height: 2.6em; color: var(--gold); }
.lead h1 { margin: 0; }
.lead p { margin: 0; }

.arts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.arts li + li { border-top: 1px solid var(--line); }
.arts a { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; text-decoration: none; color: var(--ivory); }
.arts a strong { color: var(--gold); }
.arts a > .chip { align-self: flex-start; }
.arts a span:last-child { color: var(--muted); font-size: .93rem; }
.arts a:hover strong { text-decoration: underline; }
.chip { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em; padding: 1px 10px; border-radius: 999px;
  border: 1px solid var(--gold); color: var(--gold); vertical-align: 2px; }
.chip.warn { border-color: var(--warn); color: var(--warn); }
.chip.dim { border-color: var(--line); color: var(--muted); }

form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .95rem; }
label small { font-weight: 400; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; align-items: start; }
input, select, textarea, button { font: inherit; color: var(--ivory); }
input:not([type=file]), select, textarea { background: var(--recess); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; width: 100%; }
input[type=file] { font-size: .9rem; color: var(--muted); }
textarea { min-height: 150px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
button { background: var(--raised); border: 1px solid var(--metal); border-radius: 6px; padding: 9px 20px; font-weight: 700; cursor: pointer; }
button.primary { background: linear-gradient(#c79a4f, var(--metal)); border-color: var(--gold); color: #17130c; }
button:hover { filter: brightness(1.1); }
button:disabled { opacity: .6; cursor: wait; }
.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.err { color: var(--bad); font-weight: 600; margin: 0; }
.ok { color: var(--ok); font-weight: 600; margin: 0; }
.count { color: var(--muted); font-weight: 400; text-align: right; }
.note { color: var(--muted); font-size: .92rem; border-left: 3px solid var(--metal); padding-left: 10px; margin: 0; }

.convo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.convo li { max-width: 88%; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.convo li.them { border-color: var(--metal); }
.convo li.me { align-self: flex-end; background: rgba(42, 44, 44, .92); }
.convo .by { font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
.convo .body { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .bar nav { gap: 12px; font-size: .9rem; }
  .brand img { height: 32px; }
  .card { padding: 16px; }
  .convo li { max-width: 100%; }
  .search button { padding: 8px 14px; }
}

/* Sign in with Valor Tools */
.bar nav form.out { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
button.link:hover { color: var(--ivory); filter: none; }
a.btn { display: inline-block; text-decoration: none; border-radius: 6px; padding: 9px 20px; font-weight: 700; border: 1px solid var(--metal); color: var(--ivory); background: var(--raised); }
a.btn.primary { background: linear-gradient(#c79a4f, var(--metal)); border-color: var(--gold); color: #17130c; }
a.btn:hover { filter: brightness(1.1); }
.who { background: var(--recess); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; font-size: .95rem; }
.chip.ok { border-color: var(--ok); color: var(--ok); }
