/* ==========================================================================
   Cartizan Studio — Studio Journal (blog listing + single post)
   Calm magazine style. All selectors scoped under .czb.
   ========================================================================== */

.czb {
	--czb-bg: #FDFCF8;
	--czb-paper: #F5EFE4;
	--czb-ink: #1D1B2A;
	--czb-ink-2: #45434F;
	--czb-muted: #6F6B78;
	--czb-line: #E6DFD1;
	--czb-navy: #053261;
	--czb-accent: #B4402A;
	--czb-orange: #E78800;
	--czb-sky: #B4DDEE;
	--czb-serif: "Fraunces", Georgia, "Times New Roman", serif;
	--czb-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--czb-sticky: 104px;

	display: block;
	background: var(--czb-bg);
	color: var(--czb-ink);
	font-family: var(--czb-sans);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}
body.czb-body { background: var(--czb-bg, #FDFCF8); }
body.admin-bar .czb { --czb-sticky: 136px; }

.czb *, .czb *::before, .czb *::after { box-sizing: border-box; }
.czb a { color: inherit; text-decoration: none; }
.czb img { max-width: 100%; height: auto; display: block; }
.czb p { margin: 0; }
.czb h1, .czb h2, .czb h3, .czb h4 {
	font-family: var(--czb-serif);
	font-weight: 500;
	font-variation-settings: "opsz" 72;
	color: var(--czb-ink);
	letter-spacing: -0.015em;
	line-height: 1.14;
	margin: 0;
}
.czb a:focus-visible, .czb button:focus-visible, .czb summary:focus-visible {
	outline: 2px solid var(--czb-navy);
	outline-offset: 3px;
	border-radius: 2px;
}

.czb-wrap { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px; }

.czb-eyebrow, .czb-kicker {
	font: 600 12px/1.2 var(--czb-sans);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--czb-accent);
}
.czb-meta {
	font-size: 13.5px;
	color: var(--czb-muted);
	letter-spacing: 0.01em;
}
.czb-dot { margin: 0 0.5em; }

.czb-arrow {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-weight: 600;
	font-size: 15px;
	color: var(--czb-navy) !important;
	border-bottom: 1.5px solid var(--czb-orange);
	padding-bottom: 2px;
	transition: gap 0.2s ease, color 0.2s ease;
}
.czb-arrow:hover { gap: 0.65em; color: var(--czb-accent) !important; }

.czb-btn {
	display: inline-block;
	background: var(--czb-navy);
	color: #fff !important;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.02em;
	padding: 15px 30px;
	border-radius: 999px;
	transition: background 0.2s ease, transform 0.2s ease;
}
.czb-btn:hover { background: #0A4380; transform: translateY(-1px); }

/* ---------- Masthead ---------- */
.czb-masthead {
	text-align: center;
	max-width: 760px;
	margin: 0 auto;
	padding: 76px 24px 56px;
}
.czb-masthead__title {
	font-size: clamp(2.6rem, 5.4vw, 4.4rem);
	font-weight: 400 !important;
	margin: 18px 0 18px !important;
}
.czb-masthead__dek {
	font-family: var(--czb-serif);
	font-size: clamp(1.1rem, 1.6vw, 1.3rem);
	line-height: 1.55;
	color: var(--czb-ink-2);
	max-width: 600px;
	margin: 0 auto;
}
.czb-rule {
	display: block;
	width: 56px;
	height: 2px;
	background: var(--czb-orange);
	margin: 36px auto 0;
}

/* ---------- Hero (latest story) ---------- */
.czb-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	gap: 56px;
	align-items: center;
	padding-bottom: 72px;
	border-bottom: 1px solid var(--czb-line);
	position: relative;
}
.czb-hero__media, .czb-card__media, .czb-class__media {
	display: block;
	overflow: hidden;
	border-radius: 4px;
	background: var(--czb-paper);
}
.czb-hero__media { aspect-ratio: 16 / 10; }
.czb-hero__media img, .czb-card__media img, .czb-class__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.czb-hero:hover .czb-hero__media img,
.czb-card:hover .czb-card__media img,
.czb-class:hover .czb-class__media img { transform: scale(1.035); }

.czb-hero__title {
	font-size: clamp(1.9rem, 3.2vw, 2.8rem);
	margin: 16px 0 18px !important;
}
.czb-hero__title a { background: linear-gradient(var(--czb-orange), var(--czb-orange)) 0 100% / 0 1.5px no-repeat; transition: background-size 0.35s ease; }
.czb-hero:hover .czb-hero__title a { background-size: 100% 1.5px; }
.czb-hero__excerpt {
	font-size: 17px;
	line-height: 1.65;
	color: var(--czb-ink-2);
}
.czb-hero .czb-meta { margin: 20px 0 26px; }

/* ---------- Sections + grid ---------- */
.czb-section { padding-top: 72px; }
.czb-section__title {
	display: flex;
	align-items: center;
	gap: 18px;
	font-family: var(--czb-sans) !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	letter-spacing: 0.16em !important;
	text-transform: uppercase;
	color: var(--czb-muted) !important;
	margin-bottom: 36px !important;
}
.czb-section__title::after { content: ""; flex: 1; height: 1px; background: var(--czb-line); }
.czb-section__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 36px;
}
.czb-section__big { font-size: clamp(1.7rem, 2.6vw, 2.3rem); margin-top: 10px !important; }

