/* childcare.mt — plain, fast, readable. No framework.
   Parents are often on a phone, one-handed, in a hurry. Legibility over decoration. */

:root {
  --ink: #16202b;
  --ink-soft: #5b6b7c;
  --line: #dde4ea;
  --bg: #ffffff;
  --bg-soft: #f5f8fa;
  --accent: #10656d;
  --accent-soft: #e3f1f2;
  --yes: #1c6b3f;
  --yes-soft: #e2f3e9;
  --warn: #8a5a00;
  --warn-soft: #fdf3dd;
  --radius: 10px;
  --wrap: 62rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.05rem; margin: 0 0 .25rem; }
a { color: var(--accent); }
p { margin: 0 0 1rem; }

.lead { font-size: 1.1rem; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- chrome ---- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .9rem; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--ink); }
.brand span { color: var(--accent); }
.site-header nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; font-size: .95rem; }
.site-header nav a:hover { text-decoration: underline; }

.site-footer { margin-top: 4rem; border-top: 1px solid var(--line);
  background: var(--bg-soft); padding-block: 1.75rem; font-size: .9rem; }
.site-footer p { margin-bottom: .6rem; }

main.wrap { padding-block: 2rem; }

.banner-warn {
  background: var(--warn-soft); color: var(--warn); text-align: center;
  padding: .6rem 1rem; font-size: .9rem; border-bottom: 1px solid #e9d9ad;
}

.crumbs { font-size: .85rem; color: var(--ink-soft); margin-bottom: 1rem; }
.crumbs a { color: var(--ink-soft); }

.msg { padding: .7rem 1rem; border-radius: var(--radius); background: var(--warn-soft); }

