/* BG16RFPR001-2.003 microsite — mobile-first UI fix */
:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --ink: #14201a;
  --muted: #4a5c52;
  --line: #d5e0d9;
  --accent: #1f6b45;
  --accent-dark: #145234;
  --warn: #8a5a00;
  --warn-bg: #fff9ec;
  --danger: #9b1c1c;
  --focus: #0b57d0;
  --header-h: 4.5rem;
  --sticky-h: 64px;
  --anchor-gap: 1.25rem;
  --radius: 20px;
  --focus: #1f6b45;
  --shadow-soft: 0 10px 30px rgba(20, 50, 35, .06);
  --trans: 150ms ease;
  --max: 80rem; /* ~1280px; 4K → 1400px по-долу */
  --font: "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
}

@media (max-width: 899px) {
  :root {
    --header-h: 7.25rem;
    --anchor-gap: 1rem;
  }
}
/* Phone: едноредов header → по-ниска височина за scroll-padding */
@media (max-width: 480px) {
  :root {
    --header-h: 3.75rem;
    --anchor-gap: 0.85rem;
  }
}
@media (min-width: 900px) and (max-width: 1099px) {
  :root {
    --header-h: 5.5rem;
  }
}
/* 4K / широки екрани: content max ~1400px */
@media (min-width: 1600px) {
  :root {
    --max: 87.5rem; /* 1400px */
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--anchor-gap));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.15vw, 1.125rem);
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #dceee4 0%, transparent 55%),
    linear-gradient(180deg, #eef5f0 0%, var(--bg) 40%, #e8f0eb 100%);
  padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom, 0px) + 1rem);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

.skip-link {
  position: absolute;
  left: .5rem;
  top: .5rem;
  z-index: 10000;
  padding: .75rem 1rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  /* visually hidden until реален keyboard focus */
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.skip-link:focus,
.skip-link:focus-visible {
  clip: auto;
  clip-path: none;
  width: auto;
  height: auto;
  overflow: visible;
  white-space: normal;
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}
@media (min-width: 768px) {
  .wrap { width: min(100% - 3rem, var(--max)); }
}

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(8px);
  background: rgba(244, 247, 245, .94);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem 1rem; padding: .65rem 0;
  flex-wrap: wrap;
}
.brand-slot {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; color: var(--ink); min-height: 44px;
  flex: 0 0 auto;
}
.brand-slot:hover { color: var(--accent-dark); }
.brand-logo {
  display: none;
  height: 36px;
  width: auto;
  max-width: min(168px, 46vw);
  object-fit: contain;
  object-position: left center;
  /* само намаляване на master — без upscale/разтягане */
  image-rendering: auto;
  flex: 0 0 auto;
}
.brand-slot.has-logo .brand-logo { display: block; }
.brand-slot.has-logo .brand-wordmark {
  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: 480px) {
  .brand-logo { height: 30px; max-width: min(120px, 38vw); }
}
@media (min-width: 1920px) {
  /* +~7% спрямо 40px — баланс на desktop/4K */
  .brand-logo { height: 43px; max-width: 190px; }
}
.brand-wordmark {
  font-weight: 750; font-size: 1.05rem; letter-spacing: -0.01em;
}
.header-main {
  display: flex; align-items: center; gap: .75rem 1rem;
  flex: 1 1 auto; justify-content: flex-end; flex-wrap: wrap;
  min-width: 0;
}
.nav-mini {
  display: none;
  gap: .85rem; flex-wrap: wrap; font-size: .92rem;
}
.nav-mini a { text-decoration: none; color: var(--muted); padding: .35rem 0; min-height: 44px; display: inline-flex; align-items: center; }
.nav-mini a:hover { color: var(--ink); }
.header-actions { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.official-link {
  font-size: .82rem; color: var(--muted); text-decoration: none;
  white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center;
}
.official-link:hover { color: var(--accent-dark); }

@media (min-width: 900px) {
  .header-inner { flex-wrap: nowrap; }
  .nav-mini { display: flex; margin-right: auto; margin-left: 1rem; }
}
@media (max-width: 899px) {
  .header-actions .btn { padding: .55rem .9rem; font-size: .92rem; }
  .site-header .official-link { display: none; } /* остава в hero/footer */
}

/* Phone ≤480: logo ляво + primary CTA дясно; без „Обадете се“ в top header */
@media (max-width: 480px) {
  .header-inner {
    flex-wrap: nowrap;
    gap: .5rem;
    padding: .45rem 0;
    overflow: hidden;
  }
  .brand-slot { min-width: 0; max-width: 42%; }
  .header-main {
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
  }
  .header-actions {
    flex-wrap: nowrap;
    gap: .35rem;
    min-width: 0;
  }
  .header-call { display: none !important; } /* телефонът остава в sticky CTA */
  .header-actions .header-cta {
    padding: .5rem .85rem;
    font-size: .88rem;
    white-space: nowrap;
    max-width: 100%;
  }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px;
  padding: .6rem 1.05rem; border-radius: 999px;
  border: 1px solid transparent; font: inherit; font-weight: 650;
  text-decoration: none; cursor: pointer; gap: .4rem;
}
.btn:focus-visible, .linkish:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary {
  background: transparent; border-color: var(--line); color: var(--ink);
  font-weight: 600;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }

/* ---- Hero ---- */
.hero { padding: 1.35rem 0 1.25rem; }
.hero-grid { display: grid; gap: 1.35rem; align-items: center; }
@media (min-width: 900px) {
  /* ~58% content / ~42% process card */
  .hero-grid { grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr); gap: 1.75rem; }
}
.hero-copy { min-width: 0; }

