/* =============================================================================
   Prose — "ByDataFix" style: blue accent, white rounded cards, pastel pills,
   two-column layout with widget sidebar, bold Poppins sans-serif.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
	--primary: #2f6bff;
	--primary-hover: #1f56e6;
	--heading: #17223b;
	--body: #454c60;
	--muted: #8a94a8;
	--line: #eceff5;
	--bg: #f5f7fc;
	--card: #ffffff;
	--code-bg: #0f172a;
	--code-fg: #e2e8f0;

	--font-sans: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--container: 1340px;
	--reading: 46rem;
	--gutter: clamp(1rem, 4vw, 2rem);

	--r-md: 14px;
	--r-lg: 20px;
	--r-full: 999px;
	--shadow: 0 12px 34px rgba(23, 34, 59, .07);
	--shadow-hover: 0 18px 44px rgba(23, 34, 59, .12);
	--ease: cubic-bezier(.2, .6, .2, 1);
	--header-h: 74px;

	/* tag pill palette */
	--pill-0-bg: #ffe0ea; --pill-0-fg: #e23b7b;
	--pill-1-bg: #dcecff; --pill-1-fg: #2f80ed;
	--pill-2-bg: #dcf5e7; --pill-2-fg: #1fa463;
	--pill-3-bg: #ece4ff; --pill-3-fg: #7c5cff;
	--pill-4-bg: #ffe9d6; --pill-4-fg: #f2802a;
	--pill-5-bg: #d6f3f6; --pill-5-fg: #10a5bd;
}

[data-theme="dark"] {
	--heading: #f1f5fb;
	--body: #b7c0d4;
	--muted: #7e889c;
	--line: #232a3a;
	--bg: #0b0f1a;
	--card: #141a28;
	--shadow: 0 12px 34px rgba(0, 0, 0, .4);
	--shadow-hover: 0 18px 44px rgba(0, 0, 0, .55);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .001ms !important; } }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

