/*
Theme Name:   Healthwise360 Child
Theme URI:    https://pencompare.co.uk
Description:  Child theme for Healthwise360 / PenCompare. Holds the versioned design
              tokens (theme.json) and the accessible component layer for comparison,
              verification and evidence UI. No business logic lives here: prices,
              provider records, verification events and affiliate links are owned by
              the Healthwise360 Compare Core plugin.
Author:       Healthwise360
Template:     kadence
Version:      0.3.0
Requires PHP: 8.3
Text Domain:  healthwise360-child
*/

/* ==========================================================================
   Healthwise360 component layer
   --------------------------------------------------------------------------
   Tokens are defined in theme.json and emitted by WordPress as CSS custom
   properties. Nothing below hardcodes a hex value: change a token, not this
   file.

   Reference: master build spec s.13 (design system) and s.14.1 (accessibility).
   ========================================================================== */

:root {
  --hw-focus-width: 3px;
  --hw-touch-min: 44px;
}

/* --------------------------------------------------------------------------
   0. Jembatan palet Kadence
   --------------------------------------------------------------------------
   Kadence merender header, footer, tombol dan blok Kadence dari sembilan slot
   Customizer-nya sendiri (--global-palette1..12), bukan dari theme.json. Dua
   sistem itu sudah pernah melenceng: theme.json menyatakan latar warm white dan
   teks navy, sementara yang benar-benar tampil adalah putih murni dan teal.

   Mengarahkan setiap slot Kadence ke token theme.json menutup celah itu untuk
   selamanya. Ubah satu nilai di theme.json, dan Kadence ikut — tanpa perlu ada
   yang membuka Customizer dan menyalin hex dengan tangan.

   Selector `html:root` (0,1,1) sengaja dipakai, bukan `:root` (0,1,0), supaya
   tetap menang atas CSS inline yang Kadence suntikkan ke <head>.

   Slot 2 memakai cta-orange-strong, bukan cta-orange. Di halaman Home slot itu
   dipakai sebagai warna teks judul (3x) dan latar hover (9x); oranye brand
   #EE7C2C di atas putih hanya 2,78:1 dan gagal WCAG 2.2 AA. Oranye brand tetap
   tersedia lewat token cta-orange untuk aksen di atas teal gelap saja.
   -------------------------------------------------------------------------- */
html:root {
  --global-palette1:  var(--wp--preset--color--trust-teal);
  --global-palette2:  var(--wp--preset--color--cta-orange-strong);
  --global-palette3:  var(--wp--preset--color--navy);
  --global-palette4:  var(--wp--preset--color--trust-teal);
  --global-palette5:  var(--wp--preset--color--grey-muted);
  --global-palette6:  var(--wp--preset--color--grey-subtle);
  --global-palette7:  var(--wp--preset--color--warm-white);
  --global-palette8:  var(--wp--preset--color--white);
  --global-palette9:  var(--wp--preset--color--white);
  --global-palette10: var(--wp--preset--color--mint);
  --global-palette11: var(--wp--preset--color--success-green);
  --global-palette12: var(--wp--preset--color--link-blue);
}

/* --------------------------------------------------------------------------
   1. Focus visibility  (WCAG 2.2 AA - 2.4.7, 2.4.11)
   A visible, high-contrast focus ring on every interactive element. Kadence
   ships a subtle default; regulated journeys need an unmistakable one.
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: var(--hw-focus-width) solid var(--wp--preset--color--link-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Never remove focus styling without replacing it. */
:focus:not(:focus-visible) {
  outline: none;
}

/* --------------------------------------------------------------------------
   2. Body links  (spec s.13.3 - underline in body copy)
   -------------------------------------------------------------------------- */
.entry-content a:not(.wp-block-button__link):not(.hw-cta) {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* --------------------------------------------------------------------------
   3. Price figures  (spec s.13.3 - tabular numerals, no condensed font)
   Fixed-width digits so totals align down a column and cannot be misread.
   -------------------------------------------------------------------------- */
.hw-price,
.hw-price-total,
td.hw-numeric,
th.hw-numeric {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0;
}

.hw-price-total {
  font-weight: 700;
  font-size: var(--wp--preset--font-size--lead);
  color: var(--wp--preset--color--navy);
}

/* --------------------------------------------------------------------------
   4. Status pills  (spec s.13.6, s.10.5)
   Freshness and verification states. Colour is NEVER the only signal: every
   pill carries an icon slot and descriptive text. Do not add a colour-only
   variant.
   -------------------------------------------------------------------------- */
.hw-status {
  display: inline-flex;
  align-items: center;
  gap: var(--wp--preset--spacing--xxs);
  padding: 2px var(--wp--preset--spacing--xs);
  border-radius: var(--wp--custom--radius--small);
  border: 1px solid currentColor;
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  line-height: 1.4;
}

.hw-status__icon {
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
}

.hw-status--current {
  color: var(--wp--preset--color--trust-teal);
  background: var(--wp--preset--color--trust-teal-surface);
}

.hw-status--review-due,
.hw-status--stale {
  color: var(--wp--preset--color--warning-amber);
  background: var(--wp--preset--color--warning-amber-surface);
}

.hw-status--expired,
.hw-status--unverified,
.hw-status--suspended {
  color: var(--wp--preset--color--error-red);
  background: var(--wp--preset--color--error-red-surface);
}

/* --------------------------------------------------------------------------
   5. Evidence line
   The timestamp and source that must sit beside every price or verification
   claim (spec s.10.7).
   -------------------------------------------------------------------------- */
.hw-evidence {
  font-size: var(--wp--preset--font-size--small);
  color: var(--wp--preset--color--navy-secondary);
  margin-block-start: var(--wp--preset--spacing--xxs);
}

/* --------------------------------------------------------------------------
   6. Notices  (spec s.13.6)
   -------------------------------------------------------------------------- */
.hw-notice {
  border-left: 4px solid;
  padding: var(--wp--preset--spacing--m);
  border-radius: var(--wp--custom--radius--small);
  margin-block: var(--wp--preset--spacing--l);
}

.hw-notice--info {
  border-color: var(--wp--preset--color--trust-teal);
  background: var(--wp--preset--color--trust-teal-surface);
}

.hw-notice--warning {
  border-color: var(--wp--preset--color--warning-amber);
  background: var(--wp--preset--color--warning-amber-surface);
}

.hw-notice--critical {
  border-color: var(--wp--preset--color--error-red);
  background: var(--wp--preset--color--error-red-surface);
}

/* Sitewide compliance disclosure. Must stay visible - never collapse it into
   a tooltip or hover state (spec s.19 interaction requirements). */
.hw-disclosure {
  font-size: var(--wp--preset--font-size--small);
  background: var(--wp--preset--color--soft-grey);
  border: 1px solid var(--wp--preset--color--grey-border);
  border-radius: var(--wp--custom--radius--small);
  padding: var(--wp--preset--spacing--s) var(--wp--preset--spacing--m);
}

/* --------------------------------------------------------------------------
   7. Comparison tables
   -------------------------------------------------------------------------- */
.hw-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--wp--preset--color--soft-grey);
}

