/* /domains/gromadan.com/public_html/css/geo/analytics.css */
.an-card { width: 100%; max-width: 880px; margin: 0 auto; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px; }
.an-head { display: flex; flex-direction: column; gap: 12px; }
.an-h1 { font-size: 1.5rem; font-weight: 800; line-height: 1.25; }
.an-sec { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 22px; }
.an-sec-first { border-top: none; margin-top: 16px; padding-top: 0; }
.an-foot { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.an-meta, .an-note { font-size: 0.82rem; color: var(--text-secondary); }

.an-cur-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-cur-label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }
.an-cur-chip { padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--bg); color: var(--text-secondary); text-decoration: none; font-size: 0.82rem; font-weight: 600; }
.an-cur-chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.an-kpi { display: flex; flex-direction: column; gap: 4px; background: var(--bg); border-radius: var(--radius-md); padding: 14px 16px; }
.an-kpi-l { font-size: 0.78rem; color: var(--text-secondary); font-weight: 600; }
.an-kpi-v { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.an-kpi-v-sm { font-size: 1.05rem; }
.an-kpi-d { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-secondary); }
.an-delta i { font-style: normal; opacity: 0.8; }

.an-subs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-subs-label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }
.an-sub-chip { padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--bg); color: var(--text-secondary); text-decoration: none; font-size: 0.82rem; font-weight: 600; }
.an-sub-chip i { font-style: normal; opacity: 0.7; margin-left: 4px; }
.an-sub-chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.an-intro { line-height: 1.6; }
.an-block h2, .an-section-title { font-size: 1.05rem; margin-bottom: 10px; line-height: 1.3; }
.an-text { line-height: 1.6; margin-top: 10px; }
.an-text b, .an-intro b { color: var(--text-primary); font-weight: 700; }
.an-link { color: var(--primary); font-weight: 600; text-decoration: none; border-bottom: 1px solid transparent; }
.an-link:hover { border-bottom-color: var(--primary); }
.an-all-cities { align-self: flex-start; }

/* графіки + підказки */
.an-chart { display: block; width: 100%; height: auto; }
.an-grid { stroke: var(--border); stroke-width: 1; }
.an-axis { fill: var(--text-secondary); font-size: 11px; pointer-events: none; }
.an-val { fill: var(--text-primary); font-size: 12px; font-weight: 700; pointer-events: none; }
.an-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.an-area { fill: var(--primary-light); opacity: 0.7; pointer-events: none; }
.an-dot { fill: var(--primary); pointer-events: none; }
.an-pt { fill: var(--primary); opacity: 0; pointer-events: none; }
.an-hit { fill: transparent; cursor: pointer; }
.an-hit:hover + .an-pt { opacity: 1; }
.an-bar { fill: var(--primary-light); stroke: var(--primary); stroke-width: 1; pointer-events: none; }
.an-bar-hl { fill: var(--primary); }
.an-hit:hover + .an-bar { opacity: 0.8; }
.an-tip { position: fixed; z-index: 3000; left: 0; top: 0; max-width: 260px; padding: 7px 11px; border-radius: 8px; background: var(--text-primary); color: var(--surface); font-size: 0.8rem; font-weight: 600; line-height: 1.35; pointer-events: none; opacity: 0; transition: opacity 0.12s; }
.an-tip.show { opacity: 1; }

.an-cta { display: inline-block; padding: 12px 22px; border-radius: var(--radius-md); background: var(--gradient); color: #fff; font-weight: 700; text-decoration: none; }

/* плитки міст/категорій */
.an-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.an-hub-item { display: flex; flex-direction: column; gap: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; text-decoration: none; color: inherit; transition: var(--transition); }
.an-hub-item:hover { border-color: var(--primary); }
.an-hub-name { font-weight: 700; }
.an-hub-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.an-hub-val { color: var(--primary); font-weight: 800; font-size: 1.15rem; }
.an-hub-m2 { color: var(--text-secondary); font-size: 0.78rem; }
.an-hub-n { font-size: 0.8rem; color: var(--text-secondary); }

/* калькулятор */
.an-avm-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.an-avm-f { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.an-avm-f input, .an-avm-f select { width: 100%; padding: 11px 12px; border: 2px solid var(--border); border-radius: var(--radius-md); background: var(--bg); font-family: inherit; font-size: 0.95rem; color: var(--text-primary); }
.an-avm-out { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--primary-light); }
.an-avm-main { font-size: 1.4rem; font-weight: 800; color: var(--primary); min-height: 1.4em; }
.an-avm-range { font-size: 0.85rem; color: var(--text-secondary); }
.an-avm-note { margin-top: 10px; font-size: 0.78rem; color: var(--text-secondary); }

/* сезонні закономірності */
.an-pat { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.an-pat li { padding: 12px 14px; border-radius: var(--radius-md); background: var(--bg); line-height: 1.5; font-size: 0.92rem; }
.an-pat li.an-pat-now { background: var(--primary-light); }
.an-pat-badge { display: inline-block; margin-right: 6px; padding: 2px 9px; border-radius: var(--radius-pill); background: var(--primary); color: #fff; font-size: 0.72rem; font-weight: 700; }

@media (max-width: 640px) {
    .an-card { padding: 16px; border-radius: var(--radius-md); }
    .an-h1 { font-size: 1.25rem; }
}
/* перемикач метрики */
.an-mrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-msw { padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--bg); color: var(--text-secondary); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.an-card[data-metric="price"] .an-msw[data-an-metric="price"],
.an-card[data-metric="m2"] .an-msw[data-an-metric="m2"] { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.an-card[data-metric="price"] .an-v-m2,
.an-card[data-metric="m2"] .an-v-price { display: none; }

/* стрілки у тексті й підсумках */
.an-card b.an-up, .an-delta.an-up { color: #16a34a; }
.an-card b.an-down, .an-delta.an-down { color: #dc2626; }
.an-card b.an-zero { color: var(--text-secondary); }
.an-text b i, .an-intro b i { font-style: normal; font-size: 0.8em; margin-right: 3px; }

/* підвантаження */
.an-card.an-loading { opacity: 0.55; pointer-events: none; transition: opacity 0.15s; }
.an-subs + .an-subs { margin-top: 10px; }
.an-sub { margin: 0; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }
.an-back-ent { font-size: 0.85rem; align-self: flex-start; }