/*
Theme Name: Беломорье
Theme URI: https://whiteseasession2022.ru/
Author: Редакция «Беломорья»
Description: Гид по берегам Белого моря — «лоция белой ночи»: светлая бумага, изобаты, шкала прилива, карта OSM с метками.
Version: 1.0.2
Requires PHP: 8.0
Text Domain: belomorye
*/

:root {
	--bg: #f2f5f3;
	--paper: #fbfcfb;
	--ink: #0e2a33;
	--ink2: #3d545b;
	--mute: #6d7f84;
	--sea: #2d6a78;
	--sea-l: #dbe8ea;
	--lich: #9fb3a6;
	--cloud: #d27a22;
	--cloud-d: #a85a12;
	--lit: #6f6a3a;
	--line: #d3dcd8;
	--r: 4px;
	--ff-h: "Alegreya", Georgia, "Times New Roman", serif;
	--ff: "Merriweather Sans", "Segoe UI", Arial, sans-serif;
	--ff-m: "Ubuntu Sans Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
	--w: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--ff); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sea); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--cloud-d); }
h1, h2, h3, h4 { font-family: var(--ff-h); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.005em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.blm-skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.blm-skip:focus { left: 8px; }
.blm-wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 16px; }
.blm-narrow { max-width: 760px; }
.blm-mid { max-width: 1040px; }
.blm-i { flex: none; }

/* ---------- Шапка ---------- */
.blm-head { background: var(--paper); position: relative; z-index: 20; }
.blm-head__in { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.blm-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.blm-logo__t { font: 700 22px/1 var(--ff-h); display: flex; flex-direction: column; }
.blm-logo__t small { font: 400 11px/1.3 var(--ff-m); color: var(--mute); letter-spacing: .02em; margin-top: 3px; }
.blm-nav { display: none; }
.blm-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; }
.blm-nav__list a { display: block; padding: 8px 10px; text-decoration: none; color: var(--ink2); font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent; }
.blm-nav__list a:hover, .blm-nav__list .current-menu-item > a { color: var(--ink); border-bottom-color: var(--cloud); }
.blm-head__tools { display: flex; gap: 4px; }
.blm-pop { position: relative; }
.blm-pop > summary { list-style: none; cursor: pointer; width: 42px; height: 42px; display: grid; place-items: center; color: var(--ink); border-radius: 50%; }
.blm-pop > summary::-webkit-details-marker { display: none; }
.blm-pop > summary:hover, .blm-pop[open] > summary { background: var(--sea-l); }
.blm-pop__box { position: absolute; right: 0; top: 48px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(14, 42, 51, .12); padding: 14px; width: min(340px, calc(100vw - 32px)); border-radius: var(--r); }
.blm-pop__h { font: 500 12px/1 var(--ff-m); color: var(--mute); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 8px; }
.blm-pop__list { list-style: none; margin: 0; padding: 0; }
.blm-pop__list a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.blm-pop__list li:last-child a { border-bottom: 0; }
/* шкала прилива под шапкой */
.blm-tide { height: 8px; background:
	repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 12px) 0 0 / 100% 4px no-repeat,
	repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 60px) 0 0 / 100% 8px no-repeat;
	opacity: .35; }

