/* NADVIRNA — place detail page, nv3.
 *
 * Loads on top of nv3.css and adds only what this page needs. The chronicle timeline is the piece
 * with real design weight here: it is a spine of dated events under the description, and it has to
 * stay readable when a year is "1621", "XV–XVI ст." or "Сьогодні" — three very different string
 * widths that all sit in the same column.
 */

/* ── Hero ─────────────────────────────────────────────────────────────────────────────────── */

.nv3-ph { background: var(--nv3-dark); color: var(--nv3-on-dark); position: relative; overflow: hidden; }
.nv3-ph__grid { display: grid; }
.nv3-ph__copy { padding: 28px 20px 32px; display: flex; flex-direction: column; justify-content: center; }
.nv3-ph__crumbs { margin-bottom: 18px; color: var(--nv3-on-dark-3); }
.nv3-ph__crumbs a { color: var(--nv3-on-dark-2); }
.nv3-ph__crumbs a:hover { color: var(--nv3-on-dark); }
/* A line colour is not a text colour: on the dark hero this measured well under 3:1. */
.nv3-ph__crumbs .nv3-crumbs__sep { color: var(--nv3-on-dark-3); }
.nv3-ph__cat { font: 500 10.5px/1 var(--nv3-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--nv3-gold); }
.nv3-ph__h1 { font: 400 clamp(30px, 6.4vw, 50px)/1.08 var(--nv3-serif); color: var(--nv3-on-dark); margin-top: 12px; }
.nv3-ph__lede { font: 400 14px/1.7 var(--nv3-sans); color: var(--nv3-on-dark-2); margin-top: 14px; max-width: 46ch; }
.nv3-ph__marks { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 18px; }
.nv3-ph__marks .nv3-trust { color: var(--nv3-on-dark-2); }
.nv3-ph__updated { font: 400 11.5px/1.3 var(--nv3-mono); color: var(--nv3-on-dark-3); }
.nv3-ph__media { position: relative; min-height: 220px; background: var(--nv3-dark-2); }
.nv3-ph__media img { width: 100%; height: 100%; object-fit: cover; }
.nv3-ph__credit {
	position: absolute; right: 10px; bottom: 10px; z-index: 2;
	font: 400 10px/1 var(--nv3-mono); color: rgba(242,237,224,.72);
	background: rgba(21,44,30,.6); padding: 6px 9px; border-radius: 2px;
}

@media (min-width: 1000px) {
	.nv3-ph__grid { grid-template-columns: minmax(0, 47%) minmax(0, 53%); }
	.nv3-ph__copy { padding: 44px 40px 48px 56px; }
	.nv3-ph__media { min-height: 420px; }
}

/* ── Action rail ──────────────────────────────────────────────────────────────────────────── */

.nv3-actions {
	background: var(--nv3-dark-2); border-top: 1px solid var(--nv3-dark-line);
	/* An explicit colour so anything inside that only inherits still lands light on the dark bar. */
	color: var(--nv3-on-dark-2);
	display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 20px;
}
.nv3-action {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
	border: 1px solid var(--nv3-dark-line); border-radius: 3px; background: transparent;
	color: var(--nv3-on-dark-2); font: 400 13px/1 var(--nv3-sans); cursor: pointer;
}
.nv3-action:hover { border-color: var(--nv3-on-dark-3); color: var(--nv3-on-dark); }
.nv3-action svg { width: 16px; height: 16px; flex: none; }
.nv3-action--primary { background: var(--nv3-gold); border-color: var(--nv3-gold); color: var(--nv3-dark); font-weight: 500; }
.nv3-action--primary:hover { background: var(--nv3-gold-hover); border-color: var(--nv3-gold-hover); color: var(--nv3-dark); }
@media (min-width: 1000px) { .nv3-actions { padding: 14px 56px; } }

/* ── Body layout ──────────────────────────────────────────────────────────────────────────── */

