/* ==========================================================================
   mahapps.com - articles and pages
   Full-width text header on a pale band, cover image under it, one centred reading
   column, horizontal share rows, text-only related list.
   ========================================================================== */

.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 3px; pointer-events: none; }
.read-progress__bar { display: block; height: 100%; background: linear-gradient(90deg, var(--indigo), var(--cyan)); transform: scaleX(0); transform-origin: 0 50%; }

/* Header band ----------------------------------------------------------------- */
.article__head {
	padding-block: clamp(24px, 4vw, 48px) clamp(28px, 4vw, 52px);
	background: var(--pale);
	border-bottom: 1px solid var(--line);
}
.article__head-inner { max-width: calc(1040px + 2 * var(--gutter)); }
.article__kicker { margin-bottom: 14px; }
.article__title { max-width: 26ch; margin-bottom: 18px; font-size: var(--fs-3xl); font-weight: 800; line-height: 1.12; letter-spacing: -0.025em; }
.article__deck { max-width: 62ch; margin-bottom: 24px; color: var(--muted); font-size: var(--fs-lg); line-height: 1.55; }

.byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	padding-top: 20px;
	border-top: 1px solid var(--line-strong);
}
.byline__author { margin: 0; color: var(--midnight); font-weight: 600; }
.byline__author a { color: var(--midnight); }
.byline__author a:hover { color: var(--indigo-ink); }
.byline .share { margin-left: auto; }
@media (max-width: 699px) { .byline .share { margin-left: 0; flex-basis: 100%; } }

/* Share rows ----------------------------------------------------------------- */
.share__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.share__btn {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--line-strong);
	border-radius: 12px;
	background: var(--white);
	color: var(--midnight);
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.share__btn:hover { border-color: var(--indigo); background: var(--indigo); color: var(--white); }
.share__status { min-height: 1.2em; margin: 6px 0 0; color: var(--cyan-ink); font-size: var(--fs-sm); font-weight: 600; }
.share__status:empty { display: none; }

/* Cover --------------------------------------------------------------------- */
.article__cover { max-width: calc(1040px + 2 * var(--gutter)); margin: clamp(20px, 3vw, 36px) auto 0; }
.article__cover-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); }
.article__cover figcaption { margin-top: 10px; color: var(--muted); font-size: var(--fs-sm); }

/* Reading column ------------------------------------------------------------- */
.article__body { max-width: calc(720px + 2 * var(--gutter)); padding-top: clamp(24px, 3vw, 40px); }

.article-note {
	margin-bottom: 28px;
	padding: 16px 20px;
	border-left: 4px solid var(--cyan);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	background: var(--cyan-tint);
}
.article-note p { margin: 4px 0 0; }

.entry { color: var(--body); font-size: 1.125rem; line-height: 1.75; }
.entry > * { margin-block: 0 1.2em; }
.entry h2 { margin-top: 1.8em; font-size: var(--fs-xl); }
.entry h3 { margin-top: 1.5em; font-size: var(--fs-lg); }
.entry a { color: var(--indigo-ink); text-decoration: underline; text-decoration-thickness: 1px; }
.entry a:hover { text-decoration-thickness: 2px; }
.entry img { border-radius: var(--radius-sm); }
.entry blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--indigo); color: var(--midnight); font-size: 1.2rem; }
.entry li + li { margin-top: 0.4em; }
.entry code { padding: 1px 6px; border-radius: 6px; background: var(--pale); font-family: var(--font-mono); font-size: 0.9em; }
.entry table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.entry th, .entry td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
.entry figcaption { color: var(--muted); font-size: var(--fs-sm); }

.article__foot { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.term-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.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: var(--fs-sm); font-weight: 600; }
.article__share-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.article__share-label { margin: 0; color: var(--midnight); font-weight: 700; }

/* Related (text list) -------------------------------------------------------- */
.related { margin-top: 48px; }
.related__title { margin-bottom: 8px; font-size: var(--fs-xl); }
.related__list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--midnight); }
.related__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 4px 16px;
	padding-block: 16px;
	border-bottom: 1px solid var(--line);
}
.related__cat { grid-column: 1 / -1; color: var(--muted); font-size: var(--fs-xs); font-weight: 650; }
.related__link { color: var(--text); font-size: 1.0625rem; font-weight: 650; line-height: 1.35; text-decoration: none; }
.related__link:hover { color: var(--indigo-ink); }
.related__time { align-self: end; }

/* Pages ------------------------------------------------------------------------ */
.page-view__head {
	padding-block: clamp(24px, 4vw, 48px);
	background: var(--pale);
	border-bottom: 1px solid var(--line);
}
.page-view__title { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.025em; }
.page-view__intro { max-width: 62ch; color: var(--muted); font-size: var(--fs-lg); }
.page-view__body { max-width: 720px; margin-inline: auto; padding-top: clamp(24px, 3vw, 40px); }

/* Contact form ------------------------------------------------------------------ */
.contact-form-wrap { margin-top: 40px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--pale); }
.contact-form-wrap h2 { font-size: var(--fs-xl); }
.form-row--2 { display: grid; gap: 0 16px; }
@media (min-width: 600px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }
.form-field label { display: block; margin-bottom: 6px; color: var(--midnight); font-weight: 600; font-size: var(--fs-sm); }
.form-field input, .form-field select, .form-field textarea { width: 100%; }
.form-field--check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form-field--check input { width: auto; margin-top: 4px; }
.form-field--hp { position: absolute; left: -9999px; }
.form-note { padding: 12px 16px; border-radius: var(--radius-sm); }
.form-note--success { background: #E6F6EE; color: #11603A; }
.form-note--error { background: #FDECEC; color: #9B1C1C; }

/* HTML sitemap ---------------------------------------------------------------- */
.sitemap-page .page-view__body { max-width: none; }
.sitemap-grid { display: grid; gap: var(--gap-lg); }
@media (min-width: 900px) { .sitemap-grid { grid-template-columns: 1fr 2fr; } }
.sitemap-grid h2 { font-size: var(--fs-lg); }
.sitemap-list { margin: 0 0 32px; padding: 0; list-style: none; }
.sitemap-list li { display: flex; justify-content: space-between; gap: 16px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.sitemap-list a { color: var(--midnight); font-weight: 600; text-decoration: none; }
.sitemap-list a:hover { color: var(--indigo-ink); }
.sitemap-list time { color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-xs); white-space: nowrap; }
