/* =========================================================
   TRANS-NZOIA AHP TRACKER — Global Stylesheet
   Phase 2 Rebuild
   ========================================================= */

/* ---------------------------------------------------------
   1. Font Imports
   --------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

/* ---------------------------------------------------------
   2. CSS Custom Properties
   --------------------------------------------------------- */
:root {
  /* Color System: Forest & Lime (Wise-inspired) */
  --primary-900: #0a1f05;
  --primary-800: #0f2d07;
  --primary-700: #163300;
  --primary-600: #1e4d00;
  --primary-500: #276600;
  --primary-400: #3d8c00;
  --primary-300: #5ab300;
  --primary-200: #7fd63a;
  --primary-100: #c5f09a;
  --primary-50:  #edfbd6;

  /* Lime — hero accents, KPI numbers, hover highlights */
  --lime:        #9fe870;
  --lime-bright: #b8f58f;
  --lime-muted:  #7dc832;
  --lime-dark:   #5a9e1e;

  --accent-600: #b45309;
  --accent-500: #d97706;
  --accent-400: #f59e0b;
  --accent-300: #fcd34d;
  --accent-100: #fef3c7;
  --accent-50:  #fffbeb;

  --neutral-950: #050a02;
  --neutral-900: #0f1a08;
  --neutral-800: #1c2e12;
  --neutral-700: #2e4a1e;
  --neutral-600: #4a6b36;
  --neutral-500: #6b8f58;
  --neutral-400: #96b482;
  --neutral-300: #c2d6b0;
  --neutral-200: #ddeece;
  --neutral-100: #eef7e6;
  --neutral-50:  #f6faf2;
  --white:       #ffffff;

  /* Semantic */
  --success: #22c55e;
  --warning: #f59e0b;
  --info:    #0ea5e9;
  --error:   #ef4444;
  --ongoing: #3b82f6;

  /* Dark surfaces */
  --ink:          #0a1205;
  --surface-dark: #111f09;
  --bg-dark:      #0f1a08;
  --text-dark:    #eef7e6;

  /* Typography */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --text-hero:   clamp(2.75rem, 6vw + 1rem, 4.75rem);
  --text-h1:     clamp(2.25rem, 3.5vw + 0.75rem, 3.25rem);
  --text-h2:     clamp(1.75rem, 2.5vw + 0.5rem, 2.5rem);
  --text-h3:     clamp(1.375rem, 1.5vw + 0.5rem, 1.75rem);
  --text-h4:     clamp(1.125rem, 0.5vw + 1rem, 1.3rem);
  --text-h5:     1.0625rem;
  --text-body:   1rem;
  --text-lead:   1.1875rem;
  --text-small:  0.875rem;
  --text-xs:     0.75rem;

  --leading-tight:  1.2;
  --leading-snug:   1.4;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold: 600;
  --weight-bold:    700;
  --weight-extrabold: 800;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 12px -1px rgba(0,0,0,0.10), 0 2px 6px -1px rgba(0,0,0,0.06);
  --shadow-lg:  0 10px 24px -3px rgba(0,0,0,0.12), 0 4px 8px -2px rgba(0,0,0,0.06);
  --shadow-xl:  0 20px 40px -5px rgba(0,0,0,0.14), 0 8px 16px -4px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 12px 32px rgba(0,0,0,0.14);
  --shadow-glow: 0 0 0 3px rgba(159,232,112,0.25);
  --shadow-lime: 0 4px 20px rgba(159,232,112,0.20);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   200ms ease;
  --transition-medium: 300ms ease;
  --transition-slow:   500ms ease;

  /* Z-Index Scale */
  --z-backdrop:  40;
  --z-sticky:    50;
  --z-dropdown:  60;
  --z-modal:     70;
  --z-toast:     80;

  /* Container Widths */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1400px;

  /* Navbar */
  --navbar-height: 72px;
  --navbar-height-mobile: 64px;
  --ticker-height: 40px;
}

/* ---------------------------------------------------------
   3. Reset
   --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--neutral-950);
  background-color: var(--white);
  cursor: auto;
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-tight);
  color: var(--neutral-950);
  letter-spacing: 0;
}

h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--neutral-900);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }
h5 { font-size: var(--text-h5); }

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--primary-700); }

/* All interactive elements restore normal cursor for usability */
a, button, [role="button"], input, select, textarea, label {
  cursor: pointer;
}