/* ---- home ---- */
.hero { padding: 1rem 0 2rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.hero-search { display: flex; gap: .5rem; margin: 1.25rem 0 1rem; max-width: 34rem; }
.hero-search input { flex: 1; }
.hero-stats { font-size: .95rem; color: var(--ink-soft); }

.pills { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pills a {
  display: inline-block; padding: .45rem .8rem; border: 1px solid var(--line);
  border-radius: 999px; text-decoration: none; background: var(--bg-soft); font-size: .95rem;
}
.pills a:hover { border-color: var(--accent); }
.pills span { color: var(--ink-soft); font-size: .85em; }

.explain { background: var(--bg-soft); padding: 1.5rem; border-radius: var(--radius);
  margin-top: 2.5rem; }

.btn {
  display: inline-block; padding: .6rem 1.1rem; background: var(--accent); color: #fff;
  border-radius: var(--radius); text-decoration: none; font-weight: 600;
}
.btn:hover { filter: brightness(1.1); }

/* ---- forms ---- */
input[type=text], input[type=search], input[type=email], input[type=tel],
input[type=number], input[type=date], select, textarea {
  padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; width: 100%; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
button {
  padding: .6rem 1.2rem; background: var(--accent); color: #fff; border: 0;
  border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer;
}
button:hover { filter: brightness(1.1); }

.filters {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem; align-items: end; background: var(--bg-soft); padding: 1.25rem;
  border-radius: var(--radius); margin-bottom: 1.5rem;
}
.filters label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .25rem; }
.filter-check label { font-weight: 400; display: flex; align-items: center; gap: .4rem; }
.filter-check input { width: auto; }

.enquiry-form { display: grid; gap: .35rem; max-width: 32rem; }
.enquiry-form label { font-size: .85rem; font-weight: 600; margin-top: .5rem; }
.enquiry-form button { margin-top: 1rem; justify-self: start; }

.result-count { font-size: 1.05rem; }
.broadcast-hint {
  background: var(--accent-soft); padding: .7rem 1rem; border-radius: var(--radius);
  font-size: .95rem;
}
.broadcast { margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }

/* ---- cards ---- */
.cards { list-style: none; padding: 0; display: grid; gap: .75rem; }
.card {
  display: flex; gap: .75rem; align-items: flex-start; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; background: #fff;
}
.card:hover { border-color: var(--accent); }
.card-body { flex: 1; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card-loc { margin: 0 0 .5rem; color: var(--ink-soft); font-size: .92rem; }
.card-select input { width: auto; margin-top: .3rem; }
.empty { color: var(--ink-soft); padding: 1.5rem; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius); }

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.tag {
  font-size: .78rem; padding: .2rem .55rem; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--line);
}
.tag-scheme { background: var(--accent-soft); color: var(--accent); border-color: #bfdcde; }
.tag-spaces { background: var(--yes-soft); color: var(--yes); border-color: #b9dfc9; }

/* ---- centre profile ---- */
.centre-head { border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.5rem; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.fact { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.fact h2 { margin: 0 0 .5rem; font-size: .95rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-soft); }
.fact .yes { color: var(--yes); font-weight: 600; margin-bottom: .35rem; }
.fact .unknown { color: var(--ink-soft); font-style: italic; margin-bottom: .35rem; }

/* Provenance is deliberately visible, not hidden in small print: a regulatory claim
   without a source and date is the single biggest liability on this site. */
.provenance { font-size: .8rem; color: var(--ink-soft); margin: 0; }

.bands, .hours, .fees { list-style: none; padding: 0; margin: 0 0 .5rem; font-size: .95rem; }
.hours li { display: flex; justify-content: space-between; gap: 1rem; }
.phone { font-size: 1.15rem; font-weight: 600; }

.contact, .enquire, .similar, .locations { margin-top: 2.5rem; }
.listing-foot {
  margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  font-size: .85rem; color: var(--ink-soft);
}
.note {
  background: var(--warn-soft); color: var(--warn); padding: .8rem 1rem;
  border-radius: var(--radius); font-size: .9rem;
}

.prose { max-width: 42rem; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }

@media (max-width: 40rem) {
  h1 { font-size: 1.6rem; }
  .hero-search { flex-direction: column; }
  .hero-search button { width: 100%; }
}

/* ---- trust badges ----
   Two states only. There is deliberately no "verified" styling for unclaimed
   listings: a badge we cannot stand behind is worse than no badge. */
.badge {
  display: inline-block; font-size: .82rem; padding: .3rem .7rem;
  border-radius: 999px; margin: .5rem 0 0;
}
.badge-confirmed { background: var(--yes-soft); color: var(--yes); border: 1px solid #b9dfc9; }
.badge-public { background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--line); }

/* ---- claim / operator forms ---- */
.hours-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: .5rem 1rem; margin-bottom: 1rem;
}
.hours-field {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  font-size: .85rem; font-weight: 400;
}
.hours-field input[type=time] { width: auto; }
.hours-field input[type=checkbox] { width: auto; }

/* ---- map ---- */
#map {
  height: 30rem; border-radius: var(--radius); border: 1px solid var(--line);
  margin-bottom: .75rem; background: var(--bg-soft); z-index: 0;
}
.map-legend {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem;
  font-size: .85rem; color: var(--ink-soft); margin-bottom: 1.5rem;
}
.key { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%;
  vertical-align: -1px; margin-right: .2rem; }
.key-scheme { background: var(--accent); }
.key-other { background: #8a94a0; }
.map-note { flex-basis: 100%; font-style: italic; }

/* Leaflet divIcon wrapper has no box of its own - the blob inside does the work. */
.blob-wrap { background: none; border: 0; }
.blob {
  display: block; border-radius: 50%; background: var(--accent); color: #fff;
  font-weight: 700; text-align: center; font-size: .85rem;
  box-shadow: 0 0 0 3px rgba(16,101,109,.25); cursor: pointer;
}
.blob:hover { filter: brightness(1.15); }
.blob-label {
  display: block; text-align: center; font-size: .72rem; color: var(--ink);
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; white-space: nowrap;
  margin-top: 2px; pointer-events: none;
}
.pop-scheme { color: var(--accent); font-weight: 600; }
.leaflet-container { font: inherit; }

@media (max-width: 40rem) { #map { height: 22rem; } }

/* ---- guide tables ---- */
.std-table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .95rem; }
.std-table th, .std-table td {
  text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--line);
}
.std-table th { background: var(--bg-soft); font-size: .85rem; }

/* ---- quoted source material ----
   Regulatory quotes are set apart deliberately: on this site the difference between
   "the rule says X" and "a centre told me X" is the whole point. */
.prose blockquote {
  margin: 1.25rem 0; padding: .9rem 1.1rem; background: var(--bg-soft);
  border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
}
.prose blockquote p { margin-bottom: .4rem; }
.prose blockquote cite {
  display: block; font-size: .8rem; color: var(--ink-soft); font-style: normal;
}
.prose h3 { font-size: 1rem; margin: 1.5rem 0 .4rem; }

/* Approximate pins are visually distinct so the map never implies a precision it
   doesn't have - about 44% of Maltese childcare addresses can't be geocoded. */
.key-approx { background: var(--accent); opacity: .35; border: 1px dashed var(--accent); }
.pop-precision { font-size: .78rem; color: var(--ink-soft); }

/* Basemap switcher — Leaflet's default control is cramped on mobile. */
.leaflet-control-layers { border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.leaflet-control-layers-expanded { padding: .5rem .7rem; font-size: .9rem; }
.leaflet-control-layers-base label { display: flex; align-items: center; gap: .35rem;
  cursor: pointer; padding: .1rem 0; }
.leaflet-control-layers-base input { width: auto; margin: 0; }

/* Ctrl/Cmd + scroll hint. Appears only when someone scrolls over the map WITHOUT the
   modifier — i.e. exactly when they need telling, and never otherwise. */
.map-shell { position: relative; }
.map-hint {
  position: absolute; inset: 0; z-index: 500; margin: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(22,32,43,.55); color: #fff; font-weight: 600;
  border-radius: var(--radius); pointer-events: none;
  opacity: 0; transition: opacity .18s ease; text-align: center; padding: 1rem;
}
.map-hint.is-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .map-hint { transition: none; } }

/* Per-centre specifics. Deliberately ABOVE the fact cards, because those cards are
   necessarily similar across centres until operators fill them in - this is the part
   that differs. */
.specifics { margin-bottom: 1.5rem; }
.specifics dl { margin: 0; display: grid; gap: .5rem; }
.specifics dl > div { display: flex; gap: .75rem; flex-wrap: wrap; align-items: baseline; }
.specifics dt { flex: 0 0 6.5rem; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-soft); font-weight: 600; }
.specifics dd { margin: 0; flex: 1; min-width: 12rem; }

/* The single "what we don't know" line. Deliberately quiet — it's an honest note and a
   claim prompt, not an error state. */
.gaps {
  font-size: .9rem; color: var(--ink-soft); background: var(--bg-soft);
  padding: .8rem 1rem; border-radius: var(--radius); margin-top: 1rem;
}

/* Invitation to suggest a centre. Quiet — it's an offer, not an apology. */
.suggest {
  margin-top: 3rem; padding: 1.25rem 1.5rem; background: var(--bg-soft);
  border-radius: var(--radius); border: 1px solid var(--line);
}
.suggest h2 { margin-top: 0; font-size: 1.05rem; }
.suggest p { margin-bottom: 0; font-size: .95rem; color: var(--ink-soft); }

/* ---- centre-page mini-map ----
   A locator, not an explorer. The precision line under it is plain HTML so it is
   there before (and without) the renderer, and it is never softened: a faded pin on a
   town centroid is what we know, and the page says so. */
.minimap { margin: 0 0 1.75rem; }
.minimap-shell { position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-soft); }
.minimap-shell.is-approx { border-style: dashed; }
.minimap-canvas { height: 16rem; display: flex; align-items: center; justify-content: center;
  z-index: 0; }
