/* Unified site header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(17,24,39,.08);
  width: min(var(--container), calc(100% - 24px));
  margin: 0 auto;
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
  min-width:0;
}
.site-logo{
  display:flex;
  align-items:center;
  text-decoration:none;
  flex:0 0 auto;
}
.logo-img{
  height:40px;
  width:auto;
  max-width:260px;
  display:block;
  object-fit:contain;
}
.brand-text{
  display:none !important;
}
.nav{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  margin-left:12px;
  flex:1 1 auto;
  flex-wrap:nowrap;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.nav::-webkit-scrollbar{
  display:none;
}
.nav a{
  text-decoration:none;
  color:var(--brand);
  padding:6px 10px;
  border-radius:999px;
  font-weight:650;
  font-size:.90rem;
  white-space:nowrap;
  flex:0 0 auto;
}
.nav a:hover,
.nav a.active{
  background:var(--brand-soft);
  text-decoration:none;
}
@media (max-width: 768px){
  .logo-img{ height:32px; }
  .site-header{ gap:10px; }
}


/* Prevent flash of unauthorized content */
body[data-acl-loading="true"]{
  visibility:hidden;
}

/* =========================================================
   ADERRIG NEIGHBOURHOOD WATCH — GLOBAL STYLES (Ireland)
   Focus:
   - Harmonised look across all pages
   - Single-line main navigation
   - Consistent, slightly smaller headings everywhere
   - Login (left) + Register (right) on the login page only
   ========================================================= */

/* -------------------- Reset -------------------- */
*,
*::before,
*::after{ box-sizing:border-box; }

html, body{ height:100%; overflow-x:hidden; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size:16px;
  line-height:1.55;
  color:#1f2937;
  background:#f5f7f6;
}

/* -------------------- Tokens -------------------- */
:root{
  --container:1100px;
  --brand:#1f6f4a;
  --brand-soft:rgba(31,111,74,.12);
  --border:rgba(17,24,39,.10);
  --shadow:0 8px 22px rgba(17,24,39,.06);
  --radius:18px;
  --radius-sm:12px;
  --card:#ffffff;
  --muted:#6b7280;
}

/* Utilities */
.muted{ color:var(--muted); }
a{ color:var(--brand); }
a:hover{ text-decoration:underline; }

/* -------------------- Grid helper -------------------- */
/* Several pages use <div class="grid cols-3"> ... */
/* Ensure .grid always behaves as a real CSS grid (not just a semantic wrapper). */
.grid{
  display:grid;
  gap:16px;
}

/* Home lookup result box */
.result{
  margin-top:12px;
  padding:14px 16px;
  border:1px dashed rgba(17,24,39,.18);
  border-radius:14px;
  background:rgba(255,255,255,.75);
  text-align:center;
  color:#374151;
}


/* Responsive helpers (safe defaults) */
img, video{ max-width:100%; height:auto; }
iframe{ max-width:100%; }

/* Wide-content wrappers (prevents mobile overflow) */
.table-wrap, .ac-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
table{ max-width:100%; }

/* -------------------- Header (single-line nav) -------------------- */
.site-header{
  position:sticky;
  top:0;
  z-index:50;

  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid rgba(17,24,39,.08);

  width:min(var(--container), calc(100% - 24px));
  margin:0 auto;
  padding:8px 0;

  display:flex;
  align-items: flex-start;
  /* Keep logo and first tab closer (no big empty gap) */
  justify-content:flex-start;
  gap:10px;
}


.brand{
  display:flex;
  align-items: flex-start;
  gap:10px;
  min-width:0; /* allows the nav to keep space */
}

/* Top navigation alignment */
.nav{
  margin-left:12px;
  flex:1 1 auto;
  justify-content:center;
}

/* Optional: visually hint locked items without showing Public/Private badges */
.nav a.anw-acl-locked{
  opacity:.75;
}

.logo{
  width:32px;
  height:32px;
  border-radius:10px;
  background:rgba(31,111,74,.12);
  color:var(--brand-ink);
  display:flex;
  align-items: flex-start;
  justify-content:center;
  font-weight:800;
  letter-spacing:.4px;
  flex:0 0 auto;
}

