/* base.css */
/* ─── CSS custom properties, color schemes, reset, shared primitives ─── */

:root {
  color-scheme: light;
  --bg: #f6fbff;
  --surface: #ffffff;
  --surface-soft: #eef8ff;
  --text: #081a4a;
  --muted: #4c5f86;
  --text-muted: #4c5f86;
  --line: #dce7f5;
  --accent: #0b78f0;
  --accent-strong: #006be2;
  --success: #0aa876;
  --warning: #d86c00;
  --shadow: 0 16px 42px rgba(20, 52, 96, 0.1);
  --radius: 14px;
  --font-scale: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
}

html[data-font-scale="compact"] {
  --font-scale: 0.875;
}

html[data-font-scale="large"] {
  --font-scale: 1.15;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071120;
  --surface: #0e1a2c;
  --surface-soft: #10263f;
  --text: #edf5ff;
  --muted: #a9b9d3;
  --text-muted: #a9b9d3;
  --line: #243b5c;
  --accent: #4aa3ff;
  --accent-strong: #1687ff;
  --success: #36c991;
  --warning: #ffb05c;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: calc(16px * var(--font-scale));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(8, 119, 242, 0.08), transparent 26rem),
    radial-gradient(circle at 15% 72%, rgba(10, 168, 118, 0.06), transparent 22rem),
    linear-gradient(180deg, var(--bg), var(--bg));
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  min-width: 320px;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(100% - 28px, 1480px);
  margin-inline: auto;
}

/* ─── Shared card surface ─── */

.search-panel,
.panel,
.metric-card,
.map-card,
.price-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--shadow);
}

/* ─── Form primitives ─── */

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

select,
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

select:hover,
input:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}

select:focus,
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

