@import "https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500&family=Outfit:wght@400;600;800&display=swap";

@layer components;
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */

/* =========================================
   1. TAILWIND LAYERS & PROPERTIES
   ========================================= */
@layer properties {
  @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
    *, :before, :after, ::backdrop {
      --tw-rotate-x: initial; --tw-rotate-y: initial; --tw-rotate-z: initial;
      --tw-skew-x: initial; --tw-skew-y: initial; --tw-blur: initial;
      --tw-brightness: initial; --tw-contrast: initial; --tw-grayscale: initial;
      --tw-hue-rotate: initial; --tw-invert: initial; --tw-opacity: initial;
      --tw-saturate: initial; --tw-sepia: initial; --tw-drop-shadow: initial;
      --tw-drop-shadow-color: initial; --tw-drop-shadow-alpha: 100%; --tw-drop-shadow-size: initial;
    }
  }
}

@layer theme {
  :root, :host {
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --spacing: .25rem;
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
  }
}

@layer base {
  *, :after, :before, ::backdrop { box-sizing: border-box; border: 0 solid; margin: 0; padding: 0; }
  ::file-selector-button { box-sizing: border-box; border: 0 solid; margin: 0; padding: 0; }
  html, :host { -webkit-text-size-adjust: 100%; tab-size: 4; line-height: 1.5; font-family: var(--default-font-family); font-feature-settings: normal; font-variation-settings: normal; -webkit-tap-highlight-color: transparent; }
  hr { height: 0; color: inherit; border-top-width: 1px; }
  abbr:where([title]) { text-decoration: underline dotted; }
  h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
  a { color: inherit; text-decoration: inherit; }
  b, strong { font-weight: bolder; }
  code, kbd, samp, pre { font-family: var(--default-mono-font-family); font-size: 1em; }
  small { font-size: 80%; }
  sub, sup { vertical-align: baseline; font-size: 75%; line-height: 0; position: relative; }
  sub { bottom: -.25em; }
  sup { top: -.5em; }
  table { text-indent: 0; border-color: inherit; border-collapse: collapse; }
  :-moz-focusring { outline: auto; }
  progress { vertical-align: baseline; }
  summary { display: list-item; }
  ol, ul, menu { list-style: none; }
  img, svg, video, canvas, audio, iframe, embed, object { vertical-align: middle; display: block; }
  img, video { max-width: 100%; height: auto; }
  button, input, select, optgroup, textarea { font: inherit; letter-spacing: inherit; color: inherit; opacity: 1; background-color: #0000; border-radius: 0; }
  ::file-selector-button { font: inherit; letter-spacing: inherit; color: inherit; opacity: 1; background-color: #0000; border-radius: 0; margin-inline-end: 4px; appearance: button; }
  :where(select:is([multiple], [size])) optgroup { font-weight: bolder; }
  :where(select:is([multiple], [size])) optgroup option { padding-inline-start: 20px; }
  ::placeholder { opacity: 1; color: currentColor; }
  textarea { resize: vertical; }
  ::-webkit-search-decoration { -webkit-appearance: none; }
  ::-webkit-date-and-time-value { min-height: 1lh; text-align: inherit; }
  ::-webkit-datetime-edit, ::-webkit-datetime-edit-fields-wrapper, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field { padding-block: 0; }
  ::-webkit-datetime-edit { display: inline-flex; }
  ::-webkit-calendar-picker-indicator { line-height: 1; }
  :-moz-ui-invalid { box-shadow: none; }
  button, input:where([type="button"], [type="reset"], [type="submit"]) { appearance: button; }
  ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; }
  [hidden]:where(:not([hidden="until-found"])) { display: none !important; }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { color: var(--ink); background: var(--white); margin: 0; font-family: Outfit, sans-serif; font-size: 18px; line-height: 1.55; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button, select { cursor: pointer; }
  h1, h2, h3, p { margin-top: 0; }
  h1, h2, h3 { line-height: 1; }
  ::selection { color: var(--white); background: var(--green); }
}

@layer utilities {
  .visible { visibility: visible; }
  .fixed { position: fixed; }
  .start { inset-inline-start: var(--spacing); }
  .grid { display: grid; }
  .hidden { display: none; }
  .inline { display: inline; }
  .transform { transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, ); }
  .filter { filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, ); }
}

