/* Plain CSS, no build step. The palette follows the launcher's own: warm
   amber on near-black, the colours of a lit cabinet in a dark room. */
:root {
  --ink: #f3ede4;
  --dim: #9c948a;
  --back: #14110f;
  --panel: #1e1a17;
  --edge: #302a25;
  --hot: #d8622c;
  --good: #6fae5a;
  --bad: #c8453c;
  --warn: #d8a72c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--back);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

header {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--edge);
  background: var(--panel);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hot);
  text-decoration: none;
}
.brand span { color: var(--dim); margin-left: 6px; font-weight: 400; }

nav { display: flex; gap: 18px; flex: 1; }
nav a { color: var(--dim); text-decoration: none; padding: 4px 0; }
nav a:hover { color: var(--ink); }
nav a.current { color: var(--ink); border-bottom: 2px solid var(--hot); }

.account { display: flex; align-items: center; gap: 12px; color: var(--dim);
           font-size: 14px; }
body:not(.signed-in) nav, body:not(.signed-in) .account { display: none; }

main { max-width: 860px; margin: 0 auto; padding: 28px 20px 60px; }

h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 19px; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 0; }

.lead { color: var(--dim); margin: 0 0 22px; }
.hint { color: var(--dim); font-size: 14px; margin: 6px 0; }
.empty { color: var(--dim); font-style: italic; padding: 8px 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 18px;
}

.list > * { padding: 10px 0; border-bottom: 1px solid var(--edge); }
.list > *:last-child { border-bottom: none; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }

.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; color: var(--dim);
              margin-bottom: 4px; }
input, select {
  width: 100%;
  padding: 9px 11px;
  background: #100e0c;
  color: var(--ink);
  border: 1px solid var(--edge);
  border-radius: 6px;
  font: inherit;
}
input:focus, select:focus { outline: 2px solid var(--hot); }

