/* Fontit omalta palvelimelta (SIL Open Font License), jotta kävijän tietoja ei siirry Googlelle */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fontit/inter-latin-wght.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("/fontit/nunito-latin-wght.woff2") format("woff2"); }

:root {
  --bg: #fff7f8;
  --surface: #ffffff;
  --text: #1f2d52;
  --muted: #5d6683;
  --line: #f3dde3;
  --primary: #1f2d52;
  --primary-hover: #17223f;
  --primary-dark: #131c36;
  --accent: #e0738f;
  --accent-soft: #fbe3ea;
  --soft: #eef1f8;
  --mint: #d6e6dd;
  --peach: #f9e1e7;
  --sky: #e3e9f6;
  --sun: #fdf0d5;
  --warn-bg: #fff4ec;
  --warn-line: #f6d4c0;
  --radius: 18px;
  --shadow: 0 2px 4px rgba(31, 45, 82, .04), 0 8px 24px rgba(31, 45, 82, .07);
  --shadow-lift: 0 4px 8px rgba(31, 45, 82, .06), 0 16px 36px rgba(31, 45, 82, .12);
  --max: 1080px;
  --display: Nunito, Inter, system-ui, sans-serif;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.6; font-size: 17px; }
img { max-width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-family: var(--display); font-weight: 800; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: rgba(255, 247, 248, .92); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; min-height: 66px; flex-wrap: wrap; }
.logo { font-family: var(--display); font-weight: 900; font-size: 1.45rem; color: var(--primary); text-decoration: none; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: 0; }
.logo img { width: 38px; height: 38px; margin-right: 10px; transition: transform .2s; }
.logo:hover img { transform: rotate(-6deg) scale(1.05); }
.logo-teksti small { font-size: .62em; font-weight: 800; color: #8a96a3; margin-left: 1px; }
.logo-teksti { white-space: nowrap; }
.logo-teksti span { color: var(--accent); }
.logo:hover { color: var(--primary); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--text); font-weight: 600; padding: 8px 14px; border-radius: 999px; transition: background .15s; }
.nav a:hover { background: var(--soft); color: var(--primary); }
.nav a[aria-current="page"] { background: var(--primary); color: #fff; }
.nav-lyhyt { display: none; }

/* Buttons */
.btn { display: inline-block; background: var(--primary); color: #fff; text-decoration: none; padding: 13px 24px; border-radius: 999px; font-weight: 700; border: 0; cursor: pointer; font-size: 1rem; box-shadow: 0 4px 0 var(--primary-dark); transition: transform .12s, box-shadow .12s, background .15s; }
.btn:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--primary-dark); }
.btn.secondary { background: var(--surface); color: var(--primary); box-shadow: 0 4px 0 var(--line); border: 2px solid var(--line); }
.btn.secondary:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.btn.ghost { box-shadow: none; }
.btn.ghost:active { transform: none; }

