/* How to Vote in Austin, Texas — shared styles
   Goals: light, warm, easy to read; works on old/cheap phones and slow data;
   no web fonts, no frameworks; strong contrast; light + dark. */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #23272b;
  --muted: #566069;
  --accent: #0f7a63;
  --accent-strong: #0b5c4a;
  --border: #e4e0d7;
  --watch-bg: #fff7e6;
  --watch-border: #d98a00;
  --watch-title: #7a4f00;
  --focus: #1a73c2;
  --maxw: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --surface: #1b1f23;
    --text: #e7eaed;
    --muted: #a7afb6;
    --accent: #57cbac;
    --accent-strong: #7ad9bf;
    --border: #2b3137;
    --watch-bg: #2a2413;
    --watch-border: #c08a2e;
    --watch-title: #e8c67f;
    --focus: #6db8ff;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
}

/* Skip link for keyboard/screen-reader users */
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0; }

a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  align-items: baseline;
  justify-content: space-between;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--text);
}
.brand span { color: inherit; }
.lang {
  font-size: 0.95rem;
}
.lang a, .lang .current { margin-left: 0.5rem; white-space: nowrap; }
.lang .current { color: var(--muted); font-weight: 600; }

/* ---------- Layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 0.2rem 0 1rem;
}
h2 { font-size: 1.35rem; line-height: 1.25; margin: 2rem 0 0.6rem; }
h3 { font-size: 1.1rem; margin: 1.4rem 0 0.4rem; }
p, ul, ol { margin: 0 0 1.1rem; }
li { margin: 0.35rem 0; }
.lead { font-size: 1.25rem; }
.crumb { color: var(--muted); font-size: 0.95rem; margin: 0 0 0.3rem; }

/* ---------- Home checklist ---------- */
.promise {
  font-size: 1.35rem;
  margin: 0 0 1.5rem;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  counter-reset: step;
}
.checklist li { margin: 0.6rem 0; }
.checklist a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
}
.checklist a:hover { border-color: var(--accent); }
.checklist a .num {
  flex: 0 0 auto;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Buttons / calls to action ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.15rem;
  border-radius: 8px;
  border: 1px solid transparent;
}
.btn:hover { background: var(--accent-strong); color: #fff; }
.btn.secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- "Watch out" box ---------- */
.watch {
  background: var(--watch-bg);
  border: 1px solid var(--watch-border);
  border-left-width: 6px;
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin: 2rem 0 1rem;
}
.watch h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--watch-title);
}
.watch ul { margin: 0; padding-left: 1.2rem; }

/* ---------- Language / translation banner (for es/, vi/) ---------- */
.mt-banner {
  background: var(--watch-bg);
  border-bottom: 1px solid var(--watch-border);
  color: var(--watch-title);
  padding: 0.7rem 1rem;
  text-align: center;
  font-size: 0.95rem;
}

/* ---------- County map (inset) ---------- */
.map { margin: 1.2rem 0; text-align: center; }
.map a { display: inline-block; }
.map img {
  width: 100%;
  max-width: 340px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.map figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }

/* ---------- County lookup box ---------- */
.lookup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem;
  margin: 1.2rem 0;
}
.lookup .row { display: flex; flex-wrap: wrap; gap: 0.7rem 0.8rem; align-items: flex-end; }
.lookup .field { display: flex; flex-direction: column; flex: 1 1 12rem; }
.lookup .field.state { flex: 0 0 4.5rem; }
.lookup .field label { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.lookup input[type="text"] {
  width: 100%;
  font-size: 1.05rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
.lookup .btn { flex: 0 0 auto; }
#county-result { margin-top: 1rem; font-size: 1.15rem; }
#county-result strong { color: var(--accent); }
#county-result .matched { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.3rem; }
.remember {
  background: var(--watch-bg);
  border: 1px solid var(--watch-border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-top: 0.8rem;
}
.privacy-note { color: var(--muted); font-size: 0.95rem; font-style: italic; margin: 0.8rem 0 0; }

/* ---------- Step navigation ---------- */
.stepnav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 0;
  flex-wrap: wrap;
}
.stepnav a { font-weight: 600; text-decoration: none; }
.stepnav .prev::before { content: "← "; }
.stepnav .next::after { content: " →"; }

/* ---------- FAQ / details ---------- */
.faq { border-top: 1px solid var(--border); }
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.5rem 0;
}
.faq summary::-webkit-details-marker { color: var(--accent); }

/* ---------- Glossary ---------- */
dl.glossary dt { font-weight: 700; margin-top: 1rem; }
dl.glossary dd { margin: 0.15rem 0 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.4rem 1rem 2rem;
}
.site-footer p { margin: 0.5rem 0; }
.site-footer nav a { margin-right: 1rem; white-space: nowrap; }
.site-footer .legal { font-size: 0.85rem; }
