.frontpage { --shadow: 0 5px 22px #17324d06; }
.frontpage .p-header { margin-bottom: 0; }
.frontpage .p-header .page-wrap { gap: 24px; }
.brand-caption { max-width: 350px; color: #e0edf8; font-size: 13px; line-height: 1.5; }
.header-nav { display: flex; gap: 28px; margin-left: auto; flex-shrink: 0; }
.header-nav a { color: #fff; font-size: 13px; text-decoration: none; padding: 8px 0; border-bottom: 1px solid #ffffff50; }
.home-intro { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-top: 42px; padding-bottom: 28px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .15em; color: #60839d; margin: 0 0 10px; }
.home-intro h1 { font-size: clamp(28px, 3vw, 42px); font-weight: 700; margin: 0 0 12px; }
.intro-copy { color: var(--muted); margin: 0; font-size: 15px; }
.home-map-link { display: flex; gap: 24px; align-items: center; white-space: nowrap; background: var(--blue); color: #fff; text-decoration: none !important; border-radius: 9px; padding: 13px 20px; font-size: 14px; }
.home-map-link:hover { background: #0b548c; }
.home-map-link span { font-size: 21px; }
.home-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 30px; }
.stat-card { display: grid; gap: 6px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.stat-card > span { font-size: 13px; color: #5c7489; }
.stat-card strong { font-size: clamp(25px, 2.6vw, 34px); line-height: 1.3; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-card:first-child { border-top: 3px solid #177bb7; padding-top: 20px; }
.stat-card small { font-size: 11px; color: #8999a7; }
.section-kicker { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .025em; color: #728699; }
.frontpage .cat-icons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 0 0 28px; overflow: visible; }
.frontpage .cat-icons .cat-item { gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 0; transition: background .15s, border-color .15s; box-shadow: none; }
.frontpage .cat-icons .cat-item:hover { background: #f0f7fd; border-color: #93bbdb; }
.frontpage .cat-icons .cat-item.is-active { border-color: #1976b5; background: #eaf4fc; box-shadow: inset 0 0 0 1px #1976b5; }
.frontpage .cat-icons .cat-item div { flex: 0 0 36px; width: 36px; height: 36px; line-height: 36px; border-radius: 10px; }
.frontpage .cat-icons .cat-item span { flex: 1; font-size: 12px; line-height: 1.4; }
.frontpage .cat-icons .cat-item b { font-size: 19px; font-weight: 650; line-height: 1.4; }
.frontpage .cat-icons .cat-item i:before { font-size: 21px; margin-left: 0; }
.filter-panel { background: var(--green-bg); border: 1px solid var(--green-line); border-radius: 14px; overflow: hidden; margin-bottom: 26px; }
.filter-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; list-style: none; cursor: pointer; font-size: 15px; font-weight: 600; }
.filter-panel > summary::-webkit-details-marker { display: none; }
.filter-panel summary small { margin-left: 10px; color: #628570; font-weight: 400; font-size: 12px; }
.filter-chevron { color: #628570; transition: transform .2s; }
.filter-panel[open] .filter-chevron { transform: rotate(180deg); }
.frontpage .p-filter { background: none; color: var(--ink); padding: 0 22px 18px; border-radius: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; font-size: 14px; }
.frontpage .p-filter .header { display: block; font-size: 12px; font-weight: 500; color: #557262; margin: 0 0 7px; }
.frontpage .p-filter select { height: 43px; min-width: 0; }
.frontpage .p-filter .sflex { gap: 10px; }
.frontpage .p-filter .sflex div { font-size: 12px; color: #6a8171; }
.filter-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 22px 18px; }
#home-load-status { color: #628570; font-size: 12px; }
#home-reset { width: auto; padding: 7px 15px; color: #356548; border-color: #bdd5c5; background: #fff; font-size: 12px; }
.map-section { scroll-margin-top: 20px; }
.map-toolbar { padding: 18px 22px; background: #fff; border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.map-toolbar h2 { font-size: 18px; margin: 0 0 3px; }
#map-region-name { font-size: 12px; color: var(--muted); }
#map-expand { width: auto; border: 1px solid var(--line); background: #f7f9fb; padding: 8px 12px; font-size: 12px; }
#map-expand span { margin-left: 8px; }
.frontpage .maps { height: 490px; border: 1px solid var(--line); }
.map-section.is-expanded .maps { height: 78vh; }
.map-legend { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-top: 0; padding: 12px 22px; border-radius: 0 0 14px 14px; font-size: 11px; color: var(--muted); }
.map-legend > span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.legend-dot.online { background: #26a36e; }
.legend-dot.offline { background: #dc6c62; }
.map-legend a { margin-left: auto; color: var(--blue); text-decoration: none; }
.frontpage .leaflet-right .leaflet-control { background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 8px #17324d1a; border-radius: 6px; }
.object-results { padding-top: 34px; scroll-margin-top: 16px; }
.results-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.results-toolbar .section-kicker { margin-bottom: 5px; }
.results-toolbar h2 { font-size: 23px; margin: 0; }
#results-count { font-size: 13px; margin-left: 8px; vertical-align: middle; background: #e5edf5; border-radius: 20px; padding: 4px 10px; }
.object-search { width: min(100%, 340px); font-size: 11px; color: #678095; }
.object-search > span { display: block; margin-bottom: 5px; }
.object-search input { width: 100%; border-radius: 9px; }
.objects-table-wrap { overflow-x: auto; border: 1px solid var(--line); background: #fff; border-radius: 12px; }
.frontpage .objects-table { margin: 0; background: #fff; font-size: 13px; }
.frontpage .objects-table tr.head { background: #edf3f8; }
.frontpage .objects-table thead td { position: sticky; top: 0; background: #edf3f8; z-index: 1; font-size: 10px; line-height: 1.6; font-weight: 600; text-align: right; color: #5b7286; text-transform: uppercase; letter-spacing: .025em; }
.frontpage .objects-table thead td:first-child { text-align: left; width: 39%; }
.frontpage .objects-table td { border: 0; border-bottom: 1px solid #e8eef3; padding: 18px 20px; font-variant-numeric: tabular-nums; }
.frontpage .objects-table tbody td:not(:first-child) { white-space: nowrap; }
.frontpage .objects-table tbody tr:not(.b):hover { background: #f4f9fd; }
.frontpage .objects-table tbody .b { background: #f3f8fc; color: #244c6c; }
.frontpage #vtable td span { display: inline; }
.frontpage #vtable td:first-child > span { display: inline-block; line-height: 1.7; color: #234b6b; }
.frontpage #vtable span i, .frontpage #vtable span b, .frontpage #vtable span s { width: 6px; height: 6px; vertical-align: middle; }
#object-results-status { font-size: 12px; color: var(--muted); margin: 14px 2px; }
#object-table-more { display: block; width: auto; min-width: 220px; margin: 18px auto; border: 1px solid #c8dbe9; background: #fff; color: var(--blue); padding: 12px 22px; }
#object-table-more[hidden] { display: none; }
.frontpage .anti-corruption-block { padding: 18px; background: #ffffff08; border-color: #ffffff20; border-radius: 10px; }
@media (min-width: 1500px) { .frontpage .p-filter { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 1000px) { .brand-caption { font-size: 11px; max-width: 280px; } .header-nav { gap: 15px; } .frontpage .cat-icons .cat-item { padding: 12px; gap: 8px; } }
@media (max-width: 760px) {
  .brand-caption { flex: 1; max-width: none; font-size: 10px; }
  .header-nav { display: none; }
  .frontpage .p-top .page-wrap > span:first-child { display: none; }
  .frontpage .p-header .page-wrap { flex-wrap: nowrap; gap: 16px; }
  .home-intro { padding-top: 28px; padding-bottom: 20px; }
  .home-intro h1 { font-size: 30px; }
  .intro-copy { font-size: 13px; max-width: 360px; }
  .home-map-link { display: none; }
  .home-stats { gap: 8px; margin-bottom: 24px; }
  .stat-card { padding: 14px 12px; gap: 6px; }
  .stat-card:first-child { padding-top: 12px; }
  .stat-card > span { font-size: 10px; min-height: 30px; }
  .stat-card strong { font-size: 22px; }
  .stat-card small { display: none; }
  .frontpage .cat-icons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
  .frontpage .cat-icons .cat-item span { font-size: 11px; }
  .frontpage .cat-icons .cat-item b { font-size: 18px; }
  .frontpage .p-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 16px 16px; gap: 14px; }
  .filter-panel > summary { padding: 16px; }
  .filter-actions { padding: 0 16px 16px; }
  .map-toolbar { padding: 16px; }
  .map-toolbar h2 { font-size: 16px; }
  #map-expand { font-size: 11px; padding: 8px; }
  .frontpage .maps { height: 390px; }
  .map-legend { gap: 12px; padding: 12px 16px; }
  .object-results { padding-top: 26px; }
  .results-toolbar { flex-direction: column; align-items: stretch; gap: 14px; }
  .object-search { width: 100%; }
  .objects-table-wrap { border: 0; background: none; overflow: visible; }
  .frontpage .objects-table, .frontpage .objects-table tbody { display: block; background: none; }
  .frontpage .objects-table thead { display: none; }
  .frontpage .objects-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
  .frontpage .objects-table td { display: block; padding: 12px 16px; text-align: left; font-size: 14px; }
  .frontpage .objects-table td:first-child { grid-column: 1 / -1; font-size: 14px; }
  .frontpage .objects-table tbody td:not(:first-child) { white-space: normal; overflow-wrap: anywhere; }
  .frontpage .objects-table td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 10px; color: var(--muted); line-height: 1.5; margin-bottom: 4px; font-weight: 400; }
  .frontpage .objects-table td:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 420px) { .stat-card strong { font-size: 18px; letter-spacing: -.04em; } .stat-card { padding-left: 9px; padding-right: 9px; } .brand-caption { font-size: 9px; } .p-logo img { height: 38px; } .map-legend a { width: 100%; margin: 0; } }
@media (max-width: 420px) {
  .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-width: 0; padding: 14px; }
  .stat-card:first-child { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; padding: 12px 14px; }
  .stat-card:first-child > span { min-height: 0; }
  .stat-card:first-child strong { font-size: 26px; }
  .stat-card strong { font-size: 20px; }
}

/* Keep the selection panel compact beside the map. */
.filter-panel { margin-bottom: 18px; border-radius: 10px; }
.filter-panel > summary { padding: 11px 16px; font-size: 13px; }
.frontpage .p-filter { padding: 0 16px 10px; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 12px; }
.frontpage .p-filter .header { font-size: 11px; margin-bottom: 4px; }
.frontpage .p-filter select { height: 34px; padding: 5px 8px; font-size: 12px; }
.frontpage .p-filter .sflex { gap: 5px; }
.frontpage .p-filter .sflex div { font-size: 11px; }
.filter-actions { padding: 0 16px 10px; }
#home-reset { padding: 4px 12px; font-size: 11px; }
#home-load-status { font-size: 11px; }
@media (max-width: 1050px) { .frontpage .p-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .frontpage .p-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.category-section { padding-top: 24px; }
.home-summary { padding-top: 20px; }
.home-summary .home-stats { margin-bottom: 0; }

/* Filters and map share one continuous panel. */
.map-section { padding-top: 22px; }
.map-panel { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.map-panel .filter-panel { border: 0; border-bottom: 1px solid var(--green-line); border-radius: 0; margin: 0; }
.map-panel .map-toolbar { border: 0; border-radius: 0; }
.frontpage .map-panel .maps { border-left: 0; border-right: 0; }
.map-panel .map-legend { border: 0; border-radius: 0; }
.category-section .cat-icons { margin-bottom: 0; }
.object-results {
  margin-top: 28px;
  padding-top: 24px;
  padding-bottom: 16px;
  border: 0;
  background: transparent;
}
.frontpage #main-content {
  background-color: #e9f1f8;
  background-image: linear-gradient(#edf4facf, #edf4facf), url('background.png');
  background-size: auto, 1200px auto;
  background-position: center top;
}
.object-results .objects-table-wrap { background: #eef5fbb3; border-color: #d0dfec; }
.frontpage .object-results .objects-table { background: transparent; }
.frontpage .object-results .objects-table tbody tr:not(.b) { background: #ffffffa8; }
.frontpage .object-results .objects-table tbody tr:not(.b):nth-child(odd) { background: #e6eff8bd; }
.frontpage .object-results .objects-table tbody tr:not(.b):hover { background: #dcecf8eb; }
.frontpage .object-results .objects-table thead td { background: #dce8f3; }
.frontpage .object-results .objects-table tbody .b { background: #dfeefaeb; }
@media (max-width: 760px) {
  .map-section { padding-top: 16px; }
  .object-results { margin: 22px 12px 0; padding-left: 12px; padding-right: 12px; }
  .object-results .objects-table-wrap { border: 0; background: none; }
}

.header-account { margin-left: auto; display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.header-account a { color: #fff; font-size: 13px; text-decoration: none; white-space: nowrap; }
.header-account a:hover { text-decoration: underline; }
.header-account .header-login { border: 1px solid #ffffff60; border-radius: 7px; padding: 7px 15px; }
@media (max-width: 760px) {
  .frontpage .p-header .page-wrap { flex-wrap: wrap; gap: 12px 16px; }
  .brand-caption { min-width: 120px; }
  .header-account { width: 100%; justify-content: flex-end; gap: 18px; }
  .header-account a { font-size: 12px; }
  .header-account .header-login { padding: 5px 13px; }
}

.home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.category-section { padding-top: 16px; }
@media (max-width: 420px) {
  .home-summary .stat-card:first-child { grid-column: auto; grid-template-columns: 1fr; align-items: start; padding: 14px; }
  .home-summary .stat-card:first-child > span { min-height: 30px; }
  .home-summary .stat-card:first-child strong { font-size: 26px; }
}

.frontpage .p-header { margin-bottom: 12px; }
.frontpage .maps { height: 620px; background: #eaf0f5; }
.frontpage .map-expand-control { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 7px; color: #244b69; }
.map-expand-control svg { display: block; }
body.map-fullscreen-open { overflow: hidden; }
.frontpage #map.map-fullscreen { position: fixed !important; inset: 16px; width: calc(100vw - 32px); height: calc(100vh - 32px); height: calc(100dvh - 32px); z-index: 10000; border: 1px solid #c5d4e0; border-radius: 12px; box-shadow: 0 0 0 30px #102b43b3; }
.frontpage .sd-popap { width: min(300px, calc(100vw - 112px)); }
.frontpage .sd-popap .img-block { width: 100%; }
.frontpage .leaflet-popup-content { max-width: calc(100vw - 100px); }
.frontpage .leaflet-popup-scrolled { overscroll-behavior: contain; }
@media (max-width: 760px) {
  .frontpage .maps { height: 540px; }
  .frontpage .sd-popap .img-block { height: 160px; }
  .frontpage #map.map-fullscreen { inset: 8px; width: calc(100vw - 16px); height: calc(100vh - 16px); height: calc(100dvh - 16px); border-radius: 8px; }
}

@font-face {
  font-family: 'Noto Display';
  src: url('fonts/noto-display/NotoSansDisplay-Bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
.frontpage .p-header {
  background: linear-gradient(115deg, #103e67 0%, #126b9f 65%, #1687b4 100%);
  border-bottom: 3px solid #59b7d4;
  box-shadow: 0 5px 18px #17324d12;
  padding-top: 22px;
  padding-bottom: 22px;
}
.frontpage .p-header .page-wrap { gap: 28px; }
.frontpage .brand-caption {
  flex: 1;
  max-width: 540px;
  min-width: 0;
  padding-left: 24px;
  border-left: 1px solid #ffffff40;
  font-family: 'Noto Display', 'Segoe UI', Arial, sans-serif;
  font-size: clamp(18px, 1.8vw, 23px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.015em;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 1px 2px #092f4d26;
}
.frontpage .header-account { gap: 12px; }
.frontpage .header-account a { font-size: 13px; font-weight: 600; padding: 9px 13px; border-radius: 8px; }
.frontpage .header-account a:hover { background: #ffffff18; text-decoration: none; }
.frontpage .header-account .header-login { background: #fff; color: #124b73; border-color: #fff; padding: 9px 19px; box-shadow: 0 2px 8px #092f4d14; }
.frontpage .header-account .header-login:hover { background: #e7f4fc; }
@media (max-width: 1000px) and (min-width: 761px) {
  .frontpage .p-header .page-wrap { gap: 18px; }
  .frontpage .brand-caption { font-size: 18px; padding-left: 18px; }
  .frontpage .header-account { gap: 5px; }
  .frontpage .header-account a { padding-left: 9px; padding-right: 9px; font-size: 12px; }
}
@media (max-width: 760px) {
  .frontpage .p-header { padding-top: 18px; padding-bottom: 14px; }
  .frontpage .p-header .page-wrap { gap: 14px 18px; }
  .frontpage .brand-caption { font-size: 17px; padding-left: 18px; max-width: none; }
  .frontpage .header-account { gap: 12px; }
  .frontpage .header-account a { font-size: 12px; padding-top: 7px; padding-bottom: 7px; }
  .frontpage .header-account .header-login { padding: 7px 18px; }
}
@media (max-width: 420px) {
  .frontpage .brand-caption { font-size: 14px; padding-left: 14px; }
  .frontpage .p-header .page-wrap { column-gap: 14px; }
}

.frontpage .brand-contact { display: block; margin-top: 7px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; font-size: 12px; font-weight: 400; line-height: 1.5; letter-spacing: 0; color: #d3e8f4; text-shadow: none; }
.brand-contact a { color: inherit; text-decoration: none; white-space: nowrap; }
.brand-contact a:hover { text-decoration: underline; }
@media (max-width: 420px) { .frontpage .brand-contact { font-size: 10px; margin-top: 5px; } }

@media (min-width: 761px) {
  .frontpage .objects-table th + th,
  .frontpage .objects-table td + td { border-left: 1px solid #bfd1e1; }
}

@media (min-width: 761px) {
  .frontpage .objects-table { table-layout: fixed; }
  .frontpage .objects-table thead td:first-child { width: 40%; }
  .frontpage .objects-table thead td:not(:first-child) { width: 15%; }
  .frontpage .objects-table td:not(:first-child) { padding-left: 12px; padding-right: 12px; }
  .frontpage .objects-table thead td { overflow-wrap: anywhere; }
}
