/* Lohtu — Tietopankki page family: KB index (pattern lohtu/page-tietopankki +
   block lohtu/kb-grid) and single article (template single.html, blocks
   lohtu/article-meta, lohtu/toc, lohtu/article-footer). Reuses main.css
   scaffolding (lohtu-section, lohtu-inner, buttons, FAQ, checklist,
   breadcrumbs). Desktop-first; artboard inline values are the styling
   authority. No drop shadows. */

/* ---------- Shared: category pill ---------- */

.lohtu-art-pill {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	padding: 6px 14px;
	border-radius: var(--radius-pill);
	background: var(--leaf-100);
	color: var(--leaf-800);
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
}

.lohtu-art-pill--small {
	padding: 4px 12px;
	font-size: 13px;
}

.lohtu-art-pill--white {
	background: #fff;
}

/* Smaller 40px section h2 used on the KB index (Oppaat / Artikkelit) */
h2.lohtu-art-h2 {
	font-family: var(--wp--preset--font-family--dm-serif-display, "DM Serif Display", serif);
	font-weight: 400;
	font-size: 40px;
	line-height: 1.05;
	color: var(--leaf-800);
	margin: 0 0 28px;
}

/* ================= KB index (Tietopankki) ================= */

/* ---------- Hero ---------- */

.lohtu-art-idx-hero {
	background: var(--leaf-50);
	padding-top: 32px;
	padding-bottom: 72px;
}

.lohtu-art-idx-hero__head {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: 72px;
	align-items: end;
	padding-top: 24px;
}

.lohtu-art-idx-hero h1 {
	font-family: var(--wp--preset--font-family--dm-serif-display, "DM Serif Display", serif);
	font-weight: 400;
	font-size: clamp(44px, 6vw, 76px);
	line-height: 1;
	color: var(--leaf-800);
	margin: 0;
}

p.lohtu-art-idx-hero__lead {
	font-size: 20px;
	line-height: 1.55;
	margin: 0;
	text-wrap: pretty;
}

/* Category chips */

.wp-block-buttons.lohtu-art-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding-top: 24px;
}

.lohtu-art-chip > .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 22px;
	border-radius: var(--radius-pill);
	background: #fff;
	color: var(--leaf-800);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: inset 0 0 0 1px var(--leaf-500);
	transition: background-color 0.15s ease;
}

.lohtu-art-chip > .wp-block-button__link:hover {
	background: var(--sage-100);
	color: var(--leaf-800);
}

.lohtu-art-chip--active > .wp-block-button__link {
	background: var(--leaf-500);
	color: #fff;
}

.lohtu-art-chip--active > .wp-block-button__link:hover {
	background: var(--leaf-400);
	color: #fff;
}

/* ---------- Oppaat cards ---------- */

.lohtu-art-oppaat {
	background: #fff;
	padding-bottom: 0;
}

.lohtu-art-guides {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.lohtu-art-guide {
	position: relative;
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 18px;
	align-items: center;
	padding: 12px 20px 12px 12px;
	border-radius: 20px;
	background: var(--leaf-50);
}

.lohtu-art-guide:hover {
	box-shadow: inset 0 0 0 2px var(--leaf-500);
}

.lohtu-art-guide__img {
	margin: 0;
	height: 120px;
	border-radius: 14px;
	overflow: hidden;
	background: var(--green-header);
}

.lohtu-art-guide__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lohtu-art-guide__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

p.lohtu-art-guide__eyebrow {
	font-size: 13px;
	font-weight: 600;
	color: var(--leaf-800);
	margin: 0;
}

h3.lohtu-art-guide__title {
	font-family: var(--wp--preset--font-family--dm-serif-display, "DM Serif Display", serif);
	font-weight: 400;
	font-size: 24px;
	line-height: 1.1;
	margin: 0;
}

.lohtu-art-guide__title a {
	color: var(--leaf-800);
	text-decoration: none;
}

/* Stretch the card link over the whole card */
.lohtu-art-guide__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 20px;
}

/* ---------- kb-grid: featured split + card grid ---------- */

.lohtu-art-kb {
	display: flex;
	flex-direction: column;
	gap: 56px;
}

