:root {
  color-scheme: light dark;
  --background: #f3f5f8;
  --surface: #fff;
  --line: #e2e7ef;
  --text: #162033;
  --muted: #475569;
  --accent: #354fda;
  --accent-soft: #eaf0ff;
  --shadow: 0 18px 55px #21314b12;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #11151e;
    --surface: #191f2c;
    --line: #30394b;
    --text: #f0f3fb;
    --muted: #b7c1d3;
    --accent: #a9b8ff;
    --accent-soft: #28335a;
    --shadow: 0 18px 55px #0004;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html:root { display: block; height: auto; }

body#top {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  height: auto;
  margin: 0;
  padding: 1.25rem;
  background: var(--background);
  color: var(--text);
  line-height: 1.55;
}

main {
  width: min(100%, 28rem);
  padding: clamp(1.35rem, 6vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  text-align: center;
}

main::before {
  content: "FLUXER";
  display: inline-block;
  padding: .3rem .7rem;
  border-radius: .4rem;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .12em;
}

#title {
  margin: 1rem 0 .65rem;
  font-size: clamp(1.5rem, 6vw, 2rem);
  line-height: 1.2;
  letter-spacing: -.035em;
  text-wrap: balance;
}

main > :not(h1, footer) { color: var(--muted); }
#image { display: none; }

main #status {
  margin: .6rem auto;
  max-width: 32ch !important;
  overflow-wrap: anywhere;
}

main #progress {
  width: min(100%, 16rem);
  height: .45rem;
  margin: 1rem auto;
  border-radius: 999px;
  background: var(--accent-soft);
  outline: none;
}

main #progress .bar-inner { background: var(--accent); }

details {
  margin: 1.3rem 0 0;
  font-size: .875rem;
}

details[open] { text-align: start; }
summary { color: var(--accent); cursor: pointer; }
summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

footer {
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
  padding-top: .9rem;
  color: var(--muted);
  font-size: .78rem;
}

footer p { margin: 0; }
footer p:not(:first-child) { display: none; }
a { color: var(--accent); text-underline-offset: .15em; }
pre { overflow: auto; }

@media (prefers-reduced-motion: reduce) {
  main #progress .bar-inner { transition: none; }
}