.czb-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 56px 36px;
}

.czb-card { position: relative; display: flex; flex-direction: column; }
.czb-card__media { aspect-ratio: 3 / 2; margin-bottom: 20px; }
.czb-card__title {
	font-size: 1.4rem;
	line-height: 1.22;
	margin: 10px 0 10px !important;
}
.czb-card__title a::after { content: ""; position: absolute; inset: 0; }
.czb-card__title a { background: linear-gradient(var(--czb-orange), var(--czb-orange)) 0 100% / 0 1.5px no-repeat; transition: background-size 0.35s ease; }
.czb-card:hover .czb-card__title a { background-size: 100% 1.5px; }
.czb-card__excerpt {
	font-size: 15.5px;
	line-height: 1.6;
	color: var(--czb-ink-2);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.czb-empty { padding: 40px 0 80px; text-align: center; color: var(--czb-muted); }

/* ---------- Pagination ---------- */
.czb-pager {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	padding-top: 64px;
}
.czb-pager .page-numbers {
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	border: 1px solid var(--czb-line);
	font-size: 15px;
	font-weight: 500;
	color: var(--czb-ink);
	transition: border-color 0.2s, background 0.2s;
}
.czb-pager a.page-numbers:hover { border-color: var(--czb-navy); }
.czb-pager .page-numbers.current { background: var(--czb-navy); border-color: var(--czb-navy); color: #fff; }
.czb-pager .page-numbers.dots { border: 0; }

/* ---------- CTA band ---------- */
.czb-band { padding: 96px 32px 104px; }
.czb-band__inner {
	max-width: 1136px;
	margin: 0 auto;
	background: var(--czb-paper);
	border-radius: 8px;
	text-align: center;
	padding: 64px 32px 68px;
	position: relative;
	overflow: hidden;
}
.czb-band__inner::before, .czb-band__inner::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	opacity: 0.5;
	pointer-events: none;
}
.czb-band__inner::before { width: 240px; height: 240px; background: var(--czb-sky); left: -90px; top: -110px; }
.czb-band__inner::after { width: 180px; height: 180px; background: #F2C9A0; right: -60px; bottom: -90px; }
.czb-band__inner > * { position: relative; z-index: 1; }
.czb-band__title { font-size: clamp(1.9rem, 3.4vw, 2.75rem); margin: 14px 0 14px !important; }
.czb-band__text { color: var(--czb-ink-2); max-width: 520px; margin: 0 auto 30px !important; font-size: 17px; }

/* ==========================================================================
   Single post
   ========================================================================== */
.czb-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 10001;
	pointer-events: none;
}
body.admin-bar .czb-progress { top: 32px; }
.czb-progress span {
	display: block;
	height: 100%;
	background: var(--czb-orange, #E78800);
	transform: scaleX(0);
	transform-origin: 0 50%;
	will-change: transform;
}

.czb-article__head {
	max-width: 860px;
	margin: 0 auto;
	padding: 56px 32px 44px;
	text-align: center;
}
.czb-crumbs {
	display: flex;
	justify-content: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--czb-muted);
}
.czb-crumbs a:hover { color: var(--czb-navy); }
.czb-article__title {
	font-size: clamp(2.2rem, 4.6vw, 3.7rem);
	font-weight: 400 !important;
	line-height: 1.1 !important;
	margin: 22px 0 0 !important;
	text-wrap: balance;
}
.czb-article__dek {
	font-family: var(--czb-serif);
	font-size: clamp(1.15rem, 1.8vw, 1.35rem);
	line-height: 1.5;
	color: var(--czb-ink-2);
	margin-top: 20px !important;
}
.czb-byline {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin-top: 30px;
	text-align: left;
}
.czb-byline__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--czb-line);
}
.czb-byline__text { display: flex; flex-direction: column; line-height: 1.35; }
.czb-byline__name { font-weight: 600; font-size: 15px; color: var(--czb-ink); }

