/* Rogue Runner's website: a privacy policy, a support page and the scoreboard, drawn like one of
   the game's own menu sheets (a steel-framed panel with the title plaque set into its top edge).
   System fonts only and no outside requests; the scoreboard and the review page each run one
   script of this site's own, and nothing collects anything about the visitor. */

:root {
  --ink: #120f0d;        /* the page: the game's panel black, a little warm */
  --panel: #1d1916;      /* the sheet */
  --steel: #6b655d;      /* frame lines */
  --shadow: #080605;     /* the dark line inside the frame */
  --parchment: #e9e0cf;  /* text */
  --dust: #a99f8f;       /* quiet text */
  --ember: #e7823a;      /* headings and links: the game's button orange */
  --plaque: #2a3357;     /* the title plaque's blue */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }

html {
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; padding: 3.5rem 1rem 2.5rem; }

a { color: var(--ember); text-underline-offset: 0.18em; }
a:hover { color: #f6a565; }
a:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

/* The sheet */
.sheet {
  position: relative;
  max-width: 44rem;
  margin: 0 auto;
  padding: 3.25rem 2.25rem 2.25rem;
  background: var(--panel);
  border: 2px solid var(--steel);
  box-shadow: inset 0 0 0 2px var(--shadow), 0 0 0 1px var(--shadow);
}

/* The title plaque, set into the sheet's top edge as in the game */
.plaque {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 2px;
  background: var(--steel);
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 16px 100%, 0 50%);
  white-space: nowrap;
  text-decoration: none;
}
.plaque span {
  display: block;
  padding: 0.3rem 2.2rem 0.38rem;
  background: var(--plaque);
  clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 15px 100%, 0 50%);
  color: var(--parchment);
  font-size: 1.45rem;
  font-weight: 700;
  font-variant-caps: small-caps;
  letter-spacing: 0.07em;
  line-height: 1.35;
}
.plaque:hover span { color: #fff; }

.ways { display: flex; justify-content: center; gap: 1.75rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.ways a { color: var(--dust); text-decoration: none; }
.ways a:hover { color: var(--ember); }
.ways a[aria-current="page"] { color: var(--parchment); border-bottom: 1px solid var(--steel); }

h1, h2 { font-variant-caps: small-caps; letter-spacing: 0.04em; line-height: 1.25; }
h1 { margin: 0 0 0.25rem; font-size: 2rem; }
h2 { margin: 2.4rem 0 0.6rem; font-size: 1.35rem; color: var(--ember); }
h3 { margin: 1.6rem 0 0.4rem; font-size: 1.05rem; }

p, ul, table { margin: 0 0 1rem; }
ul { padding-left: 1.3rem; }
li { margin-bottom: 0.45rem; }
.updated { color: var(--dust); font-size: 0.9rem; margin-bottom: 1.8rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.9rem 0.55rem 0; border-bottom: 1px solid #3a342e; }
th { font-weight: 700; }
td:first-child { width: 34%; color: var(--parchment); }
td { color: #d3c9b8; }

/* The front page */
.front { text-align: center; }
.front p { max-width: 30rem; margin: 0.5rem auto 0; font-size: 1.1rem; }
.doors { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin: 1.8rem 0 0.4rem; padding: 0; list-style: none; }
.doors a {
  display: block;
  min-width: 11rem;
  padding: 0.6rem 1.4rem;
  background: #c8551f;
  border: 2px solid #8f8a82;
  box-shadow: inset 0 0 0 2px #7d2f10;
  color: #fff3e2;
  font-variant-caps: small-caps;
  letter-spacing: 0.05em;
  font-size: 1.1rem;
  text-decoration: none;
}
.doors a:hover { background: #dc6427; color: #fff; }

/* The scoreboard */
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.board-controls { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; justify-content: space-between; margin: 0 0 1.2rem; }
.tabs { display: inline-flex; border: 2px solid var(--steel); box-shadow: inset 0 0 0 1px var(--shadow); }
.tabs button {
  padding: 0.35rem 1.1rem;
  background: transparent;
  border: 0;
  color: var(--dust);
  font: inherit;
  font-variant-caps: small-caps;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.tabs button:hover { color: var(--parchment); }
.tabs button[aria-pressed="true"] { background: #c8551f; color: #fff3e2; }
/* The picker would otherwise be as wide as its longest country name. */
.scope { flex: 1 1 12rem; min-width: 0; max-width: 20rem; }
.scope select {
  width: 100%;
  padding: 0.35rem 0.6rem;
  background: var(--ink);
  border: 2px solid var(--steel);
  color: var(--parchment);
  font: inherit;
}
.tabs button:focus-visible, .scope select:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

.board-title { margin: 0 0 0.4rem; color: var(--ember); font-variant-caps: small-caps; letter-spacing: 0.04em; }
.board-title:empty, .board-status:empty { display: none; }
.board-status { margin: 0.6rem 0; color: var(--dust); }
.board { margin: 0 0 1rem; padding: 0; list-style: none; }
.row {
  display: grid;
  grid-template-columns: 2.4rem 56px minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  margin: 0;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid #3a342e;
}
.row.mine { background: rgba(231, 130, 58, 0.12); box-shadow: inset 0 0 0 1px var(--ember); }
.place { color: var(--dust); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.row:nth-child(1) .place { color: #f1c34b; }
.row:nth-child(2) .place { color: #cfd3da; }
.row:nth-child(3) .place { color: #d6904f; }
.portrait { display: block; width: 56px; height: 56px; background: var(--plaque); border: 2px solid var(--steel); object-fit: cover; }
.who, .score { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.name { font-weight: 700; overflow-wrap: anywhere; }
.skin, .stats { color: var(--dust); font-size: 0.85rem; }
.score { text-align: right; }
.stage { font-size: 1.15rem; font-weight: 700; white-space: nowrap; }
.stats { white-space: nowrap; }
.board-note { color: var(--dust); font-size: 0.88rem; }

.retry, .login button, .actions button {
  padding: 0.35rem 1.1rem;
  background: #c8551f;
  border: 2px solid #8f8a82;
  box-shadow: inset 0 0 0 2px #7d2f10;
  color: #fff3e2;
  font: inherit;
  font-variant-caps: small-caps;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.retry:hover, .login button:hover, .actions button:hover { background: #dc6427; color: #fff; }

/* The owner's review page */
.login { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0 0 1rem; }
.login input { padding: 0.35rem 0.6rem; background: var(--ink); border: 2px solid var(--steel); color: var(--parchment); font: inherit; }
.reported { padding: 0; list-style: none; }
.reported li { display: flex; flex-direction: column; gap: 0.4rem; margin: 0; padding: 0.8rem 0; border-bottom: 1px solid #3a342e; }
.reported .facts { color: var(--dust); font-size: 0.9rem; overflow-wrap: anywhere; }
.reported .id { color: var(--dust); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.8rem; overflow-wrap: anywhere; user-select: all; }
#remove-id { flex: 1 1 18rem; min-width: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

footer { max-width: 44rem; margin: 1.4rem auto 0; color: var(--dust); font-size: 0.88rem; text-align: center; }
footer a { color: var(--dust); }
footer a:hover { color: var(--ember); }

@media (max-width: 34rem) {
  html { font-size: 16px; }
  body { padding-top: 3rem; }
  .sheet { padding: 2.75rem 1.1rem 1.5rem; }
  .plaque span { font-size: 1.25rem; padding-left: 1.6rem; padding-right: 1.6rem; }
  .ways { flex-wrap: wrap; gap: 0.4rem 1.25rem; }
  td:first-child { width: 40%; }
  .row { grid-template-columns: 1.7rem 44px minmax(0, 1fr) auto; gap: 0.6rem; padding-left: 0; padding-right: 0; }
  .portrait { width: 44px; height: 44px; }
  .stage { font-size: 1rem; }
  .stats { white-space: normal; }
}
