/* ==========================================================================
   Home Council – main stylesheet
   Mobile-first. Breakpoints: 30em (480px), 40em (640px), 48em (768px), 64em (1024px)
   ========================================================================== */

/* Design tokens
   ========================================================================== */
:root {
  --brand: #017191;
  --brand-dark: #015A73;
  --green: #1E9E5A;
  --green-hover: #178049;
  --amber: #F2B33D;
  --amber-tint: #FDF3DC;
  --ink: #1C2430;
  --mist: #F2F5F8;
  --line: #DDE3EA;
  --muted: #4A5868;
  --field: #7B8A9E;   /* form field borders: 3.5:1 on white */
  --white: #FFFFFF;

  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 1180px;
  --gutter: 20px;
  --radius: 10px;
  --radius-lg: 16px;
  --section-y: clamp(56px, 8vw, 96px);
  --header-h: 72px;

  --focus: var(--brand); /* focus ring colour; switched to amber on navy backgrounds */
}

@media (min-width: 48em) {
  :root { --gutter: 32px; }
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--brand);
}

h1 { font-size: clamp(2.25rem, 1.55rem + 3vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.375rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 1em; }

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { text-decoration-thickness: 2px; }

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

main:focus { outline: none; }

/* Elements hidden with the hidden attribute stay hidden even when a class gives them a display value */
[hidden] { display: none !important; }

.on-dark  { --focus: var(--white); } /* white focus ring on teal */
.on-light { --focus: var(--brand); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--white);
  font-weight: 600;
  --focus: var(--white);
}

.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow { max-width: calc(860px + 2 * var(--gutter)); }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Placeholders (remove once real content is in)
   ========================================================================== */
.ph {
  padding: 16px;
  border: 2px dashed #9AA8B8;
  border-radius: 6px;
  background: #F7F9FB;
  color: #5A6B80;
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
}

.img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #E3E9F0;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
}

.widget-ph {
  margin-bottom: 24px;
  padding: 32px 16px;
  border: 2px dashed #9AA8B8;
  border-radius: var(--radius);
  background: var(--white);
  color: #5A6B80;
  font-weight: 600;
  text-align: center;
}

/* Buttons
   Labels are 19px bold so white on green meets WCAG AA for large text.
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px 28px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-family: var(--font-head);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn .icon { width: 20px; height: 20px; }

.btn-green {
  background: var(--green);
  color: var(--white);
}

.btn-green:hover { background: var(--green-hover); }

.btn-outline-light {
  border-color: var(--white);
  background: transparent;
  color: var(--white);
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--brand);
}

/* Main button on teal backgrounds (hero, CTA band): white with teal text */
.btn-light {
  background: var(--white);
  color: var(--brand);
}

.btn-light:hover {
  background: #E3F1F5;
  color: var(--brand-dark);
}

.btn-block { width: 100%; }

.btn-secondary {
  border-color: var(--brand);
  background: var(--white);
  color: var(--brand);
}

.btn-secondary:hover { background: var(--mist); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-green:disabled:hover { background: var(--green); }

/* Tick icon (selling points, hero bullets) */
.tick {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--green);
}

.tick circle { fill: currentColor; }

.tick path {
  fill: none;
  stroke: var(--white);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* On the teal hero, green ticks would barely show, so they are white with a teal tick */
.hero .tick { color: var(--white); }

.hero .tick path { stroke: var(--brand); }

/* Top bar
   ========================================================================== */
.topbar {
  background: var(--brand-dark);
  color: var(--white);
  font-size: 0.9375rem;
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
  padding-block: 6px;
}

.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--white);
  text-decoration: none;
}

.topbar a:hover { text-decoration: underline; }

/* The phone number shows as plain text until $phone_tel is set in includes/config.php */
.topbar-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

/* Header and navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

/* The logo sets the height of the bar, so it stays the same when the mobile menu opens */
.logo {
  display: inline-flex;
  align-items: center;
  min-height: var(--header-h);
  color: var(--brand);
  text-decoration: none;
}

.logo img {
  width: auto;
  height: 36px;
}

@media (min-width: 64em) {
  .logo img { height: 44px; }
}

.logo-text {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Burger button: only shown when JS is running, below 1024px */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--brand);
  font: 600 1rem/1 var(--font-body);
  cursor: pointer;
}

.js .nav-toggle { display: inline-flex; }

.burger,
.burger::before,
.burger::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.burger { position: relative; }