/* ---------------------------------------------------------
   Shared Public UI Utilities
   --------------------------------------------------------- */
.ui-card {
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.ui-card:hover,
.ui-card:focus-within {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-card-hover);
}

.ui-icon-btn {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  background: var(--white);
  color: var(--primary-700);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.ui-icon-btn:hover,
.ui-icon-btn:focus-visible {
  border-color: var(--primary-300);
  background: var(--primary-50);
  color: var(--primary-900);
}

.ui-icon-btn:active {
  transform: translateY(1px);
}

.ui-empty,
.ui-error,
.ui-loading {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: var(--space-8);
  border: 1px dashed var(--neutral-200);
  border-radius: 8px;
  background: var(--neutral-50);
  color: var(--neutral-600);
  text-align: center;
}

.ui-empty > *,
.ui-error > *,
.ui-loading > * {
  max-width: 560px;
}

.ui-empty i,
.ui-error i,
.ui-loading i {
  display: inline-grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: var(--space-3);
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 1.25rem;
}

.ui-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #7f1d1d;
}

.ui-error i {
  background: #fee2e2;
  color: #b91c1c;
}

.ui-loading {
  border-style: solid;
}

.ui-loading i {
  animation: spin 1s linear infinite;
}

.ui-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  background: var(--white);
}

.ui-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.ui-table th,
.ui-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--neutral-100);
  text-align: left;
  vertical-align: top;
}

.ui-table th {
  background: var(--primary-700);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
}

.ui-table tr:last-child td {
  border-bottom: 0;
}

.ui-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.ui-page-btn {
  display: inline-grid;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  background: var(--white);
  color: var(--neutral-700);
  font-weight: var(--weight-bold);
}

.ui-page-btn:hover,
.ui-page-btn:focus-visible,
.ui-page-btn.is-active {
  border-color: var(--primary-600);
  background: var(--primary-700);
  color: var(--white);
}

.ui-page-btn:disabled,
.ui-page-btn.is-disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ui-form-field {
  display: grid;
  gap: var(--space-2);
}

.ui-help-text,
.ui-field-error {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.ui-help-text {
  color: var(--neutral-500);
}

.ui-field-error {
  color: var(--error);
  font-weight: var(--weight-medium);
}

.ui-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

/* Phase 17 normalization layer for older page assets. */
body :where(h1, h2, h3, h4, h5, h6, [class*="-title"], [class*="-val"], [class*="-number"]) {
  letter-spacing: 0 !important;
}

body :where(.card, [class$="-card"], [class*="-card "]) {
  border-radius: 8px !important;
}

/* Phase 19 media stability helpers. */
img,
picture,
video,
canvas,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

:where([class*="-img"], [class*="-image"], [class*="-media"], [class*="-photo"]) > img {
  display: block;
}

:where(.proj-card-img, .news-card-img, .gl-photo-thumb, .pd-gallery-thumb, .ptc-card-img) {
  aspect-ratio: 16 / 10;
}

img, picture, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Ensure HTML hidden attribute always wins over CSS display rules */
[hidden] { display: none !important; }

/* ---------------------------------------------------------
   Custom Cursor — dot + lerp ring (global, all pages)
   --------------------------------------------------------- */
.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--lime);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.15s ease, height 0.15s ease, background 0.15s ease;
  will-change: transform;
}

.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(159,232,112,0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.2s ease;
  will-change: transform;
}

body.cursor-hover .cursor-dot {
  width: 12px;
  height: 12px;
  background: var(--lime-bright);
}

body.cursor-hover .cursor-ring {
  width: 56px;
  height: 56px;
  border-color: var(--lime);
}

@media (hover: hover) and (pointer: fine) {
  body:not(.no-custom-cursor) { cursor: none; }
  body:not(.no-custom-cursor) a,
  body:not(.no-custom-cursor) button,
  body:not(.no-custom-cursor) [role="button"],
  body:not(.no-custom-cursor) input,
  body:not(.no-custom-cursor) select,
  body:not(.no-custom-cursor) textarea,
  body:not(.no-custom-cursor) label {
    cursor: none;
  }
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
  a, button, [role="button"], input, select, textarea, label { cursor: pointer; }
}