body {
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.65;
	color: var(--body);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: clip; /* safety net against stray horizontal overflow (clip keeps sticky working) */
}
h1, h2, h3, h4 { color: var(--heading); line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--primary); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ---------- Reading progress ---------- */
.reading-progress { position: fixed; inset: 0 auto auto 0; height: 3px; width: 0; background: var(--primary); z-index: 60; transition: width .1s linear; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--card); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 2rem; min-height: var(--header-h); max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.site-brand { margin-inline-end: auto; } /* pushes nav + actions to the right */
.site-brand__title { font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; color: var(--heading); }
.site-nav__list { display: flex; gap: 2rem; list-style: none; padding: 0; align-items: center; }
.site-nav__list a { color: var(--heading); font-size: 1rem; font-weight: 500; padding-bottom: 2px; }
.site-nav__list a:hover { color: var(--primary); }
.site-nav .current-menu-item a, .site-nav .current_page_item a { color: var(--primary); border-bottom: 2px solid var(--primary); }
.site-header__actions { display: flex; align-items: center; gap: 1rem; }
.icon-btn--circle { display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--primary); color: #fff; cursor: pointer; }
.icon-btn--circle:hover { background: var(--primary-hover); }
.btn-subscribe { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.5rem; border-radius: var(--r-full); background: var(--primary); color: #fff; font-size: 1rem; font-weight: 600; }
.btn-subscribe:hover { background: var(--primary-hover); color: #fff; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; border-radius: 10px; background: none; color: var(--heading); cursor: pointer; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.site-search { border-top: 1px solid var(--line); padding-block: 1rem; background: var(--card); }
.site-search .wrap { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Search form ---------- */
.search-form { position: relative; display: flex; align-items: center; }
.search-form__icon { position: absolute; left: 1rem; color: var(--muted); pointer-events: none; }
.search-form__input { flex: 1; min-width: 0; padding: .85rem 1rem .85rem 2.9rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); font-size: .95rem; }
.search-form__input:focus { outline: none; border-color: var(--primary); background: var(--card); }
.search-form__submit { margin-left: .5rem; padding: .7rem 1.4rem; border: 0; border-radius: var(--r-md); background: var(--primary); color: #fff; font-size: .95rem; font-weight: 600; cursor: pointer; }
.search-form__submit:hover { background: var(--primary-hover); }

/* ---------- Two-column layout ---------- */
.content-layout { max-width: var(--container); margin-inline: auto; padding: clamp(1.25rem, 4vw, 2.75rem) var(--gutter); display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .content-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 1.75rem; } }
.feed { display: flex; flex-direction: column; gap: 1.15rem; min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
@media (min-width: 1000px) { .sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); } }

/* ---------- Post card ---------- */
.pcard { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.pcard.has-media { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .pcard.has-media { grid-template-columns: 300px minmax(0, 1fr); } }
.pcard__media { display: block; overflow: hidden; background: var(--bg); }
.pcard__media img { width: 100%; height: 100%; min-height: 210px; object-fit: cover; }
.pcard__body { padding: clamp(1rem, 1.6vw, 1.25rem) clamp(1.25rem, 2vw, 1.6rem); }
.pcard__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.pcard__title { font-size: clamp(1.12rem, 2vw, 1.35rem); font-weight: 700; line-height: 1.3; margin-bottom: .4rem; }
.pcard__title a { color: var(--heading); }
.pcard__title a:hover { color: var(--primary); }
.pcard__excerpt { color: var(--body); font-size: .95rem; line-height: 1.5; margin-bottom: .6rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__more { display: inline-block; color: var(--heading); font-weight: 700; font-size: .9rem; margin-bottom: .7rem; }
.pcard__more:hover { color: var(--primary); }
.pcard__meta { display: flex; align-items: center; gap: .55rem; padding-top: .7rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.pcard__meta img { width: 28px; height: 28px; border-radius: 50%; }
.pcard__author { color: var(--heading); font-weight: 600; }
.pcard__meta .dot { color: var(--line); }
.pcard__meta svg { color: var(--muted); }

/* ---------- Tag pills ---------- */
.pill { display: inline-block; padding: .4rem .95rem; border-radius: var(--r-full); font-size: .8rem; font-weight: 700; letter-spacing: .01em; }
.pill--0 { background: var(--pill-0-bg); color: var(--pill-0-fg); }
.pill--1 { background: var(--pill-1-bg); color: var(--pill-1-fg); }
.pill--2 { background: var(--pill-2-bg); color: var(--pill-2-fg); }
.pill--3 { background: var(--pill-3-bg); color: var(--pill-3-fg); }
.pill--4 { background: var(--pill-4-bg); color: var(--pill-4-fg); }
.pill--5 { background: var(--pill-5-bg); color: var(--pill-5-fg); }

/* ---------- Sidebar widgets ---------- */
.widget { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(1.15rem, 2vw, 1.5rem); }
.widget-title, .widget h2, .widget h3 { display: flex; align-items: center; font-size: 1.05rem; font-weight: 800; color: var(--heading); margin-bottom: 1rem; }
.widget-title::before, .widget h2::before, .widget h3::before { content: ""; order: 2; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin: 0 .5rem 0 .6rem; flex: 0 0 auto; }
.widget-title::after, .widget h2::after, .widget h3::after { content: ""; order: 3; flex: 1; height: 2px; background: var(--line); }
.widget ul { list-style: none; padding: 0; display: flex; flex-direction: column; }
.widget li { padding: .55rem 0; border-bottom: 1px solid var(--line); color: var(--body); font-size: .88rem; }
.widget li:last-child { border-bottom: 0; }
.widget li a { color: var(--heading); font-weight: 600; }
.widget li a:hover { color: var(--primary); }
.widget .post-date, .widget .rss-date { display: block; font-size: .82rem; color: var(--muted); font-weight: 400; margin-top: .15rem; }
.widget-empty { color: var(--muted); }
.widget select { width: 100%; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.widget .search-form { flex-direction: row; }

/* recent posts widget: show thumbnail if present */
.widget_recent_entries li, .prose-recent li { display: flex; gap: .85rem; align-items: flex-start; }
.prose-recent__thumb { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }

/* ---------- Page head (archives/search) ---------- */
.page-head { margin-bottom: 1.75rem; }
.page-head__eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.page-head__title { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; margin-block: .35rem .5rem; }
.page-head__title span { color: var(--primary); }
.page-head__desc { color: var(--body); }
.empty { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 3rem; text-align: center; color: var(--muted); }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 2.5rem; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .8rem; border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow); color: var(--heading); font-size: .95rem; font-weight: 600; }
.pagination .current { background: var(--primary); color: #fff; }
.pagination a:hover { color: var(--primary); }

/* ---------- Single article ---------- */
.article { max-width: var(--container); margin-inline: auto; padding: clamp(1.5rem, 4vw, 2.75rem) var(--gutter); }
.article__header { max-width: var(--reading); margin-inline: auto; }
.article__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.article__eyebrow { display: none; }
.article__title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.2; margin-bottom: .9rem; }
.article__subtitle { font-size: clamp(1.15rem, 2.5vw, 1.4rem); color: var(--body); font-weight: 400; line-height: 1.45; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: 1.5rem; padding-block: 1.25rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.article__meta-dates { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.article__updated { color: var(--primary); }
.article__hero { max-width: var(--container); margin: clamp(1.5rem, 4vw, 2.5rem) auto; }
.article__hero-img { width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow); }

.article__layout { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
@media (min-width: 1080px) {
	.article__layout { grid-template-columns: 240px minmax(0, var(--reading)); justify-content: center; gap: 3.5rem; }
	.article__toc { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.article__content { max-width: var(--reading); margin-inline: auto; }

/* ---------- TOC ---------- */
.toc { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 1.5rem; }
.toc__title { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.toc__list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .1rem; }
.toc__item a { display: block; padding: .35rem .5rem; border-radius: 8px; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.toc__item--l3 a { padding-left: 1.4rem; font-size: .84rem; }
.toc__item a:hover { color: var(--heading); background: var(--bg); }
.toc__item a.is-active { color: var(--primary); background: var(--bg); font-weight: 600; }

/* ---------- Reading typography ---------- */
.article__content { font-size: 1rem; line-height: 1.7; color: var(--body); min-width: 0; overflow-wrap: break-word; }
.article__content > * { margin-block: 1rem; }
.article__content pre { max-width: 100%; }
.article__content > :first-child { margin-top: .25rem; }
.article__content h2 { font-size: 1.4rem; font-weight: 700; margin-top: 2rem; }
.article__content h3 { font-size: 1.18rem; font-weight: 700; margin-top: 1.6rem; }
.article__content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.article__content ul, .article__content ol { padding-left: 1.4rem; }
.article__content li { margin-block: .5rem; }
.article__content img { border-radius: var(--r-md); }
.article__content blockquote { margin-inline: 0; padding: 1rem 1.4rem; border-left: 4px solid var(--primary); background: var(--card); border-radius: 0 var(--r-md) var(--r-md) 0; box-shadow: var(--shadow); font-style: italic; color: var(--heading); }
.article__content figure figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .5rem; }
.article__content hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5rem; }
.article__content :not(pre) > code { font-family: var(--font-mono); font-size: .86em; padding: .15em .45em; background: #e9f1ff; border: 0; border-radius: 6px; color: var(--primary); }
[data-theme="dark"] .article__content :not(pre) > code { background: #16233d; }
.article__content pre { position: relative; font-family: var(--font-mono); font-size: .875rem; line-height: 1.65; background: var(--code-bg); color: var(--code-fg); padding: 2.75rem 1.25rem 1.15rem; border-radius: var(--r-md); overflow-x: auto; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 6px 20px rgba(9, 14, 30, .25); }
.article__content pre code { font-family: inherit; background: none; padding: 0; color: inherit; }
/* header strip: three dots (left) + language label */
.article__content pre::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2.05rem; background: rgba(255, 255, 255, .04); border-bottom: 1px solid rgba(255, 255, 255, .07); border-radius: var(--r-md) var(--r-md) 0 0; }
.article__content pre[data-lang]::after { content: attr(data-lang); position: absolute; top: 0; left: 1rem; height: 2.05rem; display: flex; align-items: center; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7d8db1; z-index: 1; }
.copy-code { position: absolute; top: .3rem; right: .5rem; z-index: 2; padding: .3rem .7rem; font-family: var(--font-sans); font-size: .72rem; font-weight: 600; color: #b8c4e0; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-radius: 6px; cursor: pointer; opacity: .85; transition: opacity .15s, color .15s; }
.article__content pre:hover .copy-code, .copy-code:focus { opacity: 1; }
.copy-code.is-copied { color: #4ade80; }

/* highlight.js token colors (GitHub-dark palette, tuned for --code-bg) */
.hljs { color: var(--code-fg); background: transparent; }
.hljs-comment, .hljs-quote { color: #7d8db1; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-type { color: #ff7b72; }
.hljs-built_in, .hljs-class .hljs-title { color: #ffa657; }
.hljs-string, .hljs-attr, .hljs-regexp, .hljs-symbol { color: #a5d6ff; }
.hljs-number, .hljs-meta { color: #79c0ff; }
.hljs-title, .hljs-title.function_, .hljs-section, .hljs-name { color: #d2a8ff; }
.hljs-params, .hljs-variable { color: var(--code-fg); }
.hljs-attribute, .hljs-property { color: #7ee787; }
.hljs-deletion { color: #ffa198; }
.hljs-addition { color: #7ee787; }
.article__footer-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem; }
.article__footer-tags a { font-size: .82rem; padding: .4rem .9rem; background: var(--card); box-shadow: var(--shadow); border-radius: var(--r-full); color: var(--muted); }
.article__footer-tags a:hover { color: var(--primary); }
.article__comments { max-width: var(--reading); margin: 3rem auto 0; }

/* ---------- Byline ---------- */
.byline__author { display: inline-flex; align-items: center; gap: .5rem; color: var(--heading); font-weight: 600; }
.byline__avatar { border-radius: 50%; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.6rem; border-radius: var(--r-full); font-weight: 600; font-size: 1rem; cursor: pointer; border: 0; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 2rem; border-top: 1px solid var(--line); background: var(--card); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; max-width: var(--container); margin-inline: auto; padding: 1.5rem var(--gutter) 1rem; }
.site-footer__title { font-weight: 800; font-size: 1.15rem; color: var(--heading); }
.site-footer__tagline { color: var(--muted); font-size: .85rem; max-width: 40ch; margin-top: .1rem; }
.site-footer__list { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; padding: 0; }
.site-footer__list a { color: var(--body); font-size: .9rem; font-weight: 500; }
.site-footer__list a:hover { color: var(--primary); }
.site-footer__legal { max-width: var(--container); margin-inline: auto; padding: 0 var(--gutter) 1.25rem; color: var(--muted); font-size: .82rem; }

/* ---------- Static pages / 404 ---------- */
/* Static pages (Privacy, Terms, Contact) use a wider column than the article
   reading measure — legal text in a 46rem column looks lost on a big screen. */
.page-single { max-width: 64rem; margin-inline: auto; padding: clamp(1.5rem, 4vw, 3rem) var(--gutter); }
.page-single__title { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: 1rem; }
.page-single__content { font-size: 1.02rem; line-height: 1.7; }
.page-single__content > * { margin-block: .85rem; }
.page-single__content h2 { font-size: 1.35rem; margin-top: 1.9rem; margin-bottom: .5rem; }
.page-single__content h3 { font-size: 1.12rem; margin-top: 1.4rem; margin-bottom: .4rem; }
.page-single__content ul, .page-single__content ol { padding-left: 1.3rem; margin-block: .7rem; }
.page-single__content li { margin-block: .3rem; }
.layout-center { display: grid; place-items: center; min-height: 55vh; text-align: center; padding: 2rem; }
.error-404__code { font-size: clamp(4rem, 15vw, 8rem); font-weight: 800; color: var(--primary); line-height: 1; }
.error-404__title { font-size: 1.8rem; margin-block: .5rem 1rem; }
.error-404__text { color: var(--muted); margin-bottom: 1.5rem; }
.error-404 .search-form { max-width: 26rem; margin: 0 auto 1.5rem; }

/* ---------- Single article (ByDataFix layout: breadcrumb + card + sidebar) ---------- */
.breadcrumb-bar { background: var(--card); border-bottom: 1px solid var(--line); }
.breadcrumb { max-width: var(--container); margin-inline: auto; padding: .9rem var(--gutter); font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.breadcrumb a { color: var(--heading); font-weight: 500; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--muted); }
.breadcrumb .current { color: var(--primary); }

.single-card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(1.4rem, 2.4vw, 2.1rem); }
.single-card .article__content { max-width: none; margin: 0; }
.single__title { font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 800; line-height: 1.22; margin-block: .8rem .45rem; color: var(--heading); }
.single__subtitle { font-size: clamp(.98rem, 1.5vw, 1.08rem); color: var(--body); font-weight: 400; line-height: 1.5; margin-bottom: .9rem; }
.single__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; padding-bottom: 1.4rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.single__meta img { width: 34px; height: 34px; border-radius: 50%; }
.single__author { color: var(--heading); font-weight: 600; }
.single__meta .dot { color: var(--line); }
.single__meta a { color: var(--muted); }
.single__meta a:hover { color: var(--primary); }
.single__cats { display: inline-flex; align-items: center; gap: .35rem; }
.single__hero { margin-bottom: 1.6rem; }
.single__hero img { width: 100%; border-radius: var(--r-md); }

/* ---------- Ad slots ---------- */
.prose-ad { margin: 1.75rem 0; text-align: center; }
.sidebar .prose-ad { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 1rem; margin: 0; }
.prose-ad__label { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.prose-ad ins { display: block; }

/* ---------- Subscribe modal ---------- */
/* position:fixed + inset:0 + margin:auto keeps it centred (and gives the close
   button a positioning context). Do NOT use position:relative here — it breaks
   the browser's native dialog centring. */
.subscribe-modal { position: fixed; inset: 0; margin: auto; width: min(30rem, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); overflow-y: auto; padding: clamp(1.5rem, 4vw, 2.25rem); border: 0; border-radius: var(--r-lg); background: var(--card); color: var(--body); box-shadow: 0 24px 60px rgba(16, 24, 40, .25); }
.subscribe-modal::backdrop { background: rgba(15, 23, 42, .55); }
.subscribe-modal__close { position: absolute; top: .75rem; right: .75rem; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--bg); color: var(--muted); cursor: pointer; }
.subscribe-modal__close:hover { color: var(--heading); }
.subscribe-modal__title { font-size: 1.4rem; font-weight: 800; color: var(--heading); margin-bottom: .5rem; padding-right: 2rem; }
.subscribe-modal__text { font-size: .95rem; color: var(--body); margin-bottom: 1.25rem; }
.subscribe-form { display: flex; flex-direction: column; gap: .6rem; }
.subscribe-form input[type="email"] { width: 100%; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); font-size: 1rem; }
.subscribe-form input[type="email"]:focus { outline: none; border-color: var(--primary); background: var(--card); }
.subscribe-form .btn { justify-content: center; }
.subscribe-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.subscribe-msg { margin-top: .85rem; font-size: .9rem; min-height: 1.2em; }
.subscribe-msg.is-success { color: #1fa463; font-weight: 600; }
.subscribe-msg.is-error { color: #e23b7b; font-weight: 600; }

/* ---------- Contact form ---------- */
/* Nested inside the page card, so use a subtle panel (not another white card). */
.contact-form { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 1.9rem); margin-top: 1.5rem; max-width: none; }
.contact-form__grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .contact-form__grid { grid-template-columns: 1fr 1fr; } }
.contact-form__row { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.contact-form__row--full { grid-column: 1 / -1; }
.contact-form label { font-size: .85rem; font-weight: 600; color: var(--heading); letter-spacing: .01em; }
.contact-form__opt { font-weight: 400; color: var(--muted); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea { width: 100%; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); font-size: .98rem; font-family: inherit; color: var(--body); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); opacity: .75; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); background: var(--card); box-shadow: 0 0 0 3px rgba(47, 107, 255, .12); }
.contact-form textarea { resize: vertical; min-height: 9rem; line-height: 1.6; }
.contact-form__footer { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1.25rem; margin-top: 1.4rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.contact-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-msg { font-size: .92rem; margin: 0; }
.contact-msg.is-success { color: #1fa463; font-weight: 600; }
.contact-msg.is-error { color: #e23b7b; font-weight: 600; }

/* ---------- Nav-subscribe: only shown inside the mobile menu ---------- */
.nav-subscribe { display: none; }

/* ---------- Tablet & mobile ---------- */
@media (max-width: 900px) {
	.site-header__inner { gap: .4rem; }
	.nav-toggle { display: inline-flex; }
	.site-header__actions .btn-subscribe { display: none; } /* moved into the menu */

	/* Clean, minimal icons on mobile — no heavy blue circle. */
	.icon-btn--circle { background: none; color: var(--heading); width: 42px; height: 42px; }
	.icon-btn--circle:hover { background: none; color: var(--primary); }

	/* Nav becomes a full-width dropdown panel under the header. */
	.site-nav { position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: .5rem var(--gutter) 1.1rem; display: none; }
	.site-nav.is-open { display: block; }
	.site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.site-nav__list li { border-bottom: 1px solid var(--line); }
	.site-nav__list li:last-child { border-bottom: 0; }
	.site-nav__list a { display: block; padding: .9rem .25rem; font-size: 1.05rem; }
	.site-nav .current-menu-item a, .site-nav .current_page_item a { border-bottom: 0; }
	.site-nav .nav-subscribe { display: flex; width: 100%; justify-content: center; margin-top: 1rem; }

	.pcard.has-media { grid-template-columns: minmax(0, 1fr); }
	.pcard__media img { min-height: 190px; max-height: 240px; }
}

/* ---------- Phone ---------- */
@media (max-width: 560px) {
	:root { --header-h: 62px; }
	.site-header__inner { gap: .35rem; }
	.site-brand__title { font-size: 1.3rem; }

	/* Smaller, cleaner card type on phones. */
	.pcard__body { padding: 1.1rem 1.15rem; }
	.pill { font-size: .72rem; padding: .3rem .75rem; }
	.pcard__title { font-size: 1.15rem; line-height: 1.35; }
	.pcard__excerpt { font-size: .9rem; }
	.pcard__more { font-size: .85rem; }
	.pcard__meta { font-size: .8rem; gap: .45rem; }
	.pcard__meta img { width: 26px; height: 26px; }

	.single-card { padding: 1.25rem 1.15rem; }
	.single__title { font-size: 1.45rem; }
	.single__subtitle { font-size: 1rem; }
	.article__content { font-size: .98rem; }
	.breadcrumb .current { width: 100%; }
	.site-footer__inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
