/* toiletsearch.uk */

:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-2: #eef2f1;
  --ink: #14262a;
  --ink-2: #3d5157;
  --muted: #5f7277;
  --line: #dce4e1;
  --brand: #0b6e69;
  --brand-strong: #075652;
  --brand-soft: #dff0ec;
  --brand-ink: #ffffff;
  --focus: #e8a317;

  --free: #12733a;
  --free-soft: #e1f4e7;
  --paid: #a14a05;
  --paid-soft: #fcefd9;
  --wc: #1c48c4;
  --wc-soft: #e4ecfd;
  --baby: #93219f;
  --baby-soft: #f6e6f8;
  --key: #4335be;
  --key-soft: #eae8fc;
  --bad: #b42318;
  --bad-soft: #fde7e5;

  /* Pin colours match the map and stay the same in dark mode */
  --pin-free: #15803d;
  --pin-paid: #b45309;
  --pin-unknown: #0b6e69;
  --pin-restricted: #64748b;
  --pin-closed: #9aa3ab;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 40, 44, 0.05), 0 6px 18px rgba(15, 40, 44, 0.06);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1618;
    --surface: #152024;
    --surface-2: #1c2b2f;
    --ink: #e6eeec;
    --ink-2: #bccbc8;
    --muted: #92a5a2;
    --line: #283a3e;
    --brand: #3db2a6;
    --brand-strong: #63c8bd;
    --brand-soft: #143835;
    --brand-ink: #04211f;

    --free: #6ad99a;
    --free-soft: #133725;
    --paid: #f2b25f;
    --paid-soft: #3a2a12;
    --wc: #93b4ff;
    --wc-soft: #18284a;
    --baby: #e79bf0;
    --baby-soft: #3a1c3f;
    --key: #b3abff;
    --key-soft: #26204d;
    --bad: #ff9d94;
    --bad-soft: #43201d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 800;
}

h2 {
  font-size: 1.3rem;
  font-weight: 750;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--brand);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-strong);
}

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

svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}

.skip:focus {
  top: 8px;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.lede {
  color: var(--ink-2);
  font-size: 1.05rem;
  max-width: 62ch;
}

/* ---------------------------------------------------------------- header */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--ink);
}

.logo-mark {
  width: 26px;
  height: 32px;
  color: var(--brand);
}

.logo-text {
  font-weight: 650;
}

.logo-text strong {
  color: var(--brand);
  font-weight: 850;
}

.logo-text span {
  color: var(--muted);
  font-weight: 500;
}

.header-search {
  flex: 1 1 320px;
  max-width: 520px;
}

.header-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.header-nav a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

@media (max-width: 720px) {
  .header-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
  .header-nav a {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    gap: 8px 10px;
    min-height: 56px;
  }
  .logo {
    font-size: 1.08rem;
  }
  .logo-mark {
    width: 22px;
    height: 28px;
  }
  .header-nav {
    gap: 0;
  }
  .header-nav a {
    padding: 6px 8px;
    font-size: 0.88rem;
  }
  .header-nav a svg {
    display: none;
  }
}

/* ---------------------------------------------------------------- search */

.search {
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.search-box > svg {
  color: var(--muted);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 7px 4px;
  outline: none;
}

.search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.search-big .search-box {
  padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow);
}

.search-big input {
  font-size: 1.15rem;
  padding: 10px 4px;
}

.search-big .btn {
  padding: 0.8rem 1.5rem;
  font-size: 1.05rem;
}

@media (max-width: 480px) {
  .search-big .search-box {
    padding: 5px 5px 5px 14px;
  }
  .search-big input {
    font-size: 16px;
  }
  .search-big .btn {
    padding: 0.7rem 1rem;
    font-size: 1rem;
  }
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 40, 44, 0.16);
}

.suggestions li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
}

.suggestions li span {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: right;
}

.suggestions li[aria-selected='true'],
.suggestions li:hover {
  background: var(--brand-soft);
}

.search-msg {
  margin: 6px 0 0 18px;
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 0;
}

