/* pnw.contractors — Craigslist-style */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #222;
    background: #f5f5f0;
}

a { color: #1a5632; text-decoration: none; font-weight: 500; }
a:visited { color: #1a5632; }
a:hover { color: #0d3b1f; text-decoration: underline; }
a:active { color: #082814; }

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 2px solid #ddd;
    padding: 12px 0;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.site-logo {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    text-decoration: none;
}
.site-logo:visited { color: #222; }
.site-nav a {
    margin-left: 16px;
    font-size: 13px;
}

/* Flash messages */
.flash-success {
    background: #d4edda;
    color: #155724;
    padding: 10px 16px;
    margin: 16px 0;
    border: 1px solid #c3e6cb;
}
.flash-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 16px;
    margin: 16px 0;
    border: 1px solid #f5c6cb;
}

/* Main */
main {
    padding: 20px 0 40px;
}
h1 { font-size: 22px; margin-bottom: 12px; }
h2 { font-size: 18px; margin: 20px 0 8px; }
h3 { font-size: 15px; margin: 12px 0 6px; }

/* Homepage grids */
.city-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 12px 0 20px;
}
.city-card {
    display: flex;
    flex-direction: column;
    padding: 14px;
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #222;
}
.city-card:visited { color: #222; }
.city-card:hover { border-color: #1a5632; background: #f0f7f4; }
.city-card strong { font-size: 15px; color: #1a5632; }
.city-card span { font-size: 12px; color: #888; margin-top: 4px; }

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    margin: 12px 0 20px;
}
.service-card {
    display: block;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #1a5632;
    font-size: 13px;
    font-weight: 600;
}
.service-card:visited { color: #1a5632; }
.service-card:hover { border-color: #1a5632; background: #f0f7f4; }

/* Lists */
.cat-list, .city-list, .contractor-list {
    list-style: none;
    padding: 0;
}
.cat-list li, .city-list li {
    padding: 6px 0;
    border-bottom: 1px solid #e8e8e4;
}
.cat-list li a, .city-list li a {
    display: flex;
    justify-content: space-between;
    text-decoration: none;
}
.cat-list .count, .city-list .count {
    color: #888;
    font-size: 12px;
}

/* Contractor cards */
.contractor-item {
    padding: 14px 0;
    border-bottom: 1px solid #e8e8e4;
}
.contractor-item h3 { margin: 0 0 4px; font-size: 15px; }
.contractor-item .phone { font-weight: 600; color: #333; }
.contractor-item .meta { color: #666; font-size: 12px; margin-top: 4px; }
.contractor-item .desc { color: #444; margin-top: 4px; font-size: 13px; }
.featured-badge {
    color: #e67e00;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.credentials { margin: 6px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.credential-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #e8f5e9;
    color: #1a5632;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #c8e6c9;
}

/* Cross-links */
.cross-links {
    margin: 24px 0;
    padding: 12px;
    background: #fff;
    border: 1px solid #e8e8e4;
    font-size: 13px;
}
.cross-links h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.cross-links a { margin-right: 8px; }

/* Search */
.search-box {
    margin: 16px 0;
}
.search-box input[type="text"] {
    width: 70%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    font-size: 14px;
}
.search-box button {
    padding: 8px 16px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}
.search-box button:hover { background: #f0f0f0; }

/* Forms */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 13px; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    font-size: 14px;
    font-family: inherit;
}
.form-group textarea { height: 120px; resize: vertical; }
.checkbox-grid { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.checkbox-grid label { font-weight: normal; font-size: 13px; }
.btn {
    padding: 8px 20px;
    background: #1a5632;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}
.btn:hover { background: #0d3b1f; color: #fff; text-decoration: none; }
.btn:visited { color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-danger { background: #c00; }
.btn-danger:hover { background: #a00; }
.btn-green { background: #28a745; }
.btn-green:hover { background: #218838; }
.btn-orange { background: #e67e00; }
.btn-orange:hover { background: #cc6e00; }

/* Admin */
.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
}
.admin-tabs a {
    padding: 8px 16px;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: #666;
}
.admin-tabs a.active {
    color: #0000cc;
    border-bottom-color: #0000cc;
    font-weight: 600;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.stat-box {
    background: #fff;
    border: 1px solid #e8e8e4;
    padding: 12px;
    text-align: center;
}
.stat-box .num { font-size: 28px; font-weight: 700; }
.stat-box .label { font-size: 12px; color: #666; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px; text-align: left; border-bottom: 1px solid #e8e8e4; }
th { font-weight: 600; background: #fafaf5; }

/* Footer */
.site-footer {
    background: #fff;
    border-top: 1px solid #ddd;
    padding: 16px 0;
    font-size: 12px;
    color: #888;
    margin-top: 40px;
}
.site-footer a { color: #666; margin: 0 8px; }

/* Breadcrumb */
.breadcrumb { font-size: 12px; color: #888; margin-bottom: 12px; }
.breadcrumb a { color: #666; }

/* CTA */
.cta-box {
    background: #fff;
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    margin: 24px 0;
}
.cta-box p { margin-bottom: 10px; color: #666; }

/* Verified badge */
.verified-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #1a5632;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 6px;
}

/* Photo gallery */
.photo-gallery {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 14px 0;
}
.contractor-photo {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border: 1px solid #ddd;
}

/* Honeypot */
.ohnohoney { position: absolute; left: -9999px; }

/* Responsive */
@media (max-width: 600px) {
    .site-header .container { flex-direction: column; align-items: flex-start; }
    .site-nav a { margin-left: 0; margin-right: 12px; }
    .search-box input[type="text"] { width: 65%; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .city-grid { grid-template-columns: repeat(2, 1fr); }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
}
