:root {
  --old-glory-red: #b22234;
  --old-glory-blue: #3c3b6e;
  --paper: #f5f1e6;
  --ink: #1a1a1a;
}

* { box-sizing: border-box; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

body.shouting {
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.02em;
}

/* Form controls don't inherit text-transform/font-weight from ancestors
   by default in browsers, so body.shouting needs an explicit push here. */
body.shouting input,
body.shouting button,
body.shouting select,
body.shouting textarea {
  text-transform: uppercase;
  font-weight: bold;
}

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--old-glory-blue);
  color: white;
}

header.site-header a {
  color: white;
  text-decoration: none;
  margin-right: 1rem;
  font-weight: 600;
}

header.site-header a:hover { text-decoration: underline; }

header.site-header nav {
  text-align: right;
}

header.site-header nav a:last-of-type {
  margin-right: 0;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand strong { color: #ffcc33; }

header.site-header a.brand {
  margin-right: 0;
  font-weight: 800;
}

header.site-header a.brand:hover { text-decoration: none; }

.locale-switch {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  padding-top: 1rem;
}

.locale-switch-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
}

.locale-option {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.locale-option:hover { border-color: white; }

.locale-option.active {
  background: var(--old-glory-red);
  border-color: var(--old-glory-red);
}

main { padding: 0; }

#map-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#map-page main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#search-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: white;
  border-bottom: 2px solid var(--old-glory-blue);
}

#search-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

#search-form button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: var(--old-glory-blue);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.legacy-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
}

@media (max-width: 600px) {
  #search-form {
    flex-wrap: wrap;
  }

  .legacy-toggle {
    flex-basis: 100%;
  }
}

#map { flex: 1; }

.search-error {
  margin: 0;
  padding: 0.5rem 1.25rem;
  background: #fdecea;
  color: var(--old-glory-red);
  font-size: 0.9rem;
  border-bottom: 2px solid var(--old-glory-red);
}

.map-load-error {
  padding: 2rem;
  text-align: center;
  color: var(--ink);
}

.content-page main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  line-height: 1.6;
}

.content-page h1 { color: var(--old-glory-blue); }

.faq-entry { margin-bottom: 1.75rem; }
.faq-entry h2 { font-size: 1.1rem; margin-bottom: 0.35rem; }

.donate-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--old-glory-red);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 700;
}

.donate-button:hover { filter: brightness(1.1); }

.btc-note {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px dashed #999;
  border-radius: 6px;
  color: #555;
  font-size: 0.9rem;
}