.burger::before,
.burger::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger::before { top: -6px; }
.burger::after  { top: 6px; }

.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after  { transform: translateY(-6px) rotate(-45deg); }

/* Mobile menu panel */
.primary-nav { flex-basis: 100%; }

.js .primary-nav { display: none; }

.js .primary-nav.is-open {
  display: block;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.menu,
.submenu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu { padding-bottom: 12px; }

.menu > li { border-top: 1px solid var(--line); }

.menu a {
  display: block;
  padding: 13px 12px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.menu a:hover { color: var(--brand); text-decoration: underline; }

/* "Legal services" is a button that opens its dropdown, styled to match the links */
.submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 13px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.submenu-toggle:hover { color: var(--brand); }

.menu a[aria-current="page"],
.menu a.is-active,
.submenu-toggle.is-active {
  color: var(--brand);
  font-weight: 600;
  box-shadow: inset 4px 0 0 var(--green);
}

.submenu-toggle svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.submenu {
  padding: 4px 0 8px;
  background: var(--mist);
  border-radius: 8px;
}

.js .submenu { display: none; }
.js .submenu.is-open { display: block; }

.submenu a { padding: 10px 12px 10px 28px; }

/* Desktop navigation */
@media (min-width: 64em) {
  .js .nav-toggle { display: none; }

  .primary-nav,
  .js .primary-nav {
    display: block;
    flex-basis: auto;
  }

  .menu {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0;
  }

  .menu > li {
    position: relative;
    border: 0;
  }

  .menu > li > a,
  .submenu-toggle {
    position: relative;
    padding: 10px 12px;
    border-radius: 6px;
  }

  .submenu-toggle {
    width: auto;
    justify-content: flex-start;
  }

  .submenu-toggle svg {
    width: 18px;
    height: 18px;
  }

  .menu a[aria-current="page"],
  .menu a.is-active,
  .submenu-toggle.is-active { box-shadow: none; }

  .menu > li > a[aria-current="page"]::after,
  .menu > li > a.is-active::after,
  .submenu-toggle.is-active::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 2px;
    left: 12px;
    height: 3px;
    border-radius: 2px;
    background: var(--green);
  }

  .submenu-toggle.is-active::after { right: 36px; } /* under the text, not the arrow */

  .submenu,
  .js .submenu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 60;
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 18px 40px -16px rgba(1, 113, 145, 0.35);
  }

  /* Without JS the dropdown opens on hover; this bridge keeps it open while the mouse moves onto it */
  .submenu::before {
    content: "";
    position: absolute;
    top: -10px;
    right: 0;
    left: 0;
    height: 10px;
  }

  .js .submenu.is-open,
  html:not(.js) .has-submenu:focus-within > .submenu { display: block; }

  .submenu a {
    padding: 10px 14px;
    border-radius: 8px;
  }

  .submenu a:hover {
    background: var(--mist);
    text-decoration: none;
  }

  .submenu a[aria-current="page"] {
    background: var(--mist);
    box-shadow: inset 3px 0 0 var(--green);
  }
}

/* With JS the button alone controls the dropdown, so aria-expanded always matches what is on screen */
@media (min-width: 64em) and (hover: hover) {
  html:not(.js) .has-submenu:hover > .submenu { display: block; }
}

/* Selling-points strip
   ========================================================================== */
.strip {
  border-bottom: 1px solid #F1DFB3;
  background: var(--amber-tint);
}

.strip-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 auto;
  padding-block: 10px;
  list-style: none;
}

.strip-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.strip-list .tick {
  width: 20px;
  height: 20px;
}

/* Compact placeholder so the strip stays thin */
.strip .ph {
  padding: 3px 10px;
  font-size: 0.9375rem;
}

@media (min-width: 48em) {
  .strip-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 40px;
  }
}

/* Sections and layouts
   ========================================================================== */
.section { padding-block: var(--section-y); }

.section-mist { background: var(--mist); }

.split {
  display: grid;
  gap: 32px;
}

@media (min-width: 48em) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
  }

  .split-media { align-items: center; }
}

@media (min-width: 64em) {
  .split { gap: 72px; }
}