/* ---------- Поиск ---------- */
.blm-search { display: flex; gap: 6px; }
.blm-search input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--ink); }
.blm-search input:focus { outline: 2px solid var(--sea); outline-offset: 0; border-color: var(--sea); }
.blm-search button { font: 600 14px var(--ff); padding: 0 14px; border: 0; border-radius: var(--r); background: var(--ink); color: #fff; cursor: pointer; }
.blm-search button:hover { background: var(--sea); }

/* ---------- Главная: hero с картой ---------- */
.blm-hero { padding: 20px 0 8px; background:
	repeating-radial-gradient(ellipse at 110% 120%, transparent 0 22px, rgba(45, 106, 120, .07) 22px 23px); }
.blm-hero__in { display: grid; gap: 18px; }
.blm-hero__h1 { font-size: clamp(28px, 7vw, 42px); margin: 0 0 12px; max-width: 22ch; }
.blm-hero__lead { color: var(--ink2); margin: 0 0 14px; max-width: 60ch; }
.blm-hero__go { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.blm-hero__go a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; }
.blm-hero__go a:hover { border-color: var(--cloud); color: var(--ink); }
.blm-hero__go .blm-i { color: var(--sea); }
.blm-map { margin: 0; }
.blm-map__box { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #aad3df; }
.blm-map__box img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) contrast(.97); }
.blm-map figcaption { font: 400 11px/1.4 var(--ff-m); color: var(--mute); margin-top: 6px; }
.blm-map figcaption a { color: var(--mute); }
.blm-pin { position: absolute; transform: translate(-6px, -6px); display: flex; align-items: center; gap: 4px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.blm-pin__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--cloud); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(14, 42, 51, .4); flex: none; }
.blm-pin__t { font: 600 11px/1.2 var(--ff); background: rgba(251, 252, 251, .92); padding: 2px 5px; border-radius: 3px; }
.blm-pin.is-soon .blm-pin__dot { background: var(--lich); }
.blm-pin.is-soon .blm-pin__t { color: var(--ink2); }
a.blm-pin:hover .blm-pin__t { background: var(--ink); color: #fff; }
.blm-pin--l { flex-direction: row-reverse; transform: translate(calc(-100% + 6px), -6px); }
.blm-pin--b { flex-direction: column; align-items: flex-start; gap: 2px; }
.blm-pin--t { flex-direction: column-reverse; align-items: flex-start; gap: 2px; transform: translate(-6px, calc(-100% + 6px)); }

/* ---------- Секции ---------- */
.blm-sec { padding: 26px 0; }
.blm-sec--line { border-top: 1px solid var(--line); }
.blm-sec--sea { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.blm-sec__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 14px; }
.blm-sec__h { font-size: 26px; margin: 0; }
.blm-sec__h a { color: inherit; text-decoration: none; }
.blm-sec__h a:hover { color: var(--sea); }
.blm-sec__note { margin: 0; color: var(--mute); font-size: 14px; }

/* Главное */
.blm-top { display: grid; gap: 16px; }
.blm-top__side { display: grid; gap: 0; align-content: start; }

/* ---------- Карточки ---------- */
.blm-grid { display: grid; gap: 18px; }
.blm-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.blm-card__cover { display: block; }
.blm-cover { display: block; aspect-ratio: 3 / 2; background: var(--sea-l); overflow: hidden; }
.blm-cover img { width: 100%; height: 100%; object-fit: cover; }
.blm-cover--none { display: grid; place-items: center; color: var(--sea); background:
	repeating-linear-gradient(170deg, transparent 0 13px, rgba(45, 106, 120, .14) 13px 14px), var(--sea-l); }
.blm-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.blm-card__cat { font: 500 12px/1 var(--ff-m); color: var(--lit); text-decoration: none; text-transform: uppercase; letter-spacing: .06em; }
.blm-card__t { font-size: 20px; margin: 0; }
.blm-card__t a { color: var(--ink); text-decoration: none; }
.blm-card__t a:hover { color: var(--sea); }
.blm-card__x { margin: 0; color: var(--ink2); font-size: 14px; }
.blm-card__meta { margin: auto 0 0; display: flex; gap: 12px; font: 400 12px/1.3 var(--ff-m); color: var(--mute); }
.blm-card--lead .blm-cover { aspect-ratio: 16 / 9; }
.blm-card--lead .blm-card__t { font-size: clamp(22px, 5vw, 30px); }
.blm-card--row { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.blm-card--row .blm-card__body { padding: 12px 0; }
.blm-card--row .blm-card__t { font-size: 18px; }
.blm-card--side { flex-direction: row; gap: 14px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; }
.blm-card--side .blm-card__cover { flex: none; width: 112px; }
.blm-card--side .blm-cover { aspect-ratio: 1; border-radius: var(--r); }
.blm-card--side .blm-card__body { padding: 0; }
.blm-card--side .blm-card__t { font-size: 18px; }
.blm-top__side .blm-card--side:first-child { padding-top: 0; }

/* ---------- Берега ---------- */
.blm-coasts { display: grid; gap: 14px; }
.blm-coast { border-top: 3px solid var(--ink); padding: 12px 0 4px; }
.blm-coast__ic { margin: 0 0 4px; color: var(--sea); }
.blm-coast__t { font-size: 22px; margin: 0 0 6px; }
.blm-coast__t a { color: var(--ink); text-decoration: none; }
.blm-coast__t a:hover { color: var(--sea); }
.blm-coast__x { margin: 0 0 8px; color: var(--ink2); font-size: 14px; }
.blm-coast__list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.blm-coast__list li { padding: 5px 0; border-top: 1px dashed var(--line); }
.blm-coast__list a { color: var(--ink); text-decoration: none; }
.blm-coast__list a:hover { color: var(--cloud-d); }

/* ---------- Прилив ---------- */
.blm-tidebox { background: var(--ink); color: #dfe9e7; padding: 22px 0; position: relative; overflow: hidden; }
.blm-tidebox::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36%; background:
	repeating-linear-gradient(180deg, rgba(159, 179, 166, .18) 0 1px, transparent 1px 9px); pointer-events: none; }
.blm-tidebox__in { display: grid; gap: 8px; position: relative; z-index: 1; }
.blm-tidebox__ic { margin: 0; color: var(--cloud); }
.blm-tidebox__h { color: #fff; font-size: 26px; margin: 0 0 6px; }
.blm-tidebox p { margin: 0 0 8px; max-width: 70ch; }
.blm-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.blm-tidebox .blm-go { color: var(--cloud); }
.blm-tidebox .blm-go:hover { color: #fff; }

.blm-two { display: grid; gap: 24px; }

/* ---------- Статья ---------- */
.blm-art__head { padding-top: 22px; padding-bottom: 6px; }
.blm-art__cat { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--ff-m); text-transform: uppercase; letter-spacing: .07em; color: var(--lit); text-decoration: none; margin-bottom: 10px; }
.blm-art__h1 { font-size: clamp(28px, 6.4vw, 44px); margin: 0 0 12px; }
.blm-art__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font: 400 13px/1.4 var(--ff-m); color: var(--mute); }
.blm-art__cover { margin: 14px auto 0; }
.blm-art__cover img { width: 100%; border-radius: var(--r); aspect-ratio: 16 / 9; object-fit: cover; }
.blm-credit, .blm-prose figcaption { font: 400 12px/1.45 var(--ff-m); color: var(--mute); margin-top: 6px; }
.blm-credit a, .blm-prose figcaption a { color: var(--mute); }
.blm-art__grid { display: grid; gap: 8px; padding-top: 16px; padding-bottom: 20px; max-width: 760px; }
.blm-art__body { min-width: 0; }
.blm-toc { border: 1px solid var(--line); background: var(--paper); border-radius: var(--r); padding: 0 14px; align-self: start; }
.blm-toc > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline; padding: 11px 0; font-weight: 700; }
.blm-toc > summary::-webkit-details-marker { display: none; }
.blm-toc small { font: 400 12px var(--ff-m); color: var(--mute); }
.blm-toc ol { margin: 0; padding: 0 0 12px 20px; font-size: 14px; }
.blm-toc li { padding: 3px 0; }
.blm-toc a { color: var(--ink2); text-decoration: none; }
.blm-toc a:hover { color: var(--sea); text-decoration: underline; }
.blm-art__upd { display: flex; align-items: center; gap: 6px; font: 400 13px var(--ff-m); color: var(--mute); margin: 24px 0 12px; }
.blm-auth { display: flex; gap: 14px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--cloud); border-radius: var(--r); font-size: 14px; }
.blm-auth p { margin: 0 0 6px; }
.blm-auth__av { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 700 20px var(--ff-h); }
.blm-auth__h { font-weight: 700; }
.blm-auth__more { margin: 0 !important; }

