/* =====================================================================
   MUNICIPAL WEBSITE TEMPLATE - Public Site Styles
   Design schema follows hentiesbaai.com: slate-navy header & footer,
   copper accents, numbered tab navigation with drop-down sub-items,
   dark hero panel with copper uppercase headline.
   Colours are CSS variables set per municipality (config.js / admin).
   ===================================================================== */
:root {
  --primary: #2e4a63;
  --primary-dark: #1a3a52;
  --accent: #c87941;
  --accent-dark: #a0612f;
  --soft: #c8d8e8;
  --light: #f0f4f8;
  --line: #e0e8f0;
  --muted: #5a6a7a;
  --text: #1f2d3a;
  --red: #c0392b;
  --amber: #d68910;
  --green: #2d6a37;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(20, 40, 60, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--text);
  background: var(--light); font-size: 16px; line-height: 1.55;
}
a { color: var(--primary); }
a:hover { color: var(--accent); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 999; }

/* ---------- Demo ribbon ---------- */
.demo-ribbon {
  background: repeating-linear-gradient(135deg, var(--accent) 0 14px, var(--accent-dark) 14px 28px);
  color: #fff; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  padding: 4px 10px; text-transform: uppercase;
}
.demo-ribbon a { color: #fff; }

/* ---------- Header ---------- */
.site-header { background: var(--primary); color: #fff; }
.header-inner {
  max-width: 1880px; margin: 0 auto; display: flex; align-items: center; gap: 18px;
  padding: 10px 22px;
}
/* Logo placeholders are square tiles (header and home page) */
.crest { flex: 0 0 auto; display: flex; background: #fff; border-radius: 8px; padding: 5px; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.crest img, .crest svg { width: 76px !important; height: 76px !important; display: block; }
.title-wrap { flex: 1; text-align: center; }
.site-title {
  margin: 0; font-size: clamp(20px, 3.2vw, 38px); letter-spacing: .06em; font-weight: 800;
  text-transform: uppercase; line-height: 1.1;
}
.site-sub { margin: 4px 0 0; font-size: 13px; letter-spacing: .18em; color: var(--soft); text-transform: uppercase; }
.header-tools { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.lang-toggle {
  display: inline-flex; border: 1px solid rgba(255,255,255,.35); border-radius: 20px; overflow: hidden;
}
.lang-toggle button {
  background: transparent; color: #fff; border: 0; padding: 6px 12px; cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: .06em;
}
@media (max-width: 480px) { .lang-toggle button { padding: 6px 8px; font-size: 10.5px; letter-spacing: .02em; } .header-tools { gap: 6px; } .hamburger { padding: 8px 9px; } }
.lang-toggle button.on { background: var(--accent); }
.admin-lock {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 50%; background: rgba(255,255,255,.1); text-decoration: none; font-size: 18px;
}
.admin-lock:hover { background: var(--accent); }
.visit-pill {
  background: rgba(0,0,0,.25); border-radius: 8px; padding: 4px 10px; font-size: 11px; font-weight: 700;
  line-height: 1.3; text-align: right; color: var(--soft);
}
.hamburger {
  display: none; background: var(--accent); color: #fff; border: 0; border-radius: 6px;
  padding: 8px 12px; font-weight: 700; cursor: pointer; letter-spacing: .05em;
}

/* ---------- Tab navigation (hentiesbaai.com schema) ---------- */
/* Fixed top: ribbon, header and menu never scroll; the page area below has its own scroll bar */
html, body { height: 100%; }
body { display: flex; flex-direction: column; overflow: hidden; }
.topbar { flex: 0 0 auto; position: relative; z-index: 50; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.page-scroll { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scroll-behavior: smooth; }
.tabnav { background: #fff; border-bottom: 3px solid var(--accent); position: relative; z-index: 50; }
.tabnav > ul {
  list-style: none; margin: 0; padding: 6px 6px 0; display: flex; flex-wrap: nowrap; gap: 3px;
  width: 100%; justify-content: stretch;
}
/* Tabs grow to fill the full width of the screen (no blank margins) */
.tabnav li.tab { position: relative; flex: 1 1 auto; min-width: 0; }
.tabnav .tab > a {
  display: flex; align-items: center; justify-content: center; gap: 4px; height: 100%; box-sizing: border-box;
  padding: clamp(6px, 0.5vw, 10px) clamp(3px, 0.32vw, 9px);
  font-size: clamp(10.5px, 0.7vw, 14px); font-weight: 700; line-height: 1.15; text-align: center;
  color: var(--primary); text-decoration: none; border: 1px solid var(--line); border-bottom: 0;
  border-radius: 7px 7px 0 0; background: linear-gradient(#fff, #f6f9fc); white-space: normal; overflow-wrap: normal;
  box-shadow: 0 -1px 0 rgba(0,0,0,.02) inset;
}
.tabnav .tab > a:hover, .tabnav .tab.active > a { background: var(--primary); color: #fff; border-color: var(--primary); }
.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; flex: 0 0 auto;
  border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; padding: 0 4px;
}
.caret { font-size: 9px; opacity: .7; }
.dropdown {
  display: none; position: absolute; top: 100%; left: 0; min-width: 300px; background: #fff;
  border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow); list-style: none; margin: 0; padding: 0; z-index: 60;
}
.tab:hover > .dropdown, .tab:focus-within > .dropdown { display: block; }
.tab.right > .dropdown { left: auto; right: 0; }
.dropdown a {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 14px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--line); font-size: 15px;
}
.dropdown li:last-child a { border-bottom: 0; }
.dropdown a:hover { background: #f0f6fb; color: var(--primary); }
.dropdown .ico { width: 22px; text-align: center; flex: 0 0 22px; }
.dropdown .num { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Priority notice ticker ---------- */
.ticker {
  background: var(--primary-dark); color: #fff; display: flex; align-items: stretch; overflow: hidden;
  font-size: 14px;
}
.ticker-label {
  background: var(--red); padding: 8px 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  font-size: 12px; display: flex; align-items: center; flex: 0 0 auto;
}
.ticker-track { flex: 1; position: relative; overflow: hidden; min-height: 36px; }
.ticker-item {
  position: absolute; inset: 0; display: flex; align-items: center; padding: 0 16px; opacity: 0;
  transition: opacity .6s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.ticker-item.show { opacity: 1; }
.ticker-item b { color: var(--accent); margin-right: 8px; }

/* ---------- Main ---------- */
main { max-width: 1880px; margin: 0 auto; padding: 18px 16px 40px; min-height: 60vh; }
.view { display: none; animation: fade .25s ease; }
.view.on { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(120deg, var(--primary-dark) 0%, var(--primary) 55%, color-mix(in srgb, var(--primary) 78%, #ffffff) 100%);
  border-radius: 14px; color: #fff; padding: 32px 28px; display: grid;
  grid-template-columns: minmax(280px, 22vw) 1fr 300px; gap: 28px; align-items: center; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto -10% -60% -10%; height: 120%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.06), transparent 60%); pointer-events: none;
}
.hero-crest {
  background: rgba(0,0,0,.18); border-right: 3px solid var(--accent); display: flex; align-items: center;
  justify-content: center; padding: 22px; min-height: 300px;
}
.logo-tile {
  width: clamp(230px, 17vw, 320px); aspect-ratio: 1 / 1; background: #fff; border-radius: 12px; padding: 14px;
  box-shadow: 0 0 0 4px var(--accent), 0 10px 30px rgba(0,0,0,.35); box-sizing: border-box; display: flex;
}
.logo-tile img, .logo-tile svg { width: 100% !important; height: 100% !important; display: block; }
.hero-center { text-align: center; }
.kicker {
  display: inline-block; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.15);
  color: var(--accent); padding: 6px 18px; letter-spacing: .14em; font-weight: 800; text-transform: uppercase;
  font-size: 15px; border-radius: 3px;
}
.hero h2 {
  color: var(--accent); font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12; text-transform: uppercase;
  letter-spacing: .06em; margin: 18px 0 12px; font-weight: 900;
}
.hero p.lead { font-weight: 700; margin: 0 auto 14px; max-width: 560px; font-size: 16px; }
.hero-search { display: flex; max-width: 520px; margin: 16px auto 8px; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.hero-search input { flex: 1; border: 0; padding: 12px 14px; font-size: 15px; min-width: 0; }
.hero-search button { border: 0; background: var(--accent); color: #fff; font-weight: 800; padding: 0 18px; cursor: pointer; }
.hero-search button:hover { background: var(--accent-dark); }
.hero-note { border-top: 1px solid rgba(255,255,255,.3); padding-top: 12px; margin-top: 14px; color: var(--accent); font-weight: 700; font-size: 14.5px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick {
  background: #fff; color: var(--primary); border-radius: 12px; padding: 14px 10px; text-align: center;
  text-decoration: none; font-weight: 800; font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,.18);
  border: 2px solid transparent; transition: transform .15s, border-color .15s; display: block;
}
.quick:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--primary); }
.quick .qi { font-size: 26px; display: block; margin-bottom: 4px; }

/* ---------- Section header ---------- */
.sec-head {
  background: var(--primary); color: #fff; border-radius: 12px; padding: 18px 22px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 14px; border-left: 6px solid var(--accent);
}
.sec-head .badge { width: 38px; height: 38px; font-size: 16px; }
.sec-head h2 { margin: 0; font-size: 22px; text-transform: uppercase; letter-spacing: .05em; }
.sec-head p { margin: 2px 0 0; color: var(--soft); font-size: 14px; }
.crumb { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.crumb a { color: var(--muted); }

/* ---------- Panels & cards ---------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.panel {
  background: #fff; border-radius: var(--radius); box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border: 1px solid var(--line); padding: 18px 20px; scroll-margin-top: 90px;
}
.panel h3 {
  margin: 0 0 10px; color: var(--primary); font-size: 17px; display: flex; align-items: center; gap: 8px;
  padding-bottom: 8px; border-bottom: 2px solid var(--line);
}
.panel h3 .num { color: var(--accent); font-weight: 800; }
.panel.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 1px 4px rgba(0,0,0,.06); } }

.item-list { list-style: none; margin: 0; padding: 0; }
.item-list li { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.item-list li:last-child { border-bottom: 0; }
.item-list .ico { font-size: 20px; width: 28px; text-align: center; }
.item-list .grow { flex: 1; min-width: 0; }
.item-list .meta { color: var(--muted); font-size: 13px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 6px; padding: 8px 14px;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--accent); color: #fff; }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); background: #fff; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.pill {
  display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 10px;
  text-transform: uppercase; letter-spacing: .04em; background: var(--light); color: var(--primary); border: 1px solid var(--line);
}
.pill.red { background: #fdecea; color: var(--red); border-color: #f5c6c0; }
.pill.amber { background: #fff4de; color: #9a6200; border-color: #f3dca8; }
.pill.green { background: #e4f3e6; color: var(--green); border-color: #bfdfc4; }
.pill.blue { background: #e8f0f8; color: var(--primary); }

/* Notices */
.notice { border-left: 4px solid var(--accent); }
.notice.cat-Interruption { border-left-color: var(--red); }
.notice.cat-Public-Participation { border-left-color: var(--green); }
.notice .n-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.notice h4 { margin: 0 0 6px; font-size: 16.5px; color: var(--primary); }
.notice p { margin: 0 0 8px; }
.notice .n-foot { font-size: 12.5px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* People */
.person { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 54px; height: 54px; border-radius: 50%; background: var(--soft); color: var(--primary); font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex: 0 0 54px; border: 3px solid var(--accent); font-size: 15px;
}
.person .pn { font-weight: 800; color: var(--primary); }
.person .pp { color: var(--muted); font-size: 13.5px; }

/* Tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { background: var(--primary); color: #fff; text-align: left; padding: 9px 10px; font-size: 13px; letter-spacing: .03em; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:nth-child(even) td { background: #f8fbfd; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .grp td { background: var(--light) !important; font-weight: 800; color: var(--accent-dark); text-transform: uppercase; font-size: 12.5px; letter-spacing: .06em; }

/* Docs library */
.lib-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.lib-tools input, .lib-tools select {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0;
}
.lib-tools input { flex: 1 1 260px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--primary); font-weight: 700; }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* How-to guides */
details.guide { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; scroll-margin-top: 90px; }
details.guide summary {
  cursor: pointer; padding: 14px 16px; font-weight: 800; color: var(--primary); list-style: none; display: flex; gap: 10px; align-items: center;
}
details.guide summary::-webkit-details-marker { display: none; }
details.guide summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--accent); }
details.guide[open] summary::after { content: "\2212"; }
details.guide[open] summary { border-bottom: 1px solid var(--line); }
details.guide .gbody { padding: 12px 18px 16px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 12px; }
.steps li { counter-increment: s; position: relative; padding: 6px 0 6px 38px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 5px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center;
}

/* Forms */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-weight: 700; font-size: 13.5px; color: var(--primary); margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea, .bizbar input, .bizbar select {
  width: 100%; padding: 10px 12px; border: 1px solid #c9d6e2; border-radius: 7px; background: #fff; font-family: Arial, sans-serif;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .bizbar input:focus, .bizbar select:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,74,99,.15); }
.urgency { display: flex; gap: 8px; flex-wrap: wrap; }
.urgency label {
  flex: 1 1 120px; border: 2px solid var(--line); border-radius: 8px; padding: 10px; cursor: pointer; font-weight: 700;
  display: flex; gap: 8px; align-items: center; color: var(--text); margin: 0;
}
.urgency input { width: auto; }
.urgency label:has(input:checked) { border-color: var(--accent); background: #fff8f2; }
.result {
  display: none; background: #e4f3e6; border: 1px solid #bfdfc4; color: var(--green); padding: 14px 16px; border-radius: 8px; margin-top: 12px;
}
.result.on { display: block; }
.result .ref { font-size: 22px; font-weight: 900; letter-spacing: .06em; color: var(--primary); }
.req { color: var(--red); }
.hint { font-size: 12.5px; color: var(--muted); }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.stat { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 14px 16px; border-top: 4px solid var(--accent); }
a.stat { display: block; text-decoration: none; color: inherit; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.stat:hover, a.stat:focus { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.12); border-color: var(--primary); outline: none; }
a.stat:hover .l, a.stat:focus .l { color: var(--primary); }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat .v { font-size: 28px; font-weight: 900; color: var(--primary); line-height: 1.1; }
.stat .l { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }

.home-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.emerg li .no { font-weight: 900; color: var(--red); white-space: nowrap; }
.map-frame { width: 100%; height: 260px; border: 0; border-radius: 8px; background: var(--light); }
.empty { color: var(--muted); font-style: italic; padding: 10px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: var(--soft); margin-top: 20px; }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 34px 20px 16px; display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 26px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 17px; }
.site-footer a { color: var(--accent); text-decoration: none; }
.fbox { border: 1px dashed rgba(255,255,255,.18); border-radius: 8px; padding: 14px; }
.fbox .cap { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: rgba(255,255,255,.45); text-transform: uppercase; margin-bottom: 8px; }
.contact-card { background: var(--primary-dark); border-radius: 6px; overflow: hidden; border-bottom: 3px solid var(--accent); }
.contact-card .cc-h { background: #2f7aa8; background: linear-gradient(90deg, var(--primary), #3a6f96); color: #fff; font-weight: 800; padding: 10px 14px; letter-spacing: .05em; text-transform: uppercase; font-size: 14px; }
.contact-card .cc-b { padding: 12px 16px; font-size: 13.5px; line-height: 1.75; color: #e6eef6; }
.emerg-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.emerg-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.emerg-list .no { color: #fff; font-weight: 800; white-space: nowrap; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); text-align: center; font-size: 12.5px; padding: 14px 20px 20px; color: rgba(255,255,255,.6); }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(10,20,30,.55); display: none; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.modal-bg.on { display: flex; }
.modal { background: #fff; border-radius: 12px; max-width: 560px; width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,.35); overflow: hidden; }
.modal .mh { background: var(--primary); color: #fff; padding: 14px 18px; font-weight: 800; display: flex; justify-content: space-between; }
.modal .mh button { background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; }
.modal .mb { padding: 18px; }

/* ---------- Attached documents ---------- */
.doc-acts { display: inline-flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.mw-share-btn { white-space: nowrap; }
.att-link { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 2px 6px 2px 0; }
td.att { white-space: nowrap; }
td.att .btn { padding: 5px 10px; }
.person .att-link { margin-top: 6px; }
.person .att-link .btn { font-size: 12px; padding: 4px 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1150px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-crest { grid-column: 1 / -1; border-right: 0; border-bottom: 3px solid var(--accent); min-height: 0; }
  .logo-tile { width: 220px; }
}
@media (max-width: 1200px) {
  .hamburger { display: inline-block; }
  .tabnav > ul { display: none; flex-direction: column; padding: 6px; }
  .tabnav .tab > a { justify-content: flex-start; font-size: 15px; padding: 12px 14px; border-radius: 6px; border-bottom: 1px solid var(--line); }
  .dropdown { position: static; box-shadow: none; min-width: 0; border-top-width: 2px; }
  .tab:hover > .dropdown { display: none; }
  .tab.expand > .dropdown { display: block; }
  .tab.right > .dropdown { right: auto; }
  .tabnav.open > ul { display: flex; max-height: 65vh; overflow-y: auto; }
  .visit-pill { display: none; }
}
@media (max-width: 900px) {
  .tabnav.open > ul { display: flex; }
  .tabnav .tab > a { border-radius: 6px; border-bottom: 1px solid var(--line); }
  .dropdown { position: static; box-shadow: none; min-width: 0; border-top-width: 2px; }
  .tab:hover > .dropdown { display: none; }
  .tab.expand > .dropdown { display: block; }
  .hero { grid-template-columns: 1fr; padding: 24px 16px; }
  .logo-tile { width: 180px; }
  .crest img, .crest svg { width: 54px !important; height: 54px !important; }
  .g2, .g3, .g4, .home-cols, .footer-inner { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .visit-pill { display: none; }
  .header-inner { flex-wrap: wrap; padding: 10px 14px; }
  .title-wrap { order: 3; flex-basis: 100%; }
  .header-tools { margin-left: auto; }
}
/* Phones: keep the fixed top compact so most of the screen is left for the page */
@media (max-width: 600px) {
  .demo-ribbon { font-size: 9.5px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 3px 8px; }
  .header-inner { gap: 8px; padding: 8px 10px; }
  .crest { padding: 3px; border-radius: 6px; }
  .crest img, .crest svg { width: 46px !important; height: 46px !important; }
  .site-title { font-size: 18px; letter-spacing: .03em; }
  .site-sub { font-size: 10px; letter-spacing: .1em; margin-top: 2px; }
  .admin-lock { width: 32px; height: 32px; font-size: 15px; }
}
/* Phones and small tablets: MENU button first, logo next to it (both left); language and lock on the right */
@media (max-width: 900px) {
  .header-tools { display: contents; }
  .hamburger { order: 0; }
  .crest { order: 1; }
  .lang-toggle { order: 2; margin-left: auto; }
  .admin-lock { order: 3; }
  .title-wrap { order: 4; }
}
@media (max-width: 420px) {
  .hamburger { font-size: 13px; padding: 7px 9px; }
  .lang-toggle button { padding: 6px 7px; font-size: 10px; letter-spacing: 0; }
  .header-inner { gap: 6px; }
}
@media print {
  html, body { height: auto; overflow: visible; display: block; }
  .page-scroll { overflow: visible; }
  .site-header, .tabnav, .ticker, .site-footer, .demo-ribbon, .btn { display: none !important; }
  .view { display: block !important; }
}
/* Main menu tabs: small enough that all tabs fit on one row on any screen from 1201 px up
   (narrower screens use the MENU button); a long label wraps to two lines instead of running off */
@media (min-width: 1201px) {
  .tabnav .caret { display: none; }
  .tabnav .badge { min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 3px; }
}
@media (min-width: 1700px) { .tabnav .badge { min-width: 20px; height: 20px; font-size: 11px; } }

/* Phones: the service buttons come first on the home page; the large crest (already in the header) is hidden */
@media (max-width: 900px) {
  .hero { gap: 16px; }
  .quick-grid { order: -1; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .quick { padding: 10px 6px; font-size: 12px; }
  .quick .qi { font-size: 22px; margin-bottom: 2px; }
  .hero-crest { display: none; }
  .kicker { font-size: 11px; letter-spacing: .08em; padding: 5px 10px; }
  .hero h2 { font-size: 22px; margin: 10px 0 8px; }
}

/* Councillor card: title, name underneath; initials always fit the circle */
.person .pname { font-weight: 600; color: var(--ink, #1f2d3a); font-size: 14.5px; margin-top: 1px; }
.avatar { overflow: hidden; white-space: nowrap; text-overflow: clip; flex-shrink: 0; }

/* ---------- Photo gallery ---------- */
.gal-albums { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gal-item { position: relative; margin: 0; border-radius: 10px; cursor: zoom-in; background: var(--soft, #eef3f7); aspect-ratio: 4 / 3; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; transition: transform .2s, box-shadow .2s; }
.gal-item:hover img, .gal-item:focus img { transform: scale(1.02); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.gal-item:focus { outline: 3px solid var(--accent, #c87941); outline-offset: 2px; }
.gal-tip { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max(100%, 240px); max-width: 300px; z-index: 30;
  background: #1f2d3a; color: #fff; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.45; box-shadow: 0 8px 22px rgba(0,0,0,.3);
  opacity: 0; visibility: hidden; transition: opacity .15s; pointer-events: none; }
.gal-tip::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -7px; border: 7px solid transparent; border-top-color: #1f2d3a; }
.gal-item:hover .gal-tip, .gal-item:focus .gal-tip { opacity: 1; visibility: visible; }
.gal-tip .gal-cap { margin-top: 4px; }
.gal-tip .gal-meta, .gal-info .gal-meta { margin-top: 4px; opacity: .8; font-size: 12px; }
.gal-modal .modal { max-width: 960px; }
.gal-big { background: #111; border-radius: 8px; text-align: center; }
.gal-big img { max-width: 100%; max-height: 68vh; display: inline-block; vertical-align: middle; }
.gal-info { margin-top: 10px; font-size: 14px; }
.gal-info .gal-meta { color: var(--muted, #5a6a7a); opacity: 1; }
.gal-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
@media (hover: none) { .gal-tip { display: none; } }

/* Full table grid: vertical lines between all columns (public tables) */
.tbl { border: 1px solid var(--line); }
.tbl th + th { border-left: 1px solid rgba(255,255,255,.28); }
.tbl td + td { border-left: 1px solid var(--line); }
.tbl .grp td { border-left: 0; }
.tbl td.pens { color: var(--primary); font-weight: 700; }

/* Visitor counter in the header, next to the administrator lock */
.visit-count { display: none; align-items: center; gap: 6px; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); border-radius: 10px; padding: 4px 10px; line-height: 1.15; cursor: default; white-space: nowrap; }
.visit-count.on { display: inline-flex; }
.visit-count .vc-ico { font-size: 16px; }
.visit-count .vc-rows { display: flex; flex-direction: column; }
.visit-count .vc-row { font-size: 11px; letter-spacing: .03em; display: flex; justify-content: space-between; gap: 8px; }
.visit-count .vc-l { opacity: .8; text-transform: uppercase; }
.visit-count b { font-size: 12.5px; }
@media (max-width: 900px) { .visit-count { order: 3; } .admin-lock { order: 3; } }
/* phones: a thin centred line under the town name, so the lock stays next to the language buttons */
@media (max-width: 600px) {
  .visit-count { order: 5; flex-basis: 100%; justify-content: center; background: none; border: 0; padding: 0; margin-top: 2px; }
  .admin-lock { order: 3; }
  .visit-count .vc-ico { font-size: 12px; }
  .visit-count .vc-rows { flex-direction: row; gap: 12px; }
  .visit-count .vc-row { font-size: 10.5px; gap: 4px; }
  .visit-count b { font-size: 11px; }
}

/* Tariff schedule (Government Gazette) */
.tar-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; padding: 10px 12px; background: var(--light, #f2f6fa); border-radius: 8px; border-left: 4px solid var(--accent); }
.tar-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.tar-tools select, .tar-tools input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font: inherit; min-width: 0; }
.tar-tools input { flex: 1 1 220px; }
.tbl tr.sub td { font-weight: 700; font-style: italic; color: var(--primary); background: #f6f9fc !important; }

/* Tourism / investment focus points: 5 per row on large screens */
.grid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 1200px) { .grid5 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .grid5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .grid5 { grid-template-columns: 1fr; } }
.focus .fcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.focus .fcard img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.focus .fico { font-size: 30px; padding: 12px 14px 0; }
.focus .fbody { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.focus .fbody strong { color: var(--primary); }
.focus .ftext { font-size: 13.5px; color: var(--muted); }
.focus .flinks { margin-top: auto; padding-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.focus .fmore { font-weight: 700; color: var(--accent-dark, var(--accent)); text-decoration: none; }
.focus.dark .fcard { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); }
.focus.dark .fbody strong { color: #fff; }
.focus.dark .ftext { color: var(--soft, #c8d8e8); }
.focus.dark .fmore { color: var(--accent); }

/* Business directory (12) - paid listings of local businesses */
.bizbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.bizbar input { flex: 1 1 260px; min-width: 0; }
.bizbar select { flex: 0 1 260px; min-width: 0; }
.grid5.biz { align-items: stretch; }
@media (max-width: 640px) { .grid5.biz { grid-template-columns: 1fr; } .bizbar select { flex-basis: 100%; } }
.bcard { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.bcard .blogo { height: 130px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 10px; }
.bcard .blogo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bcard .blogo span { font-size: 46px; }
.bcard .bbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; min-width: 0; }
.bcard .bname { font-size: 15.5px; color: var(--primary); line-height: 1.25; }
.bcard .pill { align-self: flex-start; }
.bcard .bdesc { margin: 4px 0 2px; color: var(--muted); line-height: 1.4; white-space: pre-line; }
.bcard .bline { display: flex; gap: 6px; align-items: flex-start; overflow-wrap: anywhere; }
.bcard .bdoc { margin-top: 6px; }
.bsteps { margin: 6px 0 10px 20px; padding: 0; }
.bsteps li { margin: 3px 0; }
.bcard .bhelp { margin-top: 6px; padding: 6px 8px; background: #f1f8f2; border-radius: 6px; font-size: 13px; }
.bcard.org .bname { color: #2e6b3a; }
.bcard .bacts { margin-top: 6px; padding: 6px 8px; background: #eef4fb; border-radius: 6px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.bcard .bacts a { text-decoration: none; }
.bcard .bacts a:hover { text-decoration: underline; }