/* Two text columns, separated by a rule */
.split-text > * + * {
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

@media (min-width: 48em) {
  .split-text { gap: 0; }

  .split-text > :first-child { padding-right: 48px; }

  .split-text > * + * {
    padding-top: 0;
    padding-left: 48px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

@media (min-width: 64em) {
  .split-text > :first-child { padding-right: 72px; }
  .split-text > * + * { padding-left: 72px; }
}

/* Hero
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--brand);
  color: var(--white);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg > img,
.hero-bg > .img-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: auto;
  border-radius: 0;
}

/* Navy overlay over the background image */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(1, 113, 145, 0.92); /* 0.92 keeps white text above 4.5:1 even over a white photo */
}

.hero-bg > .img-ph {
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px var(--gutter);
}

.hero-bg > .img-ph span {
  position: relative;
  z-index: 2;
  color: var(--white);
  font-size: 0.8125rem;
}

/* Hero photo with a fallback: the [IMAGE] placeholder only shows if the photo fails to load */
.hero-bg > img + .img-ph { display: none; }
.hero-bg.is-missing > img { display: none; }
.hero-bg.is-missing > img + .img-ph { display: flex; }

.hero-inner {
  display: grid;
  gap: 40px;
  padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 96px);
}

.hero h1 { color: var(--white); }

.hero-copy > .ph { margin-bottom: 24px; }

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

.ticks li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ticks .ph { flex: 1; }

/* Tick list laid out as a grid, e.g. "Signs to look for" */
.ticks-grid {
  gap: 16px 40px;
  margin: 0;
}

@media (min-width: 48em) {
  .ticks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64em) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    align-items: center;
    gap: 72px;
  }
}

/* Claim form card */
.form-card {
  width: 100%;
  max-width: 600px;
  padding: clamp(22px, 4vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 24px 48px -20px rgba(4, 12, 28, 0.6);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.form-card h2 {
  margin-bottom: 4px;
  font-size: 1.625rem;
}

.form-note {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.form-card form {
  display: grid;
  gap: 16px;
}

.field-row {
  display: grid;
  gap: 16px;
}

@media (min-width: 30em) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 0.9375rem;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid var(--field);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--brand);
  outline: 3px solid var(--brand);
  outline-offset: 1px;
}

.field input:user-invalid,
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #B42318; }

/* Form errors: a message under each field, and a summary box at the top (filled by forms.js or send.php) */
.field-error {
  margin: 6px 0 0;
  color: #B42318;
  font-size: 0.9375rem;
  font-weight: 600;
}

.error-summary {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 2px solid #B42318;
  border-radius: 8px;
  background: #FDF1F0;
  color: var(--ink);
}

.error-summary:focus { outline: 3px solid var(--focus); outline-offset: 2px; }

.error-summary-title {
  margin: 0 0 6px;
  color: #B42318;
  font-weight: 700;
}

.error-summary ul {
  margin: 0;
  padding-left: 1.2em;
}

.error-summary a {
  color: #B42318;
  font-weight: 600;
}

.error-summary p:last-child { margin: 8px 0 0; }

.calc-step .error-summary { margin-top: 16px; }

/* Thank-you page */
.thank-you { padding-block: clamp(72px, 12vw, 144px); }

.thank-you p {
  margin-bottom: 28px;
  font-size: 1.125rem;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.consent input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: none;
  accent-color: var(--green);
}

.form-card .btn-block { margin-top: 4px; }

/* Honeypot: off-screen rather than display:none, which some bots skip */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Reviews
   ========================================================================== */
.review-grid {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

@media (min-width: 48em) {
  .review-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.review-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.review-card blockquote { margin: 0 0 16px; }

/* Decorative opening quote mark, not read out by screen readers */
.review-card blockquote::before {
  content: "\201C";
  content: "\201C" / "";
  display: block;
  height: 36px;
  color: var(--brand);
  font-family: var(--font-head);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
}

.review-card blockquote p { margin: 0; }

.review-card figcaption {
  margin-top: auto; /* names line up along the bottom of the cards */
  color: var(--brand);
  font-weight: 600;
}

/* Issues grid: the focal point of the homepage
   ========================================================================== */
.section-issues { padding-block: clamp(64px, 10vw, 120px); }

.issues-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 40em) {
  .issues-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr; /* every tile the same height */
    gap: 20px;
  }
}

@media (min-width: 64em) {
  .issues-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  /* Issue pages: 6 cards and no intro tile fill a 3 x 2 grid */
  .issues-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.issues-title { margin-bottom: 32px; }

.issues-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--brand);
  color: var(--white);
}

.issues-head h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.125rem);
}

.issues-head-link {
  margin-top: auto;
  color: var(--white);
  font-weight: 600;
}

