/* Site-wide stylesheet. Linked from every page (doorway + fixture) so the
   benchmark corpus looks like a real-world site — crawlers encounter CSS in
   the wild, and a bare-HTML benchmark would be unrepresentative. The CSS
   itself is layout/typography only; no rules with selectors that fixture
   assertions depend on. */

:root {
  --fg: #1a1a1a;
  --fg-muted: #555;
  --bg: #fafafa;
  --bg-card: #fff;
  --accent: #2e6bc0;
  --border: #e0e0e0;
  --maxw: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
}

.site-header,
.site-footer {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  /* Round-30 deploy: center the header/footer to align with main+aside,
     which are constrained to var(--maxw). Without this they ran flush-
     left on wide screens and visually dissociated from the content. */
  max-width: var(--maxw);
  margin: 0 auto;
}
.site-footer {
  border: 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  margin-bottom: 0;
  display: block;
}

/* Round-30 deploy: pure-CSS hamburger nav for narrow viewports. The
   hidden checkbox toggles the nav via :checked sibling selector — no JS.
   Visible only when viewport width < 700px (`.hamburger` display swap
   below). The checkbox is visually hidden but keeps focus + click-target
   behavior so keyboard nav works. */
.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.hamburger {
  display: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--fg);
  margin: 4px 0;
  border-radius: 2px;
}
.nav-toggle:focus-visible + .hamburger {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brand a,
.site-footer a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
}
.brand a:hover,
.site-footer a:hover { color: var(--accent); }

.main-nav ul,
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.main-nav a,
.footer-nav a { color: var(--fg-muted); text-decoration: none; }
.main-nav a:hover,
.footer-nav a:hover { color: var(--accent); }

main, aside {
  max-width: var(--maxw);
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}

main { background: var(--bg-card); border: 1px solid var(--border); padding: 2rem; border-radius: 6px; }

h1 { margin-top: 0; }
h2 { color: var(--fg); border-bottom: 1px solid var(--border); padding-bottom: 0.25rem; }
.lede { color: var(--fg-muted); font-size: 1.05rem; }

.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
}
.breadcrumb li + li::before { content: "›"; margin-right: 0.5rem; color: var(--border); }
.breadcrumb a { color: var(--accent); text-decoration: none; }

.region-list,
.city-grid,
.paginated-list,
.postal-list {
  padding-left: 1.25rem;
}
.region-list li,
.city-grid li { margin: 0.25rem 0; }
.region-list .count { color: var(--fg-muted); font-size: 0.9rem; }

.postal-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.postal-list code {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  font-size: 0.85rem;
}

.hero-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.hero-figure figcaption {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.city-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1rem;
  margin: 1.5rem 0;
}
.city-facts dt { font-weight: 600; color: var(--fg-muted); }
.city-facts dd { margin: 0; }

aside {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}

.pagination {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.95rem;
}
.pagination a { color: var(--accent); text-decoration: none; }
.pagination .current { color: var(--fg-muted); }

.copyright,
.sitemap-link { color: var(--fg-muted); font-size: 0.85rem; margin: 0.5rem 0; }

.table-of-contents ol { padding-left: 1.25rem; }
.legal-section { margin-top: 1.5rem; }
.legal-section h2 { font-size: 1.15rem; }

.page-hero { margin: 0 0 1.5rem 0; }
.page-hero img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.section-lede {
  color: var(--fg-muted);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.smallest-places .city-grid,
.fun-places .city-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.5rem 1.5rem;
}
.smallest-places .city-grid li,
.fun-places .city-grid li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}
.smallest-places .city-grid a,
.fun-places .city-grid a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.smallest-places .city-grid a:hover,
.fun-places .city-grid a:hover { text-decoration: underline; }

.region {
  color: var(--fg-muted);
  font-size: 0.85rem;
}
.fun-note {
  color: var(--fg-muted);
  font-style: italic;
  font-size: 0.85rem;
}

.about-country,
.about-state {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}
.about-country h2,
.about-state h2 {
  margin-top: 0;
  border-bottom: none;
  color: var(--accent);
}
.about-country p,
.about-state p { margin: 0.5rem 0; }
.locale-note { color: var(--fg-muted); font-size: 0.85rem; font-style: italic; }

/* Round-30 deploy: home-page locale picker (root index doorway). Same
   visual weight as the region-grid on per-locale homes. */
.locale-picker { margin: 2rem 0; }
.locale-picker .locale-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}
.locale-picker .locale-list a {
  display: block;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--accent);
  text-decoration: none;
  text-align: center;
  font-weight: 500;
}
.locale-picker .locale-list a:hover {
  background: var(--bg-card);
  border-color: var(--accent);
}

/* Round-30 deploy: mobile breakpoint — hamburger toggles the nav. */
@media (max-width: 700px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .hamburger { display: block; }
  .main-nav {
    display: none;
    flex-basis: 100%;
  }
  .nav-toggle:checked ~ .main-nav {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
  }
  .main-nav li { padding: 0.5rem 0; }
  .footer-nav ul { flex-direction: column; gap: 0.25rem; }
}
