/* California Open Data — CKAN theme
 *
 * Ported from the "Modern CA.gov Data Portal" design canvas
 * (California Open Data.dc.html). The canvas carries its styling inline, per
 * element; here it is factored into tokens and classes so the templates stay
 * readable and a colour or radius changes in one place.
 *
 * Palette is the CA.gov state one: #046b99 state blue, #fdb81e state gold.
 */

:root {
  --cdt-blue: #046b99;
  --cdt-blue-hover: #035d85;
  --cdt-blue-dark: #023a53;
  --cdt-blue-mid: #4993b5;
  --cdt-gold: #fdb81e;

  --cdt-ink: #14171c;
  --cdt-body: #3b3a48;
  --cdt-body-soft: #4a4958;
  --cdt-muted: #5e5e6a;
  --cdt-muted-2: #72717c;
  --cdt-muted-3: #898891;
  --cdt-muted-4: #a4a3ab;

  --cdt-line: #d4d4d7;
  --cdt-line-soft: #ededef;
  --cdt-line-strong: #bcbbc1;

  --cdt-tint: #eef8fb;
  --cdt-tint-soft: #f7fcfd;
  --cdt-sky: #87b8ce;
  --cdt-sky-soft: #b6d4e1;
  --cdt-slate: #323a45;
  --cdt-paper: #fafafa;

  --cdt-max: 1280px;
  --cdt-gutter: 32px;
  --cdt-radius: 10px;
  --cdt-radius-sm: 6px;
}

/* ── base ─────────────────────────────────────────────────────────────── */

body {
  background: #ffffff;
  font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  color: var(--cdt-body);
  -webkit-font-smoothing: antialiased;
}

/* Only unclassed links get the default colour. A bare `.cdt a` rule is more
 * specific than a single component class, so it was overriding .cdt-btn and
 * painting white button text blue-on-blue. */
.cdt a:not([class]) { color: var(--cdt-blue); text-underline-offset: 2px; }
.cdt a:not([class]):hover { color: var(--cdt-blue-dark); }

/* Bootstrap 5 renamed this to .visually-hidden, so .sr-only is undefined and
 * the search labels rendered as visible text next to the input. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.cdt-wrap {
  max-width: var(--cdt-max);
  margin: 0 auto;
  padding-left: var(--cdt-gutter);
  padding-right: var(--cdt-gutter);
}

.cdt h1, .cdt h2, .cdt h3 { color: var(--cdt-ink); font-weight: 800; }
.cdt h1 { font-size: 42px; line-height: 1.15; letter-spacing: -.025em; text-wrap: balance; }
.cdt h2 { font-size: 32px; letter-spacing: -.02em; margin: 0; }
.cdt h3 { font-size: 23px; margin: 0 0 10px; }

.cdt-eyebrow {
  font-size: 12.5px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--cdt-muted);
}
.cdt-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.cdt-more { font-size: 16px; font-weight: 600; color: var(--cdt-blue); text-decoration: none; }
.cdt-more:hover { text-decoration: underline; }

/* ── buttons ──────────────────────────────────────────────────────────── */

.cdt-btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  background: var(--cdt-blue); color: #ffffff;
  padding: 12px 22px; border-radius: var(--cdt-radius-sm);
  font-size: 16px; font-weight: 700; font-family: inherit;
}
.cdt-btn:hover { background: var(--cdt-blue-hover); color: #ffffff; }
.cdt-btn--ghost {
  background: #ffffff; color: var(--cdt-blue); border: 2px solid var(--cdt-blue);
  padding: 10px 20px;
}
.cdt-btn--ghost:hover { background: var(--cdt-blue); color: #ffffff; }
.cdt-btn--soft {
  background: #ffffff; color: var(--cdt-blue);
  border: 1.5px solid var(--cdt-sky-soft); padding: 9px 0;
  font-size: 14.5px; width: 100%;
}
.cdt-btn--soft:hover { border-color: var(--cdt-blue); background: var(--cdt-tint); }
.cdt-btn--block { width: 100%; text-align: center; }

.cdt-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 6px 13px; font-size: 14.5px;
  text-decoration: none; color: var(--cdt-blue);
  background: #ffffff; border: 1px solid var(--cdt-sky-soft);
}
.cdt-pill:hover { background: var(--cdt-blue); color: #ffffff; border-color: var(--cdt-blue); }

.cdt-tag {
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--cdt-body); background: var(--cdt-line-soft);
  padding: 3px 8px; border-radius: 3px; text-transform: uppercase;
}
.cdt-topic-tag {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--cdt-blue); background: var(--cdt-tint);
  padding: 4px 9px; border-radius: 4px; text-decoration: none;
}
.cdt-badge-gold {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--cdt-ink); background: var(--cdt-gold);
  padding: 4px 9px; border-radius: 4px;
}