.czb-article__cover {
	max-width: 1200px;
	margin: 0 auto 64px;
	padding: 0 32px;
}
.czb-article__cover img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 4px;
	background: var(--czb-paper);
}

.czb-article__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 700px) minmax(0, 1fr);
	padding: 0 32px;
}
.czb-article__body { grid-column: 2; min-width: 0; }

/* Table of contents */
.czb-toc {
	grid-column: 1;
	grid-row: 1;
	justify-self: end;
	align-self: start;
	position: sticky;
	top: var(--czb-sticky);
	width: 236px;
	margin-right: 56px;
	max-height: calc(100vh - var(--czb-sticky) - 24px);
	overflow-y: auto;
	scrollbar-width: thin;
}
.czb-toc__label {
	list-style: none;
	cursor: default;
	font: 600 12px/1.2 var(--czb-sans);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--czb-muted);
	margin-bottom: 14px;
}
.czb-toc__label::-webkit-details-marker { display: none; }
.czb-toc__list { list-style: none; margin: 0; padding: 0; }
.czb-toc__list li { margin: 0; }
.czb-toc__list a {
	display: block;
	font-size: 14px;
	line-height: 1.4;
	color: var(--czb-muted);
	padding: 7px 0 7px 16px;
	border-left: 2px solid var(--czb-line);
	transition: color 0.2s, border-color 0.2s;
}
.czb-toc__list a:hover { color: var(--czb-ink); }
.czb-toc__list a.is-active { color: var(--czb-ink); border-left-color: var(--czb-orange); font-weight: 500; }