.hw-table th,
.hw-table td {
  padding: var(--wp--preset--spacing--s) var(--wp--preset--spacing--m);
  border-bottom: 1px solid var(--wp--preset--color--grey-border);
  text-align: left;
  vertical-align: top;
}

.hw-table th {
  font-weight: 700;
  color: var(--wp--preset--color--navy);
}

/* Sponsored rows must be visually separated from organic results and must not
   resemble an independent result (spec s.10.4). */
.hw-table tr.is-sponsored {
  background: var(--wp--preset--color--warm-white);
  border-left: 4px solid var(--wp--preset--color--grey-border);
}

.hw-sponsored-label {
  display: inline-block;
  font-size: var(--wp--preset--font-size--x-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wp--preset--color--navy-secondary);
}

/* --------------------------------------------------------------------------
   8. Touch targets  (WCAG 2.2 AA - 2.5.8)
   -------------------------------------------------------------------------- */
.hw-cta,
.wp-block-button__link,
.hw-filter input[type="checkbox"] + label {
  min-height: var(--hw-touch-min);
  display: inline-flex;
  align-items: center;
}

/* --------------------------------------------------------------------------
   9. Screen-reader utilities
   -------------------------------------------------------------------------- */
.hw-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hw-skip-link:focus {
  position: fixed;
  top: var(--wp--preset--spacing--s);
  left: var(--wp--preset--spacing--s);
  z-index: 999999;
  padding: var(--wp--preset--spacing--s) var(--wp--preset--spacing--m);
  background: var(--wp--preset--color--navy);
  color: var(--wp--preset--color--warm-white);
  width: auto;
  height: auto;
  clip: auto;
}

/* --------------------------------------------------------------------------
   10. Reduced motion  (spec s.13.6, WCAG 2.3.3)
   -------------------------------------------------------------------------- */
@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;
  }
}

/* --------------------------------------------------------------------------
   11. Reflow  (WCAG 2.2 AA - 1.4.10, 320 CSS px without loss of function)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .hw-table,
  .hw-table thead,
  .hw-table tbody,
  .hw-table tr,
  .hw-table td {
    display: block;
    width: 100%;
  }

  .hw-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .hw-table tr {
    margin-block-end: var(--wp--preset--spacing--m);
    border: 1px solid var(--wp--preset--color--grey-border);
    border-radius: var(--wp--custom--radius--medium);
  }
}

/* --------------------------------------------------------------------------
   13. Elevation
   One shadow, used only on cards that represent a real record or a real total.
   Not decoration: if everything lifts, nothing reads as important.
   -------------------------------------------------------------------------- */
.hw-card {
  /* Bayangan diturunkan dari navy teks (#0D1019), bukan hitam murni, supaya
     tepian kartu terasa menyatu dengan palet. */
  box-shadow: 0 1px 2px rgba(13, 16, 25, 0.05),
              0 12px 28px -16px rgba(13, 16, 25, 0.18);
}

/* --------------------------------------------------------------------------
   14. Eyebrow label
   -------------------------------------------------------------------------- */
.hw-eyebrow {
  display: block;
  width: fit-content;
  padding: 4px var(--wp--preset--spacing--s);
  border-radius: 999px;
  background: var(--wp--preset--color--trust-teal-surface);
  color: var(--wp--preset--color--trust-teal);
}

.hw-eyebrow.has-text-align-center {
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   15. Action rows
   -------------------------------------------------------------------------- */
.hw-actions {
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   16. THE RECEIPT  (spec s.10 - the complete cost equation)
   --------------------------------------------------------------------------
   The signature component. A two-column grid: label left, figure right, ruled
   total at the foot. Every row is a real paragraph block in reading order, so a
   screen reader hears "Consultation fee, twenty pounds" as a pair, and the grid
   is purely visual.

   Figures use tabular numerals so the decimal points stack. This is the one
   place the design is allowed to look like a document rather than a web page,
   because that is exactly what it is.
   -------------------------------------------------------------------------- */
.hw-receipt {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--l);
  align-items: baseline;
}

.hw-receipt > p {
  margin-block: 0;
}

.hw-receipt__value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.hw-receipt__total-label,
.hw-receipt__total-value {
  margin-block-start: var(--wp--preset--spacing--xs);
  padding-block-start: var(--wp--preset--spacing--s);
  border-top: 2px solid var(--wp--preset--color--navy);
  font-weight: 700;
}

.hw-receipt__total-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: var(--wp--preset--font-size--heading-small);
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   17. Stat row  (market summary)
   Divided cells rather than separate floating cards: these three figures
   describe one dataset and should read as one object.
   -------------------------------------------------------------------------- */
@media (min-width: 782px) {
  .hw-statrow .wp-block-column + .wp-block-column {
    border-left: 1px solid var(--wp--preset--color--grey-border);
    padding-left: var(--wp--preset--spacing--l);
  }
}

@media (max-width: 781px) {
  .hw-statrow .wp-block-column + .wp-block-column {
    border-top: 1px solid var(--wp--preset--color--grey-border);
    padding-top: var(--wp--preset--spacing--m);
  }
}

.hw-stat-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   18. Keyline
   A short teal rule above a card heading. Used to group the principle cards
   without adding another surface colour.
   -------------------------------------------------------------------------- */
.hw-keyline::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: var(--wp--preset--color--trust-teal);
  margin-block-end: var(--wp--preset--spacing--s);
}

/* --------------------------------------------------------------------------
   19. Print
   -------------------------------------------------------------------------- */
@media print {
  .hw-status,
  .hw-evidence,
  .hw-disclosure {
    border: 1px solid #000;
  }
}

/* Card Modifiers & Icons for Tools Hub */
.hw-card--muted { background: var(--wp--preset--color--soft-grey); border-color: var(--wp--preset--color--grey-border); box-shadow: none; }
.hw-card__icon { font-size: 28px; line-height: 1; margin: 0 0 12px; }
.hw-btn-disabled .wp-block-button__link { border-color: var(--wp--preset--color--grey-border); color: var(--wp--preset--color--grey-text-strong); cursor: default; background: transparent; }

/* --------------------------------------------------------------------------
   20. Footer
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   20a-bis. Label "Coming soon"

   Menggantikan tombol non-fungsional di halaman Tools. Sebelumnya keadaan itu
   digambarkan dengan `core/button` tanpa `href`: hasilnya `<a>` yang tetap
   masuk urutan tab dan tampak seperti tombol, tapi tidak melakukan apa pun —
   dan bagi pembaca layar bukan kontrol sama sekali, karena `<a>` tanpa href
   tidak diumumkan sebagai tautan. Sebuah label memang lebih jujur: fiturnya
   belum ada, jadi jangan tampilkan sesuatu yang bisa ditekan.
   -------------------------------------------------------------------------- */