/* Photo cards: the whole card is the link */
.issue-card {
  position: relative;
  isolation: isolate;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #C9D3DE; /* shows while the photo loads, or if it is missing */
  color: var(--white);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.issue-card img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Hover and keyboard focus: the card grows and lifts, the photo zooms, and a green ring appears */
.issue-card:hover,
.issue-card:focus-visible {
  z-index: 1;
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 0 0 3px var(--green), 0 24px 40px -16px rgba(1, 113, 145, 0.55);
}

.issue-card:hover img,
.issue-card:focus-visible img { transform: scale(1.08); }

.issue-card:hover .issue-card-title,
.issue-card:focus-visible .issue-card-title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Round "go" button in the corner, so the card looks clickable even before hovering */
.issue-card-go {
  position: absolute;
  right: 16px;
  bottom: 13px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  color: var(--white);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.issue-card-go svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}

.issue-card:hover .issue-card-go,
.issue-card:focus-visible .issue-card-go {
  border-color: var(--green);
  background: var(--green);
}

.issue-card:hover .issue-card-go svg,
.issue-card:focus-visible .issue-card-go svg { transform: translateX(2px); }

/* Teal fade over the bottom half so the white title always has 4.5:1 contrast, even over a white photo.
   The minimum height keeps a two-line title on the dark part of the fade in small cards. */
.issue-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: max(50%, 7.5rem);
  background: linear-gradient(to top, rgba(1, 113, 145, 0.95) 0%, rgba(1, 113, 145, 0.92) 65%, rgba(1, 113, 145, 0) 100%);
  pointer-events: none;
}

.issue-card-title {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  margin: 0;
  padding: 20px 68px 20px 20px; /* room on the right for the round "go" button */
  color: var(--white);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
}

/* "[IMAGE: ...]" label, shown only when the photo fails to load (the img's onerror adds .is-missing) */
.issue-card-label {
  display: none;
  position: absolute;
  inset: 0 0 50%;
  z-index: 1;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

.issue-card.is-missing img { opacity: 0; }

.issue-card.is-missing .issue-card-label { display: flex; }

@media (min-width: 40em) {
  .issues-head { padding: 32px; }
}

/* FAQ
   ========================================================================== */
.faq { max-width: calc(860px + 2 * var(--gutter)); }

.faq h2 { margin-bottom: 24px; }

.faq-list { border-top: 1px solid var(--line); }

.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary > .ph { flex: 1; }

.faq-icon {
  position: relative;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: var(--mist);
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  border-radius: 2px;
  background: var(--brand);
  transition: transform 0.2s ease;
}

.faq-icon::after { transform: rotate(90deg); }

.faq-item[open] .faq-icon::after { transform: rotate(0deg); }

.faq-answer { padding-bottom: 24px; }

.faq-answer p:last-child { margin-bottom: 0; }

/* Breadcrumb
   ========================================================================== */
.breadcrumb {
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  margin-block: 0;
  padding-block: 10px;
  list-style: none;
}

.breadcrumb li + li::before {
  content: "/";
  content: "/" / ""; /* separator is not read out by screen readers */
  margin-inline: 8px;
  color: #8A99AB;
}

.breadcrumb a { color: var(--ink); }

.breadcrumb [aria-current="page"] { color: var(--muted); }

/* Photo with a fallback label (e.g. issue detail images)
   ========================================================================== */
.photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: #E3E9F0;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* "[IMAGE: ...]" label, shown only when the photo fails to load (the img's onerror adds .is-missing) */
.photo-label {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
}

.photo.is-missing img { opacity: 0; }

.photo.is-missing .photo-label { display: flex; }

/* CTA band
   ========================================================================== */
.cta-band {
  padding-block: clamp(48px, 6vw, 72px);
  background: var(--brand);
  color: var(--white);
}

.cta-band-inner {
  display: grid;
  gap: 28px;
}

.cta-band-title {
  margin-bottom: 12px;
  color: var(--white);
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-band-actions .btn { flex: 1 1 240px; }

/* "Call [PHONE]" as plain text, until $phone_tel is set in includes/config.php */
.cta-phone,
.calc-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  font-family: var(--font-head);
  font-size: 1.1875rem;
  font-weight: 700;
}

.cta-phone { color: var(--white); }

.calc-phone { color: var(--brand); }

.cta-phone .icon,
.calc-phone .icon {
  width: 20px;
  height: 20px;
}

@media (min-width: 64em) {
  .cta-band-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 64px;
  }

  .cta-band-actions .btn { flex: 0 0 auto; }
}