/* Prose */
.czb-prose {
	font-size: 1.125rem;
	line-height: 1.8;
	color: #2B2937;
	overflow-wrap: break-word;
}
.czb .czb-prose > * { margin-top: 0; margin-bottom: 0; }
.czb .czb-prose > * + * { margin-top: 1.4em; }
.czb .czb-prose > :first-child { margin-top: 0 !important; }
.czb-prose h2 {
	font-size: clamp(1.6rem, 2.6vw, 2.05rem);
	margin-top: 2.1em !important;
	margin-bottom: -0.3em !important;
	scroll-margin-top: var(--czb-sticky);
}
.czb-prose h3 {
	font-size: clamp(1.3rem, 2vw, 1.5rem);
	margin-top: 1.9em !important;
	margin-bottom: -0.45em !important;
	scroll-margin-top: var(--czb-sticky);
}
.czb-prose h4 {
	font-family: var(--czb-sans);
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: 0;
	margin-top: 1.8em !important;
	margin-bottom: -0.6em !important;
}
.czb-prose a {
	color: var(--czb-navy);
	text-decoration: underline;
	text-decoration-color: var(--czb-orange);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
	transition: color 0.2s;
}
.czb-prose a:hover { color: var(--czb-accent); }
.czb-prose strong, .czb-prose b { font-weight: 600; color: var(--czb-ink); }
.czb-prose ul, .czb-prose ol { padding-left: 1.35em; }
.czb-prose li { padding-left: 0.25em; }
.czb-prose li + li { margin-top: 0.55em; }
.czb-prose ul li::marker { color: var(--czb-orange); }
.czb-prose ol li::marker { color: var(--czb-accent); font-weight: 600; font-size: 0.95em; }
.czb-prose blockquote {
	margin: 2.2em 0 !important;
	padding: 0.1em 0 0.1em 1.5em;
	border-left: 3px solid var(--czb-orange);
	font-family: var(--czb-serif);
	font-style: italic;
	font-size: 1.35rem;
	line-height: 1.5;
	color: var(--czb-ink);
}
.czb-prose blockquote p + p { margin-top: 0.8em; }
.czb-prose blockquote cite { display: block; margin-top: 0.8em; font: 500 14px var(--czb-sans); color: var(--czb-muted); font-style: normal; }
.czb-prose figure, .czb-prose .wp-caption, .czb-prose .wp-block-image { margin: 2.4em 0 !important; max-width: 100%; width: auto !important; }
.czb-prose img { border-radius: 4px; margin-left: auto; margin-right: auto; }
.czb-prose figcaption, .czb-prose .wp-caption-text {
	font-size: 14px;
	line-height: 1.5;
	color: var(--czb-muted);
	text-align: center;
	margin-top: 12px;
}
.czb-prose hr {
	border: 0;
	height: 1px;
	width: 96px;
	background: var(--czb-line);
	margin: 3em auto !important;
}
.czb-prose table {
	display: block;
	overflow-x: auto;
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
	line-height: 1.5;
}
.czb-prose th, .czb-prose td { border-bottom: 1px solid var(--czb-line); padding: 0.75em 0.8em; text-align: left; vertical-align: top; }
.czb-prose th { font-weight: 600; background: var(--czb-paper); }
.czb-prose code { font-size: 0.9em; background: var(--czb-paper); padding: 0.15em 0.4em; border-radius: 3px; }
.czb-prose iframe, .czb-prose video { max-width: 100%; border-radius: 4px; }
.czb-prose .czb-lede::first-letter {
	font-family: var(--czb-serif);
	float: left;
	font-size: 4.2em;
	line-height: 0.8;
	font-weight: 500;
	color: var(--czb-navy);
	padding: 0.1em 0.12em 0 0;
}