.procedure-label {
  display: grid; gap: .12rem; margin: 0 0 .7rem;
  color: var(--accent-dark);
}
.procedure-code {
  font-size: clamp(0.92rem, 0.88rem + 0.22vw, 1.12rem);
  font-weight: 800; letter-spacing: 0.01em; line-height: 1.25;
  color: var(--accent);
}
.procedure-name {
  font-size: clamp(0.88rem, 0.84rem + 0.18vw, 1.02rem);
  font-weight: 600; line-height: 1.35; color: var(--muted);
}

h1 {
  /* Controlled H1: ~2–3 lines on desktop, not a 5–6 line wall */
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.35rem);
  line-height: 1.2; margin: 0 0 .65rem; letter-spacing: -0.02em;
  max-width: 22rem;
  overflow-wrap: normal; hyphens: manual;
}
@media (min-width: 900px) {
  h1 { max-width: 26rem; font-size: clamp(1.85rem, 1.55rem + 0.55vw, 2.4rem); }
}
@media (min-width: 1920px) {
  h1 { font-size: 2.45rem; max-width: 28rem; }
}
.hero-br { display: none; }
@media (min-width: 900px) {
  .hero-br { display: inline; }
}

.lead {
  color: var(--muted); margin: 0 0 .85rem;
  max-width: 38rem; font-size: clamp(0.98rem, 0.94rem + 0.15vw, 1.08rem);
  line-height: 1.5;
}
.kpi-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .65rem; margin: 1rem 0 .55rem; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: .7rem .55rem; text-align: center;
}
.kpi strong { display: block; font-size: clamp(0.95rem, .88rem + .4vw, 1.15rem); }
.kpi span { font-size: .78rem; color: var(--muted); }
.trust-note { font-size: .85rem; color: var(--muted); margin-top: .55rem; }
.trust-notes {
  margin: .45rem 0 0;
  display: grid;
  gap: .35rem;
  max-width: 42rem;
}
.trust-note--kpi,
.trust-note--disclaimer {
  margin: 0;
  font-size: .78rem;
  line-height: 1.45;
  color: var(--muted);
}
.trust-note--disclaimer { opacity: .92; }

.hero-cta {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .85rem;
  width: 100%;
  max-width: none;
}
.hero-cta-actions {
  margin: 0 !important;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
}
.hero-cta-actions .btn-primary {
  flex: 0 1 auto;
  min-width: 11rem;
}
.hero-cta-actions .btn-secondary {
  flex: 0 1 auto;
}

/* Strong warm free-precheck balloon — full width under CTAs */
.hero-free-check {
  display: flex;
  align-items: center;
  gap: .85rem;
  width: 100%;
  box-sizing: border-box;
  padding: 1rem 1.15rem;
  background: #fbf6eb;
  border: 1.5px solid #dfc896;
  border-radius: 14px;
  color: #3d3424;
  box-shadow: 0 6px 18px rgba(120, 90, 30, .07);
}
.hero-free-check-ico {
  width: 2.6rem; height: 2.6rem; flex: 0 0 auto;
  border-radius: 12px;
  display: grid; place-items: center;
  background: #f1e4c8;
  color: #8a6a28;
}
.hero-free-check-text {
  display: grid; gap: .2rem; min-width: 0; text-align: left;
}
.hero-free-check-text strong {
  font-size: clamp(1.05rem, 0.98rem + 0.25vw, 1.22rem);
  font-weight: 800; line-height: 1.25; color: #2c2418;
}
.hero-free-check-text span {
  font-size: .9rem; line-height: 1.35; color: #6a5c45; font-weight: 550;
}

