/* The help page: plain, readable, and high contrast */
:root {
  --text: #1b1b1b;
  --muted: #444;
  --bg: #ffffff;
  --panel: #f4f2ee;
  --link: #0050d0;
  --accent: #8a0d09;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text: #f2f2f2;
    --muted: #c8c8c8;
    --bg: #121212;
    --panel: #1f1f1f;
    --link: #8ab4ff;
    --accent: #ff8a80;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  max-width: 46rem;
  padding: 1rem 1rem 3rem;
  font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0.5rem 0;
  color: var(--accent);
}

h2 {
  font-size: 1.4rem;
  margin: 2rem 0 0.5rem;
  padding-top: 0.5rem;
  border-top: 2px solid var(--panel);
}

h3 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.25rem;
}

.lead {
  font-size: 1.15rem;
}

nav {
  background: var(--panel);
  border-radius: 0.5rem;
  padding: 0.25rem 1rem 0.75rem;
  margin: 1rem 0;
}

nav h2 {
  border: none;
  margin-top: 0.5rem;
}

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

a:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

li {
  margin: 0.3rem 0;
}

footer {
  margin-top: 2rem;
}

/* Dark mode chosen in the map's settings */
:root[data-theme="dark"] {
  --text: #f2f2f2;
  --muted: #c8c8c8;
  --bg: #121212;
  --panel: #1f1f1f;
  --link: #8ab4ff;
  --accent: #ff8a80;
}

html.larger-text {
  font-size: 125%;
}

/* Listening */
.listen-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.listen-controls .note {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.listen-status {
  margin: 0;
  color: var(--muted);
}

button {
  font: inherit;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 0.4rem;
  border: 2px solid var(--link);
  background: var(--bg);
  color: var(--link);
  cursor: pointer;
}

button.listen-main,
button[aria-pressed="true"] {
  background: var(--link);
  color: var(--bg);
  font-weight: bold;
}

button:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

button.listen {
  min-height: 36px;
  padding: 0 0.75rem;
  font-size: 0.95rem;
}

.speaking {
  background: var(--panel);
  outline: 3px solid var(--link);
  outline-offset: 4px;
  border-radius: 0.25rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.warning {
  padding: 0.75rem 1rem;
  border-left: 5px solid #e07000;
  background: var(--panel);
  border-radius: 0.3rem;
}
