/* ==========================================================================
   Нова сторінка — основні стилі
   ========================================================================== */

:root {
	--ink: #1D1A2B;
	--ink-2: #2B2840;
	--indigo: #2E2A6B;
	--indigo-2: #3D3887;
	--ribbon: #C8372D;
	--ribbon-ink: #A72A21;
	--mustard: #E3A72F;
	--sage: #A9C2A3;
	--paper: #F6F1E7;
	--paper-2: #EFE7D7;
	--card: #FFFDF8;
	--muted: #5F5A6E;
	--line: #E3D9C5;
	--radius: 14px;
	--shadow: 0 1px 0 rgba(29, 26, 43, .05), 0 18px 40px -24px rgba(29, 26, 43, .45);
	--font-display: "Literata", Georgia, "Times New Roman", serif;
	--font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--container: 1240px;
	--gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0; color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.65;
	background-color: var(--paper);
	background-image: radial-gradient(rgba(29, 26, 43, .035) 1px, transparent 1px);
	background-size: 22px 22px;
	-webkit-font-smoothing: antialiased;
}
.ns-main { overflow-x: clip; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ribbon-ink); }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5em; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.ns-skip:focus { clip: auto; width: auto; height: auto; left: 12px; top: 12px; z-index: 1000; padding: 10px 16px; background: var(--mustard); color: var(--ink); border-radius: 10px; }
.ns-container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.ns-container--narrow { max-width: calc(740px + var(--gutter) * 2); }

/* ---------- Кнопки, плашки ---------- */

.ns-btn { display: inline-flex; align-items: center; gap: .55em; padding: 15px 26px; border: 0; border-radius: 10px; font: 600 16px/1 var(--font-body); cursor: pointer; white-space: nowrap; transition: transform .2s, background-color .2s, color .2s, box-shadow .2s; }
.ns-btn:hover { transform: translateY(-2px); }
.ns-btn--accent { background: var(--ribbon); color: #fff; box-shadow: 0 10px 22px -12px rgba(200, 55, 45, .9); }
.ns-btn--accent:hover { background: var(--ribbon-ink); color: #fff; }
.ns-btn--ink { background: var(--ink); color: var(--paper); }
.ns-btn--ink:hover { background: var(--indigo); color: #fff; }

.ns-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; padding: 3px 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ribbon-ink); line-height: 1.2; }
.ns-chip::before { content: ""; width: 8px; height: 12px; background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
a.ns-chip:hover { color: var(--indigo); }

.ns-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--indigo); }
.ns-kicker::before { content: ""; width: 10px; height: 16px; background: var(--ribbon); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }

.ns-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.ns-meta__dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }
.ns-link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.ns-link-arrow span { transition: transform .2s; }
.ns-link-arrow:hover span { transform: translateX(4px); }

/* ---------- Шапка ---------- */

