:root {
  --ink: #1c1915;
  --ink-soft: #3a342c;
  --muted: #6b6258;
  --paper: #f6f1e7;
  --sheet: #fffdf8;
  --line: #d8d0c3;
  --line-strong: #1c1915;
  --accent: #8f1d2c;
  --accent-soft: #f3e4e2;
  --chip: #efe6d6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Liberation Serif", Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --measure: 68ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #efe8db 0, #efe8db 8px, transparent 8px),
    var(--paper);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}

a { color: inherit; }

img { max-width: 100%; height: auto; }

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-head { padding-top: env(safe-area-inset-top); }

.utility {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0 0.45rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead {
  border-top: 1px solid var(--line-strong);
  padding: 0.85rem 0 0.7rem;
  text-align: center;
}

.masthead a {
  text-decoration: none;
}

.brand {
  margin: 0;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: 0.22em;
  line-height: 1;
}

.brand span {
  color: var(--accent);
}

.brand-sub {
  margin: 0.35rem 0 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 3px solid var(--line-strong);
}

.nav-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem 1.15rem;
  padding: 0.35rem 0;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 0;
  touch-action: manipulation;
}

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

.story-head {
  padding: 2.2rem 0 0.4rem;
  max-width: 48rem;
}

.kicker {
  margin: 0 0 0.7rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 { scroll-margin-top: 3.4rem; }

h1 {
  margin: 0;
  font-weight: 560;
  font-size: clamp(2rem, 4.6vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.deck {
  margin: 1rem 0 0;
  font-size: 1.28rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 1.15rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
}

.hero,
.frame {
  margin: 1.35rem 0 1.5rem;
  width: 100%;
}

.hero {
  margin-top: 1.5rem;
}

.hero img,
.frame img {
  display: block;
  width: 100%;
  height: auto;
  background: #e6dfd2;
}

figcaption {
  margin-top: 0.45rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 3rem;
  align-items: start;
  padding-bottom: 3.5rem;
}

article p { margin: 0 0 1rem; }

article h2 {
  margin: 2.3rem 0 0.8rem;
  font-size: 1.75rem;
  font-weight: 560;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

article h3 {
  margin: 1.6rem 0 0.45rem;
  font-size: 1.22rem;
  font-weight: 600;
}

.lead::first-letter {
  float: left;
  font-size: 3.5rem;
  line-height: 0.78;
  padding: 0.12rem 0.45rem 0 0;
  font-weight: 600;
  color: var(--accent);
}

.note {
  margin: 1.3rem 0 1.5rem;
  padding: 0.9rem 1rem 0.95rem 1rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  font-size: 0.98rem;
}

.note strong {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}

blockquote {
  margin: 1.6rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--line-strong);
  font-size: 1.35rem;
  line-height: 1.35;
}

blockquote p { margin: 0; }

.steps, .plain {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.steps li, .plain li {
  margin: 0 0 0.85rem;
  padding-left: 0;
}

.steps li strong, .plain li strong {
  font-weight: 600;
}

.dossier {
  position: sticky;
  top: 1rem;
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 1rem 1rem 0.4rem;
}

.dossier h2 {
  margin: 0 0 0.8rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stat {
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.stat b {
  display: block;
  font-size: 1.55rem;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.stat span {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}

.table-wrap {
  margin: 1rem 0 1.4rem;
  overflow-x: auto;
  border-top: 2px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

caption {
  caption-side: bottom;
  padding: 0.55rem 0 0.2rem;
  text-align: left;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.8rem 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

th {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

td:first-child { font-weight: 600; width: 34%; }

.sources {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: src;
}

.sources li {
  counter-increment: src;
  margin: 0 0 0.7rem;
  padding-left: 1.7rem;
  position: relative;
  font-size: 1rem;
}

.sources li::before {
  content: counter(src);
  position: absolute;
  left: 0;
  top: 0.15rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--accent);
}

.sources a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .wrap,
  .nav-inner {
    width: min(1120px, calc(100% - 1.5rem));
  }

  .utility {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    flex-wrap: wrap;
    row-gap: 0.2rem;
  }

  .brand {
    font-size: 1.35rem;
    letter-spacing: 0.1em;
  }

  .brand-sub {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    line-height: 1.45;
  }

  .nav-inner {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.15rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding: 0;
    -webkit-overflow-scrolling: touch;
  }

  .nav-inner::-webkit-scrollbar { display: none; }

  .nav a {
    flex: 0 0 auto;
    padding: 0 0.7rem;
    white-space: nowrap;
  }

  .story-head { padding: 1.05rem 0 0.15rem; }

  h1 {
    font-size: 1.7rem;
    line-height: 1.16;
  }

  .deck {
    margin-top: 0.7rem;
    font-size: 1.05rem;
  }

  .byline {
    gap: 0.25rem 0.75rem;
    font-size: 0.75rem;
  }

  .hero,
  .frame {
    width: calc(100% + 1.5rem);
    margin-left: -0.75rem;
    margin-right: -0.75rem;
  }

  .hero { margin-top: 1rem; }

  .hero figcaption,
  .frame figcaption {
    padding: 0 0.75rem;
  }

  .layout {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    padding-bottom: 2rem;
    min-width: 0;
  }

  article { min-width: 0; }

  .dossier {
    order: -1;
    position: static;
    background: transparent;
    border: 0;
    padding: 0;
    min-width: 0;
    max-width: 100%;
  }

  .dossier h2 { margin-bottom: 0.4rem; }

  .stats {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    min-width: 0;
    max-width: 100%;
    margin: 0 -0.75rem;
    padding: 0 0.75rem 0.35rem;
    -webkit-overflow-scrolling: touch;
  }

  .stats::-webkit-scrollbar { display: none; }

  .stat {
    flex: 0 0 78%;
    scroll-snap-align: start;
    background: var(--sheet);
    border: 1px solid var(--line);
    padding: 0.7rem 0.8rem 0.75rem;
  }

  .stat b { font-size: 1.35rem; }

  .lead::first-letter {
    font-size: 2.55rem;
    padding-right: 0.35rem;
  }

  article h2 {
    margin-top: 1.65rem;
    font-size: 1.38rem;
  }

  article h3 { font-size: 1.12rem; }

  blockquote {
    font-size: 1.12rem;
    margin: 1.2rem 0;
  }

  .note { font-size: 0.98rem; }

  .table-wrap {
    overflow: visible;
    border-bottom: 0;
  }

  table, thead, tbody, tr, th, td, caption { display: block; width: auto; }

  caption {
    width: 100%;
    padding: 0 0 0.7rem;
  }

  thead { display: none; }

  tr {
    padding: 0.7rem 0 0.8rem;
    border-bottom: 1px solid var(--line);
  }

  td {
    border: 0;
    padding: 0.1rem 0;
  }

  td:first-child {
    width: auto;
    font-family: var(--sans);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }

  td:nth-child(2)::before,
  td:nth-child(3)::before {
    display: block;
    margin-top: 0.4rem;
    font-family: var(--sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
  }

  td:nth-child(2)::before { content: "Болгария"; }
  td:nth-child(3)::before { content: "Турция"; }
}

.site-footer {
  border-top: 3px solid var(--line-strong);
  padding: 1.2rem 0 max(2rem, env(safe-area-inset-bottom));
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.site-footer p { margin: 0.2rem 0; }

.consult-bar {
  position: fixed;
  z-index: 50;
  left: 0.75rem;
  right: 0.75rem;
  bottom: max(0.65rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.8rem 1rem;
  background: var(--accent);
  color: #fffdf8;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-align: center;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(28, 25, 21, 0.28);
  touch-action: manipulation;
}

body:has(.consult-bar) {
  padding-bottom: calc(5.4rem + env(safe-area-inset-bottom));
}

@media (min-width: 720px) {
  .consult-bar {
    left: 50%;
    right: auto;
    width: min(440px, calc(100% - 2rem));
    transform: translateX(-50%);
  }
}

.form-page {
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.form-top {
  border-bottom: 3px solid var(--line-strong);
  background: var(--paper);
}

.form-top a {
  display: block;
  padding: 0.9rem 0;
  text-decoration: none;
}

.form-brand {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.form-sheet {
  width: min(640px, calc(100% - 1.5rem));
  margin: 1.25rem auto 2rem;
}

.form-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.form-sheet h1 {
  margin: 0 0 0.4rem;
  font-size: 1.85rem;
  line-height: 1.15;
  font-weight: 560;
}

.form-lead {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.q-block {
  margin: 0 0 1.15rem;
  padding: 0;
  border: 0;
  min-width: 0;
}

.q-block legend {
  padding: 0;
  margin: 0 0 0.55rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  margin: 0 0 0.45rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  background: var(--sheet);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.3;
  cursor: pointer;
}

.choice input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.field {
  display: block;
  margin: 0 0 0.9rem;
  font-family: var(--sans);
}

.field span {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line-strong);
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
  font-family: var(--sans);
  font-size: 1rem;
  border-radius: 0;
}

.form-error {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.95rem;
}

.form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 0.4rem;
  border: 0;
  background: var(--accent);
  color: #fffdf8;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.msg-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.msg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.75rem 1rem;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  touch-action: manipulation;
}

.msg-btn--wa { background: #128c7e; }
.msg-btn--tg { background: #229ed9; }
.msg-btn--back {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

@media print {
  body { background: white; font-size: 11pt; }
  .utility, .nav, .dossier, .consult-bar { display: none; }
  .layout { display: block; }
  a { text-decoration: none; }
}
