:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #152238;
  --muted: #657186;
  --line: #dbe4ef;
  --accent: #244f9e;
  --accent-dark: #18376f;
  --accent-soft: #e8f0ff;
  --success-soft: #e9f8ef;
  --success: #237a45;
  --shadow: 0 10px 26px rgba(21, 34, 56, 0.09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding: 26px 0 42px; }
.finder-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.eyebrow { margin: 0 0 8px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; }
h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.7rem); line-height: 1.08; }
.intro { margin: 12px 0 0; max-width: 700px; color: var(--muted); font-size: 1.03rem; }
.hero-tools { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.language-picker span, .search-box span, .sort-box span { display: block; margin-bottom: 6px; font-size: .84rem; color: var(--muted); font-weight: 700; }
select, input[type="search"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
}
input[type="search"] { padding-inline: 14px; }
.btn, .app-actions a, .more-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.btn.secondary, .app-actions a.secondary { background: #fff; color: var(--accent); }
.link-button { border: 0; background: transparent; color: var(--accent); font-weight: 700; padding: 0; }

.finder-layout { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
.filters-panel, .results-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.filters-panel { padding: 18px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-header h2 { margin: 0; font-size: 1.16rem; }
.search-box { display: block; margin-bottom: 16px; }

.filters-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 16px;
}
.filters-panel .panel-header,
.filters-panel .search-box {
  grid-column: 1 / -1;
}
.filter-block { border-top: 1px solid var(--line); padding-top: 14px; min-width: 0; }
.filter-title {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  border: 0; background: transparent; padding: 0 0 10px; color: var(--text); font-weight: 800; text-align: left;
}
.filter-title::after { content: "−"; color: var(--muted); }
.filter-title[aria-expanded="false"]::after { content: "+"; }
.checkbox-list { display: grid; gap: 8px; max-height: 190px; overflow: auto; padding-right: 4px; }
.checkbox-list.collapsed { display: none; }
.checkbox-item {
  display: grid; grid-template-columns: 18px 1fr auto; align-items: start; gap: 9px;
  padding: 8px; border-radius: 10px; color: var(--text);
}
.checkbox-item:hover { background: var(--accent-soft); }
.checkbox-item small { color: var(--muted); }

.results-panel { padding: 18px; min-height: 420px; }
.results-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 18px; }
.result-count { margin: 0 0 8px; font-size: 1.08rem; font-weight: 800; }
.sort-box { min-width: 190px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  border: 1px solid var(--line); background: var(--accent-soft); color: var(--accent-dark);
  border-radius: 999px; padding: 6px 10px; font-size: .86rem; display: inline-flex; gap: 8px; align-items: center;
}
.filter-chip button { border: 0; background: transparent; color: inherit; font-weight: 900; padding: 0; line-height: 1; }

.results-list { margin: 0; padding-left: 2.25rem; display: grid; gap: 10px; }
.results-list li::marker {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--mig-navy);
}
.app-result {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
}
.result-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.app-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  font-weight: 800;
  color: #9aa3af;
  transition: color .15s ease;
  cursor: default;
}
.app-title:hover,
.app-result:hover .app-title {
  color: var(--mig-navy);
}
.more-button { min-height: 34px; padding: 7px 12px; white-space: nowrap; }
.more-button[aria-expanded="true"] { background: #fff; color: var(--accent); }
.result-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.card-topline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.app-code { color: var(--muted); font-size: .82rem; font-weight: 700; }
.status-badge { background: var(--success-soft); color: var(--success); border-radius: 999px; padding: 4px 8px; font-size: .78rem; font-weight: 800; }
.app-description { margin: 0 0 12px; color: #344258; line-height: 1.55; }
.meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.meta-item { background: #f7f9fc; border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; font-size: .9rem; }
.meta-item strong { display: block; color: var(--muted); font-size: .76rem; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .03em; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.tag { border-radius: 999px; background: #eef2f7; padding: 5px 9px; font-size: .84rem; color: #344258; }
.details-content { margin-top: 10px; display: grid; gap: 10px; color: #344258; }
.detail-row strong { color: var(--text); }
.app-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.empty-state { padding: 36px 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 18px; }

@media (max-width: 1050px) {
  .filters-panel { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .finder-hero, .results-toolbar, .result-summary-row { flex-direction: column; align-items: stretch; }
  .filters-panel { grid-template-columns: 1fr; }
  .sort-box { min-width: 0; }
  .meta-grid { grid-template-columns: 1fr; }
}

.result-subline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.result-topic {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.35;
  font-style: italic;
}
.permalink-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.permalink-button:hover,
.permalink-button:focus {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}
.single-record-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.single-record-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.single-record-header h2 { margin: 0; font-size: 1.6rem; }
.back-link { margin-bottom: 14px; }
@media (max-width: 720px) {
  .result-subline, .single-record-header { flex-direction: column; align-items: stretch; }
  .permalink-button { width: 100%; }
}

/* Apps4Health-style record page overrides */
:root {
  --mig-navy: #233f73;
  --mig-navy-dark: #152b55;
  --mig-red: #e3222b;
  --mig-red-dark: #bb1620;
  --mig-soft: #f5f7fb;
  --mig-border: #d8e0ee;
  --mig-text: #26364d;
}
.record-body {
  background: #ffffff;
  color: var(--mig-text);
}
.record-shell {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 46px;
}
.record-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  border-bottom: 1px solid #e7ebf2;
  padding-bottom: 14px;
}
.record-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 4px;
  border: 1px solid var(--mig-border);
  background: #f8f9fb;
  color: var(--mig-navy);
  text-decoration: none;
  font-weight: 700;
  font-size: .94rem;
}
.record-action:hover,
.record-action:focus {
  background: var(--mig-navy);
  border-color: var(--mig-navy);
  color: #fff;
}
.pdf-action {
  background: var(--mig-red);
  border-color: var(--mig-red);
  color: #fff;
}
.pdf-action:hover,
.pdf-action:focus {
  background: var(--mig-red-dark);
  border-color: var(--mig-red-dark);
}
.record-language-picker {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5f6e83;
  font-size: .9rem;
}
.record-language-picker select {
  min-height: 34px;
  width: auto;
  border-radius: 4px;
  padding: 0 8px;
}
.apps4health-record {
  max-width: 820px;
  margin: 0 auto;
  background: #fff;
}
.record-title {
  color: var(--mig-navy);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.08;
  margin: 8px 0 26px;
  letter-spacing: -.02em;
}
.record-field {
  margin: 0 0 22px;
  padding: 0;
}
.record-field h2,
.record-share h2 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--mig-navy);
  font-size: 1.22rem;
  font-weight: 700;
  margin: 0 0 9px;
  padding: 0 0 7px;
  border-bottom: 1px solid #eef1f6;
}
.record-field h2::before {
  content: "";
  width: 21px;
  height: 21px;
  border-radius: 4px;
  flex: 0 0 21px;
  background: linear-gradient(135deg, var(--mig-red) 0%, var(--mig-red) 48%, var(--mig-navy) 49%, var(--mig-navy) 100%);
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--mig-border);
}
.record-field-value {
  padding-left: 31px;
  color: #28384e;
  line-height: 1.58;
  font-size: 1rem;
}
.record-field-value p {
  margin: 0;
}
.description-field .record-field-value {
  font-size: 1.04rem;
}
.record-app-image {
  margin: 2px 0 24px 31px;
  max-width: 430px;
  border: 1px solid var(--mig-border);
  background: #fff;
  padding: 8px;
}
.record-app-placeholder {
  min-height: 122px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e9edf6 0%, #fbfbfd 58%, #f7e5e7 100%);
  color: var(--mig-navy);
  font-size: 3rem;
  letter-spacing: .04em;
  font-weight: 700;
}
.record-app-image figcaption {
  margin-top: 6px;
  color: #6c7688;
  font-size: .86rem;
}
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 10px;
}
.store-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 154px;
  min-height: 48px;
  padding: 5px 13px;
  border-radius: 7px;
  background: #050505;
  color: #fff;
  text-decoration: none;
  line-height: 1.05;
  border: 1px solid #2b2b2b;
}
.store-badge span {
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.store-badge strong {
  font-size: 1.08rem;
  font-weight: 700;
}
.google-play-badge strong {
  font-size: 1.18rem;
}
.record-text-link {
  color: var(--mig-navy);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(35, 63, 115, .35);
}
.record-text-link:hover,
.record-text-link:focus {
  color: var(--mig-red);
  border-bottom-color: var(--mig-red);
}
.record-value-list {
  margin: 0;
  padding-left: 1.25rem;
}
.record-value-list li {
  margin: 2px 0;
}
.record-share {
  margin-top: 24px;
  padding-top: 4px;
}
.record-share h2 {
  border-bottom: none;
  margin-bottom: 7px;
  padding-bottom: 0;
}
.share-icons {
  display: flex;
  gap: 7px;
  padding-left: 31px;
}
.share-icons .share-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--mig-navy);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}
.share-icons .share-icon:hover,
.share-icons .share-icon:focus {
  background: var(--mig-red);
  color: #fff;
  outline: 2px solid rgba(196, 18, 48, .2);
  outline-offset: 2px;
}
.share-icons .copy-share {
  font-size: .95rem;
}
.share-icons .email-share {
  background: #6c7688;
}
.record-empty {
  border: 1px dashed var(--mig-border);
  border-radius: 4px;
  padding: 28px;
  color: #6c7688;
  text-align: center;
}
.permalink-button,
.more-button,
.btn,
.app-actions a {
  border-radius: 4px;
}
.permalink-button {
  background: var(--mig-red);
  border-color: var(--mig-red);
}
.permalink-button:hover,
.permalink-button:focus {
  background: var(--mig-red-dark);
  border-color: var(--mig-red-dark);
}
.more-button {
  background: var(--mig-navy);
  border-color: var(--mig-navy);
}
.more-button[aria-expanded="true"] {
  color: var(--mig-navy);
  background: #fff;
  border-color: var(--mig-navy);
}
@media print {
  /* Keep printed/PDF record focused on the catalogue content only. */
  .idh-site-header,
  .record-top-actions,
  .record-share {
    display: none !important;
  }
  .record-shell { width: 100%; padding: 0; }
  .record-title { font-size: 28pt; }
  .record-field { break-inside: avoid; }
  .record-app-image { max-width: 340px; }
}
@media (max-width: 680px) {
  .record-language-picker { width: 100%; margin-left: 0; justify-content: space-between; }
  .record-language-picker select { flex: 1; }
  .record-field-value,
  .record-app-image,
  .share-icons { padding-left: 0; margin-left: 0; }
  .record-title { margin-top: 14px; }
}