a.lohtu-art-feat {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 48px;
	align-items: center;
	text-decoration: none;
	color: var(--ink-deep);
}

.lohtu-art-feat__media,
.lohtu-art-card__media {
	margin: 0;
	overflow: hidden;
	background: var(--green-header);
}

.lohtu-art-feat__media {
	height: 420px;
	border-radius: 24px;
}

.lohtu-art-card__media {
	height: 220px;
	border-radius: var(--radius-card);
}

.lohtu-art-feat__media img,
.lohtu-art-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lohtu-art-media--placeholder {
	background: var(--sage-200);
}

.lohtu-art-feat__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: flex-start;
}

h2.lohtu-art-feat__title {
	font-family: var(--wp--preset--font-family--dm-serif-display, "DM Serif Display", serif);
	font-weight: 400;
	font-size: clamp(32px, 3.5vw, 44px);
	line-height: 1.05;
	color: var(--leaf-800);
	margin: 0;
}

p.lohtu-art-feat__desc {
	font-size: 19px;
	line-height: 1.55;
	margin: 0;
}

.lohtu-art-kb__time {
	font-size: 15px;
	color: var(--text-muted);
}

.lohtu-art-feat__more {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	font-size: 17px;
	color: var(--leaf-800);
	padding-top: 4px;
}

.lohtu-art-feat__more::after,
.lohtu-art-related__more::after {
	content: "";
	width: 18px;
	height: 18px;
	background: var(--icon-arrow) no-repeat center / contain;
}

.lohtu-art-kb__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 48px 32px;
}

a.lohtu-art-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	text-decoration: none;
	color: var(--ink-deep);
}

a.lohtu-art-card .lohtu-art-kb__time {
	font-size: 14px;
}

h3.lohtu-art-card__title {
	font-family: var(--wp--preset--font-family--dm-serif-display, "DM Serif Display", serif);
	font-weight: 400;
	font-size: 28px;
	line-height: 1.1;
	color: var(--leaf-800);
	margin: 0;
}

p.lohtu-art-card__desc {
	font-size: 16px;
	line-height: 1.5;
	color: #3D3A36;
	margin: 0;
}

/* ---------- CTA band ---------- */

.lohtu-art-cta {
	background: var(--leaf-800);
	padding-top: 96px;
	padding-bottom: 96px;
}

.lohtu-art-cta__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 64px;
	align-items: center;
}

.lohtu-art-cta__content {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 680px;
}

.lohtu-art-cta h2 {
	font-family: var(--wp--preset--font-family--dm-serif-display, "DM Serif Display", serif);
	font-weight: 400;
	font-size: clamp(36px, 4vw, 52px);
	line-height: 1.05;
	color: #fff;
	margin: 0;
}

.lohtu-art-cta p {
	font-size: 20px;
	line-height: 1.5;
	color: var(--sage-100);
	margin: 0;
}

/* ================= Single article ================= */

/* ---------- Article header (hero) ---------- */

.lohtu-art-head {
	background: var(--leaf-50);
	padding: 12px var(--lohtu-gutter) 72px;
}

.lohtu-art-head > .lohtu-inner {
	display: flex;
	flex-direction: column;
	gap: 24px;
	align-items: flex-start;
}

.lohtu-art-head .lohtu-breadcrumbs {
	padding: 0;
	margin: 0;
	max-width: none;
}

/* Category pill via core post-terms */
.lohtu-art-cat {
	margin: 24px 0 0;
	font-size: 14px;
}

.lohtu-art-cat a {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	border-radius: var(--radius-pill);
	background: #fff;
	color: var(--leaf-800);
	font-weight: 600;
	text-decoration: none;
}

h1.lohtu-art-title {
	font-family: var(--wp--preset--font-family--dm-serif-display, "DM Serif Display", serif);
	font-weight: 400;
	font-size: clamp(38px, 5vw, 64px);
	line-height: 1.04;
	color: var(--leaf-800);
	max-width: 920px;
	margin: 0;
	text-wrap: balance;
}

/* ---------- Byline (lohtu/article-meta) ---------- */