/* Footer
   ========================================================================== */
.site-footer {
  padding-top: clamp(48px, 6vw, 72px);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--brand-dark);
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
}

.footer-grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 40em) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64em) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
    gap: 48px;
  }
}

.site-footer .logo {
  min-height: 0;
  margin-bottom: 16px;
  color: var(--white);
}

.site-footer .logo img { height: 40px; }

.footer-title {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-links a {
  display: inline-block;
  padding-block: 5px;
}

.footer-contact {
  display: grid;
  gap: 12px;
  font-style: normal;
}

.footer-contact > a,
.footer-contact > span,
.footer-address {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  overflow-wrap: anywhere;
}

.footer-contact .icon { margin-top: 4px; }

.footer-address .ph { flex: 1; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 48px;
  padding-block: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.9375rem;
}

.footer-bottom p { margin: 0; }

.footer-bottom .ph { flex: 1 1 320px; }

.footer-partner {
  padding-bottom: 24px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.78);
}

.footer-partner p { margin: 0; }

/* ==========================================================================
   Calculator
   claim-calculator.php, plus the static preview in the homepage promo band
   ========================================================================== */
.calc-head { margin-bottom: 32px; }

.calc-head h1 { margin-bottom: 16px; }

.calc-card {
  --calc-pad: clamp(20px, 4vw, 40px);
  padding: var(--calc-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 24px 48px -32px rgba(1, 113, 145, 0.35);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.calc-noscript { margin: 0; }

/* Progress: "Step X of Y" and bar */
.calc-progress { margin-bottom: 28px; }

.calc-progress-text {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
}

.calc-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--mist);
}

.calc-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.3s ease;
}