.search-msg:empty {
  display: none;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  border-color: var(--brand);
  color: var(--ink);
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
}

.btn-primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: var(--brand-ink);
}

.btn-small {
  padding: 0.38rem 0.8rem;
  font-size: 0.86rem;
}

.btn-ghost {
  background: color-mix(in srgb, var(--surface) 75%, transparent);
}

/* ------------------------------------------------------------------ home */

.hero {
  background:
    radial-gradient(1200px 380px at 80% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%),
    linear-gradient(180deg, var(--brand-soft), var(--bg));
  padding: clamp(40px, 8vw, 88px) 0 clamp(32px, 6vw, 64px);
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.hero .lede {
  font-size: 1.15rem;
  margin-bottom: 1.5em;
}

.hero .search {
  max-width: 660px;
}

.hero-or {
  margin: 16px 0 0;
}

.section {
  padding-top: 40px;
}

.town-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(150px, 45%), 1fr));
  gap: 10px;
}

.town-grid a,
.country-list a,
.result-list a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.town-grid a:hover,
.country-list a:hover,
.result-list a:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.town-grid span,
.country-list span,
.result-list span {
  color: var(--muted);
  font-size: 0.85rem;
}

.town-grid em {
  font-style: normal;
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 650;
  margin-top: auto;
  padding-top: 4px;
}

.more {
  margin-top: 16px;
  font-weight: 650;
}

.country-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.features h2 {
  font-size: 1.1rem;
}

.features p {
  color: var(--ink-2);
}

/* ------------------------------------------------------------ town page */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 16px;
  font-size: 0.86rem;
  color: var(--muted);
}

.crumbs a {
  color: var(--muted);
}

.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 10px 0 18px;
}

.page-intro h1 {
  margin-bottom: 0.2em;
}

.page-intro .lede {
  margin: 0;
}

.intro-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.explorer {
  display: grid;
  grid-template-areas: 'map' 'list';
}

.explorer-map {
  grid-area: map;
  position: relative;
  height: 56vh;
  min-height: 320px;
  max-height: 640px;
  background: var(--surface-2);
}

.explorer-list {
  grid-area: list;
  padding: 0 16px;
  min-width: 0;
}

@media (min-width: 900px) {
  .explorer {
    grid-template-areas: 'list map';
    grid-template-columns: minmax(360px, 440px) 1fr;
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
    align-items: start;
  }
  .explorer-list {
    padding: 0;
  }
  .explorer-map {
    position: sticky;
    top: 12px;
    height: calc(100vh - 24px);
    max-height: none;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .filters {
    padding-top: 0 !important;
  }
}

.map {
  position: absolute;
  inset: 0;
}

.map-note {
  padding: 24px;
  color: var(--muted);
}

.map-legend {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  max-width: calc(100% - 70px);
  padding: 6px 10px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-free { background: var(--pin-free); }
.dot-paid { background: var(--pin-paid); }
.dot-unknown { background: var(--pin-unknown); }
.dot-restricted { background: var(--pin-restricted); }

.map-zoom-note {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
  padding: 6px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
}

.centre-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid #14262a;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8), 0 1px 4px rgba(0, 0, 0, 0.35);
}

.you-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  border: 3px solid #fff;
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.2), 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* Filters */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--brand);
}

.chip[aria-pressed='true'] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
}

.chip[aria-pressed='true']::before {
  content: '✓';
}

.filter-count {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.filter-count:empty {
  display: none;
}

/* Toilet cards */

.toilet-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.toilet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  scroll-margin: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.toilet.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow);
}

.toilet[hidden] {
  display: none;
}

.toilet-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.toilet-title {
  min-width: 0;
}

