:root {
  --navy-950: #03152d;
  --navy-900: #061f3c;
  --navy-800: #082d52;
  --navy-700: #0b416f;
  --blue: #1463d6;
  --blue-dark: #0e4fae;
  --gold: #d5aa45;
  --gold-light: #f4cf78;
  --green: #178653;
  --red: #b42318;
  --ink: #172a3d;
  --muted: #66788b;
  --subtle: #8796a6;
  --surface: #ffffff;
  --surface-blue: #f2f7fd;
  --background: #edf2f7;
  --line: #d8e1eb;
  --sidebar: 272px;
  --topbar: 68px;
  --shadow-sm: 0 3px 12px rgba(3, 21, 45, 0.06);
  --shadow-md: 0 18px 48px rgba(3, 21, 45, 0.13);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Bengali", sans-serif;
  line-height: 1.5;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid rgba(20, 99, 214, 0.28);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 10px;
  z-index: 1000;
  transform: translateY(-160%);
  border-radius: 8px;
  background: #fff;
  color: var(--navy-950);
  padding: 9px 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}
.skip-link:focus { transform: none; }

.app-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 16px 14px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 88%, rgba(20, 99, 214, 0.22), transparent 29%),
    linear-gradient(180deg, var(--navy-950), #042546 58%, #031a35);
  border-right: 1px solid rgba(213, 170, 69, 0.28);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 6px 16px;
  color: #bed0e3;
  font-size: 0.72rem;
  font-weight: 750;
  text-decoration: none;
}
.back-link:hover { color: var(--gold-light); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 23px;
  color: #fff;
  text-decoration: none;
}
.brand img {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 13px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.24);
}
.brand span { min-width: 0; }
.brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  color: #fff;
  font-size: 1.13rem;
  line-height: 1.15;
}
.brand small {
  display: block;
  margin-top: 4px;
  color: var(--gold-light);
  font-size: 0.64rem;
  line-height: 1.35;
}

