/* ==========================================================================
   KDH Design System — matching datmw React frontend exactly
   ========================================================================== */

/* ── Custom Properties ──────────────────────────────────────────────── */
:root {
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --teal-dark: #085041;
  --teal-mid: #0F6E56;
  --teal-light: #1D9E75;
  --teal-pale: #E1F5EE;
  --amber: #EF9F27;
  --amber-dark: #BA7517;
  --coral: #D85A30;
  --surface: #f9f8f5;
  --white: #ffffff;
  --text-dark: #1a1a18;
  --text-mid: #444441;
  --text-muted: #888780;
  --border-light: #e5e7eb;  /* gray-200 */
  --border-mid: #a0a29a;    /* sharper border */
  --border-lighter: #f3f4f6; /* gray-100 */
}

/* ── Reset & Base ───────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--text-dark);
  background-color: var(--surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Skip Link ───────────────────────────────────────────────────────── */
.kdh-skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 200;
  background: var(--teal-dark);
  color: var(--white);
  padding: 0.5rem 1rem;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 0 0 0.5rem 0;
}
.kdh-skip-link:focus {
  top: 0;
}

/* ── Utility Classes ────────────────────────────────────────────────── */
.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }
.font-mono { font-family: var(--font-mono); }

.text-teal-dark { color: var(--teal-dark); }
.text-teal-mid { color: var(--teal-mid); }
.text-teal-light { color: var(--teal-light); }
.text-muted { color: var(--text-muted); }
.text-mid { color: var(--text-mid); }

.bg-surface { background-color: var(--surface); }
.bg-white { background-color: var(--white); }
.bg-teal-dark { background-color: var(--teal-dark); }
.bg-teal-pale { background-color: var(--teal-pale); }

/* ── Container ──────────────────────────────────────────────────────── */
.kdh-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) {
  .kdh-container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .kdh-container { padding-left: 2rem; padding-right: 2rem; }
}

/* ── Navbar ─────────────────────────────────────────────────────────── */
.kdh-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-lighter);
}
.kdh-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.25rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .kdh-nav__inner { padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
  .kdh-nav__inner { height: 5.5rem; padding: 0 2rem; }
}

.kdh-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}
.kdh-nav__logo {
  display: block;
  height: 3.5rem;
  width: auto;
}
.kdh-nav__brand-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal-dark);
}
.kdh-nav__brand-d { color: var(--teal-light); }

.kdh-nav__links {
  display: none;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 768px) {
  .kdh-nav__links { display: flex; }
}
.kdh-nav__link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: color 0.15s;
}
.kdh-nav__link:hover { color: var(--teal-dark); }
.kdh-nav__link--active {
  color: var(--teal-dark);
  font-weight: 600;
}
.kdh-nav__cta {
  display: inline-block;
  background: var(--teal-mid);
  color: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.kdh-nav__cta:hover { background: var(--teal-dark); }

/* Hamburger */
.kdh-nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  border: none;
  background: none;
  border-radius: 0.5rem;
  cursor: pointer;
  color: var(--text-mid);
}
.kdh-nav__toggle:hover { background: var(--border-lighter); }
@media (min-width: 768px) {
  .kdh-nav__toggle { display: none; }
}
.kdh-nav__toggle-bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.2s;
}

/* Mobile menu */
.kdh-nav__mobile {
  display: none;
  border-top: 1px solid var(--border-lighter);
  background: var(--white);
  padding: 0.5rem 1rem 1rem;
}
.kdh-nav__mobile--open { display: block; }
@media (min-width: 768px) {
  .kdh-nav__mobile, .kdh-nav__mobile--open { display: none; }
}
.kdh-nav__mobile-link {
  display: block;
  padding: 0.625rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid #f9fafb;
  color: var(--text-mid);
}
.kdh-nav__mobile-link--active {
  color: var(--teal-dark);
  font-weight: 600;
}
.kdh-nav__mobile-cta {
  display: block;
  margin-top: 0.75rem;
  background: var(--teal-mid);
  color: var(--white);
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.kdh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
  padding: 0.375rem 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.5;
}
.kdh-btn--primary {
  background: var(--teal-mid);
  color: var(--white);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.kdh-btn--primary:hover { background: var(--teal-dark); }
.kdh-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }

.kdh-btn--secondary {
  background: transparent;
  color: var(--teal-mid);
  border: 2px solid var(--teal-mid);
}
.kdh-btn--secondary:hover { background: var(--teal-pale); }

