/* Studio's articles on kokops.com (2026-11-16): the site's article layout (src/lib/redesign/v2/pages/ArticlePage.svelte)
   for HTML the CMS function renders (src/lib/server/cmsPublic.ts). The site's own styles are scoped to its
   components, so the same rules are written here under .cms-post; the colours, fonts and the k2-* classes come from
   the site's stylesheet (src/lib/redesign/v2/k2.css), which the real shell loads. Keep in step with ArticlePage. */

.cms-post .post-head {
	padding-top: 20px;
	padding-bottom: 56px;
}
.cms-post .crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 12.5px;
	color: var(--muted);
}
.cms-post .crumbs li:last-child {
	max-width: 28em;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.cms-post .crumbs li + li::before {
	content: '/';
	margin-right: 6px;
	color: var(--hair);
}
.cms-post .head-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
	gap: 56px;
	align-items: center;
	margin-top: 32px;
}
.cms-post .head-grid.no-thumb {
	grid-template-columns: minmax(0, 1fr);
	max-width: 880px;
}
.cms-post .head-copy {
	display: grid;
	gap: 18px;
}
.cms-post h1 {
	margin: 0;
	font-family: var(--serif);
	font-size: clamp(26px, 2.7vw, 40px);
	font-weight: 600;
	line-height: 1.5;
	text-wrap: pretty;
}
.cms-post .article-category {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--blue);
}
.cms-post .meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 0;
	font-size: 13px;
	color: var(--muted);
}
.cms-post .meta time {
	font-family: var(--num);
	font-size: 14px;
	color: var(--ink);
}
.cms-post .thumb {
	margin: 0;
}
.cms-post .thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: var(--r-lg);
	background: var(--mist);
}
.cms-post .body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 72px;
	align-items: start;
	padding-bottom: 104px;
}
.cms-post .aside {
	position: sticky;
	top: calc(var(--head) + 24px);
	display: grid;
	gap: 16px;
}
.cms-post .toc {
	padding: 20px 22px;
	border-radius: var(--r-lg);
	background: var(--mist);
	max-height: 50vh;
	overflow-y: auto;
}
.cms-post .toc p {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--muted);
}
.cms-post .toc ol {
	margin: 0;
	padding: 0;
	list-style: none;
}
.cms-post .toc a {
	display: flex;
	gap: 8px;
	padding: 5px 0;
	font-size: 13.5px;
	line-height: 1.6;
}
.cms-post .toc a:hover {
	color: var(--blue);
}
.cms-post .toc a span {
	font-family: var(--num);
	color: var(--cyan);
}
.cms-post .card {
	display: grid;
	gap: 12px;
	padding: 22px;
	border-radius: var(--r-lg);
	box-shadow:
		0 0 0 1px var(--hair),
		0 14px 34px rgba(11, 30, 42, 0.06);
}
.cms-post .card-title {
	margin: 0;
	font-family: var(--serif);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.6;
}
.cms-post .card-note {
	margin: 0;
	font-size: 13px;
	line-height: 1.7;
	color: var(--muted);
}

/* ---------- article prose ---------- */
.cms-post .prose {
	min-width: 0;
	max-width: 720px;
	font-size: 16.5px;
	line-height: 2;
	color: var(--ink-2);
}
.cms-post .prose > * + * {
	margin-top: 1.1em;
}
.cms-post .prose h2 {
	margin: 2.6em 0 0;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--hair);
	font-family: var(--serif);
	font-size: clamp(22px, 2vw, 27px);
	font-weight: 600;
	line-height: 1.5;
	color: var(--ink);
	scroll-margin-top: calc(var(--head) + 24px);
}
.cms-post .prose h3 {
	margin: 2em 0 0;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.6;
	color: var(--ink);
}
.cms-post .prose h4 {
	margin: 1.6em 0 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--ink);
}
.cms-post .prose p {
	margin: 0;
}
.cms-post .prose p + p {
	margin-top: 1em;
}
.cms-post .prose ul,
.cms-post .prose ol {
	display: grid;
	gap: 6px;
	padding-left: 1.4em;
	list-style: revert;
}
.cms-post .prose li::marker {
	color: var(--cyan);
}
.cms-post .prose strong {
	color: var(--ink);
	font-weight: 700;
	background: linear-gradient(transparent 62%, rgba(0, 167, 235, 0.16) 62%);
}
.cms-post .prose a {
	color: var(--blue);
	text-decoration: underline;
	text-underline-offset: 3px;
	overflow-wrap: anywhere;
}
.cms-post .prose hr {
	margin: 2.4em 0;
	border: 0;
	border-top: 1px solid var(--hair);
}
.cms-post .prose * {
	max-width: 100%;
}
.cms-post .prose figure {
	margin: 2em 0 !important;
}
.cms-post .prose img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}
.cms-post .prose img[data-align='center'] {
	display: block;
	margin-inline: auto;
}
.cms-post .prose figcaption {
	margin-top: 8px;
	font-size: 13px;
	color: var(--muted);
}
.cms-post .prose blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 20px;
	border-left: 2px solid var(--cyan);
	color: var(--ink);
}
.cms-post .prose iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
	border-radius: 12px;
	background: var(--mist);
}
.cms-post .prose p,
.cms-post .prose h2,
.cms-post .prose h3,
.cms-post .prose h4,
.cms-post .prose li {
	text-align: left !important;
}
.cms-post .disclaimer {
	margin-top: 3em !important;
	padding: 16px 18px;
	border-radius: 12px;
	background: var(--mist);
	font-size: 13px;
	line-height: 1.8;
	color: var(--muted);
}

