/* Layout and type for every page. Colours, type sizes, and tracking are the app's, from /theme.css,
   which the build generates from the app's theme; this file names none of its own, and uses only
   properties of keys the theme's shape requires (test/published.test.mjs checks both). */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: var(--font-base);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}
a { color: var(--color-accent); }
.container { max-width: 680px; margin: 0 auto; padding-inline: 1rem; }

/* Header: the wordmark, set as the app's navigation title is. */
header .container { display: flex; align-items: center; min-height: 3.5rem; }
.wordmark { color: var(--color-text); font-weight: 600; text-decoration: none; }

/* Body */
main { padding-block: 2rem 3rem; }
h1 {
  font-size: var(--font-2xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--tracking-display);
  margin: 0 0 0.75rem;
  text-wrap: balance;
}
h2 { font-size: var(--font-base); font-weight: 600; margin: 2rem 0 1rem; }
p { margin: 0.75rem 0; }
.lead { color: var(--color-text-muted); }
.note { color: var(--color-text-muted); font-size: var(--font-sm); }

/* County list: the app's inset grouped list as its About screen draws it. A header in small
   uppercase muted type, then a rounded inset cell whose rows sit a hairline apart, the hairline
   starting at the text's leading edge. */
.groups { display: grid; gap: 1.5rem; margin-bottom: 2rem; }
.inset-header {
  margin: 0;
  padding: 0 1rem 0.5rem;
  color: var(--color-text-muted);
  font-size: var(--font-sm);
  font-weight: 600;
  text-transform: uppercase;
}
.inset {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--color-inset);
  border-radius: var(--radius-lg);
}
.inset li {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  margin-left: 1rem;
  padding: 0.5rem 1rem 0.5rem 0;
}
.inset li + li { border-top: 1px solid var(--color-border); }

/* Prose pages: lists and the tables, which sit on the app's inset cards with rows a hairline apart.
   A table wider than the phone scrolls inside its card rather than the page. */
ul:not(.inset) { padding-left: 1.25rem; }
ul:not(.inset) > li { margin: 0.25rem 0; }
.table {
  overflow-x: auto;
  margin: 1rem 0;
  background: var(--color-inset);
  border-radius: var(--radius-lg);
}
table { border-collapse: collapse; width: 100%; font-size: var(--font-sm); }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 1rem; }
th { color: var(--color-text-muted); font-weight: 600; }
tbody tr { border-top: 1px solid var(--color-border); }

/* Footer */
footer {
  border-top: 1px solid var(--color-border);
  padding-block: 1.5rem 3rem;
  color: var(--color-text-muted);
  font-size: var(--font-sm);
}
footer nav { display: flex; gap: 1.25rem; }
footer a { color: var(--color-text-muted); }
footer p { margin: 0.75rem 0 0; }
