/* tvjakodinkone: teeman omat korjaukset designin päälle. Pidä lyhyenä ja kirjaa jokainen CHECKPOINT.md:hen. */

/* 320 px: logo (160 px) + Valikko-painike (108 px) + väli ei mahdu rivin leveyteen, joten väli kapenee. */
@media (max-width: 359px) {
	.kk-header__inner { gap: var(--space-3); }
}

/* Perusblokin taulukko (ei vertailutaulukko) vierii vaakasuunnassa kapealla näytöllä, ettei teksti katkea kesken sanan. */
.wp-block-table:not(.kk-compare) { overflow-x: auto; }
@media (max-width: 520px) {
	.wp-block-table:not(.kk-compare) table { min-width: 480px; }
}

/* Artikkelikuvissa on logo oikeassa alakulmassa. Kortteihin ja hakutuloksiin rajattu 16:9-kuva painotetaan oikeaan reunaan, jotta logo ei leikkaudu pois. */
.kk-card__media img,
.kk-result__media img { object-position: right center; }

/* Artikkelin pääkuva näytetään sellaisenaan: täysi leveys, ei rajausta. */
article > figure.wp-block-image > img { display: block; width: 100%; height: auto; }

/* Laiteryhmälinkit: otsikon ja linkkien väliin väli (etusivu, tyylisivu). */
h2 + .kk-category-links { margin-top: var(--space-5); }

/* Evästebanneri: kiinnitetty alareunaan, ei peitä koko sivua. */
.kk-consent { position: fixed; z-index: 1000; left: var(--space-4); right: var(--space-4); bottom: var(--space-4); max-width: 640px; margin-inline: auto; }
.kk-consent[hidden] { display: none; }
.kk-consent__inner { box-sizing: border-box; padding: var(--space-5); background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.kk-consent__title { margin: 0; font: 600 20px/28px var(--font-sans); }
.kk-consent__text { margin: var(--space-2) 0 0; font-size: 15px; line-height: 24px; }
.kk-consent__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
.kk-consent__actions .kk-button { flex: 1 1 200px; }
.kk-footer__asetukset { margin: 0; }
.kk-footer__asetukset button { padding: 0; min-height: var(--tap-target); font: inherit; color: inherit; text-decoration: underline; background: none; border: 0; cursor: pointer; }
@media (max-width: 520px) {
	.kk-consent { left: var(--space-3); right: var(--space-3); bottom: var(--space-3); }
	.kk-consent__inner { padding: var(--space-4); }
	.kk-consent__title { font-size: 18px; line-height: 24px; }
	.kk-consent__text { font-size: 14px; line-height: 20px; }
	.kk-consent__actions { gap: var(--space-2); margin-top: var(--space-3); }
	.kk-consent__actions .kk-button { flex: 1 1 140px; padding-inline: var(--space-3); }
}

/* 0.10.3: vertailun otsikkokuva, leveä vertailutaulukko ja matalat tuotekuvat */
.kk-art-hero { position: relative; isolation: isolate; color: #fff; background: #2a2118 var(--kk-hero-kuva) center 40% / cover no-repeat; padding: var(--space-7) 0; }
.kk-art-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(24, 18, 12, .42) 0%, rgba(24, 18, 12, .72) 100%); }
.kk-art-hero .kk-page-head { margin-inline: auto; }
.kk-art-hero h1, .kk-art-hero .kk-hero-meta { color: #fff; }
.kk-art-hero .kk-lead { color: rgba(255, 255, 255, .92); }
.kk-art-hero .kk-eyebrow, .kk-art-hero .kk-breadcrumb, .kk-art-hero .kk-breadcrumb a, .kk-art-hero .kk-disclosure { color: rgba(255, 255, 255, .85); }
.kk-art-hero .kk-hero-meta a, .kk-art-hero .kk-disclosure a { color: #fff; }
.kk-art-hero__kuvateksti { position: absolute; right: var(--space-4); bottom: var(--space-2); font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, .75); }
@media (max-width: 600px) { .kk-art-hero { padding: var(--space-6) 0; } }
.kk-compare--laaja { width: min(1000px, calc(100vw - 32px)); max-width: none; }
.kk-compare--laaja table { min-width: 900px; }
.kk-compare--laaja thead th { font-size: 17px; line-height: 22px; }
.kk-compare--laaja :is(th, td) { padding: var(--space-3); }
.kk-compare--laaja tbody th, .kk-compare--laaja tbody td:first-child { width: 16%; }

/* 0.10.6: vertailun keskitetty asettelu */
.kk-prose--vertailu { max-width: 860px; margin-inline: auto; }
.kk-art-hero .kk-page-head { max-width: 860px; }
.kk-prose--vertailu .kk-compare--laaja { margin-inline: calc((100% - min(1000px, 100vw - 32px)) / 2); }
.kk-prose--vertailu .kk-toc { text-align: center; }
.kk-prose--vertailu .kk-toc ol { padding-left: 0; justify-items: center; list-style-position: inside; }
.kk-prose--vertailu .kk-picks > li { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.kk-prose--vertailu .kk-picks__actions { justify-content: center; }
.kk-prose--vertailu .kk-product__head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.kk-prose--vertailu .kk-product__head .kk-badge { justify-self: center; }
.kk-prose--vertailu .kk-product__actions { justify-content: center; }
.kk-prose--vertailu .kk-product__actions .kk-buttons { flex: 0 1 auto; justify-content: center; margin-top: 0; }

/* 0.10.7: vertailun otsikkoalue ja otsikot keskelle, viimeinen murupolun kohta näkyviin */
.kk-art-hero .kk-page-head { text-align: center; }
.kk-art-hero .kk-breadcrumb ol { justify-content: center; }
.kk-art-hero .kk-breadcrumb li[aria-current] { color: rgba(255, 255, 255, .85); }
.kk-art-hero .kk-hero-meta { justify-content: center; }
.kk-prose--vertailu > h2, .kk-prose--vertailu .kk-faq > h2 { text-align: center; }

/* 0.10.8: vertailun sisällysluettelon otsikko isommaksi */
.kk-prose--vertailu .kk-toc__title { font: 400 24px/30px var(--font-serif); letter-spacing: 0; text-transform: none; color: var(--ink); }

/* 0.10.9: Vertailun top 3 -laatikon merkit punaisiksi badgeiksi ja väliä nimen yläpuolelle */
.kk-picks__label--badge { margin: 0 0 var(--space-4); }
.kk-picks__label--badge .kk-badge { display: inline-flex; }

/* 0.10.10: Vertailun top 3 -laatikon perustelulista */
.kk-picks__points { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-2); font-size: 15px; line-height: 24px; color: var(--ink); text-align: center; }
.kk-picks__points li { margin: 0; }
.kk-picks__points .kk-icon { margin-right: 6px; color: var(--brand); }

/* 0.10.11: tuotesivun asettelu (merkki, kokonainen kuva, keskitys) */
.kk-sivu--tuote .kk-page-head { text-align: center; max-width: 860px; }
.kk-sivu--tuote .kk-breadcrumb ol { justify-content: center; }
.kk-tuote-merkki { margin: var(--space-4) 0 var(--space-3); }
.kk-tuote-merkki .kk-badge { display: inline-flex; }
.kk-tuote-kuva { max-width: 860px; margin: var(--space-6) auto 0; }
.kk-tuote-kuva img { display: block; width: 100%; height: clamp(240px, 50vw, 420px); object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); box-sizing: border-box; }