/* текст */
.blm-prose { font-size: 17px; line-height: 1.72; }
.blm-prose > * { margin-top: 0; margin-bottom: 1em; }
.blm-prose h2 { font-size: clamp(24px, 5vw, 30px); margin-top: 1.6em; padding-top: .5em; border-top: 1px solid var(--line); }
.blm-prose h3 { font-size: 21px; margin-top: 1.4em; }
.blm-prose ul, .blm-prose ol { padding-left: 1.3em; }
.blm-prose li { margin-bottom: .35em; }
.blm-prose li::marker { color: var(--sea); }
.blm-prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--lich); color: var(--ink2); }
.blm-prose figure { margin: 1.4em 0; }
.blm-prose figure img { border-radius: var(--r); }
.blm-prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.blm-short { background: var(--sea-l); border-radius: var(--r); padding: 14px 16px 4px; margin: 0 0 1.4em; position: relative; }
.blm-short::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; background: var(--sea); border-radius: 2px; }
.blm-short__h { font: 500 12px/1 var(--ff-m) !important; text-transform: uppercase; letter-spacing: .08em; color: var(--sea); margin: 0 0 8px !important; }
.blm-short p { margin: 0 0 10px; }
.blm-table { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.blm-table table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
.blm-table th, .blm-table td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.blm-table th { background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; }
.blm-table tr:last-child td { border-bottom: 0; }
.blm-table td:first-child { font-weight: 600; }
.blm-date, .blm-src { display: flex; align-items: center; gap: 6px; font: 400 13px var(--ff-m); color: var(--mute); }
.wp-block-image, .pbn-photo { margin: 1.4em 0; }

/* ---------- Архив ---------- */
.blm-arch { padding-bottom: 30px; }
.blm-arch__head { display: flex; gap: 14px; align-items: flex-start; padding-top: 24px; padding-bottom: 14px; }
.blm-arch__ic { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--cloud); display: grid; place-items: center; flex: none; }
.blm-kicker { font: 500 12px/1 var(--ff-m); text-transform: uppercase; letter-spacing: .08em; color: var(--lit); margin: 4px 0 8px; }
.blm-arch__h1 { font-size: clamp(28px, 6vw, 40px); margin: 0 0 8px; }
.blm-arch__d { color: var(--ink2); max-width: 65ch; }
.blm-arch__d p { margin: 0; }
.blm-arch__find { max-width: 520px; margin: 0 0 14px; }
.blm-arch__n { font: 400 13px var(--ff-m); color: var(--mute); }
.blm-chips { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.blm-chip { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; text-decoration: none; color: var(--ink2); background: var(--paper); }
.blm-chip:hover { border-color: var(--sea); color: var(--ink); }
.blm-chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.blm-empty { color: var(--mute); padding: 20px 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.nav-links .page-numbers { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); background: var(--paper); }
.nav-links .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Подвал ---------- */
.blm-foot { background: var(--ink); color: #b8c7c6; padding: 22px 0 26px; font-size: 14px; }
.blm-foot__in { display: grid; gap: 10px; }
.blm-foot__brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font: 700 19px var(--ff-h); }
.blm-foot__links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; }
.blm-foot__links a { color: #dfe9e7; }
.blm-foot__copy { margin: 0; font-size: 12px; color: #8ea3a3; }
.blm-slot { margin: 20px 0; }

/* ---------- Планшет ---------- */
@media (min-width: 561px) {
	.blm-grid--3 { grid-template-columns: repeat(2, 1fr); }
	.blm-coasts { grid-template-columns: repeat(2, 1fr); gap: 20px 24px; }
	.blm-pin__t { font-size: 12px; }
}

/* ---------- Десктоп ---------- */
@media (min-width: 921px) {
	.blm-nav { display: block; }
	.blm-pop--menu { display: none; }
	.blm-head__in { min-height: 72px; }
	.blm-hero { padding: 28px 0 14px; }
	.blm-hero__in { grid-template-columns: 6fr 7fr; align-items: center; gap: 32px; }
	.blm-grid--3 { grid-template-columns: repeat(3, 1fr); }
	.blm-top { grid-template-columns: 7fr 5fr; gap: 28px; }
	.blm-coasts { grid-template-columns: repeat(4, 1fr); }
	.blm-tidebox__in { grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
	.blm-two { grid-template-columns: 1fr 1fr; gap: 40px; }
	.blm-art__grid.has-toc { grid-template-columns: 250px minmax(0, 1fr); max-width: 1080px; gap: 40px; }
	.blm-art__head.has-toc { max-width: 1080px; padding-left: calc(16px + 290px); }
	.blm-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
	.blm-foot__in { grid-template-columns: auto 1fr; align-items: center; }
	.blm-foot__copy { grid-column: 1 / -1; }
}
@media (min-width: 921px) and (max-width: 1100px) {
	.blm-nav__list a { padding: 8px 7px; font-size: 13px; }
}