/* Steps */
.calc-step {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* A simple fade when a step appears; switched off by the reduced-motion rules at the end of this file */
@media (prefers-reduced-motion: no-preference) {
  .calc-step,
  .calc-result { animation: calc-fade 0.25s ease; }
}

@keyframes calc-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.calc-question {
  margin-bottom: 8px;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
}

/* calculator.js moves focus to each new question for screen readers; it is not a control, so no ring */
.calc-question:focus { outline: none; }

.calc-hint {
  margin-bottom: 0;
  color: var(--muted);
}

.calc-error {
  margin: 8px 0 0;
  color: #B42318;
  font-weight: 600;
}

/* Answer cards: 2 per row on phones */
.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

@media (min-width: 40em) {
  .choices { gap: 16px; }
  .choices-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 48em) {
  .choices-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.choice {
  position: relative;
  display: block;
  cursor: pointer;
}

/* The real radio or checkbox covers the whole card invisibly, so clicks, taps, keyboard and screen readers all use it */
.choice-input {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-box {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  min-height: 64px;
  padding: 16px 52px 16px 18px;
  border: 1.5px solid var(--field);
  border-radius: 12px;
  background: var(--white);
  color: var(--brand);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.choice-title {
  font-weight: 600;
  line-height: 1.3;
}

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

.choice-input:focus-visible + .choice-box {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}

/* Selected: green border and green tick badge (.is-selected is for the static homepage preview) */
.choice-input:checked + .choice-box,
.choice-box.is-selected {
  border-color: var(--green);
  box-shadow: 0 0 0 1.5px var(--green);
}

.choice:not(.choice-photo) .choice-input:checked + .choice-box { background: #F0F9F4; }

.choice-tick {
  position: absolute;
  top: 50%;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  border: 1.5px solid var(--field);
  border-radius: 50%;
  background: var(--white);
}

/* Square badge for multi-select questions */
.choice-input[type="checkbox"] + .choice-box .choice-tick { border-radius: 7px; }

.choice-tick svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--white);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.choice-input:checked + .choice-box .choice-tick,
.choice-box.is-selected .choice-tick {
  border-color: var(--green);
  background: var(--green);
}

.choice-input:checked + .choice-box .choice-tick svg,
.choice-box.is-selected .choice-tick svg { opacity: 1; }

/* Photo answer cards: same overlay style as the homepage issue cards, smaller */
.choice-photo .choice-box {
  display: block;
  aspect-ratio: 4 / 3;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  background: #C9D3DE; /* shows while the photo loads, or if it is missing */
}

.choice-photo .choice-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.choice-photo .choice-box::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: max(55%, 5.5rem); /* tall enough for a two-line title on small phone cards */
  background: linear-gradient(to top, rgba(1, 113, 145, 0.95) 0%, rgba(1, 113, 145, 0.92) 65%, rgba(1, 113, 145, 0) 100%);
}

.choice-photo .choice-title {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 10px 12px;
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1rem;
}

.choice-photo .choice-tick {
  top: 8px;
  right: 8px;
  margin-top: 0;
  border-color: var(--white);
}

.choice-photo:hover .choice-box { box-shadow: 0 0 0 2px var(--brand); }

.choice-photo .choice-input:checked + .choice-box,
.choice-photo .choice-box.is-selected { box-shadow: 0 0 0 3px var(--green); }

/* "Other" has no photo */
.choice-photo .choice-box-plain { background: var(--brand); }

.choice-photo .choice-box-plain::after { display: none; }

/* Landlord cards: the pictures are icons on a white background, so they're shown whole (contain) on white,
   with the title in a solid teal bar underneath instead of a fade over the picture */
.choice-icon .choice-box {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  aspect-ratio: auto; /* a fixed-height icon area, so a two-line title on phones doesn't shrink the icon */
  border: 1.5px solid var(--field);
  background: var(--white);
}

.choice-icon .choice-box img {
  position: static;
  flex: 1 0 auto; /* takes up any extra height, so the title bar always sits at the bottom of the card */
  width: 100%;
  height: clamp(96px, 24vw, 132px);
  object-fit: contain;
}

.calc-preview .choice-icon .choice-box img { height: 84px; }

.choice-icon .choice-box::after { display: none; }

.choice-icon .choice-title {
  position: static;
  background: var(--brand);
}

.choice-icon .choice-tick { border-color: var(--field); }

/* "[IMAGE: ...]" label, shown only when the photo fails to load (the img's onerror adds .is-missing) */
.choice-media-label {
  display: none;
  position: absolute;
  inset: 0 0 45%;
  z-index: 1;
  align-items: flex-start; /* top of the card, clear of two-line titles on phones */
  justify-content: center;
  padding: 6px 38px 6px 8px;
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1.2;
  text-align: center;
}

.choice-box.is-missing img { opacity: 0; }

.choice-box.is-missing .choice-media-label { display: flex; }

/* Step 1 extras */
.calc-landlord-name {
  max-width: 480px;
  margin-top: 24px;
}

.calc-notice {
  margin-top: 24px;
  padding: 16px 18px;
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: var(--amber-tint);
}

.calc-notice p { margin-bottom: 10px; }

.calc-notice a { font-weight: 600; }

/* Steps 6 and 7 */
.calc-step > .field { margin-top: 20px; }

.calc-counter {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: right;
}

/* Step 2: description box shown while "Other" is ticked */
.calc-other {
  max-width: 560px;
  margin-top: 20px;
}

/* Photo upload, used by every form (includes/photo-upload.php, assets/js/photo-upload.js) */
.photo-upload {
  position: relative; /* keeps the hidden file input here, so focusing it doesn't jump the page */
  margin-top: 28px;
}

.form-card .photo-upload { margin-top: 0; }

.photo-upload-title {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 0.9375rem;
  font-weight: 600;
}

.photo-upload-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.photo-upload-error {
  margin: 8px 0 0;
  color: #B42318;
  font-weight: 600;
}

/* Without JavaScript the plain file input shows instead of the drop zone */
.photo-upload:not(.is-enhanced) .dropzone { display: none; }

.photo-upload:not(.is-enhanced) .dropzone-input { margin-top: 8px; }

/* With JavaScript the real file input stays focusable for keyboard users; the drop zone is its visible label */
.photo-upload.is-enhanced .dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* .photo-upload prefix: outranks the shared ".field label" style */
.photo-upload .dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 140px;
  margin-top: 12px;
  padding: 24px;
  border: 2px dashed var(--field);
  border-radius: 12px;
  background: var(--mist);
  color: var(--brand);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

/* Smaller drop zone inside the claim and contact form cards */
.form-card .photo-upload .dropzone {
  gap: 6px;
  min-height: 96px;
  padding: 16px;
}

.photo-upload .dropzone:hover,
.photo-upload .dropzone.is-dragover {
  border-color: var(--brand);
  background: #E3F1F5;
}

.photo-upload .dropzone-input:focus-visible + .dropzone {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.dropzone-icon {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* "Tap to add photos" on touch screens, "Drag photos here or click to choose" with a mouse */
.dropzone-desktop { display: none; }

@media (hover: hover) and (pointer: fine) {
  .dropzone-touch { display: none; }
  .dropzone-desktop { display: inline; }
}

.photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); /* small enough that 10 photos don't make the form very long */
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.photo-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--mist);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A photo the browser can't show (e.g. HEIC): its file name instead */
.photo-item.is-missing img { display: none; }

.photo-name {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 6px 6px; /* clear of the remove button */
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.photo-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(28, 36, 48, 0.85);
  color: var(--white);
  cursor: pointer;
}

.photo-remove:hover { background: #B42318; }

.photo-remove svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.calc-fields {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

/* Back / Next: full width and stuck to the bottom of the card on phones */
.calc-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  gap: 12px;
  margin: 32px calc(-1 * var(--calc-pad)) calc(-1 * var(--calc-pad));
  padding: 12px var(--calc-pad);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--white);
}

.calc-actions .btn {
  flex: 1 1 0;
  padding-inline: 16px;
}

.calc-actions .calc-next { flex-grow: 2; }

@media (min-width: 48em) {
  .calc-actions {
    position: static;
    margin: 36px 0 0;
    padding: 24px 0 0;
    border-radius: 0;
  }

  .calc-actions .btn {
    flex: 0 0 auto;
    padding-inline: 28px;
  }

  .calc-actions .calc-next { margin-left: auto; }
}

/* Result screen */
.calc-result-text {
  margin: 16px 0 12px;
  color: var(--brand);
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.625rem);
  font-weight: 600;
  line-height: 1.3;
}

.calc-result-text strong {
  color: var(--green-hover);
  font-weight: 700;
  white-space: nowrap;
}

.calc-disclaimer {
  color: var(--muted);
  font-size: 0.875rem;
}

.calc-result h3 { margin-top: 32px; }

.calc-result .ph { margin-bottom: 20px; }

/* Homepage promo band with a static preview of step 1 */
/* Straight after the (also mist) issues grid, a thin line separates the two sections */
.section-issues + .calc-promo { border-top: 1px solid var(--line); }

.calc-promo .split > div:first-child .ph,
.calc-promo .split > div:first-child p { margin: 16px 0 28px; }

.calc-preview {
  pointer-events: none;
  user-select: none;
}

.calc-preview .calc-card { --calc-pad: 24px; }

.calc-preview .calc-progress { margin-bottom: 20px; }

/* The preview's question is a <p>, so it takes the heading look here */
.calc-preview .calc-question {
  color: var(--brand);
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.calc-preview .choices {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.calc-preview .choice-title {
  padding: 8px 10px;
  font-size: 0.875rem;
}

.calc-preview .choice-tick {
  width: 20px;
  height: 20px;
}

.calc-preview .choice-tick svg {
  width: 12px;
  height: 12px;
}

/* The [IMAGE] labels would crowd these small decorative cards */
.calc-preview .choice-box.is-missing .choice-media-label { display: none; }

/* ==========================================================================
   Copy: lists, text spacing and client check markers
   ========================================================================== */
.bullets,
.numbered {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.bullets li + li,
.numbered li + li { margin-top: 0.4em; }

.bullets li::marker { color: var(--green); }

.numbered li { padding-left: 0.25em; }

.numbered li::marker {
  color: var(--brand);
  font-weight: 700;
}

/* No gap after the last paragraph or list in a block of copy */
.split > div > :last-child,
.measure > :last-child,
.container-narrow > :last-child { margin-bottom: 0; }

/* [CONFIRM: ...] notes the client still has to check. Delete each one once it is confirmed. */
.confirm {
  padding: 0 4px;
  border-radius: 3px;
  background: #FFE58A;
  color: #1C2430;
  font-weight: 600;
}

.hero-copy > p {
  max-width: 600px;
  margin-bottom: 24px;
  color: var(--white);
  font-size: 1.1875rem;
}

.strip-list li {
  color: var(--brand);
  font-size: 0.9375rem;
  font-weight: 600;
}

.cta-band-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
}

.step p { margin: 0; }

.calc-head p,
.page-head p,
.contact-info > p {
  margin: 0;
  font-size: 1.125rem;
}

.footer-about p { margin: 0; }

/* ==========================================================================
   Shared page pieces
   ========================================================================== */
.page-head {
  max-width: 720px;
  margin-bottom: 40px;
}

.page-head h1 { margin-bottom: 16px; }

/* For a section that follows another with the same background */
.section-flush-top { padding-top: 0; }

/* Comfortable line length for a block of text inside a full-width container */
.measure { max-width: 720px; }

.notice {
  margin-bottom: 32px;
  padding: 16px 18px;
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: var(--amber-tint);
  color: var(--brand);
}

.notice p { margin: 0; }

/* Numbered steps, e.g. "How a claim works" */
.steps {
  display: grid;
  gap: 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 40em) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64em) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.step {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
}

.step h3 { margin-bottom: 10px; }

/* ==========================================================================
   Blog: listing cards (blog.php, "Related posts") and the post page
   ========================================================================== */
.post-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 40em) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64em) {
  .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card-media { border-radius: 0; }

.post-card-media img { transition: transform 0.3s ease; }

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 24px;
}

.post-card-body > * { margin: 0; }

.post-card-date {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.post-card-title {
  font-size: 1.25rem;
  line-height: 1.25;
}

.post-card-small .post-card-title { font-size: 1.125rem; }

.post-card-link {
  margin-top: auto;
  padding-top: 6px;
  color: var(--green-hover);
  font-weight: 600;
}

/* The "Read more" link stretches over the whole card, so the card is clickable */
.post-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.post-card:hover,
.post-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 0 0 3px var(--green), 0 24px 40px -20px rgba(1, 113, 145, 0.45);
}

.post-card:hover .post-card-media img,
.post-card:focus-within .post-card-media img { transform: scale(1.05); }

.post-empty {
  color: var(--muted);
  font-size: 1.125rem;
}

/* Post page: a single 720px column for a comfortable line length */
.post-column { max-width: calc(720px + 2 * var(--gutter)); }

.post-header { margin-bottom: 24px; }

.post-header h1 { margin-bottom: 12px; }

.post-date {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.photo-wide { aspect-ratio: 16 / 9; }

.post-body { margin-top: 40px; }

.post-body > * + * { margin-top: 24px; }

.post-body h2 {
  margin-top: 48px;
  margin-bottom: 0;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
}

.post-body p { margin-bottom: 0; }

.post-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-block: 40px;
  padding: 24px;
  border: 2px solid var(--green);
  border-radius: var(--radius-lg);
  background: #F0F9F4;
}

.post-body > .post-cta + * { margin-top: 0; }

.post-cta-title {
  margin: 0;
  color: var(--brand);
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
}

.related-title { margin-bottom: 28px; }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-layout {
  display: grid;
  gap: 40px;
  align-items: start;
}

@media (min-width: 64em) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
    gap: 72px;
  }
}