.kdh-btn--ghost {
  background: transparent;
  color: var(--text-mid);
  border: 1px solid var(--border-light);
}
.kdh-btn--ghost:hover { background: #f9fafb; }

.kdh-btn--lg { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.kdh-btn--sm { padding: 0.375rem 0.625rem; font-size: 0.75rem; }

.kdh-btn--icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: none;
  background: rgba(255,255,255,.1);
  color: var(--white);
  cursor: pointer;
  transition: background 0.15s;
}
.kdh-btn--icon:hover { background: rgba(255,255,255,.2); }

/* ── Touch Target Boost (mobile) ───────────────────────────────────── */
@media (max-width: 767px) {
  .kdh-btn { min-height: 2.75rem; padding-left: 1rem; padding-right: 1rem; }
  .kdh-btn--sm { min-height: 2.25rem; }
  .kdh-nav__link {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    padding: 0 1rem;
  }
  .kdh-nav__toggle {
    min-width: 2.75rem;
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .kdh-search__topic {
    min-height: 2rem;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
  .kdh-tabs__tab { min-height: 2.75rem; }
  .kdh-pagination a,
  .kdh-pagination button { min-height: 2.5rem; min-width: 2.5rem; display: inline-flex; align-items: center; justify-content: center; }
  .kdh-hero-rail__dot { min-width: 2.25rem; min-height: 2.25rem; display: flex; align-items: center; justify-content: center; }
}

/* ── Forms ──────────────────────────────────────────────────────────── */
.kdh-input {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  padding: 0.4375rem 0.625rem;
  font-size: 0.75rem;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  outline: none;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.kdh-input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--teal-mid);
}
.kdh-input::placeholder { color: #9ca3af; }

.kdh-select {
  border: 1px solid var(--border-light);
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.6875rem;
  font-family: var(--font-body);
  color: var(--text-mid);
  background: var(--white);
  outline: none;
  cursor: pointer;
}
.kdh-select:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--teal-mid);
}

.kdh-checkbox {
  border-radius: 0.25rem;
  border-color: #d1d5db;
  color: var(--teal-mid);
  accent-color: var(--teal-mid);
}

.kdh-textarea {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  outline: none;
  resize: vertical;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.kdh-textarea:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--teal-mid);
}

/* ── Cards ──────────────────────────────────────────────────────────── */
.kdh-card {
  background: var(--white);
  border: 1px solid var(--border-lighter);
  border-radius: 0.625rem;
  transition: box-shadow 0.15s;
}
.kdh-card:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1); }

/* ── Badges ─────────────────────────────────────────────────────────── */
.kdh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  border: 1px solid;
  padding: 0.0625rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1.125rem;
}
.kdh-badge--teal {
  background: var(--teal-pale);
  border-color: rgba(15,110,86,.2);
  color: var(--teal-mid);
}
.kdh-badge--green {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.kdh-badge--blue {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.kdh-badge--amber {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.kdh-badge--gray {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #4b5563;
}
.kdh-badge--coral {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}
.kdh-badge--purple {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #7c3aed;
}
.kdh-badge--cyan {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: #0e7490;
}

/* Pill badge (hero, domain pills) */
.kdh-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  background: var(--teal-pale);
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--teal-dark);
}

/* Active filter chip */
.kdh-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  background: var(--teal-pale);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--teal-dark);
}
.kdh-chip__remove {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}
.kdh-chip__remove:hover { color: var(--coral); }

/* ── Breadcrumbs ────────────────────────────────────────────────────── */
.kdh-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.kdh-breadcrumb a {
  transition: color 0.15s;
}
.kdh-breadcrumb a:hover { color: var(--teal-mid); }
.kdh-breadcrumb__current {
  font-weight: 500;
  color: var(--text-dark);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.kdh-hero {
  border-bottom: 1px solid var(--border-lighter);
  background: var(--white);
}
.kdh-hero__grid {
  display: grid;
  gap: 2rem;
  padding: 2rem 0;
}
@media (min-width: 1024px) {
  .kdh-hero__grid {
    grid-template-columns: 1fr 1fr;
    padding: 3rem 0;
  }
}
.kdh-hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.kdh-hero__eyebrow {
  margin-bottom: 0.75rem;
}
.kdh-hero__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}
@media (min-width: 640px) { .kdh-hero__title { font-size: 2.25rem; } }
@media (min-width: 1024px) { .kdh-hero__title { font-size: 2.75rem; } }
.kdh-hero__title strong { color: var(--teal-dark); }
.kdh-hero__subtitle {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-mid);
  max-width: 32rem;
  margin-bottom: 1.5rem;
}
.kdh-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero stats */
.kdh-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-lighter);
}
.kdh-hero-stat__number {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal-dark);
}
.kdh-hero-stat__label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* Hero rail (recently added) */
.kdh-hero-rail {
  display: none;
}
@media (min-width: 1024px) { .kdh-hero-rail { display: flex; align-items: center; } }
.kdh-hero-rail__panel {
  width: 100%;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--teal-dark);
  border-radius: 1rem;
  padding: 1.5rem;
}
@media (min-width: 1024px) { .kdh-hero-rail__panel { padding: 2rem; } }
.kdh-hero-rail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.kdh-hero-rail__label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-light);
}
.kdh-hero-rail__count {
  font-size: 0.75rem;
  color: rgba(225,245,238,.5);
}
.kdh-hero-rail__body { flex: 1; }
.kdh-hero-rail__domain {
  display: inline-block;
  border-radius: 9999px;
  background: rgba(29,158,117,.2);
  padding: 0 0.5rem;
  font-size: 0.75rem;
  color: var(--teal-light);
  margin-bottom: 0.75rem;
}
.kdh-hero-rail__item-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.kdh-hero-rail__item-desc {
  font-size: 0.875rem;
  color: rgba(225,245,238,.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}
.kdh-hero-rail__item-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: rgba(225,245,238,.5);
}

