/* ============================================================
   EPISERVE Theme — Bootstrap 5 overrides
   ============================================================ */

:root {
  --epi-navy:      #1e3a5f;
  --epi-navy-dark: #16304f;
  --epi-cyan:      #0891b2;
  --epi-cyan-dark: #0772a0;
  --epi-surface:   #f0ebe0;
  --epi-border:    #e2e8f0;
  --epi-text:      #0f172a;
  --epi-muted:     #64748b;
  --epi-white:     #ffffff;

  --bs-primary:           #0891b2;
  --bs-primary-rgb:       8, 145, 178;
  --bs-link-color:        #0891b2;
  --bs-link-hover-color:  #0772a0;
  --bs-border-radius:     0.5rem;
  --bs-body-bg:           #f0ebe0;
  --bs-font-sans-serif:   system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ── Page ──────────────────────────────────────────────────── */
html {
  background: url('https://episerve.zib.de/img/hero.png') center top / cover fixed no-repeat;
  background-color: #2a2a2a;
}
html, body { color: var(--epi-text); }
body {
  background: rgba(240, 235, 224, 0.84) !important;
  min-height: 100vh;
}
.main { padding-top: 1.5rem; padding-bottom: 2rem; background: transparent !important; }

/* ── Account masthead (top bar) ────────────────────────────── */
.account-masthead {
  background: linear-gradient(to bottom, #b8a98a, #f0ebe0);
  border-bottom: none;
  padding: 0.47rem 0;
  font-size: 1.04rem;
}
.account-masthead a,
.account-masthead .btn-link {
  color: #000 !important;
  text-decoration: none;
  font-size: 1.04rem;
  padding: 0;
  border: none;
  background: none;
}
.account-masthead a:hover,
.account-masthead .btn-link:hover { color: var(--epi-cyan) !important; background: none !important; }
.account-masthead ul { margin: 0; display: flex; gap: 1rem; align-items: center; justify-content: flex-end; list-style: none; padding: 0; }
.account-masthead li { border: none !important; padding-left: 0 !important; }
.account-masthead li::before { content: none !important; }
.account-masthead .account.not-authed a { font-size: 1.2rem; }

/* ── Main navbar ───────────────────────────────────────────── */
.masthead {
  background: var(--epi-navy);
  border-bottom: 3px solid var(--epi-cyan);
  padding: 0;
}
.masthead .navbar { padding: 0.5rem 0; }
.masthead h1 { margin: 0; line-height: 1; }
.masthead h2 { margin: 0; }
.masthead h1 a,
.masthead .logo {
  color: #fff;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.masthead h1 a:hover,
.masthead .logo:hover { color: rgba(255,255,255,0.85); text-decoration: none; }
.masthead h2,
.masthead .site-tagline { color: rgba(255,255,255,0.55); font-size: 0.7rem; font-weight: 400; }
.masthead .nav-link { color: rgba(255,255,255,0.8) !important; font-size: 0.875rem; padding: 0.5rem 0.75rem; }
.masthead .nav-link:hover { color: #fff !important; }
.masthead .nav-link.active { color: #fff !important; border-bottom: 2px solid var(--epi-cyan); }
.masthead .site-search { gap: 0.375rem; }
.masthead .site-search .form-control {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 6px;
  font-size: 0.875rem;
  width: 200px;
}
.masthead .site-search .form-control::placeholder { color: rgba(255,255,255,0.4); }
.masthead .site-search .form-control:focus {
  background: rgba(255,255,255,0.18);
  border-color: var(--epi-cyan);
  box-shadow: 0 0 0 2px rgba(8,145,178,0.3);
  color: #fff;
}
.masthead .site-search button {
  background: var(--epi-cyan);
  border: none;
  color: #fff;
  border-radius: 6px;
  padding: 0.375rem 0.75rem;
}
.masthead .site-search button:hover { background: var(--epi-cyan-dark); }
.masthead .navbar-toggler { border-color: rgba(255,255,255,0.3); }

/* ── Breadcrumb ────────────────────────────────────────────── */
.toolbar { border: none; background: transparent; padding: 0.5rem 0 0.75rem; margin-bottom: 0; }
.breadcrumb { background: transparent; padding: 0; margin: 0; font-size: 0.825rem; }
.breadcrumb-item a { color: var(--epi-cyan); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--epi-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--epi-muted); }

/* ── Dataset cards (package_item) ──────────────────────────── */
.dataset-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.875rem; }
.dataset-item { padding: 0 !important; margin: 0; border: none; background: none; }
.dataset-card {
  background: var(--epi-white);
  border: 1px solid var(--epi-border);
  border-radius: 0.75rem;
  padding: 1.1rem 1.4rem;
  transition: box-shadow 0.15s, border-color 0.15s;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.dataset-card:hover {
  box-shadow: 0 2px 12px rgba(30,58,95,0.08);
  border-color: var(--epi-cyan);
}
.epi-card-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  background: rgba(8,145,178,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--epi-cyan);
  margin-top: 0.1rem;
}
.epi-card-body { flex: 1; min-width: 0; }
.dataset-card .dataset-heading { font-size: 1.1rem; font-weight: 600; margin: 0 0 0.35rem; line-height: 1.4; }
.dataset-card .dataset-heading a { color: var(--epi-navy); text-decoration: none; }
.dataset-card .dataset-heading a:hover { color: var(--epi-cyan); text-decoration: underline; }
.dataset-card .dataset-notes { color: var(--epi-muted); font-size: 0.85rem; line-height: 1.5; margin-bottom: 0.75rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dataset-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; }
.dataset-card-meta .badge { font-size: 0.7rem; font-weight: 600; border-radius: 4px; padding: 0.2em 0.55em; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-format                     { background: #e0f2fe; color: #075985; }
.badge-format[data-format="csv"]     { background: #d1fae5; color: #065f46; }
.badge-format[data-format="tsv"]     { background: #d1fae5; color: #065f46; }
.badge-format[data-format="parquet"] { background: #ede9fe; color: #5b21b6; }
.badge-format[data-format="json"]    { background: #fef3c7; color: #92400e; }
.badge-format[data-format="rdf"]     { background: #fce7f3; color: #9d174d; }
.badge-org  { background: var(--epi-navy); color: #fff; }
.badge-date { background: transparent; color: var(--epi-muted); border: 1px solid var(--epi-border); }
.dataset-card-spacer { flex: 1 1 auto; }

/* ── Search form ───────────────────────────────────────────── */
.search-form {
  background: var(--epi-white);
  border: 1px solid var(--epi-border);
  border-radius: 0.75rem;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.search-form .form-control { border-radius: 6px !important; border-color: var(--epi-border); font-size: 0.9rem; }
.search-form .form-control:focus { border-color: var(--epi-cyan); box-shadow: 0 0 0 2px rgba(8,145,178,0.15); }
.search-form .btn-default { background: var(--epi-navy); color: #fff; border: none; border-radius: 6px !important; font-size: 0.9rem; }
.search-form .btn-default:hover { background: var(--epi-cyan); }
.search-form h1 { font-size: 0.875rem; color: var(--epi-muted); font-weight: 400; margin: 0.6rem 0 0; }
.control-order-by { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.control-order-by label { margin: 0; font-size: 0.825rem; color: var(--epi-muted); white-space: nowrap; }
.control-order-by .form-select { border-color: var(--epi-border); border-radius: 6px; font-size: 0.825rem; max-width: 190px; padding: 0.25rem 0.6rem; }
.filter-list { margin: 0.5rem 0 0; }
.filter-list .pill { background: #e0f2fe; color: #0369a1; border-radius: 20px; padding: 0.2em 0.7em; font-size: 0.775rem; display: inline-flex; align-items: center; gap: 0.3rem; }
.filter-list .pill .remove { color: inherit; opacity: 0.7; }
.filter-list .pill .remove:hover { opacity: 1; }

/* ── Sidebar facets ────────────────────────────────────────── */
/* Remove CKAN's vertical column divider line — card borders handle separation */
.wrapper::before { display: none !important; }

/* Strip any border/background from the outer .filters wrapper */
#facet-sidebar,
.filters {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
/* Inner div is the single visible white container */
.filters > div,
#facet-sidebar > div {
  background: #fff !important;
  border: 1px solid var(--epi-border) !important;
  border-radius: 0.5rem !important;
  overflow: hidden !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: block;
  margin-top: 1.15rem !important;
  margin-right: 0.75rem !important;
  margin-left: 0.75rem !important;
}
.module.module-narrow.module-shallow {
  background: var(--epi-white);
  border: 1px solid var(--epi-border);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 0;
}
.module-narrow .module-heading {
  background: var(--epi-navy);
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Filter toggle button ───────────────────────────────────── */
.epi-filter-toggle {
  background: var(--epi-navy);
  color: #fff;
  border: none;
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 0.4rem;
}
.epi-filter-toggle:hover,
.epi-filter-toggle:focus { background: var(--epi-navy-dark); color: #fff; }

/* ── Facet groups — clean card style ───────────────────────── */
/* Use full selector chain to beat .module.module-narrow.module-shallow (0,3,0) */
section.module.module-narrow.module-shallow.epi-facet-group {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 1rem 1rem 0;
  overflow: visible !important;
}
section.epi-facet-group + section.epi-facet-group {
  border-top: 1px solid var(--epi-border) !important;
}
.epi-facet-group .module-content { border: none !important; border-radius: 0 !important; padding: 0 0 0.75rem !important; background: none !important; box-shadow: none !important; }

/* No navy heading — plain bold title */
.epi-facet-group .module-heading { display: none; }
.epi-facet-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--epi-navy);
  margin: 0 0 0.6rem;
  padding: 0;
}

/* Checkbox-style facet items */
.nav-facet .nav-item a {
  padding: 0.25rem 0;
  font-size: 0.825rem;
  color: var(--epi-cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.nav-facet .nav-item a:hover { color: var(--epi-navy); background: none; }
.nav-facet .nav-item.active a { color: var(--epi-navy); font-weight: 600; }
.epi-facet-cb {
  pointer-events: none;
  flex-shrink: 0;
  width: 0.9rem;
  height: 0.9rem;
  accent-color: var(--epi-cyan);
}
.epi-facet-group .module-footer {
  border-top: 1px solid var(--epi-border);
  margin: 0 -1rem;
  padding: 0.4rem 1rem;
}
.nav-facet { padding: 0.25rem 0; }
.nav-facet .nav-item { border: none !important; }
.nav-facet .nav-item a { padding: 0.3rem 1rem; font-size: 0.825rem; color: var(--epi-text); display: flex; justify-content: space-between; align-items: center; text-decoration: none; }
.nav-facet .nav-item a:hover { background: var(--epi-surface); color: var(--epi-navy); }
.nav-facet .nav-item.active a { color: var(--epi-cyan); font-weight: 600; }
.nav-facet .item-count.badge { background: var(--epi-navy); color: #fff; border-radius: 0.25rem; font-size: 0.7rem; font-weight: 600; padding: 0.2em 0.45em; min-width: 1.5em; text-align: center; }
.nav-facet .nav-item.active .item-count.badge { background: var(--epi-cyan); }
.nav-facet .hidden.separator { display: none; }
.facet-close { color: var(--epi-muted); margin-left: 0.25rem; }
.module-footer { padding: 0.4rem 1rem; border-top: 1px solid var(--epi-border); }
.module-footer .read-more { font-size: 0.775rem; color: var(--epi-cyan); text-decoration: none; }
.module-footer .read-more:hover { text-decoration: underline; }

/* ── Dataset detail — main content ─────────────────────────── */
.module-content { background: var(--epi-white); border: 1px solid var(--epi-border); border-radius: 0.75rem; padding: 1.5rem; }
.primary .module-content { margin-top: 1rem; }
.module-content h1 { font-size: 1.4rem; font-weight: 700; color: var(--epi-navy); margin-bottom: 1rem; line-height: 1.35; }
.notes { line-height: 1.75; color: var(--epi-text); font-size: 0.9375rem; }
.dataset-private.badge { font-size: 0.75rem; vertical-align: middle; margin-right: 0.5rem; }

/* Content nav tabs */
.module-content .page-header { border-bottom: 1px solid var(--epi-border); margin-bottom: 1.25rem; }
.module-content .nav-tabs { border-bottom: none; gap: 0.25rem; }
.module-content .nav-tabs .nav-link { font-size: 0.875rem; color: var(--epi-muted); border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 0.5rem 0.75rem; background: none; }
.module-content .nav-tabs .nav-link.active,
.module-content .nav-tabs .nav-link:hover { color: var(--epi-navy); border-bottom-color: var(--epi-cyan); background: none; }

/* ── Resources section ─────────────────────────────────────── */
.resources { margin-top: 1.75rem; }
.resources h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--epi-navy);
  border-bottom: 2px solid var(--epi-cyan);
  padding-bottom: 0.4rem;
  margin-bottom: 0.875rem;
}
.resource-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.resource-item {
  background: var(--epi-white);
  border: 1px solid var(--epi-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.resource-item:hover { border-color: var(--epi-cyan); }
.resource-item .heading-wrap { flex: 1; min-width: 0; }
.resource-item a.heading {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--epi-navy);
  text-decoration: none;
}
.resource-item a.heading:hover { color: var(--epi-cyan); }
.resource-item .epi-format-tag {
  display: inline-block;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15em 0.5em;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.resource-item .description { font-size: 0.825rem; color: var(--epi-muted); margin: 0.2rem 0 0; }
.resource-item .btn-group { flex-shrink: 0; align-self: center; }
.resource-item .dropdown-toggle {
  background: var(--epi-navy);
  border: none;
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  color: #fff;
}
.resource-item .dropdown-toggle:hover { background: var(--epi-cyan); }
.resource-item .dropdown-item { font-size: 0.825rem; }

/* ── Dataset detail — sidebar ──────────────────────────────── */
.secondary .module { margin-bottom: 0.875rem; }
.secondary .module .module-content { padding: 1rem; }
.secondary .module .module-content h1 { font-size: 0.95rem; margin-bottom: 0.5rem; }
.secondary .module .nums dt,
.secondary .module .nums dd { font-size: 0.8rem; color: var(--epi-muted); }

/* ── Tags ──────────────────────────────────────────────────── */
.tag-list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-list li a,
a.tag {
  background: var(--epi-surface);
  border: 1px solid var(--epi-border);
  border-radius: 4px;
  padding: 0.2em 0.6em;
  font-size: 0.775rem;
  color: var(--epi-muted);
  text-decoration: none;
}
.tag-list li a:hover,
a.tag:hover { background: #e0f2fe; border-color: var(--epi-cyan); color: var(--epi-cyan-dark); }

/* ── Additional info table ─────────────────────────────────── */
.additional-info table { font-size: 0.825rem; width: 100%; }
.additional-info th { color: var(--epi-muted); font-weight: 500; width: 38%; padding: 0.35rem 0.5rem 0.35rem 0; vertical-align: top; }
.additional-info td { color: var(--epi-text); padding: 0.35rem 0; }
.additional-info { margin-top: 1.75rem; }
.additional-info h2 { font-size: 1rem; font-weight: 700; color: var(--epi-navy); border-bottom: 2px solid var(--epi-cyan); padding-bottom: 0.4rem; margin-bottom: 0.875rem; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary { background: var(--epi-cyan); border-color: var(--epi-cyan); border-radius: 6px; }
.btn-primary:hover { background: var(--epi-cyan-dark); border-color: var(--epi-cyan-dark); }
.btn-default { border-radius: 6px; }
.page_primary_action .btn { font-size: 0.85rem; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: #ede8dd;
  color: var(--epi-muted);
  padding: 1rem 0 0;
  margin-top: 3rem;
  border-top: 1px solid #d4cfc5;
  font-size: 0.85rem;
}
.site-footer a { color: var(--epi-navy); text-decoration: none; }
.site-footer a:hover { color: var(--epi-cyan); }
.epi-footer-main { align-items: center; padding-bottom: 2rem; }
.epi-footer-col { padding: 0 2rem; }
.epi-footer-col-divider { border-right: 1px solid #d4cfc5; }
.epi-footer-brand-row { display: flex; align-items: flex-start; gap: 1rem; }
.epi-footer-logo-img { height: 6rem; width: auto; flex-shrink: 0; }
.epi-footer-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--epi-navy);
  letter-spacing: 0.06em;
  line-height: 1.1;
}
.epi-footer-tagline {
  font-size: 0.65rem;
  color: var(--epi-muted);
  margin-top: 0.15rem;
}
.epi-footer-desc {
  font-size: 0.82rem;
  color: var(--epi-muted);
  line-height: 1.65;
  margin: 0;
}
.epi-footer-links { list-style: none; padding: 0; margin: 0; text-align: center; }
.epi-footer-links li { margin-bottom: 0.75rem; }
.epi-footer-links a { color: var(--epi-muted); font-size: 0.875rem; }
.epi-footer-links a:hover { color: var(--epi-cyan); }
.epi-footer-funding-img { max-height: 6.5rem; width: auto; display: block; margin: 0 auto; }
.epi-footer-bottom {
  border-top: 1px solid #d4cfc5;
  padding: 0.65rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--epi-muted);
}

/* ── Landing page hero ────────────────────────────────────────────── */
.epi-homepage {
  margin: 0;
  padding: 0;
}

/* Remove CKAN main wrapper padding on home page */
body.epi-home .main { padding-top: 0 !important; padding-bottom: 0 !important; }

.epi-hero-upper {
  background: #f0ebe0;
  text-align: center;
  padding: 4.5rem 1rem 3.5rem;
}

.epi-hero-heading {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  color: #1a2a14;
  margin-bottom: 1rem;
}

.epi-hero-heading-accent {
  color: #2e7d32;
}

.epi-hero-sub {
  color: #555;
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 2.25rem;
}

.epi-hero-form {
  max-width: 540px;
  margin: 0 auto;
}

.epi-hero-search {
  display: flex;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.14);
  overflow: hidden;
}

.epi-hero-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  color: #333;
  background: transparent;
}

.epi-hero-input::placeholder {
  color: #999;
}

.epi-hero-btn {
  background: #2e7d32;
  color: #fff;
  border: none;
  padding: 0.9rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.epi-hero-btn:hover {
  background: #1b5e20;
}

.epi-hero-lower {
  line-height: 0;
}

.epi-charts-section {
  padding: 2rem 0 3rem;
  background: rgba(240,235,224,0.6);
}
.epi-chart-card {
  background: #fff;
  border: 1px solid var(--epi-border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
  height: 400px;
  display: flex;
  flex-direction: column;
}
.epi-chart-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--epi-navy);
  margin: 0 0 0.6rem;
}
.epi-chart-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--epi-border);
  font-size: 0.75rem;
}
.epi-chart-source { color: var(--epi-muted); }
.epi-chart-link { color: var(--epi-cyan); text-decoration: none; }
.epi-chart-link:hover { text-decoration: underline; }
.epi-chart-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
}
.epi-chart-placeholder {
  width: 100%;
  height: 400px;
  border-radius: 0.75rem;
  border: 2px dashed var(--epi-border);
  background: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--epi-muted);
  font-size: 0.9rem;
}

.epi-hero-img {
  width: 100%;
  display: block;
  max-height: 55vh;
  object-fit: cover;
  object-position: top center;
}

/* Hide main navbar on all pages — account bar (Log in) stays */
.masthead { display: none !important; }

/* ── Dataset detail page ──────────────────────────────────────────── */
.epi-ds-header {
  background: #fff;
  border: 1px solid var(--epi-border);
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

.epi-ds-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--epi-navy);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.epi-ds-desc {
  color: var(--epi-muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.6;
}

.epi-ds-body {
  background: #fff;
  border: 1px solid var(--epi-border);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 2rem;
}

.epi-ds-tabs {
  border-bottom: 1px solid var(--epi-border);
  padding: 0 1.25rem;
  background: #f8fafc;
  gap: 0;
}

.epi-ds-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--epi-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.8rem 1.1rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.epi-ds-tab:hover { color: var(--epi-navy); border-bottom-color: var(--epi-border); }

.epi-ds-tab.active {
  color: var(--epi-navy);
  border-bottom-color: var(--epi-cyan);
  font-weight: 600;
}

.epi-ds-tab-content { padding: 1.25rem 1.75rem 1.75rem; }

/* Remove the "Data and Resources" heading inside the tab — redundant */
.epi-ds-tab-content .module-heading { display: none; }

/* Additional Info table — restore cell padding stripped by table-condensed */
.additional-info table th,
.additional-info table td { padding: 0.5rem 0.75rem !important; }

/* API Access tab */
.epi-api-intro { color: var(--epi-muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.epi-code-block { margin-bottom: 1.25rem; }
.epi-code-label {
  display: inline-block;
  background: var(--epi-navy);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 0.3rem 0.3rem 0 0;
}
.epi-code-pre {
  background: #f1f5f9;
  border: 1px solid var(--epi-border);
  border-radius: 0 0.4rem 0.4rem 0.4rem;
  padding: 1rem 1.25rem;
  margin: 0;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #1e293b;
}
.epi-code-pre code { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; }

/* Remove CKAN core's triangle arrow on active facet items */
.epi-facet-group .nav-item.active > a::before {
  display: none !important;
  content: none !important;
}
/* Replace CKAN's #647A82 active background with a soft teal tint */
.epi-facet-group .nav-item.active > a,
.epi-facet-group .nav-item.active > a:hover {
  background-color: rgba(8, 145, 178, 0.1) !important;
  color: var(--epi-navy) !important;
}

/* Breathing room between the inner white container and the column edges */
.filters > div,
#facet-sidebar > div {
  margin-bottom: 0.5rem !important;
}

/* Inline date metadata on dataset cards — no box, no uppercase */
.epi-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.825rem;
  color: var(--epi-muted);
  margin-right: 1rem;
}
.epi-meta-item .fa { font-size: 0.8rem; opacity: 0.75; }
.epi-tag-link { color: var(--epi-muted); text-decoration: none; }
.epi-tag-link:hover { color: var(--epi-cyan); text-decoration: underline; }

/* Hero quick-link pills */
.epi-hero-quicklinks {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.epi-hero-ql {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  border-radius: 2rem;
  background: rgba(46, 125, 50, 0.1);
  border: 1px solid rgba(46, 125, 50, 0.25);
  color: #1b5e20;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.epi-hero-ql:hover {
  background: rgba(46, 125, 50, 0.2);
  border-color: rgba(46, 125, 50, 0.5);
  color: #1b5e20;
  text-decoration: none;
}
