:root {
  --bg: #f2f5f8;
  --panel: #ffffff;
  --panel-soft: #f7f9fb;
  --control: #ffffff;
  --control-strong: #f7f9fb;
  --ink: #172231;
  --muted: #68778a;
  --line: #d7e0e9;
  --line-soft: #e6ebf0;
  --hover: #eef2f6;
  --brand: #46647f;
  --brand-dark: #344d63;
  --brand-soft: #edf3f7;
  --accent: #b44d55;
  --shadow: 0 8px 24px rgba(28, 45, 64, 0.07);
  --radius: 8px;
}

* { box-sizing: border-box; }

.adsbygoogle,
iframe[src*="doubleclick"],
iframe[src*="googlesyndication"],
iframe[src*="adservice"],
iframe[src*="yandex.ru/ads"],
[id^="google_ads"],
[id^="yandex_ad"],
[class~="ad-banner"],
[class~="ads-banner"],
[class~="advertisement"],
[data-ad],
[data-ads] {
  display: none !important;
  visibility: hidden !important;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  color-scheme: light;
}

body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15.5px/1.5 Inter, "SF Pro Text", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: none; }

::selection {
  background: rgba(70, 100, 127, 0.2);
  color: var(--ink);
}

* {
  scrollbar-color: #aeb9c5 var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3000;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 18px;
  min-height: 76px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(12px);
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 1 420px;
  gap: 14px;
  min-width: 0;
  color: var(--ink);
}