/* ---------------------------------------------------------
   4. Layout Utilities
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}
@media (min-width: 768px) {
  .container { padding-left: var(--space-6); padding-right: var(--space-6); }
}
@media (min-width: 1024px) {
  .container { padding-left: var(--space-8); padding-right: var(--space-8); }
}

.container-sm  { max-width: var(--container-sm); }
.container-md  { max-width: var(--container-md); }
.container-lg  { max-width: var(--container-lg); }
.container-2xl { max-width: var(--container-2xl); }

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
.grid-cols-12 { grid-template-columns: repeat(12, 1fr); }

@media (min-width: 640px) {
  .sm\\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .sm\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .md\\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .md\\:grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1024px) {
  .lg\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\\:grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
}

/* Flexbox */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0%; }
.flex-none { flex: none; }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }

@media (min-width: 640px) {
  .sm\\:flex { display: flex; }
  .sm\\:block { display: block; }
  .sm\\:hidden { display: none; }
}
@media (min-width: 768px) {
  .md\\:flex { display: flex; }
  .md\\:block { display: block; }
  .md\\:hidden { display: none; }
}
@media (min-width: 1024px) {
  .lg\\:flex { display: flex; }
  .lg\\:block { display: block; }
  .lg\\:hidden { display: none; }
}

/* Spacing Utilities */
.m-auto  { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }
.mt-20 { margin-top: var(--space-20); }
.mt-24 { margin-top: var(--space-24); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.p-4  { padding: var(--space-4); }
.p-6  { padding: var(--space-6); }
.p-8  { padding: var(--space-8); }
.p-12 { padding: var(--space-12); }

.py-4  { padding-top: var(--space-4);  padding-bottom: var(--space-4); }
.py-6  { padding-top: var(--space-6);  padding-bottom: var(--space-6); }
.py-8  { padding-top: var(--space-8);  padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }
.py-20 { padding-top: var(--space-20); padding-bottom: var(--space-20); }
.py-24 { padding-top: var(--space-24); padding-bottom: var(--space-24); }

.px-4  { padding-left: var(--space-4);  padding-right: var(--space-4); }
.px-6  { padding-left: var(--space-6);  padding-right: var(--space-6); }
.px-8  { padding-left: var(--space-8);  padding-right: var(--space-8); }

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ---------------------------------------------------------
   5. Typography Utilities
   --------------------------------------------------------- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-hero   { font-size: var(--text-hero); }
.text-h1     { font-size: var(--text-h1); }
.text-h2     { font-size: var(--text-h2); }
.text-h3     { font-size: var(--text-h3); }
.text-h4     { font-size: var(--text-h4); }
.text-lead   { font-size: var(--text-lead); line-height: var(--leading-relaxed); }
.text-small  { font-size: var(--text-small); }
.text-xs     { font-size: var(--text-xs); }

.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }

.font-normal    { font-weight: var(--weight-regular); }
.font-medium    { font-weight: var(--weight-medium); }
.font-semibold  { font-weight: var(--weight-semibold); }
.font-bold      { font-weight: var(--weight-bold); }

.text-neutral-500 { color: var(--neutral-500); }
.text-neutral-600 { color: var(--neutral-600); }
.text-neutral-700 { color: var(--neutral-700); }
.text-neutral-800 { color: var(--neutral-800); }
.text-neutral-900 { color: var(--neutral-900); }
.text-primary-700 { color: var(--primary-700); }
.text-white       { color: var(--white); }

.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }

/* Line Clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------------------------------------------------------
   6. Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-heading);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  line-height: 1;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--text-body); }

.btn-primary {
  background-color: var(--primary-700);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--lime);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background-color: var(--accent-500);
  color: var(--neutral-900);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background-color: var(--accent-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--neutral-900);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-700);
  border: 2px solid var(--primary-700);
}
.btn-outline:hover {
  background-color: var(--primary-700);
  transform: translateY(-2px);
  color: var(--white);
  border-color: var(--primary-700);
}

.btn-ghost {
  background-color: transparent;
  color: var(--neutral-700);
}
.btn-ghost:hover {
  background-color: var(--neutral-100);
  color: var(--neutral-900);
}

.btn-white {
  background-color: var(--white);
  color: var(--primary-700);
}
.btn-white:hover {
  background-color: var(--primary-50);
  color: var(--primary-800);
}

.btn:disabled,
.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Link Button */
.btn-link {
  background: none;
  padding: 0;
  color: var(--primary-700);
  font-weight: var(--weight-semibold);
  position: relative;
}
.btn-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-500);
  transition: width var(--transition-base);
}
.btn-link:hover::after { width: 100%; }

/* ---------------------------------------------------------
   7. Cards
   --------------------------------------------------------- */
.card {
  background-color: var(--white);
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-medium);
  box-shadow: var(--shadow-sm);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary-200);
}

.card-body { padding: var(--space-6); }
.card-title {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: var(--weight-bold);
  color: var(--neutral-900);
  margin-bottom: var(--space-2);
}
.card-text {
  color: var(--neutral-600);
  font-size: var(--text-small);
  line-height: var(--leading-relaxed);
}

/* ---------------------------------------------------------
   8. Badges
   --------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  line-height: 1;
}

.badge-success { background: var(--primary-100); color: var(--primary-800); }
.badge-warning { background: var(--accent-100); color: var(--accent-600); }
.badge-info    { background: #dbeafe; color: #1d4ed8; }
.badge-error   { background: #fee2e2; color: #b91c1c; }
.badge-ongoing { background: #dbeafe; color: var(--ongoing); }

/* ---------------------------------------------------------
   9. Alerts
   --------------------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-small);
}
.alert-success { background: var(--primary-50); border: 1px solid var(--primary-200); }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; }
.alert-warning { background: var(--accent-50); border: 1px solid var(--accent-300); }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; }

/* ---------------------------------------------------------
   10. Forms
   --------------------------------------------------------- */
.form-group { margin-bottom: var(--space-5); }
.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  color: var(--neutral-700);
}
.form-control {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-body);
  color: var(--neutral-900);
  background-color: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: var(--shadow-glow);
}
.form-control::placeholder { color: var(--neutral-400); }

.form-control.is-error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* ---------------------------------------------------------
   11. Navbar
   --------------------------------------------------------- */

/* Site topbar — wraps navbar + ticker, hides as one unit on scroll */
.site-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-topbar.is-hidden {
  transform: translateY(-100%);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  height: var(--navbar-height);
  background: transparent;
  transition: background var(--transition-medium), box-shadow var(--transition-medium), transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When inside .site-topbar, navbar is part of the flow (not independently fixed) */
.site-topbar .navbar {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 1;
}

.navbar.is-scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.navbar-brand img {
  height: 44px;
  width: auto;
}

.navbar-brand-text {
  font-family: var(--font-heading);
  font-size: var(--text-small);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  color: var(--white);
  max-width: 160px;
}
.navbar.is-scrolled .navbar-brand-text {
  color: var(--neutral-950);
}

.navbar-menu {
  display: none;
  align-items: center;
  gap: var(--space-1);
}
@media (min-width: 1024px) {
  .navbar-menu { display: flex; }
}

.navbar-link {
  display: flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: rgba(255,255,255,0.9);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
  letter-spacing: 0.01em;
}
.navbar.is-scrolled .navbar-link {
  color: var(--neutral-800);
}

.navbar-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}
.navbar.is-scrolled .navbar-link:hover {
  color: var(--primary-700);
  background: var(--primary-50);
}

.navbar-link.is-active {
  color: var(--white);
  font-weight: var(--weight-semibold);
}
.navbar.is-scrolled .navbar-link.is-active {
  color: var(--primary-700);
}
.navbar-link.is-active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary-400);
  border-radius: var(--radius-full);
}
.navbar.is-scrolled .navbar-link.is-active::after {
  background: var(--primary-500);
}

.navbar-cta {
  margin-left: var(--space-2);
}

/* Mobile Toggle */
.navbar-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
@media (min-width: 1024px) {
  .navbar-toggle { display: none; }
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition-base);
}
.navbar.is-scrolled .navbar-toggle span {
  background: var(--neutral-800);
}

