/* ============================================================
   Hinnasto: hero-paneeli, palvelutasot, tehtävät tasoittain,
   erillisveloitukset. Data: inc/pricing.php.
   ============================================================ */

/* --- Hero: hinnoitteluperiaatteet --- */
.svc-hero__aside { background: var(--relion-white); border: 1px solid var(--border); border-radius: var(--r-media); padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow-lg); }
.svc-hero__aside-title { font-size: 20px; font-weight: var(--fw-head); letter-spacing: -0.01em; margin: 0 0 18px; }
.svc-hero__principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.svc-hero__principles li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; line-height: 1.5; color: var(--fg-muted); }
.svc-hero__principles svg { color: var(--relion-orange-aa); flex: none; margin-top: 3px; }
.svc-hero__rating { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 0; padding-top: 20px; border-top: 1px solid var(--border); color: var(--fg-muted); font-size: 14.5px; }
.svc-hero__rating strong { font-size: 34px; line-height: 1; color: var(--fg); letter-spacing: -0.02em; }
.svc-hero__handbook { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--fg-link); font-weight: 600; font-size: 15px; }
.svc-hero__aside-sub { margin: 24px 0 12px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-subtle); }
.svc-hero__aside .partner-programs { gap: 12px; }

/* --- Yhteiset: taulukko ja tilasiru --- */
.ptable { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.ptable th, .ptable td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.ptable thead th { font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-subtle); }
.ptable tbody th { font-weight: 500; }

.pchip { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; line-height: 1.25; white-space: nowrap; background: var(--relion-gray-50); color: var(--relion-gray-600); }
.pchip--sisaltyy { background: var(--relion-orange-50); color: var(--relion-orange-700); }
.pchip--asiakas { background: var(--relion-blue-50); color: var(--relion-slate-700); }
.pchip--asiakas_tai_lisatyo { background: var(--relion-kesataivas); color: var(--relion-slate-700); }
.pchip--kayttoonotto { background: var(--relion-white); color: var(--relion-gray-600); box-shadow: inset 0 0 0 1px var(--border-strong); }

