@font-face {
  font-family: Roboto;
  src: url("fonts/Roboto-VariableFont.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --bg: #fff;
  --text: #333;
  --muted: #405166;
  --border: #cbd5e1;
  --focus: #0c3b64;
  --panel: #f8fafc;
  --nav-bg: #0c3b64;
  --nav-text: #fff;
  --header-focus: #fff;
  --heading: #0c3b64;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #061528;
  --text: #e2e7ec;
  --muted: #b7c4d0;
  --border: #1c3a5c;
  --focus: #e3c196;
  --panel: #0d2440;
  --nav-bg: #061528;
  --nav-text: #fff;
  --header-focus: #e3c196;
  --heading: #fff;
}

:root[data-theme="muted-light"] {
  color-scheme: light;

  --bg: #edf0f3;
  --text: #2b3138;
  --muted: #405166;
  --border: #d2d8de;
  --focus: #234a73;
  --panel: #fff;
  --nav-bg: #234a73;
  --nav-text: #fff;
  --header-focus: #fff;
  --heading: #234a73;
}

:root[data-theme="muted-dark"] {
  color-scheme: dark;

  --bg: #142536;
  --text: #e2e7ec;
  --muted: #b6c5d4;
  --border: #2c3f54;
  --focus: #e3c196;
  --panel: #1e3147;
  --nav-bg: #142536;
  --nav-text: #fff;
  --header-focus: #e3c196;
  --heading: #fff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;

    --bg: #061528;
    --text: #e2e7ec;
    --muted: #b7c4d0;
    --border: #1c3a5c;
    --focus: #e3c196;
    --panel: #0d2440;
    --nav-bg: #061528;
    --nav-text: #fff;
    --header-focus: #e3c196;
    --heading: #fff;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.6 Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  transform: translateY(-160%);
  padding: .75rem 1rem;
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--focus);
  z-index: 2;
}

.skip-link:focus { transform: translateY(0); }

header {
  background: var(--nav-bg);
  color: var(--nav-text);
}

.header-inner,
main,
footer {
  width: min(100% - 2rem, 54rem);
  margin-inline: auto;
}

.header-inner {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { font-weight: 800; }

.header-actions,
.theme-control {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.theme-control { gap: .5rem; }

.theme-control label { font-size: .875rem; }

.theme-control select {
  min-height: 2.75rem;
  padding: .5rem 2rem .5rem .65rem;
  border: 1px solid rgb(255 255 255 / 60%);
  border-radius: .4rem;
  background: var(--nav-bg);
  color: var(--nav-text);
  font: inherit;
}

main { padding-block: 1.5rem 2rem; }

h1,
h2 {
  color: var(--heading);
  line-height: 1.2;
}

h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }

.panel {
  margin-block: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: .625rem;
  background: var(--panel);
}

a { color: var(--focus); }

header a { color: var(--nav-text); }

a:focus,
button:focus {
  outline: 4px solid var(--focus);
  outline-offset: 2px;
}

header a:focus { outline-color: var(--header-focus); }

.button {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  padding: .65rem 1rem;
  border: 2px solid currentcolor;
  border-radius: .5rem;
  font-weight: 700;
  text-decoration: none;
}

footer {
  padding-block: 1rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}

footer .sep { color: var(--muted); }

@media (width <= 600px) {
  .header-inner {
    padding-block: .75rem;
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }
}