/* Article footer */
.czb-article__foot {
	max-width: 764px;
	margin: 64px auto 0;
	padding: 0 32px;
}
.czb-share {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	border-top: 1px solid var(--czb-line);
	padding-top: 28px;
}
.czb-share__label { font: 600 12px/1 var(--czb-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--czb-muted); }
.czb-share__links { display: flex; gap: 10px; }
.czb-share__btn {
	position: relative;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid var(--czb-line);
	background: transparent;
	color: var(--czb-ink) !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.czb-share__btn:hover { background: var(--czb-navy); border-color: var(--czb-navy); color: #fff !important; }
.czb-share__toast {
	position: absolute;
	bottom: calc(100% + 8px);
	right: 0;
	white-space: nowrap;
	background: var(--czb-ink);
	color: #fff;
	font-size: 12.5px;
	padding: 5px 10px;
	border-radius: 4px;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.2s, transform 0.2s;
	pointer-events: none;
}
.czb-share__toast.is-on { opacity: 1; transform: none; }

.czb-author {
	display: flex;
	gap: 22px;
	align-items: flex-start;
	margin-top: 36px;
	background: var(--czb-paper);
	border-radius: 8px;
	padding: 30px;
}
.czb-author__img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.czb-author__name { font-family: var(--czb-serif); font-size: 1.25rem; font-weight: 500; color: var(--czb-ink); }
.czb-author__bio { font-size: 15.5px; line-height: 1.6; color: var(--czb-ink-2); margin: 6px 0 14px !important; }

/* Related classes */
.czb-classes { padding-top: 96px; }
.czb-class { position: relative; }
.czb-class__media { aspect-ratio: 4 / 3; margin-bottom: 16px; }
.czb-class__title {
	font-family: var(--czb-sans) !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	letter-spacing: 0 !important;
	line-height: 1.4 !important;
}
.czb-class__title a::after { content: ""; position: absolute; inset: 0; }
.czb-class:hover .czb-class__title a { color: var(--czb-navy); }
.czb-class__price { margin-top: 6px !important; font-size: 15px; color: var(--czb-muted); }
.czb-class__price del { opacity: 0.6; margin-right: 6px; }
.czb-class__price ins { text-decoration: none; color: var(--czb-accent); }

/* Keep reading */
.czb-more {
	background: var(--czb-paper);
	margin-top: 104px;
	padding: 88px 0 104px;
}
.czb-more .czb-card__media { background: #EDE5D6; }

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {
	.czb-article__layout { display: block; max-width: 764px; margin: 0 auto; }
	.czb-toc {
		position: static;
		width: auto;
		margin: 0 0 40px;
		max-height: none;
		overflow: visible;
	}
	.czb-toc { display: block; width: 100% !important; justify-self: stretch; }
	.czb-toc__box { display: block; width: 100%; background: var(--czb-paper); border-radius: 8px; padding: 16px 20px; }
	.czb-toc__label {
		cursor: pointer;
		display: flex;
		gap: 16px;
		justify-content: space-between;
		align-items: center;
		margin: 0;
	}
	.czb-toc__label::after {
		content: "";
		width: 8px;
		height: 8px;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg) translateY(-3px);
		transition: transform 0.2s;
	}
	.czb-toc__box[open] .czb-toc__label::after { transform: rotate(-135deg) translateY(-2px); }
	.czb-toc__box[open] .czb-toc__list { margin-top: 12px; }
	.czb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 28px; }
	.czb-hero { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 782px) {
	body.admin-bar .czb-progress { top: 46px; }
}

@media (max-width: 699px) {
	.czb { font-size: 16px; }
	.czb-wrap, .czb-article__layout, .czb-article__foot, .czb-article__cover { padding-left: 20px; padding-right: 20px; }
	.czb-masthead { padding: 52px 20px 40px; }
	.czb-hero { padding-bottom: 52px; }
	.czb-section { padding-top: 52px; }
	.czb-grid { grid-template-columns: 1fr; gap: 44px; }
	.czb-section__head { flex-direction: column; align-items: flex-start; gap: 14px; }
	.czb-article__head { padding: 36px 20px 32px; }
	.czb-article__cover { margin-bottom: 40px; }
	.czb-article__cover img { aspect-ratio: 4 / 3; }
	.czb-prose { font-size: 1.0625rem; line-height: 1.75; }
	.czb-prose blockquote { font-size: 1.2rem; }
	.czb-author { flex-direction: column; padding: 24px; gap: 16px; }
	.czb-band { padding: 64px 16px 72px; }
	.czb-band__inner { padding: 48px 22px 52px; }
	.czb-more { margin-top: 72px; padding: 64px 0 72px; }
	.czb-classes { padding-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
	.czb *, .czb *::before, .czb *::after { transition: none !important; }
}
