/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Base */
html { height: 100%; }
body {
  font-family: verdana, arial, helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #fff;
  color: #222;
}

/* Typography */
a { color: #00008b; }
a:visited { color: #551a8b; }
h1 { font-size: 1.4em; color: #800080; margin: 1em 0 0.5em; }
h2 { font-size: 1.15em; color: #00008b; margin: 0.75em 0 0.4em; }
h3 { font-size: 1em; color: #555; margin: 0.5em 0 0.25em; }
p { margin: 0.5em 0; }
ul { margin: 0.5em 0; padding-left: 1.25em; }
li { margin: 0.2em 0; }

/* Layout */
.site-header, main, .site-footer { width: 100%; }
.container { max-width: 800px; margin: 0 auto; padding: 0 12px; }
main.container { padding-bottom: 2em; }

/* Header */
.site-header { padding: 12px 0; }
.site-header nav { display: flex; justify-content: space-between; align-items: center; }
.site-header .site-title { font-size: 1.3em; font-weight: bold; color: #00008b; text-decoration: none; }
.site-header .nav-links { font-size: 0.9em; }

/* Search */
.search-wrapper { position: relative; margin-top: 8px; }
[data-search-input] {
  width: 100%;
  padding: 6px 10px;
  font: inherit;
  border: 1px solid #ccc;
  border-radius: 3px;
}
[data-search-input]:focus { outline: none; border-color: #00008b; }
[data-search-results] {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  max-height: 400px;
  overflow-y: auto;
  z-index: 10;
}
.search-result {
  display: block;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: #222;
}
.search-result:hover, .search-result.active { background: #f5f5f5; }
.search-result strong { display: block; color: #00008b; }
.search-result span { display: block; font-size: 0.85em; color: #666; margin-top: 2px; }

/* Footer */
.site-footer {
  padding: 12px;
  border-top: 1px solid #ddd;
  font-size: 0.85em;
  color: #666;
  display: flex;
  justify-content: space-between;
}

/* Index page */
.index-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
}

/* Tags */
.tag {
  display: inline-block;
  background: #f0f0f0;
  padding: 2px 6px;
  margin: 0 4px 4px 0;
  border-radius: 3px;
  font-size: 0.85em;
  color: #555;
  text-decoration: none;
}
.tag:hover { background: #e0e0e0; }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85em;
  color: #666;
  padding: 6px 0;
  margin-bottom: 0.5em;
  border-bottom: 1px solid #eee;
}

/* Listing detail */
article > p { margin: 0.4em 0; }
article > h1 { margin-bottom: 0.25em; }
.listing-meta { color: #555; }
.listing-verified {
  display: inline-block;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.85em;
  margin: 0.25em 0 0.75em;
}
.listing-map {
  margin-top: 1.25em;
  padding: 1em;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 3px;
}
#map { height: 200px; }

/* Listing cards (category pages) */
.listing-card {
  padding: 1em 0;
  border-bottom: 1px solid #eee;
}
.listing-card:last-child { border-bottom: none; }
.listing-card h2 { margin: 0 0 0.2em; }
.listing-card p { margin: 0.3em 0; }

/* Listings rendered from markdown (tag pages) */
.listing-list > h2 {
  margin-top: 0;
  padding-top: 1em;
  border-top: 1px solid #eee;
}
.listing-list > h2:first-of-type {
  border-top: none;
  padding-top: 0;
}
.listing-list > p { margin: 0.3em 0; }
.listing-list > p em { color: #666; font-size: 0.85em; }

/* Muted text */
.muted { color: #666; font-size: 0.85em; }

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Mobile */
@media (max-width: 600px) {
  .site-header nav { flex-direction: column; gap: 8px; text-align: center; }
  .index-grid { grid-template-columns: 1fr; }
}