/* v7 correction: title-line background + visible More button */
.result-summary-row {
  align-items: stretch;
}
.app-title {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 4px;
  background: #eef2f7;
  color: var(--mig-navy);
  transition: background-color .15s ease, color .15s ease;
}
.app-title:hover,
.app-result:hover .app-title {
  background: var(--mig-navy);
  color: #ffffff;
}
.more-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 16px;
  background: var(--mig-red);
  border-color: var(--mig-red);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(227, 34, 43, .24);
}
.more-button:hover,
.more-button:focus {
  background: var(--mig-red-dark);
  border-color: var(--mig-red-dark);
  color: #ffffff;
}
.more-button[aria-expanded="true"] {
  background: var(--mig-navy);
  border-color: var(--mig-navy);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(35, 63, 115, .22);
}
.more-button[aria-expanded="true"]:hover,
.more-button[aria-expanded="true"]:focus {
  background: var(--mig-navy-dark);
  border-color: var(--mig-navy-dark);
  color: #ffffff;
}
@media (max-width: 720px) {
  .more-button { width: 100%; }
}

/* v8: make inline "More" content use the same record-section style as the View page */
.result-details {
  margin-top: 14px;
  border-top: 1px solid #eef1f6;
  padding: 18px 8px 4px;
  background: #ffffff;
}
.inline-record-content {
  max-width: 820px;
}
.inline-record-content .record-field {
  margin-bottom: 18px;
}
.inline-record-content .record-field h2 {
  font-size: 1.08rem;
}
.inline-record-content .record-field-value {
  font-size: .98rem;
}
.inline-record-content .store-badges {
  margin-top: 11px;
}

