@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/IBMPlexSans-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/IBMPlexSans-Medium.woff2") format("woff2");
}

:root {
  color-scheme: light;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
  color: #10121c;
  background: #f4f3f6;
  --muted: #625b6b;
  --line: #cec9d4;
  --control: #827a8c;
  --focus: #3859b3;
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  place-items: center;
  min-height: 100svh;
  margin: 0;
  padding: 40px 24px;
}

main {
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
}

header, .connection {
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

p {
  margin: 0;
}

.intro {
  margin-top: 8px;
  color: var(--muted);
}

.connection {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

#status {
  max-width: 36ch;
  margin-inline: auto;
}

#notice {
  margin-top: 8px;
}

button {
  min-width: 160px;
  min-height: 44px;
  margin-top: 16px;
  padding: 9px 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: #5ab552;
  color: #10121c;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

button:hover:enabled {
  border-color: #10121c;
}

button:active:enabled {
  background: #a6cb96;
}

button:disabled {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
  cursor: default;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.volume {
  margin-top: 32px;
}

label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-weight: 500;
}

output {
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}

#volume-value {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

input[type="range"] {
  display: block;
  width: 100%;
  height: 44px;
  margin: 4px 0 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: var(--control);
}

input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 24px;
  margin-top: -10.5px;
  border: 0;
  border-radius: 2px;
  -webkit-appearance: none;
  background: #10121c;
}

input[type="range"]::-moz-range-track {
  height: 3px;
  background: var(--control);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 24px;
  border: 0;
  border-radius: 2px;
  background: #10121c;
}

.range-scale {
  display: flex;
  justify-content: space-between;
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

#sources {
  margin-top: 16px;
  text-align: center;
}

details {
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

.disclosure::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
}

details[open] .disclosure::after {
  content: "−";
}

summary:hover {
  color: #10121c;
}

.timing {
  padding: 12px 0 8px;
}

.timing .hint {
  max-width: 40ch;
  margin-top: 8px;
}

@media (max-width: 480px) {
  button {
    width: 100%;
  }
}

@media (forced-colors: active) {
  input[type="range"] {
    appearance: auto;
    -webkit-appearance: auto;
  }

  button {
    border-color: ButtonText;
  }
}