.contact-info h1 { margin-bottom: 16px; }

.contact-details {
  display: grid;
  gap: 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-details li > div {
  flex: 1;
  min-width: 0;
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
}

.contact-icon .icon {
  width: 20px;
  height: 20px;
}

.contact-label {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.contact-details a,
.contact-value {
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* The form card sits on mist here, not on the navy hero, so a lighter shadow and a border */
.contact-card {
  max-width: none;
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px -32px rgba(1, 113, 145, 0.35);
}

/* ==========================================================================
   Privacy policy
   ========================================================================== */
.policy-updated {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 40px;
  color: var(--muted);
  font-weight: 600;
}

.policy-updated .ph { padding: 4px 10px; }

.policy-section + .policy-section { margin-top: 40px; }

.policy-section h2 { font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); }

.policy-section > :last-child { margin-bottom: 0; }

/* Two-column tables (lawful basis, how long we keep it). Scrolls sideways instead of breaking the page if ever too wide. */
.policy-table-wrap {
  margin: 0 0 1em;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

.policy-table th,
.policy-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.policy-table th {
  background: var(--mist);
  color: var(--brand);
  font-weight: 600;
}

.policy-table td { border-top: 1px solid var(--line); }

.policy-table th:first-child,
.policy-table td:first-child { width: 45%; }

@media (max-width: 30em) {
  .policy-table th,
  .policy-table td { padding: 10px 12px; }
}

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

  /* No growing or zooming; the green ring, shadow and button colour still show the hover */
  .issue-card:hover,
  .issue-card:focus-visible,
  .issue-card:hover img,
  .issue-card:focus-visible img,
  .issue-card:hover .issue-card-go svg,
  .issue-card:focus-visible .issue-card-go svg,
  .post-card:hover,
  .post-card:focus-within,
  .post-card:hover .post-card-media img,
  .post-card:focus-within .post-card-media img { transform: none; }
}