.hero-visual {
  background: linear-gradient(155deg, #1c6140 0%, #123b2a 52%, #163348 100%);
  color: #e9f6ef; border-radius: 16px; padding: 1.2rem 1.25rem;
  box-shadow: 0 14px 36px rgba(20, 50, 35, .16);
  display: flex; flex-direction: column; justify-content: center;
  min-height: 0;
}
.hero-visual-title {
  margin: 0 0 .95rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
  line-height: 1.3;
}
.flow { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.flow li {
  display: grid; grid-template-columns: 2.1rem 1fr; gap: .65rem; align-items: center;
  font-size: .93rem; line-height: 1.35;
  min-height: 2.35rem;
  padding: .35rem .4rem;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
}
.flow-num {
  width: 2.1rem; height: 2.1rem; border-radius: 999px; background: rgba(255,255,255,.14);
  display: grid; place-items: center; font-size: .72rem; font-weight: 800;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}

/* ---- Sections / anchors ---- */
section {
  padding: 1.75rem 0;
  scroll-margin-top: calc(var(--header-h) + var(--anchor-gap));
}
.section-title {
  font-size: clamp(1.35rem, 1.15rem + .8vw, 1.9rem);
  margin: 0 0 .5rem; line-height: 1.25;
}
.section-sub { color: var(--muted); margin: 0 0 1rem; max-width: 45rem; }

.card-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem 1.2rem;
  box-shadow: var(--shadow-soft);
}
.form-card { padding: 1.5rem 1.35rem; }
@media (min-width: 700px) {
  .form-card { padding: 1.75rem; }
}
.warn-panel { border-color: #e6d3a3; background: var(--warn-bg); }
.neq { font-weight: 700; margin: .5rem 0; }
.checks { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 1rem 0; padding: 0; list-style: none; }
.checks li {
  background: #f3faf6; border: 1px solid var(--line); border-radius: 12px;
  padding: .7rem .8rem; font-weight: 600; font-size: .95rem;
}

/* Eligibility checkpoints — compact 3×2, не празни клетки */
.eligibility-grid {
  list-style: none; margin: 1rem 0 0; padding: 0;
  display: grid; gap: .7rem;
  grid-template-columns: 1fr;
}
@media (min-width: 480px) {
  .eligibility-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .eligibility-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
}
.elig-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon num"
    "icon title"
    "icon desc";
  column-gap: .7rem;
  row-gap: .15rem;
  align-content: start;
  background: linear-gradient(180deg, #fbfdfc 0%, #f4faf6 100%);
  border: 1px solid #d5e4db;
  border-radius: 14px;
  padding: .85rem .9rem;
  transition: border-color var(--trans), box-shadow var(--trans), transform var(--trans);
}
.elig-item:hover, .elig-item:focus-within {
  border-color: #8fbfa3;
  box-shadow: 0 6px 18px rgba(20, 60, 40, .07);
  transform: translateY(-1px);
}
.elig-icon {
  grid-area: icon;
  width: 2.25rem; height: 2.25rem;
  border-radius: 10px;
  display: grid; place-items: center;
  background: #e7f3ec;
  color: var(--accent-dark);
  align-self: start;
}
.elig-num {
  grid-area: num;
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  color: #6a8a78; font-variant-numeric: tabular-nums;
}
.elig-title {
  grid-area: title;
  font-weight: 800; font-size: 1.02rem; line-height: 1.2; color: var(--ink);
}
.elig-desc {
  grid-area: desc;
  font-size: .86rem; line-height: 1.35; color: var(--muted); font-weight: 450;
}

/* Green tech logic — equal pill widths; arrows as connectors outside pill box */
.neq-block {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .75rem;
  margin: .85rem 0 1rem; font-weight: 800; font-size: clamp(1.05rem, 1rem + .4vw, 1.35rem);
}
.neq-op { color: var(--accent); font-size: 1.35em; line-height: 1; }
.neq-b { color: var(--muted); font-weight: 700; }
.logic-chain {
  list-style: none; margin: 0 0 1rem; padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  align-items: stretch;
}
.logic-step {
  position: relative;
  min-width: 0;
  margin: 0;
}
.logic-label {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 2.85rem;
  box-sizing: border-box;
  background: #eef7f1; border: 1px solid #c9dfd2;
  color: var(--accent-dark); border-radius: 12px;
  padding: .55rem .75rem;
  font-weight: 700; font-size: .9rem; line-height: 1.25;
  text-align: center;
}
/* Mobile: стрелка надолу между pills */
.logic-step:not(:last-child)::after {
  content: "↓";
  position: absolute;
  left: 50%;
  bottom: -1.05rem;
  transform: translateX(-50%);
  color: var(--accent);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1;
  pointer-events: none;
}
@media (min-width: 640px) and (max-width: 899px) {
  .logic-chain {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.75rem;
  }
  .logic-step:nth-child(1)::after,
  .logic-step:nth-child(3)::after {
    content: "→";
    left: auto; right: -1.15rem; top: 50%; bottom: auto;
    transform: translateY(-50%);
  }
  .logic-step:nth-child(2)::after { content: none; }
}
@media (min-width: 900px) {
  .logic-chain {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.75rem;
  }
  .logic-step:not(:last-child)::after {
    content: "→";
    left: auto; right: -1.2rem; top: 50%; bottom: auto;
    transform: translateY(-50%);
  }
}

.process-grid {
  list-style: none; margin: 1rem 0; padding: 0;
  display: grid; gap: .65rem; grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .process-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.process-item {
  display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: .85rem 1rem;
}
.process-num {
  width: 1.75rem; height: 1.75rem; border-radius: 999px;
  display: grid; place-items: center; font-size: .8rem; font-weight: 800;
  background: #e7f3ec; color: var(--accent-dark);
}
.process-text { font-weight: 650; line-height: 1.35; }

.compare-panel .compare-row {
  display: flex; flex-wrap: wrap; gap: .45rem .55rem; align-items: center;
  margin: .75rem 0 1rem; font-weight: 700;
}
.compare-a { color: var(--muted); }
.compare-b { color: var(--accent-dark); }
.compare-sep { color: var(--accent); }

.form-panel { scroll-margin-top: calc(var(--header-h) + var(--anchor-gap)); }
.form-intro { margin: 0 0 .5rem; font-size: .95rem; color: var(--ink); }
.form-reassure {
  margin: 0 0 1.1rem; padding-left: 1.1rem; color: var(--muted); font-size: .92rem;
}
.form-reassure li { margin-bottom: .2rem; }

.progress {
  display: flex; align-items: stretch; gap: .5rem; margin: 0 0 1.25rem;
}
.progress-step {
  flex: 1; min-width: 0;
  border: 1px solid var(--line); border-radius: 14px; background: #f8fbf9;
  padding: .65rem .75rem; transition: border-color var(--trans), background var(--trans);
}
.progress-step.on { background: #e9f5ee; border-color: #8fbfa3; }
.progress-step.done { background: #f1f7f3; border-color: #b9d0c1; }
.progress-step.done .progress-kicker::after { content: " ✓"; color: var(--accent-dark); }
.progress-kicker {
  display: block; font-size: .72rem; font-weight: 700; color: var(--muted);
  letter-spacing: .02em; margin-bottom: .15rem;
}
.progress-label { display: block; font-weight: 800; font-size: .98rem; }
.progress-connector {
  width: 18px; align-self: center; height: 2px; background: var(--line); flex: 0 0 auto;
}
@media (max-width: 480px) {
  .progress { gap: .25rem; margin-bottom: 1rem; }
  .progress-connector { width: 5px; }
  .progress-step { padding: .45rem .4rem; border-radius: 10px; }
  .progress-kicker { font-size: .62rem; letter-spacing: 0; }
  .progress-label { font-size: .78rem; line-height: 1.2; }
}

.field { margin-bottom: 1.15rem; }
.label-row {
  display: flex; align-items: center; gap: .4rem; margin-bottom: .4rem;
}
.label-row label { display: inline; font-weight: 650; margin: 0; }
.field > label { display: block; font-weight: 650; margin-bottom: .4rem; }
.info-btn {
  width: 1.6rem; height: 1.6rem; min-width: 1.6rem; min-height: 1.6rem;
  padding: 0; border-radius: 999px; border: 1px solid #c5d6cc;
  background: #f3faf6; color: var(--accent-dark); font-size: .85rem; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: border-color var(--trans), background var(--trans);
}
.info-btn:hover, .info-btn[aria-expanded="true"] {
  border-color: var(--accent); background: #e7f3ec;
}
.info-btn:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
.info-panel {
  margin: .45rem 0 0; padding: .65rem .75rem;
  background: #f3faf6; border: 1px solid #c9dfd2; border-radius: 10px;
  font-size: .88rem; color: var(--ink); line-height: 1.45;
}
.field .hint,
.field-help {
  display: block; font-size: .88rem; color: var(--muted); font-weight: 400;
  margin: .4rem 0 0; line-height: 1.4;
}
.field-help--soft { font-size: .82rem; opacity: .92; margin-top: .25rem; }
.char-count {
  margin: .3rem 0 0; font-size: .78rem; color: var(--muted);
  font-variant-numeric: tabular-nums; text-align: right;
}
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; min-height: 50px; padding: .7rem .85rem; border: 1px solid #b9c8bf;
  border-radius: 12px; font: inherit; background: #fff; color: var(--ink);
  transition: border-color var(--trans), box-shadow var(--trans);
}
textarea { min-height: 110px; resize: vertical; }
input[type="text"]:hover, input[type="email"]:hover, input[type="tel"]:hover, textarea:hover {
  border-color: #9fbbb0;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 107, 69, .18);
  outline: none;
}
input[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(155, 28, 28, .12);
}
input:disabled, textarea:disabled {
  background: #f0f3f1; color: var(--muted); cursor: not-allowed;
}
.field-error { color: var(--danger); font-size: .9rem; margin-top: .3rem; }
.field-warn {
  color: var(--warn); font-size: .9rem; margin-top: .4rem;
  background: var(--warn-bg); border: 1px solid #e6d3a3; border-radius: 10px; padding: .55rem .7rem;
}
.field-warn[hidden] { display: none !important; }
.error-summary {
  border: 1px solid #f1b4b4; background: #fff1f1; padding: .85rem 1rem;
  border-radius: 12px; margin-bottom: 1rem;
}
.error-summary[hidden], .step[hidden], .post-submit[hidden] { display: none !important; }

.docs-preview {
  margin: 1.1rem 0;
  padding: 1rem;
  border: 1px solid #c9dfd2;
  border-radius: 14px;
  background: #f7fbf8;
}
.docs-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
}
.docs-preview-title { margin: 0; font-size: 1rem; line-height: 1.35; }
.docs-preview-badge {
  flex: 0 0 auto;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: #e2f1e8;
  color: var(--accent-dark);
  font-size: .75rem;
  font-weight: 700;
}
.docs-preview-years {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}
.docs-preview-year {
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  min-width: 0;
}
.docs-preview-year ul {
  margin: .4rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
  font-size: .82rem;
}
.docs-preview-year li { margin-bottom: .2rem; }
.docs-preview-note { margin: .85rem 0 0; color: var(--muted); font-size: .88rem; }
.form-actions--submit { align-items: flex-start; }
.submit-stack { display: grid; gap: .3rem; }
.submit-micro { margin: 0; color: var(--muted); font-size: .8rem; text-align: center; }
@media (max-width: 700px) {
  .docs-preview-years { grid-template-columns: 1fr; }
  .docs-preview-year ul { columns: 2; column-gap: 1.5rem; }
}
@media (max-width: 480px) {
  .docs-preview { padding: .8rem; }
  .docs-preview-head { display: grid; }
  .docs-preview-year ul { columns: 1; }
  .submit-stack, .submit-stack .btn { width: 100%; }
}

/* Input + EUR suffix */
.input-with-suffix {
  display: grid; grid-template-columns: 1fr auto; align-items: stretch;
  border: 1px solid #b9c8bf; border-radius: 12px; background: #fff; overflow: hidden;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.input-with-suffix:hover { border-color: #9fbbb0; }
.input-with-suffix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 107, 69, .18);
  outline: none;
}
.input-with-suffix input {
  border: 0; border-radius: 0; min-width: 0; box-shadow: none !important;
}
.input-with-suffix input:focus-visible { outline: none; }
.input-suffix {
  display: inline-flex; align-items: center; padding: 0 .9rem;
  background: #eef5f0; color: var(--muted); font-weight: 700;
  border-left: 1px solid #b9c8bf; user-select: none;
}

/* Honeypot — visually hidden, out of a11y tree */
.hp-field {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important; border: 0 !important;
}

.privacy-box { font-size: .9rem; color: var(--muted); margin: 1rem 0; }
.success-badge {
  width: 2.5rem; height: 2.5rem; border-radius: 999px; margin: 0 0 .75rem;
  display: grid; place-items: center; background: #e7f3ec; color: var(--accent-dark);
  font-size: 1.25rem; font-weight: 800;
}
.success-reassure { border-left: 3px solid var(--accent); padding-left: .85rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

details.acc {
  border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: .6rem;
  transition: border-color var(--trans), box-shadow var(--trans);
}
details.acc summary {
  cursor: pointer; padding: .9rem 1rem; font-weight: 650; list-style: none;
  min-height: 48px; display: flex; align-items: center;
  transition: color var(--trans);
}
details.acc summary::-webkit-details-marker { display: none; }
details.acc .acc-body { padding: 0 1rem 1rem; color: var(--muted); }
.steps-list { margin: 0; padding-left: 1.1rem; }
.steps-list li { margin-bottom: .45rem; }

.btn {
  transition: color var(--trans), background var(--trans), border-color var(--trans), box-shadow var(--trans);
  min-height: 48px; border-radius: 12px;
}
.contact-phone, .contact-email { transition: color var(--trans); }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
  padding: .55rem .75rem calc(.55rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0,0,0,.06);
  transition: transform .2s ease, opacity .2s ease;
}
.sticky-cta.hidden-for-form,
body.cookie-open .sticky-cta {
  /* скриваме sticky, когато формата е фокусирана или cookie banner е отворен */
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .sticky-cta { transition: none; }
}
@media (min-width: 900px) {
  .sticky-cta { display: none; }
  body { padding-bottom: 1rem; }
}

.site-footer {
  margin-top: 0;
  padding: 2.25rem 0 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  gap: 1.85rem 1.5rem;
  align-items: start;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.05fr 1fr 1.1fr; }
}
.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
}
.footer-col-title {
  font-size: .95rem;
  margin: 0 0 1.1rem; /* ~18px */
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
}
.footer-about-text {
  margin: 0 0 .9rem;
  max-width: 36ch;
  line-height: 1.5;
  color: var(--muted);
}
.footer-about-code {
  display: inline;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.footer-company-name {
  margin: 0 0 .75rem;
  font-size: .95rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.35;
}
.footer-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .65rem; /* ~10px */
  width: 100%;
}
.footer-link-list a {
  display: inline-block;
  min-height: 1.4rem;
  padding: .05rem 0;
  text-decoration: none;
  color: var(--accent-dark);
  line-height: 1.35;
}
.footer-link-list a:hover,
.footer-link-list a:focus-visible {
  color: var(--accent);
  outline: none;
}