.hw-badge-soon {
	display: inline-block;
	margin: 0;
	padding: 6px 14px;
	border: 1px dashed var(--wp--preset--color--grey-border);
	border-radius: 999px;
	color: var(--wp--preset--color--grey-muted);
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   20b. Footer gelap

   Footer memakai warna yang sama persis dengan bilah header —
   `trust-teal-dark` #163A49, bukan `trust-teal` #1F4C5F yang dipakai seksi
   isi. Dengan begitu header dan footer membingkai halaman sebagai sepasang,
   dan seksi gelap di tengah tetap terbaca sebagai lapisan yang berbeda.

   Kontras di atas #163A49, semuanya dihitung:
     putih          12,10:1
     on-dark-body    8,27:1
     mint            5,45:1  — lulus di semua ukuran teks

   Perhatikan mint lulus penuh di sini, sementara di atas `trust-teal` #1F4C5F
   ia hanya 4,19:1 dan gagal untuk teks isi. Dua teal yang berbeda punya aturan
   aksen yang berbeda; jangan menyalin aturan seksi ke footer begitu saja.

   `!important` diperlukan karena blok footer membawa kelas preset WordPress
   (`has-navy-color` dan sejenisnya) yang core tuliskan dengan !important.
   -------------------------------------------------------------------------- */
.hw-surface-footer {
	background-color: var(--wp--preset--color--trust-teal-dark) !important;
}

/* Elemen <footer> Kadence sendiri ikut diwarnai, bukan hanya blok pattern di
   dalamnya.

   `.hw-surface-footer` mewarnai pattern-nya, tapi `.site-footer` yang
   membungkusnya tetap `rgba(0,0,0,0)`. Setiap piksel footer yang tidak
   tertutup pattern itu — padding baris footer Kadence, atau baris footer lain
   yang kosong — karenanya menampilkan latar putih `body`, dan terbaca sebagai
   pita terang di atas footer. Gejalanya menipu: jarak antara isi dan footer
   sebenarnya sudah 0px (lihat bagian di sisi bawah), jadi mencarinya sebagai
   masalah margin tidak akan menemukan apa pun.

   Mewarnai wadahnya membuat footer tidak punya permukaan yang belum diwarnai,
   berapa pun baris yang nanti ditambah atau dihapus di Customizer. */
html:root .site-footer,
html:root .site-footer-wrap,
html:root .site-footer-row-container-inner {
	background-color: var(--wp--preset--color--trust-teal-dark);
}

/* Nama merek dan judul kolom: putih, garis bawah merek jadi mint. */
html:root .hw-surface-footer .hw-footer__brand,
html:root .hw-surface-footer .hw-footer__heading,
html:root .hw-surface-footer .hw-footer__heading a {
	color: var(--wp--preset--color--white) !important;
}

html:root .hw-surface-footer .hw-footer__brand {
	border-bottom-color: var(--wp--preset--color--mint);
}

/* Teks pendukung dan tautan daftar: on-dark-body saat diam, mint saat
   disentuh — pola yang sama dengan navigasi header. */
html:root .hw-surface-footer .hw-footer__desc,
html:root .hw-surface-footer .hw-footer__copy,
html:root .hw-surface-footer .hw-footer__links a,
html:root .hw-surface-footer .wp-block-kadence-advancedheading {
	color: var(--wp--preset--color--on-dark-body) !important;
}

html:root .hw-surface-footer .hw-footer__links a:hover,
html:root .hw-surface-footer .hw-footer__links a:focus-visible,
html:root .hw-surface-footer .hw-footer__heading a:hover,
html:root .hw-surface-footer .hw-footer__heading a:focus-visible {
	color: var(--wp--preset--color--mint) !important;
}

/* Badge GPhC: mint, termasuk ikon perisai yang diwarnai lewat mask. */
html:root .hw-surface-footer .hw-footer__badge,
html:root .hw-surface-footer .hw-footer__badge a {
	color: var(--wp--preset--color--mint) !important;
}

html:root .hw-surface-footer .hw-footer__badge::before {
	background-color: var(--wp--preset--color--mint);
}

/* Cincin fokus dibalik ke putih — link blue hanya 2,02:1 di atas teal gelap
   dan gagal ambang 3:1 SC 1.4.11, sama seperti di header. */
html:root .hw-surface-footer a:focus-visible {
	outline: var(--hw-focus-width) solid var(--wp--preset--color--white);
	outline-offset: 2px;
}

/* Target sentuh footer — WCAG 2.2 AA, SC 2.5.8 (Target Size Minimum).

   Link footer sebelumnya hanya setinggi barisnya, 15–20px. Pengecualian
   "inline" pada SC 2.5.8 berlaku untuk tautan di tengah kalimat, bukan untuk
   daftar navigasi seperti ini — jadi ketiganya memang gagal. Yang diperbesar
   adalah area sentuhnya, bukan ukuran hurufnya: tinggi minimum 24px lewat
   inline-flex, sementara font-size tidak disentuh sama sekali sehingga tata
   letak footer tidak berubah bentuk.

   Margin antar item dikurangi seperlunya supaya jarak yang terlihat tetap
   sama — ruang yang tadinya kosong di antara baris kini menjadi bagian dari
   target yang bisa ditekan. */
.hw-footer__links a,
.hw-footer__heading a,
.hw-footer__badge a {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
}

/* Link kebijakan cookie yang disuntikkan Complianz duduk di footer yang sama
   dan punya masalah yang sama. Ditata di sini, bukan diubah di plugin-nya,
   supaya pembaruan plugin tidak menimpanya. */
.cmplz-link {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
}

/* --------------------------------------------------------------------------
   20c. Komponen footer (dasar)
   -------------------------------------------------------------------------- */
.hw-footer__brand{display:inline-block;font-weight:700;margin:0;padding-bottom:6px;border-bottom:3px solid var(--wp--preset--color--trust-teal)}
.hw-footer__desc{margin:14px 0 20px;line-height:1.6}
.hw-footer__badge{display:flex;align-items:center;gap:8px;margin:0;font-weight:600}
/* Ikon perisai dipasang sebagai mask, bukan background-image, supaya warnanya
   ikut token. Di dalam data URI warna stroke tidak bisa memakai var(); dengan
   mask, yang dipakai hanya bentuk alpha-nya dan warna datang dari
   background-color. */
.hw-footer__badge::before{content:"";flex:0 0 18px;width:18px;height:18px;background-color:var(--wp--preset--color--trust-teal);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") no-repeat center/contain;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") no-repeat center/contain}
.hw-footer__badge a{color:inherit;text-decoration:none}
.hw-footer__heading{margin:0 0 18px;font-weight:700}
.hw-footer__links{margin:0;padding:0;list-style:none}
/* 8px, bukan 14px: sejak link footer punya tinggi minimum 24px (lihat SC 2.5.8
   di atas), sebagian jarak antar baris sudah datang dari target sentuhnya
   sendiri. Nilai lama membuat daftar footer jadi terlalu longgar. */
.hw-footer__links li{margin:0 0 8px}
.hw-footer__links a{color:var(--wp--preset--color--navy-secondary);text-decoration:none;line-height:1.45}
.hw-footer__links a:hover,.hw-footer__links a:focus-visible{color:var(--wp--preset--color--trust-teal);text-decoration:underline}
.hw-footer__copy{margin:0}
.hw-footer__heading a { color: inherit; text-decoration: none; }
.hw-footer__heading a:hover, .hw-footer__heading a:focus-visible { color: var(--wp--preset--color--trust-teal); }
.hw-footer__heading--stacked { margin-top: 28px; }


