@font-face { font-family: Manrope; src: url(/static/manrope.ttf) format("truetype"); font-weight: 200 800; font-display: swap; }
:root {
  --bg: #fff; --sand: #FAF6EF; --sand-deep: #F1E9DC; --sea: #12A5B8; --sea-deep: #0A6E7C; --foam: #E3F5F7; --sea-ink: #0A4F59;
  --coral: #FF8A5C; --amber-soft: #FDF1DC; --amber-text: #8A5A00; --ink: #1F2A37; --ink2: #5E6A77; --line: #ECE7DE;
  --bad: #B3261E; --night: #0B1620; --r: 20px; --r-big: 28px;
  color-scheme: light dark;
}
/* Тёмная тема: по настройке системы, если пользователь не выбрал тему сам, или по выбору. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0F151B; --sand: #1A222A; --sand-deep: #232D36; --sea: #2BC0D2; --sea-deep: #63D3E0; --foam: #133A42; --sea-ink: #BDEFF4;
    --amber-soft: #3A2D14; --amber-text: #F4C46A; --ink: #E6ECF1; --ink2: #A5B1BD; --line: #2A333C; --bad: #FF8A80; }
}
:root[data-theme="dark"] { --bg: #0F151B; --sand: #1A222A; --sand-deep: #232D36; --sea: #2BC0D2; --sea-deep: #63D3E0; --foam: #133A42; --sea-ink: #BDEFF4;
  --amber-soft: #3A2D14; --amber-text: #F4C46A; --ink: #E6ECF1; --ink2: #A5B1BD; --line: #2A333C; --bad: #FF8A80; color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 16px/1.55 Manrope, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--sea-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(34px, 6vw, 64px); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 .8em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--ink2); }
.small { font-size: 14px; }
.block { padding-top: 36px; padding-bottom: 8px; }
.eyebrow { color: var(--sea-deep); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.lead, .lead-text { font-size: 19px; color: var(--ink2); max-width: 720px; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.search { flex: 1; display: flex; gap: 8px; max-width: 460px; }
.search input { flex: 1; min-width: 0; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--sand); color: var(--ink); padding: 0 18px; font: inherit; }
.search input:focus { outline: 2px solid var(--sea); outline-offset: 1px; }
.nav { display: flex; gap: 18px; font-weight: 700; }
.nav a { color: var(--ink); }
.theme-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--sand); color: var(--ink); font-size: 18px; cursor: pointer; display: grid; place-items: center; }
.theme-btn:focus-visible { outline: 2px solid var(--sea); }
.nav { align-items: center; }
.h4 { font-size: 17px; }
.nav-app { background: var(--coral); color: #1F2A37 !important; padding: 8px 16px; border-radius: 999px; }
@media (max-width: 760px) {
  .nav a:not(.nav-app) { display: none; }
  .theme-btn { width: 36px; height: 36px; flex: none; }
  .top-row { gap: 10px; }
  .logo span { display: none; }
  .search { min-width: 0; }
  .theme-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--sand); color: var(--ink); font-size: 18px; cursor: pointer; display: grid; place-items: center; }
.theme-btn:focus-visible { outline: 2px solid var(--sea); }
.nav { align-items: center; }
.h4 { font-size: 17px; }
.nav-app { padding: 8px 12px; font-size: 14px; }
}
body { overflow-x: hidden; }

/* Главная */
.hero-home { padding: 64px 0 28px; background: radial-gradient(1200px 400px at 90% -10%, var(--foam), transparent 60%); }
.search.big { max-width: 640px; margin: 24px 0 18px; }
.search.big input { height: 56px; font-size: 17px; }
.search.big button, .btn { border: 0; cursor: pointer; background: var(--sea-deep); color: var(--bg); font: 700 16px Manrope, sans-serif; padding: 0 22px; border-radius: 999px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn-ghost { background: var(--foam); color: var(--sea-ink); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick a { background: var(--sand); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 14px; }

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.rail > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.card { position: relative; display: block; border-radius: var(--r-big); overflow: hidden; color: #fff; aspect-ratio: 4/5; background: var(--sea-deep); }
.card.big { aspect-ratio: 3/4; }
.card-img { position: absolute; inset: 0; background: linear-gradient(160deg, var(--sea), var(--sea-deep) 60%, var(--night)); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-img img, .city:hover .card-img img { transform: scale(1.06); }
.card::after, .city::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(11,22,32,.85)); }
.card-body { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 20px; }
.card-body h3 { font-size: 26px; overflow-wrap: anywhere; hyphens: auto; font-weight: 800; color: #fff; margin: 8px 0 4px; }
.card-body p { color: rgba(255,255,255,.88); font-size: 15px; }
.card:hover { text-decoration: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 12px; font-weight: 700; background: rgba(255,255,255,.16); padding: 4px 10px; border-radius: 999px; }
.pill { display: inline-block; background: rgba(11,22,32,.38); color: #fff; border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(8px); padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; margin: 0 6px 6px 0; }
.pill-warn { background: var(--amber-soft); color: var(--amber-text); border-color: transparent; }

.cont { border-top: 1px solid var(--line); padding: 8px 0; }
.cont summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; padding: 10px 0; }
.cont summary h3 { margin: 0; font-size: 22px; }
.country-list { list-style: none; padding: 0; margin: 0 0 12px; columns: 3 240px; column-gap: 24px; }
.country-list li { break-inside: avoid; }
.country-list a { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; color: var(--ink); font-weight: 600; }
.country-list .muted { margin-left: auto; font-size: 13px; font-weight: 500; }
.fl { width: 1.4em; }
.app-banner { display: flex; gap: 24px; align-items: center; justify-content: space-between; background: var(--sand); border-radius: var(--r-big); padding: 32px; margin: 40px auto; }
@media (max-width: 760px) { .app-banner { flex-direction: column; align-items: flex-start; margin: 32px 20px; } }

/* Страна */
.hero { position: relative; min-height: min(70vh, 640px); display: flex; align-items: flex-end; color: #fff; background: linear-gradient(160deg, var(--sea), var(--sea-deep) 60%, var(--night)); overflow: hidden; }
.hero-small { min-height: min(52vh, 480px); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns 24s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,22,32,.35), transparent 30%, rgba(11,22,32,.82)); }
.hero-text { position: relative; padding-bottom: 36px; width: 100%; }
.hero-text h1 { color: #fff; text-shadow: 0 2px 18px rgba(11,22,32,.45); margin-top: 8px; }
.hero-text .lead { color: rgba(255,255,255,.9); }
.crumbs { font-size: 14px; margin-bottom: 12px; opacity: .9; }
.hero .crumbs a, .credit a { color: #fff; }
.credit { display: block; font-size: 12px; opacity: .7; margin-top: 8px; }

.country-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
.main-col { min-width: 0; }
@media (max-width: 960px) { .country-grid { grid-template-columns: 1fr; } .side { display: none; } }
.sticky { position: sticky; top: 84px; margin-top: 36px; }
.toc { list-style: none; padding: 0; margin: 0 0 16px; } .toc li { padding: 5px 0; } .toc a { color: var(--ink); font-weight: 600; }
.small-btn { width: 100%; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 28px; }
.tile, .box { background: var(--sand); border-radius: var(--r); padding: 18px; }
.tile span { color: var(--ink2); font-size: 14px; display: block; } .tile b { font-size: 20px; }
.note { background: var(--amber-soft); color: var(--ink); border-radius: var(--r); padding: 16px 18px; margin-top: 16px; }
.alert { border-radius: var(--r); padding: 16px 18px; margin-top: 20px; background: var(--foam); }
.alert-warning { background: var(--amber-soft); } .alert-danger { background: color-mix(in srgb, var(--bad) 15%, var(--bg)); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; background: var(--sand); border-radius: var(--r); padding: 18px 20px; margin: 0; }
.facts dt { color: var(--ink2); } .facts dd { margin: 0; font-weight: 600; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.cards2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 12px; margin-bottom: 12px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.st { font-weight: 700; white-space: nowrap; font-size: 14px; }
.st-ok { color: var(--sea-deep); } .st-warn { color: var(--amber-text); } .st-bad { color: var(--bad); } .st-unk { color: var(--ink2); }
.warn-text { color: var(--amber-text); }
.call-row { display: flex; align-items: center; gap: 14px; color: var(--ink); padding: 4px 0; }
.call-row:hover { text-decoration: none; }
.call-row .call { margin: 0; min-width: 84px; text-align: center; }
.call { display: inline-block; font-size: 24px; font-weight: 800; color: var(--bad); background: var(--bg); border-radius: 14px; padding: 6px 16px; margin: 0 8px 8px 0; }
.mission { padding: 8px 0; border-bottom: 1px dashed var(--line); } .links a { margin-right: 14px; font-weight: 600; font-size: 14px; }
.warn-box { background: var(--amber-soft); } .warn-box summary { cursor: pointer; color: var(--amber-text); }
.section { background: var(--sand); border-radius: var(--r); padding: 4px 20px; margin-bottom: 10px; }
.section summary { display: flex; align-items: center; gap: 10px; justify-content: space-between; cursor: pointer; list-style: none; padding: 14px 0; }
.section summary h3 { margin: 0; }
.md h1, .md h2, .md h3 { margin-top: 1em; } .md ul { padding-left: 20px; } .md li { margin: 4px 0; }
.h-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; } .h-row a { font-weight: 700; }
.city { position: relative; display: block; aspect-ratio: 4/5; border-radius: var(--r-big); overflow: hidden; color: #fff; background: var(--sea-deep); }
.city-body { position: absolute; z-index: 1; left: 18px; bottom: 18px; right: 18px; }
.city-body h3 { color: #fff; font-size: 26px; font-weight: 800; margin: 6px 0 2px; }
.sights { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.sight { display: grid; grid-template-columns: 112px 1fr; gap: 14px; background: var(--sand); border-radius: var(--r); padding: 12px; }
.sight-img { width: 112px; height: 112px; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, var(--foam), var(--sand-deep)); }
.sight-img img { width: 100%; height: 100%; object-fit: cover; }
.sight h4, .sight .h4 { font-size: 17px; margin: 2px 0 4px; } .sight p { font-size: 14px; color: var(--ink2); margin-bottom: 6px; }
.cat { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sea-deep); }
.chart { width: 100%; height: auto; background: var(--sand); border-radius: var(--r); padding: 8px; }
.chart .t { font-size: 13px; font-weight: 700; fill: var(--ink); text-anchor: middle; }
.chart .m { font-size: 13px; fill: var(--ink2); text-anchor: middle; }
.chart .zero { stroke: var(--line); stroke-width: 2; }
.chart .sea { fill: none; stroke: var(--sea-deep); stroke-width: 3; }
.chart .sea-dot { fill: var(--bg); stroke: var(--sea-deep); stroke-width: 2.5; }
.phrases { width: 100%; border-collapse: collapse; } .phrases td { padding: 8px 6px; border-bottom: 1px dashed var(--line); vertical-align: top; }
.inline { display: inline; }

/* Списки, фильтры */
.inline-search { margin: 12px 0 20px; max-width: 420px; }
.city-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 4px 20px; }
.city-list a { display: flex; gap: 14px; align-items: center; padding: 10px 0; color: var(--ink); border-bottom: 1px solid var(--line); }
.city-list a:hover { text-decoration: none; background: var(--sand); }
.thumb { width: 52px; height: 52px; border-radius: 14px; overflow: hidden; flex: none; background: linear-gradient(160deg, var(--sea), var(--sea-deep)); display: grid; place-items: center; font-size: 22px; }
.thumb.icon { background: var(--foam); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.filters, .picker { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: var(--sand); padding: 18px; border-radius: var(--r); margin: 16px 0; }
.filters input, select { height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 0 12px; font: inherit; }
.filters input { flex: 1; min-width: 200px; }
.picker fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; width: 100%; }
.picker legend { font-weight: 800; margin-bottom: 6px; }
.picker label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.picker fieldset label { flex-direction: row; align-items: center; gap: 8px; font-size: 16px; }
.picker input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--sea-deep); }
.picker .card { aspect-ratio: auto; }
.features { padding-left: 20px; } .features li { margin: 10px 0; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.foot { margin-top: 64px; padding: 32px 0 48px; border-top: 1px solid var(--line); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* Особые пометки страны */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 0; }
.tag a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--sand); color: var(--ink); text-decoration: none; font-size: 14px; }
.tag a:hover { text-decoration: underline; }
.tag.warn a { background: var(--amber-soft); }
.picker fieldset { margin-bottom: 12px; }

/* Логотип: светлая и тёмная версии */
.logo img { height: 40px; width: auto; display: block; }
.logo .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo .logo-light { display: none; } :root:not([data-theme="light"]) .logo .logo-dark { display: block; } }
:root[data-theme="dark"] .logo .logo-light { display: none; }
:root[data-theme="dark"] .logo .logo-dark { display: block; }