.brand-text{
  min-width:0;
}
.brand-text h1{
  margin:0;
  font-size:0.98rem;
  line-height:1.1;
}
.brand-text p{
  margin:2px 0 0;
  font-size:.85rem;
}

/* Keep the header compact by hiding the subtitle when space is tight */
@media (max-width: 980px){
  .brand-text p{ display:none; }
}

.nav{
  display:flex;
  align-items: flex-start;
  /* Center the tabs, but keep them close to the logo */
  justify-content:center;
  gap:8px;

  margin-left:12px;
  flex:1 1 auto;

  flex-wrap:nowrap;          /* keep a single row */
  overflow-x:auto;           /* allow scroll instead of wrapping */
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  padding-bottom:2px;
}

.nav a{
  text-decoration:none;
  color:var(--brand);
  padding:6px 10px;
  border-radius:999px;
  font-weight:650;
  font-size:.90rem;
  white-space:nowrap;
  flex:0 0 auto;
}

.nav a:hover,
.nav a.active{
  background:var(--brand-soft);
  text-decoration:none;
}

/* -------------------- Page container -------------------- */
.page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.wrap,
.container{
  width:min(var(--container), calc(100% - 32px));
  margin:0 auto;
  padding:18px 0 40px;
}

/* -------------------- Typography (uniform + smaller) -------------------- */
h1{ font-size:28px; line-height:1.15; margin:0 0 12px; }
h2{ font-size:20px; line-height:1.2;  margin:0 0 10px; }
h3{ font-size:17px; line-height:1.25; margin:0 0 8px; }
h4{ font-size:15px; line-height:1.3;  margin:0 0 8px; }

p, li{ margin:0 0 12px; color:#374151; }

/* -------------------- Cards -------------------- */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}