button {
  padding: 9px 15px;
  border-radius: 6px;
  border: 1px solid var(--edge);
  background: #262019;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
button:hover { border-color: var(--hot); }
button.primary { background: var(--hot); border-color: var(--hot);
                 color: #14110f; font-weight: 600; }
button.danger:hover { border-color: var(--bad); color: var(--bad); }
button.quiet { background: none; color: var(--dim); }

.badge { font-size: 12px; padding: 3px 9px; border-radius: 20px;
         border: 1px solid var(--edge); color: var(--dim); white-space: nowrap; }
.badge.on { color: var(--good); border-color: var(--good); }
.badge.busy { color: var(--warn); border-color: var(--warn); }
.badge.off { color: var(--dim); }

.notice { padding: 10px 12px; border-radius: 6px; border-left: 3px solid var(--dim);
          background: #191512; font-size: 14px; margin: 10px 0; }
.notice.error { border-color: var(--bad); }
.notice.warn { border-color: var(--warn); }
.notice.info { border-color: var(--good); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px;
         margin: 12px 0; font-size: 14px; }
.facts dt { color: var(--dim); }
.facts dd { margin: 0; }

.code { font-family: ui-monospace, "SF Mono", Menlo, monospace;
        letter-spacing: 0.18em; }
.code.big { font-size: 30px; color: var(--hot); margin: 6px 0 2px; }

.ip { font-family: ui-monospace, monospace; cursor: pointer;
      border-bottom: 1px dotted var(--dim); }

.games { font-size: 13px; color: var(--dim); word-break: break-word; }

.matrix { border-collapse: collapse; width: 100%; font-size: 13px; }
.matrix th, .matrix td { border: 1px solid var(--edge); padding: 6px 8px;
                         text-align: left; }
.matrix th { color: var(--dim); font-weight: 500; }
.matrix td.good { color: var(--good); }
.matrix td.bad { color: var(--bad); }
.matrix td.unsure { color: var(--dim); }
.matrix td.self { color: var(--edge); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
         background: var(--panel); border: 1px solid var(--edge);
         border-radius: 6px; padding: 10px 16px; font-size: 14px; }
.toast.error { border-color: var(--bad); }

footer { border-top: 1px solid var(--edge); padding: 18px 20px;
         color: var(--dim); font-size: 13px; text-align: center; }

@media (max-width: 620px) {
  header { gap: 12px; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { margin-top: 6px; }
}

/* --- the front page ---------------------------------------------------- */
/* Publishers and the games they made. No artwork: a wall of covers is
   somebody else's work republished, and the name is what a visitor reads
   anyway. */
.publishers {
  display: grid; gap: 1.4rem 2rem; margin-top: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.publisher-name {
  margin: 0 0 .4rem; font-size: .95rem; letter-spacing: .04em;
  text-transform: uppercase; color: #e0a06a;
  border-bottom: 1px solid #2a3542; padding-bottom: .3rem;
}
ul.games { list-style: none; margin: 0; padding: 0; }
li.game {
  display: flex; justify-content: space-between; align-items: center;
  gap: .6rem; padding: .2rem 0; font-size: .9rem;
}
/* The name takes the slack, so the mode and the settings chip stay put
   rather than being pushed about by however long a title is. */
li.game .game-name { flex: 1 1 auto; }
li.game .game-mode { flex: 0 0 auto; }
.game-name { color: #dfe6ee; }
.game-mode { color: #8ea0b4; font-size: .78rem; white-space: nowrap; }
.stat { display: flex; flex-direction: column; margin-right: 2rem; }
.stat strong { font-size: 2rem; line-height: 1; }

ul.advice { margin: .6rem 0 0; padding-left: 1.1rem; line-height: 1.6; }
ul.advice li { margin-bottom: .3rem; color: #c3cedb; font-size: .9rem; }
.issue { padding: .6rem 0; border-bottom: 1px solid #222c38; }
.issue-detail { white-space: pre-wrap; font-size: .88rem; color: #c3cedb; }
textarea.field-input { width: 100%; font: inherit; }

/* --- ways to play ------------------------------------------------------ */
.ways {
  display: grid; gap: 1.2rem; margin-top: .8rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.way { margin: 0; }
.way-art {
  width: 100%; height: auto; background: #131b25;
  border: 1px solid #24313f; border-radius: .4rem;
}
.way figcaption { display: flex; flex-direction: column; gap: .2rem;
                  margin-top: .5rem; }
.way figcaption strong { font-size: .92rem; }
.way figcaption .hint { font-size: .82rem; line-height: 1.45; }

/* Something travelling along the link, because the point of these pictures
   is that the machines are talking to each other. */
@keyframes way-flow { to { stroke-dashoffset: -32; } }
.way-link { animation: way-flow 1.4s linear infinite; }
/* Players take it in turns to be the one acting. */
@keyframes way-pulse {
  0%, 40%, 100% { opacity: .45; }
  15% { opacity: 1; }
}
.way-player { animation: way-pulse 1.8s ease-in-out infinite; }
@keyframes way-node {
  0%, 70%, 100% { stroke: #37485c; }
  20% { stroke: #e0a06a; }
}
.way-node { animation: way-node 2.4s linear infinite; }

/* Somebody who has asked their system not to animate things is not asking
   for an exception for ours. */
@media (prefers-reduced-motion: reduce) {
  .way-link, .way-player, .way-node { animation: none; }
}

.expansion {
  margin: 0 0 .3rem; font-size: 1.05rem; letter-spacing: .12em;
  text-transform: uppercase; color: #e0a06a;
}
.made-by { margin-top: 2rem; display: flex; flex-direction: column;
           align-items: center; gap: .6rem; }
.maker-logo { width: 240px; max-width: 60%; height: auto; opacity: .9; }

.brand-logo { height: 30px; width: auto; display: block; }
.hero-logo { width: 340px; max-width: 90%; height: auto; margin: 0 0 .6rem; }

ol.steps { list-style: none; margin: .8rem 0 0; padding: 0; }
li.step { display: flex; gap: .8rem; padding: .5rem 0; align-items: flex-start; }
li.step > div { display: flex; flex-direction: column; gap: .15rem; }
.step-number {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #1d2a38; border: 1px solid #e0733c; color: #e0a868;
  font-size: .82rem; font-weight: 700;
}

.game-settings {
  flex: 0 0 auto; align-self: center; line-height: 1.5;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: #7cd680; border: 1px solid #2f4a38; border-radius: .2rem;
  padding: 0 .3rem; text-decoration: none; white-space: nowrap;
}
.game-settings:hover { background: #16281c; }

.hint.sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: .7rem; word-break: break-all; margin-top: -.3rem; }
.row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
       padding: .35rem 0; }

/* Links read as text, not as decoration.
   There was no rule for them at all, so they fell back to the browser's own
   blue - which on a near-black panel is a colour you can see is there and
   cannot comfortably read. White, underlined, and the underline is what says
   it is a link rather than the colour doing that job alone. */
a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(243, 237, 228, .45);
}
a:hover, a:focus-visible {
  color: #ffffff;
  text-decoration-color: var(--hot);
}
/* The buttons and the settings chips carry their own colour and box, so
   they are not underlined text. */
a.button, a.game-settings { text-decoration: none; }
a.button:hover, a.game-settings:hover { text-decoration: none; }

/* The beta notice. Loud enough to be read before anything is downloaded,
   quiet enough not to be the first thing about the project. */
.beta {
  margin: 0 0 1rem; padding: .55rem .8rem; border-radius: .3rem;
  background: rgba(216, 167, 44, .12); border: 1px solid rgba(216, 167, 44, .5);
  color: #e6d7b0; font-size: .88rem; line-height: 1.5;
}
.beta strong { color: var(--warn); letter-spacing: .08em;
               text-transform: uppercase; }

.coming {
  margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--edge);
}
.coming strong {
  display: block; margin-bottom: .3rem; font-size: .78rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}
.coming p { margin: .2rem 0; }
