/* ==========================================================================
   Single article + pages. Pale mint header band, reading column left, short editorial
   rail right (top of the article only), horizontal share block at the end.
   ========================================================================== */

.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 160; height: 3px; pointer-events: none; }
.read-progress__bar { display: block; width: 100%; height: 100%; background: var(--tangerine); transform: scaleX(var(--progress, 0)); transform-origin: 0 50%; }

/* Header band ------------------------------------------------------------------ */
.article__head { padding: clamp(18px, 2.5vw, 28px) 0 clamp(28px, 4vw, 44px); background: var(--mint); border-bottom: var(--rule); }
.article__head-text { max-width: 880px; }
.article__kicker { margin: 4px 0 14px; }
.article__kicker .kicker {
	padding: 4px 10px 4px 9px;
	border-left: 4px solid var(--tangerine);
	background: var(--white);
	color: var(--petrol);
	border-radius: 0 2px 2px 0;
}
.article__kicker .kicker:hover { color: var(--ink); }
.article__title { margin: 0 0 16px; font-size: var(--fs-3xl); font-weight: 800; line-height: 1.08; letter-spacing: -0.025em; }
.article__deck { max-width: 62ch; margin: 0 0 22px; color: #33474B; font-size: var(--fs-md); line-height: 1.55; }
.byline { display: grid; gap: 4px; padding-top: 16px; border-top: 1px solid var(--mint-line); }
.byline__author { margin: 0; color: var(--ink); font-size: 15px; }
.byline__author a { color: var(--ink); font-weight: 700; text-decoration: none; }
.byline__author a:hover { text-decoration: underline; }

/* Body grid --------------------------------------------------------------------- */
.article__grid { display: grid; gap: var(--gap-lg); padding-top: clamp(24px, 3.5vw, 40px); }
@media (min-width: 1024px) {
	.article__grid { grid-template-columns: minmax(0, 720px) 300px; justify-content: space-between; align-items: start; }
}
.article__main { min-width: 0; }

.article__cover { margin: 0 0 28px; }
.article__cover-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.article__cover figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }

.article-note { margin: 0 0 24px; padding: 14px 18px; background: var(--mint); border-left: 4px solid var(--petrol); font-size: 15px; }
.article-note p { margin: 4px 0 0; }