.footer-consultant .contact-row,
.footer-company .contact-row {
  margin: 0 0 .55rem !important; /* ~9px — компактен ред към ред */
  width: 100%;
  max-width: 100%;
}
.footer-consultant .contact-row:last-child,
.footer-company .contact-row:last-child {
  margin-bottom: 0 !important;
}
.footer-consultant .contact-email,
.footer-company .contact-email {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contact-meta {
  color: var(--muted) !important;
  cursor: default;
  pointer-events: none;
}
.contact-meta:hover,
.contact-meta:focus-visible {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--muted) !important;
}

/* Contact action rows — CTA + footer */
.contact-row {
  display: flex !important;
  align-items: center;
  gap: .55rem;
  min-height: 0 !important;
  padding: .35rem .45rem !important;
  margin: 0 !important;
  text-decoration: none;
  color: var(--accent-dark);
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background var(--trans), color var(--trans), border-color var(--trans);
  box-sizing: border-box;
  max-width: 100%;
  text-align: left;
}
.contact-row:hover, .contact-row:focus-visible {
  background: #eef7f1;
  border-color: #c9dfd2;
  color: var(--accent);
  outline: none;
}
.contact-location {
  color: var(--muted) !important;
  cursor: default;
  pointer-events: none;
}
.contact-location:hover,
.contact-location:focus-visible {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--muted) !important;
}
.contact-ico {
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #e7f3ec;
  color: var(--accent-dark);
}
#contacts { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* Final CTA contact block — без overlap; wrap при нужда */
.final-cta-panel { text-align: center; }
.cta-contact {
  margin: 1.15rem auto 0;
  max-width: min(52rem, 100%);
  padding: .95rem 1.15rem;
  background: #f6faf7;
  border: 1px solid #d5e6dc;
  border-radius: 14px;
  text-align: center;
}
.cta-contact-kicker {
  margin: 0 0 .7rem;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--muted);
}
.cta-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem .75rem;
  align-items: stretch;
  justify-content: center;
}
.cta-contact-actions > .contact-row,
.cta-contact-actions > .js-contact-reveal,
.cta-contact-actions > a.contact-revealed {
  flex: 1 1 17.5rem;
  max-width: 100%;
  width: auto;
  min-width: min(100%, 15rem);
  justify-content: flex-start;
  font-size: .92rem;
  white-space: normal;
  overflow: visible;
  box-sizing: border-box;
}
.cta-contact-actions .contact-row > span:last-child,
.cta-contact-actions .contact-value {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  min-width: 0;
}
/* Revealed phone може да остане на един ред, ако има място */
.cta-contact-actions a.contact-revealed.contact-phone .contact-value {
  white-space: nowrap;
  overflow-wrap: normal;
}

