/* 589compstest.com — the page's own look. Nothing here is needed by the
   widgets; they draw themselves, and the template decides their layout. */
:root {
  --bg: #15171e;
  --panel: #1d2029;
  --line: #2c3040;
  --ink: #e8e9ee;
  --muted: #9095a6;
  --accent: #ffb454;
  --danger: #ff7a7a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
code { font-size: 0.9em; }

.top { border-bottom: 1px solid var(--line); background: #11131a; }
.top-row { display: flex; align-items: center; gap: 14px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.brand span { color: var(--accent); }
.badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 999px; background: var(--accent); color: #1a1a1a;
}
nav { margin-left: auto; display: flex; gap: 16px; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
nav a:hover { color: var(--ink); }

.note {
  margin: 18px 0; padding: 10px 14px; border-left: 3px solid var(--accent);
  background: var(--panel); color: var(--muted); font-size: 14px; border-radius: 4px;
}
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin: 0 0 18px;
}
.panel h2 { margin: 0 0 12px; font-size: 16px; }
.muted { color: var(--muted); margin: 0; }
.error { color: var(--danger); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } nav { margin-left: 0; } }

/* THE TEMPLATE'S OWN CLASSES, as the provider generates them. Change
   these freely — they only style this page. comps-layout* since provider
   1.442.0; comps-replay* is what a layout saved before then carries. */
.comps-layout, .comps-replay { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .comps-layout, .comps-replay { grid-template-columns: 1fr; } }
.comps-layout-cards, .comps-replay-cards { display: flex; flex-direction: column; gap: 12px; }
[data-589comps-section] h3 { margin: 0 0 6px; font-size: 14px; color: var(--accent); }
[data-589comps-section] ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
[data-589comps-section] li { padding: 4px 0; border-bottom: 1px solid var(--line); }
[data-589comps-section] li:last-child { border-bottom: 0; }
.comps-layout-cards > [data-589comps-section],
.comps-replay-cards > [data-589comps-section] {
  background: #232735; border: 1px solid var(--line); border-radius: 10px; padding: 12px;
}

.queue-title { font-size: 18px; font-weight: 700; margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }

.replays { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .replays { grid-template-columns: 1fr; } }
.replay-list button {
  display: block; width: 100%; text-align: left; background: transparent; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--line); padding: 10px 6px; cursor: pointer; font: inherit;
}
.replay-list button[aria-current="true"] { box-shadow: inset 3px 0 0 var(--accent); background: #232735; }
.replay-list small { display: block; color: var(--muted); }
.bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
button {
  font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: #1a1a1a;
}
button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
button[disabled] { opacity: 0.45; cursor: default; }
.speeds { display: flex; gap: 4px; }
.speeds button { padding: 3px 9px; font-size: 12px; background: transparent; color: var(--ink); border-color: var(--line); }
.speeds button[aria-pressed="true"] { background: var(--accent); color: #1a1a1a; border-color: var(--accent); }
.counts { margin-left: auto; color: var(--muted); font-size: 13px; }

.foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
        padding-top: 8px; padding-bottom: 40px; color: var(--muted); font-size: 13px; }

/* The widget draws in dark text by default; the cards here sit on a dark
   panel, so they take this page's text colour. */
.comps-layout-cards, .comps-replay-cards,
.comps-layout-cards [data-589comps-section] li,
.comps-replay-cards [data-589comps-section] li { color: var(--ink); }
/* The finished competition's winner line, under the revealed picture —
   the same dark panel. */
#competition .rcw-result-winner { color: var(--ink); }
#competition .rcw-result-detail { color: var(--muted); }
[hidden] { display: none !important; }

.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .auth { grid-template-columns: 1fr; } }
.auth-form { display: flex; flex-direction: column; gap: 10px; background: #232735; border: 1px solid var(--line);
             border-radius: 10px; padding: 14px; }
.auth-form h3 { margin: 0; font-size: 14px; color: var(--accent); }
.auth-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.auth-form input { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line);
                   background: #15171e; color: var(--ink); }
.auth-form button { align-self: flex-start; }
