/* ==========================================================================
   Galaxy County — sample government website
   Stylesheet
   ========================================================================== */

:root {
  --navy: #10314f;
  --navy-dark: #0a2338;
  --teal: #0f6156;
  --teal-dark: #0a463e;
  --teal-light: #e6f0ee;
  --gold: #c9992a;
  --gold-light: #f6edd6;
  --sand: #e8dfcb;
  --ink: #1b1f23;
  --slate: #4a5560;
  --slate-light: #6b7681;
  --line: #d8dee3;
  --bg: #ffffff;
  --bg-soft: #f4f6f8;
  --red: #b02a2a;
  --shadow-sm: 0 1px 2px rgba(16, 49, 79, .08), 0 2px 8px rgba(16, 49, 79, .06);
  --shadow-md: 0 4px 16px rgba(16, 49, 79, .12);
  --shadow-lg: 0 12px 40px rgba(16, 49, 79, .22);
  --radius: 4px;
  --wrap: 1200px;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Bitter", Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--navy); font-weight: 600; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
a { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
img, svg { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--gold); color: var(--navy-dark); padding: 10px 18px; font-weight: 700;
}
.skip-link:focus { left: 8px; top: 8px; }

/* --------------------------------------------------------------- utility bar */
.utility {
  background: var(--navy);
  color: #dce6ef;
  font-size: .82rem;
}
.utility .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.utility a { color: #dce6ef; text-decoration: none; }
.utility a:hover { color: #fff; text-decoration: underline; }
.utility-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.utility-official { display: flex; align-items: center; gap: 8px; }

/* --------------------------------------------------------------- masthead */
.masthead { background: #fff; border-bottom: 4px solid var(--gold); }
.masthead .wrap { display: flex; align-items: center; gap: 24px; min-height: 92px; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; margin-right: auto; }
.brand .seal { width: 54px; height: 54px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; color: var(--navy); }
.brand-sub { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); }

.nav-toggle {
  display: none; align-items: center; gap: 8px; background: var(--teal); color: #fff;
  border: 0; border-radius: var(--radius); padding: 10px 14px; font: inherit; font-weight: 600; cursor: pointer;
}

.mainnav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.mainnav a {
  display: block; padding: 10px 14px; text-decoration: none; color: var(--navy);
  font-weight: 600; font-size: .95rem; border-radius: var(--radius);
}
.mainnav a:hover { background: var(--teal-light); color: var(--teal-dark); }
.mainnav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--teal); color: var(--teal-dark); }

.header-search { display: flex; }
.header-search input {
  border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius);
  padding: 9px 12px; font: inherit; font-size: .9rem; width: 190px; min-width: 0;
}
.header-search button {
  border: 0; background: var(--teal); color: #fff; padding: 0 14px;
  border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer;
}
.header-search button:hover { background: var(--teal-dark); }