.ns-header { position: sticky; top: 0; z-index: 50; background: rgba(246, 241, 231, .92); backdrop-filter: saturate(150%) blur(12px); -webkit-backdrop-filter: saturate(150%) blur(12px); border-bottom: 1px solid var(--line); transition: box-shadow .25s; }
.admin-bar .ns-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ns-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .ns-header { top: 0; } }
.ns-header.is-scrolled { box-shadow: 0 12px 30px -20px rgba(29, 26, 43, .5); }
.ns-header__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.ns-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); flex-shrink: 0; }
.ns-brand:hover { color: var(--ink); }
.ns-brand__mark { width: 38px; height: 38px; }
.ns-brand__name { font: 700 22px/1 var(--font-display); letter-spacing: -0.02em; }
.ns-brand--logo img { max-height: 46px; width: auto; }
.ns-brand--light, .ns-brand--light:hover { color: var(--paper); }
.ns-nav { margin-left: auto; }
.ns-menu { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ns-menu a { position: relative; display: block; padding: 9px 13px; font-size: 15px; font-weight: 500; color: var(--ink-2); transition: color .2s; }
.ns-menu a::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 4px; height: 2px; background: var(--ribbon); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.ns-menu a:hover, .ns-menu .current-menu-item > a { color: var(--ink); }
.ns-menu a:hover::after, .ns-menu .current-menu-item > a::after { transform: scaleX(1); }
.ns-menu li { position: relative; }
.ns-menu .sub-menu { position: absolute; top: 100%; left: 0; min-width: 220px; margin: 8px 0 0; padding: 8px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s; }
.ns-menu li:hover > .sub-menu, .ns-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.ns-header__actions { display: flex; gap: 6px; }
.ns-icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; transition: all .2s; }
.ns-icon-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ns-burger { display: none; }
.ns-burger__lines, .ns-burger__lines::before, .ns-burger__lines::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s, background-color .25s; }
.ns-burger__lines { position: relative; }
.ns-burger__lines::before, .ns-burger__lines::after { content: ""; position: absolute; left: 0; }
.ns-burger__lines::before { top: -6px; }
.ns-burger__lines::after { top: 6px; }
.ns-burger[aria-expanded="true"] .ns-burger__lines { background: transparent; }
.ns-burger[aria-expanded="true"] .ns-burger__lines::before { transform: translateY(6px) rotate(45deg); }
.ns-burger[aria-expanded="true"] .ns-burger__lines::after { transform: translateY(-6px) rotate(-45deg); }
.ns-search-panel { padding: 16px 0 22px; border-top: 1px solid var(--line); }
.ns-searchform { display: flex; gap: 8px; padding: 6px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); }
.ns-searchform input[type="search"] { flex: 1; min-width: 0; padding: 12px 16px; border: 0; background: transparent; color: var(--ink); font: 500 16px var(--font-body); }
.ns-searchform input[type="search"]:focus { outline: none; }
.ns-searchform .ns-btn { padding: 13px 22px; border-radius: 10px; box-shadow: none; }

@media (max-width: 960px) {
	.ns-burger { display: inline-grid; }
	.ns-nav { position: fixed; inset: 72px 0 auto 0; max-height: calc(100vh - 72px); overflow-y: auto; padding: 12px var(--gutter) 28px; background: var(--paper); border-bottom: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
	.admin-bar .ns-nav { top: calc(72px + 46px); }
	.ns-nav.is-open { opacity: 1; visibility: visible; transform: none; }
	.ns-menu { flex-direction: column; align-items: stretch; }
	.ns-menu a { padding: 14px 4px; font: 600 21px var(--font-display); border-bottom: 1px solid var(--line); }
	.ns-menu a::after { display: none; }
	.ns-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; margin: 0 0 0 14px; padding: 0; border: 0; box-shadow: none; background: transparent; }
	.ns-header__actions { margin-left: auto; }
}

/* ---------- Hero ---------- */

.ns-hero { position: relative; padding: clamp(48px, 7vw, 100px) 0 clamp(56px, 7vw, 96px); overflow: hidden; }
.ns-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 100%; background: linear-gradient(90deg, transparent 0 calc(50% + 120px), rgba(46, 42, 107, .06) calc(50% + 120px)); pointer-events: none; }
.ns-hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(32px, 6vw, 90px); align-items: center; }
.ns-hero__title { font-size: clamp(42px, 6vw, 82px); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; margin: 0 0 24px; text-wrap: balance; }
.ns-hero__title em { display: block; font-style: italic; font-weight: 700; color: var(--indigo); }
.ns-hero__text { max-width: 560px; margin: 0 0 30px; font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); }
.ns-hero__search { max-width: 560px; }
.ns-hero__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 22px; font-size: 15px; }
.ns-hero__tags span { color: var(--muted); }
.ns-hero__tags a { font-weight: 600; border-bottom: 1.5px solid var(--sage); padding: 4px 0 2px; }
.ns-hero__tags a:hover { border-color: var(--ribbon); }