.minimap-canvas.leaflet-container { display: block; }
.minimap-load {
  font: inherit; font-weight: 600; padding: .6rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--accent); background: var(--bg); color: var(--accent); cursor: pointer;
}
.minimap-load:hover { background: var(--accent-soft); }
.minimap-load[disabled] { opacity: .6; cursor: default; }
.minimap-precision { font-size: .85rem; color: var(--ink-soft); margin: .5rem 0 0; }
.minimap-precision a { white-space: nowrap; margin-left: .25rem; }
.minimap-fail { font-size: .85rem; color: var(--warn); margin: .5rem 0 0; }
.minimap-label { font: inherit; font-size: .8rem; font-weight: 600; color: var(--ink);
  background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: none; padding: .15rem .45rem; }
.minimap-label::before { display: none; }
@media (max-width: 40rem) { .minimap-canvas { height: 13rem; } }

/* ---- Free Childcare Scheme calculator ----
   Transparency is the product: the working is a table, not a single number, and the
   Parent-1 rule sits above the form where it cannot be scrolled past. */
.calc-rule {
  background: var(--warn-soft); border-left: 4px solid var(--warn); color: var(--ink);
  padding: .9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.25rem 0 1.5rem;
}
.calc-rule-head { font-size: 1.15rem; font-weight: 700; color: var(--warn); margin-bottom: .35rem; }
.calc-rule p:last-child { margin-bottom: 0; }