.hw-notice--info { border-left: 4px solid var(--wp--preset--color--link-blue); }
.hw-notice--warning { border-left: 4px solid var(--wp--preset--color--warning-amber); }

.hw-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* matikan auto margin horizontal dari is-layout-constrained */
.hw-card > * {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

/* link terdorong ke dasar kartu — margin-top saja, jangan shorthand */
.hw-card > p:last-child {
  margin-top: auto;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   21. Permukaan gelap  (sistem empat permukaan)

   Halaman ini punya empat permukaan sah: warm-white (dasar), putih (kartu),
   trust-teal-surface (nuansa), dan teal gelap (ini). Tanpa aturan, sebuah
   seksi gelap harus menyetel ulang belasan atribut Kadence satu per satu —
   judul, teks, ikon, wadah ikon, tautan — dan setiap seksi baru mengulangi
   pekerjaan yang sama. Satu kelas jauh lebih murah dan tidak bisa melenceng.

   Pemakaian: tambahkan className "hw-surface-dark" pada kadence/rowlayout.
   Kelas ini menyetel latarnya sendiri, jadi bgColor tidak perlu diisi.

   Soal spesifisitas: Kadence menyuntikkan CSS per-block dengan selector
   seperti `.wp-block-kadence-infobox.kt-info-boxABC .kt-blocks-info-box-title`
   — tiga kelas, (0,3,0). Prefiks `html:root` di sini menaikkan hitungan jadi
   (0,4,1) sehingga menang tanpa perlu !important. Pola yang sama dipakai di
   jembatan palet pada bagian 0.

   Kontras terhadap latar #1F4C5F, semuanya sudah dihitung:
     putih          9,30:1  — lulus semua ukuran
     on-dark-body   6,36:1  — lulus semua ukuran
     mint           4,19:1  — HANYA untuk teks besar dan elemen non-teks
   Karena itu mint dipakai untuk ikon, garis aksen, dan judul besar saja —
   tidak pernah untuk teks isi.
   -------------------------------------------------------------------------- */
/* `!important` pada latar supaya kelas ini cukup berdiri sendiri. Kadence
   menulis latar per-baris sebagai `.kb-row-layout-idXXX{background-color:…}`
   — spesifisitasnya (0,1,0), persis sama dengan `.hw-surface-dark`. Kalau
   sama, yang menang ditentukan urutan di berkas, dan urutan itu tidak lagi
   bisa diandalkan karena LiteSpeed menggabungkan seluruh CSS jadi satu.

   Dengan !important, menandai sebuah seksi cukup dengan menambah className —
   tidak perlu ikut mengubah atribut bgColor-nya. Satu penyuntingan per seksi,
   bukan dua yang bisa lupa disinkronkan. */
.hw-surface-dark {
	background-color: var(--wp--preset--color--trust-teal) !important;
	color: var(--wp--preset--color--on-dark-body);
}

/* Judul dan paragraf.

   `!important` di sini bukan kemalasan. WordPress menyusun kelas preset
   warnanya sendiri sebagai `.has-navy-color{color:...!important}` — dengan
   !important di core. Blok `core/heading` dan `core/paragraph` membawa kelas
   itu, jadi seberapa pun spesifisitas dinaikkan, aturan tanpa !important akan
   selalu kalah. Satu-satunya cara membalikkan warna di dalam konteks gelap
   adalah menandinginya.

   Blok Kadence tidak memakai kelas preset (ia menyuntikkan CSS per-block
   tanpa !important), jadi untuk blok Kadence spesifisitas saja sudah cukup —
   tapi selektor digabung supaya aturannya satu, bukan dua yang bisa
   berbeda nasib. */
html:root .hw-surface-dark .wp-block-kadence-advancedheading,
html:root .hw-surface-dark h1,
html:root .hw-surface-dark h2,
html:root .hw-surface-dark h3,
html:root .hw-surface-dark h4 {
	color: var(--wp--preset--color--white) !important;
}

html:root .hw-surface-dark p.wp-block-kadence-advancedheading,
html:root .hw-surface-dark p,
html:root .hw-surface-dark li {
	color: var(--wp--preset--color--on-dark-body) !important;
}

/* Kartu infobox: judul putih, teks isi terang. */
html:root .hw-surface-dark .wp-block-kadence-infobox .kt-blocks-info-box-title {
	color: var(--wp--preset--color--white);
}

html:root .hw-surface-dark .wp-block-kadence-infobox .kt-blocks-info-box-text {
	color: var(--wp--preset--color--on-dark-body);
}

/* Wadah ikon jadi kaca tipis, bukan blok putih pekat yang meninju mata. */
html:root .hw-surface-dark .kadence-info-box-icon-container {
	background-color: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.2);
}

/* Ikon mint — elemen non-teks, jadi ambang 3:1 dan 4,19:1 melewatinya. */
html:root .hw-surface-dark .kt-info-svg-icon,
html:root .hw-surface-dark .kadence-dynamic-icon svg,
html:root .hw-surface-dark .kadence-info-box-icon-container svg {
	color: var(--wp--preset--color--mint);
	stroke: var(--wp--preset--color--mint);
}

/* Tautan memakai putih, bukan mint.

   Mint hanya 4,19:1 di atas teal. Itu lolos untuk teks besar dan elemen
   non-teks yang ambangnya 3:1, tapi tautan umumnya seukuran teks isi dengan
   ambang 4,5:1 — jadi mint gagal di sana. Aturan mint di kepala bagian ini
   memang sudah menyebutkan batasnya; memakai mint untuk semua tautan
   melanggarnya, dan itu tertangkap di halaman Providers Directory.

   Putih memberi 9,30:1, dan garis bawah menjaga tautan tetap terbedakan dari
   teks isi tanpa mengandalkan warna saja (SC 1.4.1). */
html:root .hw-surface-dark a,
html:root .hw-surface-dark .kt-blocks-info-box-learnmore {
	color: var(--wp--preset--color--white) !important;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Tombol adalah tautan juga, jadi ia ikut terkena aturan di atas. Warnanya
   memang sudah putih, tapi garis bawahnya harus dicabut — tombol tidak perlu
   garis bawah karena bentuk dan latarnya sendiri sudah menandainya. */
html:root .hw-surface-dark a.wp-block-button__link,
html:root .hw-surface-dark a.kb-button {
	color: var(--wp--preset--color--white) !important;
	text-decoration: none;
}

/* Hover turun ke on-dark-body (6,36:1) — masih lulus di semua ukuran, dan
   perubahannya cukup terlihat. Mint sengaja tidak dipakai di sini: keadaan
   hover pun harus memenuhi ambang kontras, bukan hanya keadaan diam. */
html:root .hw-surface-dark a:hover,
html:root .hw-surface-dark a:focus-visible,
html:root .hw-surface-dark .kt-blocks-info-box-learnmore:hover {
	color: var(--wp--preset--color--on-dark-body) !important;
}

/* Panel terang di dalam permukaan gelap.

   Halaman artikel Guides sudah berbentuk kartu putih yang mengambang di atas
   latar halaman. Menggelapkan latarnya memberi ritme warna tanpa memindahkan
   satu blok pun — kartunya tetap putih, dan teks panjang tetap dibaca di atas
   putih, yang jauh lebih nyaman daripada di atas teal.

   Kelas ini menandai kartu semacam itu supaya aturan teks terang tidak
   diwariskan ke dalamnya. Tanpa ini, isi kartu jadi teks terang di atas putih.

   Bedanya dengan `.hw-notice`: notice adalah permukaan kepatuhan yang memang
   selalu terang di mana pun ia berada. `.hw-panel-light` dipakai untuk wadah
   isi biasa yang kebetulan berada di dalam seksi gelap. */
html:root .hw-surface-dark .hw-panel-light,
html:root .hw-surface-dark .hw-panel-light p,
html:root .hw-surface-dark .hw-panel-light li,
html:root .hw-surface-dark .hw-panel-light strong,
html:root .hw-surface-dark .hw-panel-light h1,
html:root .hw-surface-dark .hw-panel-light h2,
html:root .hw-surface-dark .hw-panel-light h3,
html:root .hw-surface-dark .hw-panel-light h4,
html:root .hw-surface-dark .hw-panel-light .wp-block-kadence-advancedheading {
	color: var(--wp--preset--color--navy) !important;
}

html:root .hw-surface-dark .hw-panel-light a {
	color: var(--wp--preset--color--trust-teal) !important;
}

/* Ikon di dalam panel terang kembali ke teal — mint hanya 2,11:1 di atas
   putih dan tidak boleh dipakai di sana. */
html:root .hw-surface-dark .hw-panel-light .kt-info-svg-icon,
html:root .hw-surface-dark .hw-panel-light .kadence-dynamic-icon svg {
	color: var(--wp--preset--color--trust-teal);
	stroke: var(--wp--preset--color--trust-teal);
}

/* Pengecualian: notice tetap permukaan terang.

   `.hw-notice` adalah permukaan kepatuhan — disclaimer medis, peringatan
   harga, batas verifikasi. Spec §13.6 menghendaki peringatan terbaca sebagai
   sesuatu yang berbeda dari isi sekitarnya, jadi ia mempertahankan latar
   terangnya bahkan di dalam seksi gelap. Tanpa pengecualian ini, aturan teks
   terang di atas membuatnya jadi teks terang di atas latar terang — 1,24:1,
   praktis hilang.

   Tautannya juga dikembalikan ke teal: mint di atas latar terang hanya
   2,11:1, gagal telak. */
html:root .hw-surface-dark .hw-notice,
html:root .hw-surface-dark .hw-notice p,
html:root .hw-surface-dark .hw-notice li,
html:root .hw-surface-dark .hw-notice strong,
html:root .hw-surface-dark .hw-notice h2,
html:root .hw-surface-dark .hw-notice h3,
html:root .hw-surface-dark .hw-notice h4 {
	color: var(--wp--preset--color--navy) !important;
}

html:root .hw-surface-dark .hw-notice a {
	color: var(--wp--preset--color--trust-teal) !important;
}

/* Tombol di dalam permukaan gelap tetap oranye pekat — putih di atasnya
   4,52:1. Oranye brand #EE7C2C hanya 2,78:1 dan tidak boleh dipakai. */
html:root .hw-surface-dark .kb-button,
html:root .hw-surface-dark .wp-block-button__link {
	background-color: var(--wp--preset--color--cta-orange-strong) !important;
	color: var(--wp--preset--color--white) !important;
}

html:root .hw-surface-dark .kb-button:hover,
html:root .hw-surface-dark .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--trust-teal-dark) !important;
	color: var(--wp--preset--color--white) !important;
}

