/* Horizons Unbound site styles for the suggestion and admin pages.
   Layout: dusk-sky header, then one centered 860px column. Tokens match the wiki. */
:root {
  --night: #0b0f2a; --dusk: #171b4a; --ink: #ece6ff; --muted: #a9a3cc; --line: #2c2a5c; --panel: #13173d;
  --panel-2: #191e4b; --sun: #ffb35c; --sun-soft: #ffd27a; --lilac: #b9a6ff; --ok: #7ed6a5; --bad: #ff8a7a;
  --link: #ffc477; --kbd-bg: #221f55; --on-sun: #1b1236; --hero-fade: rgba(11, 15, 42, 0.72);
  --display: "League Spartan", "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --night: #f6f3ff; --dusk: #ebe6ff; --ink: #1c1840; --muted: #5b557f; --line: #d9d2f5; --panel: #ffffff;
    --panel-2: #f3efff; --sun: #c96a12; --sun-soft: #a8550a; --lilac: #5a43c9; --ok: #1f8a54; --bad: #c0392b;
    --link: #a8550a; --kbd-bg: #ece7ff; --on-sun: #ffffff; --hero-fade: rgba(11, 15, 42, 0.55); color-scheme: light;
  }
}
:root[data-theme="light"] {
  --night: #f6f3ff; --dusk: #ebe6ff; --ink: #1c1840; --muted: #5b557f; --line: #d9d2f5; --panel: #ffffff;
  --panel-2: #f3efff; --sun: #c96a12; --sun-soft: #a8550a; --lilac: #5a43c9; --ok: #1f8a54; --bad: #c0392b;
  --link: #a8550a; --kbd-bg: #ece7ff; --on-sun: #ffffff; --hero-fade: rgba(11, 15, 42, 0.55); color-scheme: light;
}
:root[data-lang="de"] [data-l="en"], :root:not([data-lang="de"]) [data-l="de"] { display: none !important; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--night); color: var(--ink); font: 16px/1.6 var(--body); }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.hero { position: relative; color: #f3eeff; padding-block: 34px 28px; padding-inline: 16px;
  background: linear-gradient(180deg, rgba(11,15,42,0.2) 0%, var(--hero-fade) 75%, var(--night) 100%), url("background.png") center 62% / cover no-repeat, #171b4a; }
.hero-inner { max-width: 860px; margin: 0 auto; display: grid; gap: 10px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar a { color: #f3eeff; font-weight: 600; text-decoration: none; font-size: 0.92rem; text-shadow: 0 1px 6px rgba(10, 6, 30, 0.8); }
.topbar a:hover { text-decoration: underline; }
.hero img.logo { width: min(340px, 80%); height: auto; filter: drop-shadow(0 6px 18px rgba(10, 6, 30, 0.7)); margin-top: 8px; }
.hero h1 { font: 800 clamp(1.8rem, 4.5vw, 2.6rem)/1.1 var(--display); margin: 0; text-wrap: balance; text-shadow: 0 2px 12px rgba(10, 6, 30, 0.8); }
.hero p { margin: 0; max-width: 60ch; text-shadow: 0 1px 8px rgba(10, 6, 30, 0.9); }

.lang { display: inline-flex; border: 1px solid rgba(185, 166, 255, 0.4); border-radius: 999px; padding: 3px; background: rgba(14, 12, 44, 0.75); gap: 2px; }
.lang button { font: 600 0.8rem/1 var(--body); letter-spacing: 0.04em; color: #cfc8f2; background: transparent; border: 0; border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: #ffb35c; color: #1b1236; }

main { max-width: 860px; margin: 0 auto; padding-inline: 16px; padding-block: 24px 56px; }
h2 { font: 800 clamp(1.35rem, 3vw, 1.7rem)/1.2 var(--display); margin: 34px 0 10px; text-wrap: balance; }
h2:first-child { margin-top: 6px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }

.steps3 { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; counter-reset: s; }
.steps3 li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 12px 50px; position: relative; font-size: 0.94rem; }
.steps3 li::before { content: counter(s); position: absolute; left: 14px; top: 11px; width: 26px; height: 26px; border-radius: 50%; background: var(--sun); color: var(--on-sun); display: grid; place-items: center; font: 800 0.9rem/1 var(--display); }

.field { display: grid; gap: 6px; margin: 0 0 12px; }
.field label { font-weight: 600; font-size: 0.92rem; }
input[type="search"], input[type="text"], input[type="password"], textarea, select {
  font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0; }
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--sun); outline: none; }
.btn { font: 700 0.92rem/1 var(--body); border: 0; border-radius: 8px; padding: 11px 16px; cursor: pointer; background: var(--sun); color: var(--on-sun); white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.btn.ghost:hover { border-color: var(--muted); }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid var(--bad); font-weight: 600; }

.searchbar { display: flex; gap: 8px; margin: 6px 0 6px; }
.searchbar input { flex: 1 1 auto; }

.status-line { min-height: 1.5em; margin: 6px 0 10px; color: var(--muted); font-size: 0.92rem; }
.status-line.error { color: var(--bad); }

.mods { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mod { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; }
.mod .logo { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--panel-2); grid-row: span 2; }
.mod h3 { margin: 0; font: 700 1.05rem/1.3 var(--display); }
.mod h3 a { color: var(--ink); text-decoration: none; }
.mod h3 a:hover { text-decoration: underline; color: var(--link); }
.mod .meta { font-size: 0.82rem; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.mod .sum { grid-column: 2 / -1; margin: 4px 0 0; font-size: 0.93rem; }
.mod .act { display: grid; justify-items: end; gap: 6px; }
.chip { display: inline-block; font: 700 0.72rem/1 var(--body); letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.inpack { color: var(--ok); border-color: var(--ok); }
.chip.new { color: var(--lilac); border-color: var(--lilac); }
.chip.planned { color: var(--sun); border-color: var(--sun); }
.chip.accepted { color: var(--ok); border-color: var(--ok); }
.chip.rejected { color: var(--bad); border-color: var(--bad); }
.form { grid-column: 1 / -1; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.form .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.done { color: var(--ok); font-weight: 600; }
.more { margin: 12px 0 0; }

.top { counter-reset: t; }
.top .mod { grid-template-columns: 34px 48px minmax(0, 1fr) auto; }
.top .rank { font: 800 1.3rem/48px var(--display); color: var(--sun); text-align: center; font-variant-numeric: tabular-nums; }
.top .logo { width: 48px; height: 48px; grid-row: auto; }
.votes { font: 800 1.2rem/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.votes small { display: block; font: 600 0.72rem/1.3 var(--body); color: var(--muted); }

footer { max-width: 860px; margin: 0 auto; padding-inline: 16px; padding-block: 0 40px; color: var(--muted); font-size: 0.84rem; }

@media (max-width: 560px) {
  .mod { grid-template-columns: 48px minmax(0, 1fr); }
  .mod .logo { width: 48px; height: 48px; }
  .mod .act { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; }
  .top .mod { grid-template-columns: 28px 40px minmax(0, 1fr) auto; }
  .top .logo { width: 40px; height: 40px; }
  .searchbar { flex-wrap: wrap; }
  .searchbar .btn { flex: 1 1 auto; }
}

/* ---------- Community board and voting ---------- */
.cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.cta a { text-decoration: none; }
.cta .btn.ghost { color: #f3eeff; border-color: rgba(243, 238, 255, 0.45); background: rgba(14, 12, 44, 0.55); }
section { scroll-margin-top: 16px; }
.boardbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 4px 0 12px; }
.boardbar .spacer { flex: 1 1 auto; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg button { font: 600 0.84rem/1 var(--body); color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { color: var(--on-sun); background: var(--sun); border-color: var(--sun); }
.count { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }

.board .mod { grid-template-columns: 30px 56px minmax(0, 1fr) auto; }
.board .rank { font: 800 1.15rem/56px var(--display); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.board li:nth-child(-n+3) .rank { color: var(--sun); }
.board .logo { grid-row: auto; }
.board .sum { grid-column: 3 / -1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.board .tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }

.vote { display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 64px; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font: 800 1.15rem/1 var(--display); font-variant-numeric: tabular-nums; }
.vote::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 0 8px 10px 8px; border-color: transparent transparent var(--muted) transparent; margin-bottom: 3px; }
.vote small { font: 600 0.68rem/1.2 var(--body); color: var(--muted); letter-spacing: 0.03em; }
.vote:hover { border-color: var(--sun); }
.vote[aria-pressed="true"] { background: var(--sun); border-color: var(--sun); color: var(--on-sun); }
.vote[aria-pressed="true"]::before { border-bottom-color: var(--on-sun); }
.vote[aria-pressed="true"] small { color: var(--on-sun); }
.vote:disabled { opacity: 0.6; cursor: default; }
@media (prefers-reduced-motion: no-preference) { .vote.bump { animation: bump 0.35s ease; } @keyframes bump { 40% { transform: scale(1.12); } } }
.empty-box { background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 22px; text-align: center; color: var(--muted); }

@media (max-width: 560px) {
  .board .mod { grid-template-columns: 22px 44px minmax(0, 1fr) auto; gap: 4px 10px; }
  .board .logo { width: 44px; height: 44px; }
  .board .rank { line-height: 44px; font-size: 1rem; }
  .board .sum { grid-column: 1 / -1; }
  .vote { min-width: 54px; padding: 6px 8px; }
}