/* Mobile recently-added card (replaces hidden rail below 1024px) */
.kdh-hero-mobile-recent {
  display: block;
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--teal-dark);
  border-radius: 0.75rem;
}
@media (min-width: 1024px) { .kdh-hero-mobile-recent { display: none; } }
.kdh-hero-mobile-recent__label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-light);
  margin-bottom: 0.5rem;
}
.kdh-hero-mobile-recent__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--white);
  margin-bottom: 0.25rem;
}
.kdh-hero-mobile-recent__desc {
  font-size: 0.8125rem;
  color: rgba(225,245,238,.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.kdh-hero-mobile-recent__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.6875rem;
  color: rgba(225,245,238,.5);
}
.kdh-hero-mobile-recent__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--teal-light);
  text-decoration: none;
  margin-top: 0.5rem;
}

/* Dots */
.kdh-hero-rail__dots {
  display: flex;
  gap: 0.375rem;
  margin-top: 1rem;
}
.kdh-hero-rail__dot {
  height: 0.375rem;
  border-radius: 9999px;
  background: rgba(255,255,255,.2);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}
.kdh-hero-rail__dot--active {
  width: 1.5rem;
  background: var(--teal-light);
}
.kdh-hero-rail__dot:not(.kdh-hero-rail__dot--active) {
  width: 0.375rem;
}

/* ── Search Bar ─────────────────────────────────────────────────────── */
.kdh-search-section {
  border-bottom: 1px solid var(--border-lighter);
  background: var(--white);
  padding: 1.5rem 0;
}
.kdh-search__inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .kdh-search__inner { padding: 0 1.5rem; }
}
.kdh-search__input-wrap {
  position: relative;
}
.kdh-search__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.kdh-search__input {
  width: 100%;
  border: 1.5px solid var(--border-mid);
  border-radius: 0.5rem;
  padding: 0.625rem 0.625rem 0.625rem 2.25rem;
  font-size: 0.75rem;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--surface);
  outline: none;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.kdh-search__input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--teal-mid);
}
.kdh-search__input::placeholder { color: #9ca3af; }

/* Search topic tags */
.kdh-search__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.5rem;
  align-items: center;
}
.kdh-search__topics-label {
  font-size: 0.625rem;
  color: var(--text-muted);
  margin-right: 0.125rem;
}
.kdh-search__topic {
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--teal-mid);
  background: var(--teal-pale);
  padding: 0.1875rem 0.5rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.15s;
}
.kdh-search__topics-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 0.25rem;
}
.kdh-search__topic {
  border-radius: 9999px;
  border: 1px solid var(--border-lighter);
  background: #f9fafb;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-mid);
  transition: all 0.15s;
  cursor: pointer;
}
.kdh-search__topic:hover {
  background: var(--teal-pale);
  color: var(--teal-dark);
}