/* =========================================
   2. ROOT VARIABLES & GLOBAL LAYOUT
   ========================================= */
:root {
  --ink: #231f20;
  --green: #006838;
  --red: #be1e2d;
  --white: #fff;
  --paper: #f5f2ec;
  --green-tint: #e6f0eb;
  --red-tint: #f8e6e8;
  --line: 2px solid var(--ink);
}

.app { min-width: 100%; min-height: 100vh; }
.wrap { width: min(1152px, 100% - 96px); margin: 0 auto; }

.tricolour { grid-template-columns: repeat(3, 1fr); height: 6px; display: grid; }
.tricolour i:first-child { background: var(--ink); }
.tricolour i:nth-child(2) { background: var(--red); }
.tricolour i:nth-child(3) { background: var(--green); }

.site-header { background: var(--white); border-bottom: var(--line); z-index: 20; height: 106px; position: relative; }
.header-inner { justify-content: space-between; align-items: center; width: min(1152px, 100% - 96px); height: 100px; margin: 0 auto; display: flex; }

.logo-button { background: none; border: 0; width: 190px; height: 70px; padding: 0; overflow: hidden; flex-shrink: 0; }
.logo-button img { object-fit: contain; width: 100%; height: 100%; display: block; }

/* Unified Navigation Styles (Buttons and Links) */
nav, .main-nav { align-items: center; gap: 32px; height: 100%; display: flex; }
nav button, nav a, .main-nav button, .main-nav a {
  text-transform: uppercase;
  letter-spacing: .1em;
  background: none;
  border: 0;
  align-self: stretch;
  padding: 0 2px;
  font-size: 14px;
  font-weight: 600;
  position: relative;
  white-space: nowrap;
  cursor: pointer;
  color: var(--ink);
  transition: color 0.2s;
  text-decoration: none;
  display: flex;
  align-items: center;
}
nav button:after, nav a:after, .main-nav button:after, .main-nav a:after {
  content: "";
  background: none;
  height: 4px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  transition: background 0.3s;
}
nav button.active:after, nav a.active:after, nav button:hover:after, nav a:hover:after,
.main-nav button.active:after, .main-nav a.active:after, .main-nav button:hover:after, .main-nav a:hover:after {
  background: var(--red);
}

.eyebrow { text-transform: uppercase; letter-spacing: .1em; font: 500 13px / 1.2 "IBM Plex Mono", monospace; }
.red { color: var(--red); }

.button {
  border: var(--line); letter-spacing: .08em; text-transform: uppercase; border-radius: 4px;
  justify-content: center; align-items: center; gap: 10px; min-height: 48px; padding: 12px 20px;
  font-size: 13px; font-weight: 600; line-height: 1; transition: transform .15s, background .15s; display: inline-flex;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--white); background: var(--ink); }
.button-secondary { color: var(--ink); background: var(--white); }
.button-green { color: var(--white); background: var(--green); border-color: var(--green); }
.button-red { color: var(--white); background: var(--red); border-color: var(--red); }
.icon { flex: none; }

/* =========================================
   3. HOME PAGE STYLES
   ========================================= */