.navbar-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.navbar-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.navbar-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Panel */
.navbar-mobile {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  padding: 0;
  transform: translateX(100%);
  transition: transform var(--transition-medium);
  overflow-y: auto;
}
.navbar-mobile.is-open {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  .navbar-mobile {
    display: none !important;
  }
  .navbar-mobile-backdrop {
    display: none !important;
  }
}

.navbar-mobile .navbar-link {
  color: var(--neutral-800);
  font-size: var(--text-h4);
  font-weight: var(--weight-medium);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--neutral-100);
  border-radius: 0;
}
.navbar-mobile .navbar-link:hover {
  color: var(--primary-700);
  background: none;
}

.navbar-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-medium), visibility var(--transition-medium);
}
.navbar-mobile-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ---------------------------------------------------------
   Advanced Mobile Menu — inner components (dark theme)
   Used on every page that includes the global mobile menu
   --------------------------------------------------------- */
.mob-menu-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: var(--space-5) var(--space-5) var(--space-8);
}

.mob-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0 var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: var(--space-5);
}

.mob-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.mob-brand img { height: 36px; width: auto; }

.mob-brand span {
  font-family: var(--font-heading);
  font-size: var(--text-small);
  font-weight: var(--weight-bold);
  color: var(--white);
  letter-spacing: 0.02em;
}

.mob-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mob-close:hover {
  background: rgba(159,232,112,0.12);
  color: var(--lime);
  border-color: rgba(159,232,112,0.25);
}

.mob-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.mob-nav-label {
  font-size: 10px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neutral-500);
  padding: 0 var(--space-3);
  margin-bottom: var(--space-2);
}

.mob-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: var(--weight-medium);
  color: rgba(255,255,255,0.82);
  transition: all var(--transition-fast);
  border: none;
}

.mob-nav-link:hover,
.mob-nav-link.is-active {
  background: rgba(159,232,112,0.08);
  color: var(--lime-bright);
}

.mob-nav-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--lime-muted);
  flex-shrink: 0;
}

.mob-nav-link.is-active .mob-nav-icon,
.mob-nav-link:hover .mob-nav-icon {
  background: rgba(159,232,112,0.12);
  color: var(--lime);
}

.mob-menu-ctas {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255,255,255,0.07);
}

.mob-cta-staff,
.mob-cta-ecitizen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: var(--weight-semibold);
  text-align: center;
  transition: all var(--transition-fast);
}

.mob-cta-staff {
  background: var(--primary-600);
  color: var(--white);
  border: 1px solid var(--primary-500);
}
.mob-cta-staff:hover {
  background: var(--primary-500);
  color: var(--white);
}

.mob-cta-ecitizen {
  background: var(--lime);
  color: var(--ink);
  border: 1px solid var(--lime-muted);
}
.mob-cta-ecitizen:hover {
  background: var(--lime-bright);
  color: var(--ink);
}

.mob-contact-strip {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.07);
}

.mob-contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 13px;
  color: var(--neutral-400);
  transition: color var(--transition-fast);
}

.mob-contact-item i { color: var(--lime-muted); font-size: 13px; }
.mob-contact-item:hover { color: var(--lime-bright); }

/* ---------------------------------------------------------
   Ticker Bar — live update strip (global, all pages)
   --------------------------------------------------------- */