/* Search dropdown */
.kdh-search__dropdown {
  margin-top: 1rem;
  max-height: 20rem;
  overflow-y: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--border-lighter);
  background: var(--white);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1);
}
.kdh-search__result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f9fafb;
  transition: background 0.15s;
}
.kdh-search__result:last-child { border-bottom: none; }
.kdh-search__result:hover { background: #f9fafb; }
.kdh-search__result-format {
  border-radius: 0.25rem;
  background: var(--teal-pale);
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--teal-mid);
}
.kdh-search__result-title {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kdh-search__result-source {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Sections ───────────────────────────────────────────────────────── */
.kdh-section {
  padding: 2.5rem 0;
}
@media (min-width: 1024px) { .kdh-section { padding: 3.5rem 0; } }
.kdh-section--alt {
  border-top: 1px solid var(--border-lighter);
  border-bottom: 1px solid var(--border-lighter);
  background: var(--white);
}
.kdh-section__header {
  text-align: center;
  margin-bottom: 2rem;
}
.kdh-section__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
@media (min-width: 1024px) { .kdh-section__title { font-size: 1.75rem; } }
.kdh-section__subtitle {
  color: var(--text-mid);
  max-width: 36rem;
  margin: 0 auto;
  font-size: 0.875rem;
}

/* ── Feature Cards ──────────────────────────────────────────────────── */
.kdh-feature-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) { .kdh-feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .kdh-feature-grid { grid-template-columns: repeat(3, 1fr); } }
.kdh-feature-card {
  padding: 1rem;
}
.kdh-feature-card__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  background: var(--teal-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  color: var(--teal-mid);
}
.kdh-feature-card__title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}
.kdh-feature-card__desc {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-mid);
}

/* ── Domain Pills (home) ────────────────────────────────────────────── */
.kdh-domain-pills__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.kdh-domain-pills__title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
@media (min-width: 1024px) { .kdh-domain-pills__title { font-size: 2.25rem; } }
.kdh-domain-pills__subtitle { color: var(--text-mid); }
.kdh-domain-pills__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.kdh-domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid var(--border-lighter);
  background: var(--white);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: all 0.15s;
  text-decoration: none;
}
.kdh-domain-pill:hover {
  border-color: rgba(29,158,117,.3);
  background: var(--teal-pale);
  color: var(--teal-dark);
}
.kdh-domain-pill__count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Dataset Cards ──────────────────────────────────────────────────── */
.kdh-dataset-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .kdh-dataset-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .kdh-dataset-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .kdh-dataset-grid { grid-template-columns: repeat(4, 1fr); } }
.kdh-dataset-grid--list { display: flex; flex-direction: column; gap: 0.5rem; }
.kdh-dataset-card {
  display: flex;
  flex-direction: column;
  padding: 0.875rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border-lighter);
  background: var(--white);
  transition: box-shadow 0.15s;
}
.kdh-dataset-card:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1); }
.kdh-dataset-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}
.kdh-dataset-card__title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}
.kdh-dataset-card__title:hover { color: var(--teal-mid); }
.kdh-dataset-card__source {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}
.kdh-dataset-card__desc {
  font-size: 0.75rem;
  color: var(--text-mid);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.kdh-dataset-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}
.kdh-dataset-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid #f9fafb;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: auto;
}
.kdh-dataset-card__footer-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.kdh-dataset-card__stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.kdh-dataset-card__stat svg { width: 0.8125rem; height: 0.8125rem; }

/* List view dataset card */
.kdh-dataset-card--list {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-lighter);
  background: var(--white);
  transition: box-shadow 0.15s;
  gap: 0.75rem;
}
.kdh-dataset-card--list:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1); }
.kdh-dataset-card--list .kdh-dataset-card__body { flex: 1; min-width: 0; }

/* ── Source File Card ───────────────────────────────────────────────── */
.kdh-source-card {
  padding: 0.875rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border-lighter);
  background: var(--white);
  transition: box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.kdh-source-card:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1); }
.kdh-source-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}
.kdh-source-card__title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.125rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}
.kdh-source-card__title:hover { color: var(--teal-mid); }
.kdh-source-card__filename {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kdh-source-card__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}
.kdh-source-card__stat-number {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--teal-dark);
}
.kdh-source-card__stat-label { font-size: 0.5625rem; color: var(--text-muted); text-transform: uppercase; }
.kdh-source-card__footer {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: auto;
}
.kdh-source-card__footer .kdh-btn { flex: 1; justify-content: center; }