.nv3-pbody { padding: 36px 0 48px; }
.nv3-pbody__grid { display: grid; gap: 36px; }
@media (min-width: 1000px) {
	.nv3-pbody { padding: 56px 0 76px; }
	.nv3-pbody__grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
}

.nv3-block + .nv3-block { margin-top: 40px; }
.nv3-block__h { font: 400 clamp(22px, 3vw, 28px)/1.2 var(--nv3-serif); margin-bottom: 16px; }

/* ── Chronicle timeline ───────────────────────────────────────────────────────────────────────
 *
 * A single hairline spine with a node per event. The year column is fixed-width on desktop so
 * "1621" and "XV–XVI ст." align on the same left edge instead of ragging; below 700px the year
 * moves above the title, because a fixed year column at phone width leaves the text about twelve
 * characters to live in.
 */

.nv3-chron { position: relative; }
.nv3-chron__item { position: relative; padding: 0 0 26px 26px; }
.nv3-chron__item:last-child { padding-bottom: 0; }
/* The spine is drawn per item and stops at the last one, so it never dangles past the final node. */
.nv3-chron__item::before {
	content: ''; position: absolute; left: 5px; top: 14px; bottom: -4px;
	width: 1px; background: var(--nv3-line-2);
}
.nv3-chron__item:last-child::before { display: none; }
.nv3-chron__item::after {
	content: ''; position: absolute; left: 0; top: 8px;
	width: 11px; height: 11px; border-radius: 50%;
	background: var(--nv3-cream); border: 2px solid var(--nv3-gold);
}
/* The open-ended "Сьогодні" node reads as present, not as another dated point. */
.nv3-chron__item--present::after { background: var(--nv3-gold); }

.nv3-chron__year { font: 500 12px/1.4 var(--nv3-mono); letter-spacing: .06em; color: var(--nv3-gold-hover); }
.nv3-chron__h { font: 500 17px/1.3 var(--nv3-serif); margin-top: 4px; }
.nv3-chron__p { font: 400 14px/1.7 var(--nv3-sans); color: var(--nv3-ink-2); margin-top: 7px; max-width: 62ch; }
.nv3-chron__qual {
	display: inline-block; margin-top: 8px;
	font: 400 10.5px/1 var(--nv3-mono); letter-spacing: .06em; color: var(--nv3-ink-3);
	border: 1px solid var(--nv3-line); border-radius: 2px; padding: 5px 8px;
}
.nv3-chron__src { display: block; margin-top: 8px; font: 400 11px/1.4 var(--nv3-mono); color: var(--nv3-ink-3); }
.nv3-chron__src a { border-bottom: 1px solid var(--nv3-line-2); }
.nv3-chron__src a:hover { color: var(--nv3-gold-hover); border-color: var(--nv3-gold); }

@media (min-width: 700px) {
	.nv3-chron__item { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 20px; padding-left: 26px; }
	.nv3-chron__year { padding-top: 3px; }
	.nv3-chron__h { margin-top: 0; }
}

/* ── Practical sidebar ────────────────────────────────────────────────────────────────────── */

.nv3-side { display: grid; gap: 22px; }
.nv3-panel { background: var(--nv3-card); border: 1px solid var(--nv3-line); border-radius: 4px; padding: 18px; }
.nv3-panel__h { font: 500 11px/1 var(--nv3-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--nv3-ink-3); margin-bottom: 14px; }
.nv3-facts-list { display: grid; gap: 12px; }
.nv3-fact { display: flex; gap: 11px; align-items: flex-start; }
.nv3-fact__ico { width: 18px; height: 18px; flex: none; color: var(--nv3-gold); margin-top: 1px; }
.nv3-fact__k { font: 400 10.5px/1 var(--nv3-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--nv3-ink-3); }
.nv3-fact__v { font: 400 13.5px/1.5 var(--nv3-sans); color: var(--nv3-ink); margin-top: 3px; }
.nv3-fact__v a { border-bottom: 1px solid var(--nv3-line-2); }
.nv3-fact__v a:hover { color: var(--nv3-gold-hover); border-color: var(--nv3-gold); }