.ticker-bar {
  position: sticky;
  top: var(--navbar-height);
  z-index: calc(var(--z-sticky) - 5);
  background: var(--ink);
  border-bottom: 1px solid rgba(159,232,112,0.14);
  height: 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.site-topbar .ticker-bar {
  position: relative;
  top: auto;
  z-index: 1;
}

.ticker-label {
  flex-shrink: 0;
  padding: 0 var(--space-4);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: var(--weight-bold);
  color: var(--lime);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-right: 1px solid rgba(159,232,112,0.18);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.ticker-label i {
  font-size: 10px;
  animation: ticker-blink 1.6s ease-in-out infinite;
}

@keyframes ticker-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.ticker-track-wrap {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  white-space: nowrap;
  animation: ticker-scroll 42s linear infinite;
  will-change: transform;
}

.ticker-track:hover,
.ticker-track.is-paused {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  color: rgba(238,247,230,0.75);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

a.ticker-item:hover,
a.ticker-item:focus-visible {
  color: var(--lime);
}

.ticker-item i {
  color: var(--lime-muted);
  font-size: 11px;
}

.ticker-sep {
  color: rgba(159,232,112,0.2);
  font-size: 20px;
  line-height: 1;
}

@media (max-width: 480px) {
  .ticker-label { padding: 0 var(--space-3); }
}

/* ---------------------------------------------------------
   12. Footer
   --------------------------------------------------------- */
.footer {
  background-color: var(--ink);
  color: var(--neutral-300);
  border-top: 4px solid var(--lime-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  padding-top: var(--space-16);
  padding-bottom: var(--space-12);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; }
}

.footer-brand img {
  height: 52px;
  width: auto;
  margin-bottom: var(--space-4);
}

.footer-brand p {
  font-size: var(--text-small);
  line-height: var(--leading-relaxed);
  max-width: 320px;
}

.footer-title {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-5);
}

.footer-links li { margin-bottom: var(--space-3); }
.footer-links a {
  color: var(--neutral-400);
  font-size: var(--text-small);
  transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--lime); }

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--text-small);
}
.footer-contact svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--lime-muted);
  margin-top: 2px;
}

.footer-contact a {
  color: var(--neutral-300);
  overflow-wrap: anywhere;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
  color: var(--lime);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--neutral-800);
  border-radius: var(--radius-md);
  color: var(--neutral-300);
  transition: all var(--transition-fast);
}
.footer-social a:hover {
  background: var(--lime-muted);
  color: var(--ink);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid var(--neutral-800);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}
@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-bottom p {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  color: var(--neutral-500);
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
}
.footer-bottom-links a {
  font-size: var(--text-xs);
  color: var(--neutral-500);
}
.footer-bottom-links a:hover { color: var(--lime); }

/* ---------------------------------------------------------
   13. Sections & Dividers
   --------------------------------------------------------- */
.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}
@media (min-width: 768px) {
  .section { padding-top: var(--space-24); padding-bottom: var(--space-24); }
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: var(--weight-extrabold);
  color: var(--neutral-950);
  margin-bottom: var(--space-4);
  letter-spacing: 0;
}

.section-subtitle {
  font-size: var(--text-lead);
  color: var(--neutral-600);
  max-width: 640px;
  margin-bottom: var(--space-12);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-12);
}

/* Green accent line */
.accent-line {
  display: block;
  width: 40px;
  height: 3px;
  background: var(--lime-muted);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
}
.accent-line.center { margin-left: auto; margin-right: auto; }

/* Divider */
.divider {
  border: none;
  height: 1px;
  background: var(--neutral-200);
  margin: var(--space-12) 0;
}

/* ---------------------------------------------------------
   14. Animation Helper Classes
   --------------------------------------------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.is-visible { opacity: 1; transform: translateY(0); }

.fade-in {
  opacity: 0;
  transition: opacity 0.55s ease;
}
.fade-in.is-visible { opacity: 1; }

.scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.scale-in.is-visible { opacity: 1; transform: scale(1); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}
.stagger-children.is-visible > *:nth-child(1) { animation: fadeUp 0.5s 0.05s forwards; }
.stagger-children.is-visible > *:nth-child(2) { animation: fadeUp 0.5s 0.15s forwards; }
.stagger-children.is-visible > *:nth-child(3) { animation: fadeUp 0.5s 0.25s forwards; }
.stagger-children.is-visible > *:nth-child(4) { animation: fadeUp 0.5s 0.35s forwards; }
.stagger-children.is-visible > *:nth-child(5) { animation: fadeUp 0.5s 0.45s forwards; }
.stagger-children.is-visible > *:nth-child(6) { animation: fadeUp 0.5s 0.55s forwards; }

/* Skeleton shimmer */
.skeleton {
  background: var(--neutral-200);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------
   15. Back to Top
   --------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-sticky);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lime-muted);
  color: var(--ink);
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow-lime);
  cursor: none;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: all var(--transition-medium);
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}
.back-to-top:hover {
  background: var(--lime);
  transform: scale(1.1);
}