input:disabled,
select:disabled {
  cursor: not-allowed;
  background: var(--surface-soft);
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

/* ─── Buttons ─── */

.button {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 40px;
  padding: 0 20px;
  color: var(--text);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 4px 16px rgba(11, 120, 240, 0.3);
}

.button.success {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
  width: 100%;
}

.button.ghost {
  background: var(--surface);
}

/* ─── Typography ─── */

h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.text-button.danger {
  color: #b42318;
}

.text-button.danger:hover {
  color: #7a271a;
}

/* ─── Cross-section muted text ─── */

.empty-state span,
.panel p,
.price-panel span {
  color: var(--muted);
}

/* ─── Analytics / consent banner (global overlay) ─── */

.analytics-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  width: min(560px, calc(100% - 36px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: 0 18px 50px rgb(15 23 42 / 0.18);
}

.analytics-banner p {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.analytics-banner div {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.analytics-banner .button {
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

/* topbar.css */
/* ─── Header, brand, navigation ─── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 48px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand.small {
  font-size: 1.0625rem;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid #17c8b0;
  position: relative;
  box-shadow: inset 0 0 0 5px var(--surface), inset 0 0 0 9px #dff8f3;
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent);
}

.nav-links,
.footer nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.is-active,
.footer nav a.is-active {
  color: var(--accent);
  font-weight: 800;
}

.nav-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.user-display {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-control {
  display: inline-flex;
  align-items: center;
}

.lang-control select {
  width: auto;
  min-width: 80px;
  min-height: 32px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0 4px 0 8px;
  border-radius: 6px;
  cursor: pointer;
}

.font-scale-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.font-scale-control span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.font-scale-control select {
  width: 52px;
  min-height: 32px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0 4px 0 8px;
  border-radius: 6px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
}

.icon-btn:hover {
  background: var(--surface-soft);
}

.mobile-only {
  display: none;
}

/* hero.css */
/* ─── Hero section, search panel, metric card, SEO pages ─── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 36px;
  align-items: end;
  padding: 56px 0 24px;
}

.product-focus {
  width: fit-content;
  margin: 0 0 14px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 850;
}

.hero-copy h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(40px, 4.5vw, 60px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero-copy h1 span {
  color: #0ca99b;
}

.hero-copy p {
  max-width: 600px;
  margin: 18px 0 22px;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
}

/* ─── SEO city/landing page hero ─── */

.seo-hero {
  padding: 92px 0 48px;
}

.seo-hero h1 {
  max-width: 860px;
  margin: 14px 0 18px;
  color: var(--ink);
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.96;
}

.seo-hero p:not(.product-focus) {
  max-width: 760px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.65;
}

.seo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.seo-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 64px;
}

.seo-keywords,
.seo-links {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.seo-links a {
  color: var(--ink);
  font-weight: 800;
}

.seo-store-section {
  padding-bottom: 72px;
}

.seo-store-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.seo-store-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgb(15 23 42 / 0.06);
}

.seo-store-card strong,
.seo-store-card span,
.seo-store-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.seo-store-card strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.seo-store-card span {
  color: var(--text);
  line-height: 1.45;
}

.seo-store-card small {
  color: var(--muted);
  font-weight: 800;
}

/* ─── Money page detail sections ─── */

.seo-detail {
  display: grid;
  gap: 16px;
  padding-bottom: 64px;
}

.seo-detail .panel h2 {
  margin: 0 0 14px;
}

.seo-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.seo-stat {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.seo-stat strong {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.35;
}

.seo-stat span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.seo-note {
  margin: 14px 0 0;
}

.seo-note a {
  color: var(--ink);
  font-weight: 800;
}

.seo-faq {
  display: grid;
  gap: 10px;
}

.seo-faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  background: var(--surface);
}

.seo-faq-item summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}

.seo-faq-item p {
  margin: 10px 0 0;
}

.seo-alt-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
  color: var(--muted);
}

.seo-alt-list strong {
  color: var(--ink);
}

.conversion-proof {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.conversion-proof img {
  width: min(100%, 520px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.conversion-proof figcaption {
  max-width: 65ch;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ─── Comparison table (Alternativen guide) ─── */

.seo-compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 4px 0 2px;
}

.seo-compare {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.seo-compare caption {
  text-align: left;
  color: var(--muted);
  font-size: 0.85rem;
  padding-bottom: 10px;
}

.seo-compare th,
.seo-compare td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border: 1px solid var(--line);
  line-height: 1.45;
}

.seo-compare th {
  color: var(--ink);
  background: var(--surface);
  font-weight: 600;
}

.seo-compare td {
  color: var(--muted);
}

.seo-compare td:first-child {
  color: var(--ink);
  font-weight: 600;
}

/* ─── Search form ─── */

.search-panel {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 0.75fr 0.65fr auto;
  gap: 12px;
  padding: 16px;
}

.search-button {
  align-self: end;
  white-space: nowrap;
}

/* ─── Metrics strip ─── */

.metric-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  overflow: hidden;
}

.metric-card div {
  min-height: 110px;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 20px;
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric-card div:nth-child(2n) {
  border-right: 0;
}

.metric-card div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.metric-card strong {
  font-size: 2rem;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.metric-card .data-status strong {
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: 0;
  line-height: 1.25;
}

.metric-card .data-status {
  align-content: center;
  padding: 16px;
  text-align: left;
}

.metric-card .data-status small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.data-status[data-state="fresh"] strong { color: var(--success); }
.data-status[data-state="partial"] strong,
.data-status[data-state="stale"] strong { color: #a05a00; }
.data-status[data-state="error"] strong { color: #b32626; }

.metric-card span {
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.875rem;
}

.metric-icon {
  color: var(--accent);
  display: none;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent);
  display: none;
}

/* dashboard.css */
/* ─── Map, availability table, filters, badges, state banners ─── */

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(560px, 0.92fr);
  gap: 18px;
  padding: 20px 0 24px;
  align-items: stretch;
}

.dashboard > * {
  min-width: 0;
}

.map-card {
  min-height: clamp(320px, 38vh, 480px);
  position: relative;
  overflow: hidden;
}

.map-frame {
  position: absolute;
  inset: 0;
}

#leaflet-map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Map summary inner layout — display:contents lets children be direct grid items on desktop */
.map-summary-info {
  display: contents;
}

.map-summary-count {
  display: contents;
}

.map-open-btn {
  display: none;
}

.map-summary {
  position: absolute;
  left: 22px;
  top: 22px;
  z-index: 2;
  width: 178px;
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 35px rgba(20, 52, 96, 0.16);
}

.map-summary strong {
  color: #0ca99b;
  font-size: 2.25rem;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.map-summary span {
  font-weight: 800;
}

.map-summary small {
  color: var(--muted);
  font-weight: 650;
}

.panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head.compact {
  align-items: start;
}

.list-controls {
  display: grid;
  grid-template-columns: minmax(120px, 0.85fr) minmax(120px, 0.95fr) minmax(100px, 0.7fr) minmax(150px, 1.05fr);
  gap: 10px;
  align-items: end;
  margin: 0 0 16px;
}

.list-controls label {
  gap: 6px;
}

.check-control {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  color: var(--text);
}

.check-control input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
}

.availability {
  display: flex;
  flex-direction: column;
  max-height: clamp(320px, 38vh, 480px);
  overflow: hidden;
}

.availability .table-wrap {
  flex: 1;
}

/* ─── Stock table ─── */

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
}

th:nth-child(1),
td:nth-child(1) {
  width: 18%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 22%;
}

th:nth-child(3),
td:nth-child(3) {
  width: 12%;
}

th:nth-child(4),
td:nth-child(4) {
  width: 16%;
}

th:nth-child(5),
td:nth-child(5) {
  width: 16%;
}

th:nth-child(6),
td:nth-child(6) {
  width: 16%;
}

th,
td {
  padding: 13px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
}

td {
  font-weight: 700;
}

/* ─── Stock badges ─── */

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

.badge.stock {
  background: color-mix(in srgb, var(--success) 18%, transparent);
  color: var(--success);
}

.badge.low {
  background: rgba(216, 108, 0, 0.15);
  color: var(--warning);
}

.badge.out {
  background: rgba(216, 60, 60, 0.12);
  color: #c03030;
}

/* ─── State banners ─── */

.state-banner,
.empty-state {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 750;
}

.state-banner.loading {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.state-banner.error {
  background: rgba(216, 108, 0, 0.13);
}

.empty-state {
  display: grid;
  gap: 4px;
  background: var(--surface-soft);
}

/* alerts.css */
/* ─── Insights strip, alert composer, Telegram panel, price chart, health card ─── */

.insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0 0 28px;
}

/* ─── Alert channel buttons ─── */

.alert-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 22px 0;
}

.alert-options button {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}

.alert-options button.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.alert-options button.coming-soon {
  opacity: 0.5;
  cursor: default;
  font-size: 0.8125rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.alert-options button.coming-soon span {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Upsell panel (unpaid users) ─── */

.alert-upsell {
  margin-top: 18px;
  padding: 20px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.alert-upsell p {
  margin: 0;
  font-weight: 500;
}

/* ─── Alert composer form ─── */

.alert-composer {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.composer-head,
.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer-head {
  margin-bottom: 14px;
}

.composer-head strong {
  font-size: 1rem;
}

.composer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.composer-grid .composer-full {
  grid-column: 1 / -1;
}

.composer-actions {
  margin-top: 14px;
}

.composer-actions .button {
  min-width: 150px;
}

/* ─── Telegram linking panel ─── */

.tg-link-panel {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tg-step {
  font-size: 0.875rem;
  margin: 0 0 8px;
}

.tg-code {
  font-family: monospace;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-align: center;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px dashed var(--accent);
  border-radius: 6px;
  cursor: pointer;
  user-select: all;
  margin-bottom: 8px;
}

.tg-open-btn {
  display: block;
  text-align: center;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #229ED9;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
}

.tg-open-btn:hover {
  opacity: 0.88;
}

.tg-status {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
}

.channel-label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 800;
}

/* ─── Price chart ─── */

.chart {
  height: 130px;
  padding: 8px 0;
  overflow: hidden;
}

.price-note {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}

/* ─── Alternatives card ─── */

.history-events,
.history-records {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.history-records {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.history-events li,
.history-records li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 0.8125rem;
}

.history-events span,
.history-records span {
  color: var(--muted);
  font-weight: 800;
}

.history-events strong,
.history-records strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-records small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 750;
}

.alternatives-card ul:not(.history-records),
.price-panel ul {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: grid;
  gap: 10px;
}

.alternatives-card ul:not(.history-records) li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 0.875rem;
}

/* ─── Health card ─── */

.health-card {
  display: grid;
  gap: 14px;
}

.health-card strong {
  color: var(--success);
  font-size: 1.0625rem;
  font-weight: 700;
}

.health-dots {
  display: flex;
  gap: 12px;
}

.health-dots span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--success);
}

.health-dots .muted {
  background: #b7c5d7;
}

/* ─── Mobile upsell card (hidden on desktop, shown via responsive.css) ─── */

.mobile-upsell {
  display: none;
}

.check-icon {
  color: #0ca99b;
  flex-shrink: 0;
}

/* cities.css */
/* ─── City shortcut grid ─── */

.cities {
  display: grid;
  grid-template-columns: minmax(260px, 0.48fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  padding: 6px 0 34px;
}

.section-copy h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 12px;
}

.section-copy p {
  margin: 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: 1rem;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.city-grid button {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(20, 52, 96, 0.07);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.city-grid button:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 12px 28px rgba(20, 52, 96, 0.12);
}

.city-grid button:active {
  transform: translateY(1px);
}

.city-grid span {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

/* pricing.css */
/* ─── Pricing section and payment UI ─── */

.pricing {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 26px;
  align-items: stretch;
  padding: 32px 0 48px;
}

.pricing-copy {
  align-self: center;
}

.pricing-copy h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.price-panel {
  position: relative;
  padding: 36px 40px;
  display: grid;
  gap: 12px;
}

.price-panel.featured {
  background: linear-gradient(135deg, color-mix(in srgb, var(--success) 16%, var(--surface)), var(--surface));
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
}

.price-panel.featured .price-content {
  display: grid;
  gap: 12px;
  align-content: start;
}

/* ─── Notification proof slideshow ─── */
.proof-slider {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.proof-track {
  position: relative;
  width: 100%;
  display: grid;
}

.proof-slide {
  grid-area: 1 / 1;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}

.proof-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.proof-slide img {
  width: 100%;
  height: auto;
  max-width: 360px;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  background: var(--surface);
}

.proof-caption {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted, var(--text));
  text-align: center;
}

.proof-nav {
  position: absolute;
  top: calc(50% - 14px);
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.proof-prev { left: -6px; }
.proof-next { right: -6px; }
.proof-nav:hover { background: var(--surface); }

.proof-dots {
  display: flex;
  gap: 8px;
}

.proof-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: color-mix(in srgb, var(--text) 28%, transparent);
}

.proof-dot.is-active {
  background: var(--success);
}

@media (prefers-reduced-motion: reduce) {
  .proof-slide { transition: none; }
}

.price-panel.pass-active {
  border-color: color-mix(in srgb, var(--success) 42%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--success) 22%, var(--surface)), var(--surface));
}

.price-panel strong {
  font-size: 3rem;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.price-panel li {
  color: var(--text);
  font-weight: 700;
}

.checkout-status {
  border-radius: 8px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 750;
}

.checkout-status.error {
  background: rgba(216, 60, 60, 0.12);
  color: #b32626;
}

.checkout-status.success {
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
}

.button.is-paid {
  cursor: default;
  background: color-mix(in srgb, var(--success) 80%, #ffffff);
  opacity: 1;
}

.payment-banner {
  position: fixed;
  top: 72px;
  left: 50%;
  z-index: 100;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 10px;
  background: #0aa876;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 18px 44px rgba(10, 168, 118, 0.22);
}

.plan-label {
  position: absolute;
  right: 24px;
  top: 0;
  transform: translateY(-50%);
  padding: 5px 12px;
  border-radius: 6px;
  background: #088f86;
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* footer.css */
/* ─── Footer, theme toggle, mobile bottom nav ─── */

.footer {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer nav {
  gap: 22px;
  font-size: 0.875rem;
}

.theme-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

/* ─── Mobile bottom navigation (hidden by default, shown at 680px breakpoint) ─── */

.bottom-nav {
  display: none;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 120ms ease;
}

.bottom-nav-item.is-active,
.bottom-nav-item:hover {
  color: var(--accent);
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
}

/* responsive.css */
/* ─── ALL responsive overrides — edit this file for mobile/tablet layout changes ─── */

/* ═══════════════════════════════════════════════════════
   TABLET  max-width: 1060px
   ═══════════════════════════════════════════════════════ */

@media (max-width: 1060px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 24px;
  }

  .nav-links {
    display: none;
  }

  .hero,
  .dashboard,
  .cities {
    grid-template-columns: 1fr;
  }

  .pricing {
    grid-template-columns: 1fr;
  }

  .price-panel.featured {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .price-panel.featured .proof-slider {
    order: -1;
  }

  .price-panel.featured .proof-slide img {
    max-height: 200px;
    width: auto;
  }

  .search-panel {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-button {
    grid-column: 1 / -1;
  }

  .insights {
    grid-template-columns: repeat(2, 1fr);
  }

  .city-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ═══════════════════════════════════════════════════════
   MOBILE  max-width: 680px
   ═══════════════════════════════════════════════════════ */

@media (max-width: 680px) {
  .shell {
    width: min(100% - 22px, 1280px);
  }

  /* ── Topbar ── */
  .topbar {
    min-height: 56px;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0;
    padding: 0 14px;
  }

  /* lang + font-scale stay visible on mobile but compact */
  .lang-control select {
    min-width: 54px;
    min-height: 32px;
    font-size: 0.75rem;
    padding: 0 2px 0 4px;
    border-radius: 6px;
  }

  .font-scale-control span {
    display: none;
  }

  .font-scale-control select {
    width: 40px;
    min-height: 32px;
    font-size: 0.75rem;
    padding: 0 2px 0 4px;
    border-radius: 6px;
  }

  .brand {
    font-size: 22px;
  }

  .nav-actions .ghost,
  .nav-actions .primary {
    display: none;
  }

  .nav-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
    width: auto;
    padding-bottom: 0;
    gap: 2px;
  }

  .mobile-only {
    display: flex;
  }

  /* ── Hero ── */
  .hero {
    padding: 16px 0 12px;
  }

  .seo-hero {
    padding: 48px 0 30px;
  }

  .seo-hero h1 {
    font-size: 40px;
  }

  .seo-hero p:not(.product-focus) {
    font-size: 16px;
  }

  .seo-content {
    grid-template-columns: 1fr;
    padding-bottom: 42px;
  }

  .seo-store-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 36px;
    line-height: 1.05;
    letter-spacing: -0.03em;
  }

  .hero-copy p {
    display: none;
  }

  .product-focus {
    display: none;
  }

  /* ── Search panel — 2×2 grid on mobile ── */
  .search-panel {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px;
  }

  .search-button {
    grid-column: 1 / -1;
    min-height: 48px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
  }

  .search-panel select,
  .search-panel input {
    min-height: 40px;
    font-size: 0.875rem;
    padding: 0 8px;
  }

  .search-panel label > span {
    font-size: 0.5625rem;
  }

  /* ── Alert composer ── */
  .composer-grid {
    grid-template-columns: 1fr;
  }

  .composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  /* ── Metrics strip — 4 columns with icons ── */
  .metric-card {
    grid-template-columns: repeat(4, 1fr);
  }

  .metric-card div {
    min-height: 64px;
    padding: 10px 6px;
    gap: 3px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    place-content: center;
    text-align: center;
  }

  .metric-card div:nth-child(2n) {
    border-right: 1px solid var(--line);
  }

  .metric-card div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .metric-card div:last-child {
    border-right: 0;
  }

  .metric-card strong {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  .metric-card span {
    font-size: 0.5rem;
    line-height: 1.3;
  }

  .metric-icon,
  .live-dot {
    display: block;
    margin-inline: auto;
  }

  /* ── Dashboard — map appears first (natural HTML order) ── */
  .map-card {
    display: flex;
    flex-direction: column;
    min-height: unset;
    order: 1;
  }

  .availability {
    order: 2;
    max-height: none;
  }

  /* ── Map card — summary becomes a header bar above the map ── */
  .map-summary {
    position: static;
    width: auto;
    box-shadow: none;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: auto;
    border-bottom: 1px solid var(--line);
  }

  .map-summary-info {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .map-summary-count {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
  }

  .map-summary strong {
    font-size: 1.625rem;
    letter-spacing: -0.03em;
  }

  .map-summary span {
    font-size: 0.9375rem;
    font-weight: 800;
  }

  .map-summary small {
    font-size: 0.75rem;
    color: var(--muted);
  }

  .map-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    background: var(--surface);
  }

  .map-open-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .map-frame {
    position: relative;
    flex: 1;
    min-height: 220px;
  }

  /* ── Table ── */
  .list-controls {
    display: none;
  }

  table {
    table-layout: fixed;
    width: 100%;
  }

  th:nth-child(3),
  td:nth-child(3) {
    display: none;
  }

  th:nth-child(1), td:nth-child(1) { width: 22%; }
  th:nth-child(2), td:nth-child(2) { width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  th:nth-child(4), td:nth-child(4) { width: 18%; }
  th:nth-child(5), td:nth-child(5) { width: 21%; }
  th:nth-child(6), td:nth-child(6) { width: 9%; text-align: center; }

  th,
  td {
    padding: 9px 4px;
    font-size: 0.75rem;
  }

  /* ── Stock badge → colored dot on mobile ── */
  .badge {
    font-size: 0;
    width: 10px;
    height: 10px;
    min-height: unset;
    border-radius: 50%;
    padding: 0;
    display: inline-block;
    vertical-align: middle;
  }

  .badge.stock { background: var(--success); }
  .badge.low   { background: var(--warning); }
  .badge.out   { background: #c03030; }

  /* ── Footer ── */
  .footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 0;
  }

  .footer nav {
    flex-wrap: wrap;
  }

  /* ── Analytics banner ── */
  .analytics-banner {
    left: 11px;
    right: 11px;
    bottom: 11px;
    width: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-banner div {
    width: 100%;
  }

  .analytics-banner .button {
    flex: 1;
  }

  /* ── Insights strip — alert card replaced by mobile upsell ── */
  .insights {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .alert-card,
  .health-card {
    display: none;
  }

  .chart-card,
  .alternatives-card {
    padding: 14px;
  }

  .chart-card h2,
  .alternatives-card h2 {
    font-size: 0.9375rem;
  }

  /* ── Mobile upsell card ── */
  .mobile-upsell {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 14px;
    grid-column: 1 / -1;
    border: 1px solid color-mix(in srgb, #0ca99b 30%, var(--line));
    border-radius: var(--radius);
    background: color-mix(in srgb, #0ca99b 7%, var(--surface));
    box-shadow: var(--shadow);
  }

  .mobile-upsell-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, #0ca99b 18%, var(--surface));
    color: #0ca99b;
  }

  .mobile-upsell-body {
    flex: 1;
    min-width: 0;
  }

  .mobile-upsell-body h3 {
    font-size: 0.9375rem;
    font-weight: 800;
    margin: 0 0 3px;
    letter-spacing: -0.01em;
  }

  .mobile-upsell-body p {
    font-size: 0.75rem;
    color: var(--muted);
    margin: 0 0 8px;
    line-height: 1.4;
  }

  .mobile-upsell-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 4px;
  }

  .mobile-upsell-body li {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
  }

  .mobile-upsell-price {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
    min-width: 105px;
  }

  .mobile-upsell-price > span {
    font-size: 0.625rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .mobile-upsell-price > strong {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
  }

  .mobile-upsell-price > strong em {
    font-size: 0.75rem;
    font-weight: 500;
    font-style: normal;
    color: var(--muted);
  }

  .mobile-upsell-price .button.success {
    width: 100%;
    font-size: 0.8125rem;
    font-weight: 700;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 8px;
  }

  .mobile-upsell-price > small {
    font-size: 0.625rem;
    color: var(--muted);
    line-height: 1.5;
    font-weight: 500;
  }

  /* ── Mobile nav dropdown (hamburger) ── */
  body.mobile-nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 4;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(20, 52, 96, 0.12);
    padding: 4px 20px;
    gap: 0;
  }

  body.mobile-nav-open .nav-links a {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
  }

  body.mobile-nav-open .nav-links a:last-child {
    border-bottom: 0;
  }

  /* ── Bottom nav ── */
  body {
    padding-bottom: 72px;
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    height: 64px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 20px rgba(20, 52, 96, 0.08);
  }
}