/* Article text. */
.entry { color: #22343A; font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.15rem); line-height: 1.75; }
.entry > * { margin-top: 0; margin-bottom: 0; }
.entry > * + * { margin-top: 1.25em; }
.entry h2, .entry h3, .entry h4 { scroll-margin-top: calc(var(--header-h) + 24px); }
.entry h2 { margin-top: 1.9em; font-size: var(--fs-xl); }
.entry h3 { margin-top: 1.6em; font-size: var(--fs-lg); }
.entry h4 { margin-top: 1.4em; font-size: var(--fs-md); }
.entry a { color: var(--petrol-soft); text-decoration-color: var(--tangerine); text-decoration-thickness: 2px; }
.entry a:hover { color: var(--ink); }
.entry strong { color: var(--ink); }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li + li { margin-top: 0.45em; }
.entry li::marker { color: var(--tangerine-ink); }
.entry blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--tangerine); color: var(--ink); font-size: 1.1em; font-weight: 600; }
.entry figure { margin-inline: 0; }
.entry img { border-radius: var(--radius); }
.entry figcaption, .entry .wp-element-caption { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.entry table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.entry th, .entry td { padding: 10px 12px; border: var(--rule); text-align: left; vertical-align: top; }
.entry th { background: var(--mint); color: var(--ink); }
.entry pre { overflow-x: auto; padding: 16px; background: var(--ink); color: var(--on-dark); border-radius: var(--radius); font-size: 14px; }
.entry code { font-family: var(--font-mono); font-size: 0.9em; }
.entry hr { margin-block: 2em; }
.entry iframe, .entry video { max-width: 100%; }
.entry .demo-note { padding: 12px 16px; background: var(--mint); border-left: 4px solid var(--petrol); font-size: 15px; }
.page-links { display: flex; gap: 8px; margin-top: 24px; }

.article__foot { margin-top: 32px; }
.term-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.term-row ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.term-row__label { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

/* Share block (end of article, horizontal) --------------------------------------- */
.share { --social-bg: var(--mint); margin-top: 36px; padding: 20px 0; border-top: 2px solid var(--ink); border-bottom: var(--rule); }
.share__title { margin: 0 0 12px; color: var(--ink); font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.share__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.share__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 14px 0 10px;
	border: 1px solid var(--mint-line);
	border-radius: 999px;
	background: var(--mint);
	color: var(--petrol);
	font-size: 14px;
	font-weight: 650;
	text-decoration: none;
	cursor: pointer;
}
.share__btn .icon { width: 22px; height: 22px; flex-shrink: 0; }
.share__name { color: var(--ink); }
.share__btn:hover { --social-bg: var(--petrol); border-color: var(--petrol); background: var(--petrol); color: var(--white); }
.share__btn:hover .share__name { color: var(--white); }
.share__btn:hover .icon { color: var(--white); }
.share__status { min-height: 1.4em; margin: 8px 0 0; color: var(--petrol); font-size: 14px; }
@media (max-width: 479.98px) { .share__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .share__btn { padding: 0 11px; } }

/* Rail (short, top of the article only) ------------------------------------------- */
.article__rail { display: grid; gap: 22px; align-content: start; }
@media (min-width: 1024px) { .article__rail { padding-top: 2px; } }
.rail-box { padding-top: 12px; border-top: 3px solid var(--petrol); }
.rail-box--sections { border-top-color: var(--tangerine); }
.rail__more { display: inline-flex; align-items: center; gap: 6px; margin-top: -8px; color: var(--petrol); font-size: 14px; font-weight: 700; text-decoration: none; }
.rail__more:hover { color: var(--ink); text-decoration: underline; }
.rail-sections { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rail-sections a { display: inline-block; padding: 6px 12px; background: var(--mint); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; border-radius: 999px; }
.rail-sections a:hover { background: var(--petrol); color: var(--white); }

/* Related (end) -------------------------------------------------------------------- */
.related { margin-top: clamp(40px, 6vw, 72px); padding-block: clamp(32px, 5vw, 56px); background: var(--mint); }
.related + .site-footer, .related ~ .site-footer { margin-top: 0; }
.related .sec-head { border-top-color: var(--petrol); }
.related__grid { display: grid; gap: 32px; }
@media (min-width: 640px) { .related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Pages ------------------------------------------------------------------------------ */
.page-view__head { padding: clamp(18px, 2.5vw, 28px) 0 clamp(24px, 3.5vw, 36px); margin-bottom: 32px; border-bottom: 2px solid var(--ink); }
.page-view__title { margin: 0 0 12px; font-size: var(--fs-3xl); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
.page-view__intro { max-width: 62ch; margin: 0 0 12px; font-size: var(--fs-md); line-height: 1.5; }
.page-view__updated { margin: 0; }
.page-view__body { max-width: 760px; }
.page-view { padding-bottom: clamp(24px, 4vw, 48px); }

.contact-form-wrap { margin-top: 40px; padding: clamp(20px, 3vw, 32px); background: var(--mint); border-top: 4px solid var(--petrol); border-radius: 0 0 var(--radius) var(--radius); }
.contact-form-wrap h2 { margin: 0 0 16px; font-size: var(--fs-xl); }
.contact-form .form-row--2 { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .contact-form .form-row--2 { grid-template-columns: 1fr 1fr; } }
.form-field { margin: 0 0 16px; }
.form-field label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 14px; font-weight: 650; }
.form-field input[type="text"], .form-field input[type="email"], .form-field select, .form-field textarea {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 2px solid var(--mint-line);
	border-radius: var(--radius);
	background: var(--white);
	font-size: 16px;
}
.form-field textarea { resize: vertical; min-height: 160px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--petrol); }
.form-field--check { display: flex; gap: 10px; align-items: flex-start; }
.form-field--check input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; accent-color: var(--petrol); }
.form-field--check label { margin: 0; font-weight: 400; color: var(--color-body); }
.form-field--hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin: 8px 0 12px; }
.form-note { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius); font-size: 15px; }
.form-note--success { background: #E7F5EE; border: 1px solid #9CCFB4; color: #145A3A; }
.form-note--error { background: #FDF0EA; border: 1px solid #F2B79A; color: #8A3412; }

/* HTML sitemap. */
.sitemap-page .page-view__head { max-width: none; }
.sitemap-grid { display: grid; gap: var(--gap-lg); }
@media (min-width: 900px) { .sitemap-grid { grid-template-columns: 1fr 1fr; } }
.sitemap-grid h2 { margin: 0 0 12px; font-size: var(--fs-lg); }
.sitemap-grid h2 + .sitemap-list { margin-bottom: 32px; }
.sitemap-list { margin: 0; padding: 0; list-style: none; }
.sitemap-list li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: var(--rule); }
.sitemap-list a { color: var(--ink); font-weight: 600; text-decoration: none; }
.sitemap-list a:hover { text-decoration: underline; }
.sitemap-list time { flex-shrink: 0; color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