.hero { background: var(--paper); border-bottom: var(--line); min-height: 620px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-image: url('./img/gotha-tena.jpg'); background-size: cover; background-position: center;
  background-repeat: no-repeat; opacity: 0.06; z-index: 0;
}
.hero-grid { z-index: 2; grid-template-columns: 7fr 5fr; min-height: 620px; display: grid; position: relative; }
.hero-copy { padding: 76px 30px 64px 0; }
.hero h1 { letter-spacing: -.055em; text-transform: uppercase; margin: 14px 0 24px; font-size: clamp(48px, 7.7vw, 104px); font-weight: 800; line-height: .9; }
.hero-copy > p { max-width: 650px; font-size: 20px; line-height: 1.5; }
.hero-actions { align-items: center; gap: 24px; margin-top: 36px; display: flex; }
.device-note { text-transform: uppercase; max-width: 130px; font: 500 12px / 1.3 "IBM Plex Mono", monospace; }
.hero-logo { border-left: 2px solid #231f202e; flex-direction: column; justify-content: center; padding-left: 40px; display: flex; }
.hero-logo img { width: 100%; max-width: 300px; display: block; }

.cube-pattern { opacity: .09; pointer-events: none; position: absolute; inset: 0; }
.cube { width: 70px; height: 80px; position: absolute; transform: rotate(30deg); }
.cube i { border: 2px solid var(--ink); width: 48px; height: 48px; position: absolute; transform: skewY(-30deg); }
.cube i:nth-child(2) { left: 42px; transform: skewY(30deg); }
.cube i:nth-child(3) { top: -37px; left: 21px; transform: rotate(60deg) skewY(30deg); }
.cube-0 { top: 10%; left: 3%; } .cube-1 { top: 75%; left: 18%; } .cube-2 { top: 12%; left: 36%; }
.cube-3 { top: 68%; left: 52%; } .cube-4 { top: 14%; left: 70%; } .cube-5 { top: 70%; left: 90%; }
.cube-6 { top: 48%; left: 8%; } .cube-7 { top: 43%; left: 28%; } .cube-8 { top: 38%; left: 62%; }
.cube-9 { top: 40%; left: 82%; } .cube-10 { top: 88%; left: 45%; } .cube-11 { top: 8%; left: 94%; }

.stats { color: var(--white); background: var(--ink); padding: 40px 0; }
.stats-grid { grid-template-columns: repeat(3, 1fr); display: grid; }
.stats-grid > div { border-left: 1px solid #ffffff59; padding: 0 32px; }
.stats-grid > div:first-child { border-left: 0; padding-left: 0; }
.stats strong { letter-spacing: -.06em; font: 500 60px / 1 "IBM Plex Mono", monospace; display: block; }
.stats span { text-transform: uppercase; letter-spacing: .08em; margin-top: 12px; font-size: 14px; display: block; }
.stats em { color: #7cdbab; font: 500 12px / 1 "IBM Plex Mono", monospace; }
.stats .red-text { color: #ff929d; }

.section { padding: 96px 0 88px; }
.section-heading { justify-content: space-between; align-items: end; margin-bottom: 40px; display: flex; }
.section-heading h2, .about-data h2 { text-transform: uppercase; letter-spacing: -.04em; margin: 10px 0 0; font-size: clamp(36px, 5vw, 58px); }
.section-heading > p { max-width: 310px; margin: 0; font-size: 18px; }

.tool-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; display: grid; }
.tool-card { border: var(--line); background: var(--white); flex-direction: column; min-height: 420px; padding: 28px; display: flex; position: relative; }
.tool-card:before { content: ""; background: var(--ink); height: 6px; position: absolute; top: -2px; left: -2px; right: -2px; }
.tool-live:before { background: var(--green); }
.tool-soon { color: #231f20ad; border-style: dashed; }
.card-top { justify-content: space-between; display: flex; }
.big-number { font: 500 52px / 1 "IBM Plex Mono", monospace; }
.tool-card h3 { text-transform: uppercase; margin: 56px 0 16px; font-size: 28px; line-height: 1.08; }
.tool-card p { font-size: 17px; }
.card-bottom { border-top: 1px solid var(--ink); justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 24px; display: flex; }
.card-bottom button { text-transform: uppercase; background: none; border: 0; padding: 0; font-size: 13px; font-weight: 600; }

.status-tag { border: 1px solid var(--ink); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; border-radius: 3px; padding: 6px 8px; font: 500 10px / 1 "IBM Plex Mono", monospace; display: inline-block; }
.status-live { color: var(--white); background: var(--green); border-color: var(--green); }
.status-soon { border-style: dashed; }
.status-development { border-style: dashed; color: var(--ink); }

.principles { padding: 0 0 96px; }
.principles-grid { border-top: 4px solid var(--ink); grid-template-columns: repeat(4, 1fr); display: grid; }
.principles article { padding: 32px 24px 0 0; }
.principles h3 { text-transform: uppercase; margin: 24px 0 8px; font-size: 19px; }
.principles p { max-width: 210px; font-size: 15px; }

.independence { background: var(--green); color: var(--white); padding: 48px 0; }
.independence-inner { grid-template-columns: 70px 1fr 1.3fr; align-items: center; gap: 24px; display: grid; }
.independence h2 { text-transform: uppercase; margin: 8px 0 0; font-size: 40px; }
.independence p { margin: 0; }

/* =========================================
   4. MAP PAGE STYLES
   ========================================= */
.page-title { border-bottom: var(--line); padding: 78px 0 56px; }
.page-title h1 { letter-spacing: -.05em; text-transform: uppercase; margin: 14px 0 0; font-size: clamp(42px, 6vw, 72px); }
.page-title p { max-width: 620px; margin: 18px 0 0; font-size: 20px; }

.map-page { grid-template-columns: 340px 1fr; height: calc(100vh - 106px); min-height: 680px; display: grid; }
.filter-panel { border-right: var(--line); padding: 36px 28px; overflow-y: auto; }
.filter-panel h1 { text-transform: uppercase; margin: 10px 0 12px; font-size: 38px; }
.panel-intro { font-size: 16px; }

.field { margin-top: 20px; display: block; }
.field > span { text-transform: uppercase; letter-spacing: .08em; margin-bottom: 7px; font: 500 11px / 1.2 "IBM Plex Mono", monospace; display: block; }
.field input, .field select, .field textarea { border: var(--line); background: var(--white); border-radius: 4px; outline: none; width: 100%; min-height: 48px; padding: 10px 12px; }
.field textarea { resize: vertical; min-height: 112px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--green-tint); border-color: var(--green); }
.field small { color: var(--red); margin-top: 6px; font: 500 11px / 1.4 "IBM Plex Mono", monospace; display: block; }
.has-error input { border-color: var(--red); background: var(--red-tint); }

.panel-buttons { gap: 10px; margin-top: 28px; display: grid; }
.legend { border-top: var(--line); grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; padding-top: 24px; font-size: 14px; display: grid; }
.legend .eyebrow { grid-column: 1 / -1; }

.status-dot, .map-dot { border: 3px solid var(--white); outline: 1px solid var(--ink); vertical-align: -2px; border-radius: 50%; width: 14px; height: 14px; margin-right: 5px; display: inline-block; }
.verified { background: var(--green); }
.unverified { background: var(--red); }

.map-counts { border-top: var(--line); grid-template-columns: 1fr 1fr; margin-top: 26px; padding-top: 20px; display: grid; }
.map-counts span, .map-counts strong { display: block; }
.map-counts span { text-transform: uppercase; font: 500 11px / 1.2 "IBM Plex Mono", monospace; }
.map-counts strong { margin-top: 6px; font: 500 24px / 1 "IBM Plex Mono", monospace; }

.map-canvas { background: var(--green-tint); background-image: linear-gradient(#231f2014 1px, #0000 1px), linear-gradient(90deg, #231f2014 1px, #0000 1px); background-size: 32px 32px; position: relative; overflow: hidden; }
.map-controls { z-index: 3; justify-content: space-between; align-items: center; display: flex; position: absolute; top: 24px; left: 24px; right: 24px; }
.map-controls > span, .map-note { border: var(--line); background: var(--white); text-transform: uppercase; padding: 10px 12px; font: 500 11px / 1 "IBM Plex Mono", monospace; }

.toggle { border: var(--line); background: var(--white); text-transform: uppercase; align-items: center; gap: 10px; padding: 8px 12px; font-size: 13px; display: flex; }
.toggle input { opacity: 0; position: absolute; }
.toggle i { border: 2px solid var(--ink); width: 36px; height: 20px; position: relative; }
.toggle i:after { content: ""; background: var(--ink); width: 10px; height: 10px; transition: left .2s; position: absolute; top: 3px; left: 3px; }
.toggle input:checked + i:after { background: var(--green); left: 19px; }

.kenya-shape { background: var(--paper); border: 3px solid var(--ink); clip-path: polygon(38% 0, 65% 7%, 75% 22%, 91% 32%, 87% 48%, 100% 68%, 80% 81%, 67% 100%, 45% 90%, 30% 75%, 12% 66%, 0 48%, 11% 30%, 20% 9%); width: 56%; height: 76%; position: absolute; top: 13%; left: 22%; }
.county-lines { border: 1px solid #231f2059; width: 90%; height: 30%; position: absolute; top: 28%; left: 2%; transform: rotate(16deg); }
.lines-b { top: 42%; transform: rotate(-28deg); }
.lines-c { top: 55%; transform: rotate(65deg); }

.map-dot { z-index: 2; width: 18px; height: 18px; margin: 0; position: absolute; }
.map-dot:hover { transform: scale(1.35); }
.map-label { text-transform: uppercase; background: #fffc; padding: 3px; font: 500 11px / 1 "IBM Plex Mono", monospace; position: absolute; }
.label-a { top: 18%; left: 37%; }
.label-b { top: 66%; left: 55%; }
.label-c { top: 84%; left: 65%; }
.map-note { text-transform: none; flex-direction: column; gap: 5px; display: flex; position: absolute; bottom: 24px; left: 24px; }
.map-note span { color: #231f20a6; }

/* =========================================
   5. VERIFY, RESOURCES & LEGAL PAGE STYLES
   ========================================= */
.verify-layout { grid-template-columns: 8fr 4fr; align-items: start; gap: 32px; padding: 56px 0 96px; display: grid; }
.steps { gap: 20px; display: grid; }
.step-card { border: var(--line); grid-template-columns: 48px 56px 1fr; gap: 20px; padding: 28px; display: grid; position: relative; }
.step-number { color: var(--red); font: 500 28px / 1 "IBM Plex Mono", monospace; }
.step-content h2 { text-transform: uppercase; margin: 2px 0 24px; font-size: 30px; }
.two-fields { grid-template-columns: 1fr 1fr; gap: 16px; display: grid; }
.input-note, .privacy-note { margin-top: 12px; font: 500 11px / 1.5 "IBM Plex Mono", monospace; }
.privacy-note { align-items: center; gap: 8px; display: flex; }

.dropzone { border: 2px dashed var(--ink); background: var(--paper); text-align: center; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; min-height: 180px; display: flex; position: relative; }
.dropzone strong { text-transform: uppercase; margin-top: 10px; }
.dropzone span { font-size: 14px; }
.dropzone input { opacity: 0; cursor: pointer; position: absolute; inset: 0; }

.submit-guide { gap: 20px; display: grid; position: sticky; top: 24px; }
.guide-dark { color: var(--white); background: var(--ink); padding: 32px; }
.guide-dark h2 { text-transform: uppercase; margin: 12px 0 32px; font-size: 32px; }
.guide-step { border-top: 1px solid #ffffff4d; grid-template-columns: 42px 1fr; padding: 18px 0; font-size: 15px; display: grid; }
.guide-step b { color: #7cdbab; font: 500 13px / 1.5 "IBM Plex Mono", monospace; }

.confirmation { background: var(--green-tint); border: 2px solid var(--green); opacity: .65; padding: 28px; }
.confirmation.is-visible { opacity: 1; outline: 4px solid var(--green-tint); }
.confirmation h2 { text-transform: uppercase; margin: 8px 0 12px; font-size: 28px; }
.confirmation p { margin: 0; font-size: 15px; }

.ballot-slip { border: 3px solid var(--ink); background: var(--white); width: 68px; height: 74px; margin-bottom: 20px; position: relative; transform: skewY(-7deg); }
.ballot-slip span { border-top: 2px solid var(--ink); position: absolute; top: 18px; left: 10px; right: 10px; }
.ballot-slip .icon { color: var(--green); background: var(--white); position: absolute; bottom: -8px; right: -14px; }

.resource-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 56px 0 80px; display: grid; }
.resource-card { border: var(--line); flex-direction: column; min-height: 400px; padding: 28px; display: flex; }
.resource-card .eyebrow { margin-top: 44px; }
.resource-card h2 { text-transform: uppercase; margin: 12px 0 16px; font-size: 30px; }
.resource-card p { font-size: 16px; }
.resource-card .button { align-self: start; margin-top: auto; }

.about-data { background: var(--paper); border: var(--line); margin-bottom: 64px; padding: 56px; }
.coverage-number { text-align: right; font: 500 44px / 1 "IBM Plex Mono", monospace; }
.coverage-number span { text-transform: uppercase; margin-top: 8px; font-size: 11px; display: block; }
.progress { border: var(--line); grid-template-columns: 62fr 38fr; height: 40px; margin-bottom: 40px; display: grid; }
.progress i:first-child { background: var(--green); border-right: var(--line); }
.progress i:last-child { background: var(--red); }

.data-columns { grid-template-columns: repeat(3, 1fr); gap: 32px; display: grid; }
.data-columns article { border-top: var(--line); padding-top: 20px; }
.data-columns span { color: var(--red); font: 500 13px / 1 "IBM Plex Mono", monospace; }
.data-columns h3 { text-transform: uppercase; margin: 16px 0 10px; }
.data-columns p { margin: 0; font-size: 15px; }

.impartiality { border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); grid-template-columns: 64px 1fr 1.4fr; align-items: center; gap: 24px; margin-bottom: 96px; padding: 32px 0; display: grid; }
.impartiality h2 { text-transform: uppercase; margin: 8px 0 0; font-size: 30px; }
.impartiality p { margin: 0; font-size: 16px; }

.legal-layout { grid-template-columns: 3fr 9fr; align-items: start; gap: 64px; padding: 56px 0 112px; display: grid; }
.legal-nav { border-top: 4px solid var(--ink); position: sticky; top: 24px; }
.legal-nav .eyebrow { padding: 18px 0; }
.legal-nav a { color: inherit; border-top: 1px solid #231f2040; grid-template-columns: 35px 1fr; padding: 12px 0; font: 500 12px / 1.4 "IBM Plex Mono", monospace; text-decoration: none; display: grid; }
.legal-nav a:hover span { color: var(--red); }
.legal-copy { max-width: 720px; }
.legal-copy section { border-bottom: var(--line); margin-bottom: 56px; padding: 0 0 56px; scroll-margin-top: 30px; }
.legal-copy h2 { text-transform: uppercase; margin: 12px 0 20px; font-size: 40px; }
.legal-copy p { font-size: 17px; line-height: 1.65; }

.licence-grid { grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; display: grid; }
.licence-grid > div { border: var(--line); padding: 22px; }
.licence-grid span, .licence-grid strong { display: block; }
.licence-grid span { text-transform: uppercase; font: 500 11px / 1.3 "IBM Plex Mono", monospace; }
.licence-grid strong { margin: 10px 0 18px; font-size: 22px; }
.licence-grid p { margin: 0; font-size: 14px; }

blockquote { border-left: 6px solid var(--red); margin: 28px 0 0; padding: 10px 0 10px 24px; font-size: 24px; font-weight: 600; line-height: 1.45; }
.legal-updated { text-transform: uppercase; margin-top: 32px; font: 500 12px / 1.5 "IBM Plex Mono", monospace !important; }

/* =========================================
   6. FOOTER & GLOBAL TOOLTIPS
   ========================================= */
footer { color: var(--white); background: var(--ink); padding: 48px 0; }
.footer-inner { justify-content: space-between; align-items: end; gap: 32px; width: min(1152px, 100% - 96px); margin: 0 auto; display: flex; }
.footer-brand { max-width: 430px; }
footer img { width: 260px; margin: 0 0 24px; display: block; }
.footer-tagline { text-transform: uppercase; font-size: 28px; font-weight: 800; }
footer p { margin: 8px 0 0; font-size: 13px; }
.copyright { text-align: right; }

.county-tooltip, .constituency-tooltip { background: var(--ink); color: var(--white); border: none; border-radius: 4px; padding: 6px 12px; font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.constituency-tooltip { background: var(--white); color: var(--ink); border: 1px solid var(--green); text-align: center; }
.constituency-tooltip small { color: #666; font-size: 10px; text-transform: none; }
.county-tooltip::before { border-top-color: var(--ink); }
.constituency-tooltip::before { border-top-color: var(--green); }

/* Live Search Dropdown */
.search-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border: 1px solid #ddd; border-top: none; border-radius: 0 0 4px 4px; max-height: 250px; overflow-y: auto; z-index: 1000; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.search-dropdown-item { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: background 0.2s; }
.search-dropdown-item:hover { background: var(--paper); }
.search-dropdown-item:last-child { border-bottom: none; }
.search-dropdown-item strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.search-dropdown-item small { color: #666; font-size: 12px; font-family: "IBM Plex Mono", monospace; }

/* =========================================
   7. TAILWIND @PROPERTY DECLARATIONS
   ========================================= */
@property --tw-rotate-x { syntax: "*"; inherits: false }
@property --tw-rotate-y { syntax: "*"; inherits: false }
@property --tw-rotate-z { syntax: "*"; inherits: false }
@property --tw-skew-x { syntax: "*"; inherits: false }
@property --tw-skew-y { syntax: "*"; inherits: false }
@property --tw-blur { syntax: "*"; inherits: false }
@property --tw-brightness { syntax: "*"; inherits: false }
@property --tw-contrast { syntax: "*"; inherits: false }
@property --tw-grayscale { syntax: "*"; inherits: false }
@property --tw-hue-rotate { syntax: "*"; inherits: false }
@property --tw-invert { syntax: "*"; inherits: false }
@property --tw-opacity { syntax: "*"; inherits: false }
@property --tw-saturate { syntax: "*"; inherits: false }
@property --tw-sepia { syntax: "*"; inherits: false }
@property --tw-drop-shadow { syntax: "*"; inherits: false }
@property --tw-drop-shadow-color { syntax: "*"; inherits: false }
@property --tw-drop-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
@property --tw-drop-shadow-size { syntax: "*"; inherits: false }

/* =========================================
   8. MOBILE & TABLET OPTIMIZATIONS
   ========================================= */
@media (max-width: 1024px) {
  .wrap, .header-inner, .footer-inner { width: calc(100% - 48px); }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { padding: 40px 0; display: flex; flex-direction: column; align-items: center; }
  .hero-copy > p { max-width: 100%; }
  .hero-actions { justify-content: center; flex-direction: column; gap: 16px; }
  .hero-logo { border-left: none; padding-left: 0; margin-top: 20px; justify-content: center; align-items: center; }
  .stats-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .stats-grid > div { border-left: none; border-bottom: 1px solid rgba(255,255,255,0.2); padding: 0 0 24px 0; }
  .stats-grid > div:last-child { border-bottom: none; padding-bottom: 0; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 16px; }
  .section-heading > p { max-width: 100%; }
  .tool-grid, .principles-grid, .resource-grid, .data-columns { grid-template-columns: 1fr; }
  .principles article { text-align: center; padding: 0; }
  .principles .icon { margin: 0 auto 16px auto; }
  .principles p { max-width: 100%; margin: 0 auto; }
  .independence-inner { grid-template-columns: 1fr; text-align: center; gap: 16px; }
  .independence .icon { margin: 0 auto; }
  .map-page { grid-template-columns: 1fr; height: auto; min-height: auto; }
  .filter-panel { border-right: none; border-bottom: var(--line); max-height: 50vh; }
  .verify-layout, .legal-layout { grid-template-columns: 1fr; }
  .submit-guide { position: relative; top: 0; margin-top: 32px; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 24px; }
  .copyright { text-align: center; }
}

@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 16px 0; gap: 16px; }
  nav, .main-nav { width: 100%; overflow-x: auto; justify-content: flex-start; padding-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  nav::-webkit-scrollbar, .main-nav::-webkit-scrollbar { display: none; }
  .hero h1 { font-size: clamp(36px, 10vw, 56px); line-height: 1.1; }
  .section-heading h2, .about-data h2 { font-size: 32px; }
  .tool-card { padding: 20px; min-height: auto; }
  .card-top { flex-direction: column; gap: 16px; }
  .step-card { grid-template-columns: 1fr; text-align: center; }
  .step-number { margin: 0 auto 16px auto; }
  .step-card .icon { margin: 0 auto 16px auto; }
  .two-fields { grid-template-columns: 1fr; }
  .licence-grid { grid-template-columns: 1fr; }
  .map-controls { flex-direction: column; gap: 12px; align-items: flex-start; }
  .kenya-shape { width: 80%; left: 10%; }
  .map-note { bottom: 12px; left: 12px; right: 12px; }
}

@media (max-width: 480px) {
  .wrap, .header-inner, .footer-inner { width: calc(100% - 24px); }
  .hero-copy { padding: 24px 0; }
  .stats strong { font-size: 48px; }
  .button { width: 100%; justify-content: center; }
  .panel-buttons { grid-template-columns: 1fr; }
  .legend { grid-template-columns: 1fr; }
  .map-counts { grid-template-columns: 1fr; gap: 16px; }
}

/* =========================================
   9. RESPONSIVE MENU WITH KENYAN FLAG TWIST
   ========================================= */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 30;
  margin-left: auto;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: var(--ink);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

/* Hamburger Animation to Kenyan Flag "X" */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) { transform: translateY(8.5px) rotate(45deg); background-color: var(--ink); }
.mobile-menu-toggle.active .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); background-color: var(--red); }
.mobile-menu-toggle.active .hamburger-line:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); background-color: var(--green); }

@media (max-width: 768px) {
  .header-inner { gap: 0; }
  .mobile-menu-toggle { display: flex; }
  
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    z-index: 25;
    border-bottom: var(--line);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  }

  .main-nav::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ink) 33.33%, var(--red) 33.33%, var(--red) 66.66%, var(--green) 66.66%);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .main-nav.active {
    height: auto;
    opacity: 1;
    padding: 12px 0 24px 0;
  }

  .main-nav.active::before { opacity: 1; }

  .main-nav button, .main-nav a {
    padding: 16px 24px;
    text-align: left;
    font-size: 16px;
    border-bottom: 1px solid #f0f0f0;
    align-self: stretch;
  }

  .main-nav button:last-child, .main-nav a:last-child { border-bottom: none; }

  .main-nav button:after, .main-nav a:after {
    height: 100%;
    width: 4px;
    left: 0; top: 0; bottom: auto; right: auto;
    background: transparent;
  }

  .main-nav button.active:after, .main-nav a.active:after,
  .main-nav button:hover:after, .main-nav a:hover:after {
    background: linear-gradient(180deg, var(--ink) 33.33%, var(--red) 33.33%, var(--red) 66.66%, var(--green) 66.66%);
  }
  
  .main-nav button:hover, .main-nav a:hover { background-color: var(--paper); }
}


/* =========================================
   FIX: Prevent sticky legal nav from overlapping content on mobile/tablet
   ========================================= */
@media (max-width: 1024px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }
  
  .legal-nav {
    position: relative !important;
    top: auto !important;
    margin-bottom: 40px; /* Adds breathing room before the main content starts */
  }
}