/* ── Domain Cards ───────────────────────────────────────────────────── */
.kdh-domain-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .kdh-domain-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .kdh-domain-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .kdh-domain-grid { grid-template-columns: repeat(4, 1fr); } }
.kdh-domain-card {
  display: flex;
  flex-direction: column;
  padding: 0.875rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border-lighter);
  background: var(--white);
  transition: all 0.15s;
  text-decoration: none;
}
.kdh-domain-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
}
.kdh-domain-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.kdh-domain-card__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  background: var(--teal-pale);
  color: var(--teal-mid);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kdh-domain-card__count {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.kdh-domain-card__name {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.125rem;
  transition: color 0.15s;
}
.kdh-domain-card:hover .kdh-domain-card__name { color: var(--teal-mid); }
.kdh-domain-card__desc {
  font-size: 0.75rem;
  color: var(--text-mid);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.kdh-domain-card__latest {
  margin-top: auto;
  border-top: 1px solid #f9fafb;
  padding-top: 0.5rem;
}
.kdh-domain-card__latest-label {
  font-size: 0.5625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.kdh-domain-card__latest-title {
  font-size: 0.6875rem;
  color: var(--text-mid);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.125rem;
}
.kdh-domain-card__latest-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.5625rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}
.kdh-domain-card__link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--teal-mid);
  margin-top: 0.5rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.kdh-domain-card:hover .kdh-domain-card__link { opacity: 1; }

/* ── Browse Layout ──────────────────────────────────────────────────── */
.kdh-browse {
  display: flex;
  gap: 2rem;
}
.kdh-browse__sidebar {
  display: none;
  width: 16rem;
  flex-shrink: 0;
}
@media (min-width: 1024px) { .kdh-browse__sidebar { display: block; } }
.kdh-browse__sidebar-inner {
  position: sticky;
  top: 6rem;
}
.kdh-browse__main { flex: 1; min-width: 0; }

/* ── Filter Sidebar ────────────────────────────────────────────────── */
.kdh-filters__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-lighter);
  margin-bottom: 1.25rem;
}
.kdh-filters__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
}
.kdh-filters__count {
  border-radius: 9999px;
  background: var(--teal-dark);
  color: var(--white);
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
}
.kdh-filters__clear {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--coral);
  background: none;
  border: none;
  cursor: pointer;
}
.kdh-filters__clear:hover { opacity: 0.8; }

.kdh-filters__section {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-lighter);
}
.kdh-filters__section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  padding: 0;
}
.kdh-filters__section-body { }

.kdh-filters__checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-mid);
  cursor: pointer;
  transition: background 0.15s;
  max-height: 12rem;
  overflow-y: auto;
}
.kdh-filters__checkbox:hover { background: #f9fafb; }
.kdh-filters__checkbox--checked {
  background: var(--teal-pale);
  color: var(--teal-dark);
}
.kdh-filters__checkbox--checked:hover { background: var(--teal-pale); }

/* ── Browse Toolbar ─────────────────────────────────────────────────── */
.kdh-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.kdh-toolbar__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.kdh-toolbar__filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.kdh-toolbar__count {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.kdh-toolbar__count strong {
  font-weight: 600;
  color: var(--text-dark);
}
.kdh-toolbar__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.kdh-toolbar__view-toggle {
  display: flex;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--border-light);
}
.kdh-toolbar__view-btn {
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}
.kdh-toolbar__view-btn:hover { background: #f9fafb; }
.kdh-toolbar__view-btn--active {
  background: var(--teal-pale);
  color: var(--teal-mid);
}
.kdh-toolbar__filter-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  background: var(--teal-pale);
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--teal-mid);
}
.kdh-toolbar__filter-btn:hover { opacity: 0.8; }

/* ── Active Filter Chips ────────────────────────────────────────────── */
.kdh-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.kdh-active-filters__clear {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--coral);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.kdh-active-filters__clear:hover { opacity: 0.8; }

/* ── Pagination ─────────────────────────────────────────────────────── */
.kdh-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-lighter);
}
@media (min-width: 640px) { .kdh-pagination { flex-direction: row; } }
.kdh-pagination__info {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.kdh-pagination__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.kdh-pagination__btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-light);
  background: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: background 0.15s;
}
.kdh-pagination__btn:hover:not(:disabled) { background: #f9fafb; }
.kdh-pagination__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.kdh-pagination__pages {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
@media (min-width: 640px) { .kdh-pagination__pages { display: flex; } }
.kdh-pagination__page {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: none;
  background: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.15s;
}
.kdh-pagination__page:hover { background: #f9fafb; }
.kdh-pagination__page--active {
  background: var(--teal-mid);
  color: var(--white);
}

/* ── Detail Page ────────────────────────────────────────────────────── */
.kdh-detail {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 1024px) { .kdh-detail { flex-direction: row; } }
.kdh-detail__main { flex: 1; min-width: 0; }
.kdh-detail__sidebar { flex-shrink: 0; }
@media (min-width: 1024px) { .kdh-detail__sidebar { width: 16rem; } }

.kdh-detail-header {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border-lighter);
  background: var(--white);
}
@media (min-width: 640px) { .kdh-detail-header { padding: 1.25rem; } }
.kdh-detail-header__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}
.kdh-detail-header__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
@media (min-width: 640px) { .kdh-detail-header__title { font-size: 1.375rem; } }
.kdh-detail-header__source {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.kdh-detail-header__source strong { color: var(--teal-mid); font-weight: 500; }

.kdh-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: var(--surface);
}
@media (min-width: 640px) { .kdh-detail-stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .kdh-detail-stats { grid-template-columns: repeat(6, 1fr); } }
.kdh-detail-stat {
  text-align: center;
}
.kdh-detail-stat__icon {
  color: var(--text-muted);
  width: 1.5rem;
  height: 1.5rem;
  margin: 0 auto 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kdh-detail-stat__icon svg {
  width: 0.875rem;
  height: 0.875rem;
}
.kdh-detail-stat__value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dark);
}
.kdh-detail-stat__label {
  font-size: 0.625rem;
  color: var(--text-muted);
}