.calc-form {
  background: var(--bg-soft); padding: 1.25rem; border-radius: var(--radius);
  display: grid; gap: 1rem; margin-bottom: 1.5rem;
}
.calc-basis { border: 0; padding: 0; margin: 0; display: grid; gap: .4rem; }
.calc-basis legend { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; padding: 0; }
.calc-basis label { display: flex; align-items: baseline; gap: .5rem; }
.calc-basis input { width: auto; }
.calc-hours label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.calc-hours-row { display: flex; gap: .5rem; max-width: 26rem; }
.calc-hours-row input { flex: 0 0 8rem; font-size: 1.15rem; }
.calc-hours-row input:disabled, .calc-hours-row select:disabled { opacity: .5; }
.calc-hint { font-size: .85rem; margin: .4rem 0 0; }
.calc-error { color: var(--warn); background: var(--warn-soft); padding: .6rem .9rem;
  border-radius: 8px; margin: 0; font-size: .95rem; }
.calc-form button[type=submit] { justify-self: start; }

.calc-result { border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 2rem; }
.calc-total { margin: 0 0 .35rem; font-size: 1.5rem; }
.calc-total strong { color: var(--accent); }
.calc-per-week { color: var(--ink-soft); }
.calc-working th { font-weight: 600; white-space: normal; }
.calc-working .calc-how { color: var(--ink-soft); font-size: .88rem; }
.calc-working .calc-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-working .calc-sum th, .calc-working .calc-sum td { border-top: 2px solid var(--ink);
  border-bottom: 0; }
.calc-student { margin: 1rem 0; }
.calc-student p { margin: 0; }
.calc-210 { background: var(--accent-soft); padding: .8rem 1rem; border-radius: var(--radius);
  font-size: .95rem; }
.btn-quiet {
  background: none; color: var(--accent); border: 1px solid var(--accent);
  padding: .55rem 1rem; border-radius: var(--radius); font-weight: 600; margin-left: .5rem;
}
.btn-quiet:hover { background: var(--accent-soft); filter: none; }
.calc-source { margin-top: 2rem; }
.calc-source .provenance { margin-bottom: .6rem; font-size: .85rem; }
.calc-faq h3 { margin-top: 1.5rem; }
.calc-back { margin-top: 2.5rem; }

@media (max-width: 40rem) {
  .calc-working .calc-how { display: block; }
  .calc-working td, .calc-working th { padding: .45rem .4rem; }
  .btn-quiet { margin: .5rem 0 0; display: inline-block; }
}

/* Calculator step 2: absence entitlement. Same table idiom; the verdict is the one
   line a parent needs, coloured by whether the allowance survives the year. */
.calc-form-2 { margin-top: 1rem; }
.calc-hours-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.calc-hours-grid label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.calc-hours-grid input { font-size: 1.15rem; max-width: 10rem; }
.calc-absence { margin-bottom: 1.5rem; }
.calc-verdict { padding: .8rem 1rem; border-radius: var(--radius); }
.calc-verdict-ok { background: var(--yes-soft); color: var(--yes); }
.calc-verdict-bad { background: var(--warn-soft); color: var(--warn); }

/* ---- distance search ----
   "Near me" ordering. Deliberately quiet: a distance is a supporting fact on a card,
   not a headline, and half of them are only as good as a town centroid. */
.filter-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.card-distance { margin: 0 0 .5rem; font-size: .88rem; color: var(--ink-soft); }
.active-location {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .6rem .9rem; font-size: .92rem; margin-bottom: .75rem;
}
.active-location a { margin-left: .4rem; }