/* -------------------- Form controls -------------------- */
.field{ display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
label{ font-weight:600; color:#111827; }

input, select, textarea{
  width:100%;
  padding:12px 14px;
  border-radius:var(--radius-sm);
  border:1px solid rgba(17,24,39,.12);
  background:#fff;
  font-size:.95rem;
  color:#111827;
}

/* Checkboxes / radios should not inherit full-width text input styling */
input[type="checkbox"],
input[type="radio"]{
  width:auto;
  padding:0;
  border:none;
  background:transparent;
  box-shadow:none;
  accent-color: var(--brand);
}

/* Checkbox label layout helper (used in Admin Notices, etc.) */
.chk{
  display:flex;
  align-items: flex-start;
  gap:10px;
  font-weight:500;
  color:#111827;
}

input:focus, select:focus, textarea:focus{
  outline:none;
  border-color:rgba(31,111,74,.45);
  box-shadow:0 0 0 4px rgba(31,111,74,.12);
}

/* -------------------- Buttons -------------------- */
button, .btn{
  appearance:none;
  border:none;
  background:var(--brand);
  color:#fff;
  font-weight:700;
  padding:10px 18px;
  border-radius:999px;
  cursor:pointer;
}
button:hover, .btn:hover{ filter:brightness(.98); }

.btn-line{
  background:transparent;
  color:var(--brand);
  border:1px solid rgba(31,111,74,.35);
}
.btn-line:hover{ background:rgba(31,111,74,.08); }

/* Sub-tabs / pill rows (About/Team etc.) */
.actions{
  display:flex;
  align-items: flex-start;
  gap:10px;
  flex-wrap:wrap;
  margin:12px 0 8px;
}

/* Projects / Alerts / Admin tabs — match site styling */

/* -------------------- Login page: two columns (desktop only) -------------------- */
body.page-login main.wrap .grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  align-items:start;
}
@media (max-width: 900px){
  body.page-login main.wrap .grid{ grid-template-columns:1fr; }
}

/* About page: keep layout, just ensure text isn’t oversized */
body.page-about p, body.page-about li{ font-size:1rem; }

/* -------------------- Footer -------------------- */
.site-footer{
  margin-top:auto;
  width:min(var(--container), calc(100% - 32px));
  margin-left:auto;
  margin-right:auto;
  padding:18px 0 26px;
  text-align:center;
  color:var(--muted);
  font-size:.9rem;

  /* Allow ordering so "Public/Private/Exclusive Page" can be the LAST line */
  display:flex;
  flex-direction:column;
  align-items: flex-start;
}

/* Force the access label to behave as a normal last line (override inline page styles) */
.site-footer .page-access{
  position:static !important;
  left:auto !important;
  right:auto !important;
  display:block;
  margin-top:10px;
  align-self:flex-start;
  color:green;
  font-weight:normal;
}

/* -------------------- Mobile -------------------- */
@media (max-width: 720px){
  .site-header{
    display:flex;
    flex-direction:column;
    align-items: flex-start;
    gap:8px;
    padding:10px 0 8px;
  }
  .nav{
    justify-content:center;
    width:100%;
  }
}


/* -------------------- Projects: accordion sections -------------------- */
.proj-accordion{
  border:1px solid rgba(17,24,39,.10);
  border-radius:14px;
  background:#fff;
  margin:12px 0;
  overflow:hidden;
}

.proj-acc-head{
  padding:12px 14px;
  font-weight:800;
  color:#111827;
  display:flex;
  align-items: flex-start;
  justify-content:space-between;
  cursor:pointer;
  user-select:none;
}

.proj-acc-body{
  padding:12px 14px;
  border-top:1px solid rgba(17,24,39,.08);
  display:none;
}

.proj-accordion.open .proj-acc-body{ display:block; }

.proj-chevron{
  transition:transform .15s ease;
  opacity:.8;
}

.proj-accordion.open .proj-chevron{ transform:rotate(180deg); }



/* Tab panes (content containers) */
.tab-pane{
  margin-top:12px;
}

strong{ font-weight:650; }


/* Keep secondary tab rows usable: single line with horizontal scroll (prevents missing buttons like "Incidents map") */
.report-tabs, .dash-tabs, .resident-tabs, .proj-tabs, .alert-tabs, .admin-tabs{
  display:flex;
  gap:10px;
  align-items: flex-start;
  flex-wrap:nowrap;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding-bottom:4px;
}



/* Harmonised tabs/buttons (scoped to clickable elements only) */
button.proj-tab, a.proj-tab,
button.alert-tab, a.alert-tab,
button.admin-tab, a.admin-tab,
button.dash-tab, a.dash-tab,
button.resident-tab, a.resident-tab,
button.elect-tab, a.elect-tab,
button.elect-subtab, a.elect-subtab,
button.hh-tab, a.hh-tab,
button.report-tab, a.report-tab,
button.subtab, a.subtab{
  border:1px solid rgba(31,111,74,.30);
  background:#fff;
  color:var(--brand);
  padding:8px 14px;
  border-radius:999px;
  font-weight:700;
  cursor:pointer;
  transition: background .15s ease, border-color .15s ease;
  white-space:nowrap;
}
button.proj-tab:hover, a.proj-tab:hover,
button.alert-tab:hover, a.alert-tab:hover,
button.admin-tab:hover, a.admin-tab:hover,
button.dash-tab:hover, a.dash-tab:hover,
button.resident-tab:hover, a.resident-tab:hover,
button.elect-tab:hover, a.elect-tab:hover,
button.elect-subtab:hover, a.elect-subtab:hover,
button.hh-tab:hover, a.hh-tab:hover,
button.report-tab:hover, a.report-tab:hover,
button.subtab:hover, a.subtab:hover{
  background:rgba(31,111,74,.06);
}
button.proj-tab.active, a.proj-tab.active,
button.alert-tab.active, a.alert-tab.active,
button.admin-tab.active, a.admin-tab.active,
button.dash-tab.active, a.dash-tab.active,
button.resident-tab.active, a.resident-tab.active,
button.elect-tab.active, a.elect-tab.active,
button.elect-subtab.active, a.elect-subtab.active,
button.hh-tab.active, a.hh-tab.active,
button.report-tab.active, a.report-tab.active,
button.subtab.active, a.subtab.active{
  background:var(--brand-soft);
  border-color:rgba(31,111,74,.45);
}

/* Sub-tab rows that use .btn (e.g. About/Team) */
.actions button.btn, .actions a.btn{
  background:#fff;
  color:var(--brand);
  border:1px solid rgba(31,111,74,.30);
  padding:8px 14px;
  border-radius:999px;
  font-weight:700;
}
.actions button.btn:hover, .actions a.btn:hover{
  background:rgba(31,111,74,.06);
}
.actions button.btn.active, .actions a.btn.active{
  background:var(--brand-soft);
  border-color:rgba(31,111,74,.45);
}



/* Stronger "active" state so users clearly see where they are */
button.proj-tab.active, button.alert-tab.active, button.admin-tab.active,
button.dash-tab.active, button.resident-tab.active, button.elect-tab.active, button.elect-subtab.active,
button.hh-tab.active, button.report-tab.active, button.subtab.active,
.actions button.btn.active{
  background:var(--brand);
  color:#fff;
  border-color:var(--brand);
}

/* Textareas that auto-grow (safe defaults) */
textarea{
  min-height: 90px;
  resize: none;
  overflow: hidden;
}


/* =========================================================
   ANW Custom Alerts / Modals / Toasts (matches site design)
   ========================================================= */

.anw-overlay{
  position:fixed;
  inset:0;
  background:rgba(17,24,39,.45);
  display:none;
  align-items: flex-start;
  justify-content:center;
  padding:16px;
  z-index:9999;
}
.anw-overlay.open{ display:flex; }

.anw-dialog{
  width:min(560px, 100%);
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:0 28px 70px rgba(17,24,39,.22);
  overflow:hidden;
  transform:translateY(6px);
  animation: anwPop .12s ease-out forwards;
}
@keyframes anwPop{ to { transform:translateY(0); } }

.anw-dialog-head{
  padding:14px 16px;
  border-bottom:1px solid rgba(17,24,39,.08);
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}

.anw-dialog-title{
  margin:0;
  font-size:1.05rem;
  line-height:1.2;
  color:#111827;
}

.anw-dialog-close{
  background:transparent;
  border:1px solid rgba(31,111,74,.35);
  color:var(--brand);
  border-radius:999px;
  padding:8px 12px;
  font-weight:800;
  cursor:pointer;
}
.anw-dialog-close:hover{ background:rgba(31,111,74,.08); }

.anw-dialog-body{
  padding:14px 16px 2px;
  color:#374151;
}
.anw-dialog-body p{ margin:0 0 10px; }

.anw-dialog-actions{
  padding:12px 16px 16px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.anw-toast-wrap{
  position:fixed;
  right:14px;
  bottom:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  z-index:10000;
}

.anw-toast{
  width:min(360px, calc(100vw - 28px));
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:0 18px 40px rgba(17,24,39,.14);
  padding:12px 14px;
  display:flex;
  align-items:flex-start;
  gap:10px;
  animation: anwToastIn .16s ease-out forwards;
}
@keyframes anwToastIn{
  from{ transform:translateY(8px); opacity:0; }
  to{ transform:translateY(0); opacity:1; }
}

.anw-toast .dot{
  width:10px;
  height:10px;
  border-radius:999px;
  margin-top:5px;
  background:rgba(31,111,74,.75);
  flex:0 0 auto;
}
.anw-toast.info .dot{ background:rgba(31,111,74,.75); }
.anw-toast.warn .dot{ background:rgba(217,119,6,.90); }
.anw-toast.error .dot{ background:rgba(185,28,28,.90); }
.anw-toast.success .dot{ background:rgba(34,197,94,.90); }

.anw-toast .msg{
  font-size:.95rem;
  line-height:1.35;
  color:#111827;
}
.anw-toast .x{
  margin-left:auto;
  background:transparent;
  border:1px solid rgba(17,24,39,.12);
  border-radius:999px;
  padding:6px 10px;
  cursor:pointer;
  color:#111827;
  font-weight:800;
}
.anw-toast .x:hover{ background:rgba(17,24,39,.05); }

/* =========================================================
   LOGO IMAGE OVERRIDE (keep existing layout; swap brand to image)
   - Uses: <a class="site-logo"><img class="logo-img" src="assets/logo/logo.png"></a>
   - Hides legacy .logo (ANW square) and .brand-text (Aderrig NW / Adamstown)
   ========================================================= */

.site-logo{
  display:flex;
  align-items: flex-start;
  gap:10px;
  flex:0 0 auto;
  text-decoration:none;
}

.logo-img{
  height:40px;         /* desktop height */
  width:auto;
  max-width:260px;
  display:block;
  object-fit:contain;
}

/* Hide old text + ANW block so header stays clean */
.logo{ display:none !important; }
.brand-text{ display:none !important; }

/* If any nav item is hidden by access control, remove it from layout completely */
.nav a[hidden],
.nav button[hidden]{
  display:none !important;
}

@media (max-width: 768px){
  .logo-img{ height:32px; }
}

/* =========================
   Home Notices Bar (compact)
   ========================= */
.home-notice-bar{
  margin: 10px auto 12px;
  max-width: var(--container, 1100px);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  background: rgba(47,125,91,.06);
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  backdrop-filter: blur(6px);
}

/* Variants (set by JS) */
.home-notice-bar--info{
  background: rgba(47,125,91,.06);
  border-color: rgba(47,125,91,.18);
}
.home-notice-bar--success{
  background: rgba(46,160,67,.08);
  border-color: rgba(46,160,67,.22);
}
.home-notice-bar--warning{
  background: rgba(245,158,11,.10);
  border-color: rgba(245,158,11,.28);
}
.home-notice-bar--error{
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.28);
}

.home-notice-bar__icon{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--brand);
  background: rgba(47,125,91,.10);
  border: 1px solid rgba(47,125,91,.18);
  flex: 0 0 auto;
  transform: translateY(1px);
}