/* ── Tabs ───────────────────────────────────────────────────────────── */
.kdh-tabs {
  border-radius: 0.625rem;
  border: 1px solid var(--border-lighter);
  background: var(--white);
  margin-bottom: 0.75rem;
}
.kdh-tabs__nav {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-lighter);
}
.kdh-tabs__tab {
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.kdh-tabs__tab:hover { color: var(--text-mid); border-bottom-color: var(--border-light); }
.kdh-tabs__tab--active {
  color: var(--teal-mid);
  border-bottom-color: var(--teal-mid);
}
.kdh-tabs__panel {
  padding: 1rem;
}
@media (min-width: 640px) { .kdh-tabs__panel { padding: 1.25rem; } }

/* ── Detail Sidebar ─────────────────────────────────────────────────── */
.kdh-sidebar-sticky {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.kdh-sidebar-card {
  padding: 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-lighter);
  background: var(--white);
}
.kdh-sidebar-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.kdh-sidebar-card__title svg { color: var(--teal-mid); }

.kdh-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.kdh-sidebar-actions .kdh-btn { justify-content: center; }

/* API code block */
.kdh-code-block {
  background: var(--text-dark);
  color: #4ade80;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.kdh-code-block__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Metadata table */
.kdh-metadata-table {
  width: 100%;
  font-size: 0.75rem;
  overflow-x: auto;
}
.kdh-metadata-table tr:nth-child(even) { background: var(--surface); }
.kdh-metadata-table tr:nth-child(odd) { background: var(--white); }
.kdh-metadata-table td {
  padding: 0.5rem 0.75rem;
}
.kdh-metadata-table td:first-child {
  font-weight: 500;
  color: var(--text-mid);
  white-space: nowrap;
  width: 25%;
}
.kdh-metadata-table td:last-child {
  color: var(--text-dark);
}

/* ── About Page ─────────────────────────────────────────────────────── */
.kdh-about-hero {
  margin-bottom: 2rem;
}
.kdh-about-hero h1 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
@media (min-width: 1024px) { .kdh-about-hero h1 { font-size: 1.625rem; } }
.kdh-about-hero p {
  font-size: 0.875rem;
  color: var(--text-mid);
  max-width: 42rem;
  line-height: 1.6;
}
.kdh-about-mission {
  background: var(--teal-pale);
  border-radius: 0.625rem;
  padding: 1rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) { .kdh-about-mission { padding: 1.25rem; } }
.kdh-about-mission h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 1rem;
}
.kdh-about-mission p {
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.kdh-about-mission p:last-child { margin-bottom: 0; }
.kdh-about-section {
  margin-bottom: 2rem;
}
.kdh-about-section h2 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.kdh-steps-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) { .kdh-steps-grid { grid-template-columns: repeat(3, 1fr); } }
.kdh-step-card {
  text-align: center;
  padding: 1rem;
}
.kdh-step-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: var(--teal-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  color: var(--teal-mid);
}
.kdh-step-card__number {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: var(--teal-mid);
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
}
.kdh-step-card__title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.375rem;
}
.kdh-step-card__desc {
  font-size: 0.75rem;
  color: var(--text-mid);
  line-height: 1.5;
}

.kdh-status-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) { .kdh-status-grid { grid-template-columns: repeat(3, 1fr); } }
.kdh-status-card {
  padding: 0.875rem;
}
.kdh-status-card__title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.375rem;
}
.kdh-status-card__desc {
  font-size: 0.75rem;
  color: var(--text-mid);
  line-height: 1.5;
}

.kdh-governance-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.kdh-governance-item {
  padding: 0.875rem;
}
.kdh-governance-item__title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}
.kdh-governance-item__desc {
  font-size: 0.75rem;
  color: var(--text-mid);
  line-height: 1.5;
}