/* 0.10.12: tuotesivun painike ja paluulinkki keskelle */
.kk-sivu--tuote .kk-buttons { justify-content: center; }
.kk-sivu--tuote .kk-prose > p:last-child { text-align: center; }

/* 0.10.13: tuotesivun kaksipalstainen yläosa, teksti vasemmalla ja kuva oikealla */
.kk-tuote-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7); align-items: center; max-width: 1040px; margin: 0 auto; }
.kk-sivu--tuote .kk-tuote-hero .kk-page-head { text-align: left; max-width: none; margin: 0; }
.kk-sivu--tuote .kk-tuote-hero .kk-breadcrumb ol { justify-content: flex-start; }
.kk-tuote-hero .kk-tuote-merkki { margin: var(--space-4) 0 var(--space-3); }
.kk-tuote-hero .kk-tuote-kuva { max-width: none; margin: 0; }
.kk-tuote-hero .kk-tuote-kuva img { height: clamp(260px, 32vw, 400px); padding: var(--space-3); }
@media (max-width: 800px) {
	.kk-tuote-hero { grid-template-columns: 1fr; gap: var(--space-5); }
	.kk-sivu--tuote .kk-tuote-hero .kk-page-head { text-align: center; }
	.kk-sivu--tuote .kk-tuote-hero .kk-breadcrumb ol { justify-content: center; }
	.kk-tuote-hero .kk-tuote-kuva img { height: clamp(240px, 70vw, 340px); }
}

/* Toimitus: kirjoittajan titteli ja toimitussivun kortit */
.kk-author__role { margin: 0; font: 500 15px/24px var(--font-sans); color: var(--brand); }
.kk-author__body .kk-button--teksti { margin-right: var(--space-4); }
.kk-toimitus { display: grid; gap: var(--space-5); margin: var(--space-6) 0; }
.kk-toimitus .kk-author { scroll-margin-top: var(--space-8); }
.kk-toimitus .kk-author__photo { width: 96px; height: 96px; }

.kk-footer__about { max-width: 42ch; }