.home-notice-bar__icon svg{ width: 16px; height: 16px; display:block; }

.home-notice-bar--success .home-notice-bar__icon{
  color: rgba(46,160,67,1);
  background: rgba(46,160,67,.12);
  border-color: rgba(46,160,67,.28);
}
.home-notice-bar--warning .home-notice-bar__icon{
  color: rgba(180,83,9,1);
  background: rgba(245,158,11,.14);
  border-color: rgba(245,158,11,.30);
}
.home-notice-bar--error .home-notice-bar__icon{
  color: rgba(185,28,28,1);
  background: rgba(239,68,68,.14);
  border-color: rgba(239,68,68,.30);
}

.home-notice-bar__text{
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  color: rgba(0,0,0,.85);
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
  line-height: 1.45;
  word-break: break-word;
}

.home-notice-bar__title{ font-weight: 900; }
.home-notice-bar__msg{ font-weight: 600; }

.home-notice-bar__text a{ font-weight: 800; }

.home-notice-btn{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  color: rgba(0,0,0,.75);
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
}

.home-notice-btn:hover{
  background: rgba(255,255,255,.85);
}

@media (max-width: 768px){
  .home-notice-bar{ margin: 10px 12px 12px; }
  .home-notice-bar__text{
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  color: rgba(0,0,0,.85);
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
  line-height: 1.45;
  word-break: break-word;
}
}