/* --- Palvelutasot: kortit ja vertailu samassa ruudukossa --- */
.ptiers { --ptiers-labels: 26%; }
.ptiers__head { max-width: 760px; margin-bottom: 48px; }
.ptiers__cards { list-style: none; margin: 0; padding: 0 0 0 var(--ptiers-labels); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ptier { display: flex; }
.ptier__card { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 28px 24px; border: 1px solid var(--border); border-bottom: 0; border-radius: var(--r-card) var(--r-card) 0 0; background: var(--relion-white); }
/* Korttien rivit linjaan, vaikka yläotsikko tai kuvaus rivittyisi eri tavalla. */
@supports (grid-template-rows: subgrid) {
	@media (min-width: 901px) {
		.ptiers__cards { grid-template-rows: repeat(6, auto); }
		.ptier { display: grid; grid-row: span 6; grid-template-rows: subgrid; }
		.ptier__card { display: grid; grid-row: span 6; grid-template-rows: subgrid; align-content: start; }
		.ptier__card > :not(.ptier__price):not(.ptier__cta) { align-self: start; }
	}
}
.ptier__kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--relion-orange-aa); }
.ptier__name { margin: 0; font-size: clamp(26px, 2.4vw, 32px); font-weight: var(--fw-head); letter-spacing: -0.02em; line-height: 1.1; }
.ptier__subtitle { margin: -4px 0 0; font-size: 14px; color: var(--fg-subtle); }
.ptier__desc { margin: 0; font-size: 15px; line-height: 1.55; color: var(--fg-muted); }
.ptier__price { margin: auto 0 0; padding-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.ptier__price strong { font-size: 19px; letter-spacing: -0.01em; }
.ptier__price span { font-size: 13.5px; color: var(--fg-subtle); }
.ptier__cta { margin-top: 8px; white-space: normal; }
.ptier--featured .ptier__card { background: var(--relion-slate-900); border-color: var(--relion-slate-900); color: #fff; }
/* theme.json värittää otsikot erikseen, joten perintä ei riitä. */
.ptier--featured .ptier__name { color: #fff; }
.ptier--featured .ptier__kicker { color: var(--relion-orange-100); }
.ptier--featured .ptier__subtitle,
.ptier--featured .ptier__price span { color: rgba(255, 255, 255, 0.7); }
.ptier--featured .ptier__desc { color: rgba(255, 255, 255, 0.82); }

.ptable--compare { table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.ptable--compare col.ptable__labels { width: var(--ptiers-labels); }
.ptable--compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ptable--compare tbody th { font-weight: 600; color: var(--fg); padding-left: 0; }
.ptable--compare td { position: relative; color: var(--fg-muted); padding-left: 24px; padding-right: 24px; }
.ptable--compare td::before { content: ""; position: absolute; inset: 0; border-right: 1px solid var(--border); background: var(--relion-white); z-index: -1; }
.ptable--compare td:nth-child(2)::before { border-left: 1px solid var(--border); }
.ptable--compare td.is-featured { color: var(--fg); font-weight: 600; border-bottom-color: rgba(181, 52, 26, 0.14); }
.ptable--compare td.is-featured::before { background: var(--relion-orange-50); border-color: var(--relion-orange-100); }
.ptable--compare tbody { position: relative; z-index: 0; }
.ptable--compare tbody tr:last-child td::before { border-bottom: 1px solid var(--border); }
.ptable--compare tbody tr:last-child td.is-featured::before { border-bottom-color: var(--relion-orange-100); }

/* Kortit ja sarakkeet yhtenä lohkona: ei rakoja, pyöristys vain ulkokulmissa. */
@media (min-width: 901px) {
	.ptier + .ptier .ptier__card { border-left: 0; }
	.ptier__card { border-radius: 0; }
	.ptier:first-child .ptier__card { border-radius: var(--r-card) 0 0 0; }
	.ptier:last-child .ptier__card { border-radius: 0 var(--r-card) 0 0; }
	.ptable--compare tbody tr:last-child td:nth-child(2)::before { border-bottom-left-radius: var(--r-card); }
	.ptable--compare tbody tr:last-child td:last-child::before { border-bottom-right-radius: var(--r-card); }
}
.ptiers__note { margin: 24px 0 0; max-width: 80ch; font-size: 14px; line-height: 1.6; color: var(--fg-subtle); }

/* --- Tehtävät tasoittain --- */
.ptasks__head { max-width: 760px; margin-bottom: 36px; }
.ptasks__tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.ptasks__tabs[hidden] { display: none; }
.ptasks__tab { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--relion-white); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.ptasks__tab:hover { border-color: var(--border-strong); }
.ptasks__tab[aria-selected="true"] { background: var(--relion-slate-900); border-color: var(--relion-slate-900); color: #fff; }
.ptasks__tab:focus-visible { outline: 3px solid var(--relion-orange-aa); outline-offset: 3px; }
.ptasks__tab-name { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.ptasks__tab-sub { font-size: 14px; color: var(--fg-subtle); }
.ptasks__tab[aria-selected="true"] .ptasks__tab-sub { color: #C8CCD0; }

.ptasks__legend { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0 0 32px; }
.ptasks__legend-item { display: flex; align-items: center; gap: 10px; }
.ptasks__legend dt, .ptasks__legend dd { margin: 0; }
.ptasks__legend dd { font-size: 14px; color: var(--fg-subtle); }

.ptasks__panel + .ptasks__panel { margin-top: 56px; }
.ptasks__panel:focus-visible { outline: 3px solid var(--relion-orange-aa); outline-offset: 8px; border-radius: var(--r-card); }
.ptasks__tier { font-size: clamp(24px, 2.4vw, 30px); font-weight: var(--fw-head); letter-spacing: -0.02em; margin: 0 0 20px; }
.ptasks__tier span { color: var(--fg-subtle); font-weight: 500; }
.is-tabbed .ptasks__tier { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.is-tabbed .ptasks__panel + .ptasks__panel { margin-top: 0; }
.ptasks__chapter + .ptasks__chapter { margin-top: 36px; }
.ptasks__chapter-title { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-subtle); margin: 0 0 12px; }
.ptasks__chapter-desc { margin: -4px 0 14px; max-width: 70ch; font-size: 15px; line-height: 1.6; color: var(--fg-muted); }

.ptasks__group { background: var(--relion-white); border: 1px solid var(--border); border-radius: var(--r-card); }
.ptasks__group + .ptasks__group { margin-top: 10px; }
.ptasks__group[open] { border-color: var(--border-strong); }
.ptasks__group summary { display: flex; align-items: center; gap: 14px; padding: 20px 24px; list-style: none; cursor: pointer; }
.ptasks__group summary::-webkit-details-marker { display: none; }
.ptasks__group summary:focus-visible { outline: 3px solid var(--relion-orange-aa); outline-offset: 3px; border-radius: var(--r-card); }
.ptasks__group-name { min-width: 0; overflow-wrap: anywhere; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
@media (max-width: 480px) {
	.ptasks__group summary { flex-wrap: wrap; gap: 10px 14px; }
	.ptasks__group-name { flex-basis: 100%; }
}
.ptasks__count { font-size: 14px; color: var(--fg-subtle); margin-right: auto; }
.ptasks__pm { position: relative; width: 18px; height: 18px; flex: none; color: var(--relion-orange); }
.ptasks__pm::before, .ptasks__pm::after { content: ""; position: absolute; background: currentColor; transition: transform 240ms ease; }
.ptasks__pm::before { top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%); }
.ptasks__pm::after { left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); }
.ptasks__group[open] .ptasks__pm::after { transform: translateX(-50%) rotate(90deg); }
.ptable--tasks { margin: 0 0 8px; }
.ptable--tasks th:first-child, .ptable--tasks td:first-child { padding-left: 24px; }
.ptable--tasks th:last-child, .ptable--tasks td:last-child { padding-right: 24px; }
.ptable--tasks thead th:nth-child(2) { width: 30%; }
.ptable--tasks thead th:nth-child(3) { width: 30%; }
.ptable--tasks td:last-child { color: var(--fg-muted); font-size: 14.5px; }
.ptable--tasks tbody tr:last-child > * { border-bottom: 0; }
.ptasks__note, .plist__note { color: var(--fg-subtle); font-style: italic; font-size: 14px; }

/* --- Erillisveloitukset --- */
.plist__head { max-width: 760px; margin-bottom: 44px; }
.plist__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px); align-items: start; }
.plist__title { font-size: 22px; font-weight: var(--fw-head); letter-spacing: -0.01em; margin: 0 0 8px; }
.ptable--prices th:first-child, .ptable--prices td:first-child { padding-left: 0; overflow-wrap: anywhere; }
.ptable--prices th:last-child, .ptable--prices td:last-child { padding-right: 0; text-align: right; white-space: nowrap; }
.ptable--prices td { font-weight: 600; }
.plist__hourly { margin-top: 20px; padding: 22px 24px; border-radius: var(--r-card); background: var(--relion-gray-50); }
.plist__rate { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 12px; font-weight: 600; }
.plist__rate strong { font-size: 18px; white-space: nowrap; }
.plist__hourly-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; line-height: 1.5; color: var(--fg-muted); }

/* --- Palvelukäsikirjan nauha --- */
.guide-cta--handbook { margin: clamp(48px, 6vw, 88px) auto; max-width: calc(var(--container-max) - 64px); }
@media (max-width: 1384px) { .guide-cta--handbook { margin-left: 32px; margin-right: 32px; } }
.guide-cta__meta { flex-basis: 100%; margin: 0; font-size: 13.5px; color: var(--fg-subtle); }

/* --- Mobiili --- */
@media (max-width: 900px) {
	.ptiers__cards { padding-left: 0; grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.ptier { padding: 0; }
	.ptier__card { border-bottom: 1px solid var(--border); border-radius: var(--r-card); }

	/* Vertailu riveittäin: rivin otsikko ja tasot allekkain. Roolit pitävät taulukkosemantiikan. */
	.ptable--compare, .ptable--compare tbody, .ptable--compare tr, .ptable--compare th, .ptable--compare td { display: block; }
	.ptable--compare colgroup { display: none; }
	.ptable--compare { margin-top: 32px; }
	.ptable--compare tbody { display: grid; gap: 12px; }
	.ptable--compare tbody tr { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--relion-white); overflow: hidden; }
	.ptable--compare tbody th { padding: 14px 18px; background: var(--relion-gray-50); }
	.ptable--compare td { display: flex; justify-content: space-between; gap: 16px; padding: 12px 18px; }
	.ptable--compare td::before { content: attr(data-label); position: static; inset: auto; border: 0; background: none; z-index: auto; color: var(--fg-subtle); font-weight: 500; }
	.ptable--compare td.is-featured { background: var(--relion-orange-50); }
	.ptable--compare tbody tr:last-child td::before { border: 0; border-radius: 0; }
	.ptable--compare tbody tr > :last-child { border-bottom: 0; }

	.ptasks__tabs { gap: 6px; }
	.ptasks__tab { padding: 12px 10px; align-items: center; text-align: center; }
	.ptasks__tab-name { font-size: 16px; }
	.ptasks__tab-sub { display: none; }
	.ptasks__group summary { padding: 16px 18px; }
	.ptasks__count { white-space: nowrap; }

	.ptable--tasks, .ptable--tasks tbody, .ptable--tasks tr, .ptable--tasks th, .ptable--tasks td { display: block; }
	.ptable--tasks thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
	.ptable--tasks tr { padding: 14px 18px; border-bottom: 1px solid var(--border); }
	.ptable--tasks tbody tr:last-child { border-bottom: 0; }
	.ptable--tasks th, .ptable--tasks td, .ptable--tasks tbody tr:last-child > * { padding: 0; border: 0; }
	.ptable--tasks th:first-child, .ptable--tasks td:first-child, .ptable--tasks th:last-child, .ptable--tasks td:last-child { padding-left: 0; padding-right: 0; }
	.ptable--tasks td { display: inline-block; margin: 8px 12px 0 0; vertical-align: middle; }

	.plist__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.ptasks__pm::before, .ptasks__pm::after { transition: none; }
}