/* Hero */
.hero { padding: 56px 0 72px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 560px; height: 560px; right: -140px; top: -170px; background: radial-gradient(circle, #f9dbe3 0%, transparent 70%); z-index: -1; }
.hero::after { content: ""; position: absolute; width: 420px; height: 420px; left: -180px; bottom: -220px; background: radial-gradient(circle, var(--mint) 0%, transparent 70%); z-index: -1; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.hero h1 .korostus { color: var(--accent); white-space: nowrap; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 620px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.hero-kuva { margin: 0; max-width: 430px; width: 100%; justify-self: center; position: relative; }
.hero-kuva::before { content: ""; position: absolute; inset: 22px -18px -18px 22px; border-radius: 34px; background: var(--accent); opacity: .85; transform: rotate(3deg); z-index: -1; }
.hero-kuva::after { content: ""; position: absolute; width: 74px; height: 74px; left: -22px; top: 26px; border-radius: 50%; background: var(--mint); z-index: -1; }
.hero-kuva img { display: block; width: 100%; height: auto; border-radius: 30px; box-shadow: var(--shadow-lift); }
.hero-kuva figcaption { font-size: .72rem; color: var(--muted); text-align: right; margin-top: 26px; }
.hero-luottamus { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; font-size: .9rem; color: var(--muted); }
.hero-luottamus span::before { content: "✓ "; color: var(--primary); font-weight: 800; }

/* Sections & cards */
section { padding: 44px 0; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card .tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--mint); color: #2f6650; margin-bottom: 10px; letter-spacing: .02em; }
.card p { color: var(--muted); }
.band { background: var(--surface); position: relative; }
.band::before, .band::after { content: ""; position: absolute; left: 0; right: 0; height: 28px; background: var(--surface); }
.band::before { top: -27px; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 28' preserveAspectRatio='none'%3E%3Cpath d='M0 28 C 300 0 900 0 1200 28 Z'/%3E%3C/svg%3E") center / 100% 100%; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 28' preserveAspectRatio='none'%3E%3Cpath d='M0 28 C 300 0 900 0 1200 28 Z'/%3E%3C/svg%3E") center / 100% 100%; }
.band::after { bottom: -27px; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 28' preserveAspectRatio='none'%3E%3Cpath d='M0 0 C 300 28 900 28 1200 0 Z'/%3E%3C/svg%3E") center / 100% 100%; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 28' preserveAspectRatio='none'%3E%3Cpath d='M0 0 C 300 28 900 28 1200 0 Z'/%3E%3C/svg%3E") center / 100% 100%; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding-left: 32px; position: relative; margin-bottom: 12px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--peach); color: #b8466a; font-weight: 800; font-size: .8rem; display: grid; place-items: center; }

/* Kuvakkeet */
.ikoni { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 14px; color: var(--primary); }
.ikoni svg { width: 28px; height: 28px; }
.ikoni.persikka { background: var(--peach); color: #b8466a; }
.ikoni.minttu { background: var(--mint); color: #2f6650; }
.ikoni.taivas { background: var(--sky); color: #34477a; }
.ikoni.aurinko { background: var(--sun); color: #8a5f12; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; transition: box-shadow .15s; }
details[open] { box-shadow: var(--shadow); }
summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--display); font-weight: 900; font-size: 1.3rem; line-height: 1; color: var(--accent); transition: transform .2s; }
details[open] > summary::after { transform: rotate(45deg); }
details p { margin: 10px 0 0; color: var(--muted); }

.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 14px; padding: 14px 18px; font-size: .95rem; }

/* Footer */
.site-footer { padding: 44px 0 48px; color: #cdd5ea; font-size: .92rem; background: var(--primary-dark); margin-top: 56px; }
.site-footer .links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.site-footer p { color: #a3aecb; margin: 0; }

/* Calculator */
.calc { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .calc { grid-template-columns: 1.1fr .9fr; align-items: start; } .result { position: sticky; top: 16px; } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px; margin: 0 0 20px; min-width: 0; }
legend { font-weight: 700; padding: 0 6px; font-size: 1.05rem; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 14px; }
label { display: block; font-size: .92rem; font-weight: 600; }
label small, .hint { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; }
input[type="text"], input[type="number"], select { width: 100%; padding: 10px 12px; border: 1px solid #cfccc2; border-radius: 8px; font: inherit; background: #fff; margin-top: 4px; }
input:focus, select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.child { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 14px; }
.child:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.child h3 { font-size: 1rem; color: var(--primary); }
.checkbox { display: flex; gap: 8px; align-items: center; font-weight: 500; }

.result { background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius); padding: 22px; }
.big { font-size: 2.4rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.result table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 12px 0; }
.result td, .result th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.result td.num, .result th.num { text-align: right; white-space: nowrap; }
.result tr.total td { font-weight: 700; border-bottom: 0; }
.msg { font-size: .9rem; margin: 10px 0; padding: 10px 12px; border-radius: 8px; background: var(--soft); }
.msg.warn { background: var(--warn-bg); }

.radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; cursor: pointer; font-weight: 400; }
.radio:has(input:checked) { border-color: var(--primary); background: var(--soft); }
.radio input { margin-top: 5px; }
.radio small { display: block; color: var(--muted); }
body.tapa .only-vuoro, body.tapa .t-vuoro, body.vuoro .only-tapa, body.vuoro .t-tapa { display: none !important; }
.steps { padding-left: 20px; margin: 0; color: var(--muted); }
.steps li { margin-bottom: 8px; }
table.ref { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 0 0 16px; }
table.ref td, table.ref th { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: left; }
table.ref .num { text-align: right; }

/* Vaiheittainen laskuri */
.wizard-wrap { max-width: 680px; margin: 0 auto; padding: 32px 16px 8px; }
.wizard-intro p { color: var(--muted); }
.wizard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 24px rgba(31, 78, 95, .08); padding: 28px; scroll-margin-top: 16px; }
@media (max-width: 520px) { .wizard { padding: 20px 16px; } }
.progress { margin-bottom: 22px; }
.progress-bar { height: 6px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .3s; }
.progress-text { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.step-title { font-size: clamp(1.35rem, 3.5vw, 1.6rem); margin-bottom: 18px; }
.wizard .field { display: block; margin-bottom: 18px; }
.wizard .label { display: block; font-weight: 600; font-size: 1rem; margin-bottom: 2px; }
.wizard .opt { font-weight: 400; font-size: .8rem; color: var(--muted); margin-left: 4px; }
.wizard .hint { display: block; color: var(--muted); font-size: .88rem; font-weight: 400; margin-bottom: 6px; line-height: 1.45; }
.wizard select { width: 100%; padding: 12px 14px; border: 1px solid #cfccc2; border-radius: 10px; font: inherit; background: #fff; margin-top: 4px; }
.eur { display: flex; align-items: stretch; border: 1px solid #cfccc2; border-radius: 10px; overflow: hidden; background: #fff; max-width: 260px; margin-top: 4px; }
.eur:focus-within { outline: 2px solid var(--primary); outline-offset: 1px; }
.eur input { border: 0; padding: 12px 14px; font: inherit; flex: 1; min-width: 0; outline: none; margin: 0; }
.eur span { display: flex; align-items: center; padding: 0 12px; background: #f3f2ee; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.q { margin: 22px 0; }
.q > .label { margin-bottom: 4px; }
.choices { display: grid; gap: 10px; margin-top: 8px; }
.choices.inline { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.choice { text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 14px 16px; cursor: pointer; font: inherit; color: var(--text); transition: border-color .15s, background .15s; }
.choices.inline .choice { text-align: center; padding: 12px 10px; }
.choice:hover { border-color: #9fb9c2; }
.choice.on { border-color: var(--primary); background: var(--soft); }
.choice strong { display: block; font-weight: 600; }
.choice span { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }
.subcard { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 14px 0; background: #fcfbf9; }
.subtitle { font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.payer { margin: -8px 0 18px; font-size: .88rem; color: var(--muted); }
.payer .choices { margin-top: 4px; max-width: 320px; }
.payer .choice { padding: 6px 8px; font-size: .88rem; }
.slider { background: #fcfbf9; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 4px 0 18px; }
.slider-labels, .slider-ends { display: flex; justify-content: space-between; gap: 10px; }
.slider-labels span:last-child { text-align: right; }
.slider-labels strong { display: block; color: var(--primary); font-size: 1.4rem; white-space: nowrap; }
.slider-ends { font-size: .8rem; color: var(--muted); }
.slider input[type="range"] { width: 100%; margin: 14px 0 6px; accent-color: var(--primary); height: 28px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
.check { display: flex; gap: 10px; align-items: center; margin: 8px 0 14px; font-weight: 500; }
.check input { width: 18px; height: 18px; }
.note { background: var(--soft); border-radius: 10px; padding: 12px 14px; font-size: .93rem; color: #2c4a55; }
.tip { border: 0; padding: 0; background: none; margin: 4px 0 0; }
.tip summary { color: var(--primary); font-weight: 500; font-size: .92rem; }
.tip p { font-size: .9rem; }
.total-line { font-weight: 600; color: var(--primary); }
.error { color: #b3261e; font-weight: 600; min-height: 1.2em; margin: 8px 0 0; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.wizard.is-result .wizard-nav { border-top: 0; padding-top: 0; }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.ghost:hover { background: var(--soft); }
.privacy { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 14px; }
.info { padding-top: 48px; }

.result-hero { background: var(--primary); color: #fff; border-radius: 14px; padding: 24px; text-align: center; margin-bottom: 22px; }
.result-label { font-size: 1.05rem; opacity: .92; }
.result-sum { font-size: clamp(2.4rem, 8vw, 3.2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px; }
.result-sum span { font-size: 1.1rem; font-weight: 500; opacity: .85; }
.result-sub { opacity: .85; font-size: .95rem; }
.why { padding-left: 20px; }
.why li { margin-bottom: 8px; }
details.full { margin: 18px 0; }
details.full h3 { margin-top: 16px; font-size: 1rem; }
.calc-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 6px 0 10px; }
.calc-table td, .calc-table th { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.calc-table .num { text-align: right; white-space: nowrap; }
.calc-table tr.total td { font-weight: 700; }
.next-box { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-top: 18px; }
.next-box ol { padding-left: 20px; margin: 0 0 10px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* Asiakirjapohjat */
.wizard input.txt, .wizard textarea.txt { width: 100%; padding: 12px 14px; border: 1px solid #cfccc2; border-radius: 10px; font: inherit; background: #fff; margin-top: 4px; }
.wizard input.date { max-width: 220px; }
.wizard textarea.txt { resize: vertical; line-height: 1.5; }
.wizard input.txt:focus, .wizard textarea.txt:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.subtitle-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.link-btn { background: none; border: 0; color: #b3261e; cursor: pointer; font: inherit; font-size: .88rem; }
.btn.small { padding: 8px 16px; font-size: .92rem; }
.doc-card { text-decoration: none; color: inherit; display: block; transition: border-color .15s, box-shadow .15s; }
.doc-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(31, 78, 95, .1); }
.doc-card h3 { color: var(--primary); }
.doc-open { font-weight: 600; color: var(--primary); font-size: .92rem; }
.message-box { white-space: pre-wrap; background: #fcfbf9; border: 1px solid var(--line); border-radius: 12px; padding: 18px; font-size: .98rem; line-height: 1.6; }

.paper { background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 12px rgba(0,0,0,.06); padding: 40px 44px; margin-top: 22px; font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.6; color: #111; }
@media (max-width: 520px) { .paper { padding: 22px 16px; font-size: 14px; } }
.paper h1 { font-family: inherit; font-size: 1.45rem; text-align: center; margin-bottom: 4px; letter-spacing: 0; }
.paper .doc-sub { text-align: center; color: #555; margin-bottom: 26px; }
.paper h2 { font-family: inherit; font-size: 1.08rem; margin: 24px 0 8px; border-bottom: 1px solid #ccc; padding-bottom: 4px; }
.paper h3 { font-family: inherit; font-size: 1rem; margin: 22px 0 6px; }
.paper table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: .95em; }
.paper th, .paper td { border: 1px solid #bbb; padding: 6px 8px; text-align: left; vertical-align: top; }
.paper td.num, .paper th.num { text-align: right; white-space: nowrap; }
.paper tr.sum td { font-weight: 700; background: #f4f4f4; }
.paper ol, .paper ul { padding-left: 22px; }
.paper .blank-line { display: flex; gap: 10px; align-items: flex-end; }
.paper .blank-line .line { flex: 1; border-bottom: 1px solid #333; min-height: 1.2em; }
.paper .doc-place { margin-top: 30px; }
.signatures { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px 40px; margin-top: 34px; }
.sig-line { border-bottom: 1px solid #333; height: 44px; margin-bottom: 4px; }
.sig-sub { font-size: .82em; color: #555; }
.paper .box { border: 1px solid #333; padding: 12px 14px; margin-top: 28px; }
.paper .doc-note { font-size: .85em; color: #555; margin-top: 26px; }

/* Murupolku, artikkelit ja alaosa */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0 0; margin: 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); }
.doc-hero { max-width: 760px; padding-top: 18px; }
.doc-hero p { color: var(--muted); }
.prose { max-width: 760px; padding-top: 18px; padding-bottom: 24px; }
.prose h1 { margin-top: 10px; }
.prose h2 { margin-top: 34px; }
.prose h3 { margin-top: 22px; }
.prose .lead { font-size: 1.15rem; color: var(--muted); }
.prose .meta { font-size: .85rem; color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: .95rem; background: var(--surface); }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.prose td.num, .prose th.num { text-align: right; white-space: nowrap; }
.prose tr.sum td { font-weight: 700; }
.prose li { margin-bottom: 6px; }
.cta-box { background: var(--soft); border-radius: var(--radius); padding: 16px 20px; margin: 22px 0; }
.cta-box ul { list-style: none; padding: 0; margin: 8px 0 0; }
.cta-box a { font-weight: 600; }
.card h3 a { color: inherit; text-decoration: none; }
.footer-cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 22px; }
.footer-cols h2 { font-size: 1rem; color: #fff; margin-bottom: 10px; }
.footer-cols a { display: block; color: #cdd5ea; text-decoration: none; padding: 4px 0; }
.footer-cols a:hover { color: #f6b3c4; }
.footer-cols a[hidden] { display: none; }

/* Mainospaikat: piilossa, kunnes mainokset.js aktivoi ne */
.ad-slot { max-width: 728px; margin: 32px auto; padding: 0 16px; min-height: 100px; }
.ad-slot[hidden] { display: none; }
.ad-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }

.print-only { display: none; }
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; font-size: 11pt; }
  .wizard { border: 0; box-shadow: none; padding: 0; }
  .wizard-wrap { padding: 0; max-width: none; }
  .result-hero { background: #fff; color: var(--text); border: 2px solid var(--text); }
  details.full > summary { display: none; }
  .wizard .result-hero { display: none; }
  .paper { border: 0; box-shadow: none; padding: 0; margin: 0; font-size: 11.5pt; }
  .paper h2, .paper h3, .signatures, .paper .box { break-inside: avoid; }
}

/* ---------- Leikkisä ilme: kortit, laskuri ja tulokset ---------- */
.doc-card { position: relative; transition: transform .18s, box-shadow .18s, border-color .18s; }
.doc-card:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: var(--shadow-lift); border-color: var(--accent-soft); color: inherit; }
.doc-card h3 { color: var(--primary); }
.doc-card::after { content: "→"; position: absolute; right: 20px; bottom: 16px; font-weight: 800; color: var(--accent); opacity: 0; transform: translateX(-6px); transition: opacity .18s, transform .18s; }
.doc-card:hover::after { opacity: 1; transform: none; }
.grid > .card:nth-child(3n+2) .tag { background: var(--peach); color: #b8466a; }
.grid > .card:nth-child(3n+3) .tag { background: var(--sky); color: #34477a; }

.wizard { border-radius: 24px; border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.wizard-intro h1 { margin-top: 8px; }
.progress-bar { height: 10px; background: var(--accent-soft); }
.progress-bar span { background: linear-gradient(90deg, var(--accent), #f3a9bb); border-radius: 999px; }
.step-title { font-family: var(--display); }
.choice { border-radius: 16px; transition: border-color .15s, background .15s, transform .12s; }
.choice:hover { transform: translateY(-1px); border-color: var(--accent); }
.choice.on { border-color: var(--primary); background: var(--soft); box-shadow: inset 0 0 0 1px var(--primary); }
.choice.on strong::before { content: "● "; color: var(--accent); }
.subcard { border-radius: 16px; background: #fffdfa; }
.note { background: var(--soft); border-radius: 14px; }
.result-hero { background: linear-gradient(135deg, var(--primary) 0%, #34477a 100%); border-radius: 22px; position: relative; overflow: hidden; }
.result-hero::after { content: ""; position: absolute; width: 180px; height: 180px; right: -60px; top: -70px; border-radius: 50%; background: rgba(224, 115, 143, .4); }
.result-sum { font-family: var(--display); font-weight: 900; }
.next-box { border-radius: 18px; background: var(--mint); border-color: transparent; }
.cta-box { background: var(--accent-soft); border-radius: 18px; }
.paper { border-radius: 6px; }
.crumbs a:hover { color: var(--accent); }
.prose h2 { position: relative; }
.prose > h2::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 999px; background: var(--accent); margin-bottom: 12px; }
.privacy { font-weight: 500; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
@media print { .site-header { position: static; backdrop-filter: none; } .result-hero::after { display: none; } }
.eyebrow { display: inline-block; font-weight: 700; color: #b8466a; background: var(--peach); padding: 6px 14px; border-radius: 999px; font-size: .95rem; margin-bottom: 16px; }
section, [id], .wizard { scroll-margin-top: 84px; }
@media (max-width: 600px) {
  .site-header .wrap { min-height: 0; padding-top: 10px; padding-bottom: 8px; row-gap: 6px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 24px); margin: 0 -12px; padding: 0 12px 2px; gap: 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 7px 8px; font-size: .86rem; }
  .nav-pitka { display: none; } .nav-lyhyt { display: inline; }
}
@media (max-width: 600px) { .site-header { position: static; } section, [id], .wizard { scroll-margin-top: 12px; } }

/* Ajankohtaista: aikajana */
.meta-pieni { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.aikajana-vuosi { margin: 36px 0 8px; font-family: var(--display); color: var(--accent); }
.aikajana { list-style: none; margin: 0 0 8px; padding: 0 0 0 26px; border-left: 3px solid var(--peach); }
.aikajana-kohta { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 16px; box-shadow: var(--shadow); }
.aikajana-kohta::before { content: ""; position: absolute; left: -36px; top: 24px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }
.aikajana-kohta h3 { margin: 6px 0 8px; font-size: 1.12rem; }
.aikajana-kohta p { margin: 0 0 10px; }
.aikajana-kohta p:last-child { margin-bottom: 0; }
.aikajana-pvm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .88rem; font-weight: 700; color: var(--muted); }
.aikajana-tyyppi { font-size: .74rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--sky); color: #34477a; }
.aikajana-tyyppi.tyyppi-lakimuutos { background: var(--peach); color: #b8466a; }
.aikajana-tyyppi.tyyppi-oikeuskaytanto { background: var(--sky); color: #34477a; }
.aikajana-tyyppi.tyyppi-rahamaarat { background: var(--sun); color: #8a5f12; }
.aikajana-tyyppi.tyyppi-ohje { background: var(--mint); color: #2f6650; }
.aikajana-tyyppi.tyyppi-ehdotus { background: #ece8f6; color: #5a4a8a; }
.aikajana-sinulle { background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; }
.aikajana-lahde { font-size: .85rem; color: var(--muted); }
@media (max-width: 520px) { .aikajana { padding-left: 18px; } .aikajana-kohta { padding: 16px; } .aikajana-kohta::before { left: -28px; } }

/* Asiakirjakone: valinnaiset lisäehdot */
.lisaehdot { display: grid; gap: 10px; margin-top: 10px; }
.lisaehto { border: 2px solid var(--line); border-radius: 16px; background: #fff; transition: border-color .15s, background .15s; }
.lisaehto.on { border-color: var(--accent); background: #fffafb; }
.lisaehto-valitse { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; padding: 14px 16px; font: inherit; color: var(--text); cursor: pointer; }
.lisaehto-valitse strong { display: block; font-weight: 600; }
.lisaehto-valitse span span { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }
.lisaehto-merkki { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--peach); color: #b8466a; }
.lisaehto.on .lisaehto-merkki { background: var(--accent); color: #fff; }
.lisaehto textarea { display: block; width: calc(100% - 32px); margin: 0 16px 16px; }
.lisaehto-valitse:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 14px; }