/* Footer Public/Private Page indicator */
.site-footer, footer {
  position: relative;
  text-align: center;
}

.page-access{
  display:block;
  text-align:left;
  color:green;
  font-weight:normal;
  margin:8px 0 6px;
}


/* =========================
   ACL (Access Control) helpers
   ========================= */
.anw-acl-hidden{ display:none !important; }

nav a{ position:relative; }
nav a .anw-nav-badge{
  display:inline-block;
  margin-left:0.45rem;
  padding:0.12rem 0.4rem;
  border-radius:999px;
  font-size:0.72rem;
  line-height:1;
  border:1px solid rgba(0,0,0,0.25);
  opacity:0.85;
}

/* =========================================================
   HOME PAGE LAYOUT FIXES
   Goal: match approved desktop layout
   - Eircode + Address + Continue aligned on one row (desktop)
   - Quick links rendered as pill buttons on one row (desktop)
   NOTE: selectors are intentionally generic to work with existing markup.
   ========================================================= */

/* --- "Find your street coordinator" row --- */
/* If the home form already uses one of these wrappers, it will snap into a row layout. */
.home-find-row,
.home-eircode-row,
.home-form-row,
.find-coordinator-row{
  display:flex;
  align-items: flex-start;
  gap:12px;
  flex-wrap:nowrap;
}

.home-find-row > * ,
.home-eircode-row > *,
.home-form-row > *,
.find-coordinator-row > *{
  flex:0 0 auto;
}

