/* The Ballot South Sudan: the public news website.
   A navy masthead, a black news area, red labels and large photographs.
   Self-hosted font; no external scripts, styles or images. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/site/fonts/manrope.woff2") format("woff2");
}
:root {
  --navy: #062d52;
  --navy-deep: #041f3a;
  --navy-line: rgba(255, 255, 255, 0.16);
  --black: #000000;
  --panel: #0e0f11;
  --panel-2: #16181b;
  --line: #24272c;
  --ink: #ffffff;
  --text: #e6e8eb;
  --muted: #a9b0b9;
  --faint: #7d848d;
  --sky: #9cc7f2;
  --red: #e0192d;
  --red-deep: #b5101f;
  --green: #22a559;
  --amber: #e5a50a;
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; background: #fff; color: #000; padding: 8px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 8px; }
.preview-bar { background: #fde68a; color: #3d2e00; text-align: center; font-size: 14px; font-weight: 700; padding: 8px 16px; }

/* ---- Masthead ---- */
.masthead { background: var(--navy); color: #fff; position: relative; z-index: 10; }
.mast-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 12px; }
.mast-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; min-width: 0; }
.mast-brand img { width: 52px; height: 52px; border-radius: 50%; background: #fff; padding: 3px; flex: none; }
.mast-words { display: flex; flex-direction: column; min-width: 0; }
.mast-name { font-size: 28px; line-height: 1.05; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.mast-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { flex: none; width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--navy-line); background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.menu-btn:hover { background: rgba(255, 255, 255, 0.08); }
.bars, .bars::before, .bars::after { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; position: relative; transition: transform 0.2s, background 0.2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -7px; }
.bars::after { top: 7px; }
.menu-btn[aria-expanded="true"] .bars { background: transparent; }
.menu-btn[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }
.mast-rule { height: 1px; background: var(--navy-line); }
.mast-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 4px; padding-bottom: 4px; }
.mast-nav::-webkit-scrollbar { display: none; }
.mast-nav a { flex: none; color: #fff; text-decoration: none; font-weight: 800; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; padding: 12px 12px; border-bottom: 3px solid transparent; }
.mast-nav a:first-child { padding-left: 0; }
.mast-nav a:hover { color: var(--sky); }
.mast-nav a[aria-current="page"] { border-bottom-color: var(--red); }
.menu-panel { background: var(--navy-deep); border-top: 1px solid var(--navy-line); }
.menu-panel[hidden] { display: none; }
.menu-inner { display: grid; gap: 24px; padding-top: 20px; padding-bottom: 24px; }
.menu-head { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky); }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list a { display: block; padding: 8px 0; color: #fff; text-decoration: none; font-weight: 600; }
.menu-list a:hover { color: var(--sky); }
.menu-search, .search { display: flex; gap: 8px; margin-top: 16px; }
.menu-search input, .search input { flex: 1; min-width: 0; height: 46px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: #000; padding: 0 14px; font: inherit; }
.menu-search button, .search button { height: 46px; border: 0; border-radius: 10px; background: var(--red); color: #fff; font: inherit; font-weight: 800; padding: 0 18px; cursor: pointer; }
.menu-search button:hover, .search button:hover { background: var(--red-deep); }
@media (min-width: 760px) {
  .menu-inner { grid-template-columns: 2fr 1fr; }
  .menu-inner .menu-list:first-of-type { columns: 2; }
}
@media (max-width: 380px) {
  .mast-name { font-size: 22px; }
  .mast-tag { font-size: 10px; letter-spacing: 0.1em; }
  .mast-brand img { width: 44px; height: 44px; }
  .mast-nav a { font-size: 13px; padding: 12px 9px; }
}

/* ---- Breaking ---- */
.breaking { background: var(--red); color: #fff; }
.breaking-inner { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.breaking-label { flex: none; background: #fff; color: var(--red); font-weight: 800; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.breaking a { color: #fff; font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.breaking a:hover { text-decoration: underline; }

/* ---- Page frame ---- */
main { background: var(--black); min-height: 60vh; }
.page { padding-top: 24px; padding-bottom: 56px; }
.with-side { display: grid; gap: 40px; }
@media (min-width: 1000px) { .with-side { grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; } }
.col { min-width: 0; }
.section-label { margin: 0 0 18px; font-size: inherit; }
.label-red { display: inline-block; background: var(--red); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; }
.page-head { margin-bottom: 20px; }
.page-head h1 { color: var(--ink); font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 14px 0 8px; font-weight: 800; }
.page-head p { color: var(--muted); margin: 0; max-width: 60ch; }
.sub-head { color: var(--ink); font-size: 20px; margin: 32px 0 14px; }
.btn { display: inline-block; text-decoration: none; font-weight: 800; color: #fff; border: 1px solid #3a3f46; background: var(--panel-2); padding: 11px 18px; border-radius: 999px; font-size: 15px; }
.btn:hover { border-color: #fff; }
.btn-red { background: var(--red); border-color: var(--red); }
.btn-red:hover { background: var(--red-deep); border-color: var(--red-deep); }
.more { margin: 28px 0 0; }
.dot { margin: 0 8px; color: var(--faint); }

/* ---- Stories ---- */
.meta { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.meta a { color: var(--muted); }
.meta-cat { color: var(--sky) !important; font-weight: 700; text-decoration: none; }
.meta-cat:hover { text-decoration: underline; }
.flags:empty { display: none; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.flag-breaking { background: var(--red); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.verify { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.verify-official { color: #c9f5da; background: rgba(34, 165, 89, 0.18); border-color: rgba(34, 165, 89, 0.6); }
.verify-provisional { color: #ffe3a3; background: rgba(229, 165, 10, 0.16); border-color: rgba(229, 165, 10, 0.6); }
.verify-unverified { color: #d6d9de; background: transparent; border-color: #6b7280; border-style: dashed; }

.lead { margin-bottom: 36px; }
.lead-photo, .story-photo { position: relative; overflow: hidden; background: var(--panel-2); aspect-ratio: 16 / 9; }
.lead-photo { border-radius: var(--radius); }
.story-photo { border-radius: var(--radius-sm); }
.lead-photo img, .story-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.lead-photo-link:hover img, .story-photo-link:hover img { transform: scale(1.03); }
.photo-none { display: grid; place-items: center; background: linear-gradient(135deg, var(--navy), #000); }
.photo-none img { width: 72px !important; height: 72px !important; opacity: 0.35; border-radius: 50%; background: #fff; padding: 4px; }
.lead-text { padding-top: 16px; }
.lead-title { margin: 0; font-size: clamp(24px, 4.4vw, 38px); line-height: 1.15; font-weight: 800; }
.lead-title a, .story-title a { text-decoration: none; color: var(--ink); }
.lead-title a:hover, .story-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lead-summary { color: var(--text); font-size: 17px; margin: 12px 0 0; }
.feed { display: grid; gap: 28px; }
.story { display: grid; gap: 12px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.feed .story:last-child { border-bottom: 0; padding-bottom: 0; }
.story-title { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 800; }
.story-summary { color: var(--muted); margin: 8px 0 0; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 700px) {
  .story { grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
}
.new-stories { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--navy); border: 1px solid var(--navy-line); color: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 18px; font-weight: 700; }
.new-stories button { border: 0; background: var(--red); color: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 800; cursor: pointer; }

/* ---- Lists ---- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chips a { flex: none; text-decoration: none; color: var(--text); border: 1px solid #3a3f46; border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 700; }
.chips a:hover { border-color: #fff; }
.chips a[aria-current="page"] { background: #fff; color: #000; border-color: #fff; }
.search { margin: 14px 0 26px; max-width: 560px; }
.found { color: var(--muted); margin: 0 0 18px; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 36px; }
.pager a:last-child { justify-self: end; }
.pager-at { color: var(--muted); font-size: 14px; }
.empty { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; text-align: center; }
.empty h1, .empty h2 { color: var(--ink); margin: 0 0 8px; font-size: 22px; }
.empty p { color: var(--muted); margin: 0 0 8px; }

/* ---- Side column ---- */
.side { display: grid; gap: 20px; align-content: start; }
.side-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.side-title { margin: 0 0 12px; color: var(--ink); font-size: 14px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.side-topics { list-style: none; margin: 0; padding: 0; }
.side-topics a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); font-weight: 600; }
.side-topics li:last-child a { border-bottom: 0; }
.side-topics a:hover, .side-topics a[aria-current="page"] { color: var(--sky); }
.side-more { display: inline-block; margin-top: 12px; color: var(--sky); font-weight: 700; text-decoration: none; font-size: 14px; }
.mini { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.mini:last-child { border-bottom: 0; }
.mini b { display: block; color: var(--ink); line-height: 1.3; }
.mini span { font-size: 13px; color: var(--muted); }
.mini .live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 6px; vertical-align: 1px; }
.note { color: var(--muted); margin: 0; font-size: 14px; }

/* ---- Loading placeholders ---- */
.skel { background: linear-gradient(90deg, var(--panel-2) 25%, #22252a 50%, var(--panel-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
.skel-row { height: 46px; margin-bottom: 10px; }
.skel-card { height: 220px; border-radius: var(--radius); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } .lead-photo img, .story-photo img { transition: none; } }

/* ---- Article ---- */
.crumbs { display: flex; gap: 8px; font-size: 14px; margin-bottom: 14px; color: var(--faint); }
.crumbs a { color: var(--sky); text-decoration: none; font-weight: 700; }
.article-title { color: var(--ink); font-size: clamp(28px, 5vw, 44px); line-height: 1.12; margin: 0; font-weight: 800; }
.article-summary { font-size: 19px; color: var(--text); margin: 14px 0 0; }
.verify-note { margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px solid; font-size: 15px; }
.verify-note-official { border-color: rgba(34, 165, 89, 0.6); background: rgba(34, 165, 89, 0.12); }
.verify-note-provisional { border-color: rgba(229, 165, 10, 0.6); background: rgba(229, 165, 10, 0.1); }
.verify-note-unverified { border-color: #6b7280; border-style: dashed; }
.article-photo { margin: 24px 0 0; }
.article-photo img { width: 100%; height: auto; aspect-ratio: auto; border-radius: var(--radius); background: var(--panel-2); }
.article-photo figcaption, .gallery figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.article-body { margin-top: 24px; font-size: 18px; line-height: 1.75; color: var(--text); max-width: 70ch; }
.article-body p { margin: 0 0 1.1em; }
.gallery h2, .share h2, .related h2 { color: var(--ink); font-size: 18px; margin: 32px 0 12px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.gallery-grid img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: var(--panel-2); }
.source-link { margin: 24px 0 0; color: var(--muted); }
.source-link a { color: var(--sky); font-weight: 700; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn { display: inline-block; text-decoration: none; color: #fff; background: var(--panel-2); border: 1px solid #3a3f46; border-radius: 999px; padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.share-btn:hover { border-color: #fff; }
.share-btn[hidden] { display: none; }
.related .section-label { margin-top: 40px; }

/* ---- Elections ---- */
.elections-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.elec { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.elec-top { display: flex; gap: 12px; align-items: center; }
.elec-top h3 { margin: 0; color: var(--ink); font-size: 18px; line-height: 1.25; }
.elec-org { color: var(--muted); font-size: 14px; }
.elec-logo { flex: none; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.elec-logo img { width: 100%; height: 100%; object-fit: contain; }
.elec-logo.mono { background: var(--navy); color: #fff; font-weight: 800; }
.badge { align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); color: var(--text); border: 1px solid #3a3f46; }
.badge.open { background: var(--red); border-color: var(--red); color: #fff; }
.badge.upcoming { background: rgba(229, 165, 10, 0.16); border-color: rgba(229, 165, 10, 0.6); color: #ffe3a3; }
.reg-btn { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; background: var(--navy); border: 1px solid var(--navy-line); border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.reg-btn:hover { border-color: #fff; }
.reg-dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2); flex: none; }
.reg-open { margin-left: auto; color: var(--sky); font-size: 14px; }
.meter { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--red); }
.elec-stats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 14px; }
.elec-stats b { color: var(--ink); }
.btn-link { align-self: flex-start; }
.topic-band { margin-top: 48px; }
.topic-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.topic-tiles a { display: block; height: 100%; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.topic-tiles a:hover { border-color: #fff; }
.topic-tiles b { display: block; color: var(--ink); margin-bottom: 4px; }
.topic-tiles span { color: var(--muted); font-size: 14px; }

/* ---- Results ---- */
.legend { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; font-size: 14px; color: var(--muted); }
.legend .verify { justify-self: start; }
.result-row { display: grid; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.result-row h3 { margin: 0; color: var(--ink); font-size: 18px; }
.result-row p { margin: 0; color: var(--muted); font-size: 14px; }
@media (min-width: 700px) { .result-row { grid-template-columns: 1fr auto; align-items: center; } }

/* ---- About ---- */
.prose { max-width: 820px; }
.prose section { margin-top: 32px; }
.prose h2 { color: var(--ink); font-size: 22px; margin: 0 0 10px; }
.prose p, .prose li { color: var(--text); }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }

/* ---- Footer ---- */
.footer { background: var(--navy); color: #fff; border-top: 4px solid var(--red); }
.foot-inner { display: grid; gap: 18px; padding-top: 32px; padding-bottom: 32px; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand img { border-radius: 50%; background: #fff; padding: 2px; }
.foot-name { margin: 0; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.foot-tag { margin: 0; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sky); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a, .foot-contact a { color: #fff; font-weight: 700; text-decoration: none; }
.foot-links a:hover, .foot-contact a:hover { text-decoration: underline; }
.foot-contact { margin: 0; color: var(--sky); }
.foot-copy { margin: 0; color: rgba(255, 255, 255, 0.7); font-size: 13px; }