.lohtu-art-byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	font-size: 15px;
	color: var(--text-muted);
}

.lohtu-art-byline b {
	font-weight: 600;
}

.lohtu-art-byline__sep {
	color: #B4AEA8;
}

/* ---------- Lyhyesti box ---------- */

/* White on the green hero ground (the article artboard's box sits on white,
   the header section here is leaf-50 — white keeps the contrast). */
.lohtu-art-lyhyesti {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 32px 36px;
	border-radius: 20px;
	background: #fff;
	max-width: 780px;
	margin-top: 8px;
}

.lohtu-art-lyhyesti__label {
	font-size: 15px;
	font-weight: 600;
	color: var(--leaf-800);
}

.lohtu-art-lyhyesti p {
	font-size: 19px;
	line-height: 1.65;
	margin: 0;
}

/* ---------- Two-column layout: sticky TOC + article ---------- */

.lohtu-art-body {
	background: #fff;
}

.lohtu-art-layout {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 80px;
	align-items: start;
}

/* TOC (markup from blocks/toc/render.php) */

.lohtu-toc {
	position: sticky;
	top: 120px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.lohtu-toc__label {
	font-size: 15px;
	font-weight: 600;
	color: var(--text-muted);
	padding: 0 0 12px;
}

.lohtu-toc a {
	display: flex;
	gap: 14px;
	align-items: baseline;
	padding: 10px 0;
	border-top: 1px solid #EDEBEB;
	color: var(--leaf-800);
	text-decoration: none;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
}

.lohtu-toc a:hover {
	color: var(--leaf-400);
}

.lohtu-toc a > span {
	font-size: 13px;
	font-weight: 600;
	color: var(--text-muted);
}

/* ---------- Article column ---------- */

.lohtu-art-main {
	max-width: 780px;
}

.lohtu-art-hero-img {
	margin: 0 0 40px;
	height: 420px;
	border-radius: 24px;
	overflow: hidden;
	background: var(--green-header);
}

.lohtu-art-hero-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Article typography */

.lohtu-art-main .wp-block-post-content > p {
	font-size: 19px;
	line-height: 1.65;
	margin: 0 0 18px;
}

.lohtu-art-main .wp-block-post-content > h2 {
	font-family: var(--wp--preset--font-family--dm-serif-display, "DM Serif Display", serif);
	font-weight: 400;
	font-size: clamp(30px, 3vw, 40px);
	line-height: 1.08;
	color: var(--leaf-800);
	margin: 48px 0 18px;
}

.lohtu-art-main .wp-block-post-content > h3 {
	font-size: 17px;
	font-weight: 600;
	color: var(--ink-deep);
	margin: 24px 0 12px;
}

.lohtu-art-main .wp-block-post-content p.lohtu-art-note {
	font-size: 16px;
	line-height: 1.55;
	color: var(--text-muted);
}

.lohtu-art-main .lohtu-checklist {
	gap: 14px;
	margin: 0 0 18px;
}

/* Tables (perintöverotaulukot) */

.lohtu-art-main .wp-block-table {
	margin: 0 0 24px;
	overflow-x: auto;
}

.lohtu-art-main .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 17px;
}

.lohtu-art-main .wp-block-table th {
	text-align: left;
	padding: 14px 16px;
	background: var(--leaf-50);
	font-weight: 600;
	font-size: 15px;
	border: 0;
}

.lohtu-art-main .wp-block-table td {
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid #EDEBEB;
}

/* Example box */

.lohtu-art-example {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 28px 32px;
	border-radius: var(--radius-card);
	background: var(--leaf-50);
	margin: 0 0 18px;
}

.lohtu-art-example h4 {
	font-size: 19px;
	font-weight: 600;
	margin: 0;
}