/*
 * The gallery. Two columns from 620px, one below it — a photograph of a church at 300px wide is a
 * thumbnail, and this section exists because the records finally have more than one.
 */
.nv3-gallery { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .nv3-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nv3-gallery__item { margin: 0; }
.nv3-gallery__item img {
	display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover;
	border-radius: 4px; background: var(--nv3-cream-2);
}
/* The credit belongs to the file, not to the page: five photographs of one church can be four
   photographers under three licences, and one line under the hero cannot say that truthfully. */
.nv3-gallery__item figcaption {
	margin-top: 6px; font: 400 11.5px/1.45 var(--nv3-mono); color: var(--nv3-ink-3);
	overflow-wrap: anywhere;
}
.nv3-gallery__item figcaption a { border-bottom: 1px solid var(--nv3-line-2); }
.nv3-gallery__item figcaption a:hover { color: var(--nv3-gold-hover); }

/*
 * Coordinates are read aloud, typed into a navigator and copied by hand, so they get the mono face
 * — digits line up and 0 cannot be an O — and `user-select: all`, which turns one tap into the
 * whole pair on a phone. Not a link: a link cannot be copied on a touch screen, and the map
 * buttons above already handle the case where there is signal to follow one.
 */
.nv3-fact__v--geo { font-family: var(--nv3-mono); font-size: 12.5px; letter-spacing: .01em; user-select: all; }

/* Says, above the prose, that what follows is in a different language from the page around it. */
.nv3-untranslated {
	font: 400 12.5px/1.5 var(--nv3-sans); color: var(--nv3-ink-3);
	border-left: 2px solid var(--nv3-gold); padding-left: 12px; margin-bottom: 22px;
}

.nv3-source { background: var(--nv3-cream-2); border: 1px solid var(--nv3-line); border-radius: 4px; padding: 16px 18px; }
.nv3-source__k { display: flex; align-items: center; gap: 7px; font: 500 10.5px/1 var(--nv3-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--nv3-ink-3); }
.nv3-source__k svg { width: 14px; height: 14px; color: var(--nv3-gold); }
.nv3-source__v { font: 400 13px/1.55 var(--nv3-sans); color: var(--nv3-ink-2); margin-top: 9px; }
.nv3-source__v a { border-bottom: 1px solid var(--nv3-line-2); }
.nv3-source__v a:hover { color: var(--nv3-gold-hover); }

/* ── Related ──────────────────────────────────────────────────────────────────────────────── */

.nv3-related { background: var(--nv3-cream-2); border-top: 1px solid var(--nv3-line); padding: 40px 0 48px; }
@media (min-width: 1000px) { .nv3-related { padding: 64px 0 72px; } }

/* ── Empty chronicle note ─────────────────────────────────────────────────────────────────── */

.nv3-chron-empty {
	border: 1px dashed var(--nv3-line-2); border-radius: 4px; padding: 18px;
	font: 400 13px/1.65 var(--nv3-sans); color: var(--nv3-ink-3); max-width: 62ch;
}

/* ── Front-end editing, for signed-in editors only ────────────────────────────────────────────
   None of this reaches a reader: the templates print nothing at all unless the visitor can edit
   the record. The affordances are deliberately plain — this is a correction tool, not a builder,
   and it must never compete with the record it sits inside. */

.nv3-mediaed { margin-top: 12px; }
.nv3-mediaed__toggle {
	list-style: none; cursor: pointer;
	display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 14px;
	background: var(--nv3-card); border: 1px dashed var(--nv3-line-2); border-radius: 6px;
	font: 500 12.5px/1 var(--nv3-sans); color: var(--nv3-ink-2);
}
.nv3-mediaed__toggle::-webkit-details-marker { display: none; }
.nv3-mediaed__toggle:hover { border-color: var(--nv3-gold-hover); color: var(--nv3-gold-hover); }
.nv3-mediaed__toggle svg { width: 16px; height: 16px; }

.nv3-mediaed__panel {
	margin-top: 10px; padding: 18px; border-radius: 8px;
	background: var(--nv3-card); border: 1px solid var(--nv3-line);
}
.nv3-mediaed__field { display: grid; gap: 5px; margin-bottom: 14px; }
.nv3-mediaed__field label { font: 500 12px/1.3 var(--nv3-sans); color: var(--nv3-ink); }
.nv3-mediaed__field input[type="text"],
.nv3-mediaed__field input[type="url"],
.nv3-mediaed__field input[type="file"],
.nv3-mediaed__field select {
	width: 100%; min-height: 44px; padding: 10px 12px;
	background: var(--nv3-cream); border: 1px solid var(--nv3-line-2); border-radius: 5px;
	font: 400 13.5px/1.4 var(--nv3-sans); color: var(--nv3-ink);
}
/* The hint sits outside the label so a screen reader does not read it as the field's name. */
.nv3-mediaed__hint { font: 400 11.5px/1.5 var(--nv3-sans); color: var(--nv3-ink-3); }
.nv3-mediaed__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.nv3-mediaed__admin {
	display: inline-flex; align-items: center; min-height: 44px;
	font: 400 12px/1 var(--nv3-mono); color: var(--nv3-ink-3);
}
.nv3-mediaed__admin:hover { color: var(--nv3-gold-hover); }

.nv3-mediaed__note {
	padding: 11px 13px; border-radius: 5px; margin-bottom: 14px;
	font: 400 13px/1.5 var(--nv3-sans); border-left: 3px solid;
}
.nv3-mediaed__note--ok { background: var(--nv3-cream-2); border-left-color: var(--nv3-trust-verified); color: var(--nv3-ink); }
.nv3-mediaed__note--err { background: var(--nv3-cream-2); border-left-color: var(--nv3-trust-stale); color: var(--nv3-ink); }

/* ── The text switch and save bar ─────────────────────────────────────────────────────────── */

/*
 * Bottom-LEFT, and that is the whole point of the rule.
 *
 * Bottom-right is taken twice over: the site's chat widget parks there with a z-index this theme
 * does not control, and it covered the toggle so only "Реда" was readable. The consent banner
 * anchors bottom-right too. Raising z-index would win today and lose the next time the widget
 * updates, so the button moves instead of bidding.
 */
.nv3-edit__toggle {
	position: fixed; left: 18px; right: auto; bottom: 18px; z-index: 40;
	display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 18px;
	background: var(--nv3-dark); color: var(--nv3-on-dark); border: 0; border-radius: 999px;
	font: 600 12.5px/1 var(--nv3-sans); letter-spacing: .06em; cursor: pointer;
	box-shadow: 0 10px 30px rgba(11, 36, 29, .28);
}
.nv3-edit__toggle svg { width: 16px; height: 16px; }
.nv3-edit__toggle:hover { background: var(--nv3-dark-2); }
.nv3-edit__toggle[aria-pressed="true"] { background: var(--nv3-gold); color: var(--nv3-dark-2); }

.nv3-edit {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
	background: var(--nv3-dark); color: var(--nv3-on-dark);
	border-top: 1px solid rgba(246, 240, 229, .18);
}
.nv3-edit__in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 13px 0; }
.nv3-edit__state { font: 400 13px/1.5 var(--nv3-sans); color: var(--nv3-on-dark-2); }
.nv3-edit__lang {
	display: block; font: 400 11px/1.4 var(--nv3-mono);
	letter-spacing: .1em; text-transform: uppercase; color: var(--nv3-gold-light);
}
.nv3-edit__actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px; }
/* The bar covers the floating switch, so it moves out of the way while editing. */
body.nv3-is-editing .nv3-edit__toggle { bottom: 84px; }