.ns-hero__book { position: relative; justify-self: center; width: min(100%, 380px); padding: 20px 30px 30px 0; }
.ns-book-stack span { position: absolute; left: 22px; right: 8px; height: 100%; top: 18px; border-radius: 6px 12px 12px 6px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ns-book-stack span:nth-child(1) { transform: rotate(4deg); background: var(--paper-2); }
.ns-book-stack span:nth-child(2) { transform: rotate(-3deg) translate(-6px, 6px); background: var(--sage); }
.ns-book { position: relative; transform: rotate(-1.5deg); transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.ns-book:hover { transform: rotate(0) translateY(-6px); }
.ns-book__cover {
	position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; color: #fff;
	border-radius: 6px 14px 14px 6px; background: var(--indigo);
	box-shadow: inset 10px 0 18px -10px rgba(0, 0, 0, .55), 0 30px 60px -28px rgba(29, 26, 43, .8), 10px 10px 0 -4px var(--card), 10px 10px 0 -3px var(--line), 18px 18px 0 -8px var(--card), 18px 18px 0 -7px var(--line);
}
.ns-book__cover:hover { color: #fff; }
.ns-book__cover .ns-thumb { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.ns-book__cover .ns-thumb__empty span, .ns-pick__cover .ns-thumb__empty span { display: none; }
.ns-book__cover::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(29, 26, 43, .1) 30%, rgba(29, 26, 43, .92) 100%); }
.ns-book__cover::after { content: ""; position: absolute; z-index: 2; top: 0; bottom: 0; left: 12px; width: 2px; background: rgba(255, 255, 255, .25); }
.ns-book__ribbon { position: absolute; z-index: 3; top: -4px; right: 34px; width: 22px; height: 86px; background: var(--ribbon); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); box-shadow: 0 4px 8px rgba(0, 0, 0, .2); }
.ns-book__body { position: absolute; z-index: 3; left: 30px; right: 24px; bottom: 26px; display: flex; flex-direction: column; gap: 10px; }
.ns-book__label { align-self: flex-start; padding: 5px 10px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ns-book__title { font: 700 clamp(22px, 2.2vw, 28px)/1.15 var(--font-display); letter-spacing: -0.015em; text-wrap: balance; }
.ns-book__meta { font-size: 13px; opacity: .8; }
.ns-note { position: absolute; z-index: 4; right: -6px; bottom: -6px; padding: 14px 16px; background: var(--mustard); color: var(--ink); border-radius: 4px; transform: rotate(5deg); box-shadow: 0 14px 24px -14px rgba(29, 26, 43, .6); font-size: 13px; line-height: 1.3; }
.ns-note b { display: block; font: italic 700 19px var(--font-display); }
@media (max-width: 900px) {
	.ns-hero::before { display: none; }
	.ns-hero__grid { grid-template-columns: minmax(0, 1fr); }
	.ns-hero__book { width: min(100%, 340px); }
}

/* ---------- Полиця рубрик ---------- */

.ns-shelf-section { padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 6vw, 80px); background: linear-gradient(180deg, transparent, rgba(46, 42, 107, .05)); }
.ns-shelf { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--indigo) transparent; padding: 10px max(var(--gutter), calc((100vw - var(--container)) / 2)) 0; }
.ns-shelf__books { display: flex; align-items: flex-end; gap: 6px; min-height: 310px; width: max-content; padding: 0 12px; }
.ns-spine {
	position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: center;
	width: 74px; height: var(--h, 240px); padding: 18px 0 14px; color: #fff; background: var(--c, var(--indigo));
	border-radius: 4px 4px 2px 2px;
	box-shadow: inset 6px 0 10px -6px rgba(0, 0, 0, .45), inset -4px 0 8px -6px rgba(255, 255, 255, .4), 0 6px 12px -8px rgba(0, 0, 0, .6);
	transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.ns-spine:nth-child(3n) { width: 64px; }
.ns-spine:nth-child(4n) { width: 84px; }
.ns-spine:nth-child(5n) { transform: rotate(-4deg); transform-origin: bottom left; margin-left: 10px; }
.ns-spine::before, .ns-spine::after { content: ""; position: absolute; left: 10px; right: 10px; height: 3px; background: rgba(255, 255, 255, .55); border-radius: 2px; }
.ns-spine::before { top: 12px; }
.ns-spine::after { bottom: 44px; }
.ns-spine:hover { color: #fff; transform: translateY(-16px); }
.ns-spine:nth-child(5n):hover { transform: rotate(0) translateY(-16px); }
.ns-spine__name { writing-mode: vertical-rl; transform: rotate(180deg); font: 700 18px/1.1 var(--font-display); max-height: calc(var(--h) - 90px); overflow: hidden; letter-spacing: .01em; white-space: nowrap; margin-top: 8px; }
.ns-spine__count { font-size: 12px; font-weight: 700; padding: 4px 6px; border-radius: 4px; background: rgba(0, 0, 0, .22); }
.ns-shelf__deco { width: 260px; height: 200px; margin-left: 40px; flex: 0 0 auto; }
.ns-shelf__plank { height: 22px; margin: 0 -40px; background: linear-gradient(180deg, #8B5E3C, #6E4529); border-radius: 3px; box-shadow: 0 16px 24px -14px rgba(29, 26, 43, .7); }
.ns-spine[style*="#A9C2A3"], .ns-spine[style*="#E3A72F"] { color: var(--ink); }
.ns-spine[style*="#A9C2A3"]::before, .ns-spine[style*="#A9C2A3"]::after, .ns-spine[style*="#E3A72F"]::before, .ns-spine[style*="#E3A72F"]::after { background: rgba(29, 26, 43, .45); }

/* ---------- Секції ---------- */

.ns-section { padding: clamp(56px, 8vw, 100px) 0; }
.ns-section--tight { padding: clamp(36px, 5vw, 60px) 0 clamp(56px, 7vw, 92px); }
.ns-section--soft, .ns-section--paper { background: var(--paper-2); }
.ns-section-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px 24px; margin-bottom: clamp(26px, 4vw, 44px); padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.ns-section-head__num { flex-basis: 100%; font: italic 500 18px/1 var(--font-display); color: var(--ribbon-ink); }
.ns-section-head__title { margin: 0; font-size: clamp(30px, 4vw, 50px); font-weight: 800; letter-spacing: -0.03em; }
.ns-section-head .ns-link-arrow { margin-left: auto; }

/* ---------- Обкладинки ---------- */

.ns-thumb { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); aspect-ratio: 3 / 2; }
.ns-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.ns-card:hover .ns-thumb img, .ns-book:hover .ns-thumb img, .ns-pick:hover .ns-thumb img { transform: scale(1.05); }
.ns-thumb__empty { position: absolute; inset: 0; background: var(--ns-bg, linear-gradient(135deg, #D9D3EE, #F6F1E7)); }
.ns-thumb__empty svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ns-thumb__empty span { position: absolute; left: 16px; bottom: 10px; font: italic 700 40px/1 var(--font-display); color: rgba(29, 26, 43, .55); }
.ns-thumb__empty--1 { --ns-bg: linear-gradient(135deg, #F3D3C8, #F6F1E7); }
.ns-thumb__empty--2 { --ns-bg: linear-gradient(135deg, #F5E2B0, #F6F1E7); }
.ns-thumb__empty--3 { --ns-bg: linear-gradient(135deg, #CFE0CB, #F6F1E7); }

/* ---------- Картки-сторінки ---------- */

.ns-card { position: relative; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ns-pages .ns-card { padding: 14px 14px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 4px 4px 4px 4px; box-shadow: var(--shadow); transition: transform .3s; }
.ns-pages .ns-card::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 28px; height: 28px; background: linear-gradient(135deg, var(--paper-2) 50%, var(--paper) 50%); border-left: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 0 0 4px 0; }
.ns-pages .ns-card:hover { transform: translateY(-4px); }
.ns-pages .ns-thumb { border-radius: 3px; }
.ns-pages .ns-card__body { padding: 0 6px; }
.ns-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.ns-card__title { margin: 0; font-size: 21px; line-height: 1.25; }
.ns-card__title a { background: linear-gradient(var(--mustard), var(--mustard)) 0 92% / 0 6px no-repeat; transition: background-size .3s, color .2s; }
.ns-card__title a:hover { color: var(--ink); background-size: 100% 6px; }
.ns-card__excerpt { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.ns-grid { display: grid; gap: clamp(28px, 3vw, 40px) clamp(20px, 2.5vw, 30px); }
.ns-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ns-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .ns-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .ns-grid--2, .ns-grid--3 { grid-template-columns: 1fr; } }

/* ---------- Цитата ---------- */

.ns-quote { position: relative; padding: clamp(64px, 9vw, 120px) 0; background: var(--indigo); color: var(--paper); overflow: hidden; }
.ns-quote::before { content: "“"; position: absolute; left: 50%; top: -60px; transform: translateX(-50%); font: 700 360px/1 var(--font-display); color: rgba(255, 255, 255, .06); }
.ns-quote figure { position: relative; margin: 0 auto; max-width: 900px; text-align: center; }
.ns-quote blockquote { margin: 0; font: italic 500 clamp(28px, 4vw, 48px)/1.25 var(--font-display); letter-spacing: -0.015em; text-wrap: balance; }
.ns-quote figcaption { margin-top: 26px; font-size: 14px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--mustard); }

/* ---------- Добірка ---------- */

.ns-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px clamp(24px, 4vw, 56px); margin: 0; padding: 0; list-style: none; counter-reset: pick; }
.ns-pick { counter-increment: pick; display: grid; grid-template-columns: 130px 1fr; gap: 22px; align-items: start; }
.ns-pick__cover { position: relative; }
.ns-pick__cover .ns-thumb { aspect-ratio: 3 / 4; border-radius: 3px 8px 8px 3px; box-shadow: inset 6px 0 10px -6px rgba(0, 0, 0, .5), 6px 6px 0 -2px var(--card), 6px 6px 0 -1px var(--line), var(--shadow); }
.ns-pick__cover::before { content: counter(pick, decimal-leading-zero); position: absolute; z-index: 2; left: -12px; top: -12px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--ribbon); color: #fff; font: 700 14px var(--font-body); }
.ns-pick__body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ns-pick__title { margin: 0; font-size: 22px; }
.ns-pick__body p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
@media (max-width: 860px) { .ns-picks { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .ns-pick { grid-template-columns: 96px 1fr; gap: 16px; } }

/* ---------- Конспект ---------- */

.ns-useful { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 34px); }
.ns-useful__col { position: relative; padding: 28px 26px 18px 34px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); background-image: linear-gradient(90deg, transparent 18px, rgba(200, 55, 45, .35) 18px 19px, transparent 19px), repeating-linear-gradient(180deg, transparent 0 33px, rgba(46, 42, 107, .08) 33px 34px); }
.ns-useful__title { font-size: 23px; margin: 0 0 8px; }
.ns-useful ul { list-style: none; margin: 0; padding: 0; }
.ns-useful li { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.ns-useful li:last-child { border-bottom: 0; }
.ns-useful li a { display: block; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
@media (max-width: 900px) { .ns-useful { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */

.ns-cta { padding: clamp(48px, 7vw, 84px) 0; background: var(--mustard); }
.ns-cta__inner { display: flex; align-items: center; gap: 28px 44px; flex-wrap: wrap; }
.ns-cta__stamp { display: grid; place-items: center; width: 116px; height: 116px; border-radius: 50%; border: 3px solid var(--ink); outline: 1.5px dashed var(--ink); outline-offset: -11px; transform: rotate(-12deg); }
.ns-cta__stamp span { font: 800 30px var(--font-display); color: var(--ink); }
.ns-cta__copy { flex: 1; min-width: 260px; }
.ns-cta__title { font-size: clamp(28px, 3.5vw, 42px); margin: 0 0 8px; }
.ns-cta__copy p { margin: 0; max-width: 640px; color: #3B2E12; }

/* ---------- Підвал ---------- */

.ns-footer { position: relative; background: var(--ink); color: rgba(246, 241, 231, .7); padding: 0 0 28px; margin-top: 0; }
.ns-footer__shelf { height: 14px; background: repeating-linear-gradient(90deg, #2E2A6B 0 26px, #C8372D 26px 40px, #E3A72F 40px 52px, #1F6F5C 52px 80px, #A9C2A3 80px 92px, #3E5C8A 92px 120px); }
.ns-footer__big { margin: 0; padding-top: 36px; font: italic 700 clamp(48px, 10vw, 150px)/.95 var(--font-display); letter-spacing: -0.04em; color: rgba(246, 241, 231, .08); white-space: nowrap; overflow: hidden; }
.ns-footer__big::before { content: attr(data-text); }
.ns-footer__big em { color: var(--ribbon); font-style: normal; }
.ns-footer__grid { display: grid; grid-template-columns: 1.3fr 1.2fr .9fr; gap: 40px; padding-top: 30px; padding-bottom: 46px; }
.ns-footer__about p { max-width: 360px; margin: 18px 0 0; font-size: 15px; }
.ns-footer__title { font: 700 13px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--mustard); margin: 6px 0 18px; }
.ns-footer__menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ns-footer__menu--2col { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.ns-footer__menu a { color: var(--paper); font-weight: 500; }
.ns-footer__menu a:hover { color: var(--mustard); }
.ns-widget + .ns-widget { margin-top: 26px; }
.ns-widget__title { font-size: 13px; color: var(--mustard); text-transform: uppercase; letter-spacing: .16em; font-family: var(--font-body); }
.ns-widget ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ns-footer__widgets a { color: var(--paper); }
.ns-footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid rgba(246, 241, 231, .12); font-size: 14px; }
.ns-footer__bottom a { color: var(--paper); }
@media (max-width: 820px) { .ns-footer__grid { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Заголовок архіву ---------- */

.ns-page-head { position: relative; padding: clamp(48px, 7vw, 90px) 0 clamp(30px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.ns-page-head__title { font-size: clamp(38px, 6vw, 76px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; margin: 0; overflow-wrap: anywhere; }
.ns-page-head__desc { max-width: 680px; margin-top: 16px; color: var(--muted); font-size: 18px; }
.ns-page-head__desc p { margin: 0; }
.ns-page-head__search { margin-top: 28px; max-width: 640px; }
.ns-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.ns-filter a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 600; background: var(--card); transition: all .2s; }
.ns-filter a:hover { border-color: var(--ink); }
.ns-filter a.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- Пагінація ---------- */

.ns-pagination { margin-top: clamp(48px, 6vw, 72px); }
.ns-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ns-pagination .page-numbers { display: inline-grid; place-items: center; min-width: 48px; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-weight: 700; }
.ns-pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ns-pagination a.page-numbers:hover { border-color: var(--ink); }
.ns-pagination .dots { background: transparent; border: 0; }

/* ---------- Стаття ---------- */

.ns-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 60; background: transparent; }
.ns-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ribbon), var(--mustard)); transition: width .1s linear; }
.admin-bar .ns-progress { top: 32px; }
.ns-article__head { padding: clamp(36px, 6vw, 76px) 0 clamp(26px, 4vw, 38px); }
.ns-crumbs { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 22px; font-size: 14px; font-weight: 600; color: var(--muted); }
.ns-crumbs p { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.ns-crumbs .separator { color: var(--line); }
.ns-crumbs .last { font-weight: 400; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-page-head .ns-crumbs { margin-bottom: 18px; }
.ns-article__head .ns-chip { margin-bottom: 12px; }
.ns-article__title { font-size: clamp(34px, 5vw, 60px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.06; margin: 0 0 22px; text-wrap: balance; }
.ns-article__lead { font: italic 500 clamp(19px, 2vw, 23px)/1.5 var(--font-display); color: var(--ink-2); margin: 0 0 26px; }
.ns-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.ns-article__author { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.ns-article__author img { border-radius: 50%; width: 36px; height: 36px; }
.ns-article__cover { margin: 0 auto clamp(32px, 5vw, 56px); }
.ns-article__cover img { width: 100%; border-radius: 16px; max-height: 700px; object-fit: cover; box-shadow: var(--shadow); }
.ns-article__cover figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }
.ns-article__foot { margin: 48px 0 clamp(56px, 7vw, 88px); padding-top: 28px; border-top: 1px solid var(--ink); display: grid; gap: 22px; }
.ns-sponsored-label { display: inline-block; margin: 0 0 16px; padding: 6px 12px; border-radius: 6px; background: rgba(46, 42, 107, .08); color: var(--indigo); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ns-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ns-tags a { padding: 6px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 600; }
.ns-tags a:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ns-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ns-share__label { font-weight: 700; margin-right: 6px; }
.ns-share__btn { padding: 8px 14px; border: 1px solid var(--ink); border-radius: 8px; background: transparent; color: var(--ink); font: 600 14px/1 var(--font-body); cursor: pointer; transition: all .2s; }
.ns-share__btn:hover { background: var(--ink); color: var(--paper); }
.ns-share__btn.is-done { background: var(--mustard); border-color: var(--mustard); }

/* ---------- Типографіка контенту ---------- */

.ns-content { font: 400 20px/1.75 var(--font-display); color: #24212F; }
.ns-content > * { margin-top: 0; margin-bottom: 1.1em; }
.ns-content > p:first-of-type::first-letter { float: left; margin: .08em .12em 0 0; font: 800 4.2em/.8 var(--font-display); color: var(--indigo); }
.ns-content h2 { font-size: clamp(27px, 3vw, 35px); margin-top: 1.7em; font-weight: 800; }
.ns-content h3 { font-size: clamp(22px, 2.4vw, 27px); margin-top: 1.5em; }
.ns-content strong { font-weight: 700; }
.ns-content a { color: var(--ribbon-ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.ns-content a:hover { color: var(--indigo); }
.ns-content ul, .ns-content ol { padding-left: 1.3em; font-family: var(--font-body); font-size: 18px; }
.ns-content li { margin-bottom: .5em; }
.ns-content li::marker { color: var(--ribbon); font-weight: 700; }
.ns-content blockquote, .ns-content .wp-block-quote { margin: 2em 0; padding: 26px 30px; background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--mustard); border-radius: 4px; font: italic 500 clamp(21px, 2.4vw, 26px)/1.45 var(--font-display); }
.ns-content blockquote cite { display: block; margin-top: 12px; font: 600 14px var(--font-body); font-style: normal; color: var(--muted); }
.ns-content img { border-radius: 12px; }
.ns-content figure { margin-left: 0; margin-right: 0; }
.ns-content figcaption, .ns-content .wp-element-caption { font: 14px var(--font-body); color: var(--muted); text-align: center; margin-top: 8px; }
.ns-content .alignwide { margin-left: calc(-1 * min(120px, 8vw)); margin-right: calc(-1 * min(120px, 8vw)); max-width: none; }
.ns-content .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.ns-content .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.ns-content .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.ns-content table { width: 100%; border-collapse: collapse; font: 16px var(--font-body); }
.ns-content th, .ns-content td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.ns-content th { background: var(--ink); color: var(--paper); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.ns-content code { padding: .15em .4em; background: var(--paper-2); border-radius: 6px; font-size: .85em; }
.ns-content hr { border: 0; height: 1px; background: var(--line); margin: 2.5em 0; }
.ns-content::after { content: ""; display: table; clear: both; }
.ns-content .ns-related-links, .ns-content .cv-related-links { margin: 2em 0; padding: 20px 24px; background: var(--card); border: 1px dashed var(--indigo); border-radius: 8px; font: 17px/1.6 var(--font-body); }
.ns-content .ns-related-links strong, .ns-content .cv-related-links strong { display: block; margin-bottom: 6px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--indigo); }
.ns-content .has-ink-color { color: var(--ink); } .ns-content .has-indigo-color { color: var(--indigo); } .ns-content .has-ribbon-color { color: var(--ribbon); } .ns-content .has-mustard-color { color: var(--mustard); } .ns-content .has-sage-color { color: var(--sage); } .ns-content .has-paper-color { color: var(--paper); }
.ns-content .has-ink-background-color { background-color: var(--ink); } .ns-content .has-indigo-background-color { background-color: var(--indigo); } .ns-content .has-ribbon-background-color { background-color: var(--ribbon); } .ns-content .has-mustard-background-color { background-color: var(--mustard); } .ns-content .has-sage-background-color { background-color: var(--sage); } .ns-content .has-paper-background-color { background-color: var(--paper); }
@media (max-width: 860px) { .ns-content .alignwide { margin-left: 0; margin-right: 0; } }
@media (max-width: 600px) { .ns-content { font-size: 18px; } .ns-content ul, .ns-content ol { font-size: 17px; } .ns-content .alignleft, .ns-content .alignright { float: none; margin: 0 0 1em; max-width: 100%; } }
.ns-page-links { display: flex; gap: 8px; align-items: center; font-weight: 700; }

/* ---------- Коментарі ---------- */

.ns-comments__title { font-size: 28px; margin-bottom: 24px; }
.ns-comments__list, .ns-comments__list .children { list-style: none; margin: 0; padding: 0; }
.ns-comments__list .children { margin-left: clamp(16px, 4vw, 48px); }
.ns-comments__list .comment-body { margin-bottom: 16px; padding: 22px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.ns-comments__list .comment-author { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.ns-comments__list .comment-author img { border-radius: 50%; }
.ns-comments__list .says { display: none; }
.ns-comments__list .comment-metadata { font-size: 13px; color: var(--muted); margin: 4px 0 10px 56px; }
.ns-comments__list .comment-content, .ns-comments__list .reply { margin-left: 56px; }
.ns-comments__list .reply a { color: var(--ribbon-ink); font-weight: 600; font-size: 14px; }
.comment-respond { margin-top: 40px; }
.comment-form { display: grid; gap: 14px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); font: 16px var(--font-body); color: var(--ink); }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--ink); }
.comment-form .comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.comment-form .comment-form-cookies-consent label { font-weight: 400; margin: 0; }
.comment-notes, .logged-in-as { font-size: 14px; color: var(--muted); }

/* ---------- Порожній стан, 404 ---------- */

.ns-empty { padding: clamp(40px, 6vw, 72px); text-align: center; background: var(--card); border-radius: 8px; border: 1.5px dashed var(--line); }
.ns-empty h2 { font-size: clamp(26px, 3vw, 36px); }
.ns-empty p { color: var(--muted); margin: 0 auto 24px; max-width: 520px; }
.ns-404 { padding: clamp(64px, 10vw, 140px) 0; text-align: center; }
.ns-404__code { margin: 0; font: italic 800 clamp(120px, 24vw, 280px)/.85 var(--font-display); letter-spacing: -0.05em; color: var(--indigo); }
.ns-404__title { font-size: clamp(28px, 4vw, 44px); margin: 24px 0 12px; }
.ns-404 p { color: var(--muted); }
.ns-404__search { max-width: 560px; margin: 28px auto; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
.wp-caption { max-width: 100%; }
.alignnone { margin: 0; }