/* ── state banner + header ────────────────────────────────────────────── */

.cdt-statebar { background: var(--cdt-slate); color: #ffffff; }
.cdt-statebar .cdt-wrap {
  display: flex; align-items: center; gap: 12px;
  padding-top: 8px; padding-bottom: 8px; font-size: 14px;
}
.cdt-statebar-flag {
  width: 18px; height: 12px; background: var(--cdt-blue);
  border: 1px solid rgba(255,255,255,.35); border-radius: 2px; display: inline-block; flex: none;
}
.cdt-statebar-note { color: var(--cdt-line); }
.cdt-statebar-links { margin-left: auto; display: flex; gap: 20px; }
.cdt-statebar-links a { color: #ffffff; text-decoration: none; }
.cdt-statebar-links a:hover { color: #ffffff; text-decoration: underline; }

.cdt-header { background: #ffffff; border-bottom: 1px solid var(--cdt-line); position: relative; z-index: 20; }
.cdt-header-top { display: flex; align-items: center; gap: 40px; padding-top: 16px; padding-bottom: 16px; }

.cdt-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.cdt-brand:hover { color: inherit; }
.cdt-brand-mark {
  width: 44px; height: 44px; border-radius: 8px; background: var(--cdt-blue);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.cdt-brand-mark i { width: 18px; height: 18px; border-radius: 3px; background: var(--cdt-gold); display: block; }
.cdt-brand-name { font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: var(--cdt-ink); line-height: 1.15; }
.cdt-brand-host { font-size: 12.5px; color: var(--cdt-muted-2); letter-spacing: .03em; }

.cdt-header-search { margin-left: auto; display: flex; min-width: 280px; }
.cdt-header-search input {
  flex: 1; border: 1px solid var(--cdt-line-strong); border-right: none;
  border-radius: 7px 0 0 7px; padding: 9px 14px; font-size: 15px;
  color: var(--cdt-ink); outline: none; font-family: inherit;
}
.cdt-header-search input:focus { border-color: var(--cdt-blue); }
.cdt-header-search button {
  border: 1px solid var(--cdt-blue); background: var(--cdt-blue); color: #ffffff;
  border-radius: 0 7px 7px 0; padding: 0 16px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.cdt-header-search button:hover { background: var(--cdt-blue-hover); }

.cdt-nav-bar { border-top: 1px solid var(--cdt-line-soft); background: var(--cdt-paper); }
.cdt-nav {
  display: flex; gap: clamp(12px, 1.6vw, 26px); align-items: center;
  font-size: clamp(13.5px, 1.15vw, 15px); font-weight: 500;
  min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.cdt-nav::-webkit-scrollbar { display: none; }
.cdt-nav a {
  color: var(--cdt-body); text-decoration: none; padding: 13px 0;
  border-bottom: 3px solid transparent; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
}
.cdt-nav a:hover, .cdt-nav a.is-active { color: var(--cdt-blue); border-bottom-color: var(--cdt-blue); }
.cdt-nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cdt-gold); display: inline-block; }

/* ── hero ─────────────────────────────────────────────────────────────── */

.cdt-hero {
  background: var(--cdt-blue-dark);
  background-image: linear-gradient(180deg, #035376 0%, var(--cdt-blue-dark) 100%);
  color: #ffffff; padding: 84px var(--cdt-gutter) 72px;
  position: relative; overflow: hidden;
}
.cdt-hero-rule {
  position: absolute; inset: 0; opacity: .16;
  background-image: repeating-linear-gradient(115deg, var(--cdt-sky) 0 1px, transparent 1px 22px);
}
.cdt-hero-inner { max-width: 940px; margin: 0 auto; position: relative; text-align: center; }
.cdt-hero h1 { margin: 0 0 18px; font-size: 60px; line-height: 1.1; color: #ffffff; }
.cdt-hero p { margin: 0 auto 36px; max-width: 640px; font-size: 20px; line-height: 1.6; color: var(--cdt-sky-soft); text-wrap: pretty; }
.cdt-hero-flag {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(253,184,30,.16); border: 1px solid rgba(253,184,30,.45);
  color: var(--cdt-gold); padding: 6px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; letter-spacing: .03em; margin-bottom: 26px;
}
.cdt-hero-flag i { width: 7px; height: 7px; border-radius: 50%; background: var(--cdt-gold); display: inline-block; }

.cdt-hero-search {
  display: flex; max-width: 760px; margin: 0 auto;
  background: #ffffff; border-radius: var(--cdt-radius); padding: 7px;
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
}
.cdt-hero-search input {
  flex: 1; border: none; outline: none; font-size: 18px;
  color: var(--cdt-ink); background: transparent; padding: 0 16px; font-family: inherit;
}
.cdt-hero-search button {
  background: var(--cdt-blue); color: #ffffff; border: none;
  padding: 15px 32px; border-radius: 7px; font-size: 17px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.cdt-hero-search button:hover { background: var(--cdt-blue-hover); }

.cdt-trending { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; font-size: 14.5px; }
.cdt-trending-label { color: var(--cdt-sky); padding: 7px 0; }
.cdt-trending a {
  color: #ffffff; text-decoration: none;
  border: 1px solid rgba(255,255,255,.3); padding: 7px 15px; border-radius: 999px;
}
.cdt-trending a:hover { background: #ffffff; color: var(--cdt-blue-dark); }

/* ── alert strip ──────────────────────────────────────────────────────── */

.cdt-strip { background: #ffffff; border-bottom: 1px solid var(--cdt-line-soft); }
.cdt-strip .cdt-wrap {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding-top: 20px; padding-bottom: 20px;
}
.cdt-strip-tag {
  background: var(--cdt-gold); color: var(--cdt-ink);
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 4px;
}
.cdt-strip-text { font-size: 16.5px; color: var(--cdt-body); }
.cdt-strip .cdt-more { margin-left: auto; }

/* ── topic grid ───────────────────────────────────────────────────────── */

.cdt-section { padding-top: 56px; padding-bottom: 56px; }
.cdt-topics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cdt-topic {
  display: block; text-decoration: none; background: #ffffff;
  border: 1px solid var(--cdt-line); border-radius: var(--cdt-radius);
  padding: 22px 20px; transition: all .15s;
}
.cdt-topic:hover {
  border-color: var(--cdt-blue);
  box-shadow: 0 6px 18px rgba(2,58,83,.1);
  transform: translateY(-2px);
}
.cdt-topic-icon {
  width: 34px; height: 34px; border-radius: 7px;
  background: var(--cdt-tint); border: 1px solid var(--cdt-sky-soft);
  margin-bottom: 14px; background-size: cover; background-position: center;
}
.cdt-topic-name { font-size: 17.5px; font-weight: 700; color: var(--cdt-ink); margin-bottom: 4px; }
.cdt-topic-count { font-size: 14.5px; color: var(--cdt-muted-2); }

/* ── home two-column ──────────────────────────────────────────────────── */

.cdt-split { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 48px; align-items: start; }

.cdt-list { border: 1px solid var(--cdt-line); border-radius: var(--cdt-radius); overflow: hidden; }
.cdt-rank-item {
  display: flex; gap: 20px; align-items: flex-start; padding: 20px 22px;
  text-decoration: none; border-bottom: 1px solid var(--cdt-line-soft); background: #ffffff;
}
.cdt-rank-item:last-child { border-bottom: none; }
.cdt-rank-item:hover { background: var(--cdt-tint-soft); }
.cdt-rank-num { font-size: 13px; font-weight: 800; color: var(--cdt-line-strong); width: 22px; padding-top: 3px; flex: none; }
.cdt-rank-body { flex: 1; min-width: 0; }
.cdt-rank-title { font-size: 18px; font-weight: 700; color: var(--cdt-blue); margin-bottom: 5px; line-height: 1.35; }
.cdt-rank-meta { font-size: 14.5px; color: var(--cdt-muted); margin-bottom: 10px; }
.cdt-formats { display: flex; gap: 6px; flex-wrap: wrap; }
.cdt-rank-stat { text-align: right; flex: none; }
.cdt-rank-stat b { display: block; font-size: 19px; font-weight: 800; color: var(--cdt-ink); letter-spacing: -.01em; }
.cdt-rank-stat span { font-size: 12.5px; color: var(--cdt-muted-2); }

.cdt-recent { display: flex; flex-direction: column; gap: 2px; }
.cdt-recent a {
  display: block; text-decoration: none; padding: 15px 18px;
  border-left: 3px solid var(--cdt-sky); background: var(--cdt-tint-soft);
}
.cdt-recent a:hover { border-left-color: var(--cdt-gold); background: var(--cdt-tint); }
.cdt-recent-title { font-size: 16px; font-weight: 600; color: var(--cdt-ink); line-height: 1.4; margin-bottom: 4px; }
.cdt-recent-meta { font-size: 13.5px; color: var(--cdt-muted-2); }

.cdt-api-card { margin-top: 28px; background: var(--cdt-slate); border-radius: var(--cdt-radius); padding: 26px 24px; color: #ffffff; }
.cdt-api-card h3 { font-size: 19px; font-weight: 700; margin: 0 0 10px; color: #ffffff; }
.cdt-api-card p { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: #adb0b5; }
.cdt-api-code {
  background: var(--cdt-ink); border-radius: var(--cdt-radius-sm); padding: 13px 15px;
  font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: var(--cdt-sky);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.cdt-api-card a { display: inline-block; margin-top: 18px; color: var(--cdt-gold); font-weight: 700; font-size: 15.5px; text-decoration: none; }
.cdt-api-card a:hover { text-decoration: underline; color: var(--cdt-gold); }

/* ── call-to-action pair ──────────────────────────────────────────────── */

.cdt-cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cdt-cta { border: 1px solid var(--cdt-line); border-radius: var(--cdt-radius); padding: 32px 30px; }
.cdt-cta--paper { background: var(--cdt-paper); }
.cdt-cta p { margin: 0 0 20px; font-size: 16.5px; line-height: 1.65; color: var(--cdt-body-soft); max-width: 440px; }

/* ── search screen ────────────────────────────────────────────────────── */

.cdt-search-main { background: var(--cdt-paper); border-top: 1px solid var(--cdt-line-soft); }
.cdt-search-head { background: #ffffff; border-bottom: 1px solid var(--cdt-line); }
.cdt-search-head .cdt-wrap { padding-top: 22px; padding-bottom: 22px; }
.cdt-crumbs { font-size: 14px; color: var(--cdt-muted-2); margin-bottom: 14px; }
.cdt-crumbs a { color: var(--cdt-blue); text-decoration: none; }
.cdt-crumbs span { color: var(--cdt-line-strong); }
.cdt-searchbox { display: flex; gap: 12px; max-width: 820px; }
.cdt-searchbox input {
  flex: 1; border: 2px solid var(--cdt-blue); border-radius: 7px;
  padding: 13px 16px; font-size: 17px; outline: none; color: var(--cdt-ink); font-family: inherit;
}
.cdt-searchbox button {
  background: var(--cdt-blue); color: #ffffff; border: none; padding: 0 30px;
  border-radius: 7px; font-size: 16.5px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.cdt-searchbox button:hover { background: var(--cdt-blue-hover); }

.cdt-results-layout {
  display: grid; grid-template-columns: 288px minmax(0,1fr); gap: 36px;
  align-items: start; padding-top: 32px; padding-bottom: 72px;
}
.cdt-facets { background: #ffffff; border: 1px solid var(--cdt-line); border-radius: var(--cdt-radius); position: sticky; top: 24px; }
.cdt-facets-head {
  padding: 18px 20px; border-bottom: 1px solid var(--cdt-line-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.cdt-facets-head b { font-size: 16px; font-weight: 800; color: var(--cdt-ink); }
.cdt-facets-head a { font-size: 14px; color: var(--cdt-blue); text-decoration: none; }
.cdt-facet { padding: 18px 20px; border-bottom: 1px solid var(--cdt-line-soft); }
.cdt-facet:last-child { border-bottom: none; }
.cdt-facet-name { margin-bottom: 12px; }
.cdt-facet-items { display: flex; flex-direction: column; gap: 9px; }
.cdt-facet-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; color: var(--cdt-body); text-decoration: none;
}
.cdt-facet-item:hover { color: var(--cdt-blue); }
.cdt-facet-box {
  width: 17px; height: 17px; border: 2px solid var(--cdt-muted-4);
  border-radius: 3px; flex: none; background: #ffffff;
}
.cdt-facet-item.is-active .cdt-facet-box { background: var(--cdt-blue); border-color: var(--cdt-blue); }
.cdt-facet-label { flex: 1; }
.cdt-facet-count { font-size: 13px; color: var(--cdt-muted-3); }

.cdt-results-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.cdt-results-count { font-size: 17px; color: var(--cdt-body); }
.cdt-results-count b { color: var(--cdt-ink); font-weight: 800; }
.cdt-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cdt-tint); border: 1px solid var(--cdt-sky-soft);
  color: var(--cdt-blue-dark); font-size: 14px; padding: 5px 12px;
  border-radius: 999px; text-decoration: none;
}
.cdt-chip b { color: var(--cdt-blue); font-weight: 700; }
.cdt-sort { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--cdt-muted); }
.cdt-sort select {
  border: 1px solid var(--cdt-line-strong); border-radius: var(--cdt-radius-sm);
  padding: 8px 12px; font-size: 15px; color: var(--cdt-ink); background: #ffffff; font-family: inherit;
}

.cdt-results { display: flex; flex-direction: column; gap: 14px; }
.cdt-result {
  background: #ffffff; border: 1px solid var(--cdt-line);
  border-radius: var(--cdt-radius); padding: 24px 26px;
}
.cdt-result:hover { border-color: var(--cdt-blue); box-shadow: 0 4px 14px rgba(2,58,83,.08); }
.cdt-result-row { display: flex; gap: 20px; align-items: flex-start; }
.cdt-result-body { flex: 1; min-width: 0; }
.cdt-result-tags { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.cdt-result-org { font-size: 13.5px; color: var(--cdt-muted-2); }
.cdt-result-title {
  font-size: 21px; font-weight: 700; color: var(--cdt-blue); text-decoration: none;
  line-height: 1.3; display: block; margin-bottom: 8px;
}
.cdt-result-title:hover { text-decoration: underline; }
.cdt-result-desc { margin: 0 0 14px; font-size: 16px; line-height: 1.6; color: var(--cdt-body-soft); max-width: 660px; text-wrap: pretty; }
.cdt-result-meta { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 13.5px; color: var(--cdt-muted); }
.cdt-result-actions { flex: none; display: flex; flex-direction: column; gap: 8px; width: 132px; }
.cdt-result-actions .cdt-btn { padding: 10px 0; font-size: 14.5px; text-align: center; }

.cdt-pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 34px; }
.cdt-pager .pagination { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.cdt-pager li a, .cdt-pager li span {
  display: block; border: 1px solid var(--cdt-line-strong); background: #ffffff;
  color: var(--cdt-body); padding: 9px 15px; border-radius: var(--cdt-radius-sm);
  font-size: 15px; text-decoration: none;
}
.cdt-pager li a:hover { border-color: var(--cdt-blue); color: var(--cdt-blue); }
.cdt-pager li.active span, .cdt-pager li.active a {
  border-color: var(--cdt-blue); background: var(--cdt-blue); color: #ffffff; font-weight: 700;
}

/* ── dataset detail ───────────────────────────────────────────────────── */

.cdt-detail-main { background: var(--cdt-paper); border-top: 1px solid var(--cdt-line-soft); }
.cdt-detail-head { background: #ffffff; border-bottom: 1px solid var(--cdt-line); }
.cdt-detail-head .cdt-wrap { padding-top: 22px; padding-bottom: 30px; }
.cdt-detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 48px; align-items: start; }
.cdt-detail-lede { margin: 0 0 18px; font-size: 19px; line-height: 1.65; color: var(--cdt-body-soft); max-width: 740px; text-wrap: pretty; }
.cdt-detail-facts { display: flex; gap: 26px; flex-wrap: wrap; font-size: 15px; color: var(--cdt-muted); }
.cdt-detail-facts a { color: var(--cdt-blue); text-decoration: none; font-weight: 600; }

.cdt-actionbox { border: 1px solid var(--cdt-line); border-radius: var(--cdt-radius); padding: 20px; background: var(--cdt-paper); }
.cdt-actionbox .cdt-btn { margin-bottom: 10px; padding: 14px 0; font-size: 16.5px; }
.cdt-actionbox-stats {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--cdt-line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; font-size: 14px; color: var(--cdt-muted);
}
.cdt-actionbox-stats b { display: block; font-size: 21px; font-weight: 800; color: var(--cdt-ink); }

.cdt-tabs { display: flex; border-bottom: 2px solid var(--cdt-line); margin-bottom: 26px; }
.cdt-tabs a {
  padding: 12px 20px; font-size: 16.5px; font-weight: 600; color: var(--cdt-muted);
  text-decoration: none; margin-bottom: -2px;
}
.cdt-tabs a:hover { color: var(--cdt-blue); }
.cdt-tabs a.is-active { font-weight: 700; color: var(--cdt-blue); border-bottom: 3px solid var(--cdt-blue); }

.cdt-resources { background: #ffffff; border: 1px solid var(--cdt-line); border-radius: var(--cdt-radius); overflow: hidden; margin-bottom: 32px; }
.cdt-resource { display: flex; align-items: center; gap: 18px; padding: 18px 22px; border-bottom: 1px solid var(--cdt-line-soft); }
.cdt-resource:last-child { border-bottom: none; }
/* A fixed width overflowed on long formats -- "ArcGIS GeoServices REST API"
 * is 27 characters. Keep short formats as even badges via min-width, and let
 * long ones wrap inside a cap rather than spill across the row. */
.cdt-resource-fmt {
  font-size: 11.5px; font-weight: 800; letter-spacing: .06em; color: #ffffff;
  background: var(--cdt-muted); padding: 5px 9px; border-radius: 4px;
  flex: none; min-width: 60px; max-width: 132px; text-align: center;
  text-transform: uppercase; white-space: normal; overflow-wrap: anywhere;
  line-height: 1.3;
}
.cdt-resource-body { flex: 1; min-width: 0; }
.cdt-resource-name { font-size: 17px; font-weight: 700; color: var(--cdt-ink); margin-bottom: 3px; }
.cdt-resource-meta { font-size: 14px; color: var(--cdt-muted-2); }
.cdt-resource a { font-size: 15px; font-weight: 600; color: var(--cdt-blue); text-decoration: none; white-space: nowrap; }
.cdt-resource a:hover { text-decoration: underline; }

.cdt-meta-table { background: #ffffff; border: 1px solid var(--cdt-line); border-radius: var(--cdt-radius); overflow: hidden; }
.cdt-meta-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 20px;
  padding: 14px 22px; border-bottom: 1px solid var(--cdt-line-soft); font-size: 15.5px;
}
.cdt-meta-row:last-child { border-bottom: none; }
.cdt-meta-key { color: var(--cdt-muted); font-weight: 600; }
.cdt-meta-val { color: var(--cdt-ink); overflow-wrap: anywhere; }

.cdt-aside { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 24px; }
.cdt-card { background: #ffffff; border: 1px solid var(--cdt-line); border-radius: var(--cdt-radius); padding: 22px 20px; }
.cdt-card--tint { background: var(--cdt-tint); border-color: var(--cdt-sky-soft); }
.cdt-card .cdt-eyebrow { margin-bottom: 14px; }
.cdt-publisher { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.cdt-publisher-mark {
  width: 42px; height: 42px; border-radius: 7px; background: var(--cdt-tint);
  border: 1px solid var(--cdt-sky-soft); flex: none;
  background-size: cover; background-position: center;
}
.cdt-publisher-name { font-size: 16px; font-weight: 700; color: var(--cdt-ink); line-height: 1.3; }
.cdt-publisher-count { font-size: 13.5px; color: var(--cdt-muted-2); }
.cdt-linklist { display: flex; flex-direction: column; gap: 12px; }
.cdt-linklist a { font-size: 15.5px; color: var(--cdt-blue); text-decoration: none; line-height: 1.4; }
.cdt-linklist a:hover { text-decoration: underline; }
/* Citations contain a URL, which has no break opportunities and pushed the
 * card wider than its column. */
.cdt-cite {
  font-size: 14px; line-height: 1.6; color: var(--cdt-blue-dark);
  overflow-wrap: anywhere;
}
.cdt-card { overflow-wrap: anywhere; }

/* ── footer ───────────────────────────────────────────────────────────── */

.cdt-footer { background: var(--cdt-blue-dark); color: #ffffff; padding: 56px 0 28px; }
.cdt-footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.2);
}
.cdt-footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cdt-footer-brand .cdt-brand-mark { width: 36px; height: 36px; }
.cdt-footer-brand .cdt-brand-mark i { width: 15px; height: 15px; }
.cdt-footer-brand span { font-size: 17px; font-weight: 800; }
.cdt-footer p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--cdt-sky-soft); max-width: 300px; }
.cdt-footer-head { font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cdt-sky); margin-bottom: 14px; }
.cdt-footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 15.5px; }
.cdt-footer-links a { color: #ffffff; text-decoration: none; }
.cdt-footer-links a:hover { color: #ffffff; text-decoration: underline; }
.cdt-footer-legal { display: flex; gap: 26px; flex-wrap: wrap; padding-top: 22px; font-size: 14px; color: var(--cdt-sky); }
.cdt-footer-legal a { color: var(--cdt-sky); text-decoration: none; }
.cdt-footer-legal a:hover { color: #ffffff; }

/* ── responsive ───────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .cdt-topics { grid-template-columns: repeat(2, 1fr); }
  .cdt-split,
  .cdt-detail-grid,
  .cdt-cta-grid { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .cdt-results-layout { grid-template-columns: minmax(0,1fr); }
  .cdt-facets, .cdt-aside { position: static; }
  .cdt-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root { --cdt-gutter: 18px; }
  .cdt-hero { padding: 52px var(--cdt-gutter) 46px; }
  .cdt-hero h1 { font-size: 38px; }
  .cdt-hero p { font-size: 17px; }
  .cdt-hero-search { flex-wrap: wrap; gap: 8px; }
  .cdt-hero-search input { padding: 10px 12px; }
  .cdt-hero-search button, .cdt-searchbox button { width: 100%; padding: 13px 0; }
  .cdt-searchbox { flex-wrap: wrap; }
  .cdt-topics { grid-template-columns: 1fr; }
  .cdt-header-top { flex-wrap: wrap; gap: 16px; }
  .cdt-header-search { margin-left: 0; width: 100%; min-width: 0; }
  .cdt-result-row { flex-direction: column; }
  .cdt-result-actions { flex-direction: row; width: 100%; }
  .cdt-result-actions .cdt-btn { flex: 1; }
  .cdt-meta-row { grid-template-columns: 1fr; gap: 4px; }
  .cdt-footer-grid { grid-template-columns: 1fr; }
  .cdt h1 { font-size: 30px; }
  .cdt h2 { font-size: 25px; }
}


/* ── CKAN's own pages ─────────────────────────────────────────────────────
 * Organization, group, user and admin pages keep CKAN's Bootstrap layout
 * (.row.wrapper, .module, .toolbar). Rather than re-template each one, bring
 * that furniture in line with the theme so they do not read as a different
 * site sitting behind the same header.
 */

.cdt .row.wrapper,
.cdt .toolbar { background: transparent; }

.cdt [role="main"],
.cdt .main { background: var(--cdt-paper); }

.cdt .row.wrapper {
  max-width: var(--cdt-max);
  margin: 0 auto;
  padding: 28px var(--cdt-gutter) 64px;
}

.cdt .toolbar {
  max-width: var(--cdt-max);
  margin: 0 auto;
  padding: 18px var(--cdt-gutter) 0;
}

.cdt .toolbar .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: var(--cdt-muted-2);
}
.cdt .toolbar .breadcrumb a { color: var(--cdt-blue); text-decoration: none; }
.cdt .toolbar .breadcrumb a:hover { text-decoration: underline; }
.cdt .breadcrumb-item + .breadcrumb-item::before { color: var(--cdt-line-strong); }

.cdt .module {
  background: #ffffff;
  border: 1px solid var(--cdt-line);
  border-radius: var(--cdt-radius);
  box-shadow: none;
}
.cdt .module-narrow, .cdt .module-shallow { background: #ffffff; }
.cdt .module-heading {
  background: #ffffff;
  border-bottom: 1px solid var(--cdt-line-soft);
  border-radius: var(--cdt-radius) var(--cdt-radius) 0 0;
  font-size: 16px; font-weight: 800; color: var(--cdt-ink);
  padding: 16px 20px;
}
.cdt .module-content { padding: 20px; }

.cdt .page-heading,
.cdt .module h1, .cdt .module h2 { color: var(--cdt-ink); font-weight: 800; letter-spacing: -.02em; }

/* CKAN's buttons, matched to the theme's */
.cdt .btn-primary {
  background: var(--cdt-blue); border-color: var(--cdt-blue); color: #ffffff; font-weight: 700;
}
.cdt .btn-primary:hover, .cdt .btn-primary:focus {
  background: var(--cdt-blue-hover); border-color: var(--cdt-blue-hover); color: #ffffff;
}
.cdt .btn-secondary {
  background: #ffffff; border-color: var(--cdt-line-strong); color: var(--cdt-blue); font-weight: 600;
}
.cdt .btn-secondary:hover, .cdt .btn-secondary:focus {
  background: var(--cdt-tint); border-color: var(--cdt-blue); color: var(--cdt-blue-dark);
}

.cdt .pagination-wrapper { display: flex; justify-content: center; }
.cdt .pagination .page-link { color: var(--cdt-blue); }
.cdt .pagination .active > .page-link,
.cdt .pagination .page-item.active .page-link {
  background: var(--cdt-blue); border-color: var(--cdt-blue); color: #ffffff;
}

/* Media grids CKAN uses for the org and group indexes */
.cdt .media-grid { background: transparent; border: none; box-shadow: none; }
.cdt .media-item {
  background: #ffffff; border: 1px solid var(--cdt-line);
  border-radius: var(--cdt-radius); transition: all .15s;
}
.cdt .media-item:hover {
  border-color: var(--cdt-blue);
  box-shadow: 0 6px 18px rgba(2,58,83,.1);
  transform: translateY(-2px);
}
.cdt .media-heading { color: var(--cdt-ink); font-weight: 700; }
.cdt .media-item .count, .cdt .media-item .nums { color: var(--cdt-muted-2); }

/* ── long-form copy (about page) ──────────────────────────────────────── */

.cdt-prose { max-width: 780px; }
.cdt-prose p {
  margin: 0 0 20px;
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--cdt-body-soft);
  text-wrap: pretty;
}
.cdt-prose .cdt-cta-grid { max-width: none; }