/* An editable field announces itself only while the switch is on. */
body.nv3-is-editing [data-nv-edit] {
	outline: 1px dashed var(--nv3-gold-hover); outline-offset: 4px;
	border-radius: 2px; cursor: text;
}
body.nv3-is-editing [data-nv-edit]:focus {
	outline: 2px solid var(--nv3-gold); outline-offset: 4px;
	background: rgba(185, 145, 79, .07);
}
/* On the dark hero the dashed rule needs the light gold to stay visible. */
body.nv3-is-editing .nv3-ph [data-nv-edit] { outline-color: var(--nv3-gold-light); }
/* An empty summary would be an invisible, unclickable target. */
body.nv3-is-editing [data-nv-edit]:empty::before {
	content: attr(data-nv-label); color: var(--nv3-ink-3); font-style: italic;
}
body.nv3-is-editing .nv3-ph [data-nv-edit]:empty::before { color: var(--nv3-on-dark-3); }

@media (prefers-reduced-motion: reduce) { .nv3-edit__toggle { transition: none; } }

/* ── Adding to the chronology, for signed-in editors ──────────────────────────────────────────
   Shares the media panel's furniture rather than restating it: they are the same kind of control
   in the same place, and two near-identical panels that drift apart is how a design gets untidy. */

.nv3-chroned { margin-top: 20px; }
.nv3-chroned__toggle {
	list-style: none; cursor: pointer;
	display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 14px;
	background: var(--nv3-card); border: 1px dashed var(--nv3-line-2); border-radius: 6px;
	font: 500 12.5px/1 var(--nv3-sans); color: var(--nv3-ink-2);
}
.nv3-chroned__toggle::-webkit-details-marker { display: none; }
.nv3-chroned__toggle:hover { border-color: var(--nv3-gold-hover); color: var(--nv3-gold-hover); }
.nv3-chroned__toggle svg { width: 16px; height: 16px; }

