/**
 * UIX point-fixes for blog article template (codeby.academy).
 * Scope: single blog posts only (.single-post). Within brand palette —
 * code font swapped to classic monospace per CTO (NTSomic body untouched).
 * UIX audit 2026-07-01 (R1 + R2 + R3).
 */

/* Meta / muted text: 3.81:1 (fails AA) -> ~10:1 (AAA). Opacity only. */
.single-post .uk-text-meta,
.single-post .uk-text-muted {
	color: rgba(255, 255, 255, .75) !important;
}

/* Prose links: restore non-colour affordance (WCAG 1.4.1). Colour unchanged. */
.single-post p a,
.single-post li a {
	text-decoration: underline;
	text-underline-offset: .15em;
}

/* Code blocks: dark inset well (darker than page #0e0f0f) + AAA text. */
.single-post pre {
	background: #080808;
	color: rgba(255, 255, 255, .72);
	border-color: rgba(255, 255, 255, .16);
	padding: 16px 20px;
	font-size: 14px;
	line-height: 1.6;
}

/* Classic monospace for all code (block + inline). */
.single-post pre,
.single-post pre code,
.single-post :not(pre) > code {
	font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
}

/* Inline code: wrap long payloads (fix mobile clipping) + visible pill. */
.single-post :not(pre) > code {
	white-space: normal;
	overflow-wrap: anywhere;
	background: #1d1d1d;
	border-color: rgba(255, 255, 255, .12);
	border-radius: 4px;
	font-size: .9em;
}

/* Content tables (bare <table>, no .uk-table): row dividers + header + padding. */
.single-post main#tm-main table:not(.uk-table) {
	width: 100%;
	border-collapse: collapse;
	margin: 20px 0;
}
.single-post main#tm-main table:not(.uk-table) th,
.single-post main#tm-main table:not(.uk-table) td {
	padding: 10px 14px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.single-post main#tm-main table:not(.uk-table) th {
	color: #fff;
	font-weight: 600;
	border-bottom: 2px solid rgba(255, 255, 255, .28);
}

/* Paragraph rhythm: more air between paragraphs. */
.single-post main#tm-main .uk-panel > p {
	margin-bottom: 1.5rem;
}

/* Lists: shift right ~1 char to visually distinguish from prose. */
.single-post main#tm-main .uk-panel > ul,
.single-post main#tm-main .uk-panel > ol {
	margin-left: 1ch;
}

/* Touch targets on mobile (WCAG 2.5.x) — default buttons + checkboxes only. */
@media (max-width: 640px) {
	.single-post .uk-button:not(.uk-button-large):not(.uk-button-small) {
		min-height: 44px;
		line-height: 44px;
	}

	.single-post input.uk-checkbox {
		width: 24px;
		height: 24px;
	}
}

/* Inline table of contents (injected before first h2 on blog posts). Palette-only. */
.single-post .codeby-toc {
	margin: 24px 0 32px;
	padding: 16px 22px;
	background: #141414;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 8px;
}
.single-post .codeby-toc__title {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.single-post .codeby-toc__list {
	margin: 0;
	padding-left: 1.4em;
}
.single-post .codeby-toc__list li {
	margin: 4px 0;
}
.single-post .codeby-toc__list a {
	color: rgba(255, 255, 255, .75);
	text-decoration: none;
}
.single-post .codeby-toc__list a:hover {
	color: #36f097;
	text-decoration: underline;
}

/* Anchor offset: land section headings below the sticky header (~74px desktop / ~70px mobile). */
.single-post main#tm-main :is(h2, h3, h4)[id] {
	scroll-margin-top: 90px;
}
@media (max-width: 640px) {
	.single-post main#tm-main :is(h2, h3, h4)[id] {
		scroll-margin-top: 78px;
	}
}