.nav-label {
  margin: 0;
  padding: 4px 10px 6px;
  color: #7894b0;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.primary-nav { display: grid; gap: 3px; }
.nav-button {
  width: 100%;
  min-height: 43px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #d5e2ef;
  padding: 8px 10px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 720;
  cursor: pointer;
}
.nav-button:hover { background: rgba(255, 255, 255, 0.075); color: #fff; }
.nav-button.active {
  border-color: rgba(78, 158, 246, 0.35);
  background: linear-gradient(90deg, #0e5cb8, #0b4c8f);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--gold-light), 0 8px 18px rgba(0, 0, 0, 0.14);
}
.nav-icon {
  width: 24px;
  text-align: center;
  color: #c9d9e9;
  font-size: 1.08rem;
}
.nav-button.active .nav-icon { color: var(--gold-light); }
.nav-count {
  min-width: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #cfe0f1;
  padding: 2px 6px;
  text-align: center;
  font-size: 0.62rem;
}

.directory-status {
  margin-top: auto;
  border: 1px solid rgba(213, 170, 69, 0.28);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.055);
  padding: 12px;
}
.status-heading { display: flex; align-items: center; gap: 8px; }
.status-heading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #31c67b;
  box-shadow: 0 0 0 4px rgba(49, 198, 123, 0.12);
}
.status-heading strong { font-size: 0.73rem; }
.directory-status dl { margin: 10px 0 0; }
.directory-status dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.directory-status dt { color: #94acc4; font-size: 0.65rem; }
.directory-status dd { margin: 0; color: #fff; font-size: 0.67rem; font-weight: 800; }
.sidebar-note { margin: 12px 5px 0; color: #8fa9c2; font-size: 0.62rem; line-height: 1.5; }

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  border: 0;
  background: rgba(2, 15, 31, 0.64);
  backdrop-filter: blur(3px);
}

.app-stage { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}
.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy-900);
  cursor: pointer;
}
.location { display: grid; }
.location span { color: var(--subtle); font-size: 0.63rem; }
.location strong { color: var(--navy-900); font-size: 1rem; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #c8ddcf;
  border-radius: 999px;
  background: #f2fbf5;
  color: #267049;
  padding: 6px 10px;
  font-size: 0.67rem;
  font-weight: 800;
}
.local-badge i { width: 7px; height: 7px; border-radius: 50%; background: #22a865; }
.language-switch {
  display: flex;
  padding: 3px;
  border: 1px solid #cbd7e4;
  border-radius: 10px;
  background: #f3f6f9;
}
.language-switch button {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #607387;
  padding: 5px 11px;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}
.language-switch button.active { background: var(--navy-900); color: #fff; box-shadow: var(--shadow-sm); }

main { max-width: 1540px; margin: 0 auto; padding: 22px 24px 0; }
.hero {
  position: relative;
  min-height: 292px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  align-items: center;
  gap: 36px;
  border: 1px solid rgba(213, 170, 69, 0.36);
  border-radius: 22px;
  padding: 40px 42px 64px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(3, 21, 45, 0.98), rgba(4, 41, 76, 0.93)),
    repeating-linear-gradient(135deg, transparent 0 26px, rgba(255, 255, 255, 0.035) 26px 28px);
  box-shadow: var(--shadow-md);
}
.hero::before {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  right: -190px;
  top: -260px;
  border: 1px solid rgba(244, 207, 120, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 0 65px rgba(244, 207, 120, 0.025), 0 0 0 130px rgba(244, 207, 120, 0.018);
}
.hero::after {
  content: "BD";
  position: absolute;
  right: 32px;
  bottom: -54px;
  color: rgba(255, 255, 255, 0.035);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13rem;
  font-weight: 900;
  line-height: 1;
}
.hero-copy, .hero-proof { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 9px;
  color: var(--gold-light);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 4.6vw, 4.55rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
}
.hero-copy > p:last-child { max-width: 750px; margin: 15px 0 0; color: #c3d4e4; font-size: 0.91rem; }
.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid rgba(244, 207, 120, 0.3);
  border-radius: 16px;
  background: rgba(3, 21, 45, 0.55);
  backdrop-filter: blur(8px);
}
.hero-proof article { min-width: 0; padding: 18px 12px; text-align: center; }
.hero-proof article + article { border-left: 1px solid rgba(255, 255, 255, 0.12); }
.hero-proof strong { display: block; color: var(--gold-light); font-size: 1.36rem; line-height: 1.2; }
.hero-proof span { display: block; margin-top: 5px; color: #b8cce0; font-size: 0.61rem; line-height: 1.35; }

.search-card {
  position: relative;
  z-index: 5;
  margin: -38px 18px 0;
  border: 1px solid #d3dde8;
  border-radius: 17px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 18px 44px rgba(3, 21, 45, 0.16);
}
.search-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.search-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e9f2ff;
  color: var(--blue);
  font-size: 1.25rem;
  font-weight: 900;
}
.search-heading h2 { margin: 0; color: var(--navy-900); font-size: 1.05rem; }
.search-heading p { margin: 1px 0 0; color: var(--muted); font-size: 0.72rem; }
#searchForm { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.combobox-wrap { position: relative; min-width: 0; }
#directorySearch {
  width: 100%;
  min-height: 54px;
  border: 1px solid #b9c9da;
  border-radius: 11px;
  background: #fbfcfe;
  color: var(--ink);
  padding: 12px 46px 12px 15px;
  outline: 0;
  font-size: 0.9rem;
}
#directorySearch:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(20, 99, 214, 0.11); background: #fff; }
.clear-search {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: #edf2f7;
  color: #607387;
  font-size: 1.2rem;
  cursor: pointer;
}
.search-submit {
  min-width: 160px;
  min-height: 54px;
  border: 1px solid var(--blue);
  border-radius: 11px;
  background: linear-gradient(180deg, #1a6ad8, #1058bc);
  color: #fff;
  padding: 10px 18px;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(20, 99, 214, 0.19);
}
.search-submit:hover { background: var(--blue-dark); }
.suggestion-panel {
  position: absolute;
  z-index: 100;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: min(480px, 60vh);
  overflow-y: auto;
  border: 1px solid #bdcad8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(3, 21, 45, 0.2);
}
.suggestion-summary { padding: 9px 12px; border-bottom: 1px solid #e5ebf1; color: var(--muted); font-size: 0.65rem; font-weight: 750; }
.suggestion-option {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}
.suggestion-option:last-child { border-bottom: 0; }
.suggestion-option:hover, .suggestion-option.active { background: #edf5ff; }
.suggestion-option .suggestion-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: #eef3f8; font-size: 1.05rem; }
.suggestion-option strong { display: block; color: var(--navy-900); font-size: 0.77rem; }
.suggestion-option small { display: block; margin-top: 1px; color: var(--muted); font-size: 0.64rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-type { border-radius: 999px; padding: 4px 7px; background: #eaf7ef; color: #247047; font-size: 0.56rem; font-weight: 850; }
.suggestion-type.independent { background: #eef2f6; color: #637488; }
.quick-searches { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.quick-searches span { color: var(--muted); font-size: 0.66rem; }
.quick-searches button {
  border: 1px solid #d6e0eb;
  border-radius: 999px;
  background: #f6f9fc;
  color: #34516e;
  padding: 5px 9px;
  font-size: 0.63rem;
  font-weight: 730;
  cursor: pointer;
}
.quick-searches button:hover { border-color: #91b4de; background: #edf5ff; }
.search-boundary {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 12px 0 0;
  border: 1px solid #bfd4ed;
  border-radius: 8px;
  background: #f4f8fe;
  color: #496783;
  padding: 8px 10px;
  font-size: 0.65rem;
}
.search-boundary > span:first-child { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 900; }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.trust-strip article { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 14px; }
.trust-strip article + article { border-left: 1px solid var(--line); }
.trust-strip b { color: var(--gold); font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; }
.trust-strip strong { display: block; color: var(--navy-900); font-size: 0.73rem; }
.trust-strip small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.61rem; line-height: 1.4; }

.directory-section { margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 20px; box-shadow: var(--shadow-sm); }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.section-kicker { margin: 0; color: var(--blue); font-size: 0.64rem; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; }
.section-header h2 { margin: 2px 0 3px; color: var(--navy-900); font-size: 1.35rem; line-height: 1.2; }
.section-header p:last-child { margin: 0; color: var(--muted); font-size: 0.73rem; }
.result-total { flex: 0 0 auto; border: 1px solid #cbd8e5; border-radius: 999px; background: #f5f8fb; color: #54697e; padding: 6px 10px; font-size: 0.65rem; font-weight: 800; }

.category-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.category-button {
  min-height: 105px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  padding: 12px;
  text-align: left;
  cursor: pointer;
}
.category-button:hover { transform: translateY(-2px); border-color: #9bbbe0; box-shadow: var(--shadow-sm); }
.category-button .category-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #eaf2fc; font-size: 1rem; }
.category-button strong { margin-top: 8px; color: var(--navy-900); font-size: 0.68rem; line-height: 1.3; }
.category-button small { margin-top: auto; color: var(--blue); font-size: 0.58rem; font-weight: 780; }

.filter-bar {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(170px, 0.8fr) auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 13px;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  background: #f8fafc;
  padding: 11px;
}
.filter-bar label:not(.official-toggle) { display: grid; gap: 4px; }
.filter-bar label > span:first-child { color: #607488; font-size: 0.62rem; font-weight: 800; }
.filter-bar select { min-height: 39px; border: 1px solid #c5d1de; border-radius: 8px; background: #fff; color: #2d455d; padding: 6px 9px; font-size: 0.7rem; }
.official-toggle { min-height: 39px; display: flex; align-items: center; gap: 8px; padding: 0 5px; cursor: pointer; }
.official-toggle input { width: 17px; height: 17px; accent-color: var(--blue); }
.official-toggle span { font-size: 0.68rem !important; }
.reset-filters { min-height: 39px; border: 1px solid #aebfd0; border-radius: 8px; background: #fff; color: var(--blue-dark); padding: 7px 11px; font-size: 0.68rem; font-weight: 800; cursor: pointer; }

.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.result-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  padding: 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.result-card:hover { border-color: #9bb9db; box-shadow: 0 8px 22px rgba(3, 21, 45, 0.07); }
.result-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 11px; background: #eef3f8; font-size: 1.18rem; }
.result-content { min-width: 0; }
.result-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.result-title-row h3 { margin: 0; color: var(--navy-900); font-size: 0.84rem; line-height: 1.3; }
.result-title-row h3 small { display: block; margin-top: 2px; color: #657a8f; font-size: 0.67rem; font-weight: 650; }
.save-button { width: 33px; height: 33px; flex: 0 0 auto; border: 1px solid #ccd8e4; border-radius: 8px; background: #fff; color: #536b82; cursor: pointer; font-size: 1rem; }
.save-button.saved { border-color: #e4c474; background: #fff9e9; color: #9a6b00; }
.result-description { margin: 7px 0 9px; color: var(--muted); font-size: 0.68rem; line-height: 1.5; }
.result-footer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.source-badge { border-radius: 999px; background: #e8f6ee; color: #267049; padding: 4px 7px; font-size: 0.55rem; font-weight: 850; }
.source-badge.independent { background: #eef2f6; color: #627386; }
.category-badge { border-radius: 999px; background: #edf4fd; color: #3f668f; padding: 4px 7px; font-size: 0.55rem; font-weight: 760; text-transform: capitalize; }
.source-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  padding: 5px 9px;
  font-size: 0.59rem;
  font-weight: 850;
  text-decoration: none;
}
.source-link:hover { background: var(--blue-dark); }
.empty-state { grid-column: 1 / -1; border: 1px dashed #bdcad8; border-radius: 13px; background: #fbfcfd; padding: 44px 20px; text-align: center; }
.empty-state strong { display: block; color: var(--navy-900); }
.empty-state p { max-width: 520px; margin: 5px auto 0; color: var(--muted); font-size: 0.72rem; }

.coverage-panel { display: grid; gap: 13px; }
.coverage-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.coverage-metric { border: 1px solid var(--line); border-radius: 11px; background: #f8fafc; padding: 13px; }
.coverage-metric strong { display: block; color: var(--navy-900); font-size: 1.45rem; }
.coverage-metric span { display: block; margin-top: 2px; color: var(--muted); font-size: 0.62rem; }
.coverage-note { border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; background: #fff9e9; color: #684e17; padding: 12px 14px; }
.coverage-note strong { font-size: 0.76rem; }
.coverage-note p { margin: 4px 0 0; font-size: 0.68rem; }
.root-list { display: grid; gap: 8px; }
.root-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 11px 12px; }
.root-row strong { display: block; color: var(--navy-900); font-size: 0.73rem; }
.root-row p { margin: 2px 0 0; color: var(--muted); font-size: 0.63rem; }
.root-status { display: inline-flex; align-items: center; gap: 6px; color: #267049; font-size: 0.61rem; font-weight: 820; text-transform: capitalize; }
.root-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2ab06b; }
.root-status.pending { color: #8a6100; }
.root-status.pending::before { background: #d6a11f; }

footer {
  display: grid;
  grid-template-columns: auto minmax(300px, 780px);
  justify-content: space-between;
  gap: 28px;
  margin: 22px -24px 0;
  border-top: 1px solid rgba(213, 170, 69, 0.28);
  background: var(--navy-950);
  color: #b4c6d8;
  padding: 24px;
}
footer strong { display: block; color: #fff; font-family: Georgia, "Times New Roman", serif; }
footer span, footer p { font-size: 0.65rem; }
footer p { margin: 0; text-align: right; }

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: calc(22px + var(--safe-bottom));
  max-width: min(460px, calc(100vw - 28px));
  transform: translate(-50%, 22px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(244, 207, 120, 0.35);
  border-radius: 10px;
  background: var(--navy-900);
  color: #fff;
  padding: 10px 13px;
  box-shadow: var(--shadow-md);
  font-size: 0.71rem;
  transition: 0.2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1240px) {
  :root { --sidebar: 242px; }
  .hero { grid-template-columns: 1fr; gap: 23px; padding-bottom: 70px; }
  .hero-proof { max-width: 620px; }
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); width: min(290px, 88vw); transition: transform 0.22s ease; box-shadow: 18px 0 50px rgba(0, 0, 0, 0.28); }
  .sidebar.open { transform: none; }
  .menu-button { display: grid; place-items: center; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .trust-strip article:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .trust-strip article:nth-child(4) { border-top: 1px solid var(--line); }
  .results { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .coverage-metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .topbar { min-height: 58px; padding: 8px 12px; }
  .location span, .local-badge { display: none; }
  .location strong { font-size: 0.85rem; }
  .language-switch button { min-height: 30px; padding: 4px 8px; font-size: 0.62rem; }
  main { padding: 12px 11px 0; }
  .hero { min-height: 0; border-radius: 15px; padding: 27px 18px 62px; }
  .hero h1 { font-size: clamp(2rem, 10vw, 3.2rem); }
  .hero-copy > p:last-child { font-size: 0.78rem; }
  .hero-proof { grid-template-columns: 1fr; }
  .hero-proof article { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px; text-align: left; }
  .hero-proof article + article { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
  .hero-proof span { margin: 0; text-align: right; }
  .search-card { margin: -42px 7px 0; padding: 14px; }
  #searchForm { grid-template-columns: 1fr; }
  .search-submit { min-height: 46px; }
  .search-heading h2 { font-size: 0.93rem; }
  .suggestion-option { grid-template-columns: 34px minmax(0, 1fr); }
  .suggestion-type { grid-column: 2; justify-self: start; }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-strip article + article { border-left: 0; border-top: 1px solid var(--line); }
  .directory-section { padding: 14px; }
  .section-header { align-items: flex-start; flex-direction: column; gap: 9px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: 1fr; }
  .official-toggle { min-height: 34px; }
  .result-card { grid-template-columns: 38px minmax(0, 1fr); padding: 11px; }
  .result-icon { width: 38px; height: 38px; }
  .result-title-row { gap: 6px; }
  .result-footer { align-items: flex-start; }
  .source-link { width: 100%; margin: 4px 0 0; }
  footer { grid-template-columns: 1fr; margin: 18px -11px 0; padding: 20px 14px; gap: 10px; }
  footer p { text-align: left; }
}

@media (max-width: 390px) {
  .language-switch button:first-child { font-size: 0; }
  .language-switch button:first-child::after { content: "EN"; font-size: 0.62rem; }
  .category-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .category-button { min-height: 98px; padding: 10px; }
  .coverage-metrics { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