.nv3-chroned__list { margin-top: 18px; border-top: 1px solid var(--nv3-line); padding-top: 14px; }
.nv3-chroned__row {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
	padding: 7px 0; border-bottom: 1px solid var(--nv3-line);
	font: 400 13.5px/1.5 var(--nv3-sans); color: var(--nv3-ink-2);
}
.nv3-chroned__row:last-child { border-bottom: 0; }
.nv3-chroned__row strong { font: 500 13px/1 var(--nv3-mono); color: var(--nv3-ink); margin-right: 6px; }
.nv3-chroned__row span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nv3-chroned__row button {
	flex: none; min-height: 44px; padding: 0 14px; cursor: pointer;
	background: transparent; border: 1px solid var(--nv3-line-2); border-radius: 5px;
	font: 400 12.5px/1 var(--nv3-sans); color: var(--nv3-ink-2);
}
.nv3-chroned__row button:hover { border-color: var(--nv3-trust-stale); color: var(--nv3-trust-stale); }

/* The prompt under a machine-assembled description. */
.nv3-writeprompt {
	margin-top: 12px; padding: 11px 13px; border-radius: 5px;
	background: var(--nv3-cream-2); border-left: 3px solid var(--nv3-gold);
	font: 400 13px/1.55 var(--nv3-sans); color: var(--nv3-ink-2);
}

/* ── The owner's photograph, and the invitation to become an owner ────────────────────────────
   Two blocks with opposite audiences and therefore opposite weights.

   .nv3-ownerpic is a working panel: it appears only for the confirmed owner of this record, it is
   the only way that person can reach a file input on this site, and it should read as a tool. It
   borrows the plain, slightly recessive treatment the editor's panel above already established,
   so the two dashed-and-carded affordances on this template look like siblings rather than
   competing offers.

   .nv3-ownerinvite is public, and the discipline there is restraint. It sits on a page a visitor
   opened to find opening hours; it is addressed to perhaps one reader in a thousand. So it is a
   ruled aside in muted ink — no card, no background panel, nothing that competes with the record.
   A banner here would be an advertisement on somebody else's page. */