.footer-bottom {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-copy {
  margin: 0;
  font-size: .84rem;
  color: var(--muted);
}

/* Free preliminary check trust block (legacy — не се ползва в hero; запазен за евентуални други страници) */
.free-check-block {
  display: flex; align-items: flex-start; gap: .65rem;
  margin: 0 0 1rem; padding: .7rem .85rem;
  background: #fbf7ef; border: 1px solid #e4d5b5; border-radius: 12px;
}
.free-check-block--compact {
  padding: .55rem .75rem;
  margin: 0 0 .85rem;
}
.free-check-icon { color: #8a6a28; flex: 0 0 auto; margin-top: .05rem; }
.free-check-text {
  margin: 0; font-size: .9rem; line-height: 1.4; color: #2c2418; font-weight: 600;
}
.free-check-block--compact .free-check-text {
  font-size: .86rem; font-weight: 550; color: #3d3424;
}
.free-check-block--success {
  margin: .85rem 0;
  background: #fbf7ef; border-color: #e4d5b5;
}

/* EKATTE combobox */
.loc-combo { position: relative; }
.loc-listbox {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
  max-height: min(280px, 45vh); overflow: auto;
  margin: 0; padding: .25rem; list-style: none;
  background: #fff; border: 1px solid #b9c8bf; border-radius: 12px;
  box-shadow: 0 10px 28px rgba(20,50,35,.12);
}
.loc-option {
  display: grid; gap: .1rem; padding: .55rem .65rem; border-radius: 8px; cursor: pointer;
}
.loc-option[aria-selected="true"], .loc-option:hover { background: #eef7f1; }
.loc-option-title { font-weight: 700; font-size: .95rem; }
.loc-option-meta { font-size: .8rem; color: var(--muted); }
.loc-option-code { font-size: .75rem; color: #6a8a78; font-variant-numeric: tabular-nums; }
.loc-fallback-note { margin: .45rem 0 0; font-size: .88rem; color: var(--muted); }
button.linkish {
  border: 0; background: none; padding: 0; color: var(--accent-dark);
  text-decoration: underline; cursor: pointer; font: inherit;
}

.cookie-banner {
  position: fixed; left: .75rem; right: .75rem; bottom: calc(var(--sticky-h) + .75rem + env(safe-area-inset-bottom, 0px));
  z-index: 60; background: #122019; color: #eef6f1; border-radius: 14px;
  padding: 1rem; box-shadow: 0 12px 40px rgba(0,0,0,.25); max-width: 42rem;
  margin-inline: auto;
  max-height: min(70vh, 32rem);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}
@media (min-width: 900px) {
  .cookie-banner { bottom: 1rem; left: 1rem; right: auto; width: min(28rem, calc(100% - 2rem)); }
}
/* Mobile cookie: без хоризонтално clipping; бутони stacked */
@media (max-width: 480px) {
  .cookie-banner {
    left: .5rem; right: .5rem;
    bottom: .5rem;
    width: auto;
    max-width: none;
    padding: .9rem;
  }
  body.cookie-open .cookie-banner {
    /* sticky е скрит — banner може да стои ниско без застъпване */
    bottom: calc(.5rem + env(safe-area-inset-bottom, 0px));
  }
  .cookie-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: .5rem;
    margin-top: .75rem;
  }
  .cookie-actions .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    padding: .65rem .85rem;
    box-sizing: border-box;
  }
}
.cookie-banner[hidden] { display: none !important; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.cookie-banner .btn-primary { background: #3aa56d; }
.cookie-banner .btn-secondary { color: #fff; border-color: rgba(255,255,255,.45); }
.cookie-settings { margin-top: .75rem; }
.cookie-settings label { display: flex; gap: .5rem; align-items: flex-start; margin-bottom: .45rem; min-height: 44px; }

.year-upload { border: 1px dashed #9fb9aa; border-radius: 10px; padding: .85rem; margin-bottom: .75rem; background: #f7fbf8; }

/* Accessible hide — запазва keyboard / SR достъп до file input */
.visually-hidden-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.file-helper {
  margin: .35rem 0 .75rem;
  display: grid;
  gap: .15rem;
}
.file-helper-title {
  font-weight: 650;
  color: var(--ink);
  font-size: .95rem;
}
.file-helper-meta {
  color: var(--muted);
  font-size: .85rem;
}

.file-picker {
  position: relative;
  display: grid;
  gap: .65rem;
  margin-bottom: .75rem;
}
.file-pick-btn {
  width: fit-content;
  max-width: 100%;
  cursor: pointer;
  margin: 0;
}
.file-pick-btn:active { transform: translateY(1px); }

.file-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .65rem .85rem;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.file-list-empty {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}
.file-list-summary {
  margin: 0 0 .45rem;
  font-weight: 650;
  font-size: .92rem;
  color: var(--accent-dark);
}
.file-list ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink);
  font-size: .9rem;
}
.file-list li {
  margin-bottom: .25rem;
  overflow-wrap: anywhere;
}

.existing-files {
  margin: .65rem 0;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: .88rem;
}
.existing-files[hidden] { display: none !important; }
.existing-files strong { display: block; margin-bottom: .35rem; }
.existing-files ul { margin: 0; padding-left: 1.15rem; }
.existing-files li { margin-bottom: .25rem; overflow-wrap: anywhere; }
.capacity-note { color: var(--muted); font-size: .82rem; }

.file-upload-actions {
  margin-top: .35rem;
}
.file-upload-actions .btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}
.file-upload-actions .btn[hidden] {
  display: none !important;
}

.upload-progress {
  margin: .65rem 0 .85rem;
  min-width: 0;
}
.upload-progress[hidden] { display: none !important; }
.progress-meta {
  margin: 0 0 .4rem;
  font-size: .9rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.progress-track {
  height: 10px;
  background: #dfe8e2;
  border-radius: 999px;
  overflow: hidden;
  width: 100%;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .15s ease;
}
.progress-fill.is-indeterminate {
  width: 40% !important;
  animation: progress-indeterminate 1.2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .progress-fill { transition: none; }
  .progress-fill.is-indeterminate {
    animation: none;
    width: 100% !important;
    opacity: .55;
  }
}
@keyframes progress-indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}
.file-progress-list {
  list-style: none;
  margin: .65rem 0 0;
  padding: 0;
  font-size: .88rem;
  min-width: 0;
}
.file-progress-list li {
  padding: .3rem 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.file-progress-list li:last-child { border-bottom: 0; }
.fp-ok { color: var(--accent-dark); }
.fp-wait { color: var(--muted); }
.fp-run { color: var(--ink); font-weight: 600; }
.fp-err { color: var(--danger); }
.upload-status.is-error {
  color: var(--danger);
  font-weight: 600;
}
.upload-status.is-success {
  color: var(--accent-dark);
  font-weight: 650;
}
.upload-status.is-partial {
  color: var(--warn);
  font-weight: 650;
}
.btn.is-loading { opacity: .75; }

@media (max-width: 480px) {
  .file-pick-btn,
  .file-upload-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Clipboard toast (phone copy on desktop) */
.copy-toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: calc(var(--sticky-h, 64px) + 1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  background: #122019;
  color: #eef6f1;
  padding: .65rem 1rem;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  max-width: calc(100% - 2rem);
  text-align: center;
}
.copy-toast[hidden] { display: none !important; }
@media (min-width: 900px) {
  .copy-toast { bottom: 1.5rem; }
}
.contact-phone { cursor: pointer; }
.checklist { margin: .4rem 0 .7rem; padding-left: 1.1rem; color: var(--muted); font-size: .9rem; }
.thankyou { text-align: left; }

.archive-banner {
  background: #173b52; color: #fff; padding: .85rem 0; text-align: center; font-weight: 650;
}

/* ---- Back to top ---- */
.back-to-top {
  position: fixed;
  z-index: 70; /* над sticky CTA (50) и cookie (60) когато е видим */
  right: 1rem;
  bottom: 1rem;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-dark);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(20, 50, 35, .18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.back-to-top[hidden] {
  display: none !important;
}
.back-to-top.is-visible:not([hidden]) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { background: #f3faf6; color: var(--accent); }
.back-to-top:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
/* Mobile: над sticky CTA */
@media (max-width: 899px) {
  .back-to-top {
    bottom: calc(var(--sticky-h) + .65rem + env(safe-area-inset-bottom, 0px));
    right: .75rem;
    z-index: 70;
  }
}
/* При отворен cookie banner — временно скрий (collision); JS sync-ва след затваряне */
body.cookie-open .back-to-top {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
  html { scroll-behavior: auto; }
}

/* Contact reveal — бутони без raw tel/mailto в initial HTML */
button.contact-row.js-contact-reveal,
button.contact-row.contact-revealed {
  font: inherit;
  background: transparent;
  cursor: pointer;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.cta-contact-actions > button.contact-row.js-contact-reveal,
.cta-contact-actions > a.contact-revealed {
  width: auto; /* flex item, не форсирай 100% върху съседа */
}
.btn.js-contact-reveal {
  cursor: pointer;
}
.contact-value {
  user-select: none;
  -webkit-user-select: none;
}
.contact-reveal-error {
  color: #8a1f1f;
  font-size: .88rem;
  margin: .35rem 0 0;
}
.ms-contact-boot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.privacy-contact-actions .contact-row {
  display: inline-flex !important;
  width: auto;
  margin: .2rem 0 !important;
}