.brand:hover { color: var(--ink); }

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  background: transparent !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.brand-mark img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand strong {
  display: block;
  max-width: min(420px, 30vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: flex;
  align-items: center;
  flex: 1 1 520px;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  overflow: visible;
}

.nav a,
.logout-form button {
  display: inline-flex;
  align-items: center;
  max-width: 190px;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav a:hover,
.logout-form button:hover {
  background: var(--hover);
  color: var(--ink);
}

.logout-form { margin: 0; }

.nav-search {
  display: flex;
  align-items: center;
  flex: 1 1 260px;
  position: relative;
  width: auto;
  min-width: 180px;
  max-width: 320px;
  height: 40px;
  margin: 0 6px 0 0;
  overflow: visible;
  background: #f7faff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.nav-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.nav-search input::placeholder {
  color: var(--muted);
}

.nav-search:focus-within {
  border-color: #cfd7e2;
  box-shadow: 0 0 0 2px rgba(21, 31, 45, 0.04);
}

.nav-search > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 100%;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: white;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.nav-search > button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.nav-search > button:hover {
  background: var(--hover);
  color: var(--ink);
}

.search-form {
  position: relative;
}

.search-suggestions {
  position: fixed;
  z-index: 10000;
  display: grid;
  gap: 4px;
  /* This stays above the page but must not run off the bottom of the screen. */
  max-height: calc(100vh - 230px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-suggestions[hidden] {
  display: none;
}

body.portal-ai-open { overflow: hidden; }

.portal-ai-modal {
  position: fixed;
  z-index: 12000;
  inset: 0;
  padding: 18px;
  background: rgba(20, 35, 50, 0.62);
}

.portal-ai-dialog {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #f6f8fb;
  box-shadow: 0 24px 80px rgba(11, 24, 38, 0.32);
}

.portal-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.portal-ai-header > div { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.portal-ai-header strong { font-size: 20px; }
.portal-ai-header small { grid-column: 2; color: var(--muted); }
.portal-ai-mark { display: grid; grid-row: span 2; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #31506d, #5b70d7); color: #ffffff; font-weight: 800; }

.portal-ai-close { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: #ffffff; color: var(--muted); font-size: 34px; line-height: 1; cursor: pointer; }
.portal-ai-close:hover { background: var(--hover); color: var(--ink); }

.portal-ai-messages { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; padding: 28px max(24px, calc((100vw - 1040px) / 2)); }
.portal-ai-message { max-width: min(780px, 90%); padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #ffffff; color: var(--ink); line-height: 1.55; white-space: pre-line; }
.portal-ai-message.user { align-self: flex-end; border-color: #344d63; background: #344d63; color: #ffffff; }
.portal-ai-message.assistant { align-self: flex-start; }
.portal-ai-message.waiting { color: var(--muted); font-style: italic; }

.portal-ai-compose { display: flex; gap: 12px; padding: 16px max(24px, calc((100vw - 1040px) / 2)); border-top: 1px solid var(--line); background: #ffffff; }
.portal-ai-compose input { flex: 1; min-width: 0; min-height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; font: inherit; outline: none; }
.portal-ai-compose input:focus { border-color: #9fb2c2; box-shadow: 0 0 0 3px rgba(70, 100, 127, 0.1); }

@media (max-width: 640px) {
  .portal-ai-modal { padding: 0; }
  .portal-ai-dialog { border-radius: 0; }
  .portal-ai-header { padding: 14px; }
  .portal-ai-header strong { font-size: 17px; }
  .portal-ai-messages { padding: 18px 14px; }
  .portal-ai-compose { padding: 12px 14px; }
  .portal-ai-compose .button { min-width: 48px; padding: 0 12px; font-size: 0; }
  .portal-ai-compose .button::after { content: "↑"; font-size: 22px; }
}

.search-suggestion {
  display: grid;
  gap: 3px;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.search-suggestion strong {
  display: block;
  min-width: 0;
  font-size: 14px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.search-suggestion span {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
}

.search-suggestion:hover,
.search-suggestion[aria-selected="true"] {
  border-color: var(--line);
  background: var(--hover);
}

.main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 24px;
  min-width: 0;
}

.messages {
  width: 100%;
  max-width: none;
  margin: 20px 0 0;
  padding: 0 24px;
}

.message {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: white;
}

.message-success { border-left-color: #1a9b62; }
.message-warning { border-left-color: #d69900; }
.message-error { border-left-color: var(--accent); }

.search-hero,
.panel,
.auth-panel,
.house-header,
.two-column > div,
.two-column > aside,
section:not(.search-hero):not(.panel):not(.auth-panel):not(.house-header) {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-hero {
  position: relative;
  padding: 32px;
  /* The address autocomplete is rendered inside this block.  Do not clip it
     when its list extends below the hero. */
  overflow: visible;
  z-index: 10;
}

.home-hero {
  padding: 38px;
  background:
    radial-gradient(circle at 88% 18%, rgba(52, 77, 99, 0.14), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f5f8fb 100%);
}

.home-eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-lead {
  max-width: 760px;
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.home-dashboard {
  display: grid;
  gap: 26px;
  margin-top: 22px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.home-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-overview-card {
  display: grid;
  gap: 8px;
  min-height: 156px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.home-overview-card:hover { transform: translateY(-2px); border-color: #9eb8ce; box-shadow: 0 12px 28px rgba(31, 55, 77, .12); }

.home-overview-card.primary {
  color: #ffffff;
  border-color: #344d63;
  background: linear-gradient(135deg, #344d63, #263b4d);
}

.home-overview-card span { color: var(--muted); }
.home-overview-card.primary span,
.home-overview-card.primary small { color: rgba(255, 255, 255, 0.72); }
.home-overview-card strong { font-size: 42px; line-height: 1; }
.home-overview-card small { align-self: end; color: var(--muted); }

.home-workshops-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.home-workshops-head h2 { margin: 0; font-size: 26px; }
.home-workshops-head span { color: var(--muted); }

.home-workshop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-workshop-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.home-ods-card:hover { transform: translateY(-2px); border-color: #9eb8ce; box-shadow: 0 12px 28px rgba(31, 55, 77, .12); }

.home-workshop-number {
  display: block;
  margin-bottom: 15px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
}
.home-workshop-number:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.home-workshop-card dl { display: grid; gap: 0; margin: 0; }
.home-workshop-card dl > div { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.home-workshop-card dt { margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.home-workshop-card dd { margin: 0; color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }

.home-workshop-card dl > .home-workshop-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-workshop-facts span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-workshop-facts small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.home-workshop-facts strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
}

.home-workshop-card dl > .home-workshop-area {
  padding: 10px 0;
}

.home-workshop-area dd {
  color: var(--ink);
  font-size: inherit;
  font-weight: 650;
}

.home-workshop-area dd span {
  font-size: inherit;
  font-weight: inherit;
}

.home-card-link { display: block; margin-top: 14px; color: var(--accent); font-size: 13px; font-weight: 750; }
.home-ods-head { margin-top: 34px; }
.home-ods-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.home-ods-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.home-ods-card strong { color: var(--ink); font-size: 18px; }
.home-ods-card span { color: var(--ink); }
.home-ods-card small { color: var(--muted); font-size: 13px; }
.home-ods-card em { margin-top: 5px; color: var(--accent); font-size: 13px; font-style: normal; font-weight: 750; }

.directory-detail { display: grid; gap: 18px; }
.directory-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.directory-detail-head h1 { margin: 4px 0 8px; }
.directory-detail-head p { margin: 0; color: var(--muted); }
.directory-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.directory-stat { padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.directory-stat span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.directory-stat strong { color: var(--ink); font-size: 24px; line-height: 1.1; }
.directory-stat.area strong { color: var(--accent); font-size: 29px; }
.directory-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.directory-info article { padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.directory-info span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.directory-info strong { color: var(--ink); font-size: 17px; overflow-wrap: anywhere; }
.directory-house-list { display: grid; gap: 8px; }
.directory-house-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 13px 15px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--panel); color: inherit; text-decoration: none; }
.directory-house-row:hover { border-color: #9eb8ce; }
.directory-house-row span { color: var(--muted); font-size: 13px; }
.site-object-sections { display: grid; gap: 10px; }
.site-object-section { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.site-object-section summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 17px; cursor: pointer; color: var(--ink); }
.site-object-section summary span { min-width: 34px; padding: 4px 9px; border-radius: 999px; background: var(--line-soft); color: var(--muted); text-align: center; font-size: 12px; }
.site-object-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; padding: 0 38px 18px 48px; }
.site-object-list li { padding: 8px 4px; border-bottom: 1px solid var(--line-soft); break-inside: avoid; }
.directory-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.directory-card { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: inherit; text-decoration: none; }
.directory-card:hover { border-color: #9eb8ce; box-shadow: var(--shadow); }
.directory-card h2 { margin: 0; color: var(--ink); font-size: 19px; }
.directory-card > p { min-height: 38px; margin: 0; color: var(--muted); }
.directory-card-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.directory-card-metrics span { display: grid; gap: 3px; min-width: 0; }
.directory-card-metrics small { color: var(--muted); font-size: 11px; }
.directory-card-metrics strong { color: var(--ink); font-size: 16px; overflow-wrap: anywhere; }

.technical-docs-report {
  margin: -28px -24px;
  padding: 18px 14px 0;
  border-right: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.search-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), #14a5ff 62%, var(--accent));
}

.search-hero h1,
.panel h1,
.auth-panel h1,
.house-header h1 {
  margin: 0 0 16px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.search-form {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  z-index: 20;
}

.search-form input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  outline: none;
}

.search-form input:focus,
.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: #cfd7e2;
  box-shadow: 0 0 0 2px rgba(21, 31, 45, 0.04);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.button.primary {
  background: #344d63;
  color: #ffffff;
  border-color: #344d63;
}

.button:hover {
  background: var(--hover);
  color: var(--ink);
  border-color: #cfd7e2;
}

.button.primary:hover {
  background: #293f52;
  color: #ffffff;
}

.muted { color: var(--muted); }

.eyebrow {
  color: var(--brand);
  font-weight: 700;
  margin: 0 0 6px;
}

.house-unom {
  margin: -6px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.section-head h2,
section h2 {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.25;
}

.section-head span {
  color: var(--muted);
  white-space: nowrap;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title-row h2 {
  margin: 0;
}

.house-list {
  display: grid;
  gap: 10px;
}

.house-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.house-row:hover {
  border-color: #cfd7e2;
  box-shadow: 0 8px 18px rgba(21, 31, 45, 0.05);
  transform: translateY(-1px);
}

.house-row span {
  color: var(--muted);
  white-space: nowrap;
}

.house-row.static:hover {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}

.house-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.detail-tabs {
  position: sticky;
  top: 76px;
  z-index: 10;
  display: flex;
  gap: 8px;
  margin: 16px 0 24px;
  padding: 8px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: saturate(180%) blur(12px);
}

.detail-tabs button,
.detail-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius);
  text-decoration: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
}

.detail-tabs button:hover,
.detail-tabs button.active,
.detail-tabs a:hover,
.detail-tabs a.active {
  background: var(--hover);
  color: var(--ink);
}

.detail-tabs button.active,
.detail-tabs a.active {
  box-shadow: inset 0 0 0 1px #cfd7e2;
}

.tab-panel {
  display: none !important;
}

.tab-panel.active {
  display: block !important;
}

.tab-panel.two-column.active {
  display: grid !important;
}

.detail-section {
  scroll-margin-top: 148px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.two-column > div,
.two-column > aside,
section:not(.search-hero):not(.panel):not(.auth-panel):not(.house-header) {
  padding: 24px;
}

.kv {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 9px 18px;
}

.kv dt {
  color: var(--muted);
  min-width: 0;
}

.kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.kv.compact { grid-template-columns: 120px 1fr; }

.characteristic-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.characteristic-groups-single {
  grid-template-columns: minmax(0, 1fr);
}

.characteristic-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.characteristic-group h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.kv-readable {
  grid-template-columns: minmax(150px, 42%) minmax(0, 1fr);
  gap: 0;
  margin: 0;
}

.kv-readable dt,
.kv-readable dd {
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
}

.kv-readable dt:first-of-type,
.kv-readable dt:first-of-type + dd {
  border-top: 0;
}

.kv-readable dt {
  padding-right: 18px;
  color: var(--muted);
}

.kv-readable dd {
  color: var(--ink);
  font-weight: 500;
}

.characteristic-collapse summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f3f7fa;
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.characteristic-collapse summary::-webkit-details-marker { display: none; }
.characteristic-collapse summary::after { content: "Развернуть ↓"; color: var(--accent); font-size: 12px; font-weight: 700; }
.characteristic-collapse[open] summary::after { content: "Свернуть ↑"; }
.characteristic-collapse summary span {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  text-align: center;
}
.characteristic-collapse[open] summary { margin-bottom: 8px; }

.document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.doc-section {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fbfdff;
  min-height: 190px;
}

.doc-section h3 { margin-top: 0; }

.doc-empty {
  display: flex;
  align-items: center;
  min-height: 62px;
  margin: auto 0 0;
  padding: 12px;
  color: var(--muted);
  background: white;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.doc-empty-action {
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.doc-empty-action:hover {
  background: var(--hover);
  border-color: #cfd7e2;
  color: var(--ink);
}

.doc-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.doc-link span {
  color: var(--muted);
  white-space: nowrap;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.image-grid figure { margin: 0; }

.image-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.image-grid figcaption {
  color: var(--muted);
  font-size: 14px;
}

.note {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.empty {
  padding: 18px;
  color: var(--muted);
  background: #fbfdff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.form p {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
}

.form-panel {
  max-width: 980px;
  margin: 32px auto;
  padding: 30px;
}

.form-heading {
  margin-bottom: 24px;
}

.form-heading h1 {
  margin: 0;
  line-height: 1.18;
}

.clean-form {
  display: grid;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form label {
  color: var(--muted);
  font-size: 14px;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.form input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  margin: 0;
  accent-color: #344d63;
}

.form input[type="file"] {
  display: flex;
  align-items: center;
  padding: 9px 10px;
}

.form textarea {
  min-height: 120px;
  resize: vertical;
}

.checkbox-field {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink) !important;
  font-weight: 600;
}

.form-field small {
  color: var(--muted);
  font-size: 13px;
}

.form-field .errorlist {
  margin: 0;
  padding-left: 18px;
  color: #b42318;
}

.ozp-import-panel {
  padding: 30px 32px;
}

.ozp-import-panel h1 {
  margin-bottom: 18px;
}

.ozp-import-panel > .muted {
  max-width: 980px;
  margin: 0 0 24px;
  line-height: 1.55;
}

.upload-form {
  display: grid;
  gap: 22px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.upload-grid.single {
  grid-template-columns: minmax(0, 720px);
}

.upload-card {
  display: grid;
  align-content: start;
  min-height: 140px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
  gap: 12px;
}

.upload-card span {
  color: var(--ink);
  font-weight: 700;
}

.upload-card small {
  color: var(--muted);
  line-height: 1.4;
}

.upload-card input[type="file"] {
  min-height: 46px;
  padding: 10px 12px;
  background: white;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.form-actions .button {
  min-width: 230px;
}

.pdf-tools-form .upload-card {
  min-height: 116px;
}

.pdf-tools-ranges {
  min-height: auto;
}

.pdf-tools-page {
  display: grid;
  gap: 20px;
  width: min(1480px, calc(100vw - 48px));
  margin: 26px auto;
  padding: 24px;
}

.pdf-tool-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6f8fb;
}

.pdf-tool-tabs button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.pdf-tool-tabs button.is-active {
  color: var(--ink);
  border-color: #c9d3df;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(30, 42, 58, 0.08);
}

.pdf-tool-panels {
  display: grid;
}

.pdf-tool-panel {
  display: none;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.pdf-tool-panel.is-active {
  display: grid;
  gap: 8px;
}

.pdf-tool-panel h2 {
  margin: 0;
  font-size: 22px;
}

.pdf-tool-panel p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 600;
}

.check-row input {
  width: 20px;
  height: 20px;
}

.pdf-tools-page .section-title-row {
  margin: 0;
  align-items: flex-start;
}

.pdf-tools-page .upload-grid {
  gap: 16px;
}

.pdf-tools-page .upload-card {
  padding: 18px 20px;
}

.pdf-tools-page .form-actions {
  padding-top: 2px;
}

.pdf-operation-fields {
  display: grid;
  gap: 16px;
}

.pdf-jobs-panel {
  gap: 16px;
}

.pdf-jobs-panel .section-title-row {
  padding: 0;
}

.pdf-jobs-panel h2 {
  margin: 0;
}

.pdf-jobs-scroll {
  max-height: min(620px, calc(100vh - 360px));
  min-height: 220px;
  overflow: auto;
  padding-right: 6px;
}

.upload-center {
  padding: 30px 32px;
}

.upload-center > .muted {
  margin: 0 0 24px;
}

.upload-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.upload-type-card {
  display: grid;
  min-height: 150px;
  padding: 22px;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
  color: var(--ink);
  text-decoration: none;
}

.upload-type-card:hover {
  background: white;
  border-color: #cfd7e2;
}

.upload-type-card strong {
  font-size: 20px;
}

.upload-type-card span {
  color: var(--muted);
  line-height: 1.45;
}

.report-builder {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.report-builder > .section-title-row {
  align-items: flex-start;
  margin: 0;
}

.report-builder h1,
.report-builder h2 {
  margin: 0;
}

.report-builder .muted {
  margin: 6px 0 0;
}

.report-form {
  display: grid;
  gap: 16px;
}

.report-sticky-actions {
  position: sticky;
  top: 77px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 26, 32, 0.96);
  backdrop-filter: blur(10px);
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 16px;
}

.report-card {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.report-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 10px;
}

.report-filter input[type="search"] {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control);
  color: var(--ink);
  font: inherit;
  outline: none;
}

.report-filter input[type="search"]:focus {
  border-color: #3f4b5c;
  box-shadow: 0 0 0 2px rgba(47, 129, 247, 0.14);
}

.report-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  grid-auto-rows: auto;
  align-items: start;
  gap: 10px;
  max-height: 64vh;
  overflow: auto;
  padding-right: 4px;
}

.report-checkbox-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.report-field-groups {
  display: grid;
  gap: 14px;
  max-height: 64vh;
  padding-right: 4px;
  overflow: auto;
}

.report-field-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.report-field-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.report-field-group .report-checkbox-grid {
  max-height: none;
  padding-right: 0;
  overflow: visible;
}

.report-field-group[hidden] {
  display: none;
}

.report-checkbox-grid label {
  display: flex;
  align-items: flex-start;
  align-self: start;
  gap: 10px;
  width: 100%;
  height: auto !important;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--control);
  color: var(--ink);
}

.report-checkbox-grid label[hidden] {
  display: none;
}

.form .report-checkbox-grid input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  min-height: 16px;
  height: 16px;
  margin-top: 3px;
  padding: 0;
  accent-color: #8b949e;
}

.report-checkbox-grid span {
  display: block;
  min-width: 0;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.import-report {
  display: grid;
  gap: 12px;
}

.import-result {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.import-result.compact {
  padding: 18px 20px;
}

.import-result.has-errors {
  border-color: #e4c26a;
}

.import-result > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
}

.import-result > div span {
  color: var(--muted);
}

.import-result dl {
  display: grid;
  grid-template-columns: minmax(220px, 34%) 1fr;
  margin: 0;
  gap: 8px 18px;
}

.import-result dt {
  color: var(--muted);
}

.import-result dd {
  margin: 0;
}

.import-result ul {
  margin: 0;
  padding-left: 20px;
  color: #8a5a00;
}

.import-help {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
}

.import-help strong {
  color: var(--ink);
}

.import-help code {
  display: block;
  padding: 10px 12px;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--control);
  color: var(--ink);
  font: 14px/1.45 "SFMono-Regular", Consolas, monospace;
  white-space: nowrap;
}

.import-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.import-summary article {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.import-summary span {
  color: var(--muted);
}

.import-summary strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.1;
}

.server-archive-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.server-archive-list h3 {
  margin: 0;
}

.server-import-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.background-job-list {
  display: grid;
  gap: 12px;
}

.background-job {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.background-job > div:first-child {
  display: grid;
  gap: 4px;
}

.background-job > div:first-child span,
.background-job > div:first-child small {
  color: var(--muted);
}

.background-job-progress {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.background-job-progress div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf1;
}

.background-job-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #7f8b9a;
}

.background-job-completed .background-job-progress i {
  background: #5f8f72;
}

.background-job-failed .background-job-progress i {
  background: #a45f5f;
}

.background-job-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
}

.pdf-job-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: min(420px, calc(100vw - 32px));
}

.pdf-job-widget-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid #c9d3df;
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 16px 42px rgba(30, 42, 58, 0.18);
  cursor: pointer;
  text-align: left;
}

.pdf-job-widget-toggle span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #eef3f8;
  color: #334155;
  font-weight: 900;
}

.pdf-job-widget.has-active .pdf-job-widget-toggle span {
  color: #1f4d34;
  background: #dff2e7;
}

.pdf-job-widget-body {
  display: none;
  max-height: 420px;
  margin-top: 10px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #c9d3df;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(30, 42, 58, 0.18);
}

.pdf-job-widget.is-open .pdf-job-widget-body {
  display: block;
}

.pdf-job-widget .background-job {
  padding: 12px;
  gap: 8px;
}

.pdf-job-widget .background-job + .background-job {
  margin-top: 10px;
}

.pdf-job-widget .background-job-meta {
  font-size: 13px;
}

.pdf-job-widget .button {
  min-height: 34px;
  padding: 0 12px;
}

.background-job-head,
.background-job-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.background-job-head div {
  display: grid;
  gap: 4px;
}

.background-job-head span,
.background-job-stats {
  color: var(--muted);
  font-size: 14px;
}

.background-job progress {
  width: 100%;
  height: 8px;
  accent-color: #8c939f;
}

.background-job-failed {
  border-color: #9b5b5b;
}

.background-job-completed progress {
  accent-color: #6f8f7a;
}

@media (max-width: 720px) {
  .pdf-tools-page {
    width: min(100% - 24px, 1480px);
    margin: 14px auto;
    padding: 16px;
  }

  .pdf-tool-tabs {
    gap: 6px;
  }

  .pdf-tool-tabs button {
    flex: 1 1 150px;
  }

  .server-import-row {
    grid-template-columns: 1fr;
  }

  .background-job-head,
  .background-job-stats {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

.ozp-workspace {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
}

.ozp-workspace > .section-title-row {
  align-items: flex-start;
  margin: 0;
}

.ozp-workspace > .section-title-row h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

.ozp-workspace > .section-title-row .muted {
  margin: 0;
  line-height: 1.35;
}

.ozp-folder-strip {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.ozp-folder-strip span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.ozp-folder-strip strong {
  display: block;
  color: var(--ink);
}

.ozp-package-form {
  display: grid;
  gap: 16px;
}

.ozp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ozp-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ozp-summary-grid > div {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.ozp-summary-grid span {
  color: var(--muted);
}

.ozp-summary-grid strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1.1;
}

.ozp-step {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.ozp-step h2,
.ozp-step p {
  margin: 0;
}

.ozp-service-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
  overflow: hidden;
}

.ozp-service-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}

.ozp-service-panel > summary::-webkit-details-marker {
  display: none;
}

.ozp-service-panel > summary span:first-child {
  display: grid;
  gap: 3px;
}

.ozp-service-panel > summary small,
.ozp-service-hint {
  color: var(--muted);
}

.ozp-service-panel[open] .ozp-service-hint {
  font-size: 0;
}

.ozp-service-panel[open] .ozp-service-hint::after {
  content: "Свернуть";
  font-size: 14px;
}

.ozp-service-content {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
}

.ozp-template-list,
.ozp-house-picker {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.ozp-house-actions {
  position: sticky;
  top: 88px;
  z-index: 10;
  margin: -20px -20px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 254, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
}

.ozp-house-actions h2,
.ozp-house-actions p {
  margin: 0;
}

.ozp-house-actions [data-selected-houses-count] {
  display: inline-flex;
  margin-top: 8px;
}

.ozp-house-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.template-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
}

.house-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 560px;
  overflow: auto;
  padding: 2px 6px 2px 2px;
}

.house-checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.house-checkbox-grid [hidden] {
  display: none !important;
}

.house-checkbox-grid label:hover {
  background: var(--panel-soft);
  border-color: #c5d0db;
}

.house-checkbox-grid label:has(input:checked) {
  background: var(--brand-soft);
  border-color: #9fb2c2;
  box-shadow: inset 3px 0 0 var(--brand);
}

.form .house-checkbox-grid input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--brand);
}

.house-checkbox-grid span {
  display: block;
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.house-picker-toolbar {
  margin-bottom: 12px;
}

.form .house-picker-toolbar input {
  width: min(100%, 520px);
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.auth-panel {
  max-width: 520px;
  margin: 40px auto;
  padding: 28px;
}

.auth-panel.wide { max-width: 760px; }

/* Light application shell */
.topbar,
.detail-tabs,
.ozp-house-actions {
  background: rgba(255, 255, 255, 0.96);
}

.nav-search,
.search-form input,
.form input,
.form select,
.form textarea,
.upload-card input[type="file"] {
  background: var(--control);
  color: var(--ink);
}

.message,
.button,
.house-row,
.doc-empty,
.template-list span,
.house-checkbox-grid label {
  background: var(--control-strong);
  color: var(--ink);
}

.button.primary {
  background: #344d63;
  color: #ffffff;
  border-color: #344d63;
}

.button.primary:hover {
  background: #293f52;
  color: #ffffff;
}

.search-hero,
.panel,
.auth-panel,
.house-header,
.two-column > div,
.two-column > aside,
section:not(.search-hero):not(.panel):not(.auth-panel):not(.house-header),
.characteristic-group,
.doc-section,
.empty,
.upload-card,
.upload-type-card,
.import-result,
.ozp-folder-strip,
.ozp-summary-grid > div,
.ozp-step,
.ozp-template-list,
.ozp-house-picker {
  background: var(--panel);
}

.nav-search > button,
.upload-type-card:hover,
.doc-empty-action:hover,
.button:hover,
.house-row:hover {
  background: var(--hover);
  color: var(--ink);
  border-color: var(--line);
}

.ozp-folder-strip,
.ozp-summary-grid > div,
.ozp-step,
.ozp-template-list,
.ozp-house-picker,
.upload-card,
.upload-type-card,
.import-result,
.house-row,
.doc-section,
.characteristic-group {
  border-color: var(--line);
}

.search-form input:focus,
.form input:focus,
.form select:focus,
.form textarea:focus,
.nav-search:focus-within {
  border-color: #9fb2c2;
  box-shadow: 0 0 0 3px rgba(70, 100, 127, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.stat-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  font-size: 28px;
  line-height: 1;
}

.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
}

.data-table td.ok {
  color: var(--ink);
  font-weight: 700;
}

.data-table td.empty {
  color: var(--muted);
}

.data-table td > a {
  display: block;
  color: var(--ink);
  font-weight: 700;
}

.data-table td > .muted {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--control);
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.ok {
  color: #146c43;
  border-color: #badbcc;
  background: #d1e7dd;
}

.ozp-dashboard,
.ozp-report-page {
  margin-bottom: 22px;
}

.ozp-dashboard {
  padding: 24px 28px;
}

.title-link {
  color: var(--ink);
  text-decoration: none;
}

.title-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ozp-corner-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  width: min(320px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: saturate(180%) blur(10px);
}

.ozp-widget-title {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
}

.ozp-battery {
  position: relative;
  height: 22px;
  margin-right: 10px;
  border: 1px solid #b8c4cf;
  border-radius: 6px;
  background: #eef2f6;
}

.ozp-battery::after {
  content: "";
  position: absolute;
  top: 5px;
  right: -8px;
  width: 6px;
  height: 10px;
  border-radius: 0 4px 4px 0;
  background: #b8c4cf;
}

.ozp-battery span {
  display: block;
  width: var(--ozp-progress, 0%);
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #d97b63 0%, #d9b95f 45%, #4f9f70 100%);
}

.ozp-corner-widget dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 8px;
}

.ozp-corner-widget dl div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ozp-corner-widget dt {
  color: var(--muted);
  font-size: 12px;
}

.ozp-corner-widget dd {
  margin: 0;
  font-weight: 750;
}

.ozp-corner-widget p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.ozp-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.ozp-summary-grid.large {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.ozp-summary-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, var(--bg));
}

.ozp-summary-card span {
  color: var(--muted);
}

.ozp-summary-card strong {
  font-size: 26px;
  line-height: 1;
}

.ozp-summary-card.accent {
  border-color: #9fb2c2;
  background: linear-gradient(180deg, rgba(70, 100, 127, 0.08), rgba(70, 100, 127, 0.02));
}

.ozp-problems,
.ozp-section {
  margin-top: 26px;
}

.ozp-problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.ozp-problem-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.ozp-problem-card div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.ozp-problem-card span {
  color: var(--muted);
}

.section-title-row.compact {
  margin-bottom: 12px;
}

.form-panel {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 32px;
}

.form-heading {
  margin-bottom: 22px;
}

.form-heading h1 {
  margin: 0;
}

.clean-form {
  display: grid;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label {
  color: var(--muted);
  font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
}

.form-field textarea {
  min-height: 160px;
  resize: vertical;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 6px;
}

.message-warning,
.import-result.has-errors {
  border-color: #b08800;
}

.import-result ul {
  color: #8a5a00;
}

input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--control-strong);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: var(--hover);
}

.panel.form-panel {
  width: min(100%, 980px);
  max-width: 980px;
  margin: 32px auto;
  padding: 32px;
}

.panel.form-panel .form-heading {
  margin: 0 0 24px;
}

.panel.form-panel .form-heading h1 {
  margin: 0;
  line-height: 1.2;
}

.form.clean-form {
  display: grid;
  gap: 18px;
}

.form.clean-form .form-field {
  display: grid;
  gap: 8px;
}

.form.clean-form textarea {
  min-height: 130px;
  max-height: 320px;
}

.form.clean-form .checkbox-field {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
}

.form.clean-form .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink) !important;
  font-weight: 650;
}

.form.clean-form .form-actions {
  margin-top: 4px;
}

.form.clean-form .form-actions .button {
  min-width: 180px;
}

.form input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  padding: 0;
  flex: 0 0 18px;
}

@media (max-width: 1200px) {
  .home-workshop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .house-checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 20px;
  }

  .detail-tabs {
    top: 116px;
  }

  .brand strong {
    max-width: calc(100vw - 100px);
    white-space: normal;
  }

  .nav {
    justify-content: flex-start;
  }

  .nav-search {
    width: 100%;
    min-width: min(420px, calc(100vw - 40px));
    max-width: 100%;
  }
}

.moek-act-builder { display: grid; gap: 14px; max-width: 1180px; margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfe; }
.address-picker-toolbar { display: flex; align-items: end; gap: 12px; }
.address-search { display: grid; flex: 1 1 480px; gap: 6px; color: var(--ink); font-weight: 600; }
.address-search input { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--radius); background: white; color: var(--ink); font: inherit; }
.address-search input:focus { border-color: #8aa4c7; outline: 3px solid rgba(92, 128, 176, 0.14); }
.address-picker-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.address-picker-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; }
.address-picker-list { max-height: 390px; margin: 0; padding: 10px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.address-picker-list > div > ul, .address-picker-list > ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.address-picker-list li { min-width: 0; }
.address-picker-list label { display: flex; min-height: 40px; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; color: var(--ink); cursor: pointer; line-height: 1.3; }
.address-picker-list label:hover { background: var(--hover); }
.address-picker-list input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: #315f99; }
.address-picker-empty { margin: 0; padding: 20px; color: var(--muted); text-align: center; }
.moek-builder-actions { margin-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1400px) {
  .address-picker-list > div > ul, .address-picker-list > ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
  .address-picker-list > div > ul, .address-picker-list > ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .home-hero { padding: 24px 20px; }
  .home-overview-grid,
  .home-workshop-grid,
  .home-ods-grid,
  .directory-card-grid,
  .directory-stats,
  .directory-info { grid-template-columns: 1fr; }
  .directory-detail-head { flex-direction: column; }
  .directory-house-row { grid-template-columns: 1fr; }
  .site-object-list { grid-template-columns: 1fr; }
  .home-workshops-head { align-items: flex-start; flex-direction: column; }
  .technical-docs-report { margin: -20px -16px; padding: 16px 12px 0; }

  .address-picker-toolbar { align-items: stretch; flex-direction: column; }
  .address-search { flex-basis: auto; }
  .address-picker-list > div > ul, .address-picker-list > ul { grid-template-columns: 1fr; }
  .main { padding: 20px 16px; }
  .messages { padding: 0 20px; }
  .house-header,
  .search-form,
  .house-row,
  .section-title-row {
    flex-direction: column;
    align-items: stretch;
  }
  .two-column { grid-template-columns: 1fr; }
  .nav-search {
    min-width: 100%;
  }
  .detail-tabs {
    top: 0;
    margin: 12px 0 18px;
  }
  .detail-tabs button,
  .detail-tabs a {
    min-height: 36px;
    padding: 0 12px;
  }
  .detail-section {
    scroll-margin-top: 84px;
  }
  .kv,
  .kv.compact,
  .kv-readable { grid-template-columns: 1fr; }
  .characteristic-groups {
    grid-template-columns: 1fr;
  }
  .house-checkbox-grid {
    grid-template-columns: 1fr;
  }
  .characteristic-group {
    padding: 16px;
  }
  .kv-readable dt {
    padding: 10px 0 2px;
  }
  .kv-readable dd {
    padding: 0 0 10px;
    border-top: 0;
  }
  .upload-grid,
  .upload-type-grid,
  .ozp-grid,
  .ozp-summary-grid,
  .report-grid,
  .import-result dl {
    grid-template-columns: 1fr;
  }
  .report-sticky-actions {
    top: 12px;
    align-items: stretch;
    flex-direction: column;
  }
  .report-filter {
    grid-template-columns: 1fr;
  }
  .ozp-house-actions {
    top: 12px;
    align-items: stretch;
    flex-direction: column;
  }
  .ozp-house-buttons,
  .report-actions,
  .report-actions .button,
  .ozp-house-buttons .button {
    width: 100%;
  }
  .ozp-import-panel {
    padding: 22px;
  }
  .form-actions .button {
    width: 100%;
  }
  .search-hero,
  .auth-panel,
  .house-header,
  .two-column > div,
  .two-column > aside,
  section:not(.search-hero):not(.panel):not(.auth-panel):not(.house-header) {
    padding: 20px;
  }
}
.unified-reports { padding:24px; }
.report-history,.report-source-grid { padding:4px 20px 20px; }
@media(max-width:900px) { .topbar{position:relative;}.topbar>.brand,.topbar>.nav{flex:0 0 auto;width:100%;}.nav-search{order:-1;flex:1 1 100%;min-width:0;} }
.report-preset-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0; }
.report-preset { display:flex;align-items:flex-start;gap:10px;border:1px solid var(--line,#d4e0e9);border-radius:12px;padding:16px;cursor:pointer;min-width:0; }
.report-preset:has(input:checked) { border-color:#257a9a;background:#edf7fb;box-shadow:inset 0 0 0 1px #257a9a; }
.report-preset input { width:auto;flex:0 0 auto;margin-top:4px; }
.report-preset span { display:grid;gap:6px; }.report-preset small { color:var(--muted,#647789);line-height:1.5; }
.report-control-grid { display:grid;grid-template-columns:1fr 2fr;gap:20px;align-items:start; }
.unified-reports fieldset { border:1px solid #d4e0e9;border-radius:10px;padding:14px;margin:12px 0;min-width:0; }
.unified-reports legend { padding:0 6px;font-weight:600; }.unified-reports legend small { color:#647789;font-weight:400; }
.report-site-options,.report-metric-options { display:flex;gap:12px 22px;flex-wrap:wrap; }.report-site-options label,.report-metric-options label { display:flex;align-items:center;gap:8px;font-weight:400; }
.report-site-options input,.report-metric-options input,.report-house-options input { width:auto;flex:0 0 auto; }
.report-addresses { border:1px solid #d4e0e9;border-radius:10px;padding:14px; }.report-addresses summary { cursor:pointer;font-weight:600;margin-bottom:12px; }
.report-house-options { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:320px;overflow:auto;gap:8px;margin:12px 0; }.report-house-options label { display:flex;align-items:center;gap:8px;padding:7px;min-width:0;font-weight:400; }.report-house-options label[hidden] { display:none; }
.report-period { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:15px 0; }.report-period[hidden],.unified-reports [hidden] { display:none; }
.report-submit-row { display:flex;align-items:center;gap:20px;margin-top:20px; }.report-submit-row span { max-width:640px; }
.report-history-item { display:grid;grid-template-columns:minmax(0,1fr) 140px minmax(120px,auto);gap:16px;align-items:center;padding:14px 0;border-bottom:1px solid #dce5ec; }.report-history-item small { display:block;color:#647789;margin-top:5px; }
.report-source-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px; }.report-source { display:grid;gap:10px;padding:16px;border:1px solid #d4e0e9;border-radius:10px; }.report-source small { color:#647789; }
@media(max-width:1000px) { .report-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.report-period{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media(max-width:640px) { .report-preset-grid,.report-control-grid,.report-house-options,.report-source-grid,.report-period{grid-template-columns:1fr;}.report-history-item{grid-template-columns:1fr;gap:8px;}.report-submit-row{flex-direction:column;align-items:stretch;}.unified-reports .section-title-row{flex-direction:column;align-items:stretch;}.nav{flex-wrap:wrap;}.brand{min-width:0;max-width:100%;}.brand strong{overflow-wrap:anywhere;} }

/* Prefecture statistics: consistent year and Monday–Sunday periods. */
.edc-summary { margin: 28px 0; padding: 26px; background: #fff; border: 1px solid #dce5ee; border-radius: 16px; box-shadow: 0 8px 28px rgba(29,58,81,.05); }
.edc-summary-heading,.edc-category-heading,.edc-area-bar { display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; }
.edc-summary h2 { margin:4px 0 0; font-size:26px; }
.edc-stat-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:24px 0 18px; }
.edc-stat-card { display:grid; gap:10px; padding:22px; border:1px solid #d9e6ef; border-radius:12px; background:#f4f8fc; min-width:0; }
.edc-stat-card>span { font-weight:600; color:#52667a; }
.edc-stat-card>strong { font-size:42px; line-height:1.1; font-variant-numeric:tabular-nums; color:#123954; }
.edc-stat-card>small { color:#596d80; }
.edc-stat-year { background:#173e58; border-color:#173e58; }
.edc-stat-year>span,.edc-stat-year>strong,.edc-stat-year>small { color:#fff; }
.edc-stat-current { background:#ebf8f4; border-color:#b9e5d9; }
.edc-stat-current>strong { color:#08785d; }
.edc-stat-rate { margin-top:8px; padding-top:14px; border-top:1px solid rgba(99,128,150,.25); display:flex; flex-wrap:wrap; align-items:baseline; gap:8px; }
.edc-stat-rate b { font-size:21px; font-variant-numeric:tabular-nums; }
.edc-stat-rate span { font-size:12px; color:#587084; }
.edc-stat-year .edc-stat-rate { color:white; border-color:#5e7d92; }
.edc-stat-year .edc-stat-rate span { color:#d9e9f4; }
.edc-area-bar { padding:18px; border-radius:10px; background:#f5f7fa; }
.edc-area-bar small { display:block; margin-top:7px; color:#647589; }
.edc-basis-switch { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.edc-basis-switch a { padding:7px 10px; border-radius:7px; text-decoration:none; color:#466176; background:white; border:1px solid #d4dfe7; }
.edc-basis-switch a[aria-current] { color:white; background:#1c516f; border-color:#1c516f; }
.edc-method { padding:12px 0; font-size:13px; color:#596d80; }
.edc-method summary { cursor:pointer; }
.edc-method p { max-width:900px; line-height:1.6; }
.edc-category-heading { margin:20px 0 12px; }
.edc-category-heading h3 { margin:0; font-size:19px; }
.edc-category-heading>span { color:#6b7c8d; font-size:12px; }
.edc-table-scroll { overflow-x:auto; }
.edc-category-table { width:100%; border-collapse:collapse; font-size:14px; }
.edc-category-table th,.edc-category-table td { padding:13px 15px; border-bottom:1px solid #e2e9ef; text-align:right; font-variant-numeric:tabular-nums; }
.edc-category-table th:first-child { text-align:left; width:52%; }
.edc-category-table thead { color:#fff; background:#224a65; }
.edc-category-table tbody th { font-weight:500; }
.edc-category-table tbody tr:nth-child(even) { background:#f5f8fb; }
.edc-category-table tfoot { font-weight:700; background:#e7f2f4; }
.edc-source-line { color:#667b8e; font-size:12px; line-height:1.6; margin:16px 0 0; }
@media(max-width:760px) { .edc-summary { padding:16px; } .edc-stat-cards { grid-template-columns:1fr; } .edc-stat-card>strong { font-size:36px; } .edc-summary h2 { font-size:23px; } .edc-category-table th,.edc-category-table td { padding:11px 8px; } .edc-category-table { min-width:530px; } }

.edc-sites { margin: 20px 0 28px; scroll-margin-top: 20px; }
.edc-site-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; margin-bottom:14px; }
.edc-site-toolbar>span { font-size:13px; color:#647589; }
.edc-site-toolbar .edc-basis-switch { margin-top:0; }
.edc-site-leader { padding:12px 16px; border-radius:8px; background:#fff3e7; border-left:3px solid #c56b36; color:#7e4523; font-size:14px; }
.edc-site-table { min-width:830px; }
.edc-site-table th:first-child { width:24%; }
.edc-site-table thead small { display:inline-block; margin-top:6px; font-weight:400; font-size:11px; color:#e2edf3; }
.edc-site-table tbody td { vertical-align:middle; white-space:nowrap; }
.edc-site-table td>b { font-size:17px; }
.edc-site-table .edc-ranked-column { background:#eaf4f7; }
.edc-site-table thead .edc-ranked-column { background:#123b53; }
.edc-site-table .edc-site-highest th,.edc-site-table .edc-site-highest td { background:#fff4ea; }
.edc-site-table .edc-site-highest .edc-ranked-column { background:#ffe9d6; }
.edc-site-rate { display:block; margin-top:6px; color:#5a7185; font-size:12px; font-weight:500; }
.edc-site-highest .edc-ranked-column .edc-site-rate { color:#9a4c24; font-weight:700; }
.edc-site-rank { display:inline-grid; place-items:center; min-width:23px; height:23px; padding:0 4px; margin-right:8px; background:#e2edf4; border-radius:6px; font-size:12px; color:#325772; }
.edc-site-highest .edc-site-rank { background:#bd6637; color:white; }
.edc-site-houses { display:block; font-size:11px; margin-top:7px; color:#6d8090; }
.edc-site-bar { display:block; height:4px; margin-top:10px; background:#e6edf1; border-radius:5px; overflow:hidden; }
.edc-site-bar>span { display:block; height:100%; background:#5289a5; border-radius:5px; }
.edc-site-highest .edc-site-bar>span { background:#c16a38; }
@media(max-width:760px) { .edc-site-toolbar { align-items:flex-start; flex-direction:column; } .edc-site-table th:first-child { min-width:175px; } }
@media(max-width:760px) {
  .edc-site-table th:first-child { position:sticky; left:0; z-index:1; background:#fff; box-shadow:2px 0 3px rgba(35,65,85,.06); }
  .edc-site-table thead th:first-child { background:#224a65; }
  .edc-site-table tbody tr:nth-child(even) th:first-child { background:#f5f8fb; }
  .edc-site-table .edc-site-highest th:first-child { background:#fff4ea; }
  .edc-site-table tfoot th:first-child { background:#e7f2f4; }
}
#site-statistics { padding:0; border:0; box-shadow:none; background:transparent; }
@media(max-width:760px) {
  #edc-statistics { padding:14px; }
  .edc-site-table th:first-child { width:110px; min-width:110px; max-width:110px; }
  .edc-site-houses { font-size:10px; }
}
.edc-source-switch { margin-top:20px; }
.edc-source-switch a { min-width:110px; text-align:center; font-weight:650; }
.edc-source-notice { margin-top:16px; padding:14px 16px; border-radius:8px; border-left:3px solid #bd8641; background:#fff7e9; color:#735528; font-size:13px; line-height:1.7; }
.edc-period-unavailable { display:inline-block; padding:7px 10px; border:1px solid #e0e5ea; border-radius:7px; color:#7d8b98; background:#f3f5f7; font-size:12px; }

/* Appeal analytics: the same facts on desktop and mobile. */
.appeal-insights { margin:28px 0; padding:22px 0; border-top:1px solid #dce6ed; border-bottom:1px solid #dce6ed; }
.insight-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:18px 0; }
.insight-cards article { background:#eff6fa; border:1px solid #d6e5ee; padding:18px; border-radius:12px; }
.insight-cards strong { display:block; font-size:30px; color:#214e66; line-height:1.3; }
.insight-cards span { display:block; color:#577080; font-size:13px; margin-top:7px; }
.insight-comparison { background:#f4f8fa; padding:16px; border-radius:10px; margin-top:18px; }
.analytics-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:22px 0; align-items:end; }
.analytics-filters label { display:grid; gap:6px; font-size:13px; font-weight:600; }
.analytics-filters input,.analytics-filters select { width:100%; min-width:0; padding:10px; border:1px solid #cbd9e1; border-radius:7px; background:white; }
.analytics-export { display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:16px 0; }
.analytics-page h2 { margin-top:32px; }
.analytics-address { margin:10px 0; border:1px solid #d5e1e8; border-radius:10px; background:#fff; }
.analytics-address summary { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:16px; cursor:pointer; }
.analytics-address summary small { display:block; margin-top:6px; color:#647b8b; }
.analytics-badges { display:flex; flex-wrap:wrap; gap:8px; font-size:12px; }
.analytics-badges>* { padding:6px 9px; border-radius:6px; background:#eef5f8; white-space:nowrap; }
.analytics-facts { padding:0 16px 16px; font-size:14px; overflow-wrap:anywhere; }
@media(max-width:760px) { .insight-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } .analytics-filters { grid-template-columns:1fr; } .analytics-address summary { flex-direction:column; align-items:flex-start; } .analytics-export b { flex-basis:100%; } .analytics-page { padding:14px; min-width:0; } }