.nv3-ownerpic {
	margin: 34px 0 0; padding: 22px;
	background: var(--nv3-card); border: 1px solid var(--nv3-line); border-radius: 8px;
	max-width: 62ch;
}
.nv3-ownerpic__kicker {
	font: 500 11px/1 var(--nv3-mono); letter-spacing: .12em; text-transform: uppercase;
	color: var(--nv3-ink-3); margin: 0 0 8px;
}
/* Fluid, and wrapping anywhere: "Замінити фотографію" is 19 characters of Ukrainian in a panel
   that has to survive a 320px viewport. */
.nv3-ownerpic__h {
	margin: 0 0 10px; font: 400 clamp(19px, 4.4vw, 23px)/1.25 var(--nv3-serif);
	color: var(--nv3-ink); overflow-wrap: anywhere;
}
.nv3-ownerpic__p { margin: 0 0 16px; font: 400 14px/1.65 var(--nv3-sans); color: var(--nv3-ink-2); }

.nv3-ownerpic__pending {
	display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr); gap: 14px;
	align-items: start; margin-bottom: 18px; padding-bottom: 18px;
	border-bottom: 1px solid var(--nv3-line);
}
.nv3-ownerpic__pending p { margin: 0; font: 400 13.5px/1.6 var(--nv3-sans); color: var(--nv3-ink-2); }
.nv3-ownerpic__pending strong { display: block; color: var(--nv3-ink); }
.nv3-ownerpic__thumb { width: 100%; height: auto; border-radius: 5px; display: block; }
@media (max-width: 520px) { .nv3-ownerpic__pending { grid-template-columns: minmax(0, 1fr); } }

.nv3-ownerpic__field { display: grid; gap: 5px; margin: 0 0 6px; }
.nv3-ownerpic__field label { font: 500 12px/1.3 var(--nv3-sans); color: var(--nv3-ink); }
.nv3-ownerpic__field input[type="text"],
.nv3-ownerpic__field input[type="file"] {
	width: 100%; min-height: 44px; padding: 10px 12px;
	background: var(--nv3-cream); border: 1px solid var(--nv3-line-2); border-radius: 5px;
	font: 400 13.5px/1.4 var(--nv3-sans); color: var(--nv3-ink);
}
.nv3-ownerpic__hint { margin: 0 0 14px; font: 400 11.5px/1.5 var(--nv3-sans); color: var(--nv3-ink-3); }

/* The checkbox is the legally load-bearing control on this form, so it gets a real target and
   the text beside it stays readable rather than shrinking into fine print. */
.nv3-ownerpic__consent { margin: 4px 0 18px; }
.nv3-ownerpic__consent label {
	display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start;
	font: 400 13px/1.6 var(--nv3-sans); color: var(--nv3-ink-2); cursor: pointer;
}
.nv3-ownerpic__consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--nv3-dark); }

.nv3-ownerpic__note {
	padding: 11px 13px; border-radius: 5px; margin: 0 0 14px;
	font: 400 13px/1.5 var(--nv3-sans); border-left: 3px solid; background: var(--nv3-cream-2);
	color: var(--nv3-ink);
}
.nv3-ownerpic__note--ok { border-left-color: var(--nv3-trust-verified); }
.nv3-ownerpic__note--err { border-left-color: var(--nv3-trust-stale); }

.nv3-ownerinvite {
	margin: 34px 0 0; padding: 16px 0 0; border-top: 1px solid var(--nv3-line);
	max-width: 62ch;
}
.nv3-ownerinvite__p { margin: 0 0 8px; font: 400 13.5px/1.65 var(--nv3-sans); color: var(--nv3-ink-3); }
.nv3-ownerinvite__p strong { color: var(--nv3-ink-2); font-weight: 600; }
.nv3-ownerinvite__link {
	display: inline-flex; align-items: center; gap: 7px; min-height: 44px;
	font: 500 12.5px/1 var(--nv3-sans); color: var(--nv3-ink-2);
}
.nv3-ownerinvite__link:hover { color: var(--nv3-gold-hover); }
.nv3-ownerinvite__link svg { width: 14px; height: 14px; }