/* Contact form */
.kdh-contact-form {
  max-width: 32rem;
}
.kdh-form-group {
  margin-bottom: 0.75rem;
}
.kdh-form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 0.25rem;
}
.kdh-form-label__required { color: var(--coral); }

/* ── CTA Banner ─────────────────────────────────────────────────────── */
.kdh-cta-banner {
  background: var(--teal-dark);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
}
@media (min-width: 1024px) { .kdh-cta-banner { padding: 2rem; } }
.kdh-cta-banner__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}
@media (min-width: 1024px) { .kdh-cta-banner__title { font-size: 1.5rem; } }
.kdh-cta-banner__desc {
  color: rgba(225,245,238,.7);
  max-width: 32rem;
  margin: 0 auto 1.25rem;
  font-size: 0.8125rem;
}
.kdh-cta-banner__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.kdh-cta-banner__actions .kdh-btn--primary { background: var(--teal-light); }
.kdh-cta-banner__actions .kdh-btn--primary:hover { background: rgba(29,158,117,.9); }
.kdh-cta-banner__actions .kdh-btn--ghost {
  border-color: rgba(255,255,255,.3);
  color: var(--white);
}
.kdh-cta-banner__actions .kdh-btn--ghost:hover { background: rgba(255,255,255,.1); }

/* ── Sources Carousel ───────────────────────────────────────────────── */
.kdh-sources-carousel {
  position: relative;
}
.kdh-sources-carousel__scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 0.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.kdh-sources-carousel__scroll::-webkit-scrollbar { display: none; }
.kdh-sources-carousel__item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 1px solid var(--border-lighter);
  background: var(--white);
  padding: 1.25rem 1.5rem;
  transition: box-shadow 0.15s;
}
.kdh-sources-carousel__item:hover { box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.kdh-sources-carousel__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.kdh-sources-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: none;
  border-radius: 9999px;
  border: 1px solid var(--border-light);
  background: var(--white);
  padding: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1);
  color: var(--text-mid);
  transition: background 0.15s;
}
@media (min-width: 768px) { .kdh-sources-carousel__btn { display: flex; } }
.kdh-sources-carousel__btn:hover { background: #f9fafb; }
.kdh-sources-carousel__btn--left { left: -0.75rem; }
.kdh-sources-carousel__btn--right { right: -0.75rem; }
.kdh-sources-carousel__btn--hidden { display: none; }

/* ── Popular Slider ─────────────────────────────────────────────────── */
.kdh-popular {
  position: relative;
}
.kdh-popular__scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 0.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.kdh-popular__scroll::-webkit-scrollbar { display: none; }
.kdh-popular__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: none;
  border-radius: 9999px;
  border: 1px solid var(--border-light);
  background: var(--white);
  padding: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1);
  color: var(--text-mid);
  transition: background 0.15s;
}
@media (min-width: 768px) { .kdh-popular__btn { display: flex; } }
.kdh-popular__btn:hover { background: #f9fafb; }
.kdh-popular__btn--left { left: -0.75rem; }
.kdh-popular__btn--right { right: -0.75rem; }
.kdh-popular__btn--hidden { display: none; }
.kdh-popular .kdh-dataset-card { flex-shrink: 0; }

/* ── Empty State ────────────────────────────────────────────────────── */
.kdh-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  text-align: center;
}
.kdh-empty__icon {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: var(--teal-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--teal-light);
}
.kdh-empty__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.kdh-empty__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 24rem;
  margin-bottom: 1rem;
}

/* ── Skeleton Loading ───────────────────────────────────────────────── */
.kdh-skeleton {
  background: var(--border-lighter);
  border-radius: 0.5rem;
  animation: kdh-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes kdh-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.kdh-skeleton--text { height: 1rem; margin-bottom: 0.5rem; }
.kdh-skeleton--title { height: 1.25rem; width: 75%; margin-bottom: 0.5rem; }
.kdh-skeleton--badge { height: 1.25rem; width: 5rem; border-radius: 9999px; display: inline-block; }
.kdh-skeleton--card {
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-lighter);
  background: var(--white);
}