/* v16: single-column filter blocks */
.filters-panel {
  grid-template-columns: 1fr;
  align-items: start;
}
.filters-panel .panel-header,
.filters-panel .search-box {
  grid-column: auto;
}
.search-box input[type="search"] {
  max-width: 100%;
}
.filter-block {
  display: block;
  border-top: 1px solid var(--line);
  padding: 14px 0 0;
}
.filter-title {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f5f7fb;
  border: 1px solid var(--line);
  min-height: 42px;
  margin-bottom: 10px;
  text-align: left;
}
.checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}
.checkbox-list.collapsed { display: none; }
.checkbox-item {
  display: inline-grid;
  grid-template-columns: 18px auto auto;
  align-items: center;
  width: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  background: #fff;
}
.checkbox-item .option-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.option-flag {
  display: inline-block;
  min-width: 1.35em;
  text-align: center;
  font-size: 1.05em;
  line-height: 1;
}
.checkbox-item small {
  margin-left: 2px;
}
@media (max-width: 900px) {
  .checkbox-list {
    max-height: 220px;
    overflow: auto;
  }
}


/* v17: robust language/country flags and corrected compact filter tokens */
.option-flag {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", system-ui, sans-serif;
  font-size: 1.15em;
  line-height: 1;
}
.option-flag-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  background: #eef2f7;
  border: 1px solid #d8e0ee;
  color: #233f73;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.checkbox-item .option-label { gap: 5px; }

/* v18: real flag images in language/country filters */
.option-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.option-flag-img {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.18);
  flex: 0 0 auto;
}
.option-globe {
  font-size: 1.05rem;
  line-height: 1;
  flex: 0 0 auto;
}
.option-flag-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  padding: 0.08rem 0.3rem;
  border-radius: 0.25rem;
  background: #e8f1fb;
  border: 1px solid #c9dced;
  color: #163d6b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}