/* Make inputs take the available width */
.home-find-row input,
.home-eircode-row input,
.home-form-row input,
.find-coordinator-row input,
.home-find-row select,
.home-eircode-row select,
.home-form-row select,
.find-coordinator-row select{
  flex:1 1 0;
  min-width:220px;
}

/* Keep the continue button sized nicely */
.home-find-row button,
.home-eircode-row button,
.home-form-row button,
.find-coordinator-row button,
.home-find-row .btn,
.home-eircode-row .btn,
.home-form-row .btn,
.find-coordinator-row .btn{
  flex:0 0 auto;
  white-space:nowrap;
}

/* On smaller screens, stack like mobile */
@media (max-width: 900px){
  .home-find-row,
  .home-eircode-row,
  .home-form-row,
  .find-coordinator-row{
    flex-direction:column;
    align-items:stretch;
  }
  .home-find-row input,
  .home-eircode-row input,
  .home-form-row input,
  .find-coordinator-row input{
    min-width:0;
  }
}

/* --- Quick links as pills --- */
.quick-links{
  display:flex;
  gap:14px;
  align-items: flex-start;
  flex-wrap:wrap;
}

.quick-links a{
  display:inline-flex;
  align-items: flex-start;
  justify-content:center;
  gap:8px;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid rgba(31,111,74,.30);
  background:#fff;
  color:var(--brand);
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
}

.quick-links a:hover{
  background:rgba(31,111,74,.06);
  text-decoration:none;
}

@media (max-width: 900px){
  .quick-links{
    gap:10px;
  }
  .quick-links a{
    width:100%;
    justify-content:flex-start;
  }
}


/* ===== Footer: Community Support + Sponsors ===== */
.community-support-title{
  text-align:center;
  font-size:15px;
  font-weight:700;
  letter-spacing:0.4px;
  margin:10px 0 8px;
}

.sponsors--footer{
  width:min(var(--container), calc(100% - 32px));
  margin:0 auto 26px;
  padding:12px 14px 16px;
  overflow:hidden;
  box-shadow:0 6px 18px rgba(17,24,39,.06);
}
/* Marquee track (created by JS) */
.sponsor-marquee{
  position:relative;
  width:100%;
  overflow:hidden;
}

.sponsor-track{
  display:flex;
  align-items: flex-start;
  gap:22px;
  width:max-content;
  animation: sponsorScroll 26s linear infinite;
}

.sponsor-item{
  display:flex;
  align-items: flex-start;
  justify-content:center;
  padding:0 6px;
}

.sponsor-item img{
  height:42px;
  width:auto;
  display:block;
}

@keyframes sponsorScroll{
  0%{ transform:translateX(0); }
  100%{ transform:translateX(-50%); }
}

/* Keep footer content stacked and readable */
.site-footer{
  text-align:center;
}

/* Sponsors (non-footer simple row) */
.sponsors-title{ margin:0 0 8px; font-weight:700; text-align:center; }
.sponsors-logos{
  display:flex;
  align-items: flex-start;
  justify-content:center;
  gap:16px;
  flex-wrap:wrap;
  max-width:100%;
}
.sponsors-logos .sponsor-item img{ height:42px; }



/* --- Home: 3-column quick links grid (fixes middle item stretching) --- */
.grid.cols-3{
  grid-template-columns: 1fr 1fr 1fr;
}
.grid.cols-3 > a{
  display:flex;
  align-items: flex-start;
  justify-content:center;
  text-align:center;
}

/* --- Home notice bar: uniform width aligned with site container --- */
.home-notice-bar{
  width: min(var(--container, 1100px), calc(100% - 32px));
  margin-left:auto;
  margin-right:auto;
}

/* --- Footer access label should be last line --- */
.page-access{
  display:block;
  margin-top:10px;
  font-weight:700;
  color: var(--brand);
}


/* === Footer alignment (responsive global fix) === */
/* Prevent overlap between page label and Privacy Policy on mobile/tablet */
.site-footer {
  width: 100% !important;
  padding: 20px 16px 28px !important;
  margin-top: 40px !important;
  border-top: 1px solid #e5e5e5 !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.site-footer .footer-row {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  min-height: 20px !important;
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 16px !important;
  box-sizing: border-box !important;
}

.site-footer .footer-left,
.site-footer .footer-center,
.site-footer .footer-right {
  min-width: 0 !important;
  position: static !important;
}

