/* Register page: reuse the current site palette; keep wide tables contained. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: #222; font-family: Inter, Arial, sans-serif; line-height: 1.5; }
[hidden] { display: none !important; }
a { color: #24578e; text-underline-offset: 3px; }
main button, main input, main select { font: inherit; }
main button, main select, main input { min-height: 44px; border: 1px solid #999; border-radius: 3px; padding: 8px 12px; background: white; color: #222; }
main button { cursor: pointer; font-weight: 600; }
main button:hover:not(:disabled) { border-color: var(--flag-green); background: #eef5ef; }
main button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 3px solid #b67600; outline-offset: 3px; }
.skip-link { position: absolute; left: 8px; top: -90px; padding: 12px; background: white; z-index: 300; }
.skip-link:focus { top: 8px; }
  .kenya-stripe { height: 8px; background: linear-gradient(to bottom, #000 0%, #000 20%, #fff 20%, #fff 25%, var(--flag-red) 25%, var(--flag-red) 50%, var(--flag-green) 50%, var(--flag-green) 75%, #fff 75%, #fff 80%, #000 80%, #000 100%); }
  header { background: var(--ink); border-bottom: none; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; position: sticky; top: 0; z-index: 100; }
  header h1 { font-family: 'Orbitron', monospace; font-size: 1.5rem; font-weight: 900; color: #fff; letter-spacing: 2px; }
  header h1 span { color: var(--flag-red); }
  .nav-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
  .nav-links a { color: #ccc; text-decoration: none; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.5px; transition: color 0.2s; }
  .nav-links a:hover { color: #fff; }
  .nav-links a.active { color: var(--red-bright); font-weight: 700; }
  .header-meta { font-size: 0.8rem; color: #ccc; text-align: right; }
  .header-meta strong { color: #eee; }
  .live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red-live); margin-right: 4px; animation: pulse 1s infinite; vertical-align: middle; }
  @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
  /* Hamburger button */
  .hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
  .hamburger span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; transition: all 0.3s; }

  /* Mobile drawer */
  .mobile-drawer { display: none; position: fixed; top: 0; left: 0; bottom: 0; width: 240px; background: var(--ink); z-index: 200; transform: translateX(-100%); transition: transform 0.3s ease; padding: 20px 0; overflow-y: auto; border-right: 2px solid var(--flag-red); }
  .mobile-drawer.open { transform: translateX(0); }
  .mobile-drawer-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 199; }
  .mobile-drawer-backdrop.open { display: block; }
  .mobile-drawer .drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 16px; border-bottom: 1px solid #333; margin-bottom: 12px; }
  .mobile-drawer .drawer-header h2 { font-family: 'Orbitron', monospace; font-size: 1.1rem; font-weight: 900; color: #fff; letter-spacing: 1px; }
  .mobile-drawer .drawer-header h2 span { color: var(--flag-red); }
  .mobile-drawer .drawer-close { background: none; border: none; color: #aaa; font-size: 1.5rem; cursor: pointer; padding: 4px 8px; line-height: 1; }
  .mobile-drawer .drawer-close:hover { color: #fff; }
  .mobile-drawer a { display: block; padding: 12px 20px; color: #ccc; text-decoration: none; font-size: 0.88rem; font-weight: 500; letter-spacing: 0.3px; transition: background 0.2s, color 0.2s; border-left: 3px solid transparent; }
  .mobile-drawer a:hover { background: #1a1a1a; color: #fff; }
  .mobile-drawer a.active { color: var(--red-bright); font-weight: 700; border-left-color: var(--red-bright); background: rgba(255,68,68,0.08); }

  @media (max-width: 600px) {
    .hamburger { display: block; }
    .nav-links { display: none !important; }
    .mobile-drawer { display: block; }
    header { flex-direction: row; align-items: center; padding: 6px 12px; position: sticky; top: 0; z-index: 100; gap: 0; }
    header h1 { font-size: 0.9rem; }
    .header-meta { display: none; }
    .kenya-stripe { height: 4px; position: sticky; top: 0; z-index: 101; }
  }
main { max-width: 1180px; padding: 32px 24px; margin: auto; }
.eyebrow { text-transform: uppercase; font-size: .75rem; font-weight: 700; letter-spacing: 1.5px; color: var(--flag-green); }
main h1 { margin: 5px 0 10px; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; }
main h2 { font-size: 1.15rem; margin: 0; }
.intro { font-size: 1.05rem; }
.boundary { max-width: 850px; border-left: 3px solid var(--flag-green); padding: 10px 16px; background: #f4f9f4; }
.source-links { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .87rem; }
.summary { margin-top: 26px; display: grid; grid-template-columns: 1fr 1.15fr; background: white; border: 1px solid #ccc; }
.external-total { background: #141414; color: white; padding: 25px; display: flex; flex-direction: column; justify-content: center; }
.external-total h2 { font-size: .95rem; color: #ddd; font-weight: 500; }
.external-total p { font-size: clamp(1.15rem, 3vw, 1.9rem); font-weight: 750; margin: 12px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.external-total span { font-size: .8rem; color: #ccc; }
.summary-details { padding: 12px 22px; margin: 0; }
.summary-details div { padding: 9px 0; border-bottom: 1px solid #eee; }
.summary-details div:last-child { border-bottom: 0; font-weight: bold; }
dt { font-size: .8rem; color: #555; } dd { margin: 3px 0 0; font-size: .95rem; font-variant-numeric: tabular-nums; }
.coverage, .table-note { font-size: .82rem; color: #555; }
.explorer { margin: 26px 0 20px; background: white; border: 1px solid #ccc; padding: 22px; min-width: 0; }
.section-heading { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--flag-red); padding-bottom: 16px; }
.view-controls { display: flex; gap: 6px; }
.view-controls [aria-pressed="true"] { color: white; background: var(--flag-green); border-color: var(--flag-green); }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.filters label { display: flex; flex-direction: column; gap: 5px; font-size: .8rem; font-weight: 600; }
.filters label:first-child { flex: 1 1 280px; }
input, select { width: 100%; min-width: 0; font-size: .9rem; font-weight: normal; }
#results { font-size: .9rem; font-weight: 600; }
.table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid #ddd; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
caption { text-align: left; padding: 10px; color: #555; font-size: .78rem; }
th { background: #161616; color: white; text-align: left; padding: 12px; font-weight: 600; }
td { padding: 12px; border-bottom: 1px solid #ddd; vertical-align: top; }
tr:nth-child(even) { background: #f7f7f7; }
.numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.loans-table { min-width: 860px; }
.loans-table td:first-child { min-width: 235px; max-width: 370px; }
.loan-details p { margin: 7px 0; }
summary { cursor: pointer; font-weight: 600; }
.loan-details summary { color: #24578e; }
.zero-note { display: block; color: #666; font-size: .72rem; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px; margin-top: 18px; font-size: .85rem; }
#empty { text-align: center; padding: 20px; }
.provenance { background: #f9f9fa; border: 1px solid #ccc; padding: 16px 20px; font-size: .85rem; }
code { overflow-wrap: anywhere; }
#load-error { padding: 20px; background: #fff0f1; border: 1px solid var(--flag-red); }
footer { border-top: 1px solid #bbb; padding: 20px; text-align: center; font-size: .82rem; }
footer span { margin: 0 10px; } footer p { color: #666; }
@media (max-width: 640px) {
  main { padding: 24px 14px; }
  .summary { grid-template-columns: 1fr; }
  .explorer { padding: 14px; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters label:first-child { flex-basis: auto; }
  .source-links span { display: none; }
  .source-links { flex-direction: column; }
  td, th { padding: 10px; }
}

/* The shared site header uses normal line-height and reset heading margins. */
header, .mobile-drawer { line-height: normal; }
header h1, .mobile-drawer h2 { margin: 0; }