/* ---------- Studio's blocks (src/lib/server/cmsBody.ts) ---------- */
.cms-post .article-intro {
	padding: 22px 24px;
	border-radius: var(--r-lg);
	background: var(--mist);
}
.cms-post .article-intro > p + p {
	margin-top: 0.8em;
}
.cms-post .article-keys {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
	margin-top: 16px;
}
.cms-post .article-key {
	padding: 16px 18px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 0 0 1px var(--hair);
}
.cms-post .article-key h3 {
	margin: 0;
	font-size: 15px;
}
.cms-post .article-key p {
	margin-top: 6px;
	font-size: 14px;
	line-height: 1.8;
}
.cms-post .article-faq-item {
	border-bottom: 1px solid var(--hair);
}
.cms-post .article-faq-item summary {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 0;
	font-weight: 700;
	color: var(--ink);
	cursor: pointer;
	list-style: none;
}
.cms-post .article-faq-item summary::-webkit-details-marker {
	display: none;
}
.cms-post .article-faq-item summary::after {
	content: '+';
	font-family: var(--num);
	color: var(--cyan);
}
.cms-post .article-faq-item[open] summary::after {
	content: '−';
}
.cms-post .article-faq-answer {
	padding-bottom: 18px;
}
.cms-post .article-steps {
	counter-reset: step;
	list-style: none !important;
	padding-left: 0 !important;
	gap: 14px !important;
}
.cms-post .article-steps > li {
	position: relative;
	padding: 16px 18px 16px 56px;
	border-radius: 12px;
	box-shadow: 0 0 0 1px var(--hair);
	counter-increment: step;
}
.cms-post .article-steps > li::before {
	content: counter(step);
	position: absolute;
	left: 18px;
	top: 16px;
	font-family: var(--num);
	font-size: 20px;
	color: var(--cyan);
}
.cms-post .article-table {
	overflow-x: auto;
}
.cms-post .article-table table {
	width: 100%;
	min-width: 480px;
	border-collapse: collapse;
	font-size: 14.5px;
	line-height: 1.7;
}
.cms-post .article-table :is(th, td) {
	padding: 10px 12px;
	border-bottom: 1px solid var(--hair);
	text-align: left;
	vertical-align: top;
}
.cms-post .article-table th {
	background: var(--mist);
	color: var(--ink);
}
.cms-post .article-table :is(th, td) > p {
	margin: 0;
}
.cms-post .article-reviewer {
	margin-top: 2.4em !important;
	font-size: 14px;
	color: var(--muted);
}
.cms-post .article-sources h2 {
	font-size: 18px;
}
.cms-post .article-sources ul {
	font-size: 14px;
}

/* ---------- more articles ---------- */
.cms-post .more-title {
	margin: 0 0 18px;
	font-size: 17px;
	font-weight: 700;
}
.cms-post .posts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.cms-post .posts a {
	display: grid;
	gap: 10px;
}
.cms-post .posts img,
.cms-post .posts-blank {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 12px;
	background: #fff;
}
.cms-post .posts b {
	font-size: 15px;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.cms-post .posts time {
	font-family: var(--num);
	font-size: 13px;
	color: var(--muted);
}

.preview-notice {
	margin: 0;
	padding: 10px 16px;
	background: #fff4d6;
	color: #6b4e00;
	font-size: 13px;
	text-align: center;
}
.cms-not-found {
	display: grid;
	gap: 16px;
	justify-items: start;
	padding-top: 96px;
	padding-bottom: 120px;
}
.cms-not-found h1 {
	margin: 0;
	font-family: var(--serif);
	font-size: clamp(26px, 2.7vw, 40px);
}

@media (max-width: 1080px) {
	.cms-post .body {
		grid-template-columns: minmax(0, 1fr);
	}
	.cms-post .aside {
		display: none;
	}
	.cms-post .prose {
		max-width: none;
	}
}
@media (max-width: 900px) {
	.cms-post .head-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
		margin-top: 20px;
	}
	.cms-post .thumb {
		order: -1;
	}
	.cms-post .post-head {
		padding-bottom: 36px;
	}
	.cms-post .prose {
		font-size: 15.5px;
		line-height: 1.95;
	}
	.cms-post .body {
		padding-bottom: 72px;
	}
	.cms-post .posts {
		grid-template-columns: 1fr;
	}
}