.site-footer .footer-left {
  justify-self: start !important;
}

.site-footer .footer-center {
  justify-self: center !important;
  text-align: center !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.site-footer .footer-right {
  justify-self: end !important;
}

.site-footer .page-status,
.site-footer .page-access {
  display: inline-block !important;
  font-weight: 600 !important;
  color: #1e7f3f !important;
  white-space: nowrap !important;
}

.site-footer .footer-center a {
  font-weight: 600 !important;
  color: #1e7f3f !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.site-footer .footer-center a:hover {
  text-decoration: underline !important;
}



/* =========================
   Mobile hardening (override inline 2-column grids)
   - Some pages use inline grid-template-columns for 2-col layouts.
   - On small screens, force single-column to prevent horizontal squeeze/overflow.
   ========================= */
@media (max-width: 720px){
  /* Report page (uses <div class="grid" style="grid-template-columns:1fr 1fr">) */
  .report-panel .grid{ grid-template-columns: 1fr !important; }

  /* Admin page (uses inline style grids for role checkboxes etc.) */
  main.wrap div[style*="grid-template-columns:repeat(2"]{ grid-template-columns: 1fr !important; }
  main.wrap div[style*="grid-template-columns:1fr 1fr"]{ grid-template-columns: 1fr !important; }

  /* Generic: if any inline minmax 2-col is used inside main content */
  main.wrap div[style*="grid-template-columns:repeat(2,"]{ grid-template-columns: 1fr !important; }

  /* Reduce padding a bit for very small screens */
  .card{ padding:14px 14px; }
}


/* ==================== SAFE PATCHES (only the requested additions) ==================== */

/* Home: Community Notices block */
.home-notices{
  margin-top:18px;
}
.home-notices__title{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 0 12px;
}
.home-notices__title-icon{
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(31,111,74,.10);
  border:1px solid rgba(31,111,74,.14);
  font-size:1.2rem;
  flex:0 0 auto;
}
.home-notices__list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.home-notice-card{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:12px;
  align-items:flex-start;
  padding:16px;
  background:#fff;
  border:1px dashed rgba(17,24,39,.12);
  border-radius:16px;
}
.home-notice-card__icon{
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(31,111,74,.08);
  border:1px solid rgba(17,24,39,.08);
  flex:0 0 auto;
}
.home-notice-card__body p:last-child{ margin-bottom:0; }
.home-notice-card--empty{ opacity:.95; }

/* Footer: stack cleanly on mobile/tablet */
@media (max-width: 768px){
  .site-footer {
    padding: 18px 16px 24px !important;
  }
  .site-footer .footer-row{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    gap:10px !important;
    text-align:left !important;
    grid-template-columns:none !important;
  }
  .site-footer .footer-left,
  .site-footer .footer-center,
  .site-footer .footer-right{
    width:100% !important;
    justify-self:auto !important;
    text-align:left !important;
  }
  .site-footer .page-status,
  .site-footer .page-access,
  .site-footer .footer-center a{
    white-space:normal !important;
  }
}


/* =========================
   Header/nav fit fix
   Keeps all main tabs visible on desktop; only scrolls on smaller widths
   ========================= */
.site-header{
  align-items:center;
  gap:14px;
}

.site-logo{
  margin-right:4px;
}

.logo-img{
  height:36px;
  max-width:180px;
}

.nav{
  min-width:0;
  margin-left:0;
  justify-content:flex-start;
  gap:4px;
  overflow-x:visible;
  scrollbar-width:none;
}

.nav::-webkit-scrollbar{
  display:none;
}

.nav a{
  padding:6px 8px;
  font-size:.84rem;
  letter-spacing:-0.01em;
}

@media (max-width: 1320px){
  .logo-img{ max-width:170px; }
  .nav{ gap:2px; }
  .nav a{ padding:6px 7px; font-size:.82rem; }
}

@media (max-width: 1180px){
  .site-header{ gap:10px; }
  .logo-img{ height:34px; max-width:160px; }
  .nav a{ padding:6px 6px; font-size:.80rem; }
}

@media (max-width: 1040px){
  .nav{
    overflow-x:auto;
    justify-content:flex-start;
  }
}