/* ── Toast ──────────────────────────────────────────────────────────── */
.kdh-toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 24rem;
  pointer-events: none;
}
.kdh-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid;
  font-size: 0.875rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1);
  pointer-events: auto;
  animation: kdh-slide-in 0.25s ease-out;
}
@keyframes kdh-slide-in {
  from { opacity: 0; transform: translateX(2rem); }
  to { opacity: 1; transform: translateX(0); }
}
.kdh-toast--success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.kdh-toast--error {
  background: #fef2f2;
  border-color: rgba(216,90,48,.2);
  color: var(--coral);
}
.kdh-toast--info {
  background: var(--teal-pale);
  border-color: rgba(15,110,86,.2);
  color: var(--teal-mid);
}
.kdh-toast__dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}
.kdh-toast__dismiss:hover { opacity: 1; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.kdh-footer {
  background: var(--teal-dark);
  color: var(--white);
  margin-top: auto;
}
.kdh-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
@media (min-width: 640px) { .kdh-footer__inner { padding: 2rem 1.5rem; } }
@media (min-width: 1024px) {
  .kdh-footer__inner { padding: 2.5rem 2rem; }
}
.kdh-footer__grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .kdh-footer__grid { grid-template-columns: repeat(4, 1fr); }
}
.kdh-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}
.kdh-footer__brand-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kdh-footer__logo {
  display: block;
  height: 4.5rem;
  width: auto;
  margin-bottom: 1rem;
}
.kdh-footer__brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}
.kdh-footer__brand-name span { color: var(--teal-light); }
.kdh-footer__desc {
  font-size: 0.875rem;
  color: rgba(225,245,238,.7);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.kdh-footer__social {
  display: flex;
  gap: 0.75rem;
}
.kdh-footer__social-link {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background 0.15s;
}
.kdh-footer__social-link:hover { background: rgba(255,255,255,.2); }
.kdh-footer__heading {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--teal-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.kdh-footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.kdh-footer__links a,
.kdh-footer__links li {
  font-size: 0.875rem;
  color: rgba(225,245,238,.7);
  transition: color 0.15s;
}
.kdh-footer__links a:hover { color: var(--white); }
.kdh-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 0.875rem;
  color: rgba(225,245,238,.5);
}
@media (min-width: 640px) { .kdh-footer__bottom { flex-direction: row; } }
.kdh-footer__bottom-links {
  display: flex;
  gap: 1.5rem;
}
.kdh-footer__bottom-links a {
  font-size: 0.75rem;
  color: rgba(225,245,238,.5);
  transition: color 0.15s;
}
.kdh-footer__bottom-links a:hover { color: var(--white); }

/* ── Mobile Filter Overlay ──────────────────────────────────────────── */
.kdh-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,.3);
}
.kdh-overlay--open { display: block; }
.kdh-mobile-filters {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 18rem;
  z-index: 50;
  background: var(--white);
  padding: 1.25rem;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  transform: translateX(-100%);
  transition: transform 0.2s;
}
.kdh-mobile-filters--open { transform: translateX(0); }

/* Show filter button on mobile, hide inline controls */
@media (max-width: 1023px) {
  .kdh-toolbar__filter-btn { display: inline-flex !important; }
  .kdh-mobile-filter-controls { display: none; }
}

/* ── Tabs (standalone script) ───────────────────────────────────────── */
.kdh-tabs__panel:not(.kdh-tabs__panel--active) { display: none; }

/* ── Footer status dot ──────────────────────────────────────────────── */
.kdh-footer__status-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #4ade80;
  margin-right: 0.375rem;
}

/* ── Domain badge icon (svg fallback) ───────────────────────────────── */
.kdh-domain-icon {
  display: inline-flex;
  align-items: center;
}

/* ── Override link defaults ─────────────────────────────────────────── */
a.kdh-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ── File Format Icon colors ────────────────────────────────────────── */
.kdh-format-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kdh-format-icon--csv { color: #16a34a; }
.kdh-format-icon--json { color: #7c3aed; }
.kdh-format-icon--pdf { color: #dc2626; }
.kdh-format-icon--xlsx { color: #2563eb; }
.kdh-format-icon--shp { color: #ea580c; }
.kdh-format-icon--zip { color: #ca8a04; }

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

/* ── Desktop Typography Scale-up ───────────────────────────────────── */
@media (min-width: 1024px) {
  .kdh-hero__subtitle { font-size: 1.0625rem; }
  .kdh-section__subtitle { font-size: 1rem; }
  .kdh-feature-card__title { font-size: 1.0625rem; }
  .kdh-feature-card__desc { font-size: 0.875rem; }
  .kdh-cta-banner__desc { font-size: 0.9375rem; }
  .kdh-btn { font-size: 0.8125rem; }
  .kdh-btn--lg { font-size: 0.875rem; }
  .kdh-hero-stat__number { font-size: 1.375rem; }
  .kdh-hero-stat__label { font-size: 0.75rem; }
  .kdh-section__title { font-size: 2rem; }
  .kdh-domain-pills__title { font-size: 2.5rem; }
  .kdh-cta-banner__title { font-size: 1.75rem; }
  .kdh-nav__cta { padding: 0.625rem 1.5rem; }
}