/* --------------------------------------------------------------- alert bar */
.alert-bar {
  background: var(--gold-light);
  border-top: 3px solid var(--gold);
  border-bottom: 1px solid var(--sand);
  font-size: .92rem;
}
.alert-bar .wrap { display: flex; gap: 12px; align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.alert-bar strong { color: var(--navy); }
.alert-bar .icon { flex: none; color: var(--gold); margin-top: 2px; }

/* --------------------------------------------------------------- hero */
.hero { position: relative; background: var(--navy-dark); }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-inner {
  position: relative; padding: 56px 0 40px; text-align: center; color: #fff;
  background: linear-gradient(180deg, rgba(8,28,46,.62) 0%, rgba(8,28,46,.42) 45%, rgba(8,28,46,.80) 100%);
}
.hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.1rem); text-shadow: 0 2px 12px rgba(0,0,0,.4); margin-bottom: .35em; }
.hero-tag { max-width: 620px; margin: 0 auto 26px; color: #e4ecf3; font-size: 1.02rem; }

.bigsearch { max-width: 760px; margin: 0 auto; }
.bigsearch form { display: flex; background: #fff; border-radius: 999px; padding: 6px; box-shadow: var(--shadow-lg); }
.bigsearch input {
  flex: 1; border: 0; padding: 14px 20px; font: inherit; font-size: 1.02rem; border-radius: 999px; min-width: 0;
}
.bigsearch input:focus { outline: none; }
.bigsearch form:focus-within { box-shadow: 0 0 0 3px var(--gold), var(--shadow-lg); }
.bigsearch button {
  border: 0; background: var(--teal); color: #fff; border-radius: 999px;
  padding: 0 26px; font: inherit; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.bigsearch button:hover { background: var(--teal-dark); }

.quick-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.quick-chips a {
  background: rgba(255,255,255,.94); color: var(--navy); text-decoration: none;
  border-radius: 999px; padding: 8px 18px; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-sm);
}
.quick-chips a:hover { background: var(--gold); color: var(--navy-dark); }

/* --------------------------------------------------------------- portal tiles */
.portals { margin-top: -34px; position: relative; z-index: 5; }
.portal-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; box-shadow: var(--shadow-md); border-radius: var(--radius); overflow: hidden; }
.portal {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 22px 12px 18px; text-decoration: none; color: #fff; background: var(--teal);
  border-right: 1px solid rgba(255,255,255,.18); transition: transform .15s ease, background .15s ease;
}
.portal:last-child { border-right: 0; }
.portal:nth-child(even) { background: var(--navy); }
.portal:hover { background: var(--teal-dark); color: #fff; transform: translateY(-3px); }
.portal:nth-child(even):hover { background: var(--navy-dark); }
.portal .disc {
  width: 54px; height: 54px; border-radius: 50%; background: #fff; color: var(--teal-dark);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
.portal span { font-weight: 700; font-size: .92rem; letter-spacing: .01em; }

/* --------------------------------------------------------------- sections */
.section { padding: 56px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.eyebrow {
  display: block; font-family: var(--font-body); font-size: .74rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px;
}
.link-more { font-weight: 700; text-decoration: none; }
.link-more::after { content: " \2192"; }
.link-more:hover { text-decoration: underline; }

/* --------------------------------------------------------------- task columns */
.task-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.task-col h3 { border-bottom: 3px solid var(--gold); padding-bottom: 8px; margin-bottom: 14px; font-size: 1.1rem; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li { margin-bottom: 6px; }
.task-list a {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--teal); padding: 10px 14px; text-decoration: none; color: var(--navy);
  font-size: .95rem; font-weight: 500; border-radius: 0 var(--radius) var(--radius) 0;
}
.task-list a:hover { background: var(--teal-light); border-left-color: var(--gold); }

/* --------------------------------------------------------------- cards */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit;
  transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: inherit; }
.card .thumb { aspect-ratio: 16 / 10; background: var(--teal-light); overflow: hidden; }
.card .thumb svg { width: 100%; height: 100%; display: block; }
.card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .meta { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); font-weight: 700; }
.card h3 { margin: 0; font-size: 1.08rem; }
.card p { margin: 0; font-size: .92rem; color: var(--slate); }
.card .cta { margin-top: auto; font-weight: 700; font-size: .9rem; color: var(--teal-dark); }
.card .cta::after { content: " \2192"; }

/* --------------------------------------------------------------- page banner */
.page-banner { position: relative; background: var(--teal-dark); color: #fff; overflow: hidden; }
.page-banner .banner-media { position: absolute; inset: 0; }
.page-banner .banner-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(6,16,26,.86) 0%, rgba(6,16,26,.62) 55%, rgba(6,16,26,.42) 100%);
}
.page-banner .banner-media svg { width: 100%; height: 100%; }
.page-banner .wrap { position: relative; padding: 44px 20px 40px; }
.page-banner h1 { color: #fff; margin-bottom: 8px; }
.page-banner p { max-width: 640px; color: #dfeae8; margin: 0; }

.breadcrumb { background: var(--bg-soft); border-bottom: 1px solid var(--line); font-size: .85rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 10px 0; }
.breadcrumb li::after { content: "/"; margin-left: 8px; color: var(--slate-light); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--teal-dark); }
.breadcrumb li[aria-current] { color: var(--slate); }

/* --------------------------------------------------------------- layout with sidebar */
.layout { display: grid; grid-template-columns: 270px 1fr; gap: 44px; padding: 44px 0 60px; align-items: start; }
.sidenav { position: sticky; top: 16px; }
.sidenav h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-family: var(--font-body); color: var(--slate); margin-bottom: 10px; }
.sidenav ul { list-style: none; margin: 0 0 26px; padding: 0; border-top: 1px solid var(--line); }
.sidenav li { border-bottom: 1px solid var(--line); }
.sidenav a { display: block; padding: 10px 12px; text-decoration: none; color: var(--navy); font-size: .93rem; font-weight: 500; }
.sidenav a:hover { background: var(--teal-light); color: var(--teal-dark); }

.contact-box { background: var(--bg-soft); border-left: 4px solid var(--teal); padding: 18px; font-size: .92rem; }
.contact-box h3 { font-size: 1rem; margin-bottom: 8px; }
.contact-box p { margin: 0 0 6px; color: var(--slate); }

.prose > section { padding-bottom: 34px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.prose > section:last-child { border-bottom: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* --------------------------------------------------------------- service grid */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.svc {
  display: flex; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit; background: #fff;
}
.svc:hover { border-color: var(--teal); background: var(--teal-light); color: inherit; }
.svc .ico { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--teal-light); color: var(--teal-dark); display: flex; align-items: center; justify-content: center; }
.svc:hover .ico { background: #fff; }
.svc strong { display: block; color: var(--navy); font-size: 1rem; }
.svc span { font-size: .88rem; color: var(--slate); }

/* --------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { background: #fff; border-top: 4px solid var(--gold); padding: 20px; box-shadow: var(--shadow-sm); }
.stat .num { font-family: var(--font-head); font-size: 2.1rem; color: var(--teal-dark); line-height: 1; }
.stat .lbl { font-size: .88rem; color: var(--slate); margin-top: 6px; display: block; }

/* --------------------------------------------------------------- tables & downloads */
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; margin-bottom: 1rem; }
table.data caption { text-align: left; font-size: .85rem; color: var(--slate); padding-bottom: 8px; }
table.data th, table.data td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
table.data thead th { background: var(--navy); color: #fff; font-weight: 600; }
table.data tbody tr:nth-child(even) { background: var(--bg-soft); }

.downloads { list-style: none; margin: 0; padding: 0; }
.downloads li { border-bottom: 1px solid var(--line); }
.downloads a { display: flex; align-items: center; gap: 12px; padding: 12px 4px; text-decoration: none; color: var(--navy); font-weight: 600; font-size: .95rem; }
.downloads a:hover { color: var(--teal-dark); }
.downloads .tag { margin-left: auto; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); font-weight: 700; }
.downloads .fileicon { color: var(--red); flex: none; }

/* --------------------------------------------------------------- news list */
.newslist { list-style: none; margin: 0; padding: 0; }
.newslist li { display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.datechip { background: var(--navy); color: #fff; text-align: center; border-radius: var(--radius); padding: 10px 6px; height: fit-content; }
.datechip .m { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.datechip .d { display: block; font-family: var(--font-head); font-size: 1.7rem; line-height: 1.1; }
.newslist h3 { margin-bottom: 4px; font-size: 1.12rem; }
.newslist p { margin: 0; color: var(--slate); font-size: .93rem; }

/* --------------------------------------------------------------- callout / buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--teal); color: #fff;
  padding: 11px 22px; border-radius: var(--radius); text-decoration: none; font-weight: 700; border: 0;
  font: inherit; font-weight: 700; cursor: pointer;
}
.btn:hover { background: var(--teal-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--teal-dark); border: 2px solid var(--teal); }
.btn.ghost:hover { background: var(--teal-light); color: var(--teal-dark); }
.btn.gold { background: var(--gold); color: var(--navy-dark); }
.btn.gold:hover { background: #b3861f; }

.callout { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 34px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.callout h2 { color: #fff; margin-bottom: 6px; }
.callout p { color: #cddbe7; margin: 0; }

/* --------------------------------------------------------------- search page */
.search-hero { background: var(--navy); padding: 34px 0; }
.search-hero h1 { color: #fff; margin-bottom: 16px; }
.search-results { padding: 34px 0 60px; }
.result { padding: 20px 0; border-bottom: 1px solid var(--line); }
.result .crumb { font-size: .8rem; color: var(--teal); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.result h2 { font-size: 1.2rem; margin: 4px 0 6px; }
.result h2 a { text-decoration: none; }
.result h2 a:hover { text-decoration: underline; }
.result p { margin: 0; color: var(--slate); font-size: .95rem; }
.result mark { background: var(--gold-light); color: inherit; padding: 0 2px; }
.result-count { color: var(--slate); font-size: .95rem; margin-bottom: 8px; }
.facets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.facet {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 16px;
  font: inherit; font-size: .86rem; cursor: pointer; color: var(--navy);
}
.facet[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.no-results { background: var(--bg-soft); padding: 28px; border-left: 4px solid var(--gold); }

/* --------------------------------------------------------------- footer */
.footer { background: var(--navy-dark); color: #c6d4e0; padding: 48px 0 0; font-size: .92rem; margin-top: 0; }
.footer a { color: #c6d4e0; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-bottom: 34px; }
.footer h3 { color: #fff; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; font-family: var(--font-body); margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.footer-brand .seal { width: 48px; height: 48px; flex: none; }
.footer-brand strong { color: #fff; font-family: var(--font-head); font-size: 1.15rem; display: block; }
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; }
.social a:hover { background: var(--teal); }
.legal { border-top: 1px solid rgba(255,255,255,.14); padding: 16px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .84rem; }

/* --------------------------------------------------------------- chatbot */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  display: flex; align-items: center; gap: 10px;
  background: var(--teal); color: #fff; border: 0; border-radius: 999px;
  padding: 14px 22px 14px 18px; font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-lg);
}
.chat-fab:hover { background: var(--teal-dark); }
.chat-fab .pulse { width: 9px; height: 9px; border-radius: 50%; background: #7fe3b0; box-shadow: 0 0 0 0 rgba(127,227,176,.7); animation: pulse 2.4s infinite; }
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(127,227,176,0); }
  100% { box-shadow: 0 0 0 0 rgba(127,227,176,0); }
}

.chat-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 95;
  width: min(390px, calc(100vw - 32px)); height: min(600px, calc(100vh - 48px));
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-head { background: var(--navy); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.chat-head .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--teal); display: flex; align-items: center; justify-content: center; flex: none; }
.chat-head strong { display: block; font-size: .98rem; }
.chat-head small { color: #a9c2d6; font-size: .78rem; }
.chat-close { margin-left: auto; background: transparent; border: 0; color: #fff; cursor: pointer; padding: 6px; border-radius: var(--radius); }
.chat-close:hover { background: rgba(255,255,255,.14); }

.chat-log { flex: 1; overflow-y: auto; padding: 16px; background: var(--bg-soft); display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 12px; font-size: .92rem; line-height: 1.5; }
.msg.bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 3px; align-self: flex-start; }
.msg.user { background: var(--teal); color: #fff; border-bottom-right-radius: 3px; align-self: flex-end; }
.msg p { margin: 0 0 8px; }
.msg p:last-child { margin: 0; }
.msg ul { margin: 6px 0 0; padding-left: 18px; }
.msg li { margin-bottom: 5px; }
.msg.bot a { color: var(--teal-dark); font-weight: 600; }
.typing { display: flex; gap: 4px; align-items: center; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--slate-light); animation: bounce 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; background: var(--bg-soft); }
.chat-chips button {
  border: 1px solid var(--teal); background: #fff; color: var(--teal-dark); border-radius: 999px;
  padding: 6px 12px; font: inherit; font-size: .82rem; cursor: pointer;
}
.chat-chips button:hover { background: var(--teal); color: #fff; }

.chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fff; }
.chat-form input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font: inherit; font-size: .92rem; min-width: 0; }
.chat-form button { border: 0; background: var(--teal); color: #fff; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; flex: none; display: flex; align-items: center; justify-content: center; }
.chat-form button:hover { background: var(--teal-dark); }

/* --------------------------------------------------------------- analytics debug panel */
.ga-debug {
  position: fixed; left: 12px; bottom: 12px; z-index: 80; width: min(360px, calc(100vw - 24px));
  background: #0d1b26; color: #a9f0c6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .74rem; border-radius: 8px; box-shadow: var(--shadow-lg); display: none;
}
.ga-debug.on { display: block; }
.ga-debug header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.12); color: #fff; }
.ga-debug header strong { font-size: .78rem; letter-spacing: .06em; }
.ga-debug button { margin-left: auto; background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 4px; cursor: pointer; font: inherit; padding: 2px 8px; }
.ga-debug ol { list-style: none; margin: 0; padding: 8px 12px; max-height: 220px; overflow-y: auto; }
.ga-debug li { padding: 3px 0; border-bottom: 1px dotted rgba(255,255,255,.08); word-break: break-all; }
.ga-debug .ev { color: #ffd479; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1040px) {
  .portal-grid { grid-template-columns: repeat(3, 1fr); }
  .portal { border-bottom: 1px solid rgba(255,255,255,.18); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  body { font-size: 16px; }
  .nav-toggle { display: inline-flex; order: 3; }
  .mainnav { display: none; order: 5; width: 100%; padding-bottom: 12px; }
  .mainnav.open { display: block; }
  .mainnav ul { flex-direction: column; }
  .mainnav a { padding: 12px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .header-search { order: 4; }
  .header-search input { width: 130px; }
  .layout { grid-template-columns: 1fr; gap: 28px; }
  .sidenav { position: static; }
  .task-cols { grid-template-columns: 1fr; gap: 24px; }
  .callout { grid-template-columns: 1fr; }
  .portals { margin-top: 0; }
  .portal-grid { border-radius: 0; }
}

@media (max-width: 620px) {
  .card-grid, .card-grid.three, .card-grid.two, .svc-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .utility .wrap { flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 6px; padding-bottom: 6px; }
  .hero-inner { padding: 36px 0 30px; }
  .bigsearch button span { display: none; }
  .bigsearch button { padding: 0 18px; }
  .chat-fab span.label { display: none; }
  .chat-fab { padding: 16px; border-radius: 50%; }
  .newslist li { grid-template-columns: 68px 1fr; gap: 12px; }
  .ga-debug { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media print {
  .chat-fab, .chat-panel, .ga-debug, .utility, .header-search, .nav-toggle { display: none !important; }
}

/* --------------------------------------------------------------- demo disclaimer */
.demo-banner {
  position: sticky; top: 0; z-index: 100;
  background: #7a1f1f; color: #fff; font-size: .86rem;
  border-bottom: 3px solid #c9992a;
}
.demo-banner .wrap { display: flex; align-items: center; gap: 12px; padding: 9px 20px; }
.demo-banner p { margin: 0; }
.demo-banner strong { letter-spacing: .04em; text-transform: uppercase; font-size: .78rem; }
.demo-banner .demo-banner-close {
  margin-left: auto; flex: none; background: transparent; border: 1px solid rgba(255,255,255,.45);
  color: #fff; border-radius: 4px; font: inherit; font-size: .78rem; padding: 3px 10px; cursor: pointer;
}
.demo-banner .demo-banner-close:hover { background: rgba(255,255,255,.15); }

.demo-modal-backdrop {
  position: fixed; inset: 0; z-index: 200; background: rgba(8, 20, 32, .78);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.demo-modal {
  background: #fff; border-radius: 6px; border-top: 6px solid #7a1f1f;
  max-width: 520px; padding: 32px; box-shadow: var(--shadow-lg);
}
.demo-modal h2 { margin-top: 0; }
.demo-modal p { color: var(--slate); }

@media (max-width: 620px) {
  .demo-banner { position: static; }
  .demo-banner .wrap { align-items: flex-start; flex-wrap: wrap; }
  .demo-banner .demo-banner-close { margin-left: 0; }
}