/* ---------------------------------------------------------
   Public Toasts
   --------------------------------------------------------- */
.toast-host {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: var(--z-toast);
  display: grid;
  gap: var(--space-3);
  width: min(360px, calc(100vw - var(--space-8)));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--neutral-900);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--transition-base), transform var(--transition-base);
  pointer-events: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--success { border-color: rgba(34,197,94,0.35); }
.toast--warning { border-color: rgba(245,158,11,0.4); }
.toast--error { border-color: rgba(239,68,68,0.4); }
.toast--info { border-color: rgba(14,165,233,0.35); }

.toast button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--neutral-100);
  color: var(--neutral-700);
  line-height: 1;
}

.toast button:hover,
.toast button:focus-visible {
  background: var(--neutral-200);
  color: var(--neutral-950);
}

/* ---------------------------------------------------------
   16. Skip Link & Accessibility
   --------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-4);
  z-index: calc(var(--z-modal) + 1);
  background: var(--primary-700);
  color: var(--white);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-md);
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: var(--space-4);
  outline: none;
  box-shadow: var(--shadow-glow);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible */
*:focus-visible {
  outline: 2px solid var(--lime-muted);
  outline-offset: 2px;
}

/* ---------------------------------------------------------
   17. Reduced Motion
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-up, .fade-in, .scale-in,
  .stagger-children > * {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------
   18. Print Styles
   --------------------------------------------------------- */
@media print {
  .navbar, .footer, .back-to-top, .navbar-mobile, .navbar-mobile-backdrop {
    display: none !important;
  }
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

/* Dynamic site navigation logo groups */
.navbar-brand-logos,
.mob-brand-logos,
.footer-brand-logos {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.navbar-brand-logos img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 94px;
  object-fit: contain;
}

.mob-brand .mob-brand-logos {
  gap: var(--space-1);
}

.mob-brand .mob-brand-logos img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 76px;
  object-fit: contain;
}

.footer-brand-logos {
  margin-bottom: var(--space-4);
}

.footer-brand-logos img {
  display: block;
  height: 52px;
  width: auto;
  max-width: 112px;
  margin-bottom: 0;
  object-fit: contain;
}

@media (max-width: 420px) {
  .navbar-brand-logos img {
    height: 38px;
    max-width: 76px;
  }

  .mob-brand .mob-brand-logos img {
    height: 32px;
    max-width: 64px;
  }
}

/* Logged-in public utility bar */
.public-user-bar {
  position: relative;
  z-index: 120;
  background: #151719;
  color: #f8fafc;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.public-user-bar--superadmin {
  border-bottom-color: rgba(159, 232, 112, .28);
}

