@font-face {
  font-family: "Luciole";
  src: url("fonts/Luciole-Math/Luciole-Regular.woff2") format("woff2");
  font-weight: normal;
  font-display: swap;
}
@font-face {
  font-family: "Luciole";
  src: url("fonts/Luciole-Math/Luciole-Italic.woff2");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Luciole";
  src: url("fonts/Luciole-Math/Luciole-Bold.woff2");
  font-weight: bold;
  font-display: swap;
}
@font-face {
  font-family: "Luciole";
  src: url("fonts/Luciole-Math/Luciole-BoldItalic.woff2");
  font-weight: bold;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Luciole Math";
  src: url("fonts/Luciole-Math/Luciole-Math.otf") format("opentype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-size: clamp(20px, 2svw, 30px);
}

nav {
  display: flex;
}

#start {
  margin-top: 1lh;
  justify-content: center;
  font-size: 1.5rem;
}

#end {
  margin-bottom: 1lh;
  justify-content: end;
}
.finished #end {
  justify-content: center;
}
.finished #end button {
  font-size: 1.5rem;
}

#end-game {
  align-self: end;
}

body {
  font-family: Luciole, sans-serif;
  background: #bc4a3c;
  color: contrast-color(#bc4a3c);
  line-height: 1.5;
  margin: 0;
}

header, main, footer {
  padding: 0.5lh 1em;
}

header {
  text-align: center;
  text-transform: uppercase;
  padding: 1em;
  background: navy;
  color: white;
}

header h1 {
    margin-block: 0;
    font-size: min(2rem,calc(90svw / 10));
}

main {
    max-width: 80ch;
    margin-inline: auto;
}

math {
  font-family: "Luciole Math";
}

button {
  font-size: inherit;
  font-family: inherit;
  background: color-mix(in oklab, Canvas, CanvasText 10%);
  border: medium solid;
  border-radius: 0.5em;
  margin: 0.1lh 0.1em;
  padding-inline: 0.5em;
}

input {
  accent-color: navy;
}
input[type="range"] {
  vertical-align: middle;
  margin-inline: 0.5em;
}

#ops {
  display: flex;
  list-style: none;
  padding-inline: 0;
  gap: 1em;
}

#ops button {
  width: 3em;
  height: 3em;
}

#ints {
  list-style: none;
  padding-inline: 0;
}

#equation {
  height: 2lh;
}
#equation math {
  font-size: min(1em, calc(4 * 90svw / var(--num-digits)));
}

.finished #equation {
    display: none;
}


p {
    margin-block: 1lh;
}

button:is(:hover,:focus) {
  background: color-mix(in oklab, Canvas, lightblue 90%);
  color: black;
  border-style: dashed;
}

button[aria-checked="true"] {
  background: color-mix(in oklab, Canvas, yellow 80%);
  color: black;
  border-style: dotted;
}

button:active {
  background: color-mix(in oklab, Canvas, lightblue 70%);
  color: black;
}

button[disabled] {
  display: none;
}

.shove {
  background: none;
  border-color: transparent;
}

footer {
  margin-top: 5lh;
}