/* EcoПлощадка — the point-first Site Profile. Lean, self-contained. Fullscreen map + a floating
   briefing panel. No layer controls: click a point, read what's around it. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1d2b3a; }
body { display: flex; flex-direction: column; }

.site-header {
  display: flex; align-items: center; gap: 12px; padding: 8px 14px;
  background: #fff; border-bottom: 1px solid #e3e9f0; z-index: 900;
}
.site-brand { font-weight: 700; font-size: 17px; color: #1d2b3a; text-decoration: none; }
.site-brand span { color: #0d7470; }
.site-beta { font-size: 12px; color: #5a6875; background: #e7f3f1; padding: 2px 8px; border-radius: 10px; }
.site-header .site-spacer { flex: 1; }
.site-lang { display: flex; gap: 2px; }
.site-lang button { font-size: 12px; padding: 3px 8px; border: 1px solid #d3dbe4; background: #fff; border-radius: 4px; cursor: pointer; color: #46586a; }
.site-lang button[aria-pressed="true"] { background: #e7f3f1; color: #0a5a57; border-color: #b5d9d4; }
.site-adv { font-size: 12.5px; color: #0d7470; text-decoration: none; }
.site-adv:hover { text-decoration: underline; }

.site-main { position: relative; flex: 1; min-height: 0; }
#map { position: absolute; inset: 0; }

#map-hint {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 800;
  background: rgba(29,43,58,0.9); color: #fff; font-size: 13.5px; padding: 7px 14px;
  border-radius: 6px; pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,0.25); max-width: 90%;
}

.site-search-wrap { position: absolute; top: 14px; left: 58px; z-index: 800; } /* clear of the Leaflet zoom control (BUG-P-007) */
#site-search {
  width: 260px; max-width: 60vw; padding: 8px 11px; font-size: 13.5px; border: 1px solid #c3ccd6;
  border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.site-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 360px; max-width: 92vw; z-index: 850;
  background: #fff; border-left: 1px solid #e3e9f0; box-shadow: -2px 0 12px rgba(0,0,0,0.12);
  overflow-y: auto; padding: 16px 18px 22px;
}
.site-panel[hidden] { display: none; }
.site-panel h2 { margin: 0 0 10px; font-size: 16px; }
.site-close { position: absolute; top: 10px; right: 12px; border: none; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: #8896a5; }
.site-close:hover { color: #46586a; }

.site-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f0f3f7; font-size: 13.5px; }
.site-row span { color: #46586a; }
.site-row b { text-align: right; font-weight: 600; }
.site-air b { color: #1d2b3a; font-size: 15px; }
.site-sub { font-size: 11.5px; color: #7a8794; padding: 2px 0 6px; }
.site-muted { color: #8896a5; font-weight: 400; }
.site-ring { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid #f0f3f7; font-size: 13.5px; }
.site-ring:last-child { border-bottom: none; }
.site-ring-r { flex: 0 0 42px; font-weight: 700; color: #2c6e8f; }
.site-ring-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.site-ring-body .site-muted { font-size: 12px; }
.site-admin { color: #2c6e8f; font-weight: 600; }
.site-ai { margin: 10px 0; }
.site-ai-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid #cbd8e2; border-radius: 8px; background: #f2f8fc; color: #1f5c7a; font-size: 13px; font-weight: 600; cursor: pointer; }
.site-ai-btn:hover { background: #e6f1f8; }
.site-ai-out { margin-top: 8px; padding: 12px 14px; background: #f7fbfd; border: 1px solid #dde8ef; border-radius: 10px; font-size: 13.5px; line-height: 1.5; }
.site-ai-out p { margin: 0 0 8px; }
.site-ai-label { font-size: 11px; color: #8896a5; }

.site-summary { margin: 12px 0; font-size: 13px; padding: 9px 11px; border-radius: 6px; background: #f3f6fa; color: #46586a; }
.site-summary.site-warn { background: #fdf1ec; color: #8a4a2f; }

.site-cta-wrap { margin: 14px 0 6px; }
.site-cta-label { display: block; font-size: 12.5px; color: #46586a; margin-bottom: 8px; }
.site-cta-label select { display: block; width: 100%; margin-top: 4px; padding: 6px 8px; font-size: 13px; border: 1px solid #c3ccd6; border-radius: 5px; }
.site-cta { display: inline-block; margin-top: 6px; padding: 9px 14px; background: #0d7470; color: #fff; text-decoration: none; border-radius: 6px; font-size: 13.5px; font-weight: 600; }
.site-cta:hover { background: #0a5a57; }

.site-disclaimer { margin-top: 16px; font-size: 11px; line-height: 1.5; color: #7a8794; border-top: 1px solid #eef2f6; padding-top: 10px; }

/* ── Sectioned briefing (redesign 2026-08-20): six blocks of one answer ─────────────────────── */
.site-panel { width: 400px; }
#map-hint.site-hint-off { display: none; }
.site-head-meta { display: flex; align-items: center; gap: 10px; margin: -4px 0 2px; }
.site-coords { font-size: 12px; color: #7a8794; font-variant-numeric: tabular-nums; }
.site-link-btn { font-size: 11.5px; color: #0d7470; background: none; border: 1px solid #cfe0f0; border-radius: 12px; padding: 2px 10px; cursor: pointer; }
.site-link-btn:hover { background: #e7f3f1; }

.site-badge { margin: 10px 0 4px; font-size: 13px; padding: 9px 12px; border-radius: 8px; background: #eef4f0; color: #2c5f46; border: 1px solid #d5e6dc; }
.site-badge.site-warn { background: #fdf4ec; color: #8a5a2f; border-color: #f0dcc4; }

.site-sec { margin: 16px 0 0; padding: 12px 14px 10px; background: #fbfcfd; border: 1px solid #e8edf2; border-radius: 10px; }
.site-sec h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #46586a; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.site-sec-why { font-size: 11px; letter-spacing: 0; text-transform: none; color: #93a1ae; font-weight: 400; }
.site-sec .site-row:last-child { border-bottom: none; }
.site-h4 { margin: 10px 0 2px; font-size: 12px; color: #46586a; }
.site-absent b { font-style: italic; font-weight: 400; }

.site-rose-wrap { display: flex; gap: 14px; align-items: center; padding: 4px 0; flex-wrap: wrap; }
.site-rose-text { font-size: 13px; color: #1d2b3a; min-width: 150px; flex: 1; }
.site-carry { color: #8a5a2f; margin-top: 2px; }

.site-next-intro { margin: 2px 0 6px; font-size: 13px; color: #46586a; }
.site-steps { margin: 0 0 8px; padding-left: 18px; font-size: 12.5px; color: #46586a; }
.site-steps li { margin: 3px 0; }
.site-links { margin: 6px 0; font-size: 12.5px; }
.site-links a { color: #0d7470; text-decoration: none; }
.site-links a:hover { text-decoration: underline; }

.site-lims { margin-top: 14px; font-size: 12px; color: #5a6875; }
.site-lims summary { cursor: pointer; color: #46586a; font-weight: 600; padding: 4px 0; }
.site-lims ul { margin: 6px 0 0; padding-left: 18px; }
.site-lims li { margin: 4px 0; line-height: 1.45; }

/* ── Ask-first wizard (2026-08-25): what to place → which oblast → map opens there ──────────── */
/* The wrap is click-through (pointer-events: none): the map behind stays fully interactive, so a
   direct map click is an honest skip. Only the card itself catches the pointer. */
.site-wizard { position: absolute; inset: 0; z-index: 860; display: flex; align-items: flex-start; justify-content: center; padding: 48px 14px 14px; pointer-events: none; }
.site-wizard[hidden] { display: none; }
.site-wiz-card { pointer-events: auto; width: 420px; max-width: 94vw; background: #fff; border: 1px solid #e3e9f0; border-radius: 12px; box-shadow: 0 6px 28px rgba(0,0,0,0.18); padding: 18px 20px 16px; }
.site-wiz-card h2 { margin: 0 0 6px; font-size: 16px; }
.site-wiz-lede { font-size: 12.5px; color: #46586a; margin: 0 0 4px; line-height: 1.45; }
.site-wiz-label { display: block; font-size: 12.5px; color: #46586a; margin: 10px 0 0; }
.site-wiz-label select { display: block; width: 100%; margin-top: 4px; padding: 7px 8px; font-size: 13px; border: 1px solid #c3ccd6; border-radius: 5px; background: #fff; }
.site-wiz-note { font-size: 11px; color: #93a1ae; margin: 10px 0 0; line-height: 1.4; }
.site-wiz-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.site-wiz-go { padding: 9px 16px; background: #0d7470; color: #fff; border: none; border-radius: 6px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.site-wiz-go:hover { background: #0a5a57; }
.site-wiz-skip { font-size: 12px; color: #5a6875; background: none; border: none; cursor: pointer; text-decoration: underline; padding: 0; }
.site-wiz-skip:hover { color: #0d7470; }

/* ── Parcel outline controls (plan item 8 v1, 2026-08-26) ───────────────────────────────────── */
.site-parcel-wrap { position: absolute; top: 58px; left: 58px; z-index: 800; display: flex; gap: 6px; }
.site-parcel-wrap button {
  padding: 7px 11px; font-size: 12.5px; border: 1px solid #c3ccd6; border-radius: 6px;
  background: #fff; color: #0d7470; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.12); font-weight: 600;
}
.site-parcel-wrap button:hover { background: #e7f3f1; }
.site-parcel-wrap [hidden] { display: none; }
#parcel-tools { display: inline-flex; gap: 6px; }
#parcel-tools[hidden] { display: none; } /* the id rule outranked [hidden]: «Готово»/«Отмена» showed before any drawing (BUG-P-007) */
.site-parcel-badge { background: #e7f3f1; color: #0a5a57; border-color: #b5d9d4; }

/* ── Compare mode (plan item 6, 2026-08-26): up to three saved briefings side by side ───────── */
.site-cmp { position: absolute; inset: 0; z-index: 870; display: flex; align-items: flex-start; justify-content: center; padding: 40px 14px 14px; pointer-events: none; }
.site-cmp[hidden] { display: none; }
.site-cmp-card { pointer-events: auto; position: relative; width: 720px; max-width: 96vw; max-height: 86%; overflow-y: auto; background: #fff; border: 1px solid #e3e9f0; border-radius: 12px; box-shadow: 0 6px 28px rgba(0,0,0,0.18); padding: 18px 20px 16px; }
.site-cmp-card h2 { margin: 0 0 6px; font-size: 16px; }
.site-cmp-scroll { overflow-x: auto; }
.site-cmp-table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.site-cmp-table th { text-align: left; color: #46586a; font-weight: 600; padding: 6px 10px 6px 0; border-bottom: 1px solid #f0f3f7; white-space: nowrap; }
.site-cmp-table td { padding: 6px 10px; border-bottom: 1px solid #f0f3f7; vertical-align: top; min-width: 130px; }
.site-cmp-open { color: #0d7470; text-decoration: none; font-size: 12px; }
.site-cmp-open:hover { text-decoration: underline; }

/* Oblast silhouette trace — same motion as the Atlas picker's «snake over the border line». */
.site-border-snake.run { transition: stroke-dashoffset 1.6s ease; }
.site-border-snake.settled { stroke-opacity: 0.45; stroke-width: 1.5; }

@media (max-width: 640px) {
  .site-panel { width: 100%; top: auto; height: 68%; border-left: none; border-top: 1px solid #e3e9f0; border-radius: 14px 14px 0 0; }
  #site-search { width: 200px; }
  .site-wizard { padding-top: 64px; }
}

/* ── «Распечатать справку» (2026-08-26): the briefing prints as a standalone passport page —
   map and chrome hidden, the panel flows as a document. Ctrl+P or the panel button. ─────────── */
@media print {
  .site-header, #map, .site-search-wrap, #map-hint, .site-wizard, .site-parcel-wrap, .site-cmp,
  .site-close, .site-ai, .site-link-btn, .site-cta { display: none !important; }
  html, body { height: auto; }
  body { display: block; }
  .site-main { position: static; }
  .site-panel {
    position: static; width: 100%; max-width: none; height: auto;
    border: none; box-shadow: none; overflow: visible; padding: 0;
  }
  .site-sec { break-inside: avoid; background: #fff; }
  .site-lims { display: block; }
}
