/* NyumbaYetu – hand-written CSS, no build step needed on shared hosting. */
:root {
  --bg: #f7f6f2; --surface: #fff; --ink: #1d2320; --muted: #5f6b65; --line: #e2e0d8;
  --brand: #0f6b4f; --brand-ink: #fff; --brand-soft: #e3f1ec;
  --warn: #9a5b00; --warn-soft: #fdf1dc; --bad: #a3262a; --bad-soft: #fbe5e5; --good: #1f7a3a; --good-soft: #e3f4e7;
  --radius: 10px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#141816; --surface:#1c211f; --ink:#e9ece9; --muted:#9aa5a0; --line:#2d3431; --brand:#3fb68b; --brand-ink:#0c1411; --brand-soft:#173a2e;
    --warn:#f0b65a; --warn-soft:#3a2c14; --bad:#f08a8d; --bad-soft:#3d1d1e; --good:#7bd48f; --good-soft:#183522; }
}
* { box-sizing: border-box; }
body { margin:0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
header.site { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
header.site .wrap { display:flex; align-items:center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -.02em; } .logo span { color: var(--brand); }
nav.main { display:flex; gap: 16px; flex-wrap: wrap; flex: 1; } nav.main a { color: var(--ink); font-weight: 500; }
nav.main a.active { color: var(--brand); }
footer.site { margin-top: 64px; padding: 32px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.site .cols { display:flex; gap: 32px; flex-wrap: wrap; justify-content: space-between; }
.footer-brand { display:flex; align-items:center; gap: 16px; flex: 1 1 100%; }
.footer-brand p { margin: 0; }
.footer-logo { flex: none; line-height: 0; }
.footer-logo img { height: 72px; width: auto; }
.footer-brand .footer-social { margin-top: 6px; }
@media (prefers-color-scheme: dark) { .footer-logo { background: #fff; padding: 6px 10px; border-radius: 10px; } }
main { padding: 24px 0; }
h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; margin: 8px 0 12px; letter-spacing: -.02em; }
h2 { font-size: 22px; margin: 32px 0 12px; } h3 { font-size: 17px; margin: 0 0 6px; }
.muted { color: var(--muted); } .small { font-size: 14px; } .tiny { font-size: 12px; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } .g4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card h3 a { color: var(--ink); }
.btn { display:inline-flex; align-items:center; gap:6px; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); font-weight: 600; cursor: pointer; font-size: 15px; }
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--brand); } .btn.danger { background: var(--bad); border-color: var(--bad); color:#fff; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.badge { display:inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line); color: var(--ink); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.brand { background: var(--brand-soft); color: var(--brand); }
.row { display:flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.hero { padding: 28px 0 8px; } .hero p.lead { font-size: 18px; color: var(--muted); max-width: 720px; }
.stats { display:grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; margin: 20px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat b { display:block; font-size: 26px; }
form.filters { display:grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; align-items: end; background: var(--surface); padding: 14px; border:1px solid var(--line); border-radius: var(--radius); }
label { display:block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; }
textarea { min-height: 120px; }
.field { margin-bottom: 14px; } .help { font-size: 13px; color: var(--muted); margin-top: 3px; }
.error { color: var(--bad); font-size: 13px; margin-top: 3px; }
.alert { padding: 12px 14px; border-radius: 8px; margin: 12px 0; background: var(--brand-soft); color: var(--ink); border: 1px solid var(--line); }
.alert.warn { background: var(--warn-soft); } .alert.bad { background: var(--bad-soft); }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar > i { display:block; height: 100%; background: var(--brand); }
.scorebox { display:grid; grid-template-columns: minmax(150px, 1.4fr) 2fr 40px; gap: 6px 10px; align-items: center; font-size: 14px; }
.score-big { font-size: 34px; font-weight: 800; line-height: 1; }
.kv { display:grid; grid-template-columns: 180px 1fr; gap: 6px 14px; font-size: 15px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 6px; } .scorebox { grid-template-columns: 1fr 1fr 34px; } }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 18px 18px; position: relative; } .timeline li::before { content:""; position:absolute; left:-7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
.sources li { margin-bottom: 6px; font-size: 14px; }
.pagination { display:flex; gap: 6px; flex-wrap: wrap; margin: 20px 0; } .pagination a, .pagination span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 14px; }
.compare th { width: 220px; } .compare td { min-width: 180px; }
.stars { display:flex; gap: 4px; flex-wrap: wrap; } .stars label { font-weight: 400; display:inline-flex; gap: 4px; align-items:center; border:1px solid var(--line); padding: 4px 8px; border-radius: 6px; cursor:pointer; margin: 0; }
.hp { position: absolute; left: -9999px; }
.admin-nav { background: var(--ink); } .admin-nav a { color: var(--bg); }
.pill-count { background: var(--bad); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 12px; margin-left: 4px; }
@media (max-width: 640px) {
  header.site { position: static; } header.site .wrap { gap: 8px 14px; padding-top: 8px; padding-bottom: 8px; }
  nav.main { order: 3; flex-basis: 100%; gap: 14px; font-size: 15px; }
  .hero { padding-top: 8px; }
}

/* Project page: details on the left, one photo on the right */
.project-top { display:grid; grid-template-columns: minmax(0,1fr) 340px; gap: 24px; align-items: start; }
.project-photo { width: 340px; max-width: 100%; justify-self: end; }
.project-photo figure { margin: 0; }
.project-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); display:block; background: var(--surface); }
.project-photo figcaption { margin-top: 6px; }
.photo-placeholder { aspect-ratio: 4 / 3; border: 1px dashed var(--line); border-radius: var(--radius); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; text-align:center; color: var(--muted); background: var(--surface); }
.project-top .grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .project-top .grid.g2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .project-top { grid-template-columns: 1fr; } .project-photo { order: -1; } }
.crumbs { margin: 4px 0 8px; } .crumbs a { color: var(--muted); }
p.lead { font-size: 17px; color: var(--muted); max-width: 760px; }
.answer { margin: 12px 0 16px; border-left: 4px solid var(--brand, #0f6b4f); }
.faq h3 { font-size: 17px; margin: 18px 0 4px; } .faq p { margin: 0 0 8px; max-width: 760px; }