/* v19: larger red expand/collapse symbols and collapsed filters by default */
.filter-title::after {
  color: var(--mig-red, #e3222b);
  font-size: 1.65rem;
  line-height: 1;
  font-weight: 900;
  margin-left: 14px;
}
.filter-title:hover::after,
.filter-title:focus::after {
  color: var(--mig-red-dark, #bb1620);
}
.filter-title[aria-expanded="false"]::after {
  content: "+";
}
.filter-title[aria-expanded="true"]::after {
  content: "−";
}

/* Keyword ideas under the search box */
.keyword-ideas {
  grid-column: 1 / -1;
  margin: -4px 0 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcff;
  overflow: hidden;
}
.keyword-ideas-toggle {
  width: 100%;
  border: 0;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  text-align: left;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.keyword-ideas-toggle::after {
  content: "+";
  color: var(--mig-red, #e3222b);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}
.keyword-ideas-toggle[aria-expanded="true"]::after { content: "−"; }
.keyword-ideas-panel {
  border-top: 1px solid var(--line);
  padding: 12px 14px 14px;
}
.keyword-ideas-panel.collapsed { display: none; }
.keyword-ideas-help {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .92rem;
}
.keyword-ideas-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 10px;
}
.keyword-category {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.keyword-category-title {
  width: 100%;
  border: 0;
  background: #f7f9fc;
  color: var(--mig-navy, #233f73);
  font-weight: 400;
  text-align: left;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.keyword-category-title::after {
  content: "+";
  color: var(--mig-red, #e3222b);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}
.keyword-category-title[aria-expanded="true"]::after { content: "−"; }
.keyword-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
}
.keyword-chip-list.collapsed { display: none; }
.keyword-chip {
  border: 1px solid var(--mig-border, #d8e0ee);
  background: #fff;
  color: var(--mig-navy, #233f73);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 400;
  font-size: .88rem;
}
.keyword-chip:hover,
.keyword-chip:focus {
  background: var(--mig-red, #e3222b);
  border-color: var(--mig-red, #e3222b);
  color: #fff;
}
@media (max-width: 900px) {
  .keyword-ideas-categories { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}
@media (max-width: 620px) {
  .keyword-ideas-categories { grid-template-columns: 1fr; }
}

/* v29: Easy-to-use mode for people with intellectual disabilities */
.btn.easy {
  background: var(--mig-red, #e3222b);
  border-color: var(--mig-red, #e3222b);
  color: #fff;
}
.btn.easy[aria-pressed="true"] {
  background: var(--mig-navy, #233f73);
  border-color: var(--mig-navy, #233f73);
}
.simple-search-panel {
  background: #ffffff;
  border: 2px solid #dbe4ef;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.simple-search-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.simple-search-header h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
}
.simple-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
}
.simple-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}
.simple-action {
  min-height: 96px;
  border: 2px solid #d8e0ee;
  background: #f8fbff;
  color: var(--mig-navy, #233f73);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}
.simple-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 14px;
  background: #ffffff;
  font-size: 2.15rem;
  box-shadow: 0 2px 8px rgba(21, 34, 56, .08);
}
.simple-action:hover,
.simple-action:focus {
  background: var(--mig-navy, #233f73);
  border-color: var(--mig-navy, #233f73);
  color: #fff;
}
.start-again {
  white-space: nowrap;
}
.listen-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--mig-navy, #233f73);
  background: #ffffff;
  color: var(--mig-navy, #233f73);
  font-weight: 800;
  white-space: nowrap;
  gap: 8px;
}
.listen-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}
.listen-button:hover .listen-icon,
.listen-button:focus .listen-icon {
  filter: brightness(0) invert(1);
}
.listen-button:hover,
.listen-button:focus {
  background: var(--mig-navy, #233f73);
  color: #fff;
}
.show-more-wrap {
  display: flex;
  justify-content: center;
  padding: 18px 0 4px;
}
.show-more-button {
  min-width: 180px;
  min-height: 48px;
  border-radius: 16px;
  background: var(--mig-red, #e3222b);
  border-color: var(--mig-red, #e3222b);
}
body.simple-mode {
  font-size: 1.08rem;
}
body.simple-mode .app-shell {
  width: min(1040px, calc(100% - 24px));
}
body.simple-mode .intro,
body.simple-mode .sort-box,
body.simple-mode .active-filters {
  display: none;
}
body.simple-mode .filters-panel {
  grid-template-columns: 1fr;
}
body.simple-mode .filter-block {
  display: none;
}
body.simple-mode .keyword-ideas,
body.simple-mode .search-box,
body.simple-mode .panel-header {
  display: block;
}
body.simple-mode .app-result {
  padding: 16px;
  border-width: 2px;
}
body.simple-mode .app-title {
  min-height: 52px;
  font-size: 1.22rem;
  padding: 12px 14px;
}
body.simple-mode .more-button,
body.simple-mode .listen-button,
body.simple-mode .permalink-button {
  min-height: 50px;
  font-size: 1.05rem;
}
body.simple-mode .listen-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}
body.simple-mode .result-subline {
  font-size: 1.05rem;
}
@media (max-width: 960px) {
  .simple-action-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}
@media (max-width: 620px) {
  .simple-search-header { flex-direction: column; align-items: stretch; }
  .simple-action-grid { grid-template-columns: 1fr; }
  .simple-action { min-height: 72px; }
  .result-summary-row { gap: 10px; }
  .listen-button { width: 100%; }
}

/* v31: Icons for keyword idea categories and proposed words */
.keyword-category-title {
  gap: 10px;
}
.keyword-category-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.keyword-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(21, 34, 56, .08);
  font-size: 1.35rem;
}
.keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
}
.keyword-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 8px;
  background: #f3f7fc;
  font-size: 1.05rem;
  line-height: 1;
}
.keyword-chip:hover .keyword-chip-icon,
.keyword-chip:focus .keyword-chip-icon {
  background: rgba(255, 255, 255, .22);
}
.keyword-chip-text {
  font-weight: 400;
}
body.simple-mode .keyword-category-icon {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  font-size: 1.65rem;
}
body.simple-mode .keyword-chip-icon {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 1.25rem;
}

/* v32: Easy search now uses keyword idea category cards and chips */
.easy-keyword-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 10px;
}
.simple-search-panel .keyword-category-title {
  min-height: 62px;
}
.simple-search-panel .keyword-chip-list {
  padding: 12px;
}
body.simple-mode .easy-keyword-categories {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}
body.simple-mode .simple-search-panel .keyword-chip {
  min-height: 44px;
  font-size: 1.05rem;
  padding: 8px 12px;
}
@media (max-width: 900px) {
  .easy-keyword-categories { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}
@media (max-width: 620px) {
  .easy-keyword-categories,
  body.simple-mode .easy-keyword-categories { grid-template-columns: 1fr; }
}

/* v33: larger Easy search icons and listen controls for filter questions */
.simple-search-panel .keyword-category-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 16px;
  font-size: 2.35rem;
}
.simple-search-panel .keyword-category-title {
  min-height: 82px;
  font-size: 1.08rem;
}
.simple-search-panel .keyword-category-label {
  gap: 14px;
}
.simple-search-panel .keyword-chip-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  font-size: 1.45rem;
}
body.simple-mode .simple-search-panel .keyword-category-icon {
  width: 66px;
  height: 66px;
  flex-basis: 66px;
  font-size: 2.7rem;
}
body.simple-mode .simple-search-panel .keyword-chip-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  font-size: 1.6rem;
}
.filter-question-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 10px;
}
.filter-question-row .filter-title {
  margin-bottom: 0;
  flex: 1 1 auto;
}
.filter-listen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--mig-navy, #233f73);
  background: #ffffff;
  color: var(--mig-navy, #233f73);
  cursor: pointer;
}
.filter-listen-button .listen-icon {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}
.filter-listen-button:hover,
.filter-listen-button:focus {
  background: var(--mig-navy, #233f73);
  color: #ffffff;
}
.filter-listen-button:hover .listen-icon,
.filter-listen-button:focus .listen-icon {
  filter: brightness(0) invert(1);
}
body.simple-mode .filter-listen-button {
  width: 56px;
  min-width: 56px;
  min-height: 56px;
}
body.simple-mode .filter-listen-button .listen-icon {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}
@media (max-width: 620px) {
  .filter-question-row {
    align-items: stretch;
  }
  .filter-listen-button {
    width: 52px;
    min-width: 52px;
  }
}

/* v35: green action buttons and visible icons for More/View; green expansion symbols */
:root {
  --mig-green: #237a45;
  --mig-green-dark: #176132;
}
.filter-title::after,
.keyword-ideas-toggle::after,
.keyword-category-title::after {
  color: var(--mig-green) !important;
}
.filter-title:hover::after,
.filter-title:focus::after,
.keyword-ideas-toggle:hover::after,
.keyword-ideas-toggle:focus::after,
.keyword-category-title:hover::after,
.keyword-category-title:focus::after {
  color: var(--mig-green-dark) !important;
}
.more-button,
.permalink-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--mig-green) !important;
  border-color: var(--mig-green) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(35, 122, 69, .24) !important;
}
.more-button:hover,
.more-button:focus,
.permalink-button:hover,
.permalink-button:focus {
  background: var(--mig-green-dark) !important;
  border-color: var(--mig-green-dark) !important;
  color: #ffffff !important;
}
.more-button[aria-expanded="true"] {
  background: var(--mig-green-dark) !important;
  border-color: var(--mig-green-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(23, 97, 50, .28) !important;
}
.action-icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  display: inline-block;
  color: currentColor;
}
@media (max-width: 720px) {
  .permalink-button { width: 100%; }
}


/* v36: enlarged white icons for More and View actions */
.more-button .action-icon,
.permalink-button .action-icon {
  width: 1.75em !important;
  height: 1.75em !important;
  min-width: 1.75em !important;
  filter: none !important;
}
.more-button,
.permalink-button {
  gap: 10px !important;
}

/* v37: light-blue View button; equal action-button widths */
:root {
  --mig-light-blue: #2f80c5;
  --mig-light-blue-dark: #1f6fab;
  --result-action-width: 138px;
}
.more-button,
.permalink-button {
  width: var(--result-action-width) !important;
  min-width: var(--result-action-width) !important;
  max-width: var(--result-action-width) !important;
}
.permalink-button {
  background: var(--mig-light-blue) !important;
  border-color: var(--mig-light-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(47, 128, 197, .24) !important;
}
.permalink-button:hover,
.permalink-button:focus {
  background: var(--mig-light-blue-dark) !important;
  border-color: var(--mig-light-blue-dark) !important;
  color: #ffffff !important;
}
.permalink-button .action-icon {
  filter: none !important;
}
@media (max-width: 720px) {
  .more-button,
  .permalink-button {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
}


/* v38: larger Search by keyword label */
.search-box > span {
  font-size: 1.2rem;
  line-height: 1.3;
}
body.simple-mode .search-box > span {
  font-size: 1.35rem;
}


.btn.easy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.easy-read-logo {
  width: 1.7rem;
  height: 1.7rem;
  object-fit: contain;
  border-radius: 0.2rem;
  flex: 0 0 auto;
}

.simple-mode-label {
  display: inline-block;
}


/* v40 adjustments */
.search-box > span,
body.simple-mode .search-box > span {
  color: #000000;
}

.panel-header h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
}


/* v41: Easy-to-read toggle colours and larger logos */
.btn.easy {
  background: #11168f;
  border-color: #11168f;
  color: #ffffff;
  padding: 0.7rem 1rem;
  min-height: 3.4rem;
}

.btn.easy:hover,
.btn.easy:focus {
  background: #0d1276;
  border-color: #0d1276;
  color: #ffffff;
}

.btn.easy[aria-pressed="true"] {
  background: #438272;
  border-color: #438272;
  color: #ffffff;
}

.btn.easy[aria-pressed="true"]:hover,
.btn.easy[aria-pressed="true"]:focus {
  background: #356b5e;
  border-color: #356b5e;
  color: #ffffff;
}

.easy-read-logo {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.28rem;
}

.simple-mode-label {
  font-size: 1rem;
  line-height: 1.15;
}


/* v42 multi-catalogue landing page */
.landing-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}
.landing-hero {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}
.landing-hero h1 {
  margin: 0 0 10px;
  color: var(--mig-navy, #233f73);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.1;
}
.landing-language { max-width: 320px; margin-top: 18px; }
.catalogue-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 20px;
}
.catalogue-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.catalogue-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #eef6f2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
}
.catalogue-card h2 {
  margin: 0;
  color: var(--mig-navy, #233f73);
  font-size: 1.8rem;
}
.catalogue-card p {
  margin: 0;
  line-height: 1.5;
}
.catalogue-card-button {
  margin-top: auto;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: #27865f;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
}
.catalogue-card-button:hover,
.catalogue-card-button:focus {
  background: #1e6e4e;
  color: #ffffff;
}
@media (max-width: 850px) {
  .catalogue-cards { grid-template-columns: 1fr; }
}


/* v44: Back button to landing page */
.back-index-button {
  white-space: nowrap;
  text-decoration: none;
}
.back-index-button::before {
  content: "←";
  display: inline-block;
  margin-right: 0.45rem;
  font-size: 1.15em;
  line-height: 1;
}


/* v56: fully remove disabled catalogue-specific filters, e.g. mobile platform in websites */
.filter-block[hidden],
.filter-block[aria-hidden="true"] {
  display: none !important;
}

/* v71: localized ID-Health green footer */
.idh-site-footer {
  margin-top: 2.25rem;
  background: #44847b;
  color: #fff;
  width: 100%;
}
.idh-footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 2rem 0 1.75rem;
  text-align: center;
}
.idh-footer-title {
  max-width: 780px;
  margin: 0 auto 1.05rem;
  font-size: clamp(1.12rem, 1.65vw, 1.32rem);
  font-weight: 700;
  line-height: 1.42;
  color: #fff;
}
.idh-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: 1.2rem;
  color: #fff;
  font-size: 1rem;
}
.idh-footer-links a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: .18rem;
}
.idh-footer-links a:hover,
.idh-footer-links a:focus-visible {
  color: #f5ffed;
  text-decoration-thickness: 2px;
}
.idh-footer-eu-logo {
  display: block;
  width: min(620px, 94vw);
  max-height: 132px;
  object-fit: contain;
  height: auto;
  margin: 0 auto 1rem;
  padding: .25rem;
  background: #fff;
  border-radius: .25rem;
}
.idh-footer-funding {
  max-width: 940px;
  margin: 0 auto;
  color: #fff;
  font-size: .92rem;
  line-height: 1.55;
}
@media (max-width: 560px) {
  .idh-footer-inner { padding: 1.55rem 0 1.45rem; }
  .idh-footer-title { font-size: 1.04rem; }
  .idh-footer-funding { font-size: .88rem; }
}

/* v73: larger upper-right catalogue icons on landing cards */
.catalogue-card {
  position: relative;
  padding: 30px 126px 26px 26px;
  min-height: 250px;
}
.catalogue-card-icon {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 94px;
  height: 94px;
  border-radius: 25px;
  font-size: 3.55rem;
  line-height: 1;
}
.catalogue-card p,
.catalogue-card-button {
  grid-column: 1 / -1;
}
@media (max-width: 850px) {
  .catalogue-card {
    padding: 26px 118px 26px 24px;
    min-height: 210px;
  }
  .catalogue-card-icon {
    width: 86px;
    height: 86px;
    top: 20px;
    right: 20px;
    font-size: 3.25rem;
  }
}
@media (max-width: 460px) {
  .catalogue-card {
    padding-right: 24px;
    padding-top: 124px;
  }
}


/* v74: catalogue identity icon beside the page heading */
#pageTitle {
  display: flex;
  align-items: center;
  gap: 0.72rem;
}

.catalogue-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: clamp(2.6rem, 4vw, 3.35rem);
  height: clamp(2.6rem, 4vw, 3.35rem);
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1;
  border-radius: 0.82rem;
  background: #f1f6ff;
  border: 1px solid #d5e1f4;
}

@media (max-width: 560px) {
  #pageTitle { align-items: flex-start; gap: 0.55rem; }
}


/* v75: stronger catalogue identity and Results section heading */
.catalogue-title-icon {
  width: clamp(3.4rem, 5.5vw, 4.4rem);
  height: clamp(3.4rem, 5.5vw, 4.4rem);
  font-size: clamp(2.45rem, 4.1vw, 3.2rem);
  border-radius: 1rem;
}

.results-heading {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
  font-weight: 700;
  color: var(--text);
}

/* v76: enlarge catalogue heading identity icons and reduce EU footer funding images */
.catalogue-title-icon {
  width: clamp(4.25rem, 7vw, 5.7rem);
  height: clamp(4.25rem, 7vw, 5.7rem);
  font-size: clamp(3.05rem, 5.1vw, 4.15rem);
  border-radius: 1.18rem;
}

.idh-footer-eu-logo {
  width: min(430px, 78vw);
  max-height: 94px;
  margin-bottom: .9rem;
}

@media (max-width: 560px) {
  .catalogue-title-icon {
    width: 3.75rem;
    height: 3.75rem;
    font-size: 2.75rem;
  }
  .idh-footer-eu-logo {
    width: min(350px, 88vw);
    max-height: 80px;
  }
}


/* v77: shared ID-Health header */
.idh-site-header {
  background: #ffffff;
  border-bottom: 1px solid #dde5e9;
  box-shadow: 0 1px 4px rgba(30, 43, 65, .06);
}
.idh-header-inner {
  width: min(1220px, calc(100% - 2.25rem));
  margin: 0 auto;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .9rem 0;
}
.idh-header-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.idh-header-logo {
  display: block;
  width: min(340px, 44vw);
  max-height: 86px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}
.idh-header-nav {
  display: flex;
  align-items: center;
}
.idh-header-home {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: .6rem 1.15rem;
  border-radius: .75rem;
  color: #252c57;
  font-size: 1.08rem;
  font-weight: 700;
  text-decoration: none;
}
.idh-header-home:hover,
.idh-header-home:focus-visible {
  color: #ffffff;
  background: #4b827b;
  outline: none;
}
@media (max-width: 640px) {
  .idh-header-inner {
    width: min(100% - 1.25rem, 1220px);
    min-height: 72px;
    gap: .6rem;
    padding: .55rem 0;
  }
  .idh-header-logo {
    width: min(230px, 62vw);
    max-height: 62px;
  }
  .idh-header-home {
    padding: .45rem .7rem;
    font-size: .96rem;
  }
}


/* v78: header language switcher with local flag images and footer brand logo */
.internal-language-picker {
  display: none !important;
}
.idh-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}
.idh-header-languages {
  display: flex;
  align-items: center;
  gap: .34rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.idh-language-option {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  border: 1px solid #d5e1e4;
  background: #ffffff;
  color: #252c57;
  padding: .37rem .46rem;
  min-height: 42px;
  border-radius: .55rem;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}
.idh-language-option:hover,
.idh-language-option:focus-visible {
  border-color: #4b827b;
  background: #eaf4f2;
  outline: none;
}
.idh-language-option.is-current {
  border-color: #4b827b;
  background: #4b827b;
  color: #ffffff;
}
.idh-language-flag {
  width: 25px;
  height: 17px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, .12);
  flex: 0 0 auto;
}
.idh-footer-brand-logo {
  display: block;
  width: min(320px, 72vw);
  max-height: 84px;
  object-fit: contain;
  height: auto;
  margin: 0 auto 1.2rem;
  padding: .6rem 1rem;
  border-radius: .5rem;
  background: #ffffff;
}
@media (max-width: 900px) {
  .idh-header-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .idh-header-brand {
    justify-content: center;
  }
  .idh-header-actions {
    flex-direction: column;
    gap: .65rem;
  }
  .idh-header-languages {
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .idh-language-option { min-height: 40px; padding: .32rem .4rem; }
  .idh-language-flag { width: 23px; height: 16px; }
}


/* v79: header navigation order — logo, Home, Easy-to-Read toggle, language flags */
.idh-header-inner {
  justify-content: flex-start;
}
.idh-header-nav {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  flex: 0 0 auto;
}
.idh-header-languages {
  margin-left: auto;
}
.idh-header-nav .btn.easy {
  margin: 0;
  white-space: nowrap;
}
/* The former in-page tool area no longer contains the Easy-to-Read control. */
.hero-tools {
  align-items: center;
}
@media (max-width: 1100px) {
  .idh-header-inner {
    flex-wrap: wrap;
  }
  .idh-header-languages {
    flex-basis: 100%;
    justify-content: flex-end;
  }
}
@media (max-width: 900px) {
  .idh-header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }
  .idh-header-brand {
    justify-content: center;
  }
  .idh-header-nav {
    justify-content: center;
    flex-wrap: wrap;
  }
  .idh-header-languages {
    margin-left: 0;
    justify-content: center;
  }
}


/* v80: compact two-part footer layout and catalogue-only back-label update */
.idh-footer-inner {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.35fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 1.65rem 0;
  text-align: left;
}
.idh-footer-brand-group,
.idh-footer-funding-group {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.35rem);
  min-width: 0;
}
.idh-footer-brand-logo {
  flex: 0 0 auto;
  width: clamp(112px, 12vw, 150px);
  max-width: none;
  margin: 0;
}
.idh-footer-title {
  max-width: 365px;
  margin: 0;
  font-size: clamp(.95rem, 1.15vw, 1.06rem);
  line-height: 1.42;
  font-weight: 600;
}
.idh-footer-links {
  display: none !important;
}
.idh-footer-eu-logo {
  flex: 0 0 auto;
  width: clamp(176px, 20vw, 235px);
  max-height: 74px;
  object-fit: contain;
  margin: 0;
  padding: .2rem;
}
.idh-footer-funding {
  margin: 0;
  max-width: 430px;
  font-size: clamp(.79rem, .93vw, .88rem);
  line-height: 1.45;
}
@media (max-width: 880px) {
  .idh-footer-inner {
    grid-template-columns: 1fr;
    gap: 1.65rem;
  }
}
@media (max-width: 560px) {
  .idh-footer-brand-group,
  .idh-footer-funding-group {
    flex-direction: column;
    align-items: flex-start;
  }
  .idh-footer-eu-logo { width: min(250px, 90vw); }
}


/* v83: place catalogue-change action below catalogue label and before title */
.catalogue-back-row {
  display: block;
  margin: 0.25rem 0 1rem;
}
.catalogue-back-row .back-index-button {
  display: inline-flex;
  align-items: center;
}
.finder-hero #pageTitle {
  margin-top: 0;
}


/* v85: larger icons and expand/collapse signs in Easy Search */
.simple-search-panel .keyword-category-icon {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 18px;
  font-size: 3rem;
}
.simple-search-panel .keyword-chip-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 12px;
  font-size: 2rem;
}
.simple-search-panel .keyword-category-title {
  min-height: 98px;
}
.simple-search-panel .keyword-category-title::after {
  color: var(--mig-green, #237a45) !important;
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1;
  min-width: 2.25rem;
  text-align: center;
}
.simple-search-panel .keyword-category-title:hover::after,
.simple-search-panel .keyword-category-title:focus::after {
  color: var(--mig-green-dark, #176132) !important;
}
body.simple-mode .simple-search-panel .keyword-category-icon {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  font-size: 3.35rem;
}
body.simple-mode .simple-search-panel .keyword-chip-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  font-size: 2.2rem;
}
@media (max-width: 620px) {
  .simple-search-panel .keyword-category-icon {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    font-size: 2.55rem;
  }
  .simple-search-panel .keyword-chip-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 1.75rem;
  }
}


/* v86: restore Listen buttons in Easy Search categories and proposed words */
.easy-category-heading {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 0 8px 0 0;
  background: #f7f9fc;
}
.easy-category-heading .keyword-category-title {
  flex: 1 1 auto;
}
.easy-category-heading .keyword-category-title::after {
  margin-left: auto;
}
.easy-search-listen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  align-self: center;
  border: 1px solid var(--mig-navy, #233f73);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.easy-search-listen-button .listen-icon {
  width: 26px;
  height: 26px;
}
.easy-search-listen-button:hover,
.easy-search-listen-button:focus {
  background: var(--mig-navy, #233f73);
}
.easy-search-listen-button:hover .listen-icon,
.easy-search-listen-button:focus .listen-icon {
  filter: brightness(0) invert(1);
}
.easy-keyword-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.easy-keyword-choice .easy-search-listen-button {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 999px;
}
.easy-keyword-choice .easy-search-listen-button .listen-icon {
  width: 22px;
  height: 22px;
}
body.simple-mode .easy-search-listen-button {
  width: 56px;
  min-width: 56px;
  min-height: 56px;
}
body.simple-mode .easy-search-listen-button .listen-icon {
  width: 31px;
  height: 31px;
}
body.simple-mode .easy-keyword-choice .easy-search-listen-button {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
}
body.simple-mode .easy-keyword-choice .easy-search-listen-button .listen-icon {
  width: 28px;
  height: 28px;
}
@media (max-width: 620px) {
  .easy-category-heading { gap: 5px; }
  .easy-keyword-choice { max-width: 100%; }
}

/* v87: Easy-to-Read landing page */
.landing-easy-toggle {
  position: absolute;
  left: -9999px;
  top: -9999px;
}
.landing-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
}
.landing-card-actions .catalogue-card-button {
  margin-top: 0;
  flex: 1 1 180px;
}
.landing-card-listen,
.landing-listen {
  border-radius: 12px;
  min-height: 48px;
  padding: .65rem .9rem;
}
.landing-listen {
  margin-top: 1.2rem;
}
body.landing-easy-read .landing-shell {
  max-width: 930px;
  padding-top: 34px;
}
body.landing-easy-read .landing-hero {
  padding: clamp(1.6rem, 4vw, 2.6rem);
}
body.landing-easy-read .landing-hero .eyebrow {
  font-size: 1.1rem;
}
body.landing-easy-read .landing-hero h1 {
  font-size: clamp(2.45rem, 5vw, 3.5rem);
  line-height: 1.12;
  margin-top: .25rem;
}
body.landing-easy-read .landing-hero .intro {
  font-size: clamp(1.3rem, 2.2vw, 1.55rem);
  line-height: 1.45;
  max-width: 38rem;
}
body.landing-easy-read .catalogue-cards {
  grid-template-columns: 1fr;
  gap: 1.4rem;
}
body.landing-easy-read .catalogue-card {
  min-height: 245px;
  padding: clamp(1.45rem, 4vw, 2.2rem);
  padding-right: clamp(7.5rem, 18vw, 10rem);
  gap: .85rem;
}
body.landing-easy-read .catalogue-card-icon {
  width: clamp(5.4rem, 10vw, 6.8rem);
  height: clamp(5.4rem, 10vw, 6.8rem);
  font-size: clamp(3.25rem, 6vw, 4.25rem);
  top: 1.35rem;
  right: 1.35rem;
}
body.landing-easy-read .catalogue-card h2 {
  font-size: clamp(1.9rem, 3vw, 2.35rem);
  line-height: 1.2;
}
body.landing-easy-read .catalogue-card p {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  line-height: 1.48;
  max-width: 34rem;
}
body.landing-easy-read .landing-card-actions {
  margin-top: .65rem;
  gap: 1rem;
}
body.landing-easy-read .landing-card-actions .catalogue-card-button,
body.landing-easy-read .landing-card-listen,
body.landing-easy-read .landing-listen {
  min-height: 60px;
  padding: .85rem 1.25rem;
  font-size: 1.15rem;
  border-radius: 15px;
}
body.landing-easy-read .landing-card-listen .listen-icon,
body.landing-easy-read .landing-listen .listen-icon {
  width: 1.65rem;
  height: 1.65rem;
}
@media (max-width: 560px) {
  body.landing-easy-read .catalogue-card {
    padding-right: 1.4rem;
    padding-top: 7.3rem;
  }
  body.landing-easy-read .catalogue-card-icon {
    left: 1.3rem;
    right: auto;
  }
  body.landing-easy-read .landing-card-actions {
    flex-direction: column;
    align-items: stretch;
  }
  body.landing-easy-read .landing-card-actions .catalogue-card-button {
    flex-basis: auto;
  }
}

/* v88: keep Easy-to-Read landing toggle visible after it is inserted in the shared header */
.idh-header-nav .landing-easy-toggle {
  position: static;
  left: auto;
  top: auto;
  display: inline-flex;
  visibility: visible;
}


/* v89: landing page Listen controls are available only in Easy-to-Read mode */
.landing-listen[hidden],
.landing-card-listen[hidden] {
  display: none !important;
}


/* v91: Keep Listen controls and Easy Search icons only in Easy-to-Read catalogue mode */
body:not(.simple-mode) .simple-search-panel .easy-search-listen-button,
body:not(.simple-mode) .filter-listen-button,
body:not(.simple-mode) .results-panel .listen-button {
  display: none !important;
}

body:not(.simple-mode) .simple-search-panel .keyword-category-icon,
body:not(.simple-mode) .simple-search-panel .keyword-chip-icon {
  display: none !important;
}

body:not(.simple-mode) .simple-search-panel .keyword-category-label,
body:not(.simple-mode) .simple-search-panel .keyword-chip {
  gap: 0;
}


/* v92: listening support for Easy-to-Read section headings */
.heading-with-listen {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.catalogue-heading-with-listen {
  align-items: center;
}
.results-heading-row {
  margin-bottom: 14px;
}
.results-heading-row .results-heading {
  margin: 0;
}
.search-label-row {
  display: flex !important;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 6px !important;
}
.search-heading-label {
  display: inline-flex !important;
  align-items: center;
  gap: 0.55rem;
  margin: 0 !important;
  color: #000000;
}
.search-keyword-icon {
  display: inline-flex;
  font-size: 1.7rem;
  line-height: 1;
}
.heading-listen-button {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  border: 2px solid #17724a;
  background: #ffffff;
  color: #17724a;
  border-radius: 999px;
  padding: .38rem .72rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
}
.heading-listen-button .listen-icon {
  width: 1.35rem;
  height: 1.35rem;
}
.heading-listen-button:hover,
.heading-listen-button:focus-visible {
  background: #e8f7ef;
}
body:not(.simple-mode) .heading-listen-button,
body:not(.simple-mode) .search-keyword-icon {
  display: none !important;
}
body.simple-mode .heading-listen-button {
  font-size: 1.08rem;
  padding: .48rem .9rem;
}
body.simple-mode .heading-listen-button .listen-icon {
  width: 1.55rem;
  height: 1.55rem;
}
body.simple-mode .search-keyword-icon {
  font-size: 2.05rem;
}
@media (max-width: 560px) {
  .heading-with-listen { gap: .55rem; }
}


/* v93: resource link is included only in printed/PDF record output. */
.print-resource-link {
  display: none;
}

@media print {
  .print-resource-link {
    display: block !important;
    margin-top: 28px;
    break-inside: avoid;
  }

  .print-resource-link .record-text-link {
    overflow-wrap: anywhere;
    word-break: break-word;
    color: #000;
    text-decoration: underline;
  }
}
