/* Sligo PPN Grants Finder
   Sligo black and white, Montserrat (as on sligoppn.com). Colour only where it carries meaning:
   red for closing soon, green for "covers the full cost". */
:root {
  --ink: #111; --black: #000; --muted: #555; --line: #d4d4d4; --tint: #f1f1f1; --bg: #fafafa; --paper: #fff;
  --urgent: #a3261b; --urgent-bg: #fdecea; --good: #1f6b35; --amber: #c78a14;
  --size: 15px;
  /* older names kept so analytics.html still styles correctly */
  --card: #fff; --navy: #000; --green: #1f6b35; --green-dark: #155c42;
}
html { font-size: var(--size); }
* { box-sizing: border-box; }
body { margin: 0; font-family: Montserrat, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: var(--ink); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid #f2a900; outline-offset: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 18px; }
.visually-hidden { position: absolute; left: -9999px; }

/* header: white bar, PPN logo */
.top { background: #fff; border-bottom: 4px solid #000; position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--black); }
.brand img { width: 52px; height: 52px; }
.brand b { display: block; font-size: 1rem; font-weight: 600; line-height: 1.1; }
.brand span { font-size: .8rem; font-weight: 500; }
.nav { display: flex; align-items: center; gap: 18px; font-weight: 500; font-size: .9rem; }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; }
.ts button { font: inherit; font-weight: 600; font-size: .8rem; background: #fff; color: #000; border: 1.5px solid var(--line); border-radius: 6px; min-width: 36px; min-height: 36px; cursor: pointer; }
.ts button[aria-pressed="true"] { background: #000; color: #fff; border-color: #000; }

/* hero with Benbulben */
.hero { background: #000; color: #fff; position: relative; overflow: hidden; }
.hero .wrap { padding-top: 32px; padding-bottom: 28px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; }
.hero h1 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); line-height: 1.15; margin: 0 0 10px; font-weight: 600; }
.hero p { margin: 0 0 18px; color: #e6e6e6; max-width: 48ch; }
.search { display: flex; gap: 8px; max-width: 520px; }
.search input { flex: 1; font: inherit; padding: 12px 14px; border-radius: 8px; border: 0; min-height: 46px; min-width: 0; }
.search button { font: inherit; font-weight: 600; padding: 0 18px; border-radius: 8px; border: 0; background: #fff; color: #000; cursor: pointer; min-height: 46px; }
.jumps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 520px; }
.jump { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; background: #fff; color: #000; text-decoration: none; min-height: 64px; }
.jump b { font-size: 1.6rem; font-weight: 600; line-height: 1; }
.jump span { font-size: .82rem; font-weight: 500; }
.jump.soon b { color: var(--urgent); }
.jump:hover { outline: 2px solid #fff; outline-offset: 2px; }
h2[id] { scroll-margin-top: calc(var(--hdr-h, 76px) + 80px); }
.next { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.06); border-radius: 12px; padding: 16px 18px; }
.next-loading { min-height: 132px; opacity: .5; }
.next small { text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; font-weight: 600; }
.next .days { font-size: 2.1rem; font-weight: 600; line-height: 1; margin: 6px 0; }
.next .days span { font-size: .9rem; font-weight: 500; }
.next a { color: #fff; font-weight: 500; }
.next .meta { color: #e6e6e6; font-size: .85rem; }
.mtn { display: block; width: 100%; height: 90px; }

/* filter bar: one tidy row, sticks to the top while scrolling */
.filters { background: #fff; border-bottom: 1px solid #000; position: sticky; top: var(--hdr-h, 76px); z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.fbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-top: 8px; padding-bottom: 10px; }
.fbar .flabel { flex-basis: 100%; font-size: .72rem; }
.flabel { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.chip { font: inherit; font-size: .82rem; font-weight: 500; padding: 6px 11px; min-height: 36px; border-radius: 99px; border: 1.5px solid #c8c8c8; background: #fff; color: #000; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: #000; }
.chip[aria-pressed="true"] { background: #000; border-color: #000; color: #fff; }
.chip span { margin-left: 3px; font-size: .75rem; opacity: .6; }
.chip.more { color: #000; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; }
.chip.more em { font-style: normal; max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.more span { opacity: 1; margin: 0; font-size: .65rem; line-height: 1; }
.chip.more[aria-expanded="true"] { border-color: #000; }
.chip.more[aria-pressed="true"] { background: #000; border-color: #000; color: #fff; }
/* "More topics" menu: a small list under its button */
.morepanel { position: fixed; z-index: 30; background: #fff; border: 1px solid #000; border-radius: 12px; box-shadow: 0 12px 28px rgba(0,0,0,.16); padding: 6px; max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; }
.morepanel[hidden], .mp-backdrop[hidden] { display: none; }
.mp-head, .mp-backdrop { display: none; }
.mp-item { font: inherit; font-size: .9rem; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 12px; min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: #000; cursor: pointer; text-align: left; }
.mp-item + .mp-item { border-top: 1px solid #eee; border-radius: 0 0 8px 8px; }
.mp-item:hover { background: var(--tint); }
.mp-item b { font-weight: 500; font-size: .8rem; color: var(--muted); }
.mp-item[aria-pressed="true"] { background: #000; color: #fff; border-radius: 8px; }
.mp-item[aria-pressed="true"] b { color: #ccc; }
.switch { display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 500; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 38px; height: 22px; border-radius: 99px; background: #c8c8c8; position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--good); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 3px solid #f2a900; outline-offset: 2px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 6px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-left: 5px solid #000; border-radius: 10px; }
.results-head h2 { margin: 0; font-size: 1.05rem; }
.rh-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.count-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.count-row .count { margin: 0; }

main .wrap { padding-top: 20px; padding-bottom: 40px; }
.count { margin: 0 0 4px; color: var(--muted); font-size: .9rem; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }
h2 .n { font-size: .78rem; background: #000; color: #fff; border-radius: 99px; padding: 2px 10px; }
h2.soon-h { color: var(--urgent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 7px; }
.card.soon { border-left: 5px solid var(--urgent); }
.card h3 { margin: 0; font-size: .95rem; font-weight: 600; line-height: 1.35; }
.card .funder { margin: 0; font-size: .8rem; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; }
.facts .amt { font-weight: 600; }
.facts .dl.soon { color: var(--urgent); font-weight: 600; }
.card p.sum { margin: 0; font-size: .87rem; color: #333; }
.notes { margin: 0; padding: 0; list-style: none; font-size: .82rem; }
.notes li { padding-left: 18px; position: relative; margin: 2px 0; }
.notes li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); }
.notes li.good::before { background: var(--good); }
.more { margin-top: auto; align-self: flex-start; font-weight: 600; font-size: .9rem; padding: 8px 0; }
.later { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.later-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px 16px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.later-row:first-child { border-top: 0; }
.later-row:hover { background: var(--tint); }
.later-row b { font-weight: 600; font-size: .9rem; }
.later-row span { color: var(--muted); font-size: .85rem; }
.later-row .amt { font-size: .88rem; text-align: right; }
.empty { background: #fff7e0; border-radius: 12px; padding: 16px; }
.tellus { margin-top: 30px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.tellus label { font-weight: 600; display: block; margin-bottom: 6px; }
.tellus .row { display: flex; gap: 8px; }
.tellus input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; min-height: 44px; }
.btn { font: inherit; font-weight: 600; padding: 10px 16px; min-height: 44px; border-radius: 8px; border: 1.5px solid #000; background: #000; color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn.alt { background: #fff; color: #000; }
.loading { color: var(--muted); }

/* grant page */
.gp { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; max-width: 760px; }
.gp h1 { margin: 0 0 4px; font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
.gp .funder { color: var(--muted); margin: 0 0 14px; }
.boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.box { background: var(--tint); border-radius: 10px; padding: 10px 14px; }
.box span { display: block; font-size: .78rem; color: var(--muted); }
.box b { font-size: .98rem; font-weight: 600; }
.box.soon { background: var(--urgent-bg); } .box.soon b { color: var(--urgent); }
.acts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.sec { border-top: 1px solid var(--line); padding: 12px 0 2px; }
.sec h2 { margin: 0 0 4px; font-size: .98rem; }
.sec p { margin: 0 0 8px; }
.verified { color: var(--muted); font-size: .85rem; }
.checkq { background: #fff7e0; border-radius: 8px; padding: 8px 12px; }
.checkq b { font-weight: 600; }
.steps, .need { margin: 0 0 8px; padding-left: 22px; }
.steps li, .need li { margin: 4px 0; }
.steps li::marker { font-weight: 600; }
/* shortlist and sharing */
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.save { font: inherit; font-size: .78rem; font-weight: 500; flex: none; padding: 5px 10px; min-height: 32px; border-radius: 99px; border: 1.5px solid #c8c8c8; background: #fff; color: #000; cursor: pointer; white-space: nowrap; }
.save:hover { border-color: #000; }
.save[aria-pressed="true"], .savebig[aria-pressed="true"] { background: #000; border-color: #000; color: #fff; }
.slnav { font-weight: 600; white-space: nowrap; }
.slcount:not(:empty) { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 2px; border-radius: 99px; background: #000; color: #fff; font-size: .72rem; text-align: center; }
.btn.wa { border-color: #1f6b35; color: #1f6b35; }
.sl-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.sl-head h1 { margin: 0 0 4px; font-size: 1.3rem; font-weight: 600; }
.feedback { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }
.useful { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.useful span { font-weight: 500; margin-right: 6px; }
.useful .btn { min-width: 64px; }
.report { margin: 12px 0 0; font-size: .88rem; color: var(--muted); }
.back { display: inline-block; margin-bottom: 12px; font-weight: 600; text-decoration: none; min-height: 40px; padding-top: 8px; }

/* sources page */
.intro h1 { font-size: 1.4rem; font-weight: 600; margin: 0 0 8px; }
.sources h2 { font-size: 1rem; margin: 22px 0 8px; }
.sources ul { background: #fff; border: 1px solid var(--line); border-radius: 12px; list-style: none; margin: 0; padding: 4px 16px; }
.sources li { padding: 8px 0; border-top: 1px solid var(--line); }
.sources li:first-child { border-top: 0; }
.cadence { color: var(--muted); font-size: .82rem; }

/* help and footer */
.help { background: #000; color: #fff; border-top: 6px solid #fff; }
.help .wrap { padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.help b { font-weight: 500; }
.help .ways { display: flex; flex-wrap: wrap; gap: 10px; }
.help a { background: #fff; color: #000; font-weight: 600; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
footer.foot { background: #1a1a1a; color: #ccc; font-size: .82rem; }
footer.foot .wrap { padding: 16px 18px; }
footer.foot a { color: #fff; }

/* legacy header used by analytics.html */
.site-header { background: #000; color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: .8rem; padding-bottom: .8rem; gap: .5rem; }
.site-title { font-weight: 600; color: #fff; text-decoration: none; }
.site-header nav a { color: #ddd; text-decoration: none; margin-left: 1rem; }
.site-header nav a[aria-current="page"] { color: #fff; border-bottom: 2px solid #fff; }

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; padding-bottom: 20px; }
  .mtn { height: 48px; }
  .nav .hide-sm { display: none; }
  .boxes { grid-template-columns: 1fr; }
  .fbar { flex-wrap: wrap; gap: 8px; }
  .flabel { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex-basis: 100%; padding-bottom: 2px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .chips::-webkit-scrollbar { display: none; }
  /* on phones "More topics" opens as a sheet from the bottom: big rows, scrolls inside, clear Close button */
  .mp-backdrop { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(0,0,0,.4); }
  .morepanel { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto !important; max-height: 78vh !important; border-width: 1px 0 0; border-radius: 16px 16px 0 0; padding: 0 12px calc(14px + env(safe-area-inset-bottom)); }
  .mp-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1; background: #fff; padding: 12px 4px; margin-bottom: 4px; border-bottom: 1px solid #000; font-weight: 600; font-size: 1rem; }
  .mp-head button { font: inherit; font-weight: 600; font-size: .9rem; min-height: 44px; padding: 0 18px; border: 1.5px solid #000; border-radius: 8px; background: #fff; color: #000; cursor: pointer; }
  .mp-item { font-size: 1rem; min-height: 52px; }
}
@media print {
  .top, .hero, .filters, .help, footer.foot, .acts, .back, .tellus { display: none !important; }
  body { background: #fff; } .gp { border: 0; padding: 0; }
  .save, .sl-head .acts, .more { display: none !important; }
  .grid { grid-template-columns: 1fr 1fr; }
  .card { break-inside: avoid; }
}

/* feedback box (bottom of every page) and the "Did your group apply?" question */
.sitefb-wrap { background: #fff; border-top: 1px solid var(--line); }
.sitefb { max-width: 640px; padding: 22px 0 18px; }
.sitefb label { display: block; margin-bottom: 8px; }
.sitefb label b { display: block; font-weight: 600; font-size: 1.05rem; }
.sitefb label span { color: var(--muted); font-size: .9rem; }
.sitefb textarea { font: inherit; width: 100%; padding: 10px 12px; border: 1.5px solid #bdbdbd; border-radius: 8px; resize: vertical; min-height: 84px; }
.sitefb textarea:focus { border-color: #000; outline: none; }
.sitefb .row { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.sitefb #sitefb-out { font-size: .9rem; font-weight: 500; }
.sitefb .trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.applied { background: var(--tint); border-radius: 10px; padding: 14px 16px; margin: 18px 0 0; }
.applied .acts { margin: 10px 0 6px; }
@media print { .sitefb-wrap, .applied { display: none !important; } }

/* ---------- Tipperary PPN: same layout, Tipperary blue and gold ---------- */
.brand img.wide { width: auto; height: 46px; max-width: 170px; object-fit: contain; }
html[data-ppn="tipperary"] { --tip-navy: #0c2a52; --tip-gold: #f2b830; }
html[data-ppn="tipperary"] .top { border-bottom-color: var(--tip-gold); }
html[data-ppn="tipperary"] .hero, html[data-ppn="tipperary"] .help { background: var(--tip-navy); }
html[data-ppn="tipperary"] .hero { border-bottom: 4px solid var(--tip-gold); }
html[data-ppn="tipperary"] .chip[aria-pressed="true"], html[data-ppn="tipperary"] .chip.more[aria-pressed="true"],
html[data-ppn="tipperary"] .mp-item[aria-pressed="true"], html[data-ppn="tipperary"] .btn:not(.alt):not(.wa),
html[data-ppn="tipperary"] .ts button[aria-pressed="true"], html[data-ppn="tipperary"] h2 .n,
html[data-ppn="tipperary"] .slcount:not(:empty) { background: var(--tip-navy); border-color: var(--tip-navy); }
html[data-ppn="tipperary"] .results-head { border-left-color: var(--tip-navy); }
html[data-ppn="tipperary"] .filters { border-bottom-color: var(--tip-navy); }

/* ---------- Sligo PPN brand (Core Brand Guidelines, Sligo PPN) ----------
   Colours: primary #15AA9A (elements, sub headings), secondary #117E73 (headings, buttons),
   accent 1 #75BFB3 (sky, icons), accent 2 #EE8744 (sparingly, for contrast), text #58595B / #898B8E.
   Fonts: the guidelines use Produkt (headings) and Laborat (body), both paid licences. Until Sligo PPN
   confirms a web licence, the closest free matches stand in: Roboto Slab and Figtree.
   Text on the brand teals uses the darker secondary so it stays readable for older users. */
html[data-ppn="sligo"] {
  --sp-primary: #15aa9a; --sp-secondary: #117e73; --sp-deep: #0b4f48; --sp-sky: #75bfb3;
  --sp-accent: #ee8744; --sp-accent-ink: #b0461a; --sp-text: #2f3032; --sp-alt: #58595b; --sp-foot: #898b8e;
  --sp-tint: #e8f5f3; --muted: #58595b; --line: #d6dedd; --bg: #f7faf9; --tint: #eef4f3;
  --sp-head: "Roboto Slab", Georgia, serif; --sp-body: Figtree, Arial, sans-serif;
}
html[data-ppn="sligo"] body { font-family: var(--sp-body); color: var(--sp-text); }
html[data-ppn="sligo"] a { color: var(--sp-secondary); }
html[data-ppn="sligo"] :focus-visible { outline-color: var(--sp-accent); }
html[data-ppn="sligo"] h1, html[data-ppn="sligo"] h2, html[data-ppn="sligo"] .card h3, html[data-ppn="sligo"] .later-row b,
html[data-ppn="sligo"] .brand b, html[data-ppn="sligo"] .sitefb label b { font-family: var(--sp-head); font-weight: 500; }

/* header */
html[data-ppn="sligo"] .top { border-bottom: 4px solid var(--sp-primary); }
html[data-ppn="sligo"] .brand b { color: var(--sp-secondary); font-size: 1.1rem; }
html[data-ppn="sligo"] .brand span { color: var(--sp-alt); }
html[data-ppn="sligo"] .nav a { color: var(--sp-text); }
html[data-ppn="sligo"] .ts button[aria-pressed="true"] { background: var(--sp-secondary); border-color: var(--sp-secondary); }

/* hero: the Ben Bulben banner, sky colour carried up behind the text */
html[data-ppn="sligo"] .hero { background: var(--sp-sky); color: var(--sp-deep); }
html[data-ppn="sligo"] .hero .wrap { padding-bottom: 6px; }
html[data-ppn="sligo"] .hero h1 { color: var(--sp-deep); font-size: clamp(1.5rem, 3vw, 2.15rem); }
html[data-ppn="sligo"] .hero p { color: #123f3a; }
html[data-ppn="sligo"] .jump { box-shadow: 0 2px 10px rgba(11,79,72,.12); }
html[data-ppn="sligo"] .jump b { color: var(--sp-secondary); font-family: var(--sp-head); font-weight: 500; }
html[data-ppn="sligo"] .jump.soon { box-shadow: inset 0 4px 0 var(--sp-accent), 0 2px 10px rgba(11,79,72,.12); }
html[data-ppn="sligo"] .jump.soon b { color: var(--sp-accent-ink); }
html[data-ppn="sligo"] .jump:hover { outline-color: var(--sp-deep); }
html[data-ppn="sligo"] .next { background: #fff; border: 0; color: var(--sp-text); box-shadow: 0 2px 10px rgba(11,79,72,.12); }
html[data-ppn="sligo"] .next small { color: var(--sp-secondary); }
html[data-ppn="sligo"] .next .days { color: var(--sp-accent-ink); font-family: var(--sp-head); font-weight: 500; }
html[data-ppn="sligo"] .next a { color: var(--sp-secondary); font-weight: 600; }
html[data-ppn="sligo"] .next .meta { color: var(--sp-alt); }
.banner { display: block; position: relative; z-index: 0; width: 100%; height: auto; aspect-ratio: 1914 / 561; object-fit: cover; object-position: 50% 0; margin-top: -9.9%; max-height: max(440px, 23vw); }
/* the banner keeps its own proportions at every width: its empty sky tucks up behind the hero text,
   the plain ground at the bottom is trimmed */
html[data-ppn="sligo"] .hero .wrap { position: relative; z-index: 1; }

/* topic bar, chips, switch */
html[data-ppn="sligo"] .filters { border-bottom-color: var(--sp-primary); }
html[data-ppn="sligo"] .chip:hover, html[data-ppn="sligo"] .chip.more[aria-expanded="true"] { border-color: var(--sp-secondary); }
html[data-ppn="sligo"] .chip[aria-pressed="true"], html[data-ppn="sligo"] .chip.more[aria-pressed="true"],
html[data-ppn="sligo"] .mp-item[aria-pressed="true"], html[data-ppn="sligo"] h2 .n, html[data-ppn="sligo"] .slcount:not(:empty),
html[data-ppn="sligo"] .save[aria-pressed="true"], html[data-ppn="sligo"] .savebig[aria-pressed="true"] { background: var(--sp-secondary); border-color: var(--sp-secondary); color: #fff; }
html[data-ppn="sligo"] .morepanel { border-color: var(--sp-secondary); }
html[data-ppn="sligo"] .switch input:checked + .track { background: var(--sp-secondary); }
html[data-ppn="sligo"] .results-head { border-left-color: var(--sp-primary); }

/* headings, cards, buttons */
html[data-ppn="sligo"] h2 { color: var(--sp-secondary); font-size: 1.15rem; }
html[data-ppn="sligo"] h2.soon-h { color: var(--sp-accent-ink); }
html[data-ppn="sligo"] .card { border-color: var(--line); box-shadow: 0 1px 3px rgba(11,79,72,.06); }
html[data-ppn="sligo"] .card.soon { border-left: 5px solid var(--sp-accent); }
html[data-ppn="sligo"] .card h3 { color: var(--sp-deep); font-size: 1rem; }
html[data-ppn="sligo"] .facts .dl.soon, html[data-ppn="sligo"] .box.soon b { color: var(--sp-accent-ink); }
html[data-ppn="sligo"] .box.soon { background: #fdf0e7; }
html[data-ppn="sligo"] .box { background: var(--sp-tint); }
html[data-ppn="sligo"] .more { color: var(--sp-secondary); }
html[data-ppn="sligo"] .btn { background: var(--sp-secondary); border-color: var(--sp-secondary); color: #fff; }
html[data-ppn="sligo"] .btn:hover { background: var(--sp-deep); border-color: var(--sp-deep); }
html[data-ppn="sligo"] .btn.alt { background: #fff; color: var(--sp-secondary); border-color: var(--sp-secondary); }
html[data-ppn="sligo"] .btn.alt:hover { background: var(--sp-tint); }
html[data-ppn="sligo"] .btn.wa { border-color: #1f6b35; color: #1f6b35; }
html[data-ppn="sligo"] .gp h1, html[data-ppn="sligo"] .sl-head h1, html[data-ppn="sligo"] .intro h1 { color: var(--sp-secondary); font-size: 1.45rem; }
html[data-ppn="sligo"] .sec h2 { color: var(--sp-secondary); font-size: 1.02rem; }
html[data-ppn="sligo"] .checkq, html[data-ppn="sligo"] .applied { background: var(--sp-tint); }
html[data-ppn="sligo"] .later-row b { color: var(--sp-deep); }

/* help bar and footer: the Knocknarea and Ben Bulben footer from the guidelines */
html[data-ppn="sligo"] .help { background: var(--sp-secondary); border-top: 0; position: relative; margin-top: 70px; }
html[data-ppn="sligo"] .help::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 72px; margin-bottom: -1px;
  background: url("brand/sligo-footer-dark.svg") bottom / 100% 100% no-repeat; pointer-events: none; }
html[data-ppn="sligo"] .help a { color: var(--sp-secondary); }
html[data-ppn="sligo"] footer.foot { background: #0c5d55; color: #dcefeb; }
html[data-ppn="sligo"] footer.foot a { color: #fff; }
html[data-ppn="sligo"] .sitefb textarea:focus { border-color: var(--sp-secondary); }
html[data-ppn="sligo"] .sitefb-wrap { background: transparent; }
@media (max-width: 760px) {
  html[data-ppn="sligo"] .help { margin-top: 44px; }
  html[data-ppn="sligo"] .help::before { height: 44px; }
}

/* application help line (set per PPN in ppn.js) and the council tab note */
.apply-help { flex-basis: 100%; margin: 0; font-size: .95rem; }
.help .apply-help a { background: none; color: #fff; padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.apply-help-box { margin: 18px 0 0; padding: 12px 16px; border-left: 4px solid var(--line); background: var(--tint); border-radius: 0 10px 10px 0; font-size: .95rem; }
.apply-help-box a { font-weight: 600; }
.topic-note { margin: 2px 0 14px; padding: 0 4px; color: var(--muted); font-size: .92rem; }
html[data-ppn="sligo"] .apply-help-box { border-left-color: var(--sp-primary); background: var(--sp-tint); }
html[data-ppn="sligo"] .help .apply-help a { color: #fff; }
/* Sligo logo is the full horizontal lockup with the name, so it sits wider than the Tipperary one */
html[data-ppn="sligo"] .brand img.wide { height: 54px; max-width: 220px; }
@media (max-width: 520px) { html[data-ppn="sligo"] .brand img.wide { height: 44px; max-width: 170px; } }
@media print { .apply-help, .apply-help-box { display: none !important; } }

/* ---------- Kilkenny PPN (local build, 11 Nov 2026): colours read from kilkennyppn.ie's own CSS ----------
   blue #00a5d0 (links, Register button), green #97af24 (News button), orange #eb6c36 (menu highlight),
   dark grey #3d3d3d (text and footer), font Open Sans (free, loaded by ppn.js). White text on #00a5d0 is too
   faint to read (about 2.9 to 1), so the hero and help bar use the site's own dark grey and the buttons a deeper
   shade of the same blue (#00759a, about 5 to 1). The three colours of the logo's bars sit under the header. */
/* 17 Nov 2026: colours now taken from the logo file Kilkenny PPN sent (Bortha: "we would usually incorporate the
   colours that are used in our logo"): pillars red #fe3805, sky blue #6cd7ff, green #82e100; lettering slate #435359,
   "Kilkenny" orange #e47735. White text on the light logo blue is unreadable, so buttons and links keep a deeper
   shade of that blue (#00759a) and the hero uses the logo's slate. */
html[data-ppn="kilkenny"] { --kk-blue: #6cd7ff; --kk-blue-ink: #00759a; --kk-green: #82e100; --kk-orange: #fe3805; --kk-dark: #435359; }
html[data-ppn="kilkenny"] body { font-family: "Open Sans", Arial, sans-serif; color: #2b2b2b; }
html[data-ppn="kilkenny"] .top { border-bottom: 0; }
html[data-ppn="kilkenny"] .top::after { content: ""; display: block; height: 5px;
  background: linear-gradient(90deg, var(--kk-orange) 0 33.3%, var(--kk-blue) 33.3% 66.6%, var(--kk-green) 66.6% 100%); }
html[data-ppn="kilkenny"] .hero, html[data-ppn="kilkenny"] .help { background: var(--kk-dark); }
html[data-ppn="kilkenny"] .hero { border-bottom: 4px solid var(--kk-blue); }
html[data-ppn="kilkenny"] .jump.soon b { color: #b23c0c; }
html[data-ppn="kilkenny"] .chip[aria-pressed="true"], html[data-ppn="kilkenny"] .chip.more[aria-pressed="true"],
html[data-ppn="kilkenny"] .mp-item[aria-pressed="true"], html[data-ppn="kilkenny"] .btn:not(.alt):not(.wa),
html[data-ppn="kilkenny"] .ts button[aria-pressed="true"], html[data-ppn="kilkenny"] h2 .n,
html[data-ppn="kilkenny"] .slcount:not(:empty) { background: var(--kk-blue-ink); border-color: var(--kk-blue-ink); }
html[data-ppn="kilkenny"] .switch input:checked + .track { background: var(--kk-blue-ink); }
html[data-ppn="kilkenny"] .results-head { border-left-color: var(--kk-blue); }
html[data-ppn="kilkenny"] .filters { border-bottom-color: var(--kk-blue); }
html[data-ppn="kilkenny"] h2 { color: var(--kk-dark); }
html[data-ppn="kilkenny"] .more, html[data-ppn="kilkenny"] .card a.more { color: var(--kk-blue-ink); }
/* the Kilkenny logo is a wide lockup with the name, like Sligo's */
html[data-ppn="kilkenny"] .brand img.wide { height: 46px; width: auto; max-width: 240px; }
@media (max-width: 520px) { html[data-ppn="kilkenny"] .brand img.wide { height: 36px; max-width: 180px; } }
/* 17 Nov 2026: no "Grants Finder" words beside the Kilkenny logo (Dan: clashes with the logo), as on Sligo. The page heading says what the site is. */
html[data-ppn="kilkenny"] .top .brand div { display: none; }
