/* Custom Anubis challenge-page theme matching staticfox.net's terminal aesthetic.
   Drop-in replacement for /.within.website/x/xess/xess.min.css -- reuses the exact
   custom property names Anubis's own stylesheet defines, so no !important hacks or
   selector fights are needed. */

@font-face {
  font-family: 'Terminus';
  src: url('https://staticfox.s3.amazonaws.com/fonts/TerminusTTF-4.39.ttf');
}

:root {
  --body-sans-font: Terminus, monospace;
  --body-preformatted-font: Terminus, monospace;
  --body-title-font: Terminus, monospace;
  --background: #000000;
  --text: #B9B9B9;
  --text-selection: #55FFFF;
  --preformatted-background: #111111;
  --link-foreground: #55FFFF;
  --link-background: #000000;
  --blockquote-border-left: 1px solid #B9B9B9;
  --progress-bar-outline: #55FFFF solid 4px;
  --progress-bar-fill: #B900B9;
}

/* staticfox.net doesn't switch on prefers-color-scheme -- it's always dark.
   Keep the challenge page consistent with that rather than inheriting Anubis's
   default light-mode variant. */
@media (prefers-color-scheme: light) {
  :root {
    --background: #000000;
    --text: #B9B9B9;
    --text-selection: #55FFFF;
    --preformatted-background: #111111;
    --link-foreground: #55FFFF;
    --link-background: #000000;
    --blockquote-border-left: 1px solid #B9B9B9;
  }
}

main {
  font-family: var(--body-sans-font);
  margin: auto;
  max-width: 50rem;
  padding: 2rem;
}

::selection {
  background: var(--text-selection);
  color: #000000;
}

body {
  background: var(--background);
  color: var(--text);
}

body, html {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.centered-div {
  text-align: center;
}

#status {
  font-variant-numeric: tabular-nums;
}

#progress {
  border-radius: 1rem;
  display: none;
  height: 2rem;
  margin: 1rem 0 2rem;
  outline: var(--progress-bar-outline);
  outline-offset: 2px;
  overflow: hidden;
  width: min(20rem, 90%);
}

.bar-inner {
  background-color: var(--progress-bar-fill);
  height: 100%;
  transition: width .25s ease-in;
  width: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .bar-inner {
    transition: width .25s ease-in;
  }
}

pre {
  background-color: var(--preformatted-background);
  border: 0;
  font-family: var(--body-preformatted-font);
  padding: 1em;
}

a, a:active, a:visited {
  background-color: var(--link-background);
  color: var(--link-foreground);
}

h1, h2, h3, h4, h5 {
  font-family: var(--body-title-font);
  margin-bottom: .1rem;
}

blockquote {
  border-left: var(--blockquote-border-left);
  margin: .5em 10px;
  padding: .5em 10px;
}

footer {
  text-align: center;
}
