/* Opportunities Africa: one small hand-written stylesheet, no build step, mobile first. */
:root {
  --green: #0b6b3a; --green-dark: #08502b; --green-50: #e8f5ee;
  --red: #c8102e; --black: #111827;
  --ink: #1f2937; --muted: #6b7280; --line: #e5e7eb; --bg: #f7f8f7; --card: #fff;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
h1, h2, h3 { line-height: 1.25; color: var(--black); }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: .2em 0 .4em; }
h2 { font-size: 1.25rem; margin: 1.6em 0 .5em; }
img, svg { vertical-align: middle; }
code { background: #f1f5f9; padding: 0 .3em; border-radius: 4px; font-size: .9em; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.center { text-align: center; padding-top: 3rem; padding-bottom: 3rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.1rem; color: #374151; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 10; }
.pre { white-space: pre-wrap; }

/* Header and footer */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--black); text-decoration: none; font-size: 1.05rem; }
.brand-mark { display: inline-flex; flex-direction: column; width: 26px; height: 18px; border-radius: 3px; overflow: hidden; }
.brand-mark i { flex: 1; } .brand-mark i:nth-child(1) { background: #c8102e; } .brand-mark i:nth-child(2) { background: #f2a900; } .brand-mark i:nth-child(3) { background: var(--green); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { background: var(--green-50); color: var(--green-dark); }
.site-footer { margin-top: 4rem; padding: 2rem 0 1.5rem; background: #fff; border-top: 1px solid var(--line); }
.footer-inner { display: grid; gap: 1rem; margin-bottom: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 2fr 1fr; } }

/* Buttons and badges */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: #cbd5e1; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-outline { border-color: var(--green); color: var(--green); }
.btn-danger { color: var(--red); }
.btn-sm { padding: 6px 10px; font-size: .85rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-apply { background: var(--red); border-color: var(--red); color: #fff; padding: 14px 22px; font-size: 1.05rem; }
.btn-apply:hover { background: #a50d26; color: #fff; }
.btn-block { width: 100%; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.b-blue { background: #e0ecff; color: #1d4ed8; } .b-purple { background: #efe5ff; color: #6d28d9; }
.b-slate { background: #e2e8f0; color: #1e293b; } .b-indigo { background: #e0e7ff; color: #3730a3; } .b-pink { background: #fce7f3; color: #9d174d; }
.card-scope { margin: 0; font-size: .82rem; color: #475569; }
.b-teal { background: #dff5f3; color: #0f766e; } .b-amber { background: #fff3d6; color: #92400e; } .b-red { background: #ffe4e6; color: #be123c; }
.b-green { background: var(--green-50); color: var(--green-dark); } .b-gray { background: #f1f5f9; color: #475569; }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-size: .8rem; font-weight: 600; }
.deadline { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; font-weight: 600; color: #374151; }
.d-closing-soon { color: var(--red); } .d-rolling { color: #1d4ed8; } .d-closed { color: var(--muted); }

/* Hero and search */
.hero { background: linear-gradient(180deg, #fff, var(--bg)); padding: 2rem 0 1rem; }
.search { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-top: 1rem; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.filter span { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); margin-bottom: 2px; text-transform: uppercase; letter-spacing: .03em; }
.clear { display: inline-block; margin-top: 8px; font-size: .9rem; }
@media (min-width: 768px) { .filter-row { grid-template-columns: repeat(5, 1fr); } }

/* Listing */
.results-count { font-size: 1rem; color: var(--muted); font-weight: 600; margin: 1.2rem 0 .8rem; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.grid-ad { grid-column: 1 / -1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.card:hover { border-color: #cfe5d8; }
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card-title { font-size: 1.05rem; margin: 4px 0 0; }
.card-title a { color: var(--black); text-decoration: none; }
.card-title a:hover { color: var(--green); text-decoration: underline; }
.card-org { margin: 0; color: var(--muted); font-size: .9rem; }
.card-summary { margin: 0; font-size: .92rem; color: #374151; flex: 1; }
.card-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.empty { background: #fff; border: 1px dashed #cbd5e1; border-radius: var(--radius); padding: 2rem; text-align: center; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 1.5rem 0; }
.cta-band { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; background: var(--green-50); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-top: 2.5rem; }
.cta-band h2 { margin: 0 0 .2em; }
.cta-band p { margin: 0; }

/* Ads: reserved space to prevent layout shift */
.ad { display: block; min-height: 280px; margin: 2rem 0; padding: 8px 0; text-align: center; overflow: hidden; }
.ad-ins { display: block; min-height: 250px; width: 100%; }
.ad-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #9ca3af; margin-bottom: 4px; }
.ad-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px dashed #d1d5db; border-radius: var(--radius); color: var(--muted); background: #fafafa; padding: 1rem; }
.grid-ad .ad { margin: .5rem 0; }

/* Detail page */
.crumbs { margin: 1rem 0 .5rem; color: var(--muted); }
.detail-grid { display: grid; gap: 2rem; }
@media (min-width: 960px) { .detail-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.detail-main { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
@media (min-width: 640px) { .detail-main { padding: 28px; } }
.detail-head .org { color: var(--muted); margin-top: 0; font-weight: 500; }
.box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.detail-head .box { margin: 1rem 0 0; background: var(--bg); }
.sticky { position: sticky; top: 80px; }
.facts { margin: 0 0 1rem; display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { margin: 0; font-weight: 600; }
.why { background: var(--green-50); border-left: 4px solid var(--green); padding: 4px 16px 8px; border-radius: 0 8px 8px 0; }
.why h2 { margin-top: .8em; }
ul.ticks, ul.docs { padding-left: 0; list-style: none; }
ul.ticks li, ul.docs li { position: relative; padding-left: 28px; margin: 6px 0; }
ul.ticks li::before { content: "✓"; position: absolute; left: 4px; color: var(--green); font-weight: 700; }
ul.docs li::before { content: "▢"; position: absolute; left: 4px; color: var(--muted); }
ol.steps { counter-reset: s; list-style: none; padding-left: 0; }
ol.steps li { counter-increment: s; position: relative; padding-left: 40px; margin: 12px 0; min-height: 28px; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.apply-final { margin-top: 2.5rem; background: var(--bg); text-align: center; }
.apply-final h2 { margin-top: 0; }
.related { margin-top: 2.5rem; }
.mobile-only { display: block; } .desktop-only { display: none; }
@media (min-width: 960px) { .mobile-only { display: none; } .desktop-only { display: block; } }

/* Prose pages and forms */
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.8em; }
.form { display: grid; gap: 14px; margin: 1rem 0; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
.form .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.form-cols { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-cols { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; } }
.form .check { display: flex; align-items: center; gap: 8px; font-weight: 500; padding: 10px 0; }
.form .check input { width: auto; }
.hp { position: absolute !important; left: -9999px; }
.flash { padding: 12px 16px; border-radius: 10px; margin: 1rem 0; }
.flash ul { margin: 0; padding-left: 1.2em; }
.flash-ok { background: var(--green-50); color: var(--green-dark); border: 1px solid #bfe3cd; }
.flash-error { background: #fff1f2; color: #9f1239; border: 1px solid #fecdd3; }

/* Admin */
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
.admin-actions, .item-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.inline { display: inline; margin: 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 1rem 0; }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--ink); border-bottom: 2px solid transparent; font-size: .95rem; }
.tabs a[aria-current] { border-color: var(--green); color: var(--green); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 1rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat b { display: block; font-size: 1.8rem; color: var(--green); }
.checklist { list-style: none; padding: 0; }
.checklist li { padding: 4px 0 4px 26px; position: relative; }
.checklist li.ok::before { content: "✓"; position: absolute; left: 4px; color: var(--green); font-weight: 700; }
.checklist li.todo::before { content: "!"; position: absolute; left: 7px; color: var(--red); font-weight: 700; }
.admin-list { display: grid; gap: 10px; }
.admin-item { display: grid; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
@media (min-width: 900px) { .admin-item { grid-template-columns: 1fr auto; } }
.admin-item.unread { border-left: 4px solid var(--green); }
.source-form { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .source-form { grid-template-columns: 1fr 2fr 90px auto; } }
.source-form .full { grid-column: 1 / -1; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.status { padding: 2px 8px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: #f1f5f9; }
.s-success { background: var(--green-50); color: var(--green-dark); } .s-failed { background: #ffe4e6; color: #be123c; }
.s-partial { background: #fff3d6; color: #92400e; } .s-running { background: #e0ecff; color: #1d4ed8; }
.log { background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: var(--radius); overflow-x: auto; white-space: pre-wrap; font-size: .85rem; }

/* Alerts */
.alert-band { background: #fff; border: 1px solid #bfe3cd; }
.alert-mini { display: flex; gap: 8px; flex: 1 1 320px; max-width: 460px; }
.alert-mini input { min-width: 0; }
fieldset.choices { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px 10px; margin: 0; background: #fff; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
fieldset.choices legend { font-weight: 600; padding: 0 6px; }
fieldset.choices .check { padding: 6px 0; }
.form .check input[type=radio], .form .check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); }

/* Featured (paid) listings and partner links */
.b-featured { background: #fff4d6; color: #7a4b00; border: 1px solid #f0c75e; }
.card-featured { border-color: #f0c75e; box-shadow: 0 0 0 1px #f0c75e inset; }
.affiliate ul { margin: .5rem 0; padding-left: 1.1rem; }
.affiliate li { margin: .25rem 0; }
.price-list { list-style: none; padding: 0; display: grid; gap: .5rem; }
.price-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; }
@media (prefers-color-scheme: dark) { .b-featured { background: #3a2c08; color: #f6d27a; border-color: #8a6a1c; } }

/* Countries */
.country-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 22px; }
.country-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; background: var(--card, #fff); text-decoration: none; color: inherit; }
.country-card:hover { border-color: var(--green); }
.country-card .flag { font-size: 1.6rem; line-height: 1; }
.country-card small { display: block; color: var(--muted, #6b7280); font-size: .8rem; }
.category-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.category-links a { padding: 6px 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 999px; text-decoration: none; color: inherit; font-size: .9rem; background: var(--card, #fff); }
.category-links a[aria-current="page"] { border-color: var(--green); font-weight: 600; }
.nav-countries { position: relative; }
.nav-countries summary { cursor: pointer; list-style: none; padding: 6px 10px; border-radius: 8px; }
.nav-countries summary::-webkit-details-marker { display: none; }
.nav-countries summary::after { content: " ▾"; font-size: .8em; }
.nav-countries .menu { position: absolute; right: 0; top: 110%; z-index: 20; display: grid; min-width: 190px; padding: 6px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; background: var(--card, #fff); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.nav-countries .menu a { padding: 8px 10px; border-radius: 6px; }
.seo-text { max-width: 760px; margin: 32px 0; }
.who-can-apply { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; padding: 0; list-style: none; }
.who-can-apply li { padding: 4px 10px; border-radius: 999px; background: var(--green-soft, #e7f4ec); font-size: .9rem; }
.who-can-apply li.no { background: transparent; border: 1px dashed var(--line, #d1d5db); color: var(--muted, #6b7280); }