.public-user-bar__inner {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.public-user-bar__links {
  display: inline-flex;
  align-items: center;
  gap: var(--space-5);
  min-width: 0;
}

.public-user-bar__links a {
  color: var(--lime-bright);
  font-size: 13px;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.public-user-bar__links a:hover,
.public-user-menu__dropdown a:hover {
  color: var(--white);
}

.public-user-bar__actions {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
}

.public-user-bar__portal {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 32px;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: var(--lime, #9fe870);
  color: var(--primary-700, #163300) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: 0 6px 16px rgba(159, 232, 112, .18);
}

.public-user-bar__portal:hover {
  background: var(--lime-bright, #b8f58f);
  color: var(--primary-900, #0a1f05) !important;
  transform: translateY(-1px);
}

/* Superadmin maintenance preview strip */
.sa-public-maint-banner {
  position: relative;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  padding: .7rem 1rem;
  background: linear-gradient(90deg, #163300, #1e4d00);
  color: #edfbd6;
  font-size: .82rem;
  font-weight: 700;
  border-bottom: 2px solid #9fe870;
  text-align: center;
}

.sa-public-maint-banner__text {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.sa-public-maint-banner__text i {
  color: #9fe870;
}

.sa-public-maint-banner__actions {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  justify-content: center;
}

.sa-public-maint-banner__btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 30px;
  padding: .28rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(159, 232, 112, .45);
  color: #9fe870;
  text-decoration: none;
  font-size: .75rem;
  font-weight: 800;
}

.sa-public-maint-banner__btn--solid {
  background: #9fe870;
  border-color: #9fe870;
  color: #163300;
}

.sa-public-maint-banner__btn:hover {
  opacity: .92;
}

.public-user-menu {
  position: relative;
  flex-shrink: 0;
}

.public-user-menu__logout-form {
  margin: 0;
  padding: 0;
}

.public-user-menu__logout-form .public-user-menu__logout,
button.public-user-menu__logout {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  margin: 0;
  padding: .65rem .85rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fecaca;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.public-user-menu__logout-form .public-user-menu__logout:hover,
button.public-user-menu__logout:hover {
  background: rgba(255, 255, 255, .06);
}

.public-user-menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  cursor: pointer;
  user-select: none;
}

.public-user-menu summary::-webkit-details-marker {
  display: none;
}

.public-user-menu__avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lime-bright), var(--primary-500));
  color: var(--primary-900);
  font-size: 11px;
  font-weight: var(--weight-black);
}

.public-user-menu__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-user-menu__copy {
  display: grid;
  line-height: 1.1;
}

.public-user-menu__copy strong {
  max-width: 150px;
  overflow: hidden;
  color: var(--white);
  font-size: 13px;
  font-weight: var(--weight-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-user-menu__copy small {
  color: rgba(248, 250, 252, .72);
  font-size: 11px;
}

.public-user-menu summary > i {
  color: var(--lime-bright);
  font-size: 11px;
  transition: transform .18s ease;
}

.public-user-menu[open] summary > i {
  transform: rotate(180deg);
}

.public-user-menu__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(230px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
}

.public-user-menu__dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: var(--white);
  border-left: 1px solid rgba(15, 23, 42, .1);
  border-top: 1px solid rgba(15, 23, 42, .1);
  transform: rotate(45deg);
}

.public-user-menu__dropdown a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: .78rem .9rem;
  color: var(--neutral-900);
  font-size: 13px;
  font-weight: var(--weight-semibold);
  background: var(--white);
}

.public-user-menu__dropdown a + a {
  border-top: 1px solid var(--neutral-100);
}

.public-user-menu__dropdown a:hover {
  background: var(--primary-50);
  color: var(--primary-900);
}

.public-user-menu__dropdown i {
  width: 18px;
  color: var(--primary-500);
}

.public-user-menu__dropdown .public-user-menu__logout {
  color: #dc2626;
}

.public-user-menu__dropdown .public-user-menu__logout i {
  color: #ef4444;
}

@media (max-width: 640px) {
  .public-user-bar__inner {
    min-height: 44px;
    gap: var(--space-2);
  }

  .public-user-bar__links {
    gap: var(--space-3);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .public-user-bar__links::-webkit-scrollbar {
    display: none;
  }

  .public-user-bar__portal {
    padding: .3rem .7rem;
    font-size: 11px;
  }

  .public-user-menu__copy strong {
    max-width: 104px;
  }

  .public-user-menu__copy small {
    display: none;
  }

  .sa-public-maint-banner {
    flex-direction: column;
  }
}

/* Static public header when public user bar is present */
.site-topbar {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 110;
  transform: none !important;
}

.site-topbar.is-hidden {
  transform: none !important;
}

.navbar,
.site-topbar .navbar,
.navbar.is-scrolled {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 2;
  background: rgba(255, 255, 255, .98);
  color: var(--neutral-950);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none !important;
}

.navbar-brand-text,
.navbar.is-scrolled .navbar-brand-text,
.navbar-link,
.navbar.is-scrolled .navbar-link {
  color: var(--neutral-950);
}

.navbar-link:hover,
.navbar.is-scrolled .navbar-link:hover {
  color: var(--primary-700);
  background: var(--primary-50);
}

.navbar-link.is-active,
.navbar.is-scrolled .navbar-link.is-active {
  color: var(--primary-700);
}

.navbar-link.is-active::after,
.navbar.is-scrolled .navbar-link.is-active::after {
  background: var(--primary-500);
}

.navbar-toggle span,
.navbar.is-scrolled .navbar-toggle span {
  background: var(--neutral-900);
}

.site-topbar .ticker-bar,
.ticker-bar {
  position: relative;
  top: auto;
  z-index: 1;
}

.public-user-bar {
  z-index: 130;
}