/* Cincin fokus harus tetap terlihat di latar gelap. Token fokus yang dipakai
   di bagian lain diturunkan dari warna gelap, jadi di sini dibalik ke putih. */
html:root .hw-surface-dark a:focus-visible,
html:root .hw-surface-dark button:focus-visible,
html:root .hw-surface-dark .kb-button:focus-visible {
	outline: var(--hw-focus-width) solid var(--wp--preset--color--white);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   22. Seksi penuh yang menempel ke header

   Kadence memberi `.entry-content-wrap` padding atas 32px dan `article` latar
   putih. Untuk halaman biasa itu benar — teks butuh ruang napas di bawah
   header. Tapi kalau blok pertama halaman adalah seksi selebar layar dengan
   latarnya sendiri (hero teal, misalnya), padding itu muncul sebagai pita
   putih 32px antara header dan hero.

   `:has()` membuat aturannya menyesuaikan diri: hanya halaman yang memang
   dibuka oleh blok alignfull yang kehilangan padding tersebut. Halaman legal
   dan panduan yang dibuka oleh judul biasa tidak terpengaruh, jadi tidak perlu
   pengaturan per halaman di Customizer yang bisa terlupa.
   -------------------------------------------------------------------------- */
html:root .entry-content-wrap:has(> .entry-content > .alignfull:first-child) {
	padding-top: 0;
}

/* Sisi bawah: jarak antara seksi terakhir dan footer.

   Jaraknya 79px dan datang dari tiga tempat sekaligus — 32px padding bawah
   `.entry-content-wrap`, 30px padding atas baris footer Kadence, dan 17px
   margin widget. Selama footer berlatar sama dengan halaman, jarak itu tidak
   terlihat. Begitu footer jadi teal gelap, ia muncul sebagai pita terang yang
   memisahkan footer dari isi — persis masalah yang sama dengan pita 32px di
   bawah header.

   Ketiganya dinolkan supaya footer menempel rapat. */
html:root .entry-content-wrap {
	padding-bottom: 0;
}

html:root .site-top-footer-inner-wrap {
	padding-top: 0;
}

html:root .footer-widget-area .widget,
html:root .footer-widget-area-inner > .widget {
	margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   24. Footer contact button

   Sits in the brand column, directly under the GPhC badge, so the footer ends
   its "who we are" block with a way to reach us.

   Mint fill, navy label. Both numbers were checked against the footer's own
   surface (#163A49, see section 20b), not against the section teal:
     mint on trust-teal-dark   5,39:1  — clears SC 1.4.11 for the button edge
     navy on mint              8,52:1  — clears AA for the label

   cta-orange-strong, the button colour everywhere else on the site, is only
   2,66:1 against this background and would need an added border to be legal
   here. Mint is already the footer's accent for the badge and link hovers, so
   it is also the more consistent choice.
   -------------------------------------------------------------------------- */
html:root .hw-surface-footer .hw-footer__cta-wrap {
	margin-block: 20px 0;
}

html:root .hw-surface-footer .hw-footer__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* 44px minimum touch target (WCAG 2.5.8). */
	min-height: 44px;
	padding: 11px 24px;
	background: var(--wp--preset--color--mint);
	color: var(--wp--preset--color--navy) !important;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius--small);
}

/* Hover and focus invert to white — 12,10:1 on this surface, and it keeps the
   pressed state distinguishable from the mint link hovers around it. */
html:root .hw-surface-footer .hw-footer__cta:hover,
html:root .hw-surface-footer .hw-footer__cta:focus-visible {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--trust-teal-dark) !important;
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   25. Card styling on a Kadence column

   Kadence paints a column's background on `.kt-inside-inner-col`, not on the
   column element itself. A card class applied to the outer element therefore
   draws its shadow around a transparent box, with the rounded white box
   sitting inside it — visibly a square shadow behind rounded corners. Both
   properties move to the element that is actually painted.
   -------------------------------------------------------------------------- */
.wp-block-kadence-column.hw-card {
	box-shadow: none;
}

.wp-block-kadence-column.hw-card > .kt-inside-inner-col {
	box-shadow: 0 1px 2px rgba(13, 16, 25, 0.05),
	            0 12px 28px -18px rgba(13, 16, 25, 0.18);
	height: 100%;
}

/* --------------------------------------------------------------------------
   26. Editorial figures on guide pages

   Diagrams built from HTML rather than image files. An SVG of boxes and
   arrows scales its own text down until a phone cannot render it legibly;
   a grid stacks instead, and the labels stay selectable, translatable and
   readable by assistive technology.

   Arrows are drawn with CSS triangles and are decorative only. The reading
   order of the list carries the sequence on its own, so nothing is lost when
   the triangles are not perceived — WCAG 2.2 AA, 1.4.1.

   Markup: theme/inc/figures.php, via [hw360_figure].
   -------------------------------------------------------------------------- */
.hw-figure {
	--hw-fig-line: var(--wp--preset--color--grey-border, #CBD4DA);
	--hw-fig-card: var(--wp--preset--color--white, #FFFFFF);
	--hw-fig-edge: var(--wp--preset--color--card-border, #E5E6E8);
	--hw-fig-ink: var(--wp--preset--color--navy, #0D1019);
	--hw-fig-teal: var(--wp--preset--color--trust-teal, #1F4C5F);

	margin: 32px 0;
	padding: 26px 24px 20px;
	background: var(--wp--preset--color--soft-grey, #F4F4F6);
	border: 1px solid var(--hw-fig-edge);
	border-radius: 10px;
}

.hw-figure__caption {
	margin: 18px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--hw-fig-edge);
	color: var(--wp--preset--color--grey-text-strong, #4B5563);
	font-size: 0.875rem;
	line-height: 1.6;
}

/* -- 26.1 Chain of organisations ------------------------------------------ */

/*
 * Three columns, with the two "you" nodes spanning the full width above and
 * below. Auto-placement handles it: the spanning nodes are first and last in
 * the source, so they claim their own rows and the three organisations land
 * side by side between them.
 */
.hw-chain {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hw-chain__node {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 18px;
	background: var(--hw-fig-card);
	border: 1px solid var(--hw-fig-edge);
	border-radius: 8px;
}

.hw-chain__node--you {
	grid-column: 1 / -1;
	background: transparent;
	border-style: dashed;
}

.hw-chain__node--org {
	border-top: 3px solid var(--hw-fig-teal);
}

.hw-chain__tag {
	color: var(--hw-fig-teal);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.hw-chain__role {
	color: var(--hw-fig-ink);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
}

.hw-chain__desc {
	color: var(--hw-fig-ink);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.hw-chain__reg {
	margin-top: auto;
	padding-top: 10px;
	color: var(--wp--preset--color--grey-text-strong, #4B5563);
	font-size: 0.8125rem;
	line-height: 1.5;
}

.hw-chain__band {
	margin: 20px 0 0;
	padding: 16px 18px;
	background: var(--wp--preset--color--trust-teal-surface, #E8EDF0);
	border-radius: 8px;
	color: var(--wp--preset--color--trust-teal-dark, #163A49);
	font-size: 0.9375rem;
	line-height: 1.65;
}

/* Arrow into the row of organisations, and out of it. */
.hw-chain__node--you::after,
.hw-chain__node--org + .hw-chain__node--org::before {
	content: "";
	position: absolute;
	border: 6px solid transparent;
}

.hw-chain__node--you:first-child::after {
	bottom: -19px;
	left: 50%;
	transform: translateX(-50%);
	border-top-color: var(--hw-fig-line);
	border-bottom-width: 0;
}

.hw-chain__node--you:last-child::after {
	top: -19px;
	left: 50%;
	transform: translateX(-50%);
	border-top-width: 0;
	border-bottom-color: var(--hw-fig-line);
}

/* Between organisations 1-2 and 2-3. */
.hw-chain__node--org + .hw-chain__node--org::before {
	top: 50%;
	left: -19px;
	transform: translateY(-50%);
	border-left-color: var(--hw-fig-line);
	border-right-width: 0;
}

/* -- 26.2 Step sequence with a decision ----------------------------------- */

.hw-journey {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.hw-journey__step {
	position: relative;
	display: grid;
	grid-template-columns: 44px 1fr;
	gap: 16px;
	padding-bottom: 22px;
}

.hw-journey__step:last-child {
	padding-bottom: 0;
}

/* The rail joining one step to the next. Stops at the final step. */
.hw-journey__step:not(:last-child)::before {
	content: "";
	position: absolute;
	top: 44px;
	left: 21px;
	bottom: 0;
	width: 2px;
	background: var(--hw-fig-line);
}

.hw-journey__num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: var(--hw-fig-teal);
	border-radius: 50%;
	color: var(--wp--preset--color--white, #FFFFFF);
	font-size: 1.125rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.hw-journey__body {
	padding-top: 2px;
}

.hw-journey__title {
	display: block;
	margin-bottom: 6px;
	color: var(--hw-fig-ink);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
}

.hw-journey__desc {
	display: block;
	color: var(--hw-fig-ink);
	font-size: 0.9375rem;
	line-height: 1.65;
}

/*
 * Step 3 is the only branch in the sequence. Drawn as a plain box it reads as
 * one more stage on a conveyor belt, which is precisely the reading the guide
 * argues against — so the outcomes get their own panel.
 */
.hw-journey__outcomes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}

.hw-journey__outcomes > li {
	padding: 7px 13px;
	background: var(--hw-fig-card);
	border: 1px solid var(--hw-fig-line);
	border-radius: 999px;
	color: var(--hw-fig-ink);
	font-size: 0.875rem;
	line-height: 1.4;
}

/* -- 26.3 Regulator map --------------------------------------------------- */

.hw-regmap {
	margin: 0;
	padding: 0;
	list-style: none;
	background: var(--hw-fig-card);
	border: 1px solid var(--hw-fig-edge);
	border-radius: 8px;
	overflow: hidden;
}

.hw-regmap__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	gap: 8px 24px;
	padding: 15px 18px;
}

.hw-regmap__row + .hw-regmap__row {
	border-top: 1px solid var(--hw-fig-edge);
}

.hw-regmap__who {
	color: var(--hw-fig-ink);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.5;
}

.hw-regmap__by {
	color: var(--hw-fig-teal);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.5;
}

/* The CQC row carries a devolved-nations caveat that is not itself a
   regulator name, so it steps back from the column's emphasis. */
.hw-regmap__aside {
	display: inline-block;
	margin-top: 4px;
	color: var(--wp--preset--color--grey-text-strong, #4B5563);
	font-size: 0.8125rem;
	font-weight: 400;
	line-height: 1.5;
}

/* -- 26.4 Narrow screens -------------------------------------------------- */

@media (max-width: 781px) {
	.hw-figure {
		padding: 20px 16px 16px;
	}

	.hw-chain {
		grid-template-columns: 1fr;
	}

	/* Every arrow now points down the single column. */
	.hw-chain__node--org + .hw-chain__node--org::before {
		top: -19px;
		left: 50%;
		transform: translateX(-50%);
		border-left-color: transparent;
		border-right-width: 6px;
		border-top-width: 0;
		border-bottom-color: var(--hw-fig-line);
	}

	.hw-chain__reg {
		margin-top: 0;
	}

	.hw-regmap__row {
		grid-template-columns: 1fr;
		gap: 4px;
	}
}

/* --------------------------------------------------------------------------
   27. Guide hero photograph

   One photograph per guide, sitting directly under the H1 inside the intro
   card. Cropped to a consistent band so six guides do not each set their own
   height depending on whichever stock image was chosen.

   Photographs on these pages are illustrative only. Nothing depicting a
   branded medicine, a package, or a person presented as PenCompare staff
   goes here — the first would read as advertising a prescription-only
   medicine, the second as a claim about who we are.
   -------------------------------------------------------------------------- */
.hw-guide-hero {
	margin: 0 0 26px;
}

.hw-guide-hero img {
	display: block;
	width: 100%;
	height: clamp(200px, 34vw, 320px);
	object-fit: cover;
	/* Stock photographs put the subject's face in the upper third, and a
	   centred crop of a portrait-shaped source cuts it off. */
	object-position: center 35%;
	border-radius: 10px;
}

/* Some photographs put their subject low in the frame — a parcel on a
   doorstep, for instance. The default crop would show the door and lose it. */
.hw-guide-hero--mid img {
	object-position: center 55%;
}

.hw-guide-hero--low img {
	object-position: center 70%;
}

.hw-guide-hero figcaption {
	margin-top: 10px;
	color: var(--wp--preset--color--grey-text-strong, #4B5563);
	font-size: 0.8125rem;
	line-height: 1.55;
}

/* --------------------------------------------------------------------------
   28. Figure components shared across guides

   Three small layouts that more than one guide needs: a checklist, a row of
   chips, and a two-panel contrast. Kept generic so a new guide reuses them
   instead of growing another near-identical block of CSS.
   -------------------------------------------------------------------------- */

/* -- 28.1 Checklist ------------------------------------------------------- */

.hw-checklist {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 26px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hw-checklist > li {
	position: relative;
	padding-left: 30px;
	color: var(--hw-fig-ink);
	font-size: 0.9375rem;
	line-height: 1.6;
}

/*
 * The tick is drawn rather than typed so it cannot pick up an emoji font on
 * Windows and turn green. Decorative — the item's own text carries the
 * meaning, so nothing is lost if it is not perceived.
 */
.hw-checklist > li::before {
	content: "";
	position: absolute;
	top: 6px;
	left: 6px;
	width: 6px;
	height: 11px;
	border: solid var(--wp--preset--color--success-green, #0D893A);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* -- 28.2 Chips ----------------------------------------------------------- */

.hw-chips,
.hw-journey__outcomes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hw-chips > li {
	padding: 9px 15px;
	background: var(--hw-fig-card);
	border: 1px solid var(--hw-fig-line);
	border-radius: 999px;
	color: var(--hw-fig-ink);
	font-size: 0.875rem;
	line-height: 1.45;
}

/* -- 28.3 Two-panel contrast ---------------------------------------------- */

.hw-contrast {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.hw-contrast__panel {
	padding: 18px 20px;
	border-radius: 8px;
}

.hw-contrast__panel ul {
	margin: 0;
	padding-left: 20px;
	font-size: 0.9375rem;
	line-height: 1.6;
}

.hw-contrast__panel li + li {
	margin-top: 8px;
}

.hw-contrast__head {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 12px;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.4;
}

/*
 * Shape, not just colour. The two marks differ as a tick and an exclamation,
 * and each panel names itself in its heading, so the pairing survives
 * greyscale and colour blindness alike.
 */
.hw-contrast__mark {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	font-size: 0.8125rem;
	font-weight: 700;
}

.hw-contrast__panel--expect {
	background: var(--wp--preset--color--success-surface, #DCFCE7);
	color: var(--wp--preset--color--success-text, #166534);
}

.hw-contrast__panel--expect .hw-contrast__mark {
	background: var(--wp--preset--color--success-text, #166534);
	color: var(--wp--preset--color--white, #FFFFFF);
}

.hw-contrast__panel--avoid {
	background: var(--wp--preset--color--warning-amber-surface, #FFF3CD);
	color: var(--wp--preset--color--warning-amber, #8A4B00);
}

.hw-contrast__panel--avoid .hw-contrast__mark {
	background: var(--wp--preset--color--warning-amber, #8A4B00);
	color: var(--wp--preset--color--white, #FFFFFF);
}

/* Two panels side by side with no verdict attached.
   The --expect / --avoid pair above carries a judgement in its colour, which
   is right when one option is genuinely worse. It is wrong for a comparison
   where neither side is the mistake — a daily pen against a weekly one, say.
   Painting one of those amber would tell the reader something we do not
   believe and cannot support. */
.hw-contrast__panel--plain {
	background: var(--hw-fig-card);
	border: 1px solid var(--hw-fig-edge);
	color: var(--hw-fig-ink);
}

.hw-contrast__panel--plain .hw-contrast__mark {
	background: var(--hw-fig-teal);
	color: var(--wp--preset--color--white, #FFFFFF);
}

@media (max-width: 781px) {
	.hw-checklist,
	.hw-contrast {
		grid-template-columns: 1fr;
	}
}

/* --------------------------------------------------------------------------
   33. Card grids
   -------------------------------------------------------------------------- */

/* Kadence sizes an infobox to its own content, so a row of three cards ends
   at three different heights whenever the copy is not the same length — which
   it never is. Add .hw-cards-even to the rowlayout to make the cards fill the
   grid track instead, and push any "read more" link to the bottom so those
   line up too. Scoped to the class rather than applied to every infobox on the
   site, because the homepage cards are deliberately sized to their content. */
.hw-cards-even .wp-block-kadence-column,
.hw-cards-even .kt-inside-inner-col,
.hw-cards-even .wp-block-kadence-infobox,
.hw-cards-even .kt-blocks-info-box-link-wrap {
	height: 100%;
}

.hw-cards-even .kt-blocks-info-box-link-wrap,
.hw-cards-even .kt-infobox-textcontent {
	display: flex;
	flex-direction: column;
}

.hw-cards-even .kt-infobox-textcontent {
	flex: 1 1 auto;
}

.hw-cards-even .kt-blocks-info-box-learnmore-wrap {
	margin-top: auto;
}

/* --------------------------------------------------------------------------
   29. Delivery guide components
   -------------------------------------------------------------------------- */

/* -- 29.1 Gates before an outcome ----------------------------------------- */

/*
 * Three conditions that must all clear before a fourth thing happens. Drawn
 * as a row feeding one bar, so "all of these, then that" is the shape of the
 * figure rather than a claim inside it.
 */
.hw-gates {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: hw-gate;
}

.hw-gates__gate {
	position: relative;
	padding: 16px 18px 16px 46px;
	background: var(--hw-fig-card);
	border: 1px solid var(--hw-fig-edge);
	border-top: 3px solid var(--hw-fig-teal);
	border-radius: 8px;
	color: var(--hw-fig-ink);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.hw-gates__gate::before {
	counter-increment: hw-gate;
	content: counter(hw-gate);
	position: absolute;
	top: 16px;
	left: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	background: var(--wp--preset--color--trust-teal-surface, #E8EDF0);
	border-radius: 50%;
	color: var(--hw-fig-teal);
	font-size: 0.75rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.hw-gates__outcome {
	position: relative;
	margin: 26px 0 0;
	padding: 16px 20px;
	background: var(--hw-fig-teal);
	border-radius: 8px;
	color: var(--wp--preset--color--white, #FFFFFF);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
}

/* Arrow from the row of gates down into the outcome bar. */
.hw-gates__outcome::before {
	content: "";
	position: absolute;
	top: -19px;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-width: 0;
	border-bottom-color: var(--hw-fig-teal);
}

/* -- 29.2 Temperature band ------------------------------------------------ */

.hw-tempband {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin: 0 0 18px;
	padding: 14px 20px;
	background: var(--wp--preset--color--info-indigo-surface, #F0F6FF);
	border-left: 4px solid var(--wp--preset--color--info-indigo, #3730A3);
	border-radius: 8px;
}

.hw-tempband__value {
	color: var(--wp--preset--color--info-indigo, #3730A3);
	font-size: 1.25rem;
	font-weight: 700;
	/* A range is read digit by digit against the one below it. */
	font-variant-numeric: tabular-nums;
}

.hw-tempband__label {
	color: var(--hw-fig-ink);
	font-size: 0.9375rem;
	line-height: 1.5;
}

/* One column when the items are long enough that two would wrap badly. */
.hw-checklist--single {
	grid-template-columns: 1fr;
}

@media (max-width: 781px) {
	.hw-gates {
		grid-template-columns: 1fr;
	}
}

/* --------------------------------------------------------------------------
   30. Warning variant of the checklist

   Used for the red flags on the Safety guide, opposite the green ones. The
   mark is a filled disc where the green list uses an open tick, so the two
   read as opposites without colour doing the work — WCAG 2.2 AA, 1.4.1. That
   matters more here than anywhere else on the site: this is the page a
   reader consults before deciding whether to trust a seller.
   -------------------------------------------------------------------------- */
.hw-checklist--warn > li::before {
	content: "!";
	top: 2px;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	background: var(--wp--preset--color--error-red, #B42318);
	border: 0;
	border-radius: 50%;
	color: var(--wp--preset--color--white, #FFFFFF);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
	transform: none;
}

/* --------------------------------------------------------------------------
   31. Glossary components
   -------------------------------------------------------------------------- */

/* -- 31.1 Legal classes of medicine --------------------------------------- */

/*
 * Two groups, not three rows. The grouping is the argument: "over the
 * counter" is a bracket around the first two classes rather than a class of
 * its own, and a flat list of three would say the opposite.
 */
.hw-classes__group {
	padding: 16px 18px;
	background: var(--hw-fig-card);
	border: 1px solid var(--hw-fig-edge);
	border-left: 4px solid var(--wp--preset--color--grey-border, #CBD4DA);
	border-radius: 8px;
}

.hw-classes__group + .hw-classes__group {
	margin-top: 14px;
}

.hw-classes__group--pom {
	border-left-color: var(--hw-fig-teal);
}

.hw-classes__label {
	margin: 0 0 12px;
	color: var(--wp--preset--color--grey-text-strong, #4B5563);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.4;
	text-transform: uppercase;
}

.hw-classes__group--pom .hw-classes__label {
	color: var(--hw-fig-teal);
}

.hw-classes__group ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hw-classes__row {
	display: grid;
	grid-template-columns: 58px minmax(0, 1fr);
	gap: 14px;
	align-items: start;
}

.hw-classes__row + .hw-classes__row {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--hw-fig-edge);
}

.hw-classes__code {
	padding: 3px 0;
	background: var(--wp--preset--color--trust-teal-surface, #E8EDF0);
	border-radius: 5px;
	color: var(--hw-fig-teal);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-align: center;
}

.hw-classes__name {
	display: block;
	color: var(--hw-fig-ink);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.45;
}

.hw-classes__where {
	display: block;
	margin-top: 3px;
	color: var(--wp--preset--color--grey-text-strong, #4B5563);
	font-size: 0.875rem;
	line-height: 1.55;
}

/* -- 31.2 Regulator map, scope variant ------------------------------------ */

/*
 * The base map reads "this thing → is regulated by that body". Here the
 * question runs the other way — "this body → covers that" — so the emphasis
 * swaps to the left column and the scope text steps back.
 */
.hw-regmap--scope .hw-regmap__row {
	grid-template-columns: 84px minmax(0, 1fr);
	gap: 8px 20px;
}

.hw-regmap--scope .hw-regmap__by {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.hw-regmap--scope .hw-regmap__who {
	font-weight: 400;
	color: var(--hw-fig-ink);
}

@media (max-width: 781px) {
	.hw-classes__row {
		grid-template-columns: 52px minmax(0, 1fr);
		gap: 12px;
	}

	.hw-regmap--scope .hw-regmap__row {
		grid-template-columns: 1fr;
	}
}

/* --------------------------------------------------------------------------
   32. Private vs NHS components
   -------------------------------------------------------------------------- */

/* -- 32.1 Additive stack -------------------------------------------------- */

/*
 * Parts adding up to a total, with the plus signs drawn between rows and an
 * equals before the sum. The arithmetic is the point: a reader comparing two
 * headline figures is usually comparing two different subsets of this stack.
 *
 * No amounts appear here, and none should. The charges this guide quotes are
 * reset each April, and a number in a theme file is a number nobody updates.
 */
.hw-stack {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hw-stack > li {
	position: relative;
	padding: 15px 18px;
	background: var(--hw-fig-card);
	border: 1px solid var(--hw-fig-edge);
	border-radius: 8px;
	color: var(--hw-fig-ink);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.hw-stack > li + li,
.hw-stack__total {
	margin-top: 26px;
}

.hw-stack > li + li::before,
.hw-stack__total::before {
	content: "+";
	position: absolute;
	top: -22px;
	left: 50%;
	transform: translateX(-50%);
	color: var(--wp--preset--color--grey-muted, #6B7280);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;
}

.hw-stack__total {
	position: relative;
	padding: 16px 20px;
	background: var(--hw-fig-teal);
	border-radius: 8px;
	color: var(--wp--preset--color--white, #FFFFFF);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
}

.hw-stack__total::before {
	content: "=";
	color: var(--hw-fig-teal);
}

/* -- 32.2 Neutral checklist marker ---------------------------------------- */

/*
 * For lists that are examples rather than things to verify. A tick beside a
 * list of treatments would read as a recommendation, which this site does not
 * make.
 */
.hw-checklist--plain > li::before {
	top: 9px;
	left: 4px;
	width: 7px;
	height: 7px;
	background: var(--wp--preset--color--grey-border, #CBD4DA);
	border: 0;
	border-radius: 50%;
	transform: none;
}