.toilet h2,
.toilet h3,
.popup h3 {
  font-size: 1.02rem;
  margin: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.pin {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--pin-unknown);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pin-free { background: var(--pin-free); }
.pin-paid { background: var(--pin-paid); }
.pin-unknown { background: var(--pin-unknown); }
.pin-restricted { background: var(--pin-restricted); }
.pin-closed { background: var(--pin-closed); }

.where {
  margin: 2px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.open-state {
  margin: 4px 0 0;
  font-size: 0.86rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.open-state::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.open-state[hidden] {
  display: none;
}

.open-state.is-open { color: var(--free); }
.open-state.is-closed { color: var(--bad); }

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.badge {
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.5;
}

.badge-free { background: var(--free-soft); color: var(--free); }
.badge-paid { background: var(--paid-soft); color: var(--paid); }
.badge-wc { background: var(--wc-soft); color: var(--wc); }
.badge-wc-limited { background: var(--wc-soft); color: var(--wc); opacity: 0.85; }
.badge-baby { background: var(--baby-soft); color: var(--baby); }
.badge-key { background: var(--key-soft); color: var(--key); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-restrict { background: var(--surface-2); color: var(--ink); border: 1px dashed var(--muted); }
.badge-muted { background: transparent; color: var(--muted); border: 1px solid var(--line); }

.details {
  margin: 10px 0 0;
  font-size: 0.875rem;
  display: grid;
  gap: 3px;
}

.details div {
  display: grid;
  grid-template-columns: 6.4rem 1fr;
  gap: 8px;
}

.details dt {
  color: var(--muted);
}

.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.toilet-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.fix-link {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
}

.empty-filter,
.empty-state {
  padding: 18px;
  margin-top: 12px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-2);
}

.empty-filter[hidden] {
  display: none;
}

.near-town {
  margin-top: 16px;
  font-weight: 600;
}

.near-search {
  max-width: 560px;
  padding-bottom: 18px;
}

.near-search p {
  margin-bottom: 8px;
  color: var(--ink-2);
}

/* Text under the map */

.prose-sections {
  padding-top: 40px;
  max-width: 1200px;
}

.prose-sections section {
  max-width: 760px;
  margin-bottom: 32px;
}

.prose-sections p {
  color: var(--ink-2);
}

.faq h3 {
  font-size: 1rem;
  margin: 1.1em 0 0.3em;
}

.chip-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-links a {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.chip-links a:hover {
  border-color: var(--brand);
}

.chip-links span {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.82rem;
}

/* Popups */

.maplibregl-popup-content {
  background: var(--surface);
  color: var(--ink);
  border-radius: 14px;
  padding: 14px 16px 12px;
  font-family: var(--font);
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.maplibregl-popup-close-button {
  font-size: 20px;
  width: 30px;
  height: 30px;
  color: var(--muted);
  border-radius: 0 14px 0 8px;
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
  border-top-color: var(--surface);
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
  border-bottom-color: var(--surface);
}

.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: var(--surface);
}

.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: var(--surface);
}

.popup h3 {
  padding-right: 22px;
}

.popup .badges {
  margin-top: 8px;
}

.popup .details {
  font-size: 0.82rem;
}

.popup .details div {
  grid-template-columns: 5.4rem 1fr;
}

.popup .toilet-actions {
  margin-top: 10px;
}

.popup .btn-primary {
  color: var(--brand-ink);
}

.maplibregl-ctrl-attrib a {
  color: #333;
}

/* -------------------------------------------------------- towns index */

.page-towns {
  padding-top: 28px;
}

.page-towns .search {
  max-width: 560px;
  margin-bottom: 20px;
}

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.jump a {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  font-weight: 650;
  text-decoration: none;
}

.country {
  padding-top: 24px;
  scroll-margin-top: 12px;
}

.country > h2 {
  font-size: 1.6rem;
  border-bottom: 2px solid var(--line);
  padding-bottom: 8px;
}

.county {
  margin: 20px 0;
  scroll-margin-top: 12px;
}

.county h3 {
  font-size: 1.02rem;
  color: var(--ink-2);
}

.county ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 4 190px;
  column-gap: 24px;
}

.county li {
  break-inside: avoid;
  padding: 2px 0;
}

.county li span {
  color: var(--muted);
  font-size: 0.8rem;
}

.county:target h3 {
  color: var(--brand);
}

/* ---------------------------------------------------------- search page */

.page-search,
.page-404 {
  padding-top: 28px;
  min-height: 50vh;
}

.page-search .search,
.page-404 .search {
  max-width: 660px;
  margin-bottom: 24px;
}

.search-results h2 {
  margin-top: 24px;
}

.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.hint {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------------------------------------------------------- about page */

.prose {
  padding-top: 28px;
  max-width: 780px;
}

.prose h2 {
  margin-top: 1.8em;
  scroll-margin-top: 12px;
}

.prose li {
  margin-bottom: 0.5em;
}

.glossary div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.glossary dt {
  font-weight: 700;
}

.glossary dd {
  margin: 0;
  color: var(--ink-2);
}

@media (max-width: 560px) {
  .glossary div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.disclaimer {
  margin-top: 2em;
  color: var(--muted);
  font-size: 0.92rem;
}

code {
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.9em;
}

/* --------------------------------------------------------------- footer */

.site-footer {
  margin-top: 56px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 32px 0 calc(32px + env(safe-area-inset-bottom));
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner {
  display: grid;
  gap: 20px;
}

@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: 1fr 2fr;
  }
  .credits {
    grid-column: 1 / -1;
  }
}

.logo-small {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.logo-small .logo-mark {
  width: 20px;
  height: 25px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-content: start;
}

.site-footer nav a {
  color: var(--ink-2);
  font-weight: 600;
}

.credits {
  margin: 0;
  font-size: 0.82rem;
}

.credits a {
  color: var(--muted);
}

/* ---------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  animation: toast-in 0.2s ease-out;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ------------------------------------------------------- cookie banner */

.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 300;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 18px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  font-size: 0.92rem;
}

.consent p {
  margin: 0 0 12px;
  color: var(--ink-2);
}

.consent p strong {
  color: var(--ink);
}

.consent-actions {
  display: flex;
  gap: 10px;
}

.consent-actions .btn {
  flex: 1;
}

.near-warning {
  margin: 10px 0 0;
  padding: 10px 14px;
  max-width: 62ch;
  border-radius: 12px;
  background: var(--paid-soft);
  color: var(--ink);
  font-size: 0.92rem;
}

.contact-email {
  margin: 20px 0 8px;
}

.contact-email .btn {
  font-size: 1.05rem;
  padding: 0.75rem 1.3rem;
  white-space: normal;
}

/* --------------------------------------------------------------- guides */

.guide-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 12px;
}

.guide-grid a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}

.guide-grid a:hover {
  border-color: var(--brand);
}

.guide-grid strong {
  font-size: 1.02rem;
  line-height: 1.3;
}

.guide-grid span {
  color: var(--muted);
  font-size: 0.9rem;
}

.page-guides {
  padding-top: 8px;
}

.page-guide .crumbs {
  padding-top: 0;
  margin-bottom: 12px;
}

.updated {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: -4px;
}

.callout {
  margin: 1.2em 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--ink);
}

.guide-cta {
  margin: 1.6em 0;
}

.sources {
  font-size: 0.9rem;
}

.more-guides {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.more-guides h2 {
  margin-top: 0;
}

.accessible-list {
  list-style: none;
  margin: 0 0 1em;
  padding: 0;
  display: grid;
  gap: 6px;
}

.accessible-list li {
  color: var(--ink-2);
}

.accessible-list a {
  font-weight: 650;
}

/* ----------------------------------------------------------------- blog */

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 14px;
}

.post-list a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.post-list a:hover {
  border-color: var(--brand);
}

.post-list strong {
  font-size: 1.08rem;
  line-height: 1.3;
}

.post-list span {
  color: var(--ink-2);
  font-size: 0.93rem;
}

.post-list em {
  margin-top: auto;
  font-style: normal;
  color: var(--muted);
  font-size: 0.82rem;
}

.page-blog {
  padding-top: 8px;
}

.page-post .crumbs {
  padding-top: 0;
  margin-bottom: 12px;
}

.post-share {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2em 0;
}
