/*
 * Synth Riders Map Testing — (c) 2026 SynthWriters.com
 * Changelog: 2026-11-08 v1.0 — initial self-hosted release.
 *            2026-11-09 v1.1 — transposed coverage chart + style selector.
 *            2026-11-14 v1.4 — .secret / .codes / input.totp for TOTP setup.
 * style.css — one dark, simple stylesheet for the whole app.
 */

:root {
    --bg: #14161c; --panel: #1e222c; --panel2: #262b38; --line: #3a4152;
    --text: #e8eaf0; --muted: #9aa3b5; --accent: #5aa2ff;
    --pass: #2e7d46; --needswork: #9c7414; --blocker: #a93232; --untested: #2b303d;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 15px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--accent); }
main { max-width: 1180px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; } h2 { font-size: 17px; margin-top: 26px; }

.topbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
          background: var(--panel); padding: 10px 16px; border-bottom: 1px solid var(--line); }
.topbar .brand { font-weight: 700; margin-right: 12px; }
.topbar nav a { color: var(--muted); text-decoration: none; margin-right: 12px; }
.topbar nav a.active { color: var(--text); border-bottom: 2px solid var(--accent); }
.topbar .who { margin-left: auto; color: var(--muted); font-size: 13px; }
.devbanner { background: #5a1f1f; color: #ffd7d7; padding: 8px 16px; font-size: 13px; text-align: center; }
.foot { color: var(--muted); font-size: 12px; text-align: center; padding: 20px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
        padding: 14px 16px; margin: 14px 0; }
.devcard { border-color: #a93232; }
.badge { background: #a93232; color: #fff; border-radius: 4px; padding: 1px 6px; font-size: 11px; }
.error { background: #5a1f1f; color: #ffd7d7; border-radius: 6px; padding: 8px 12px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

label { display: inline-block; margin: 4px 8px 4px 0; }
label.check { display: block; }
input, select, textarea { background: var(--panel2); color: var(--text);
    border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px; font: inherit; }
textarea, input.wide { width: 100%; }
button { background: var(--accent); color: #fff; border: 0; border-radius: 5px;
         padding: 7px 14px; font: inherit; cursor: pointer; }
button.smallbtn { background: var(--panel2); border: 1px solid var(--line); padding: 4px 10px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 14px 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px 14px; }
.inlineform { display: inline; }

table.list { width: 100%; border-collapse: collapse; margin: 10px 0; }
table.list th, table.list td { border-bottom: 1px solid var(--line); padding: 6px 8px;
                               text-align: left; vertical-align: top; }
table.list th { color: var(--muted); font-weight: 600; }
td.details { font-size: 13px; color: var(--muted); max-width: 420px; }

.oauthbtn { display: inline-block; color: #fff; text-decoration: none; font-weight: 600;
            padding: 10px 18px; border-radius: 6px; min-width: 260px; text-align: center; }
.oauthbtn.discord { background: #5865f2; }
.oauthbtn.twitch { background: #9146ff; }

/* TOTP setup / backup codes */
.secret { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
          word-break: break-all; background: var(--panel2); border: 1px solid var(--line);
          border-radius: 6px; padding: 10px 12px; margin: 8px 0; }
.codes { columns: 2; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
         font-size: 16px; }
.codes li { margin: 2px 0; }
input.totp { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
             font-size: 20px; letter-spacing: 4px; width: 170px; text-align: center; }

/* Coverage matrix — transposed: levels across the top, variants as rows */
.stylesel { display: flex; gap: 8px; margin: 14px 0 4px; }
.stylesel a { flex: 1; text-align: center; padding: 9px 10px; border-radius: 6px;
              background: var(--panel2); border: 1px solid var(--line);
              color: var(--muted); text-decoration: none; font-weight: 600; }
.stylesel a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.matrixwrap { overflow-x: auto; }
table.matrix { border-collapse: collapse; width: 100%; table-layout: fixed; }
table.matrix th, table.matrix td { border: 1px solid var(--line); padding: 0; text-align: center; }
table.matrix th { padding: 4px 2px; font-size: 11px; color: var(--muted);
                  white-space: normal; overflow-wrap: break-word; }
table.matrix th:first-child { width: 28%; }
table.matrix th.rowhead { text-align: left; padding: 4px 6px; }
table.matrix td a { display: block; width: 100%; height: 26px; line-height: 26px;
                    color: #fff; text-decoration: none; font-size: 12px; }
.cell.pass { background: var(--pass); } .cell.needswork { background: var(--needswork); }
.cell.blocker { background: var(--blocker); } .cell.untested { background: var(--untested); }
td.cell.hasassign { outline: 2px solid var(--accent); outline-offset: -2px; }
.legend .cell { display: inline-block; padding: 2px 10px; border-radius: 4px; color: #fff; font-size: 13px; }
.legend .cell.untested { color: var(--muted); }

.verdict { font-weight: 700; }
.verdict.pass { color: #6fce8b; } .verdict.needswork { color: #e8c35a; } .verdict.blocker { color: #ff7a7a; }
.practice { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.practice input[type="range"] { flex: 1; min-width: 200px; }
.practice input[type="number"] { width: 80px; }