.lohtu-art-example ol {
	margin: 0;
	padding-left: 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.lohtu-art-example li {
	font-size: 18px;
	line-height: 1.6;
}

/* Inline CTA band */

.lohtu-art-inline-cta {
	display: flex;
	flex-direction: column;
	gap: 14px;
	align-items: flex-start;
	padding: 40px;
	border-radius: 24px;
	background: var(--leaf-800);
	margin: 34px 0;
}

.lohtu-art-inline-cta h3 {
	font-family: var(--wp--preset--font-family--dm-serif-display, "DM Serif Display", serif);
	font-weight: 400;
	font-size: clamp(26px, 3vw, 34px);
	line-height: 1.1;
	color: #fff;
	margin: 0;
}

.lohtu-art-inline-cta p {
	font-size: 18px;
	line-height: 1.55;
	color: var(--sage-100);
	margin: 0;
}

.lohtu-art-btn-white > .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	padding: 16px 28px;
	border-radius: var(--radius-pill);
	background: #fff;
	color: var(--leaf-800);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.lohtu-art-btn-white > .wp-block-button__link:hover {
	background: var(--sage-100);
	color: var(--leaf-800);
}

/* FAQ list inside the article reuses main.css lohtu-faq__item styles. */

/* ---------- Article footer (lohtu/article-footer) ---------- */

.lohtu-art-author {
	display: flex;
	gap: 20px;
	align-items: center;
	padding: 24px 0;
	border-top: 1px solid #EDEBEB;
	border-bottom: 1px solid #EDEBEB;
	margin-top: 40px;
}

.lohtu-art-author__avatar {
	width: 72px;
	height: 72px;
	border-radius: var(--radius-pill);
	background: var(--sage-100);
	flex-shrink: 0;
}

.lohtu-art-author__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.lohtu-art-author__info strong {
	font-size: 18px;
	font-weight: 600;
}

.lohtu-art-author__info span {
	font-size: 16px;
	color: var(--text-muted);
}

.lohtu-art-related {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-top: 48px;
}

h2.lohtu-art-related__heading {
	font-family: var(--wp--preset--font-family--dm-serif-display, "DM Serif Display", serif);
	font-weight: 400;
	font-size: clamp(30px, 3vw, 40px);
	line-height: 1.08;
	color: var(--leaf-800);
	margin: 0;
}

.lohtu-art-related__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

a.lohtu-art-related__card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 24px;
	border-radius: var(--radius-card);
	background: var(--leaf-50);
	text-decoration: none;
	color: var(--ink-deep);
}

a.lohtu-art-related__card:hover {
	box-shadow: inset 0 0 0 2px var(--leaf-500);
}

.lohtu-art-related__title {
	font-family: var(--wp--preset--font-family--dm-serif-display, "DM Serif Display", serif);
	font-weight: 400;
	font-size: 24px;
	line-height: 1.15;
	color: var(--leaf-800);
}

.lohtu-art-related__more {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	font-size: 15px;
	color: var(--leaf-800);
	margin-top: auto;
}

.lohtu-art-sources {
	font-size: 14px;
	line-height: 1.55;
	color: var(--text-muted);
	margin-top: 32px;
}

.lohtu-art-sources__label {
	font-weight: 600;
}

.lohtu-art-sources__item::after {
	content: " ";
}

/* ---------- Breakpoints ---------- */

@media (max-width: 1100px) {
	.lohtu-art-idx-hero__head {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.lohtu-art-guides {
		grid-template-columns: 1fr;
	}

	a.lohtu-art-feat {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.lohtu-art-feat__media {
		height: 320px;
	}

	.lohtu-art-kb__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 40px 24px;
	}

	.lohtu-art-cta__inner {
		grid-template-columns: 1fr;
		gap: 32px;
		justify-items: start;
	}

	.lohtu-art-layout {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.lohtu-toc {
		position: static;
	}

	.lohtu-art-related__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 700px) {
	.lohtu-art-kb__grid {
		grid-template-columns: 1fr;
	}

	.lohtu-art-feat__media,
	.lohtu-art-hero-img {
		height: 240px;
	}

	.lohtu-art-guide {
		grid-template-columns: 96px minmax(0, 1fr);
	}

	.lohtu-art-guide__img {
		height: 96px;
	}

	.lohtu-art-lyhyesti {
		padding: 24px;
	}

	.lohtu-art-inline-cta {
		padding: 28px 24px;
	}

	.lohtu-art-example {
		padding: 22px 20px;
	}
}
