/* Anubis challenge page in the darkless.cloud look. Replaces Anubis' xess.css (same selectors and variables).
   Colours and font from DarklessLTD/MainSite (src/app/globals.css, Uncut Sans, OFL). Dark by default like the site,
   light when the browser asks for it. Served by Caddy from /etc/caddy/anubis/css (snippet anubis_css). */
:root {
  --body-sans-font: "Uncut Sans", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --body-preformatted-font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --body-title-font: "Uncut Sans", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;

  --background: #020202;
  --text: #e8e8e8;
  --title: #ffffff;
  --faint: #969696;
  --text-selection: rgb(255 255 255 / 0.22);
  --preformatted-background: #0a0a0a;
  --link-foreground: #ffffff;
  --link-background: transparent;
  --blockquote-border-left: 1px solid #474747;

  --progress-bar-outline: #41bbff solid 2px;
  --progress-bar-fill: #41bbff;
}
@media (prefers-color-scheme: light) {
  :root {
    --background: #ffffff;
    --text: #28282c;
    --title: #020202;
    --faint: #64646c;
    --text-selection: rgb(2 2 2 / 0.22);
    --preformatted-background: #f4f4f5;
    --link-foreground: #020202;
    --link-background: transparent;
    --blockquote-border-left: 1px solid #c4c4ca;

    --progress-bar-outline: #0369a1 solid 2px;
    --progress-bar-fill: #0369a1;
  }
}

@font-face {
  font-family: "Uncut Sans";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("./fonts/UncutSans-Variable.woff2") format("woff2");
}

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

::selection {
  background: var(--text-selection);
}

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

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

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

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

/* The page's own <style> hardcodes #b16286 on these two, after this file: hence !important */
#progress {
  display: none;
  width: min(20rem, 90%);
  border-radius: 1rem;
  overflow: hidden;
  margin: 1rem auto 2rem;
  outline-offset: 2px;
  outline: var(--progress-bar-outline) !important;
}

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

#image {
  max-width: 96px !important;
  margin: 1rem 0;
}

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

a,
a:active,
a:visited {
  color: var(--link-foreground);
  background-color: var(--link-background);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5 {
  margin-bottom: 0.1rem;
  font-family: var(--body-title-font);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--title);
}

details,
footer {
  color: var(--faint);
}

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

footer {
  text-align: center;
  font-size: 0.875rem;
}

/* Anubis' credit line for the mascot we no longer show */
footer p:has(a[href*="celphase"]) {
  display: none;
}
